어떤 클래스를 봐야할지 나와있으므로 바로 보도록하자.
username 입력창과 password 입력창이 있는데
username은 admin3으로 되어있고 password는 PBAGENFRAN456을 doConvert한 값과 비교한다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | public class test { public static String doConvert(String in) { StringBuffer tempReturn = new StringBuffer(); for (int i = 0; i < in.length(); i++) { int abyte = in.charAt(i); int cap = abyte & 32; abyte &= cap ^ -1; int i2 = (abyte < 65 || abyte > 90) ? abyte : (((abyte - 65) + 13) % 26) + 65; abyte = i2 | cap; tempReturn.append((char) abyte); } return tempReturn.toString(); } public static void main(String args[]) throws Exception { String hash = "PBAGENFRAN456"; System.out.println(doConvert(hash)); } } | cs |
CONTRASENA456 이렇게 패스워드를 얻을 수 있다.
'CTF > Write-up' 카테고리의 다른 글
TAMU CTF reversing (0) | 2017.04.20 |
---|---|
Reto Android Crackme #2 (0) | 2017.03.05 |
pragyan ctf MI6 (0) | 2017.03.03 |
Hashdays 2012 Android Challenge (0) | 2017.02.26 |
Insomni’hack 2012 InsomniDroid CrackMe (0) | 2017.02.24 |