Security
Capture the Flag Guide
Capture The Flags, or CTFs, are a kind of computer security competition.
Teams of competitors (or just individuals) are pitted against each other in a test of computer security skill.
Install Kali Linux on a VM of your choice.
Can also use my fun little side project that automates some commands listed below
OzymandiasThe2/fastapi-ctf
Cryptography
Possible Encodings
- ASCII
- BASE64/BASE32
- UUEncoded
- Ceasar/ROT Ciphers
- Subsitution Cipher
- Frequency analysis
Useful Decrypting Websites/Tools
Anything that's ends with “==” sign is probably in base64
- copy line(s)
echo [line] | base64 -d
Reverse Engineering
Things to Do First:
- Try to run the executable (may not work or may be “dangerous”
If not able:
- use strace library
sudo apt install strace
strace [file_name]
- use ltrace library
sudo apt install ltrace
ltrace [file_name]
- use objdump library
sudo apt install objdump
objdump -d [file_name]
Still no work?
Use GHIDRA
- cd ghidra ./ghidraRun
- open project
- click dragon icon aka codebrowser
- import a file > import CTF file
- click dragon again
- analyze the file on prompt to look for strings in the file
- go to Window > Defined Strings
- look/double click for specific string for exe need to look on the right side —> this will refer you to the code that is referencing that string
- Click on the decompile pane on the right side to view source code
- ???
- FLAG (probably)
Steganography
try diff libraries first
- stegsnow
stegsnow [file_name]
- steghide (use for bmp, jpeg, wav and au files)
steghide [file_name]
- strings
strings [file_name]
- zsteg (use for PNG and BMP files)
zsteg -a [file_name]
zsteg lsb [file_name]
- mage analysis if hidden in layers use stegsolve
java -jar stegsolve.jar
- exiftool for image metadata
exiftool [file_name]