SlideShare a Scribd company logo
Secure Coding
the bare minimum – understand the problem
Introduction
• Andi R Djunaedi
• Software Engineer at blibli.com since March 2014
• https://www.linkedin.com/in/andird
• https://github.com/andirdju
• https://github.com/bliblidotcom
Overview – understand the problem
• Theory
• Code
• Web application -> we’ll talk about this
• Operating System
• Network
• Other?
• Importance
• Practice, get your laptop, pc or whatever
• How it works
Theory - Code
• Web Applications
• OWASP Top 10 List - new list every 3 years
• https://www.owasp.org/index.php/Top_10_2013-Top_10
• https://www.owasp.org/index.php/Top_10_2010-Main
• Top 3 - Samples
• SQL Injection
• Arbitrary SQL query execution
• Session Fixation
• Assume other’s Identity
• Cross Site Scripting
• Arbitrary client code (javascript, html) execution
Importance – Non Security
• Performance
• poor user experience
• redesign, refactor, make it faster
• Code coverage
• buggy, spent more time on fixing bug
• stop the leak
• When
• next iteration
Importance – Security
• How to fix security incidents ???
• Personal/Financial data stolen
• Data deleted
• When
• NOW !!!
Practice – Understand the problem
• Run bad web app
• OWASP Top 3 Sample
• SQL Injection
• Session Fixation
• Cross Site Scripting
• Exercise
Run – web app
• Git, Jdk 8, Maven
• https://github.com/bliblidotcom/sample-basic-secure-coding
• In memory H2 database
• Embedded server
• mvn spring-boot:run
• http://localhost:8080
Get your laptop – SQL Injection
• Demo – Valid use case is only find one record by id
• Read all records
• Insert new records
• Delete all records
Get your laptop – Session Fixation
• Demo - session info only known to the user
• Bad person(A) create new session
• Persuade unsuspecting person(B) via phishing
• Bad person(A) get session information of other person(B)
Get your laptop – Cross Site Scripting
• Demo – valid use case only displays list of data
• Can be done via the same SQL injection
• Html
• Add html form
• Javascript
• Add pop up
• Add redirect
What’s Next
• Crack the other API
• it have similar problems
• Fix the exploit
• Don’t repeat yourself by creating custom solutions
• SQL named parameter
• Regenerate session id
• Content escaping

More Related Content

What's hot (20)

PDF
CrossWorlds: Unleash the Power of Domino for Connections Development
LetsConnect
Ā 
PPTX
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
Sencha
Ā 
PDF
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
NCCOMMS
Ā 
PDF
Secure your environment by automation
Jaap Brasser
Ā 
PDF
Automating security with PowerShell
Jaap Brasser
Ā 
PDF
Paint it blue with PowerShell
Jaap Brasser
Ā 
PDF
TDD a REST API With Node.js and MongoDB
Valeri Karpov
Ā 
PDF
Apply chat automation today - work smarter tomorrow
Jaap Brasser
Ā 
PPTX
Building your own JEA Configuration
Jaap Brasser
Ā 
PDF
Manage your infrastructure with PowerShell
Jaap Brasser
Ā 
PDF
Reach the next level with PowerShell
Jaap Brasser
Ā 
PPTX
Saving Time By Testing With Jest
Ben McCormick
Ā 
PPTX
SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...
DIWUG
Ā 
PDF
Chat automation in a Modern IT environment
Jaap Brasser
Ā 
PPT
Next generation frontend tooling
pksjce
Ā 
PPTX
Code review and security audit in private cloud - Arief Karfianto
idsecconf
Ā 
PDF
Planidoo & Zotonic
David de Boer
Ā 
PPTX
Design for scale
Doug Lampe
Ā 
PPTX
Porting ASP.NET applications to Windows Azure
Gunnar Peipman
Ā 
PPTX
From zero to hero – learn how to automate from the gui
Jaap Brasser
Ā 
CrossWorlds: Unleash the Power of Domino for Connections Development
LetsConnect
Ā 
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
Sencha
Ā 
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
NCCOMMS
Ā 
Secure your environment by automation
Jaap Brasser
Ā 
Automating security with PowerShell
Jaap Brasser
Ā 
Paint it blue with PowerShell
Jaap Brasser
Ā 
TDD a REST API With Node.js and MongoDB
Valeri Karpov
Ā 
Apply chat automation today - work smarter tomorrow
Jaap Brasser
Ā 
Building your own JEA Configuration
Jaap Brasser
Ā 
Manage your infrastructure with PowerShell
Jaap Brasser
Ā 
Reach the next level with PowerShell
Jaap Brasser
Ā 
Saving Time By Testing With Jest
Ben McCormick
Ā 
SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...
DIWUG
Ā 
Chat automation in a Modern IT environment
Jaap Brasser
Ā 
Next generation frontend tooling
pksjce
Ā 
Code review and security audit in private cloud - Arief Karfianto
idsecconf
Ā 
Planidoo & Zotonic
David de Boer
Ā 
Design for scale
Doug Lampe
Ā 
Porting ASP.NET applications to Windows Azure
Gunnar Peipman
Ā 
From zero to hero – learn how to automate from the gui
Jaap Brasser
Ā 

Similar to Tech IT Easy x DevTalk : "Secure Your Coding with OWASP" (20)

PDF
Secure coding presentation Oct 3 2020
Moataz Kamel
Ā 
PDF
IBWAS 2010: Web Security From an Auditor's Standpoint
Luis Grangeia
Ā 
PDF
Luis Grangeia IBWAS
Luis Grangeia
Ā 
PPTX
State of the information security nation
SensePost
Ā 
PDF
Crash Course In Brain Surgery
morisson
Ā 
PDF
2013 OWASP Top 10
bilcorry
Ā 
PDF
Top 10 Web Application vulnerabilities
Terrance Medina
Ā 
PPTX
Hacking 101 (Session 2)
Nitroxis Sprl
Ā 
PPTX
OWASP top 10-2013
tmd800
Ā 
PDF
Owasp top 10 2013
Edouard de Lansalut
Ā 
PDF
Web Application Security and Awareness
Abdul Rahman Sherzad
Ā 
PDF
OWASP Top Ten in Practice
Security Innovation
Ā 
PDF
How to Destroy a Database
John Ashmead
Ā 
PDF
The top 10 security issues in web applications
Devnology
Ā 
PPT
DC612 Day - Web Application Security: OWASP Top 10
dc612
Ā 
PDF
Web Application Security with PHP
jikbal
Ā 
PDF
Owasp top 10 vulnerabilities 2013
Vishrut Sharma
Ā 
PPTX
Application and Website Security -- Fundamental Edition
Daniel Owens
Ā 
PPT
OWASP Top 10 And Insecure Software Root Causes
Marco Morana
Ā 
PDF
Security Awareness
Lucas Hendrich
Ā 
Secure coding presentation Oct 3 2020
Moataz Kamel
Ā 
IBWAS 2010: Web Security From an Auditor's Standpoint
Luis Grangeia
Ā 
Luis Grangeia IBWAS
Luis Grangeia
Ā 
State of the information security nation
SensePost
Ā 
Crash Course In Brain Surgery
morisson
Ā 
2013 OWASP Top 10
bilcorry
Ā 
Top 10 Web Application vulnerabilities
Terrance Medina
Ā 
Hacking 101 (Session 2)
Nitroxis Sprl
Ā 
OWASP top 10-2013
tmd800
Ā 
Owasp top 10 2013
Edouard de Lansalut
Ā 
Web Application Security and Awareness
Abdul Rahman Sherzad
Ā 
OWASP Top Ten in Practice
Security Innovation
Ā 
How to Destroy a Database
John Ashmead
Ā 
The top 10 security issues in web applications
Devnology
Ā 
DC612 Day - Web Application Security: OWASP Top 10
dc612
Ā 
Web Application Security with PHP
jikbal
Ā 
Owasp top 10 vulnerabilities 2013
Vishrut Sharma
Ā 
Application and Website Security -- Fundamental Edition
Daniel Owens
Ā 
OWASP Top 10 And Insecure Software Root Causes
Marco Morana
Ā 
Security Awareness
Lucas Hendrich
Ā 
Ad

Recently uploaded (20)

PDF
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
Ā 
PPTX
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
Ā 
PPTX
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
Ā 
PDF
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
Ā 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
Ā 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
Ā 
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
Ā 
PPTX
Securing Model Context Protocol with Keycloak: AuthN/AuthZ for MCP Servers
Hitachi, Ltd. OSS Solution Center.
Ā 
PDF
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
Ā 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
Ā 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
Ā 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
Ā 
PDF
Draugnet: Anonymous Threat Reporting for a World on Fire
treyka
Ā 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
Ā 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
Ā 
PDF
FME in Overdrive: Unleashing the Power of Parallel Processing
Safe Software
Ā 
PDF
Introducing and Operating FME Flow for Kubernetes in a Large Enterprise: Expe...
Safe Software
Ā 
PDF
šŸš€ Let’s Build Our First Slack Workflow! šŸ”§.pdf
SanjeetMishra29
Ā 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
Ā 
PDF
Kit-Works Team Study_20250627_ķ•œė‹¬ė§Œģ—ė§Œė“ ģ‚¬ė‚“ģ„œė¹„ģŠ¤ķ‚¤ė§(ģ–‘ė‹¤ģœ—).pdf
Wonjun Hwang
Ā 
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
Ā 
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
Ā 
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
Ā 
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
Ā 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
Ā 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
Ā 
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
Ā 
Securing Model Context Protocol with Keycloak: AuthN/AuthZ for MCP Servers
Hitachi, Ltd. OSS Solution Center.
Ā 
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
Ā 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
Ā 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
Ā 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
Ā 
Draugnet: Anonymous Threat Reporting for a World on Fire
treyka
Ā 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
Ā 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
Ā 
FME in Overdrive: Unleashing the Power of Parallel Processing
Safe Software
Ā 
Introducing and Operating FME Flow for Kubernetes in a Large Enterprise: Expe...
Safe Software
Ā 
šŸš€ Let’s Build Our First Slack Workflow! šŸ”§.pdf
SanjeetMishra29
Ā 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
Ā 
Kit-Works Team Study_20250627_ķ•œė‹¬ė§Œģ—ė§Œė“ ģ‚¬ė‚“ģ„œė¹„ģŠ¤ķ‚¤ė§(ģ–‘ė‹¤ģœ—).pdf
Wonjun Hwang
Ā 
Ad

Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"

  • 1. Secure Coding the bare minimum – understand the problem
  • 2. Introduction • Andi R Djunaedi • Software Engineer at blibli.com since March 2014 • https://www.linkedin.com/in/andird • https://github.com/andirdju • https://github.com/bliblidotcom
  • 3. Overview – understand the problem • Theory • Code • Web application -> we’ll talk about this • Operating System • Network • Other? • Importance • Practice, get your laptop, pc or whatever • How it works
  • 4. Theory - Code • Web Applications • OWASP Top 10 List - new list every 3 years • https://www.owasp.org/index.php/Top_10_2013-Top_10 • https://www.owasp.org/index.php/Top_10_2010-Main • Top 3 - Samples • SQL Injection • Arbitrary SQL query execution • Session Fixation • Assume other’s Identity • Cross Site Scripting • Arbitrary client code (javascript, html) execution
  • 5. Importance – Non Security • Performance • poor user experience • redesign, refactor, make it faster • Code coverage • buggy, spent more time on fixing bug • stop the leak • When • next iteration
  • 6. Importance – Security • How to fix security incidents ??? • Personal/Financial data stolen • Data deleted • When • NOW !!!
  • 7. Practice – Understand the problem • Run bad web app • OWASP Top 3 Sample • SQL Injection • Session Fixation • Cross Site Scripting • Exercise
  • 8. Run – web app • Git, Jdk 8, Maven • https://github.com/bliblidotcom/sample-basic-secure-coding • In memory H2 database • Embedded server • mvn spring-boot:run • http://localhost:8080
  • 9. Get your laptop – SQL Injection • Demo – Valid use case is only find one record by id • Read all records • Insert new records • Delete all records
  • 10. Get your laptop – Session Fixation • Demo - session info only known to the user • Bad person(A) create new session • Persuade unsuspecting person(B) via phishing • Bad person(A) get session information of other person(B)
  • 11. Get your laptop – Cross Site Scripting • Demo – valid use case only displays list of data • Can be done via the same SQL injection • Html • Add html form • Javascript • Add pop up • Add redirect
  • 12. What’s Next • Crack the other API • it have similar problems • Fix the exploit • Don’t repeat yourself by creating custom solutions • SQL named parameter • Regenerate session id • Content escaping