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
Ad

Recommended

Node.js Dublin Meetup April 2014
Node.js Dublin Meetup April 2014
Damian Beresford
 
Penny coventry fiddler-spsbe23
Penny coventry fiddler-spsbe23
BIWUG
 
SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens
SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens
Sencha
 
Getting Started with ASP.NET 5
Getting Started with ASP.NET 5
Brij Mishra
 
Building rest services using aspnetwebapi
Building rest services using aspnetwebapi
Brij Mishra
 
10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster
Brij Mishra
 
Writing power shell the right tool for the job
Writing power shell the right tool for the job
Jaap Brasser
 
Apply chat automation today - work smarter tomorrow
Apply chat automation today - work smarter tomorrow
Jaap Brasser
 
CrossWorlds: Unleash the Power of Domino for Connections Development
CrossWorlds: Unleash the Power of Domino for Connections Development
LetsConnect
 
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
Sencha
 
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
NCCOMMS
 
Secure your environment by automation
Secure your environment by automation
Jaap Brasser
 
Automating security with PowerShell
Automating security with PowerShell
Jaap Brasser
 
Paint it blue with PowerShell
Paint it blue with PowerShell
Jaap Brasser
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
Valeri Karpov
 
Apply chat automation today - work smarter tomorrow
Apply chat automation today - work smarter tomorrow
Jaap Brasser
 
Building your own JEA Configuration
Building your own JEA Configuration
Jaap Brasser
 
Manage your infrastructure with PowerShell
Manage your infrastructure with PowerShell
Jaap Brasser
 
Reach the next level with PowerShell
Reach the next level with PowerShell
Jaap Brasser
 
Saving Time By Testing With Jest
Saving Time By Testing With Jest
Ben McCormick
 
SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...
SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...
DIWUG
 
Chat automation in a Modern IT environment
Chat automation in a Modern IT environment
Jaap Brasser
 
Next generation frontend tooling
Next generation frontend tooling
pksjce
 
Code review and security audit in private cloud - Arief Karfianto
Code review and security audit in private cloud - Arief Karfianto
idsecconf
 
Planidoo & Zotonic
Planidoo & Zotonic
David de Boer
 
Design for scale
Design for scale
Doug Lampe
 
Porting ASP.NET applications to Windows Azure
Porting ASP.NET applications to Windows Azure
Gunnar Peipman
 
From zero to hero – learn how to automate from the gui
From zero to hero – learn how to automate from the gui
Jaap Brasser
 
Android lessons you won't learn in school
Android lessons you won't learn in school
Michael Galpin
 
Debugging the Web with Fiddler
Debugging the Web with Fiddler
Ido Flatow
 

More Related Content

What's hot (20)

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

Android lessons you won't learn in school
Android lessons you won't learn in school
Michael Galpin
 
Debugging the Web with Fiddler
Debugging the Web with Fiddler
Ido Flatow
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)
Hong Tat Yew
 
External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1)
Volkan Özçelik
 
The Python in the Apple
The Python in the Apple
zeroSteiner
 
Practical solutions for connections administrators lite
Practical solutions for connections administrators lite
Sharon James
 
Do you lose sleep at night?
Do you lose sleep at night?
Nathan Van Gheem
 
OpenShift Origin: Build a PaaS Just Like Red Hats
OpenShift Origin: Build a PaaS Just Like Red Hats
Mark Atwood
 
Building RESTful APIs
Building RESTful APIs
Silota Inc.
 
Node and Azure
Node and Azure
Jason Gerard
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
Volkan Özçelik
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
Volkan Özçelik
 
Creating a Documentation Portal
Creating a Documentation Portal
Steve Anderson
 
How to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
David M. Johnson
 
MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona Workshop
Valeri Karpov
 
OpenIDM - Flexible Provisioning Platform - April 28 Webinar
OpenIDM - Flexible Provisioning Platform - April 28 Webinar
ForgeRock
 
Extending WordPress as a pro
Extending WordPress as a pro
Marko Heijnen
 
Highlights from microsoft ignite 2015
Highlights from microsoft ignite 2015
Kim Frehe
 
Node.js to the rescue
Node.js to the rescue
Marko Heijnen
 
Android lessons you won't learn in school
Android lessons you won't learn in school
Michael Galpin
 
Debugging the Web with Fiddler
Debugging the Web with Fiddler
Ido Flatow
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)
Hong Tat Yew
 
External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1)
Volkan Özçelik
 
The Python in the Apple
The Python in the Apple
zeroSteiner
 
Practical solutions for connections administrators lite
Practical solutions for connections administrators lite
Sharon James
 
Do you lose sleep at night?
Do you lose sleep at night?
Nathan Van Gheem
 
OpenShift Origin: Build a PaaS Just Like Red Hats
OpenShift Origin: Build a PaaS Just Like Red Hats
Mark Atwood
 
Building RESTful APIs
Building RESTful APIs
Silota Inc.
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
Volkan Özçelik
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
Volkan Özçelik
 
Creating a Documentation Portal
Creating a Documentation Portal
Steve Anderson
 
How to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
David M. Johnson
 
MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona Workshop
Valeri Karpov
 
OpenIDM - Flexible Provisioning Platform - April 28 Webinar
OpenIDM - Flexible Provisioning Platform - April 28 Webinar
ForgeRock
 
Extending WordPress as a pro
Extending WordPress as a pro
Marko Heijnen
 
Highlights from microsoft ignite 2015
Highlights from microsoft ignite 2015
Kim Frehe
 
Node.js to the rescue
Node.js to the rescue
Marko Heijnen
 
Ad

Recently uploaded (20)

The Growing Value and Application of FME & GenAI
The Growing Value and Application of FME & GenAI
Safe Software
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
Agentic AI for Developers and Data Scientists Build an AI Agent in 10 Lines o...
Agentic AI for Developers and Data Scientists Build an AI Agent in 10 Lines o...
All Things Open
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
The Future of Product Management in AI ERA.pdf
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
Mastering AI Workflows with FME by Mark Döring
Mastering AI Workflows with FME by Mark Döring
Safe Software
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
 
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
 
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
Priyanka Aash
 
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
 
The Growing Value and Application of FME & GenAI
The Growing Value and Application of FME & GenAI
Safe Software
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
Agentic AI for Developers and Data Scientists Build an AI Agent in 10 Lines o...
Agentic AI for Developers and Data Scientists Build an AI Agent in 10 Lines o...
All Things Open
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
The Future of Product Management in AI ERA.pdf
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
Mastering AI Workflows with FME by Mark Döring
Mastering AI Workflows with FME by Mark Döring
Safe Software
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
 
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
 
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
Priyanka Aash
 
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
 
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