CryptoHack - General
note
note
Use -f to specify the memory image and -s
for symbol directories if they are not in the default path.
1 | # Basic syntax |
1 | # Get basic OS information |
1 | # List processes (EPROCESS list) |
1 | # Scan for network connections and listening ports |
1 | # Scan for file objects in memory |
1 | # Combine with grep for quick searching |
A concise guide to common operations and tools within the Radare2 framework.
Used for converting between various numerical bases and formats.
1 | rax2 0x28 # Hex to decimal |
Use the ? command to evaluate expressions or convert
values.
1 | [0x00000000]> ? 0x28 # Convert 0x28 to all formats |
Extracts information from executable files (imports, exports, strings, etc.).
1 | rabin2 -I file # General binary info (arch, OS, bits, etc.) |
The main interface for disassembly, analysis, and debugging.
1 | r2 -A file # Open file and run analysis (aaa) |
i)1 | i # Show information about current file |
s)1 | s 0x400500 # Seek to specific address |
a)1 | aa # Basic analysis |
p)1 | pdf # Print Disassembly of current Function |
w)Note: Requires opening r2 with -w.
1 | wx 909090 # Write hex bytes (NOPs) |
v,
V)1 | v # Open visual panels |
Quickly assemble or disassemble instructions.
1 | # Assemble an instruction (x86, 64-bit) |
? - Show general helpV - Enter visual modeVV - Enter visual graph modeq - Exit current mode or r2challenges
1 | <% |
Replace(str, "a", "aad"): Replaces every 'a' with
'aad'.Replace(result, "i", "in"): Replaces every 'i' with
'in'.Mid(result, 2, 2): Extracts 2 characters starting from
the 2nd index.Mid(result, 4, 6): Extracts up to 6 characters starting
from the 4th index.result equal
to admin.If we input ami: - a -> aad
- i -> in - Intermediate result:
aadmin - result1 =
Mid("aadmin", 2, 2) = ad -
result2 = Mid("aadmin", 4, 6) =
min - result = ad +
min = admin
challenges
1 | <script> |
The script prevents the form from being submitted if the
id is equal to the pw. However, the hint
explicitly states that for the Join challenge, we need
id = pw.
Intercept the request with a proxy (like Burp Suite or Zaproxy) or use the browser's Network tab to replay a modified request.
id=admin&pw=adminchallenges
1 | http://suninatas.com/board/notice/write |
challenges
Hint: Make your point to 50 & 'SuNiNaTaS'
Tool: ZAProxy
1 | POST http://suninatas.com/challenge/web04/web04_ck.asp HTTP/1.1 |
1 | User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 SuNiNaTaS/147.0 |
1 | <td class="table_top"> |
challenges
Concepts: JS Packer, JSObfuscator
1 | <input name="password" value="" style="width:180" /> |
1 | var digitArray = new Array( |
Convert the hint using the PASS() function:
1 | PASS(12342046413275659); |
challenges
Vulnerability: SQL Injection
1 | select szPwd from T_Web13 where |
Inject with 1' or '1' like '1:
1 | select szPwd from T_Web13 where |
This bypasses the password check by making the condition always true.
1 | Congratulation!! |
Next challenge URL:
http://suninatas.com/challenge/web06/view.asp?idx=3&num=3&passcode=wkdrnlwnd
Hint form:
1 | <form method="post" name="KEY_HINT" action="Rome's First Emperor"></form> |
challenges
ublock(browser addon) btw
refresh and click the botton
1 | <input type="submit" value="YES" /> |