Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Interpret it!
Search
Bo0oM
August 15, 2020
Research
1.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Interpret it!
Let's look at the source code that wasn't interpriposed.
Bo0oM
August 15, 2020
Transcript
18 slides
How do I see the source code? • Include files
(header.inc) • Backup files • Temp files (nano, vim, etc) • .git or another version-control system • Arbitrary file reading
Interpret it! Anton “Bo0oM” Lopanitsyn
Server configuration errors Multiple routing and microservices location / {
try_files $uri $uri/ /index.html; ... } location /blog { … }
Server configuration errors Multiple routing and microservices
How to find it? https://example.com/config.php - 200, 0B https://example.com/config.php -
200, 3KB Content-type: application/octet-stream text/plain
Find a vulnerability in the config! location ~ ^(.+\.php)(.*)$ {
fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name; fastcgi_param DOCUMENT_ROOT /var/www/html; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_index index.php; }
Nope https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_split_path_info
Windows + Nginx = <3 https://example.com/config.php - 200, 0B https://example.com/config.pHP
location ~ ^(.+\.php)(.*)$ location ~ ^(.+\.php)(.*)$ Linux (case sensitive): https://example.com/config.pHP - 404 Windows: https://example.com/config.pHP - 200
Nginx /etc/nginx/site-enabled/default server { listen 80 default_server; listen
[::]:80 default_server; root /var/www/html; index index.html index.htm index.nginx-debian.html; server_name _; location / { try_files $uri $uri/ =404; } }
None
None
None
Apache /etc/apache2/sites-enabled/000-default.conf <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Apache /etc/apache2/sites-enabled/example.conf <VirtualHost *:80> DocumentRoot /var/www/html/example.com <FilesMatch "\.ph(p[3-5]?|tml)$"> SetHandler application/x-httpd-php
</FilesMatch> …
How to find it? example.com, IP: 123.123.123.123 Check http://123.123.123.123/config.php http://123.123.123.123/example/config.php
http://123.123.123.123/example.com/config.php
CDN’s https://forum.example.com https://cdn.example.com/forum/static/123/123.jpg https://cdn.example.com/forum/config.php Unbelievable, but the fact is, some
move the whole project to cdn!
0day
Blog: https://bo0om.ru Twitter: @i_bo0om Telegram channel: @webpwn
More Decks by Bo0oM
See All by Bo0oM
Носок на сок
bo0om
0
2k
Выйди и зайди нормально
bo0om
0
140
Защита от вредоносной автоматизации сегодня
bo0om
0
690
Defending against automatization using nginx
bo0om
0
940
Antibot pitch deck
bo0om
0
210
31337
bo0om
0
280
Your back is white
bo0om
0
440
FTP2RCE
bo0om
1
7.8k
At Home Among Strangers
bo0om
1
4.1k
Other Decks in Research
See All in Research
Vers un système bovin allaitant multiperformant :leviers actionnés et trajectoire de réduction de l'empreinte carbone à travers 4 années d'expérimentation à FERM'INOV
institutdelelevage
PRO
0
150
Être éleveur dans un monde en transition : Comprendre les changements pour mieux les accompagner
institutdelelevage
PRO
0
160
幾何学的深層学習入門 ~3次元構造と対称性を学習するニューラルネットワーク~
taniai
3
1.1k
PHTalks Bengaluru - SSRF When All Else Fails
dk999
0
1.2k
OWASP AISVS - C7
shiell
2
870
横浜市長(山中氏)の言動にかかる第三者による調査報告書
sishi2026
0
680
ros2-perf-multihost: Automated Coordination Framework for Objective Architecture Evaluation in Distributed Systems
takasehideki
0
180
AI創薬の壁
kanojikajino
1
1.3k
Pesée et pointage par imagerie 3D : PHENO3D entre en phase de test terrains
institutdelelevage
PRO
0
160
Work in progress: How have changes in the labour market over the past decade affected attitudes to work?
resolutionfoundation
0
380
Who’s Behind the Divide?
sirmatrixpage
1
1.6k
SAM3を用いたコマ・吹き出しの 領域検出と分割構造からの読み順推定
kzmssk
0
230
Featured
See All Featured
Code Review Best Practice
trishagee
74
20k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
980
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
My Coaching Mixtape
mlcsv
0
390
AI: The stuff that nobody shows you
jnunemaker
PRO
12
1.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
530
Chasing Engaging Ingredients in Design
codingconduct
0
400
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Bash Introduction
62gerente
615
220k
Design in an AI World
tapps
1
390