SlideShare a Scribd company logo
1 of 47
Download to read offline
What should I do when
my website got hack?
Sumedt Jitpukdebodin
Security Engineer
I-SECURE Co., Ltd.
# whoami
• Name: Sumedt Jitpukdebodin
• Jobs: Security Engineer@I-SECURE Co., Ltd.
• Hobbies: Hacking, Forensic, Cartoon, Series
(Recommended: Mr Robot), Etc.
• Website: www.techsuii.com,
www.r00tsec.com
• Social Network: @materaj, fb.com/
sumedt.jitpukdebodin
# ls objective
• Web Application Threat Growth Statistic
• Web Server x Web Application
• Sample of access.log
• How to start web application attack analysis
• Tools for analysis
• How to defend web application
Web Application Threat
Growth Statistic
Web Application Threat Growth Statistic
By Imperva's Web Application Attack Report (October 2014)
http://www.imperva.com/DefenseCenter/WAAR
Web Application Threat Growth Statistic
By McAfee Labs Threats Report (Febuary 2015)
http://www.mcafee.com/us/resources/reports/rp-quarterly-threat-q4-2014.pdf
# top target
• WordPress is the most attacked Content Management System (CMS)
• PHP applications suffer three times as many Cross Site Scripting attacks as .NET
applications
PHP applications suffer almost 3X more Cross Site Scripting (XSS) attacks than ASP
applications.
PHP applications suffer almost 2X more Directory Traversal (DT) attacks than ASP
applications.
ASP applications suffer almost 2X more SQL Injection attacks than PHP applications.
• Websites containing some form of consumer information suffer up to 59% of the
attacks.
# top target
# stats target
# stats target
Web Server
X
Web Application
Web Server X Web Application
Sample of access.log
# cat access.log
# cat access.log | grep -v bot | more
# man access.log
114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to-
setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/"
"Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/38.0.2125.104 Safari/537.36"
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i""
combined
# man access.log
114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to-
setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/"
"Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/38.0.2125.104 Safari/537.36"
Client IP
# man access.log
114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to-
setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/"
"Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/38.0.2125.104 Safari/537.36"
identity of the user determined by identd
# man access.log
114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to-
setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/"
"Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/38.0.2125.104 Safari/537.36"
user name determined by HTTP authentication
# man access.log
114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to-
setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/"
"Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/38.0.2125.104 Safari/537.36"
the time the server finished processing the request
# man access.log
114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to-
setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/"
"Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/38.0.2125.104 Safari/537.36"
request line from the client
# man access.log
114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to-
setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/"
"Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/38.0.2125.104 Safari/537.36"
status code
# man access.log
114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to-
setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/"
"Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/38.0.2125.104 Safari/537.36"
size of the response
# man access.log
114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to-
setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/"
"Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/38.0.2125.104 Safari/537.36"
Referer
# man access.log
114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to-
setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/"
"Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/38.0.2125.104 Safari/537.36"
User-agent
# awk { print %d } access.log
• awk ‘{print $1}’ access.log # ip address (%h)
• awk ‘{print $2}’ access.log # RFC 1413 identity (%l)
• awk ‘{print $3}’ access.log # userid (%u)
• awk ‘{print $4,5}’ access.log # date/time (%t)
• awk ‘{print $9}’ access.log # status code (%>s)
• awk ‘{print $10}’ access.log # size (%b)
• awk -F” ‘{print $2}’ access.log # request line (%r)
• awk -F” ‘{print $4}’ access.log # referer
How to start
web application attack
analysis
The Art Of War
OWASP Top 10 2013
• A1-Injection
• A2-Broken Authentication and Session Management
• A3-Cross-Site Scripting (XSS)
• A4-Insecure Direct Object Reference
• A5-Security Misconfiguration
• A6-Sensitive Data Exposure
• A7-Missing Function
• A8-Cross-Site Request Forgery(CSRF)
• A9-Using Components with known vulnerabilities
• A10-Unvalidated Redirect and Forwards
Log path
• /var/log/apache2/
• /var/log/nginx/
• C:WindowsSystem32LogFilesW3SVC1
SQL Injection
• Filter: union, order by, select, concat,
group_concat, version, %27, %27%20,
%2527, --, exec, varchar,cast
Example filter SQLi
• cat access.log | grep union | more
Local File Inclusion
Remote File Inclusion
• Filter: ../, /etc/passwd, windows/system32/
drivers/etc/hosts, ../boot.ini, =http://, =php://
Example filter LFI & RFI
• cat access.log | grep “/etc/passwd” | more
XSS
• Filter: javascript, document.cookie, img src,
alert
Example filter XSS
• cat access.log | grep “alert” | more
Brute Forcing
• cat access.log| grep “POST” | grep “login.php | more
Shellshock
• Filter: () {
Example filter
Shellshock
• cat access.log | grep "() {" | more
Tools for analysis
# ls /opt/
• Splunk (Limit 500 MB/day)
• Elastic Search + LogStach + Kibana
• Elastic Search + Graylog2
• Apache-Scalp
• OSSEC
• Etc.
Splunk
ELK
Graylog2
How to defend web
application attack
What should I do
when my website got hack?
• Shut it down ?
• Get website back with backup ?
• Before website back
• Find the root clause, Fix the vulnerability.
• If not web application, try another view with hacker
view.
# apt-get upgrade
• Secure Coding
• OWASP - https://www.owasp.org/index.php/
OWASP_Secure_Coding_Practices_-_Quick_Reference_Guide
• Mozilla - https://wiki.mozilla.org/WebAppSec/Secure_Coding_Guidelines
• Web Application Firewall
• Naxsi
• ModSecurity
• AQTRONIX for IIS
• Penetration Testing
End
%00

More Related Content

What's hot

Attacking AWS: the full cyber kill chain
Attacking AWS: the full cyber kill chainAttacking AWS: the full cyber kill chain
Attacking AWS: the full cyber kill chainSecuRing
 
Attacking Drupal
Attacking DrupalAttacking Drupal
Attacking DrupalGreg Foss
 
Ekoparty 2017 - The Bug Hunter's Methodology
Ekoparty 2017 - The Bug Hunter's MethodologyEkoparty 2017 - The Bug Hunter's Methodology
Ekoparty 2017 - The Bug Hunter's Methodologybugcrowd
 
Rest API Security
Rest API SecurityRest API Security
Rest API SecurityStormpath
 
Mutillidae and the OWASP Top 10 by Adrian Crenshaw aka Irongeek
Mutillidae and the OWASP Top 10 by Adrian Crenshaw aka IrongeekMutillidae and the OWASP Top 10 by Adrian Crenshaw aka Irongeek
Mutillidae and the OWASP Top 10 by Adrian Crenshaw aka IrongeekMagno Logan
 
Syntribos API Security Test Automation
Syntribos API Security Test AutomationSyntribos API Security Test Automation
Syntribos API Security Test AutomationMatthew Valdes
 
Approaching the unknown - Windows Phone application security assessment guide
Approaching the unknown - Windows Phone application security assessment guideApproaching the unknown - Windows Phone application security assessment guide
Approaching the unknown - Windows Phone application security assessment guideSecuRing
 
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011Samvel Gevorgyan
 
Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016Shubham Gupta
 
Red Team vs Blue Team on AWS - RSA 2018
Red Team vs Blue Team on AWS - RSA 2018Red Team vs Blue Team on AWS - RSA 2018
Red Team vs Blue Team on AWS - RSA 2018Teri Radichel
 
CMS Hacking Tricks - DerbyCon 4 - 2014
CMS Hacking Tricks - DerbyCon 4 - 2014CMS Hacking Tricks - DerbyCon 4 - 2014
CMS Hacking Tricks - DerbyCon 4 - 2014Greg Foss
 
BEST PRACTICES OF WEB APPLICATION SECURITY By SAMVEL GEVORGYAN
BEST PRACTICES OF WEB APPLICATION SECURITY By SAMVEL GEVORGYANBEST PRACTICES OF WEB APPLICATION SECURITY By SAMVEL GEVORGYAN
BEST PRACTICES OF WEB APPLICATION SECURITY By SAMVEL GEVORGYANSamvel Gevorgyan
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Anna Klepacka
 
Django (Web Applications that are Secure by Default)
Django �(Web Applications that are Secure by Default�)Django �(Web Applications that are Secure by Default�)
Django (Web Applications that are Secure by Default)Kishor Kumar
 
The WAF book intro protection elements v1.0 lior rotkovitch
The WAF book intro protection elements v1.0 lior rotkovitchThe WAF book intro protection elements v1.0 lior rotkovitch
The WAF book intro protection elements v1.0 lior rotkovitchLior Rotkovitch
 
Threat Hunting Web Shells Using Splunk
Threat Hunting Web Shells Using SplunkThreat Hunting Web Shells Using Splunk
Threat Hunting Web Shells Using Splunkjamesmbower
 

What's hot (20)

Bug Bounty for - Beginners
Bug Bounty for - BeginnersBug Bounty for - Beginners
Bug Bounty for - Beginners
 
Attacking AWS: the full cyber kill chain
Attacking AWS: the full cyber kill chainAttacking AWS: the full cyber kill chain
Attacking AWS: the full cyber kill chain
 
Attacking Drupal
Attacking DrupalAttacking Drupal
Attacking Drupal
 
Ekoparty 2017 - The Bug Hunter's Methodology
Ekoparty 2017 - The Bug Hunter's MethodologyEkoparty 2017 - The Bug Hunter's Methodology
Ekoparty 2017 - The Bug Hunter's Methodology
 
Rest API Security
Rest API SecurityRest API Security
Rest API Security
 
Android Pentesting
Android PentestingAndroid Pentesting
Android Pentesting
 
Mutillidae and the OWASP Top 10 by Adrian Crenshaw aka Irongeek
Mutillidae and the OWASP Top 10 by Adrian Crenshaw aka IrongeekMutillidae and the OWASP Top 10 by Adrian Crenshaw aka Irongeek
Mutillidae and the OWASP Top 10 by Adrian Crenshaw aka Irongeek
 
Syntribos API Security Test Automation
Syntribos API Security Test AutomationSyntribos API Security Test Automation
Syntribos API Security Test Automation
 
Approaching the unknown - Windows Phone application security assessment guide
Approaching the unknown - Windows Phone application security assessment guideApproaching the unknown - Windows Phone application security assessment guide
Approaching the unknown - Windows Phone application security assessment guide
 
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
 
Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016
 
Red Team vs Blue Team on AWS - RSA 2018
Red Team vs Blue Team on AWS - RSA 2018Red Team vs Blue Team on AWS - RSA 2018
Red Team vs Blue Team on AWS - RSA 2018
 
CMS Hacking Tricks - DerbyCon 4 - 2014
CMS Hacking Tricks - DerbyCon 4 - 2014CMS Hacking Tricks - DerbyCon 4 - 2014
CMS Hacking Tricks - DerbyCon 4 - 2014
 
BEST PRACTICES OF WEB APPLICATION SECURITY By SAMVEL GEVORGYAN
BEST PRACTICES OF WEB APPLICATION SECURITY By SAMVEL GEVORGYANBEST PRACTICES OF WEB APPLICATION SECURITY By SAMVEL GEVORGYAN
BEST PRACTICES OF WEB APPLICATION SECURITY By SAMVEL GEVORGYAN
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
 
Django (Web Applications that are Secure by Default)
Django �(Web Applications that are Secure by Default�)Django �(Web Applications that are Secure by Default�)
Django (Web Applications that are Secure by Default)
 
The WAF book intro protection elements v1.0 lior rotkovitch
The WAF book intro protection elements v1.0 lior rotkovitchThe WAF book intro protection elements v1.0 lior rotkovitch
The WAF book intro protection elements v1.0 lior rotkovitch
 
Bug Bounty 101
Bug Bounty 101Bug Bounty 101
Bug Bounty 101
 
Threat Hunting Web Shells Using Splunk
Threat Hunting Web Shells Using SplunkThreat Hunting Web Shells Using Splunk
Threat Hunting Web Shells Using Splunk
 
Spa Secure Coding Guide
Spa Secure Coding GuideSpa Secure Coding Guide
Spa Secure Coding Guide
 

Viewers also liked

Bde presentatie bakker_bart_20170920
Bde presentatie bakker_bart_20170920Bde presentatie bakker_bart_20170920
Bde presentatie bakker_bart_20170920BigDataExpo
 
Anomaly Detection in Time-Series Data using the Elastic Stack by Henry Pak
Anomaly Detection in Time-Series Data using the Elastic Stack by Henry PakAnomaly Detection in Time-Series Data using the Elastic Stack by Henry Pak
Anomaly Detection in Time-Series Data using the Elastic Stack by Henry PakData Con LA
 
ProRail Laurens Koppenol & Paul van der Voort
ProRail Laurens Koppenol & Paul van der VoortProRail Laurens Koppenol & Paul van der Voort
ProRail Laurens Koppenol & Paul van der VoortBigDataExpo
 
Technology and AI sharing - From 2016 to Y2017 and Beyond
Technology and AI sharing - From 2016 to Y2017 and BeyondTechnology and AI sharing - From 2016 to Y2017 and Beyond
Technology and AI sharing - From 2016 to Y2017 and BeyondJames Huang
 
Elasticsearch 5.0 les nouveautés
Elasticsearch 5.0 les nouveautésElasticsearch 5.0 les nouveautés
Elasticsearch 5.0 les nouveautésMathieu Elie
 
Google Big Data Expo
Google Big Data ExpoGoogle Big Data Expo
Google Big Data ExpoBigDataExpo
 
Big Data Analytics to Enhance Security
Big Data Analytics to Enhance SecurityBig Data Analytics to Enhance Security
Big Data Analytics to Enhance SecurityData Science Thailand
 
Bde presentation dv
Bde presentation dvBde presentation dv
Bde presentation dvBigDataExpo
 
De groote de man Ingrid de Poorter
De groote de man Ingrid de PoorterDe groote de man Ingrid de Poorter
De groote de man Ingrid de PoorterBigDataExpo
 
Incident response on a shoestring budget
Incident response on a shoestring budgetIncident response on a shoestring budget
Incident response on a shoestring budgetDerek Banks
 
Building Blocks Big Data Expo
Building Blocks Big Data ExpoBuilding Blocks Big Data Expo
Building Blocks Big Data ExpoBigDataExpo
 
Presentatie big data expo swarovski
Presentatie big data expo swarovskiPresentatie big data expo swarovski
Presentatie big data expo swarovskiBigDataExpo
 
Dell hans timmerman v1.1
Dell hans timmerman v1.1Dell hans timmerman v1.1
Dell hans timmerman v1.1BigDataExpo
 
Accenture Big Data Expo
Accenture Big Data ExpoAccenture Big Data Expo
Accenture Big Data ExpoBigDataExpo
 

Viewers also liked (20)

Bde presentatie bakker_bart_20170920
Bde presentatie bakker_bart_20170920Bde presentatie bakker_bart_20170920
Bde presentatie bakker_bart_20170920
 
Anomaly Detection in Time-Series Data using the Elastic Stack by Henry Pak
Anomaly Detection in Time-Series Data using the Elastic Stack by Henry PakAnomaly Detection in Time-Series Data using the Elastic Stack by Henry Pak
Anomaly Detection in Time-Series Data using the Elastic Stack by Henry Pak
 
ProRail Laurens Koppenol & Paul van der Voort
ProRail Laurens Koppenol & Paul van der VoortProRail Laurens Koppenol & Paul van der Voort
ProRail Laurens Koppenol & Paul van der Voort
 
Technology and AI sharing - From 2016 to Y2017 and Beyond
Technology and AI sharing - From 2016 to Y2017 and BeyondTechnology and AI sharing - From 2016 to Y2017 and Beyond
Technology and AI sharing - From 2016 to Y2017 and Beyond
 
Datasnap web client
Datasnap web clientDatasnap web client
Datasnap web client
 
Elasticsearch 5.0 les nouveautés
Elasticsearch 5.0 les nouveautésElasticsearch 5.0 les nouveautés
Elasticsearch 5.0 les nouveautés
 
Google Big Data Expo
Google Big Data ExpoGoogle Big Data Expo
Google Big Data Expo
 
Big Data Analytics to Enhance Security
Big Data Analytics to Enhance SecurityBig Data Analytics to Enhance Security
Big Data Analytics to Enhance Security
 
Bde presentation dv
Bde presentation dvBde presentation dv
Bde presentation dv
 
De groote de man Ingrid de Poorter
De groote de man Ingrid de PoorterDe groote de man Ingrid de Poorter
De groote de man Ingrid de Poorter
 
Notilyze SAS
Notilyze SASNotilyze SAS
Notilyze SAS
 
Incident response on a shoestring budget
Incident response on a shoestring budgetIncident response on a shoestring budget
Incident response on a shoestring budget
 
Building Blocks Big Data Expo
Building Blocks Big Data ExpoBuilding Blocks Big Data Expo
Building Blocks Big Data Expo
 
Presentatie big data expo swarovski
Presentatie big data expo swarovskiPresentatie big data expo swarovski
Presentatie big data expo swarovski
 
Dell hans timmerman v1.1
Dell hans timmerman v1.1Dell hans timmerman v1.1
Dell hans timmerman v1.1
 
Java start01 in 2hours
Java start01 in 2hoursJava start01 in 2hours
Java start01 in 2hours
 
If-If-If-If
If-If-If-IfIf-If-If-If
If-If-If-If
 
Crossyn
CrossynCrossyn
Crossyn
 
Accenture Big Data Expo
Accenture Big Data ExpoAccenture Big Data Expo
Accenture Big Data Expo
 
Digital transformation - Jo Caudron
Digital transformation - Jo CaudronDigital transformation - Jo Caudron
Digital transformation - Jo Caudron
 

Similar to What should I do when my website got hack?

(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014Amazon Web Services
 
The top 10 security issues in web applications
The top 10 security issues in web applicationsThe top 10 security issues in web applications
The top 10 security issues in web applicationsDevnology
 
Applciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumerationApplciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumerationBlueinfy Solutions
 
Web Security - Introduction
Web Security - IntroductionWeb Security - Introduction
Web Security - IntroductionSQALab
 
Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Oles Seheda
 
Cyber Crime / Cyber Secuity Testing Architecture by MRITYUNJAYA HIKKALGUTTI (...
Cyber Crime / Cyber Secuity Testing Architecture by MRITYUNJAYA HIKKALGUTTI (...Cyber Crime / Cyber Secuity Testing Architecture by MRITYUNJAYA HIKKALGUTTI (...
Cyber Crime / Cyber Secuity Testing Architecture by MRITYUNJAYA HIKKALGUTTI (...MrityunjayaHikkalgut1
 
Security Analyst Workshop - 20200212
Security Analyst Workshop - 20200212Security Analyst Workshop - 20200212
Security Analyst Workshop - 20200212Florian Roth
 
Security Analyst Workshop - 20190314
Security Analyst Workshop - 20190314Security Analyst Workshop - 20190314
Security Analyst Workshop - 20190314Florian Roth
 
Owasp web application security trends
Owasp web application security trendsOwasp web application security trends
Owasp web application security trendsbeched
 
[2.1] Web application Security Trends - Omar Ganiev
[2.1] Web application Security Trends - Omar Ganiev[2.1] Web application Security Trends - Omar Ganiev
[2.1] Web application Security Trends - Omar GanievOWASP Russia
 
Penetration Testing Basics
Penetration Testing BasicsPenetration Testing Basics
Penetration Testing BasicsRick Wanner
 
Web Application Penetration Testing Introduction
Web Application Penetration Testing IntroductionWeb Application Penetration Testing Introduction
Web Application Penetration Testing Introductiongbud7
 
AppSec Tel Aviv - OWASP Top 10 For JavaScript Developers
AppSec Tel Aviv - OWASP Top 10 For JavaScript Developers AppSec Tel Aviv - OWASP Top 10 For JavaScript Developers
AppSec Tel Aviv - OWASP Top 10 For JavaScript Developers Lewis Ardern
 
Identifying Web Servers: A First-look Into the Future of Web Server Fingerpri...
Identifying Web Servers: A First-look Into the Future of Web Server Fingerpri...Identifying Web Servers: A First-look Into the Future of Web Server Fingerpri...
Identifying Web Servers: A First-look Into the Future of Web Server Fingerpri...Jeremiah Grossman
 
Application Security Workshop
Application Security Workshop Application Security Workshop
Application Security Workshop Priyanka Aash
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshoptestuser1223
 

Similar to What should I do when my website got hack? (20)

(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
 
The top 10 security issues in web applications
The top 10 security issues in web applicationsThe top 10 security issues in web applications
The top 10 security issues in web applications
 
Romulus OWASP
Romulus OWASPRomulus OWASP
Romulus OWASP
 
Applciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumerationApplciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumeration
 
Web Security - Introduction
Web Security - IntroductionWeb Security - Introduction
Web Security - Introduction
 
Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Web Security - Introduction v.1.3
Web Security - Introduction v.1.3
 
Web hackingtools cf-summit2014
Web hackingtools cf-summit2014Web hackingtools cf-summit2014
Web hackingtools cf-summit2014
 
Starwest 2008
Starwest 2008Starwest 2008
Starwest 2008
 
Cyber Crime / Cyber Secuity Testing Architecture by MRITYUNJAYA HIKKALGUTTI (...
Cyber Crime / Cyber Secuity Testing Architecture by MRITYUNJAYA HIKKALGUTTI (...Cyber Crime / Cyber Secuity Testing Architecture by MRITYUNJAYA HIKKALGUTTI (...
Cyber Crime / Cyber Secuity Testing Architecture by MRITYUNJAYA HIKKALGUTTI (...
 
Security Analyst Workshop - 20200212
Security Analyst Workshop - 20200212Security Analyst Workshop - 20200212
Security Analyst Workshop - 20200212
 
Security Analyst Workshop - 20190314
Security Analyst Workshop - 20190314Security Analyst Workshop - 20190314
Security Analyst Workshop - 20190314
 
Owasp web application security trends
Owasp web application security trendsOwasp web application security trends
Owasp web application security trends
 
[2.1] Web application Security Trends - Omar Ganiev
[2.1] Web application Security Trends - Omar Ganiev[2.1] Web application Security Trends - Omar Ganiev
[2.1] Web application Security Trends - Omar Ganiev
 
Penetration Testing Basics
Penetration Testing BasicsPenetration Testing Basics
Penetration Testing Basics
 
Web Application Penetration Testing Introduction
Web Application Penetration Testing IntroductionWeb Application Penetration Testing Introduction
Web Application Penetration Testing Introduction
 
AppSec Tel Aviv - OWASP Top 10 For JavaScript Developers
AppSec Tel Aviv - OWASP Top 10 For JavaScript Developers AppSec Tel Aviv - OWASP Top 10 For JavaScript Developers
AppSec Tel Aviv - OWASP Top 10 For JavaScript Developers
 
Identifying Web Servers: A First-look Into the Future of Web Server Fingerpri...
Identifying Web Servers: A First-look Into the Future of Web Server Fingerpri...Identifying Web Servers: A First-look Into the Future of Web Server Fingerpri...
Identifying Web Servers: A First-look Into the Future of Web Server Fingerpri...
 
Application Security Workshop
Application Security Workshop Application Security Workshop
Application Security Workshop
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshop
 
Web hackingtools 2015
Web hackingtools 2015Web hackingtools 2015
Web hackingtools 2015
 

More from Sumedt Jitpukdebodin (14)

How to create your own hack environment
How to create your own hack environmentHow to create your own hack environment
How to create your own hack environment
 
Phishing
PhishingPhishing
Phishing
 
Which side are you
Which side are youWhich side are you
Which side are you
 
Endpoint is not enough
Endpoint is not enoughEndpoint is not enough
Endpoint is not enough
 
Antivirus is hopeless
Antivirus is hopelessAntivirus is hopeless
Antivirus is hopeless
 
Purple team is awesome
Purple team is awesomePurple team is awesome
Purple team is awesome
 
R u hacked
R u hackedR u hacked
R u hacked
 
Web architecture mechanism and threats
Web architecture   mechanism and threatsWeb architecture   mechanism and threats
Web architecture mechanism and threats
 
Fundamental of malware analysis
Fundamental of malware analysisFundamental of malware analysis
Fundamental of malware analysis
 
Security awareness training
Security awareness trainingSecurity awareness training
Security awareness training
 
Hacking with paper
Hacking with paperHacking with paper
Hacking with paper
 
DDoS handlering
DDoS handleringDDoS handlering
DDoS handlering
 
Incident response before:after breach
Incident response before:after breachIncident response before:after breach
Incident response before:after breach
 
Web Architecture - Mechanism and Threats
Web Architecture - Mechanism and ThreatsWeb Architecture - Mechanism and Threats
Web Architecture - Mechanism and Threats
 

Recently uploaded

Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
Intellectual property rightsand its types.pptx
Intellectual property rightsand its types.pptxIntellectual property rightsand its types.pptx
Intellectual property rightsand its types.pptxBipin Adhikari
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 

Recently uploaded (20)

Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Intellectual property rightsand its types.pptx
Intellectual property rightsand its types.pptxIntellectual property rightsand its types.pptx
Intellectual property rightsand its types.pptx
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 

What should I do when my website got hack?

  • 1. What should I do when my website got hack? Sumedt Jitpukdebodin Security Engineer I-SECURE Co., Ltd.
  • 2. # whoami • Name: Sumedt Jitpukdebodin • Jobs: Security Engineer@I-SECURE Co., Ltd. • Hobbies: Hacking, Forensic, Cartoon, Series (Recommended: Mr Robot), Etc. • Website: www.techsuii.com, www.r00tsec.com • Social Network: @materaj, fb.com/ sumedt.jitpukdebodin
  • 3. # ls objective • Web Application Threat Growth Statistic • Web Server x Web Application • Sample of access.log • How to start web application attack analysis • Tools for analysis • How to defend web application
  • 5. Web Application Threat Growth Statistic By Imperva's Web Application Attack Report (October 2014) http://www.imperva.com/DefenseCenter/WAAR
  • 6. Web Application Threat Growth Statistic By McAfee Labs Threats Report (Febuary 2015) http://www.mcafee.com/us/resources/reports/rp-quarterly-threat-q4-2014.pdf
  • 7. # top target • WordPress is the most attacked Content Management System (CMS) • PHP applications suffer three times as many Cross Site Scripting attacks as .NET applications PHP applications suffer almost 3X more Cross Site Scripting (XSS) attacks than ASP applications. PHP applications suffer almost 2X more Directory Traversal (DT) attacks than ASP applications. ASP applications suffer almost 2X more SQL Injection attacks than PHP applications. • Websites containing some form of consumer information suffer up to 59% of the attacks.
  • 12. Web Server X Web Application
  • 14. # cat access.log # cat access.log | grep -v bot | more
  • 15. # man access.log 114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to- setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/" "Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36" LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"" combined
  • 16. # man access.log 114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to- setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/" "Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36" Client IP
  • 17. # man access.log 114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to- setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/" "Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36" identity of the user determined by identd
  • 18. # man access.log 114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to- setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/" "Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36" user name determined by HTTP authentication
  • 19. # man access.log 114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to- setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/" "Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36" the time the server finished processing the request
  • 20. # man access.log 114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to- setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/" "Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36" request line from the client
  • 21. # man access.log 114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to- setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/" "Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36" status code
  • 22. # man access.log 114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to- setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/" "Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36" size of the response
  • 23. # man access.log 114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to- setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/" "Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36" Referer
  • 24. # man access.log 114.109.95.176 - - [26/Oct/2014:07:07:40 -0400] "GET /2014/09/09/how-to- setup-dns-server-in-ubuntu/ HTTP/1.1" 200 58536 "https://www.google.co.th/" "Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36" User-agent
  • 25. # awk { print %d } access.log • awk ‘{print $1}’ access.log # ip address (%h) • awk ‘{print $2}’ access.log # RFC 1413 identity (%l) • awk ‘{print $3}’ access.log # userid (%u) • awk ‘{print $4,5}’ access.log # date/time (%t) • awk ‘{print $9}’ access.log # status code (%>s) • awk ‘{print $10}’ access.log # size (%b) • awk -F” ‘{print $2}’ access.log # request line (%r) • awk -F” ‘{print $4}’ access.log # referer
  • 26. How to start web application attack analysis
  • 27. The Art Of War
  • 28. OWASP Top 10 2013 • A1-Injection • A2-Broken Authentication and Session Management • A3-Cross-Site Scripting (XSS) • A4-Insecure Direct Object Reference • A5-Security Misconfiguration • A6-Sensitive Data Exposure • A7-Missing Function • A8-Cross-Site Request Forgery(CSRF) • A9-Using Components with known vulnerabilities • A10-Unvalidated Redirect and Forwards
  • 29. Log path • /var/log/apache2/ • /var/log/nginx/ • C:WindowsSystem32LogFilesW3SVC1
  • 30. SQL Injection • Filter: union, order by, select, concat, group_concat, version, %27, %27%20, %2527, --, exec, varchar,cast
  • 31. Example filter SQLi • cat access.log | grep union | more
  • 32. Local File Inclusion Remote File Inclusion • Filter: ../, /etc/passwd, windows/system32/ drivers/etc/hosts, ../boot.ini, =http://, =php://
  • 33. Example filter LFI & RFI • cat access.log | grep “/etc/passwd” | more
  • 34. XSS • Filter: javascript, document.cookie, img src, alert
  • 35. Example filter XSS • cat access.log | grep “alert” | more
  • 36. Brute Forcing • cat access.log| grep “POST” | grep “login.php | more
  • 38. Example filter Shellshock • cat access.log | grep "() {" | more
  • 40. # ls /opt/ • Splunk (Limit 500 MB/day) • Elastic Search + LogStach + Kibana • Elastic Search + Graylog2 • Apache-Scalp • OSSEC • Etc.
  • 42. ELK
  • 44. How to defend web application attack
  • 45. What should I do when my website got hack? • Shut it down ? • Get website back with backup ? • Before website back • Find the root clause, Fix the vulnerability. • If not web application, try another view with hacker view.
  • 46. # apt-get upgrade • Secure Coding • OWASP - https://www.owasp.org/index.php/ OWASP_Secure_Coding_Practices_-_Quick_Reference_Guide • Mozilla - https://wiki.mozilla.org/WebAppSec/Secure_Coding_Guidelines • Web Application Firewall • Naxsi • ModSecurity • AQTRONIX for IIS • Penetration Testing