SlideShare a Scribd company logo
Hack Using Firefox
Ahmad Prayitno,CEH
ahmad.prayitno@gmail.com
 Reconnaissance
 Cross Site Scripting (XSS)
 Cross Site Request Forgery (CSRF)
 SQL Injection
Agenda
Reconnaissance
What is Reconaissance
 Finding as much information about the
target as possible before launching the
first attack
Types Of Reconaissance
Active Reconaissance
Passive Reconaissance
Active Reconaissance
Active reconnaissance is a type of reconnaissance in which an
attacker engages with the targeted person/corporate to
gather information.
 DNS
 Whois
 Netcraft
 Archives
 Search Engine
 Social Media
Passive Reconnaissance
Passive reconnaissance is an attempt to gain
information about targeted person/corporate without
actively engaging with the systems.
 Go to Target Office
 Interview with target
 Read from newspaper
 Etc
Useful Information
 Names (administrative, technical, billing contacts) for social
engineering attack
 Telephone numbers
 Email addresses
 Format of email addresses eg. First.last@abc.com
 Family (Wife/Husband, Childre, etc)
 Places
 Birthday
 Wappalyzer
 WorldIP
 Site Information
Firefox Addon
XSS
What is XSS
 Cross-Site Scripting (XSS) attacks are a type of
injection, in which malicious scripts are injected into
trusted web sites. XSS attacks occur when an attacker
uses a web application to send malicious code,
generally in the form of a browser side script, to a
different end user.
XSS Type
 Reflected XSS
Triggers off of a link
Interactive
Example : victim.com/{vulnerable_here}
 Stored XSS
Persistent
Triggers when the exploited page is viewed
Example : Comment forms
XSS Attack
 XSS attack works this way:
 The attacker identifies a web site that has one or more XSS bugs (for example
echoing data input, or lacking data input validation)
 The attacker crafts a special URL that includes a malformed and malicious
querystring containing HTML and script
 The attacker finds a victim and gets him to click the link
 The victim clicks the link and the victim’s browser makes a request to the
vulnerable server, passing the malicious querystring. And cookies.
 The vulnerable server echoes malicious input, including the script, back to the
victim’s browser
 The victim’s browser executes the malicious script, which may be crafted to pass
data from the victim to the attacker, or other actions
Cross-Site Scripting Attack in Action
1. The attacker sends a victim a link
containing a malicious payload.
2. The victim, tricked into clicking the
link, sends a request (and the
payload) to the vulnerable
application interface.
3. The interface (i.e. a user registration form) accepts the request
(and payload), and responds with a confirmation screen.
Embedded in the confirmation screen is the malicious code, which
has been formatted in such a way that a browser will interpret it as
if it were any other JavaScript code.
4. When the victim receives the response, the browser executes the
payload, which could send cookie values (including session
identifiers) and other sensitive data to the attacker.
Attack Vectors
 Forms that are filled out where values are later presented to
the user
 Web message boards that allow users to post their own
messages
Why Cookies
 Because Cookies is a ticket !
Firefox Addon
 XSS Me
 Cookie Manager
 etc
CSRF
What is CSRF
 Cross-site request forgery, also known as one-click
attack or session riding is a type of malicious exploit
of a website where unauthorized commands are
transmitted from a user that the website trusts. CSRF
exploits the trust that a site has in a user's browser.
Cross-Site Request Forgery
Threat Models
 Client
 Injects content onto trusted site
 Unauthorized Application Request
 Web Attacker
 Owns https://www.attacker.com
 user visit
Example
 Bank Website Request
 http://bank.com/transfer.do?acct=budi&amount=1000
00
 Attacker create link
 <a
href="http://bank.com/transfer.do?acct=hacker&amo
unt=100000">View my Pictures!</a>
SQL Injection
What is SQL Injection
SQL Injection is vulnerability in web application which
using this method hackers able to inject SQL
commands into the database through input form.
25
How common is it?
 It is probably the most common Website vulnerability today!
 It is a flaw in "web application" development,
it is not a DB or web server problem
 Most programmers are still not aware of this problem
 A lot of the php tutorials & php demo are vulnerable
 Even worse, a lot of solutions posted on the Internet are not good enough
26
Vulnerable Applications
 Almost all SQL databases and
programming languages are potentially
vulnerable
 MS SQL Server, Oracle, MySQL, Postgres,
DB2, MS Access, Sybase, Informix, etc
 PHP, ASP, etc
27
How does SQL Injection work?
Common vulnerable login query
SELECT * FROM users
WHERE username = 'ahmad'
AND password = 'rahasia'
28
Injecting through Strings
$username = ' or ‘1’=‘1’ – –
$password = anything
Final query would look like this:
SELECT * FROM users
WHERE username = ' ' or ‘1’=‘1’ – – AND password =
'anything'
29
If it were numeric?
SELECT * FROM clients
WHERE account = 12345678
AND pin = 1111
PHP/MySQL login syntax
$sql = "SELECT * FROM clients WHERE " .
"account = $formacct AND " .
"pin = $formpin";
30
Injecting Numeric Fields
$formacct = 1 or 1=1 #
$formpin = 1111
Final query would look like this:
SELECT * FROM clients
WHERE account = 1 or 1=1 -- AND pin = 1111
 Hack Bar
Firefox Addon

More Related Content

What's hot

Web application security
Web application securityWeb application security
Web application security
Jin Castor
 
Cross Site Request Forgery (CSRF) Scripting Explained
Cross Site Request Forgery (CSRF) Scripting ExplainedCross Site Request Forgery (CSRF) Scripting Explained
Cross Site Request Forgery (CSRF) Scripting Explained
Valency Networks
 
Cross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesCross Site Request Forgery Vulnerabilities
Cross Site Request Forgery Vulnerabilities
Marco Morana
 
Using OTP prevent Phishing attacks
Using OTP prevent Phishing attacksUsing OTP prevent Phishing attacks
Using OTP prevent Phishing attacks
riteshsarode1995
 

What's hot (20)

Web Application Security Tips
Web Application Security TipsWeb Application Security Tips
Web Application Security Tips
 
Secure Code Warrior - Local storage
Secure Code Warrior - Local storageSecure Code Warrior - Local storage
Secure Code Warrior - Local storage
 
XSS, LFI & CSRF vulnerabilities
XSS, LFI & CSRF vulnerabilitiesXSS, LFI & CSRF vulnerabilities
XSS, LFI & CSRF vulnerabilities
 
T04505103106
T04505103106T04505103106
T04505103106
 
Secure development
Secure developmentSecure development
Secure development
 
Web application security
Web application securityWeb application security
Web application security
 
A simple PHP LinkedIn OAuth 2.0 example
A simple PHP LinkedIn OAuth 2.0 exampleA simple PHP LinkedIn OAuth 2.0 example
A simple PHP LinkedIn OAuth 2.0 example
 
Owasp top 10 vulnerabilities 2013
Owasp top 10 vulnerabilities   2013Owasp top 10 vulnerabilities   2013
Owasp top 10 vulnerabilities 2013
 
Cross Site Request Forgery (CSRF) Scripting Explained
Cross Site Request Forgery (CSRF) Scripting ExplainedCross Site Request Forgery (CSRF) Scripting Explained
Cross Site Request Forgery (CSRF) Scripting Explained
 
Cross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesCross Site Request Forgery Vulnerabilities
Cross Site Request Forgery Vulnerabilities
 
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
 
Linkedin & OAuth
Linkedin & OAuthLinkedin & OAuth
Linkedin & OAuth
 
CSRF Attack and Its Prevention technique in ASP.NET MVC
CSRF Attack and Its Prevention technique in ASP.NET MVCCSRF Attack and Its Prevention technique in ASP.NET MVC
CSRF Attack and Its Prevention technique in ASP.NET MVC
 
Using OTP prevent Phishing attacks
Using OTP prevent Phishing attacksUsing OTP prevent Phishing attacks
Using OTP prevent Phishing attacks
 
Its all about CSRF - null Mumbai Meet 10 January 2015 Null/OWASP Chapter
Its all about CSRF - null Mumbai Meet 10 January 2015 Null/OWASP Chapter Its all about CSRF - null Mumbai Meet 10 January 2015 Null/OWASP Chapter
Its all about CSRF - null Mumbai Meet 10 January 2015 Null/OWASP Chapter
 
OAuth2 and LinkedIn
OAuth2 and LinkedInOAuth2 and LinkedIn
OAuth2 and LinkedIn
 
XSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolXSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing tool
 
Web security landscape Unit 3 part 2
Web security landscape Unit 3 part 2Web security landscape Unit 3 part 2
Web security landscape Unit 3 part 2
 
Owasp web security
Owasp web securityOwasp web security
Owasp web security
 
Secure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessionsSecure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessions
 

Similar to Hack using firefox

Cross Site Scripting
Cross Site ScriptingCross Site Scripting
Cross Site Scripting
Ali Mattash
 
A4 A K S H A Y B H A R D W A J
A4    A K S H A Y  B H A R D W A JA4    A K S H A Y  B H A R D W A J
A4 A K S H A Y B H A R D W A J
bhardwajakshay
 
Andrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.pptAndrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.ppt
SilverGold16
 

Similar to Hack using firefox (20)

Recent cyber Attacks
Recent cyber AttacksRecent cyber Attacks
Recent cyber Attacks
 
The most Common Website Security Threats
The most Common Website Security ThreatsThe most Common Website Security Threats
The most Common Website Security Threats
 
Cross Site Scripting
Cross Site ScriptingCross Site Scripting
Cross Site Scripting
 
A4 A K S H A Y B H A R D W A J
A4    A K S H A Y  B H A R D W A JA4    A K S H A Y  B H A R D W A J
A4 A K S H A Y B H A R D W A J
 
Deep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionDeep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL Injection
 
HallTumserFinalPaper
HallTumserFinalPaperHallTumserFinalPaper
HallTumserFinalPaper
 
Are you fighting_new_threats_with_old_weapons
Are you fighting_new_threats_with_old_weaponsAre you fighting_new_threats_with_old_weapons
Are you fighting_new_threats_with_old_weapons
 
Intro to Web Application Security
Intro to Web Application SecurityIntro to Web Application Security
Intro to Web Application Security
 
Why You Need A Web Application Firewall
Why You Need A Web Application FirewallWhy You Need A Web Application Firewall
Why You Need A Web Application Firewall
 
Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation
 
CROSS SITE SCRIPTING.ppt
CROSS SITE SCRIPTING.pptCROSS SITE SCRIPTING.ppt
CROSS SITE SCRIPTING.ppt
 
Information security
Information securityInformation security
Information security
 
SeanRobertsThesis
SeanRobertsThesisSeanRobertsThesis
SeanRobertsThesis
 
Study of Cross-Site Scripting Attacks and Their Countermeasures
Study of Cross-Site Scripting Attacks and Their CountermeasuresStudy of Cross-Site Scripting Attacks and Their Countermeasures
Study of Cross-Site Scripting Attacks and Their Countermeasures
 
Different types of attacks in internet
Different types of attacks in internetDifferent types of attacks in internet
Different types of attacks in internet
 
4.Xss
4.Xss4.Xss
4.Xss
 
Injection attacks
Injection attacksInjection attacks
Injection attacks
 
Web Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The WebWeb Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The Web
 
Amazon & E Bay
Amazon & E BayAmazon & E Bay
Amazon & E Bay
 
Andrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.pptAndrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.ppt
 

Recently uploaded

Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
abhinandnam9997
 
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
aagad
 

Recently uploaded (12)

The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case Study
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
 
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
 
Stay Ahead with 2024's Top Web Design Trends
Stay Ahead with 2024's Top Web Design TrendsStay Ahead with 2024's Top Web Design Trends
Stay Ahead with 2024's Top Web Design Trends
 
The Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI StudioThe Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI Studio
 
The AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdfThe AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdf
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 

Hack using firefox

  • 1. Hack Using Firefox Ahmad Prayitno,CEH ahmad.prayitno@gmail.com
  • 2.  Reconnaissance  Cross Site Scripting (XSS)  Cross Site Request Forgery (CSRF)  SQL Injection Agenda
  • 4. What is Reconaissance  Finding as much information about the target as possible before launching the first attack
  • 5. Types Of Reconaissance Active Reconaissance Passive Reconaissance
  • 6. Active Reconaissance Active reconnaissance is a type of reconnaissance in which an attacker engages with the targeted person/corporate to gather information.  DNS  Whois  Netcraft  Archives  Search Engine  Social Media
  • 7. Passive Reconnaissance Passive reconnaissance is an attempt to gain information about targeted person/corporate without actively engaging with the systems.  Go to Target Office  Interview with target  Read from newspaper  Etc
  • 8. Useful Information  Names (administrative, technical, billing contacts) for social engineering attack  Telephone numbers  Email addresses  Format of email addresses eg. First.last@abc.com  Family (Wife/Husband, Childre, etc)  Places  Birthday
  • 9.  Wappalyzer  WorldIP  Site Information Firefox Addon
  • 10. XSS
  • 11. What is XSS  Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into trusted web sites. XSS attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user.
  • 12. XSS Type  Reflected XSS Triggers off of a link Interactive Example : victim.com/{vulnerable_here}  Stored XSS Persistent Triggers when the exploited page is viewed Example : Comment forms
  • 13. XSS Attack  XSS attack works this way:  The attacker identifies a web site that has one or more XSS bugs (for example echoing data input, or lacking data input validation)  The attacker crafts a special URL that includes a malformed and malicious querystring containing HTML and script  The attacker finds a victim and gets him to click the link  The victim clicks the link and the victim’s browser makes a request to the vulnerable server, passing the malicious querystring. And cookies.  The vulnerable server echoes malicious input, including the script, back to the victim’s browser  The victim’s browser executes the malicious script, which may be crafted to pass data from the victim to the attacker, or other actions
  • 14. Cross-Site Scripting Attack in Action 1. The attacker sends a victim a link containing a malicious payload. 2. The victim, tricked into clicking the link, sends a request (and the payload) to the vulnerable application interface. 3. The interface (i.e. a user registration form) accepts the request (and payload), and responds with a confirmation screen. Embedded in the confirmation screen is the malicious code, which has been formatted in such a way that a browser will interpret it as if it were any other JavaScript code. 4. When the victim receives the response, the browser executes the payload, which could send cookie values (including session identifiers) and other sensitive data to the attacker.
  • 15. Attack Vectors  Forms that are filled out where values are later presented to the user  Web message boards that allow users to post their own messages
  • 16. Why Cookies  Because Cookies is a ticket !
  • 17. Firefox Addon  XSS Me  Cookie Manager  etc
  • 18. CSRF
  • 19. What is CSRF  Cross-site request forgery, also known as one-click attack or session riding is a type of malicious exploit of a website where unauthorized commands are transmitted from a user that the website trusts. CSRF exploits the trust that a site has in a user's browser.
  • 21. Threat Models  Client  Injects content onto trusted site  Unauthorized Application Request  Web Attacker  Owns https://www.attacker.com  user visit
  • 22. Example  Bank Website Request  http://bank.com/transfer.do?acct=budi&amount=1000 00  Attacker create link  <a href="http://bank.com/transfer.do?acct=hacker&amo unt=100000">View my Pictures!</a>
  • 24. What is SQL Injection SQL Injection is vulnerability in web application which using this method hackers able to inject SQL commands into the database through input form.
  • 25. 25 How common is it?  It is probably the most common Website vulnerability today!  It is a flaw in "web application" development, it is not a DB or web server problem  Most programmers are still not aware of this problem  A lot of the php tutorials & php demo are vulnerable  Even worse, a lot of solutions posted on the Internet are not good enough
  • 26. 26 Vulnerable Applications  Almost all SQL databases and programming languages are potentially vulnerable  MS SQL Server, Oracle, MySQL, Postgres, DB2, MS Access, Sybase, Informix, etc  PHP, ASP, etc
  • 27. 27 How does SQL Injection work? Common vulnerable login query SELECT * FROM users WHERE username = 'ahmad' AND password = 'rahasia'
  • 28. 28 Injecting through Strings $username = ' or ‘1’=‘1’ – – $password = anything Final query would look like this: SELECT * FROM users WHERE username = ' ' or ‘1’=‘1’ – – AND password = 'anything'
  • 29. 29 If it were numeric? SELECT * FROM clients WHERE account = 12345678 AND pin = 1111 PHP/MySQL login syntax $sql = "SELECT * FROM clients WHERE " . "account = $formacct AND " . "pin = $formpin";
  • 30. 30 Injecting Numeric Fields $formacct = 1 or 1=1 # $formpin = 1111 Final query would look like this: SELECT * FROM clients WHERE account = 1 or 1=1 -- AND pin = 1111