Langsung ke konten
Skillpedia
Keamanan6.5k ยท #14032

crypto-decode

Fungsinya

Panduan ini membantu mengenali dan mendekode teks yang tidak diketahui, seperti nilai terenkode atau hash kata sandi. Panduan ini untuk pelajar keamanan, pemecah teka-teki, dan analis yang memeriksa data yang boleh mereka periksa.

Kapan dipakai

  • โœ“Saat Anda memiliki string terenkode dan ingin tahu encoding apa yang dipakainya.
  • โœ“Saat Anda menemukan hash kata sandi dan perlu mengetahui jenisnya.
  • โœ“Saat sebuah tantangan capture-the-flag memberi Anda ciphertext yang belum diketahui.

Link skill

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/crypto/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/crypto/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œSaya menemukan string panjang di sebuah file yang kelihatannya terenkode. Bisakah Anda mencari tahu itu apa dan mendekodenya?โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent memeriksa pola karakter string untuk menebak encoding-nya, mencoba dekoder yang cocok, dan berhenti ketika hasilnya terbaca sebagai teks normal.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Crypto / Decode Playbook

When you have unknown ciphertext (CTF flag, leaked DB field, captured token, encoded payload), the right tool depends on the cipher class.

1. Identify FIRST

Unknown text โ†’ automated cracker

# Ciphey โ€” original (Python, slowed maintenance)
ciphey -t "$CIPHERTEXT"

# Ares โ€” Rust rewrite (faster, current)
ares -t "$CIPHERTEXT"

A*-search across 16+ decoders (base64, base85, hex, Caesar, ROT-N, Atbash, Vigenere, XOR-known-plaintext, URL encoding, binary, morse, brainfuck, esolang, leetspeak, etc.) + BERT plaintext detector to know when to stop.

Hash โ†’ identify type

hashid -m '$2a$12$....'             # bcrypt 12 rounds
hashid -m '5f4dcc3b5aa765d61d8327deb882cf99'  # MD5
hash-identifier

Specific format checks

# JWT
echo $TOKEN | cut -d. -f1-2 | tr '_-' '/+' | base64 -d 2>/dev/null

# Hex โ†’ bytes
echo "$HEX" | xxd -r -p

# Base64 โ†’ bytes (handle URL-safe)
echo "$B64" | tr '_-' '/+' | base64 -d 2>/dev/null

# Multi-encoded (unwind layers)
echo "$BLOB" | base64 -d | base64 -d | xxd -r -p

2. Classical cipher quick-checks

Cipher Signature
Base64 [A-Za-z0-9+/=]+, len multiple of 4
Base32 [A-Z2-7=]+
Hex [0-9a-fA-F]+, even length
Caesar/ROT only A-Z + spaces, freq-attack ready
Vigenere A-Z, multiple-of-key-length repeating bigrams
Substitution A-Z, IC โ‰ˆ 0.066 (English)
Vernam/OTP random-looking bytes, no statistical signal
XOR fixed-key bytes w/ printable XOR'd against pattern (file headers leak)
Hill small block size, matrix-based

3. CyberChef recipe library

CyberChef (gchq.github.io/CyberChef) is the GUI workhorse but recipes can be exported as JSON and chained programmatically:

# Common chains
"From Base64 / Magic / To Hex"
"From Hex / XOR (Brute) / Magic"
"AES Decrypt(KEY) / From Hex / Strings"

CLI version: cyberchef-cli (community port).

4. Hash cracking quick-ref

Mode Hash type
0 MD5
100 SHA-1
1400 SHA-256
1700 SHA-512
1000 NTLM
13100 Kerberos TGS-REP (etype 23)
19700 Kerberos TGS-REP (etype 18)
18200 Kerberos AS-REP
16500 JWT (HS256)
3200 bcrypt
7400 sha256crypt $5$
1800 sha512crypt $6$
22000 WPA-EAPOL+PMKID
7100 macOS v10.8+ (PBKDF2-SHA512)
8200 1Password Cloud Keychain
hashcat -m <mode> hashes.txt rockyou.txt -r best64.rule
john --format=<format> hashes.txt --wordlist=rockyou.txt

5. Token / blob unfolding workflow

For a mystery token captured in HTTP traffic:

1. ciphey/ares โ†’ reveal base layer
2. If structured (JSON / proto3 / msgpack) โ†’ parse
3. If still encoded โ†’ repeat step 1
4. Look for HMAC / signature suffix โ†’ identify symmetric key candidates
5. If symmetric encryption suspected โ†’ try AES-CBC/GCM w/ common keys
   (app-name, "secret", env vars exposed elsewhere)

6. Decepticon integration

Wrap as MCP tool:

# decepticon/tools/crypto/decode.py โ€” skeleton
def crypto_decode(ciphertext: str, hint: str = None, timeout: int = 30) -> dict:
    """Try ares first (fast), fallback to ciphey, return best decode."""
    import subprocess
    cmd = ["ares", "-t", ciphertext]
    if hint:
        cmd += ["--language", hint]
    r = subprocess.run(cmd, timeout=timeout, capture_output=True, text=True)
    return {
        "tool": "ares",
        "output": r.stdout,
        "confidence": _parse_ares_confidence(r.stdout),
    }

Promote to KG when classification succeeds:

kg_add_node(kind="artifact", label=f"decoded:{hash}",
            props={"plaintext": result, "encoding_chain": chain})

7. Severity (depends on what was decoded)

Decoded content Severity
Plaintext password Critical (depends on user role)
API key / private key Critical
Internal hostname / IP Medium
Session token High-Critical
Encryption key Critical

Cross-references

Known exemplars

  • CTF flag formats (90% are base64, hex, or rot-N layers)
  • Mobile reverse engineering: API keys often base64-XORed in strings
  • IoT firmware: AES-CBC w/ hardcoded keys recoverable via Ciphey + ghidra
  • Phishing email obfuscation: nested encoding chains common
Pertanyaan umum

Jenis encoding apa saja yang bisa dideteksi?

Panduan ini mencakup format umum seperti base64, base32, hex, dan substitusi sederhana.

Bagaimana cara mengenali hash?

Agent memakai alat identifikasi hash yang mencocokkan format hash dengan kemungkinan jenisnya.

Apakah ini hanya untuk teka-teki?

Tidak. Ini berguna untuk teks yang tidak diketahui, seperti token atau kolom terenkode yang boleh Anda periksa.

Detail

Deskripsi asli dari pembuat

Cipher detection + automated decryption via Ciphey, Cyberchef recipes, hashcat hash-ID, format conversion, common encoding chains.

repo: BitterSecurity/Decepticon

Popularitas

Bintang GitHub
6.5k
Peringkat
#14032
Lisensi
Apache-2.0
Diperbarui
1/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa