We just need to craft manually our regex per level
\d{8}\D{1}
^[1,2,3,4,8,9]\D{1}
\d{8}[A]{1}
7{7,}[A]
.*A
\d*A
\d*\D
\d*[c,h,W,A]
[^-]+
\D{1}-{1}\d{6}\D
\D{1}-{1}\d{3,5}\D
\D{1}(-|\+){1}\d{6}\D
\d{2}\D?\d{5}\D
\d{2}\D?\d{1,3}\D
((\D\+\d{4,6}\D)|(\D-\d{4}\D))
Flag: HL{RegExp-Tyc00n-91234}
Serial key was found in this verify function
Flag: SYIOKLELUIOD
The calculated serial was printed in the terminal, so we can simply use it as the flag.
Flag: LBQXULNJPXDE
Checking the disassembly code
From the above image, we found the key
From the above image, we found the logic to generate the serial
Just translate it to python
Flag: FDVDRRNKRDYG
After reading the disassembly code, we know that the serial char comparison happen in this address
With the help of GDB, we can simply set breakpoint on it, and retrieve the r13 value. We got our serial key after retrieving the r13 value 12 times.
Flag: GEIJBLDJDECA
I try to check /examples
folder, and found out that this uses Apache Tomcat. After playing it for a while (especially on the upload feature), I notice that the upload feature doesn't sanitize ../
, which mean we can freely upload the file to any directories. Also inside the examples folder there are a lot of jsp file example that got executed.
My solution is to upload a jsp file to the examples folder path (/examples/jsp/jsp2/el
) where the jsp file will open /var/gold.txt
file contents.
Below is the jsp file
Below is the upload request that I use to upload the jsp file to ../../examples/jsp/jsp2/el/cho.jsp
After upload it, we can simply open the file
Flag: New is always better. - Barney Stinson
With the help of proxychains, we can dynamically change our ip to bypass the fail2ban. Command that I used:
With the help of proxychains, we can dynamically change our ip to bypass the fail2ban. Command that I used:
I got an apk file, and I try to decompile it with the help of JDK. After reading the result I found the login code in the LoginViewModel.
Basically, what it do is our password will be xor-ed with the x0
var, and then the result will be passed to native method called checkPw
I extract the native lib so file, and open it on Ghidra. With the help of JNIAnalyzer, I could deduce the password checker that was used in the checkPw
method.
Reading the code, we know that the password length is 27, and the native lib have three different keys in the native (key_a
which is DAT_00100b20
, key_b
which is DAT_00100c8c
and key_c
which is DAT_00100cc0
). What it do is
input[i] ^ key_a[i] ^ key_b[-i] = key_c[i]
And merging with the Login logic, the final operation would be
password[i] ^ x0[i] ^ key_a[i] ^ key_b[-i] = key_c[i]
So to generate the password (which is the flag), we just need to do:
password[i] = x0[i] ^ key_a[i] ^ key_b[-i] ^ key_c[i]
Full code:
Flag: HL{J4v4.nativ3.d0.n0t.c4r3}
We were given a binary that is pretty short
There is a buffer overflow vulnerability. Because the plt only contains read, we need to do partial overwrite (1 byte) to the read_got value so that we can execute syscall
. The idea to gain the shell is:
Below is my full payload
Flag: HL{PPPwned-7165-4679-8c39-cf7633bdf81b}
After checking with the given ciphertexts consist of encrypted message of 'This is the test message number x', there is a collision between the ciphertexts CEO and the test ciphertexts
CEO ciphertexts:
One of the test ciphertexts:
BasicIdent ciphertext is like below:
Because the value is the same, we could know that the value of the ceo and the test cipher texts have the same value, which mean
Full Script:
We successfully retrieve the flag
Flag: YNOT18{B4DB4DB4DR4NDOMNE55}