SlideShare a Scribd company logo
PUT DOWN THE SUPERGLOBALS!
      Secure PHP Dev with Inspekt

    Ed Finkler • inspekt.org • @funkatron 




      tek-X 2010 • #tekx • #inspekt • http://joind.in/1593
Vulnerabilities!




            Thursday; May 20, 2010 - Inspekt.org
What causes them?




            Thursday; May 20, 2010 - Inspekt.org
Letting bad stuff in!




              Thursday; May 20, 2010 - Inspekt.org
Where's bad stuff?




            Thursday; May 20, 2010 - Inspekt.org
EVERYWHERE!!!




         Thursday; May 20, 2010 - Inspekt.org
FIEO




       Thursday; May 20, 2010 - Inspekt.org
Keep bad stuff from getting in




                  Thursday; May 20, 2010 - Inspekt.org
Don't send bad stuff out




               Thursday; May 20, 2010 - Inspekt.org
Most of us know this




              Thursday; May 20, 2010 - Inspekt.org
PHP makes it harder
 than it should be



             Thursday; May 20, 2010 - Inspekt.org
It should be easy
to do safe things



            Thursday; May 20, 2010 - Inspekt.org
It should be hard
to do dangerous things



               Thursday; May 20, 2010 - Inspekt.org
Right now
it's harder to be safe



               Thursday; May 20, 2010 - Inspekt.org
That sucks




        Thursday; May 20, 2010 - Inspekt.org
That won't change
  anytime soon



            Thursday; May 20, 2010 - Inspekt.org
Inspekt is an attempt
   to change that



              Thursday; May 20, 2010 - Inspekt.org
Make developers show intent




                 Thursday; May 20, 2010 - Inspekt.org
Stop direct access
 to Superglobals



             Thursday; May 20, 2010 - Inspekt.org
example: SuperCage




            Thursday; May 20, 2010 - Inspekt.org
Consequences




         Thursday; May 20, 2010 - Inspekt.org
Simplify




           Thursday; May 20, 2010 - Inspekt.org
Centralize




         Thursday; May 20, 2010 - Inspekt.org
Avoid piecemeal filtering




                Thursday; May 20, 2010 - Inspekt.org
Force demonstration of intent




                  Thursday; May 20, 2010 - Inspekt.org
Auditability




          Thursday; May 20, 2010 - Inspekt.org
$_
OH NO YOU DIDN'T



          Thursday; May 20, 2010 - Inspekt.org
Scoping




          Thursday; May 20, 2010 - Inspekt.org
Superglobals are indeed
      GLOBAL



               Thursday; May 20, 2010 - Inspekt.org
Use Singleton




          Thursday; May 20, 2010 - Inspekt.org
Additional Functionality




                Thursday; May 20, 2010 - Inspekt.org
Auto-filtering




          Thursday; May 20, 2010 - Inspekt.org
example:config




         Thursday; May 20, 2010 - Inspekt.org
wrap an arbitrary array in a cage




                    Thursday; May 20, 2010 - Inspekt.org
example:filter_array_cage




               Thursday; May 20, 2010 - Inspekt.org
Build your own filters




              Thursday; May 20, 2010 - Inspekt.org
example:extending




            Thursday; May 20, 2010 - Inspekt.org
filter an array or scalar




                Thursday; May 20, 2010 - Inspekt.org
example:filter_static_methods




                 Thursday; May 20, 2010 - Inspekt.org
Questions?

http://funkatron.github.com/inspekt/



                         Thursday; May 20, 2010 - Inspekt.org

More Related Content

More from funkatron

JavaScript for PHP Developers
JavaScript for PHP DevelopersJavaScript for PHP Developers
JavaScript for PHP Developers
funkatron
 
Building RIAs with CodeIgniter and JavaScript
Building RIAs with CodeIgniter and JavaScriptBuilding RIAs with CodeIgniter and JavaScript
Building RIAs with CodeIgniter and JavaScript
funkatron
 
JavaScript for PHP Developers
JavaScript for PHP DevelopersJavaScript for PHP Developers
JavaScript for PHP Developers
funkatron
 
Building Desktop RIAs with JavaScript and PHP - ZendCon09
Building Desktop RIAs with JavaScript and PHP - ZendCon09Building Desktop RIAs with JavaScript and PHP - ZendCon09
Building Desktop RIAs with JavaScript and PHP - ZendCon09
funkatron
 
Building Desktop RIAs With PHP And JavaScript
Building Desktop RIAs With PHP And JavaScriptBuilding Desktop RIAs With PHP And JavaScript
Building Desktop RIAs With PHP And JavaScript
funkatron
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
funkatron
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with  PHP, HTML & Javascript  in AIRBuilding Desktop RIAs with  PHP, HTML & Javascript  in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIR
funkatron
 
Securing the PHP Environment with PHPSecInfo - OSCON 2008
Securing the PHP Environment with PHPSecInfo - OSCON 2008Securing the PHP Environment with PHPSecInfo - OSCON 2008
Securing the PHP Environment with PHPSecInfo - OSCON 2008
funkatron
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRBuilding Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIR
funkatron
 
Securing the PHP Environment with PHPSecInfo
Securing the PHP Environment with PHPSecInfoSecuring the PHP Environment with PHPSecInfo
Securing the PHP Environment with PHPSecInfo
funkatron
 

More from funkatron (10)

JavaScript for PHP Developers
JavaScript for PHP DevelopersJavaScript for PHP Developers
JavaScript for PHP Developers
 
Building RIAs with CodeIgniter and JavaScript
Building RIAs with CodeIgniter and JavaScriptBuilding RIAs with CodeIgniter and JavaScript
Building RIAs with CodeIgniter and JavaScript
 
JavaScript for PHP Developers
JavaScript for PHP DevelopersJavaScript for PHP Developers
JavaScript for PHP Developers
 
Building Desktop RIAs with JavaScript and PHP - ZendCon09
Building Desktop RIAs with JavaScript and PHP - ZendCon09Building Desktop RIAs with JavaScript and PHP - ZendCon09
Building Desktop RIAs with JavaScript and PHP - ZendCon09
 
Building Desktop RIAs With PHP And JavaScript
Building Desktop RIAs With PHP And JavaScriptBuilding Desktop RIAs With PHP And JavaScript
Building Desktop RIAs With PHP And JavaScript
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with  PHP, HTML & Javascript  in AIRBuilding Desktop RIAs with  PHP, HTML & Javascript  in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIR
 
Securing the PHP Environment with PHPSecInfo - OSCON 2008
Securing the PHP Environment with PHPSecInfo - OSCON 2008Securing the PHP Environment with PHPSecInfo - OSCON 2008
Securing the PHP Environment with PHPSecInfo - OSCON 2008
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRBuilding Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIR
 
Securing the PHP Environment with PHPSecInfo
Securing the PHP Environment with PHPSecInfoSecuring the PHP Environment with PHPSecInfo
Securing the PHP Environment with PHPSecInfo
 

Recently uploaded

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 

Recently uploaded (20)

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 

Secure PHP Development with Inspekt