+ All Categories
Home > Technology > BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

Date post: 13-Dec-2014
Category:
Upload: shellmates
View: 956 times
Download: 1 times
Share this document with a friend
Description:
 
17
1 PHP STATIC CODE ANALISYS Belakhdar Abdeldjalil
Transcript
Page 1: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

1

PHP STATIC CODE ANALISYSBelakhdar Abdeldjalil

Page 2: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

2

Show the code

● Simple php script● Few pages● Few code lines

Page 3: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

3

Find the bug

Try to find it manually ?

Page 4: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

4

Are there better ways to do it ?

Page 5: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

5

Find the bug

How about grep ?

Page 6: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

6

Are there better way to do it ?

Page 7: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

7

Find the bug

How about Php tokenizer ?

Page 8: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

8

Find the bug

Rips is in the party

Page 9: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

9

Find the bug

Rips and taint analysis

Page 10: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

10

Find the bug

Php tokenizer in action with Rips

Page 11: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

11

Demo

Try rips on rips

Page 12: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

12

Demo

Try rips on wordpress plugins

Page 13: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

13

Demo

Try rips on yii app

Page 14: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

14

Demo

Rips is not the miracle answer

Page 15: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

15

In the end

● Php tokenizer is a big help● Rips make it easier● Not the best way for object oriented (mvc) project

Page 16: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

16

Thanks

Page 17: BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar

17

Questions Now ?

Or later by email [email protected]


Recommended