PHP STATIC CODE ANALISYS
             Belakhdar Abdeldjalil




                                     1
Show the code

●   Simple php script
●   Few pages
●   Few code lines




                                        2
Find the bug




Try to find it manually ?




                            3
Are there better ways to do it ?




                                   4
Find the bug




How about grep ?




                   5
Are there better way to do it ?




                                  6
Find the bug




How about Php tokenizer ?




                            7
Find the bug




Rips is in the party




                       8
Find the bug




Rips and taint analysis




                          9
Find the bug




Php tokenizer in action with Rips




                                    10
Demo




Try rips on rips




                   11
Demo




Try rips on wordpress plugins




                                12
Demo




Try rips on yii app




                      13
Demo




Rips is not the miracle answer




                                 14
In the end

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




                                                         15
Thanks




         16
Questions Now ?

   Or later by email
riemann@opendz.org




                       17

BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar