icoa-cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/connect.d.ts +2 -0
- package/dist/commands/connect.js +66 -0
- package/dist/commands/ctf.d.ts +2 -0
- package/dist/commands/ctf.js +472 -0
- package/dist/commands/files.d.ts +2 -0
- package/dist/commands/files.js +52 -0
- package/dist/commands/hint.d.ts +2 -0
- package/dist/commands/hint.js +107 -0
- package/dist/commands/lang.d.ts +2 -0
- package/dist/commands/lang.js +42 -0
- package/dist/commands/log.d.ts +2 -0
- package/dist/commands/log.js +36 -0
- package/dist/commands/note.d.ts +2 -0
- package/dist/commands/note.js +32 -0
- package/dist/commands/ref.d.ts +2 -0
- package/dist/commands/ref.js +63 -0
- package/dist/commands/setup.d.ts +2 -0
- package/dist/commands/setup.js +88 -0
- package/dist/commands/shell.d.ts +2 -0
- package/dist/commands/shell.js +55 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +78 -0
- package/dist/lib/budget.d.ts +8 -0
- package/dist/lib/budget.js +29 -0
- package/dist/lib/config.d.ts +7 -0
- package/dist/lib/config.js +60 -0
- package/dist/lib/ctfd-client.d.ts +22 -0
- package/dist/lib/ctfd-client.js +161 -0
- package/dist/lib/gemini.d.ts +7 -0
- package/dist/lib/gemini.js +108 -0
- package/dist/lib/logger.d.ts +6 -0
- package/dist/lib/logger.js +59 -0
- package/dist/lib/translation.d.ts +1 -0
- package/dist/lib/translation.js +40 -0
- package/dist/lib/ui.d.ts +10 -0
- package/dist/lib/ui.js +59 -0
- package/dist/types/index.d.ts +125 -0
- package/dist/types/index.js +29 -0
- package/package.json +43 -0
- package/refs/ROPgadget.txt +67 -0
- package/refs/base64.txt +63 -0
- package/refs/bash.txt +79 -0
- package/refs/binwalk.txt +43 -0
- package/refs/bs4.txt +61 -0
- package/refs/checksec.txt +57 -0
- package/refs/curl.txt +73 -0
- package/refs/cyberchef.txt +78 -0
- package/refs/exiftool.txt +50 -0
- package/refs/ffuf.txt +73 -0
- package/refs/gcc.txt +66 -0
- package/refs/gdb.txt +83 -0
- package/refs/hashcat.txt +64 -0
- package/refs/hint.txt +42 -0
- package/refs/icoa.txt +36 -0
- package/refs/john.txt +74 -0
- package/refs/linux.txt +58 -0
- package/refs/nc.txt +64 -0
- package/refs/nmap.txt +57 -0
- package/refs/numpy.txt +59 -0
- package/refs/openssl.txt +75 -0
- package/refs/pillow.txt +67 -0
- package/refs/pwntools.txt +79 -0
- package/refs/pycrypto.txt +77 -0
- package/refs/python.txt +94 -0
- package/refs/r2.txt +85 -0
- package/refs/regex.txt +73 -0
- package/refs/requests.txt +83 -0
- package/refs/rules.txt +28 -0
- package/refs/scapy.txt +80 -0
- package/refs/sqlmap.txt +69 -0
- package/refs/steghide.txt +71 -0
- package/refs/struct.txt +61 -0
- package/refs/sympy.txt +77 -0
- package/refs/tshark.txt +65 -0
- package/refs/vim.txt +74 -0
- package/refs/volatility.txt +41 -0
- package/refs/z3.txt +78 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
ROPgadget Quick Reference
|
|
2
|
+
=========================
|
|
3
|
+
|
|
4
|
+
BASIC USAGE
|
|
5
|
+
ROPgadget --binary binary Find all gadgets
|
|
6
|
+
ROPgadget --binary binary --depth 10 Deeper search
|
|
7
|
+
|
|
8
|
+
FILTERING
|
|
9
|
+
ROPgadget --binary binary --only "pop|ret" Only pop/ret
|
|
10
|
+
ROPgadget --binary binary --only "mov|ret" Only mov/ret
|
|
11
|
+
ROPgadget --binary binary --filter "leave" Exclude leave
|
|
12
|
+
|
|
13
|
+
SEARCHING
|
|
14
|
+
ROPgadget --binary binary --string "/bin/sh" Find string
|
|
15
|
+
ROPgadget --binary binary --opcode "c3" Find by opcode
|
|
16
|
+
ROPgadget --binary binary --re "pop .* ; ret" Regex search
|
|
17
|
+
|
|
18
|
+
AUTO ROP CHAIN
|
|
19
|
+
ROPgadget --binary binary --ropchain Auto-generate chain
|
|
20
|
+
|
|
21
|
+
COMMON GADGETS TO FIND
|
|
22
|
+
# x86-64 function call setup
|
|
23
|
+
pop rdi ; ret # 1st argument
|
|
24
|
+
pop rsi ; ret # 2nd argument
|
|
25
|
+
pop rdx ; ret # 3rd argument
|
|
26
|
+
pop rax ; ret # syscall number
|
|
27
|
+
syscall ; ret # syscall
|
|
28
|
+
|
|
29
|
+
# x86 (32-bit)
|
|
30
|
+
pop eax ; ret
|
|
31
|
+
pop ebx ; ret
|
|
32
|
+
int 0x80 # syscall
|
|
33
|
+
|
|
34
|
+
# Stack pivot
|
|
35
|
+
xchg rax, rsp ; ret
|
|
36
|
+
leave ; ret
|
|
37
|
+
|
|
38
|
+
# Write-what-where
|
|
39
|
+
mov [rdi], rax ; ret
|
|
40
|
+
mov qword ptr [rsi], rdi ; ret
|
|
41
|
+
|
|
42
|
+
ROPPER (alternative tool)
|
|
43
|
+
ropper -f binary Find gadgets
|
|
44
|
+
ropper -f binary --search "pop rdi" Search specific
|
|
45
|
+
ropper -f binary --chain execve Auto chain
|
|
46
|
+
|
|
47
|
+
PWNTOOLS ROP
|
|
48
|
+
from pwn import *
|
|
49
|
+
e = ELF("./binary")
|
|
50
|
+
rop = ROP(e)
|
|
51
|
+
|
|
52
|
+
rop.find_gadget(["pop rdi", "ret"])
|
|
53
|
+
rop.find_gadget(["pop rsi", "pop r15", "ret"])
|
|
54
|
+
rop.find_gadget(["ret"]) # ret gadget for alignment
|
|
55
|
+
|
|
56
|
+
# Build chain
|
|
57
|
+
rop.raw(ret_gadget) # Stack alignment
|
|
58
|
+
rop.call("puts", [got_puts]) # Call puts(GOT[puts])
|
|
59
|
+
rop.call("main") # Return to main
|
|
60
|
+
chain = rop.chain()
|
|
61
|
+
|
|
62
|
+
COMMON CTF ROP PATTERNS
|
|
63
|
+
# ret2libc (x86-64)
|
|
64
|
+
1. Leak libc address (puts GOT via puts PLT)
|
|
65
|
+
2. Calculate libc base
|
|
66
|
+
3. Find system() and "/bin/sh" in libc
|
|
67
|
+
4. pop rdi; ret → "/bin/sh" → system()
|
package/refs/base64.txt
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Base64 & Encoding Quick Reference
|
|
2
|
+
=================================
|
|
3
|
+
|
|
4
|
+
BASE64
|
|
5
|
+
Alphabet: A-Z a-z 0-9 + / (padding: =)
|
|
6
|
+
Encodes 3 bytes → 4 characters
|
|
7
|
+
Decodes 4 characters → 3 bytes
|
|
8
|
+
|
|
9
|
+
# Command line
|
|
10
|
+
echo -n "text" | base64 Encode
|
|
11
|
+
echo "dGV4dA==" | base64 -d Decode (Linux)
|
|
12
|
+
echo "dGV4dA==" | base64 -D Decode (macOS)
|
|
13
|
+
base64 file > encoded.txt Encode file
|
|
14
|
+
base64 -d encoded.txt > file Decode file
|
|
15
|
+
|
|
16
|
+
# Python
|
|
17
|
+
import base64
|
|
18
|
+
base64.b64encode(b"text") → b"dGV4dA=="
|
|
19
|
+
base64.b64decode(b"dGV4dA==") → b"text"
|
|
20
|
+
|
|
21
|
+
# URL-safe Base64
|
|
22
|
+
base64.urlsafe_b64encode(data) Uses - and _ instead of + and /
|
|
23
|
+
base64.urlsafe_b64decode(data)
|
|
24
|
+
|
|
25
|
+
BASE32
|
|
26
|
+
Alphabet: A-Z 2-7 (padding: =)
|
|
27
|
+
echo -n "text" | base32
|
|
28
|
+
base64.b32encode(b"text")
|
|
29
|
+
base64.b32decode(b"ORSXG5A=")
|
|
30
|
+
|
|
31
|
+
HEX
|
|
32
|
+
echo -n "text" | xxd -p Encode to hex
|
|
33
|
+
echo "74657874" | xxd -r -p Decode from hex
|
|
34
|
+
bytes.fromhex("74657874") Python decode
|
|
35
|
+
b"text".hex() Python encode
|
|
36
|
+
|
|
37
|
+
URL ENCODING
|
|
38
|
+
# Python
|
|
39
|
+
from urllib.parse import quote, unquote
|
|
40
|
+
quote("hello world") → "hello%20world"
|
|
41
|
+
unquote("hello%20world") → "hello world"
|
|
42
|
+
|
|
43
|
+
ROT13
|
|
44
|
+
echo "text" | tr 'a-zA-Z' 'n-za-mN-ZA-M'
|
|
45
|
+
import codecs; codecs.decode("grkg", "rot_13")
|
|
46
|
+
|
|
47
|
+
BINARY
|
|
48
|
+
# Python
|
|
49
|
+
bin(65) → "0b1000001"
|
|
50
|
+
int("1000001", 2) → 65
|
|
51
|
+
''.join(format(b, '08b') for b in data) Bytes to binary
|
|
52
|
+
|
|
53
|
+
ASCII TABLE (key values)
|
|
54
|
+
0x00 NULL 0x20 SPACE 0x30 '0'
|
|
55
|
+
0x09 TAB 0x41 'A' 0x61 'a'
|
|
56
|
+
0x0a LF (\n) 0x5a 'Z' 0x7a 'z'
|
|
57
|
+
0x0d CR (\r) 0x7e '~' 0x7f DEL
|
|
58
|
+
|
|
59
|
+
CTF TIPS
|
|
60
|
+
- Try "Magic" in CyberChef to auto-detect encoding
|
|
61
|
+
- Flags often have multiple layers: Base64(Hex(XOR(flag)))
|
|
62
|
+
- Look for patterns: "==" at end = base64, all hex chars = hex
|
|
63
|
+
- base64 length is always multiple of 4
|
package/refs/bash.txt
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
Bash Scripting Quick Reference
|
|
2
|
+
==============================
|
|
3
|
+
|
|
4
|
+
VARIABLES
|
|
5
|
+
NAME="value" Set variable (no spaces around =)
|
|
6
|
+
echo $NAME Use variable
|
|
7
|
+
echo "${NAME}_suffix" Variable in string
|
|
8
|
+
readonly VAR="val" Constant
|
|
9
|
+
|
|
10
|
+
CONDITIONALS
|
|
11
|
+
if [ condition ]; then
|
|
12
|
+
commands
|
|
13
|
+
elif [ condition ]; then
|
|
14
|
+
commands
|
|
15
|
+
else
|
|
16
|
+
commands
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
# String comparisons
|
|
20
|
+
[ "$a" = "$b" ] Equal
|
|
21
|
+
[ "$a" != "$b" ] Not equal
|
|
22
|
+
[ -z "$a" ] Empty string
|
|
23
|
+
[ -n "$a" ] Non-empty string
|
|
24
|
+
|
|
25
|
+
# Numeric comparisons
|
|
26
|
+
[ $a -eq $b ] Equal
|
|
27
|
+
[ $a -ne $b ] Not equal
|
|
28
|
+
[ $a -lt $b ] Less than
|
|
29
|
+
[ $a -gt $b ] Greater than
|
|
30
|
+
|
|
31
|
+
# File tests
|
|
32
|
+
[ -f file ] Regular file exists
|
|
33
|
+
[ -d dir ] Directory exists
|
|
34
|
+
[ -r file ] Readable
|
|
35
|
+
[ -x file ] Executable
|
|
36
|
+
|
|
37
|
+
LOOPS
|
|
38
|
+
for i in 1 2 3; do echo $i; done
|
|
39
|
+
for f in *.txt; do cat "$f"; done
|
|
40
|
+
for ((i=0; i<10; i++)); do echo $i; done
|
|
41
|
+
while read line; do echo "$line"; done < file
|
|
42
|
+
while true; do cmd; sleep 1; done
|
|
43
|
+
|
|
44
|
+
FUNCTIONS
|
|
45
|
+
myfunc() {
|
|
46
|
+
echo "Arg1: $1, Arg2: $2"
|
|
47
|
+
return 0
|
|
48
|
+
}
|
|
49
|
+
myfunc "hello" "world"
|
|
50
|
+
|
|
51
|
+
ARRAYS
|
|
52
|
+
arr=(one two three)
|
|
53
|
+
echo ${arr[0]} First element
|
|
54
|
+
echo ${arr[@]} All elements
|
|
55
|
+
echo ${#arr[@]} Length
|
|
56
|
+
|
|
57
|
+
STRING OPERATIONS
|
|
58
|
+
${#var} String length
|
|
59
|
+
${var:0:5} Substring (offset:length)
|
|
60
|
+
${var/old/new} Replace first match
|
|
61
|
+
${var//old/new} Replace all matches
|
|
62
|
+
${var%.ext} Remove suffix
|
|
63
|
+
${var#prefix} Remove prefix
|
|
64
|
+
|
|
65
|
+
SPECIAL VARIABLES
|
|
66
|
+
$0 Script name
|
|
67
|
+
$1, $2, ... Arguments
|
|
68
|
+
$# Number of arguments
|
|
69
|
+
$@ All arguments
|
|
70
|
+
$? Last exit code
|
|
71
|
+
$$ Current PID
|
|
72
|
+
$! Last background PID
|
|
73
|
+
|
|
74
|
+
USEFUL PATTERNS
|
|
75
|
+
cmd || echo "failed" Run on failure
|
|
76
|
+
cmd && echo "ok" Run on success
|
|
77
|
+
$(command) Command substitution
|
|
78
|
+
$((1 + 2)) Arithmetic
|
|
79
|
+
cmd & Background process
|
package/refs/binwalk.txt
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Binwalk Quick Reference
|
|
2
|
+
=======================
|
|
3
|
+
|
|
4
|
+
BASIC USAGE
|
|
5
|
+
binwalk file Scan for embedded files
|
|
6
|
+
binwalk -e file Extract embedded files
|
|
7
|
+
binwalk -Me file Recursive extraction
|
|
8
|
+
binwalk -D ".*" file Extract all file types
|
|
9
|
+
binwalk -E file Entropy analysis
|
|
10
|
+
binwalk -A file Instruction scan
|
|
11
|
+
binwalk -W file1 file2 Compare files (hexdiff)
|
|
12
|
+
|
|
13
|
+
EXTRACTION OPTIONS
|
|
14
|
+
binwalk -e file Extract to ./_file.extracted/
|
|
15
|
+
binwalk -C /tmp/out -e file Extract to custom directory
|
|
16
|
+
binwalk --dd="png:png" file Extract specific type
|
|
17
|
+
|
|
18
|
+
ENTROPY
|
|
19
|
+
binwalk -E file Show entropy graph
|
|
20
|
+
binwalk -E -J file Save entropy plot as PNG
|
|
21
|
+
|
|
22
|
+
FILTERING
|
|
23
|
+
binwalk -y "jpeg" file Only show JPEG signatures
|
|
24
|
+
binwalk -x "jpeg" file Exclude JPEG signatures
|
|
25
|
+
binwalk -R "\x89PNG" file Raw byte search
|
|
26
|
+
|
|
27
|
+
COMMON CTF PATTERNS
|
|
28
|
+
# Firmware analysis
|
|
29
|
+
binwalk -Me firmware.bin
|
|
30
|
+
|
|
31
|
+
# Find hidden files in image
|
|
32
|
+
binwalk -e image.png
|
|
33
|
+
|
|
34
|
+
# Check for appended data
|
|
35
|
+
binwalk suspicious_file
|
|
36
|
+
|
|
37
|
+
# Extract filesystem from firmware
|
|
38
|
+
binwalk -e -C ./extracted firmware.bin
|
|
39
|
+
|
|
40
|
+
RELATED TOOLS
|
|
41
|
+
foremost file Carve files by header/footer
|
|
42
|
+
foremost -t all -i file Carve all known types
|
|
43
|
+
foremost -o output/ -i file Output directory
|
package/refs/bs4.txt
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
BeautifulSoup Quick Reference
|
|
2
|
+
=============================
|
|
3
|
+
|
|
4
|
+
INSTALLATION
|
|
5
|
+
pip install beautifulsoup4
|
|
6
|
+
|
|
7
|
+
BASIC USAGE
|
|
8
|
+
from bs4 import BeautifulSoup
|
|
9
|
+
|
|
10
|
+
soup = BeautifulSoup(html, "html.parser")
|
|
11
|
+
soup = BeautifulSoup(html, "lxml")
|
|
12
|
+
|
|
13
|
+
FINDING ELEMENTS
|
|
14
|
+
soup.find("tag") First matching tag
|
|
15
|
+
soup.find_all("tag") All matching tags
|
|
16
|
+
soup.find("div", class_="x") By class
|
|
17
|
+
soup.find("div", id="main") By id
|
|
18
|
+
soup.find("a", href=True) Has attribute
|
|
19
|
+
soup.select("div.class") CSS selector
|
|
20
|
+
soup.select("#id") By ID selector
|
|
21
|
+
soup.select("div > p") Direct children
|
|
22
|
+
|
|
23
|
+
ELEMENT PROPERTIES
|
|
24
|
+
tag.text Text content
|
|
25
|
+
tag.string Direct string content
|
|
26
|
+
tag.get_text(strip=True) Stripped text
|
|
27
|
+
tag["href"] Attribute value
|
|
28
|
+
tag.get("href", "") Attribute with default
|
|
29
|
+
tag.attrs All attributes (dict)
|
|
30
|
+
tag.name Tag name
|
|
31
|
+
|
|
32
|
+
NAVIGATION
|
|
33
|
+
tag.parent Parent element
|
|
34
|
+
tag.children Direct children
|
|
35
|
+
tag.descendants All descendants
|
|
36
|
+
tag.next_sibling Next sibling
|
|
37
|
+
tag.previous_sibling Previous sibling
|
|
38
|
+
|
|
39
|
+
COMMON CTF PATTERNS
|
|
40
|
+
# Extract all links
|
|
41
|
+
for a in soup.find_all("a"):
|
|
42
|
+
print(a.get("href"))
|
|
43
|
+
|
|
44
|
+
# Extract form fields
|
|
45
|
+
form = soup.find("form")
|
|
46
|
+
for inp in form.find_all("input"):
|
|
47
|
+
print(inp.get("name"), inp.get("value"))
|
|
48
|
+
|
|
49
|
+
# Extract hidden fields
|
|
50
|
+
hidden = soup.find_all("input", type="hidden")
|
|
51
|
+
for h in hidden:
|
|
52
|
+
print(h["name"], h["value"])
|
|
53
|
+
|
|
54
|
+
# Extract table data
|
|
55
|
+
for row in soup.find_all("tr"):
|
|
56
|
+
cells = [td.text for td in row.find_all("td")]
|
|
57
|
+
print(cells)
|
|
58
|
+
|
|
59
|
+
# Find comments
|
|
60
|
+
from bs4 import Comment
|
|
61
|
+
comments = soup.find_all(string=lambda t: isinstance(t, Comment))
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
Checksec & Binary Protections Quick Reference
|
|
2
|
+
==============================================
|
|
3
|
+
|
|
4
|
+
CHECKSEC
|
|
5
|
+
checksec ./binary Check all protections
|
|
6
|
+
checksec --file=./binary Same (explicit)
|
|
7
|
+
|
|
8
|
+
PROTECTIONS EXPLAINED
|
|
9
|
+
|
|
10
|
+
RELRO (Relocation Read-Only)
|
|
11
|
+
No RELRO GOT is writable — easy GOT overwrite
|
|
12
|
+
Partial RELRO Some sections read-only after load
|
|
13
|
+
Full RELRO GOT fully read-only — no GOT overwrite
|
|
14
|
+
|
|
15
|
+
Stack Canary
|
|
16
|
+
No canary found Stack buffer overflow is straightforward
|
|
17
|
+
Canary found Random value on stack — must leak or bypass
|
|
18
|
+
|
|
19
|
+
NX (No-Execute)
|
|
20
|
+
NX disabled Can execute shellcode on stack/heap
|
|
21
|
+
NX enabled Stack/heap not executable — use ROP/ret2libc
|
|
22
|
+
|
|
23
|
+
PIE (Position Independent Executable)
|
|
24
|
+
No PIE Binary at fixed address — addresses known
|
|
25
|
+
PIE enabled ASLR for binary — need info leak
|
|
26
|
+
|
|
27
|
+
ASLR (Address Space Layout Randomization)
|
|
28
|
+
Check: cat /proc/sys/kernel/randomize_va_space
|
|
29
|
+
0 = off, 1 = partial, 2 = full
|
|
30
|
+
Disable: echo 0 > /proc/sys/kernel/randomize_va_space
|
|
31
|
+
|
|
32
|
+
PWNTOOLS CHECKSEC
|
|
33
|
+
from pwn import *
|
|
34
|
+
e = ELF("./binary")
|
|
35
|
+
# Prints protections automatically
|
|
36
|
+
|
|
37
|
+
e.pie True/False
|
|
38
|
+
e.canary True/False
|
|
39
|
+
e.nx True/False
|
|
40
|
+
|
|
41
|
+
FILE COMMAND
|
|
42
|
+
file ./binary Architecture, linking, stripped?
|
|
43
|
+
|
|
44
|
+
READELF
|
|
45
|
+
readelf -h binary ELF header
|
|
46
|
+
readelf -S binary Section headers
|
|
47
|
+
readelf -l binary Program headers
|
|
48
|
+
readelf -s binary Symbol table
|
|
49
|
+
readelf -d binary Dynamic section
|
|
50
|
+
readelf -r binary Relocations
|
|
51
|
+
|
|
52
|
+
COMMON CTF STRATEGY
|
|
53
|
+
No canary + No PIE + No NX → Direct shellcode on stack
|
|
54
|
+
No canary + No PIE + NX → ret2libc / ROP
|
|
55
|
+
Canary + No PIE + NX → Leak canary, then ROP
|
|
56
|
+
Canary + PIE + NX → Leak canary + PIE base, ROP
|
|
57
|
+
Full RELRO + all protections → Look for format string / logic bugs
|
package/refs/curl.txt
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
cURL Quick Reference
|
|
2
|
+
====================
|
|
3
|
+
|
|
4
|
+
BASIC REQUESTS
|
|
5
|
+
curl URL GET request
|
|
6
|
+
curl -v URL Verbose output
|
|
7
|
+
curl -s URL Silent mode
|
|
8
|
+
curl -o file URL Save to file
|
|
9
|
+
curl -O URL Save with original name
|
|
10
|
+
curl -L URL Follow redirects
|
|
11
|
+
curl -I URL Headers only (HEAD)
|
|
12
|
+
|
|
13
|
+
HTTP METHODS
|
|
14
|
+
curl -X GET URL
|
|
15
|
+
curl -X POST URL
|
|
16
|
+
curl -X PUT URL
|
|
17
|
+
curl -X DELETE URL
|
|
18
|
+
curl -X PATCH URL
|
|
19
|
+
curl -X OPTIONS URL
|
|
20
|
+
|
|
21
|
+
POST DATA
|
|
22
|
+
# Form data
|
|
23
|
+
curl -X POST -d "user=admin&pass=123" URL
|
|
24
|
+
|
|
25
|
+
# JSON
|
|
26
|
+
curl -X POST -H "Content-Type: application/json" \
|
|
27
|
+
-d '{"user":"admin"}' URL
|
|
28
|
+
|
|
29
|
+
# File upload
|
|
30
|
+
curl -X POST -F "file=@localfile.txt" URL
|
|
31
|
+
|
|
32
|
+
# Raw data from file
|
|
33
|
+
curl -X POST -d @data.json URL
|
|
34
|
+
|
|
35
|
+
HEADERS
|
|
36
|
+
curl -H "Authorization: Bearer TOKEN" URL
|
|
37
|
+
curl -H "Cookie: session=abc" URL
|
|
38
|
+
curl -H "User-Agent: Mozilla/5.0" URL
|
|
39
|
+
curl -H "Content-Type: application/xml" URL
|
|
40
|
+
|
|
41
|
+
AUTHENTICATION
|
|
42
|
+
curl -u user:pass URL Basic auth
|
|
43
|
+
curl -H "Authorization: Bearer TOKEN" URL
|
|
44
|
+
|
|
45
|
+
COOKIES
|
|
46
|
+
curl -c cookies.txt URL Save cookies
|
|
47
|
+
curl -b cookies.txt URL Send cookies
|
|
48
|
+
curl -b "name=value" URL Send specific cookie
|
|
49
|
+
|
|
50
|
+
SSL / PROXY
|
|
51
|
+
curl -k URL Ignore SSL errors
|
|
52
|
+
curl --proxy http://127.0.0.1:8080 URL
|
|
53
|
+
curl --proxy socks5://127.0.0.1:1080 URL
|
|
54
|
+
curl --cacert cert.pem URL Custom CA cert
|
|
55
|
+
|
|
56
|
+
USEFUL OPTIONS
|
|
57
|
+
curl -w "%{http_code}" URL Print status code
|
|
58
|
+
curl -w "%{time_total}" URL Print response time
|
|
59
|
+
curl --max-time 5 URL Timeout (seconds)
|
|
60
|
+
curl -A "custom-agent" URL Set user-agent
|
|
61
|
+
|
|
62
|
+
CTF PATTERNS
|
|
63
|
+
# Test for SSRF
|
|
64
|
+
curl "http://target/fetch?url=http://127.0.0.1:8080"
|
|
65
|
+
|
|
66
|
+
# Cookie tampering
|
|
67
|
+
curl -b "role=admin" URL
|
|
68
|
+
|
|
69
|
+
# Header injection
|
|
70
|
+
curl -H "X-Forwarded-For: 127.0.0.1" URL
|
|
71
|
+
|
|
72
|
+
# Rate-limit bypass
|
|
73
|
+
for i in $(seq 1 100); do curl -s URL; done
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
CyberChef Quick Reference
|
|
2
|
+
=========================
|
|
3
|
+
|
|
4
|
+
CyberChef is an encoding/decoding/analysis Swiss army knife.
|
|
5
|
+
Online: https://gchq.github.io/CyberChef/
|
|
6
|
+
CLI: npm install -g cyberchef-cli
|
|
7
|
+
|
|
8
|
+
COMMON ENCODINGS
|
|
9
|
+
Base64 Encode/Decode
|
|
10
|
+
Base32 Encode/Decode
|
|
11
|
+
Hex Encode/Decode
|
|
12
|
+
URL Encode/Decode
|
|
13
|
+
HTML Entity Encode/Decode
|
|
14
|
+
Decimal (from/to)
|
|
15
|
+
Binary (from/to)
|
|
16
|
+
Octal (from/to)
|
|
17
|
+
|
|
18
|
+
CRYPTO OPERATIONS
|
|
19
|
+
AES Encrypt/Decrypt
|
|
20
|
+
DES Encrypt/Decrypt
|
|
21
|
+
XOR (with key)
|
|
22
|
+
ROT13 / ROT47
|
|
23
|
+
Vigenère Encode/Decode
|
|
24
|
+
Caesar Cipher
|
|
25
|
+
Atbash Cipher
|
|
26
|
+
Rail Fence Cipher
|
|
27
|
+
Substitution Cipher
|
|
28
|
+
|
|
29
|
+
HASHING
|
|
30
|
+
MD5 / SHA1 / SHA256 / SHA512
|
|
31
|
+
HMAC
|
|
32
|
+
CRC-16 / CRC-32
|
|
33
|
+
|
|
34
|
+
DATA FORMAT
|
|
35
|
+
From/To Hex
|
|
36
|
+
From/To Base64
|
|
37
|
+
From/To Binary
|
|
38
|
+
Parse IP / URL
|
|
39
|
+
Parse JSON / XML / CSV
|
|
40
|
+
|
|
41
|
+
ANALYSIS
|
|
42
|
+
Frequency Analysis
|
|
43
|
+
Entropy
|
|
44
|
+
Magic (auto-detect encoding)
|
|
45
|
+
Strings
|
|
46
|
+
Disassemble
|
|
47
|
+
|
|
48
|
+
USEFUL RECIPES (for CTF)
|
|
49
|
+
|
|
50
|
+
# Multi-layer decode
|
|
51
|
+
Base64 → Hex → XOR
|
|
52
|
+
|
|
53
|
+
# ROT13
|
|
54
|
+
ROT13("Uryyb") → "Hello"
|
|
55
|
+
|
|
56
|
+
# XOR brute force
|
|
57
|
+
XOR Brute Force (key length 1)
|
|
58
|
+
|
|
59
|
+
# Magic (auto-detect)
|
|
60
|
+
Drag data → "Magic" operation → auto-detects encoding
|
|
61
|
+
|
|
62
|
+
# Extract strings
|
|
63
|
+
"Strings" operation with min length
|
|
64
|
+
|
|
65
|
+
COMMAND LINE (cyberchef-cli)
|
|
66
|
+
echo "SGVsbG8=" | cyberchef "from_base64"
|
|
67
|
+
echo "48656c6c6f" | cyberchef "from_hex"
|
|
68
|
+
echo "Hello" | cyberchef "to_base64"
|
|
69
|
+
echo "data" | cyberchef "xor({'key':'secret'})"
|
|
70
|
+
|
|
71
|
+
COMMON CTF WORKFLOW
|
|
72
|
+
1. Paste unknown data into CyberChef
|
|
73
|
+
2. Use "Magic" to auto-detect encoding
|
|
74
|
+
3. Chain operations (drag & drop)
|
|
75
|
+
4. Common chains:
|
|
76
|
+
- Base64 → Gunzip → output
|
|
77
|
+
- Hex → From Hex → XOR → output
|
|
78
|
+
- URL Decode → Base64 → output
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
ExifTool Quick Reference
|
|
2
|
+
========================
|
|
3
|
+
|
|
4
|
+
BASIC USAGE
|
|
5
|
+
exiftool file Show all metadata
|
|
6
|
+
exiftool -s file Short tag names
|
|
7
|
+
exiftool -G file Show group names
|
|
8
|
+
exiftool -json file JSON output
|
|
9
|
+
exiftool -a -u file All tags, including unknown
|
|
10
|
+
|
|
11
|
+
SPECIFIC TAGS
|
|
12
|
+
exiftool -ImageWidth file Single tag
|
|
13
|
+
exiftool -GPSLatitude file GPS location
|
|
14
|
+
exiftool -Comment file Comments
|
|
15
|
+
exiftool -Author file Author
|
|
16
|
+
exiftool -CreateDate file Creation date
|
|
17
|
+
|
|
18
|
+
WRITE METADATA
|
|
19
|
+
exiftool -Comment="text" file Set comment
|
|
20
|
+
exiftool -Author="name" file Set author
|
|
21
|
+
exiftool -all= file Remove ALL metadata
|
|
22
|
+
exiftool -overwrite_original file Don't create backup
|
|
23
|
+
|
|
24
|
+
BATCH OPERATIONS
|
|
25
|
+
exiftool *.jpg All JPEGs
|
|
26
|
+
exiftool -r directory/ Recursive
|
|
27
|
+
exiftool -ext jpg directory/ Only .jpg files
|
|
28
|
+
|
|
29
|
+
COMPARE
|
|
30
|
+
exiftool -a -u file1 file2 Compare metadata
|
|
31
|
+
|
|
32
|
+
COMMON CTF PATTERNS
|
|
33
|
+
# Check for hidden data in comments
|
|
34
|
+
exiftool -Comment image.jpg
|
|
35
|
+
exiftool -UserComment image.jpg
|
|
36
|
+
|
|
37
|
+
# Check GPS coordinates (physical location clue)
|
|
38
|
+
exiftool -GPSPosition image.jpg
|
|
39
|
+
|
|
40
|
+
# Check for steganography hints
|
|
41
|
+
exiftool -all image.png | grep -i "comment\|software\|description"
|
|
42
|
+
|
|
43
|
+
# Thumbnail extraction
|
|
44
|
+
exiftool -b -ThumbnailImage image.jpg > thumb.jpg
|
|
45
|
+
|
|
46
|
+
# Check if image was edited
|
|
47
|
+
exiftool -Software -ModifyDate image.jpg
|
|
48
|
+
|
|
49
|
+
# Hidden data in XMP
|
|
50
|
+
exiftool -xmp:all image.png
|
package/refs/ffuf.txt
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
FFUF (Fuzz Faster U Fool) Quick Reference
|
|
2
|
+
==========================================
|
|
3
|
+
|
|
4
|
+
BASIC USAGE
|
|
5
|
+
ffuf -w wordlist.txt -u http://target/FUZZ
|
|
6
|
+
|
|
7
|
+
DIRECTORY FUZZING
|
|
8
|
+
ffuf -w /usr/share/wordlists/dirb/common.txt \
|
|
9
|
+
-u http://target/FUZZ
|
|
10
|
+
|
|
11
|
+
ffuf -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt \
|
|
12
|
+
-u http://target/FUZZ
|
|
13
|
+
|
|
14
|
+
FILE FUZZING
|
|
15
|
+
ffuf -w wordlist.txt -u http://target/FUZZ.php
|
|
16
|
+
ffuf -w wordlist.txt -u http://target/FUZZ -e .php,.html,.txt,.bak
|
|
17
|
+
|
|
18
|
+
PARAMETER FUZZING
|
|
19
|
+
ffuf -w params.txt -u "http://target/page?FUZZ=test"
|
|
20
|
+
ffuf -w values.txt -u "http://target/page?param=FUZZ"
|
|
21
|
+
|
|
22
|
+
POST DATA FUZZING
|
|
23
|
+
ffuf -w wordlist.txt -u http://target/login \
|
|
24
|
+
-X POST -d "user=admin&password=FUZZ" \
|
|
25
|
+
-H "Content-Type: application/x-www-form-urlencoded"
|
|
26
|
+
|
|
27
|
+
HEADER FUZZING
|
|
28
|
+
ffuf -w wordlist.txt -u http://target/ \
|
|
29
|
+
-H "X-Custom-Header: FUZZ"
|
|
30
|
+
|
|
31
|
+
SUBDOMAIN FUZZING
|
|
32
|
+
ffuf -w subdomains.txt -u http://FUZZ.target.com
|
|
33
|
+
ffuf -w subdomains.txt -u http://target.com \
|
|
34
|
+
-H "Host: FUZZ.target.com"
|
|
35
|
+
|
|
36
|
+
VHOST FUZZING
|
|
37
|
+
ffuf -w vhosts.txt -u http://target.com \
|
|
38
|
+
-H "Host: FUZZ" -fs 4242
|
|
39
|
+
|
|
40
|
+
FILTERING
|
|
41
|
+
-fc 404 Filter by status code
|
|
42
|
+
-fc 404,403 Multiple codes
|
|
43
|
+
-fs 4242 Filter by response size
|
|
44
|
+
-fw 12 Filter by word count
|
|
45
|
+
-fl 5 Filter by line count
|
|
46
|
+
-fr "Not Found" Filter by regex
|
|
47
|
+
-mc 200 Match only status 200
|
|
48
|
+
-ms 1234 Match by size
|
|
49
|
+
|
|
50
|
+
OPTIONS
|
|
51
|
+
-t 50 Threads (default 40)
|
|
52
|
+
-rate 100 Requests per second limit
|
|
53
|
+
-timeout 5 Timeout in seconds
|
|
54
|
+
-r Follow redirects
|
|
55
|
+
-c Colorize output
|
|
56
|
+
-o output.json Save output
|
|
57
|
+
-of json Output format
|
|
58
|
+
-v Verbose
|
|
59
|
+
-s Silent (only results)
|
|
60
|
+
|
|
61
|
+
RECURSIVE
|
|
62
|
+
ffuf -w wordlist.txt -u http://target/FUZZ \
|
|
63
|
+
-recursion -recursion-depth 2
|
|
64
|
+
|
|
65
|
+
MULTIPLE WORDLISTS
|
|
66
|
+
ffuf -w users.txt:USER -w passes.txt:PASS \
|
|
67
|
+
-u http://target/login \
|
|
68
|
+
-X POST -d "user=USER&pass=PASS" \
|
|
69
|
+
-mode clusterbomb
|
|
70
|
+
|
|
71
|
+
MODES
|
|
72
|
+
clusterbomb All combinations (default for multi)
|
|
73
|
+
pitchfork Paired (line by line)
|