SlideShare ist ein Scribd-Unternehmen logo
1 von 44
CSRF	
  (Cross	
  Site	
  Request	
  Forgery)	
  
ClickJacking	
  &	
  Open	
  Redirects	
  
Cross	
  Site	
  Request	
  Forgery	
  (CSRF)	
  
•  Generic	
  CSRF	
  is	
  with	
  GET	
  /	
  POST	
  
•  Forcefully	
  sending	
  request	
  to	
  the	
  target	
  applicaEon	
  
with	
  cookie	
  replay	
  
•  Leveraging	
  tags	
  like	
  
–  IMG
–  SCRIPT
–  IFRAME
•  Not	
  abide	
  by	
  SOP	
  or	
  Cross	
  Domain	
  is	
  possible	
  
Request	
  generaEon	
  
	
  	
  	
  	
  	
  IMG	
  SRC	
  
	
  	
  <img	
  src="hOp://host/?command">	
  
	
  
	
  	
  SCRIPT	
  SRC	
  
	
  	
  <script	
  src="hOp://host/?command">	
  
	
  
	
  	
  IFRAME	
  SRC	
  
	
  	
  <iframe	
  src="hOp://host/?command">	
  	
  
Request	
  generaEon	
  
	
  	
  	
  	
  'Image'	
  Object	
  
	
  	
  <script>	
  
	
  	
  var	
  foo	
  =	
  new	
  Image();	
  
	
  	
  foo.src	
  =	
  "hOp://host/?command";	
  
	
  	
  </script>	
  	
  
	
  
XHR	
  –	
  Cross	
  domain	
  difficult	
  
Request	
  generaEon	
  
•  It	
  is	
  possible	
  to	
  generate	
  POST	
  as	
  well	
  
•  Form	
  can	
  be	
  build	
  dynamically	
  and	
  buOon	
  
click	
  from	
  JavaScript	
  is	
  possible	
  
<script	
  type="text/javascript"	
  
language="JavaScript">	
  
	
  	
  	
  	
  	
  	
  document.foo.submit();	
  
</script>	
  	
  
Cross	
  Site	
  Request	
  Forgery	
  (CSRF)	
  
•  What	
  is	
  different	
  with	
  Web	
  2.0	
  
– Is it possible to do CSRF to XML stream
– How?
– It will be POST hitting the XML processing
resources like Web Services
– JSON CSRF is also possible
– Interesting check to make against application
and Web 2.0 resources
One	
  Way	
  CSRF	
  Scenario	
  
One	
  Way	
  CSRF	
  Scenario	
  
One	
  Way	
  CSRF	
  Scenario	
  
One	
  Way	
  CSRF	
  Scenario	
  
One-­‐Way	
  CSRF	
  
One-­‐Way	
  CSRF	
  
•  <html>	
  
•  <body>	
  
•  <FORM	
  NAME="buy"	
  ENCTYPE="text/plain"	
  acEon="hOp://
trade.example.com/xmlrpc/trade.rem"	
  METHOD="POST">	
  
•  	
  	
  	
  	
  	
  	
  	
  <input	
  type="hidden"	
  name='<?xml	
  version'	
  value='"1.0"?
><methodCall><methodName>stocks.buy</
methodName><params><param><value><string>MSFT</string></
value></param><param><value><double>26</double></value></
param></params></methodCall>'>	
  
•  </FORM>	
  
•  <script>document.buy.submit();</script>	
  
•  </body>	
  
•  </html>	
  
Forcing	
  XML	
  
•  Spligng	
  XML	
  stream	
  in	
  the	
  form.	
  
•  Possible	
  through	
  XForms	
  as	
  well.	
  
•  Similar	
  techniques	
  is	
  applicable	
  to	
  JSON	
  as	
  
well.	
  	
  
Two-­‐Way	
  CSRF	
  
•  One-­‐Way	
  –	
  Just	
  making	
  forceful	
  request.	
  
•  Two-­‐Way	
  
– Reading the data coming from the target
– May be getting hold onto important
information – profile, statements, numbers
etc.
– Is it possible with JSON/XML
Two-­‐Way	
  CSRF	
  
Two-­‐Way	
  CSRF	
  
•  ApplicaEon	
  is	
  serving	
  various	
  streams	
  like	
  –	
  
JSON,	
  JS-­‐Object,	
  Array	
  etc.	
  
	
  
Two-­‐Way	
  CSRF	
  
Two-­‐Way	
  CSRF	
  
•  AOacker	
  page	
  can	
  make	
  cross	
  domain	
  request	
  
using	
  SCRIPT	
  (firefox)	
  
•  Following	
  code	
  can	
  overload	
  the	
  array	
  stream.	
  
	
  	
  	
  funcEon	
  Array()	
  	
  
	
  {	
  var	
  obj	
  =	
  this;	
  var	
  index	
  =	
  0;	
  for(j=0;j<4;j++){	
  obj[index++]	
  
seOer	
  =	
  spoof;	
  }	
  }	
  funcEon	
  spoof(x){	
  send(x.toString());	
  }	
  	
  
Two-­‐Way	
  CSRF	
  
Two-­‐Way	
  CSRF	
  
•  It	
  is	
  possible	
  to	
  overload	
  these	
  objects.	
  
•  Reading	
  and	
  sending	
  to	
  cross	
  domain	
  possible.	
  
•  Opens	
  up	
  two	
  way	
  channel	
  for	
  an	
  aOacker.	
  
•  Web	
  2.0	
  streams	
  are	
  vulnerable	
  to	
  these	
  
aOacks.	
  
Countermeasure	
  
•  Server	
  Side	
  Checks	
  
–  Check for client’s content-type.
–  XHR calls – xml/application.
–  Native calls – text/html.
–  Filtering is possible on it.
•  Client	
  Side	
  Checks	
  
–  Stream can be started and terminated by /* or any
predefined characters.
–  Client can remove them before injecting to DOM.
Clickjacking	
  
DescripEon	
  
• Clickjacking	
  is	
  a	
  popular	
  name	
  for	
  an	
  old	
  aOack	
  
method	
  called	
  “UI	
  redressing”	
  
• Though	
  a	
  case	
  of	
  “old	
  wine	
  in	
  a	
  new	
  boOle”,	
  
given	
  the	
  current	
  development	
  in	
  Web	
  
standards	
  (Web	
  2.0,	
  AJAX,	
  etc),	
  one	
  cannot	
  
ignore	
  the	
  risks	
  posed	
  by	
  this	
  vulnerability	
  
• The	
  basic	
  philosophy	
  of	
  this	
  aOack	
  is	
  to	
  fool	
  
the	
  user	
  into	
  clicking	
  a	
  malicious	
  link	
  
DescripEon	
  
•  Clickjacking	
  involves	
  “hijacking”	
  the	
  user's	
  
mouse	
  clicks	
  
•  This	
  means,	
  the	
  user	
  thinks	
  (s)he's	
  clicking	
  
on	
  something,	
  but	
  is	
  actually	
  not	
  
•  The	
  user,	
  invariably	
  and	
  unknowingly	
  
authorizes	
  certain	
  acEons	
  which	
  could	
  have	
  
disasterous	
  consequences	
  or	
  could	
  be	
  as	
  
harmless	
  as	
  being	
  redirected	
  to	
  a	
  games	
  site	
  
AOack	
  Anatomy	
  
•  There	
  are	
  3	
  popular	
  ways	
  in	
  which	
  aOackers	
  
perpetrate	
  this	
  vulnerability	
  
–  Using invisible elements such as iframes
–  Injecting malicious javascript (or any
other client side scripting language)
–  Leveraging a bug in Adobe Flash Player
(this method is now obsolete)
AOack	
  Anatomy	
  
•  An	
  aOacker	
  uses	
  the	
  concept	
  of	
  layering	
  to	
  
crat	
  an	
  aOack	
  
•  Basically,	
  the	
  page	
  that	
  the	
  user	
  views,	
  will	
  
have	
  layers	
  
•  Some	
  of	
  these	
  layers	
  will	
  be	
  transparent	
  (or	
  
invisible)	
  	
  
•  The	
  user	
  will	
  never	
  know	
  of	
  the	
  invisible	
  
layers	
  and	
  will	
  end	
  up	
  making	
  a	
  wrong	
  
choice	
  
AOack	
  Anatomy	
  
•  Lets	
  first	
  understand	
  this	
  basic	
  mechanism	
  
with	
  an	
  example	
  and	
  then	
  move	
  on	
  to	
  the	
  
different	
  ways	
  of	
  perpetraEng	
  this	
  aOack	
  ....	
  
AOack	
  Anatomy	
  
Send email to all users ?
Yes No
Actual intented content ....
AOack	
  Anatomy	
  
Send email to all users ?
Yes No
Do you want a free iPad?
No
Intended content .... Malicious content for clickjacking
AOack	
  Anatomy	
  
Send email to all users ?
Yes No
Do you want a free iPad?
No
When the two are super imposed …
(“Send email to all users?” Will not be visible, it is
shown here for clarity)
Unvalidated	
  Redirects	
  &	
  
Forwards	
  
DescripEon	
  
•  Web	
  applicaEons	
  are	
  having	
  its	
  own	
  “flow”	
  
•  Business	
  flow	
  needs	
  movement	
  between	
  
pages	
  and	
  sites	
  
•  ApplicaEon	
  uses	
  same	
  domain	
  or	
  cross	
  
domain	
  redirects	
  and	
  forwards	
  
•  It	
  allows	
  applicaEons	
  to	
  work	
  easily	
  and	
  access	
  
same	
  domain	
  or	
  cross	
  domain	
  resources	
  
(Single	
  Sign	
  On	
  –	
  leveraging)	
  
DescripEon	
  
•  HTTP	
  requests	
  can	
  be	
  GET	
  or	
  POST	
  
•  Parameters	
  are	
  not	
  validated	
  and	
  can	
  lead	
  to	
  
arbitrary	
  redirects	
  
•  This	
  can	
  be	
  leveraged	
  at	
  ease	
  and	
  get	
  
exploited	
  by	
  an	
  aOacker	
  
•  AOacker	
  exploits	
  the	
  trust	
  and	
  leverage	
  the	
  
vulnerability	
  
AOack	
  Anatomy	
  
•  As	
  a	
  part	
  of	
  root	
  cause,	
  there	
  must	
  be	
  a	
  
redirect	
  hole	
  
•  Example,	
  
– http://foo.bank.com/login.aspx?
user=xxx&page=trade.aspx
•  Here	
  “page”	
  is	
  a	
  vulnerable	
  parameter	
  
•  What	
  if?	
  Some	
  one	
  put	
  page=hOp://
yahoo.com	
  …	
  
AOack	
  Anatomy	
  
Attacker
foo.bank.com
http://foo.bank.com/login.aspx?user=xxx&
page=http://yahoo.com
Get redirect or JavaScript call
for loading yahoo.com
Vulnerability detected!!!
AOack	
  Anatomy	
  
•  What	
  is	
  redirect…	
  
– If server sends 302 in its HTTP response
– If server sends JavaScript with certain
document object calls like “location”
•  What	
  will	
  happen…	
  
– It will send browser to new location
– User will stay in impression that he/she is at
trusted site but that is not the case
AOack	
  Anatomy	
  
Bank’s user
foo.bank.com
Login the page
Login successful
This is what in user’s mind…
a.) URL – trusted, foo.bank.com
b.) Login form - trusted
AOack	
  Anatomy	
  
•  User	
  is	
  doing	
  all	
  his	
  acEviEes	
  
•  Full	
  trust	
  is	
  established	
  and	
  day	
  to	
  day	
  work	
  is	
  
going	
  on	
  
•  Now	
  aOacker’s	
  acEon	
  comes	
  in	
  …	
  
•  AOacker	
  sends	
  a	
  mail	
  and	
  request	
  to	
  login	
  and	
  
change	
  password	
  immediately	
  as	
  part	
  of	
  
banking	
  policies	
  
•  	
  AOacker	
  acts	
  as	
  administrator	
  from	
  bank	
  
AOack	
  Anatomy	
  
•  Magic	
  is	
  in	
  the	
  link	
  and	
  trust	
  is	
  in	
  the	
  mind.	
  
•  User	
  trust	
  the	
  URL	
  and	
  Link	
  both	
  consciously	
  
and	
  subconsciously…	
  
•  Following	
  link	
  will	
  be	
  sent.	
  
http://foo.bank.com/login.aspx?user=xxx&date=12-12-2009&trust=good&
page=http://203.88.xx.xx/security.html
Link is injected
User is going to trust this
AOack	
  Anatomy	
  
Click the link
Get a redirect response
to 203.88.XX.XX
1Link in mail
AOack	
  Anatomy	
  
Bank’s user
foo.bank.com
Click the link
Get a redirect response
to 203.88.XX.XX
203.88.XX.XX
(Attacker’s area)
Bank’s user
Send dummy form
Trusted evil redirect
2
AOack	
  Anatomy	
  
Bank’s user
foo.bank.com
Click the link
Get a redirect response
to 203.88.XX.XX
203.88.XX.XX
(Attacker’s area)
Bank’s user
Send dummy form
Bank’s user
Send username and password
Send dummy response (Thanks!)
Trusted evil redirect
203.88.XX.XX
(Attacker’s area)
3
AOack	
  Anatomy	
  
Bank’s user
foo.bank.com
Click the link
Get a redirect response
to 203.88.XX.XX
203.88.XX.XX
(Attacker’s area)
Bank’s user
Send dummy form
Bank’s user
Send username and password
Send dummy response (Thanks!)
Trusted evil redirect
203.88.XX.XX
(Attacker’s area)
Logs in and
do money
transfer
4
Conclusion	
  

Weitere ähnliche Inhalte

Was ist angesagt?

Neat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionNeat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionMikhail Egorov
 
Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Amit Tyagi
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) securityNahidul Kibria
 
Cross Site Request Forgery
Cross Site Request ForgeryCross Site Request Forgery
Cross Site Request ForgeryTony Bibbs
 
Penetration Testing Basics
Penetration Testing BasicsPenetration Testing Basics
Penetration Testing BasicsRick Wanner
 
Sql injection
Sql injectionSql injection
Sql injectionZidh
 
Reflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site ScriptingReflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site ScriptingInMobi Technology
 
Sql Injection - Vulnerability and Security
Sql Injection - Vulnerability and SecuritySql Injection - Vulnerability and Security
Sql Injection - Vulnerability and SecuritySandip Chaudhari
 
How to Test for The OWASP Top Ten
 How to Test for The OWASP Top Ten How to Test for The OWASP Top Ten
How to Test for The OWASP Top TenSecurity Innovation
 
Sql injection in cybersecurity
Sql injection in cybersecuritySql injection in cybersecurity
Sql injection in cybersecuritySanad Bhowmik
 
Web Application Security and Awareness
Web Application Security and AwarenessWeb Application Security and Awareness
Web Application Security and AwarenessAbdul Rahman Sherzad
 

Was ist angesagt? (20)

OWASP Top Ten
OWASP Top TenOWASP Top Ten
OWASP Top Ten
 
Neat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionNeat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protection
 
Broken access control
Broken access controlBroken access control
Broken access control
 
Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) security
 
Cross Site Request Forgery
Cross Site Request ForgeryCross Site Request Forgery
Cross Site Request Forgery
 
Owasp Top 10 A1: Injection
Owasp Top 10 A1: InjectionOwasp Top 10 A1: Injection
Owasp Top 10 A1: Injection
 
SQL Injections (Part 1)
SQL Injections (Part 1)SQL Injections (Part 1)
SQL Injections (Part 1)
 
Penetration Testing Basics
Penetration Testing BasicsPenetration Testing Basics
Penetration Testing Basics
 
Sql injection
Sql injectionSql injection
Sql injection
 
Reflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site ScriptingReflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site Scripting
 
Cross site scripting
Cross site scriptingCross site scripting
Cross site scripting
 
Broken access controls
Broken access controlsBroken access controls
Broken access controls
 
Sql Injection - Vulnerability and Security
Sql Injection - Vulnerability and SecuritySql Injection - Vulnerability and Security
Sql Injection - Vulnerability and Security
 
How to Test for The OWASP Top Ten
 How to Test for The OWASP Top Ten How to Test for The OWASP Top Ten
How to Test for The OWASP Top Ten
 
IDOR Know-How.pdf
IDOR Know-How.pdfIDOR Know-How.pdf
IDOR Know-How.pdf
 
Sql injection in cybersecurity
Sql injection in cybersecuritySql injection in cybersecurity
Sql injection in cybersecurity
 
OWASP TOP 10 VULNERABILITIS
OWASP TOP 10 VULNERABILITISOWASP TOP 10 VULNERABILITIS
OWASP TOP 10 VULNERABILITIS
 
Web Application Security 101
Web Application Security 101Web Application Security 101
Web Application Security 101
 
Web Application Security and Awareness
Web Application Security and AwarenessWeb Application Security and Awareness
Web Application Security and Awareness
 

Ähnlich wie CSRF, ClickJacking & Open Redirect

Going Beyond Cross Domain Boundaries (jQuery Bulgaria)
Going Beyond Cross Domain Boundaries (jQuery Bulgaria)Going Beyond Cross Domain Boundaries (jQuery Bulgaria)
Going Beyond Cross Domain Boundaries (jQuery Bulgaria)Ivo Andreev
 
Postcards from the post xss world- content exfiltration null
Postcards from the post xss world- content exfiltration nullPostcards from the post xss world- content exfiltration null
Postcards from the post xss world- content exfiltration nullPiyush Pattanayak
 
Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009mirahman
 
Detailed Developer Report.pdf
Detailed Developer Report.pdfDetailed Developer Report.pdf
Detailed Developer Report.pdfnalla14
 
Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuAppUniverz Org
 
OWASP top 10-2013
OWASP top 10-2013OWASP top 10-2013
OWASP top 10-2013tmd800
 
4 andrii kudiurov - web application security 101
4   andrii kudiurov - web application security 1014   andrii kudiurov - web application security 101
4 andrii kudiurov - web application security 101Ievgenii Katsan
 
www.webre24h.com - Ajax security
www.webre24h.com - Ajax securitywww.webre24h.com - Ajax security
www.webre24h.com - Ajax securitywebre24h
 
Ajax to the Moon
Ajax to the MoonAjax to the Moon
Ajax to the Moondavejohnson
 
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...Divyanshu
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Timothy Fisher
 
WebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer ConferenceWebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer ConferenceAllFacebook.de
 
Web Hacking Series Part 4
Web Hacking Series Part 4Web Hacking Series Part 4
Web Hacking Series Part 4Aditya Kamat
 
How to migrate from any CMS (thru the front-door)
How to migrate from any CMS (thru the front-door)How to migrate from any CMS (thru the front-door)
How to migrate from any CMS (thru the front-door)ICF CIRCUIT
 
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
 
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
 
Building Secure User Interfaces With JWTs (JSON Web Tokens)
Building Secure User Interfaces With JWTs (JSON Web Tokens)Building Secure User Interfaces With JWTs (JSON Web Tokens)
Building Secure User Interfaces With JWTs (JSON Web Tokens)Stormpath
 
Testing mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkTesting mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkSusannSgorzaly
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsChris Love
 

Ähnlich wie CSRF, ClickJacking & Open Redirect (20)

Going Beyond Cross Domain Boundaries (jQuery Bulgaria)
Going Beyond Cross Domain Boundaries (jQuery Bulgaria)Going Beyond Cross Domain Boundaries (jQuery Bulgaria)
Going Beyond Cross Domain Boundaries (jQuery Bulgaria)
 
Postcards from the post xss world- content exfiltration null
Postcards from the post xss world- content exfiltration nullPostcards from the post xss world- content exfiltration null
Postcards from the post xss world- content exfiltration null
 
Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009
 
Detailed Developer Report.pdf
Detailed Developer Report.pdfDetailed Developer Report.pdf
Detailed Developer Report.pdf
 
Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. Wu
 
OWASP top 10-2013
OWASP top 10-2013OWASP top 10-2013
OWASP top 10-2013
 
4 andrii kudiurov - web application security 101
4   andrii kudiurov - web application security 1014   andrii kudiurov - web application security 101
4 andrii kudiurov - web application security 101
 
www.webre24h.com - Ajax security
www.webre24h.com - Ajax securitywww.webre24h.com - Ajax security
www.webre24h.com - Ajax security
 
Ajax to the Moon
Ajax to the MoonAjax to the Moon
Ajax to the Moon
 
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 
WebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer ConferenceWebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer Conference
 
Burpsuite yara
Burpsuite yaraBurpsuite yara
Burpsuite yara
 
Web Hacking Series Part 4
Web Hacking Series Part 4Web Hacking Series Part 4
Web Hacking Series Part 4
 
How to migrate from any CMS (thru the front-door)
How to migrate from any CMS (thru the front-door)How to migrate from any CMS (thru the front-door)
How to migrate from any CMS (thru the front-door)
 
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
 
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
 
Building Secure User Interfaces With JWTs (JSON Web Tokens)
Building Secure User Interfaces With JWTs (JSON Web Tokens)Building Secure User Interfaces With JWTs (JSON Web Tokens)
Building Secure User Interfaces With JWTs (JSON Web Tokens)
 
Testing mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkTesting mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP framework
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applications
 

Mehr von Blueinfy Solutions

Mobile Application Scan and Testing
Mobile Application Scan and TestingMobile Application Scan and Testing
Mobile Application Scan and TestingBlueinfy Solutions
 
Mobile security chess board - attacks & defense
Mobile security chess board - attacks & defenseMobile security chess board - attacks & defense
Mobile security chess board - attacks & defenseBlueinfy Solutions
 
Mobile code mining for discovery and exploits nullcongoa2013
Mobile code mining for discovery and exploits nullcongoa2013Mobile code mining for discovery and exploits nullcongoa2013
Mobile code mining for discovery and exploits nullcongoa2013Blueinfy Solutions
 
iOS Application Security Testing
iOS Application Security TestingiOS Application Security Testing
iOS Application Security TestingBlueinfy Solutions
 
Automation In Android & iOS Application Review
Automation In Android & iOS 	Application Review�Automation In Android & iOS 	Application Review�
Automation In Android & iOS Application ReviewBlueinfy Solutions
 
Web Services Hacking and Security
Web Services Hacking and SecurityWeb Services Hacking and Security
Web Services Hacking and SecurityBlueinfy Solutions
 
Source Code Analysis with SAST
Source Code Analysis with SASTSource Code Analysis with SAST
Source Code Analysis with SASTBlueinfy Solutions
 
XPATH, LDAP and Path Traversal Injection
XPATH, LDAP and Path Traversal InjectionXPATH, LDAP and Path Traversal Injection
XPATH, LDAP and Path Traversal InjectionBlueinfy Solutions
 
Applciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumerationApplciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumerationBlueinfy Solutions
 
Assessment methodology and approach
Assessment methodology and approachAssessment methodology and approach
Assessment methodology and approachBlueinfy Solutions
 
HTTP protocol and Streams Security
HTTP protocol and Streams SecurityHTTP protocol and Streams Security
HTTP protocol and Streams SecurityBlueinfy Solutions
 

Mehr von Blueinfy Solutions (20)

Mobile Application Scan and Testing
Mobile Application Scan and TestingMobile Application Scan and Testing
Mobile Application Scan and Testing
 
Mobile security chess board - attacks & defense
Mobile security chess board - attacks & defenseMobile security chess board - attacks & defense
Mobile security chess board - attacks & defense
 
Mobile code mining for discovery and exploits nullcongoa2013
Mobile code mining for discovery and exploits nullcongoa2013Mobile code mining for discovery and exploits nullcongoa2013
Mobile code mining for discovery and exploits nullcongoa2013
 
iOS Application Security Testing
iOS Application Security TestingiOS Application Security Testing
iOS Application Security Testing
 
Html5 on mobile
Html5 on mobileHtml5 on mobile
Html5 on mobile
 
Android secure coding
Android secure codingAndroid secure coding
Android secure coding
 
Android attacks
Android attacksAndroid attacks
Android attacks
 
Automation In Android & iOS Application Review
Automation In Android & iOS 	Application Review�Automation In Android & iOS 	Application Review�
Automation In Android & iOS Application Review
 
Web Services Hacking and Security
Web Services Hacking and SecurityWeb Services Hacking and Security
Web Services Hacking and Security
 
Source Code Analysis with SAST
Source Code Analysis with SASTSource Code Analysis with SAST
Source Code Analysis with SAST
 
HTML5 hacking
HTML5 hackingHTML5 hacking
HTML5 hacking
 
XSS - Attacks & Defense
XSS - Attacks & DefenseXSS - Attacks & Defense
XSS - Attacks & Defense
 
Defending against Injections
Defending against InjectionsDefending against Injections
Defending against Injections
 
XPATH, LDAP and Path Traversal Injection
XPATH, LDAP and Path Traversal InjectionXPATH, LDAP and Path Traversal Injection
XPATH, LDAP and Path Traversal Injection
 
Blind SQL Injection
Blind SQL InjectionBlind SQL Injection
Blind SQL Injection
 
Application fuzzing
Application fuzzingApplication fuzzing
Application fuzzing
 
SQL injection basics
SQL injection basicsSQL injection basics
SQL injection basics
 
Applciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumerationApplciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumeration
 
Assessment methodology and approach
Assessment methodology and approachAssessment methodology and approach
Assessment methodology and approach
 
HTTP protocol and Streams Security
HTTP protocol and Streams SecurityHTTP protocol and Streams Security
HTTP protocol and Streams Security
 

Kürzlich hochgeladen

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
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
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Kürzlich hochgeladen (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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...
 
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...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

CSRF, ClickJacking & Open Redirect

  • 1. CSRF  (Cross  Site  Request  Forgery)   ClickJacking  &  Open  Redirects  
  • 2. Cross  Site  Request  Forgery  (CSRF)   •  Generic  CSRF  is  with  GET  /  POST   •  Forcefully  sending  request  to  the  target  applicaEon   with  cookie  replay   •  Leveraging  tags  like   –  IMG –  SCRIPT –  IFRAME •  Not  abide  by  SOP  or  Cross  Domain  is  possible  
  • 3. Request  generaEon            IMG  SRC      <img  src="hOp://host/?command">        SCRIPT  SRC      <script  src="hOp://host/?command">        IFRAME  SRC      <iframe  src="hOp://host/?command">    
  • 4. Request  generaEon          'Image'  Object      <script>      var  foo  =  new  Image();      foo.src  =  "hOp://host/?command";      </script>       XHR  –  Cross  domain  difficult  
  • 5. Request  generaEon   •  It  is  possible  to  generate  POST  as  well   •  Form  can  be  build  dynamically  and  buOon   click  from  JavaScript  is  possible   <script  type="text/javascript"   language="JavaScript">              document.foo.submit();   </script>    
  • 6. Cross  Site  Request  Forgery  (CSRF)   •  What  is  different  with  Web  2.0   – Is it possible to do CSRF to XML stream – How? – It will be POST hitting the XML processing resources like Web Services – JSON CSRF is also possible – Interesting check to make against application and Web 2.0 resources
  • 7. One  Way  CSRF  Scenario  
  • 8. One  Way  CSRF  Scenario  
  • 9. One  Way  CSRF  Scenario  
  • 10. One  Way  CSRF  Scenario  
  • 12. One-­‐Way  CSRF   •  <html>   •  <body>   •  <FORM  NAME="buy"  ENCTYPE="text/plain"  acEon="hOp:// trade.example.com/xmlrpc/trade.rem"  METHOD="POST">   •               <input  type="hidden"  name='<?xml  version'  value='"1.0"? ><methodCall><methodName>stocks.buy</ methodName><params><param><value><string>MSFT</string></ value></param><param><value><double>26</double></value></ param></params></methodCall>'>   •  </FORM>   •  <script>document.buy.submit();</script>   •  </body>   •  </html>  
  • 13. Forcing  XML   •  Spligng  XML  stream  in  the  form.   •  Possible  through  XForms  as  well.   •  Similar  techniques  is  applicable  to  JSON  as   well.    
  • 14. Two-­‐Way  CSRF   •  One-­‐Way  –  Just  making  forceful  request.   •  Two-­‐Way   – Reading the data coming from the target – May be getting hold onto important information – profile, statements, numbers etc. – Is it possible with JSON/XML
  • 16. Two-­‐Way  CSRF   •  ApplicaEon  is  serving  various  streams  like  –   JSON,  JS-­‐Object,  Array  etc.    
  • 18. Two-­‐Way  CSRF   •  AOacker  page  can  make  cross  domain  request   using  SCRIPT  (firefox)   •  Following  code  can  overload  the  array  stream.        funcEon  Array()      {  var  obj  =  this;  var  index  =  0;  for(j=0;j<4;j++){  obj[index++]   seOer  =  spoof;  }  }  funcEon  spoof(x){  send(x.toString());  }    
  • 20. Two-­‐Way  CSRF   •  It  is  possible  to  overload  these  objects.   •  Reading  and  sending  to  cross  domain  possible.   •  Opens  up  two  way  channel  for  an  aOacker.   •  Web  2.0  streams  are  vulnerable  to  these   aOacks.  
  • 21. Countermeasure   •  Server  Side  Checks   –  Check for client’s content-type. –  XHR calls – xml/application. –  Native calls – text/html. –  Filtering is possible on it. •  Client  Side  Checks   –  Stream can be started and terminated by /* or any predefined characters. –  Client can remove them before injecting to DOM.
  • 23. DescripEon   • Clickjacking  is  a  popular  name  for  an  old  aOack   method  called  “UI  redressing”   • Though  a  case  of  “old  wine  in  a  new  boOle”,   given  the  current  development  in  Web   standards  (Web  2.0,  AJAX,  etc),  one  cannot   ignore  the  risks  posed  by  this  vulnerability   • The  basic  philosophy  of  this  aOack  is  to  fool   the  user  into  clicking  a  malicious  link  
  • 24. DescripEon   •  Clickjacking  involves  “hijacking”  the  user's   mouse  clicks   •  This  means,  the  user  thinks  (s)he's  clicking   on  something,  but  is  actually  not   •  The  user,  invariably  and  unknowingly   authorizes  certain  acEons  which  could  have   disasterous  consequences  or  could  be  as   harmless  as  being  redirected  to  a  games  site  
  • 25. AOack  Anatomy   •  There  are  3  popular  ways  in  which  aOackers   perpetrate  this  vulnerability   –  Using invisible elements such as iframes –  Injecting malicious javascript (or any other client side scripting language) –  Leveraging a bug in Adobe Flash Player (this method is now obsolete)
  • 26. AOack  Anatomy   •  An  aOacker  uses  the  concept  of  layering  to   crat  an  aOack   •  Basically,  the  page  that  the  user  views,  will   have  layers   •  Some  of  these  layers  will  be  transparent  (or   invisible)     •  The  user  will  never  know  of  the  invisible   layers  and  will  end  up  making  a  wrong   choice  
  • 27. AOack  Anatomy   •  Lets  first  understand  this  basic  mechanism   with  an  example  and  then  move  on  to  the   different  ways  of  perpetraEng  this  aOack  ....  
  • 28. AOack  Anatomy   Send email to all users ? Yes No Actual intented content ....
  • 29. AOack  Anatomy   Send email to all users ? Yes No Do you want a free iPad? No Intended content .... Malicious content for clickjacking
  • 30. AOack  Anatomy   Send email to all users ? Yes No Do you want a free iPad? No When the two are super imposed … (“Send email to all users?” Will not be visible, it is shown here for clarity)
  • 31. Unvalidated  Redirects  &   Forwards  
  • 32. DescripEon   •  Web  applicaEons  are  having  its  own  “flow”   •  Business  flow  needs  movement  between   pages  and  sites   •  ApplicaEon  uses  same  domain  or  cross   domain  redirects  and  forwards   •  It  allows  applicaEons  to  work  easily  and  access   same  domain  or  cross  domain  resources   (Single  Sign  On  –  leveraging)  
  • 33. DescripEon   •  HTTP  requests  can  be  GET  or  POST   •  Parameters  are  not  validated  and  can  lead  to   arbitrary  redirects   •  This  can  be  leveraged  at  ease  and  get   exploited  by  an  aOacker   •  AOacker  exploits  the  trust  and  leverage  the   vulnerability  
  • 34. AOack  Anatomy   •  As  a  part  of  root  cause,  there  must  be  a   redirect  hole   •  Example,   – http://foo.bank.com/login.aspx? user=xxx&page=trade.aspx •  Here  “page”  is  a  vulnerable  parameter   •  What  if?  Some  one  put  page=hOp:// yahoo.com  …  
  • 35. AOack  Anatomy   Attacker foo.bank.com http://foo.bank.com/login.aspx?user=xxx& page=http://yahoo.com Get redirect or JavaScript call for loading yahoo.com Vulnerability detected!!!
  • 36. AOack  Anatomy   •  What  is  redirect…   – If server sends 302 in its HTTP response – If server sends JavaScript with certain document object calls like “location” •  What  will  happen…   – It will send browser to new location – User will stay in impression that he/she is at trusted site but that is not the case
  • 37. AOack  Anatomy   Bank’s user foo.bank.com Login the page Login successful This is what in user’s mind… a.) URL – trusted, foo.bank.com b.) Login form - trusted
  • 38. AOack  Anatomy   •  User  is  doing  all  his  acEviEes   •  Full  trust  is  established  and  day  to  day  work  is   going  on   •  Now  aOacker’s  acEon  comes  in  …   •  AOacker  sends  a  mail  and  request  to  login  and   change  password  immediately  as  part  of   banking  policies   •   AOacker  acts  as  administrator  from  bank  
  • 39. AOack  Anatomy   •  Magic  is  in  the  link  and  trust  is  in  the  mind.   •  User  trust  the  URL  and  Link  both  consciously   and  subconsciously…   •  Following  link  will  be  sent.   http://foo.bank.com/login.aspx?user=xxx&date=12-12-2009&trust=good& page=http://203.88.xx.xx/security.html Link is injected User is going to trust this
  • 40. AOack  Anatomy   Click the link Get a redirect response to 203.88.XX.XX 1Link in mail
  • 41. AOack  Anatomy   Bank’s user foo.bank.com Click the link Get a redirect response to 203.88.XX.XX 203.88.XX.XX (Attacker’s area) Bank’s user Send dummy form Trusted evil redirect 2
  • 42. AOack  Anatomy   Bank’s user foo.bank.com Click the link Get a redirect response to 203.88.XX.XX 203.88.XX.XX (Attacker’s area) Bank’s user Send dummy form Bank’s user Send username and password Send dummy response (Thanks!) Trusted evil redirect 203.88.XX.XX (Attacker’s area) 3
  • 43. AOack  Anatomy   Bank’s user foo.bank.com Click the link Get a redirect response to 203.88.XX.XX 203.88.XX.XX (Attacker’s area) Bank’s user Send dummy form Bank’s user Send username and password Send dummy response (Thanks!) Trusted evil redirect 203.88.XX.XX (Attacker’s area) Logs in and do money transfer 4