forked from mufeedvh/code2prompt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreverse-engineering-ctf-solver.hbs
55 lines (43 loc) · 1.57 KB
/
reverse-engineering-ctf-solver.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Challenge Name: {{challenge_name}}
Category: Reverse Engineering
Description: {{challenge_description}}
Provided Files:
{{#each files}}
{{#if code}}
`{{path}}`:
{{code}}
{{/if}}
{{/each}}
Here's a plan to tackle this reverse engineering challenge:
1. Identify the target file type(s):
- Compiled binary (ELF, PE, Mach-O)
- Bytecode (Java, .NET, Python, etc.)
- Obfuscated script (JavaScript, Lua, etc.)
- Document (maldoc, PDF) with macros
2. Set up your analysis environment:
- Disassembler/decompiler (Ghidra, IDA Pro, radare2)
- Debugger (gdb, x64dbg, WinDbg)
- VM or container to isolate malware
- Automated unpacking/deobfuscation tools
3. Perform static analysis:
- Scan strings for clues, crypto/encoding, flag format
- Examine imported functions for interesting behavior
- Decompile and review logic, control flow
- Locate comparison with user input or flag
4. Proceed to dynamic analysis if needed:
- Run binary in debugger
- Set breakpoints on key functions
- Inspect variables, memory, and registers
- Modify execution flow or patch binary
5. Identify and bypass anti-reversing:
- Packed or obfuscated code
- Anti-debug checks (IsDebuggerPresent, timing, etc.)
- Junk code, opaque predicates
- Virtualization/emulation
6. Solve any necessary steps:
- Satisfy input checks (password, serial, etc.)
- Defuse anti-tampering protections
- Decrypt embedded resources
- Forge crypto/hash to match expected value
7. Locate the flag in memory, output, or decrypted resource.
Provide the key reversing insights you discover. Focus on reaching the minimum goal, not full understanding.