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
Best Practices - The Upload
Search
Orange
August 21, 2024
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Best Practices - The Upload
Webconf 2013
Orange
August 21, 2024
More Decks by Orange
See All by Orange
Security in PHP 那些在滲透測試的小技巧
p8361
0
310
網頁安全 Web Security 入門
p8361
0
300
Bug Bounty 獎金獵人甘苦談 - 那些年我回報過的漏洞
p8361
13
37k
那些 Web Hacking 中的奇技淫巧
p8361
16
15k
關於 HITCON CTF 的那些事 之 Web 狗如何在險惡的 CTF 世界中存活?
p8361
6
13k
PHPConf 2013 - 矛盾大對決
p8361
53
28k
0-Day 輕鬆談 - Happy Fuzzing Internet Explorer
p8361
15
13k
駭客看 Django
p8361
25
13k
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
The Curse of the Amulet
leimatthew05
1
13k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
360
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Leo the Paperboy
mayatellez
7
1.8k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
160
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Transcript
2013/01/13 @ WebConf <
[email protected]
>
• aka Orange • 2009 • 2011, 2012 • 2011
AVTOKYO • 2012 PHP Conf • 2012 VXRLConf • – – Web Security – Windows Vulnerability Exploitation
• CHROOT Security Group • NISRA • Disclosed – MS12-071
/ CVE-2012-4775 • http://blog.orange.tw/
None
None
1. Reconnaissance – Google Hacking, Reversed Whois, AXFR …… 2.
Scanning – SYN/ACK Scan, TCP NULL/FIN/Xmas/Mainmon/Window Scan, SCTP INIT Scan, Hydra, Nessus …… 3. Gaining Access – Heap/Stack/V-table Overflow, ROP, Heap Spray, System Misconfiguration, Metasploit, Exploit Database …… 4. Maintaining Access – Privilege Escalation, Trojan, Backdoor, Rootkit, Code/DLL Injection, API Hook, LD_PRELOAD, Anti AV/Debugger …… 5. Clearing Tracks – Syslog, WTMP/UTMP, Event Log, Shell(Bash/Explorer) ……
None
– Upload? – Web log? Dabase log?
• • – <?php eval( $_REQUEST[cmd] );?> – Runtime.getRuntime().exec( cmd
) – <%eval request("cmd") %> – __import__('os').system(cmd)
https://github.com/evilcos/python-webshell/
None
None
None
None
None
None
None
http://www.lu-chen.com/
None
None
• – PHP CGI PATH_INFO • – /index.php/module/login – /index/module/login
• – /userfiles/mypic.jpg – /userfiles/mypic.jpg/nihao.php
• – Huffman table – EXIF • – copy /b
rst.jpg+backdoor.php dst.jpg • – http://orange.tw/exif.jpg
None
None
• • • •
• – – – • – php phtml php3 php4
php5 – asp asa cer cdx shtml – aspx asax ascx ashx asmx http://www.hitcon.org/download/2010/5_Flash Exploit.pdf#Page.20
None
– AddHandler application/x-httpd-php .jpg • – .php*
None
https://speakerdeck.com/allenown/the-internet-is-not-safe-webconf-taiwan-2013
https://www.facebook.com/TWWDB
(htaccess ^ ^)
• • – user.jpg .jpg – user.php.jpg .jpg
– user.php.xxx .php – user.php.xxx.ooo .php
None
• – IIS < 7 – Asp.net ^__< • –
http://webconf.orange.tw/files/a.asp/user.jpg • – http://webconf.orange.tw/files/user.asp;aa.jpg user.asp;aa.jpg
None
None
filename Content-Type File header
None
• Update your sense and software. • User controlled filename
is always dangerous. – Whatever filename, extension or temporary filename. • Use Image library to valid or strip the image. • Disabled the directory’s execution permission you uploaded to.
• • – htaccess • – Apache – IIS •
•
None
Q & A
[email protected]