Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Interpret it!
Search
Bo0oM
August 15, 2020
Research
0
1.1k
Interpret it!
Let's look at the source code that wasn't interpriposed.
Bo0oM
August 15, 2020
Tweet
Share
More Decks by Bo0oM
See All by Bo0oM
Защита от вредоносной автоматизации сегодня
bo0om
0
530
Defending against automatization using nginx
bo0om
0
800
Antibot pitch deck
bo0om
0
120
31337
bo0om
0
140
Your back is white
bo0om
0
320
FTP2RCE
bo0om
1
7.3k
At Home Among Strangers
bo0om
1
3.8k
2000day in Safari
bo0om
2
2.2k
Partyhack 3.0 - Telegram bugbounty writeup
bo0om
0
4k
Other Decks in Research
See All in Research
Individual tree crown delineation in high resolution aerial RGB imagery using StarDist-based model
satai
3
180
研究を支える拡張性の高い ワークフローツールの提案 / Proposal of highly expandable workflow tools to support research
linyows
0
370
The Economics of Platforms 輪読会 第1章
tomonatu8
0
160
Batch Processing Algorithm for Elliptic Curve Operations and Its AVX-512 Implementation
herumi
0
140
VAGeo: View-specific Attention for Cross-View Object Geo-Localization
satai
3
190
Vision Language Modelと完全自動運転AIの最新動向
tsubasashi
1
350
EarthMarker: A Visual Prompting Multimodal Large Language Model for Remote Sensing
satai
3
160
国際会議ACL2024参加報告
chemical_tree
1
470
SI-D案内資料_京都文教大学
ryojitakeuchi1116
0
850
IM2024
mamoruk
0
250
3D Gaussian Splattingによる高効率な新規視点合成技術とその応用
muskie82
0
380
NLP2025 WS Shared Task 文法誤り訂正部門 ehiMetrick
sugiyamaseiji
0
160
Featured
See All Featured
Become a Pro
speakerdeck
PRO
27
5.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
34
2.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
[RailsConf 2023] Rails as a piece of cake
palkan
54
5.4k
Typedesign – Prime Four
hannesfritz
41
2.6k
Rails Girls Zürich Keynote
gr2m
94
13k
Designing for humans not robots
tammielis
252
25k
Embracing the Ebb and Flow
colly
85
4.6k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
41
2.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.4k
Transcript
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