Hacking with PHP
Mark Niebergall

LonghornPHP 2019

https://github.com/mbniebergall/hacking-with-php
Mark Niebergall
• PHP since 2005

• Masters degree in MIS

• Senior Software Engineer

• Drug screening project

• Utah PHP Co-Organizer

• CSSLP, SSCP Certified and SME

• Father, long distance running, fishing, skiing
Objective
• Understand attacks

• Increase project security

• Implement effective countermeasures
https://www.pexels.com/photo/architectural-design-architecture-blue-sky-bungalow-462358/
https://static01.nyt.com/images/2016/08/05/us/05onfire1_xp/05onfire1_xp-articleLarge-v2.jpg?quality=75&auto=webp&disable=upscale
Hacking with PHP
• Risk to Resources 

• Threat Modeling

• Types of Attacks

• Countermeasures
Risk to Resources
Risk to Resources
• Data

• Functionality

• Hardware

• Source code
Threat Modeling
Threat Modeling
• https://cybermap.kaspersky.com/
Threat Modeling
• Identify threats

- Script kiddies

- Organized groups

- Nation states

- Curious users
Threat Modeling
• Risk assessment
Types of Attacks
Types of Attacks
• Ransomware

• Malware

• Covert data theft

• Data decryption (credentials, personal, credit card, etc.)

• Denial of Service (DoS)/Distributed DoS (DDoS)

• Injection

• Session hijacking

• Cross-site scripting (XSS)

• Spear Phishing

• Name others?
Countermeasures
Countermeasures
• Prevent attacks from being successful

- Attacks are going to happen, can only reduce likelihood
of success
https://www.kurdsoft.net/Photo/Editor/BLogImg/osi-model-7-layers-network-connectivity.png
Coding Time!
• Be creative

• Group input

• Different attack types

• How to implement countermeasures
Group Discussion
• Attacks seen in the wild

• Countermeasures used

• PHP best practices

• OSI model layers
Questions?
• Feedback

Hacking with PHP