27

Final race-condition-in-the-web

Embed Size (px)

Citation preview

Page 1: Final race-condition-in-the-web
Page 2: Final race-condition-in-the-web

Race Condition Attacks in Web Applications

gamma95[at]gmail[dot].com

Page 3: Final race-condition-in-the-web

Breaking news

Page 4: Final race-condition-in-the-web

About me

Page 5: Final race-condition-in-the-web

About me

$g4mm4 === $gamma95● Penetration tester● Bugs hunter● Full time Internet Troll

Page 6: Final race-condition-in-the-web

About the talk

● What is race condition?● Race conditions in the web applications● Prevention● Demo● References● Q&A

Page 7: Final race-condition-in-the-web

What is race condition?

● A race condition or race hazard is a type of flaw in an electronic or software system where the output is dependent on the sequence or timing of other uncontrollable events

● Race conditions can occur in electronics systems, especially logic circuits, and in computer software, especially multithreaded or distributed programs.

Page 8: Final race-condition-in-the-web

in Electronics

● ∆t1 and ∆t2 represent the propagation delays of the logic elements.

● When the input value (A) changes, the circuit outputs a short spike of duration (∆t1+∆t2) - ∆t2 = ∆t1

Page 9: Final race-condition-in-the-web

In Computer Software (file system, networking ...)

Page 10: Final race-condition-in-the-web

in Web Applications: Hit Counter

Page 11: Final race-condition-in-the-web

in Web Applications: Hit Counter

Page 12: Final race-condition-in-the-web

Tell me why?

Page 13: Final race-condition-in-the-web

Tell me why?

Page 14: Final race-condition-in-the-web
Page 15: Final race-condition-in-the-web

in Web Applications: Online Banking

Page 16: Final race-condition-in-the-web

in Web Applications: Online Banking

Page 17: Final race-condition-in-the-web

D3m0

Page 18: Final race-condition-in-the-web

Prevention

Page 19: Final race-condition-in-the-web

Semaphore

Page 20: Final race-condition-in-the-web

System V SemaphorePHP is compiled with --enable-sysvsem

Page 21: Final race-condition-in-the-web

LFI with phpinfo()● What is LFI?

Local File Inclusion (also known as LFI) is the process of including files on a server through the web browser. This vulnerability occurs when a page include is not properly sanitized, and allows directory traversal characters to be injected

Page 22: Final race-condition-in-the-web

LFI with phpinfo()● Why PHPInfo()?

The output of the PHPInfo() script contains the values of the PHP Variables, including any values set via _GET, _POST or uploaded _FILES.

Page 23: Final race-condition-in-the-web

How to win the race ?

Page 24: Final race-condition-in-the-web

D3m0

Page 25: Final race-condition-in-the-web

References

● Practical Race Condition Vulnerabilities in Web Applications

https://defuse.ca/race-conditions-in-web-applications.htm

● "LFI with phpinfo() assistance"http://www.insomniasec.com/publications/LFI With PHPInfo Assistance.pdf

● Nghệ thuật tận dụng lỗi phần mềmhttp://bluemoon.com.vn/books/8935048992197.html

Page 26: Final race-condition-in-the-web

Questions?

Page 27: Final race-condition-in-the-web

That's all folks!