SlideShare una empresa de Scribd logo
1 de 5
Descargar para leer sin conexión
1 PoC of XSS Patch ,-by ABK [http://www.twitter.com/abionic]


                                            WHITEPAPER

                                      XSS Defeating
      A Trick to Subvert XSS in JavaScript enabled Browsers
         Without Removing or Validating Any User Input
                                                                By, ABK [AbhishekKr]
                                                          abhikumar163 @ gmail.com
                                                      http://www.twitter.com/abionic
   Objective: “Let Security Be Served By Web Server", don't push it on Web Developer.


   Background Information:
   Here, I’m suggesting a method using which Web Developer wouldn’t have to worry of user
   input validation to prevent XSS Attack; and User wouldn’t have to block javascript on its
   browsers… as this will subvert all the <SCRIPT/> not introduced by Web Developer.

   I’ll be using my Web Server just to show my PoC, as I’ve already implemented the required
   module in my Web Server.

   I’ve been working on a Web Server ‘ABK (secure) SiteHoster’ hosted at
   This project is hosted at: http://sourceforge.net/projects/sitehoster
   XSS-Patch support is only present in Latest Release:
   https://sourceforge.net/downloads/sitehoster/v1.0beta%20RC1/
   How To Use PoC:
   I have provided ‘ABK (S)SH - XSS Patch PoC.zip’ file at above location which have a
   ‘StartDemo.bat’ file, so you extract this ZIP file to a folder and run this Batch file to start
   the PoC Demo {to run it on linux, give the ‘java –jar …..’ command in Batch file on shell
   with Web-Root Path in place of %currDir% and POSIX in place of WIN32}.
   Then you can browse ‘http://localhost/tweet.htm’; their enter any <SCRIPT/> you want to
   test and ‘submit’ it. The clicking button ‘Read TweeTexT…’ will load your <SCRIPT/> to
   Page.
   You can even check for the SCRIPT saved in ‘tweet.csv’ file saved at Web-Root.
   I have also uploaded PoC Video Demo:
   >> as ‘ABK_XSSPatch_PoC_Video’ on SourceForge, it is 7-zipped to 1.x mb download
   >> it is can also be viewed at: http://www.youtube.com/watch?v=ENiiAccY1v0

   With an aim of "Let Web Security Be Served By Web Server", don't make it a
   headache of Web Developer.
   I'm a security enthusiast and developer who is trying to build a Web Server secured from
   ground level up.
2 PoC of XSS Patch ,-by ABK [http://www.twitter.com/abionic]


   To start with enabling server with the facilities to subvert any kind of XSS attacks. For, this
   I’ve implemented a trick I discovered last year for implementing security in one of my
   college project. I was just waiting for a proper PoC and more testing on my part, which took
   somewhat longer time due to lack of managed time.




   Concept:
   Browser uses ‘JavaScript Blockers’ but those services even block the legitimate <SCRIPT/>
   to run.

   So, here I’ve a way using which all the illegitimate <SCRIPT/> can be made inactive
   automatically without use of any Blocker/Filter/Validation. So, Web Developer and Web
   Browser don’t require any kind of Blocking/Filtering/Validation to implement this solution.
   Since Blocking avoids execution of legitimate code also. Filtering and Validation may
   sometimes not work due to advanced obfuscation of <SCRIPT/> injected.

   Any attacker succeeding in injecting a <SCRIPT/> portion in your Web Content can launch
   an XSS Attack.

   But, no matter what kind of <SCRIPT/> is injected, that will get loaded as part of <BODY/>
   tag.

   So, using this method will allow activity of all <SCRIPT/> in <HEAD/> tag.

   Along with that, it would make inactive all the <SCRIPT/> injected (sync/async both
   modes) in <BODY/> tag.
   It doesn’t require any new feature to be implemented for this, but simply uses a Bug
   (facility for us) of Browsers to implement this.
3 PoC of XSS Patch ,-by ABK [http://www.twitter.com/abionic]


   Working Mechanism:
   Suppose, Web-App has a page with code:




                                          <html>
                                          <head>
      <script> function h(){alert(“this is web-dev script in HEAD Tag”);}</script>
                                         </head>
        <body>name:<div id=”fromDB” onclick=”h();”>~=ABK=~</div></body>
                                         </html>

   Now, if any attacker visiting this web-application have provided data containing ‘any
   <SCRIPT/>’ to be inserted in this page.

   Even then, implementing this solution web-developer needs to validate no XSS attacks
   (remember our aim is leave it to Web Server).

   So, suppose there was a <SCRIPT/> provided by attacker, which got saved in your DB and
   will be retrieved back to <DIV id=’fromDB’/> present in <BODY/> tag. So, it would look like
   something…




                                             <html>
                                            <head>
         <script>function h(){alert(“this is web-dev script in HEAD Tag”);}</script>
                                            </head>
                                        <body>name:
                              <div id=”fromDB” onclick=”h();”>
              <script>alert(‘attacker injected it, could do anything’);</script>
                                             </div>
                                            </body>
                                            </html>
4 PoC of XSS Patch ,-by ABK [http://www.twitter.com/abionic]


   Wait, this is not the end 

   But, this is just the Web-Page generated at server-side and handled to our Web-Server…
   now our Web-Server has a module to transform it into something like this…




                                            <html>
                                            <head>
        <script> function h(){alert(“this is web-dev script in HEAD Tag”);}</script>
                                           </head>
                                             <BD>
                                           <BODY >
                               <script type='text/javascript'>
                      x=document.getElementsByTagName("BODY");
                     x[0].innerHTML = "name:<div id="fromDB"
            onclick="h();"><script>alert('attacker injected it, could do
                             anything');</script></div>"
                                           </script>
                                           </BODY>
                                             </BD>
                                           </html>




   then, the attackers <SCRIPT/> (which is still present there) would not execute at all.
5 PoC of XSS Patch ,-by ABK [http://www.twitter.com/abionic]


   As below, we can see the modified HTTP Response sent for a normal generated MarkUp
   Page




   Although, this can also be implemented at Web-Developer side using Server-Side Scripts
   and took benefit of until their Web-Server don’t apply such MODs or ‘ABK (secure)
   SiteHoster’ is mature enough to suit all their requirements.

   Now, here even if any <SCRIPT/> is fetched asynchronously and injected in <BODY/>
   part… even that would remain inactive inside the already formed container.


   PATCH#2
   This disabling <BODY/> inline <SCRIPT/> was noticed failing in cases, user gives
   input like <image src=”a.gif” onclick=”javascript:maliciousFunctions(args);”/>

   So, here I just used another bug; in all such cases which would not effect in
   content display of Page, but just disable these attempts.

   It simple replaces all body ‘javascript’ data with ‘javascript<span/>’ and gets
   lucky.




   CONCLUSION
   Currently, my server is not mature enough to serve all kind of Web Applications… but this
   approach is not just server-dependent.

   So, contributors for other Servers could write a module for other servers manipulating the
   Final Web-Page data sent to User in above required manner.

   And until then, Web-Developers can themselves introduce a module in their Web-Application
   to handle all requests and response… thus just a single point would be able to serve the
   purpose.

   You can mail me at above e-mail ID if you face any issue in implementing the method, or
   think it is flawed in any way.

Más contenido relacionado

La actualidad más candente

Spring Boot & WebSocket
Spring Boot & WebSocketSpring Boot & WebSocket
Spring Boot & WebSocketMing-Ying Wu
 
Webpack packing it all
Webpack packing it allWebpack packing it all
Webpack packing it allCriciúma Dev
 
The Complementarity of React and Web Components
The Complementarity of React and Web ComponentsThe Complementarity of React and Web Components
The Complementarity of React and Web ComponentsAndrew Rota
 
Enough with the JavaScript already!
Enough with the JavaScript already!Enough with the JavaScript already!
Enough with the JavaScript already!Nicholas Zakas
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Max Andersen
 
Hitchhiker's guide to the front end development
Hitchhiker's guide to the front end developmentHitchhiker's guide to the front end development
Hitchhiker's guide to the front end development정윤 김
 
Service Worker 201 (en)
Service Worker 201 (en)Service Worker 201 (en)
Service Worker 201 (en)Chang W. Doh
 
High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010Nicholas Zakas
 
Node.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseNode.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseAaron Silverman
 
Chrome enchanted 2015
Chrome enchanted 2015Chrome enchanted 2015
Chrome enchanted 2015Chang W. Doh
 
Building and deploying React applications
Building and deploying React applicationsBuilding and deploying React applications
Building and deploying React applicationsAstrails
 
20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testingVladimir Roudakov
 
Panmind at Ruby Social Club Milano
Panmind at Ruby Social Club MilanoPanmind at Ruby Social Club Milano
Panmind at Ruby Social Club MilanoPanmind
 
Clojure Web Development
Clojure Web DevelopmentClojure Web Development
Clojure Web DevelopmentHong Jiang
 
Vue 淺談前端建置工具
Vue 淺談前端建置工具Vue 淺談前端建置工具
Vue 淺談前端建置工具andyyou
 
Play Framework workshop: full stack java web app
Play Framework workshop: full stack java web appPlay Framework workshop: full stack java web app
Play Framework workshop: full stack java web appAndrew Skiba
 
Building a js widget
Building a js widgetBuilding a js widget
Building a js widgetTudor Barbu
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSShekhar Gulati
 
Serverless 프레임워크로 Nuxt 앱 배포하기
Serverless 프레임워크로 Nuxt 앱 배포하기Serverless 프레임워크로 Nuxt 앱 배포하기
Serverless 프레임워크로 Nuxt 앱 배포하기Changwan Jun
 

La actualidad más candente (20)

Spring Boot & WebSocket
Spring Boot & WebSocketSpring Boot & WebSocket
Spring Boot & WebSocket
 
Nodejs.meetup
Nodejs.meetupNodejs.meetup
Nodejs.meetup
 
Webpack packing it all
Webpack packing it allWebpack packing it all
Webpack packing it all
 
The Complementarity of React and Web Components
The Complementarity of React and Web ComponentsThe Complementarity of React and Web Components
The Complementarity of React and Web Components
 
Enough with the JavaScript already!
Enough with the JavaScript already!Enough with the JavaScript already!
Enough with the JavaScript already!
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
 
Hitchhiker's guide to the front end development
Hitchhiker's guide to the front end developmentHitchhiker's guide to the front end development
Hitchhiker's guide to the front end development
 
Service Worker 201 (en)
Service Worker 201 (en)Service Worker 201 (en)
Service Worker 201 (en)
 
High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010
 
Node.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseNode.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash Course
 
Chrome enchanted 2015
Chrome enchanted 2015Chrome enchanted 2015
Chrome enchanted 2015
 
Building and deploying React applications
Building and deploying React applicationsBuilding and deploying React applications
Building and deploying React applications
 
20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing
 
Panmind at Ruby Social Club Milano
Panmind at Ruby Social Club MilanoPanmind at Ruby Social Club Milano
Panmind at Ruby Social Club Milano
 
Clojure Web Development
Clojure Web DevelopmentClojure Web Development
Clojure Web Development
 
Vue 淺談前端建置工具
Vue 淺談前端建置工具Vue 淺談前端建置工具
Vue 淺談前端建置工具
 
Play Framework workshop: full stack java web app
Play Framework workshop: full stack java web appPlay Framework workshop: full stack java web app
Play Framework workshop: full stack java web app
 
Building a js widget
Building a js widgetBuilding a js widget
Building a js widget
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJS
 
Serverless 프레임워크로 Nuxt 앱 배포하기
Serverless 프레임워크로 Nuxt 앱 배포하기Serverless 프레임워크로 Nuxt 앱 배포하기
Serverless 프레임워크로 Nuxt 앱 배포하기
 

Similar a XSS Defeating Trick ~=ABK=~ WhitePaper

Jboss Exploit
Jboss ExploitJboss Exploit
Jboss Exploitdrkimsky
 
[psuweb] Adaptive Images in Responsive Web Design
[psuweb] Adaptive Images in Responsive Web Design[psuweb] Adaptive Images in Responsive Web Design
[psuweb] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web AppsFITC
 
XSS Defeating Concept - Part 2
XSS Defeating Concept - Part 2XSS Defeating Concept - Part 2
XSS Defeating Concept - Part 2Abhishek Kumar
 
JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)Steve Souders
 
JavaScript Perfomance
JavaScript PerfomanceJavaScript Perfomance
JavaScript PerfomanceAnatol Alizar
 
"Your script just killed my site" by Steve Souders
"Your script just killed my site" by Steve Souders"Your script just killed my site" by Steve Souders
"Your script just killed my site" by Steve SoudersDmitry Makarchuk
 
Packing it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to nowPacking it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to nowDerek Willian Stavis
 
[drupalcampatx] Adaptive Images in Responsive Web Design
[drupalcampatx] Adaptive Images in Responsive Web Design[drupalcampatx] Adaptive Images in Responsive Web Design
[drupalcampatx] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[HEWEBFL] Adaptive Images in Responsive Web Design
[HEWEBFL] Adaptive Images in Responsive Web Design[HEWEBFL] Adaptive Images in Responsive Web Design
[HEWEBFL] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web Design[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...tdc-globalcode
 
[wcatx] Adaptive Images in Responsive Web Design
[wcatx] Adaptive Images in Responsive Web Design[wcatx] Adaptive Images in Responsive Web Design
[wcatx] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
W3 conf hill-html5-security-realities
W3 conf hill-html5-security-realitiesW3 conf hill-html5-security-realities
W3 conf hill-html5-security-realitiesBrad Hill
 
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
Building Performance - ein Frontend-Build-Prozess für Java mit MavenBuilding Performance - ein Frontend-Build-Prozess für Java mit Maven
Building Performance - ein Frontend-Build-Prozess für Java mit MavenOliver Ochs
 
JavaScript - Chapter 3 - Introduction
 JavaScript - Chapter 3 - Introduction JavaScript - Chapter 3 - Introduction
JavaScript - Chapter 3 - IntroductionWebStackAcademy
 
[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web Design[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web DesignChristopher Schmitt
 

Similar a XSS Defeating Trick ~=ABK=~ WhitePaper (20)

Jboss Exploit
Jboss ExploitJboss Exploit
Jboss Exploit
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
 
[psuweb] Adaptive Images in Responsive Web Design
[psuweb] Adaptive Images in Responsive Web Design[psuweb] Adaptive Images in Responsive Web Design
[psuweb] Adaptive Images in Responsive Web Design
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
XSS Defeating Concept - Part 2
XSS Defeating Concept - Part 2XSS Defeating Concept - Part 2
XSS Defeating Concept - Part 2
 
JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)
 
JavaScript Perfomance
JavaScript PerfomanceJavaScript Perfomance
JavaScript Perfomance
 
"Your script just killed my site" by Steve Souders
"Your script just killed my site" by Steve Souders"Your script just killed my site" by Steve Souders
"Your script just killed my site" by Steve Souders
 
Packing it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to nowPacking it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to now
 
[drupalcampatx] Adaptive Images in Responsive Web Design
[drupalcampatx] Adaptive Images in Responsive Web Design[drupalcampatx] Adaptive Images in Responsive Web Design
[drupalcampatx] Adaptive Images in Responsive Web Design
 
[HEWEBFL] Adaptive Images in Responsive Web Design
[HEWEBFL] Adaptive Images in Responsive Web Design[HEWEBFL] Adaptive Images in Responsive Web Design
[HEWEBFL] Adaptive Images in Responsive Web Design
 
[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web Design[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web Design
 
[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
 
Webpack
Webpack Webpack
Webpack
 
[wcatx] Adaptive Images in Responsive Web Design
[wcatx] Adaptive Images in Responsive Web Design[wcatx] Adaptive Images in Responsive Web Design
[wcatx] Adaptive Images in Responsive Web Design
 
W3 conf hill-html5-security-realities
W3 conf hill-html5-security-realitiesW3 conf hill-html5-security-realities
W3 conf hill-html5-security-realities
 
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
Building Performance - ein Frontend-Build-Prozess für Java mit MavenBuilding Performance - ein Frontend-Build-Prozess für Java mit Maven
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
 
JavaScript - Chapter 3 - Introduction
 JavaScript - Chapter 3 - Introduction JavaScript - Chapter 3 - Introduction
JavaScript - Chapter 3 - Introduction
 
[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web Design[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web Design
 

Más de Abhishek Kumar

Insecurity-In-Security version.2 (2011)
Insecurity-In-Security version.2 (2011)Insecurity-In-Security version.2 (2011)
Insecurity-In-Security version.2 (2011)Abhishek Kumar
 
Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Abhishek Kumar
 
xml-motor ~ What,Why,How
xml-motor ~ What,Why,Howxml-motor ~ What,Why,How
xml-motor ~ What,Why,HowAbhishek Kumar
 
Syslog Centralization Logging with Windows ~ A techXpress Guide
Syslog Centralization Logging with Windows ~ A techXpress GuideSyslog Centralization Logging with Windows ~ A techXpress Guide
Syslog Centralization Logging with Windows ~ A techXpress GuideAbhishek Kumar
 
Squid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
Squid for Load-Balancing & Cache-Proxy ~ A techXpress GuideSquid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
Squid for Load-Balancing & Cache-Proxy ~ A techXpress GuideAbhishek Kumar
 
Ethernet Bonding for Multiple NICs on Linux ~ A techXpress Guide
Ethernet Bonding for Multiple NICs on Linux ~ A techXpress GuideEthernet Bonding for Multiple NICs on Linux ~ A techXpress Guide
Ethernet Bonding for Multiple NICs on Linux ~ A techXpress GuideAbhishek Kumar
 
Solaris Zones (native & lxbranded) ~ A techXpress Guide
Solaris Zones (native & lxbranded) ~ A techXpress GuideSolaris Zones (native & lxbranded) ~ A techXpress Guide
Solaris Zones (native & lxbranded) ~ A techXpress GuideAbhishek Kumar
 
An Express Guide ~ "dummynet" for tweaking network latencies & bandwidth
An Express Guide ~ "dummynet" for tweaking network latencies & bandwidthAn Express Guide ~ "dummynet" for tweaking network latencies & bandwidth
An Express Guide ~ "dummynet" for tweaking network latencies & bandwidthAbhishek Kumar
 
An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring Abhishek Kumar
 
An Express Guide ~ Cacti for IT Infrastructure Monitoring & Graphing
An Express Guide ~ Cacti for IT Infrastructure Monitoring & GraphingAn Express Guide ~ Cacti for IT Infrastructure Monitoring & Graphing
An Express Guide ~ Cacti for IT Infrastructure Monitoring & GraphingAbhishek Kumar
 
An Express Guide ~ SNMP for Secure Rremote Resource Monitoring
An Express Guide ~ SNMP for Secure Rremote Resource MonitoringAn Express Guide ~ SNMP for Secure Rremote Resource Monitoring
An Express Guide ~ SNMP for Secure Rremote Resource MonitoringAbhishek Kumar
 
Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'
Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'
Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'Abhishek Kumar
 
FreeSWITCH on RedHat, Fedora, CentOS
FreeSWITCH on RedHat, Fedora, CentOSFreeSWITCH on RedHat, Fedora, CentOS
FreeSWITCH on RedHat, Fedora, CentOSAbhishek Kumar
 

Más de Abhishek Kumar (16)

Insecurity-In-Security version.2 (2011)
Insecurity-In-Security version.2 (2011)Insecurity-In-Security version.2 (2011)
Insecurity-In-Security version.2 (2011)
 
Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)
 
DevOps?!@
DevOps?!@DevOps?!@
DevOps?!@
 
xml-motor ~ What,Why,How
xml-motor ~ What,Why,Howxml-motor ~ What,Why,How
xml-motor ~ What,Why,How
 
XML-Motor
XML-MotorXML-Motor
XML-Motor
 
DevOps with Sec-ops
DevOps with Sec-opsDevOps with Sec-ops
DevOps with Sec-ops
 
Syslog Centralization Logging with Windows ~ A techXpress Guide
Syslog Centralization Logging with Windows ~ A techXpress GuideSyslog Centralization Logging with Windows ~ A techXpress Guide
Syslog Centralization Logging with Windows ~ A techXpress Guide
 
Squid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
Squid for Load-Balancing & Cache-Proxy ~ A techXpress GuideSquid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
Squid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
 
Ethernet Bonding for Multiple NICs on Linux ~ A techXpress Guide
Ethernet Bonding for Multiple NICs on Linux ~ A techXpress GuideEthernet Bonding for Multiple NICs on Linux ~ A techXpress Guide
Ethernet Bonding for Multiple NICs on Linux ~ A techXpress Guide
 
Solaris Zones (native & lxbranded) ~ A techXpress Guide
Solaris Zones (native & lxbranded) ~ A techXpress GuideSolaris Zones (native & lxbranded) ~ A techXpress Guide
Solaris Zones (native & lxbranded) ~ A techXpress Guide
 
An Express Guide ~ "dummynet" for tweaking network latencies & bandwidth
An Express Guide ~ "dummynet" for tweaking network latencies & bandwidthAn Express Guide ~ "dummynet" for tweaking network latencies & bandwidth
An Express Guide ~ "dummynet" for tweaking network latencies & bandwidth
 
An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring
 
An Express Guide ~ Cacti for IT Infrastructure Monitoring & Graphing
An Express Guide ~ Cacti for IT Infrastructure Monitoring & GraphingAn Express Guide ~ Cacti for IT Infrastructure Monitoring & Graphing
An Express Guide ~ Cacti for IT Infrastructure Monitoring & Graphing
 
An Express Guide ~ SNMP for Secure Rremote Resource Monitoring
An Express Guide ~ SNMP for Secure Rremote Resource MonitoringAn Express Guide ~ SNMP for Secure Rremote Resource Monitoring
An Express Guide ~ SNMP for Secure Rremote Resource Monitoring
 
Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'
Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'
Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'
 
FreeSWITCH on RedHat, Fedora, CentOS
FreeSWITCH on RedHat, Fedora, CentOSFreeSWITCH on RedHat, Fedora, CentOS
FreeSWITCH on RedHat, Fedora, CentOS
 

Último

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Último (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

XSS Defeating Trick ~=ABK=~ WhitePaper

  • 1. 1 PoC of XSS Patch ,-by ABK [http://www.twitter.com/abionic] WHITEPAPER XSS Defeating A Trick to Subvert XSS in JavaScript enabled Browsers Without Removing or Validating Any User Input By, ABK [AbhishekKr] abhikumar163 @ gmail.com http://www.twitter.com/abionic Objective: “Let Security Be Served By Web Server", don't push it on Web Developer. Background Information: Here, I’m suggesting a method using which Web Developer wouldn’t have to worry of user input validation to prevent XSS Attack; and User wouldn’t have to block javascript on its browsers… as this will subvert all the <SCRIPT/> not introduced by Web Developer. I’ll be using my Web Server just to show my PoC, as I’ve already implemented the required module in my Web Server. I’ve been working on a Web Server ‘ABK (secure) SiteHoster’ hosted at This project is hosted at: http://sourceforge.net/projects/sitehoster XSS-Patch support is only present in Latest Release: https://sourceforge.net/downloads/sitehoster/v1.0beta%20RC1/ How To Use PoC: I have provided ‘ABK (S)SH - XSS Patch PoC.zip’ file at above location which have a ‘StartDemo.bat’ file, so you extract this ZIP file to a folder and run this Batch file to start the PoC Demo {to run it on linux, give the ‘java –jar …..’ command in Batch file on shell with Web-Root Path in place of %currDir% and POSIX in place of WIN32}. Then you can browse ‘http://localhost/tweet.htm’; their enter any <SCRIPT/> you want to test and ‘submit’ it. The clicking button ‘Read TweeTexT…’ will load your <SCRIPT/> to Page. You can even check for the SCRIPT saved in ‘tweet.csv’ file saved at Web-Root. I have also uploaded PoC Video Demo: >> as ‘ABK_XSSPatch_PoC_Video’ on SourceForge, it is 7-zipped to 1.x mb download >> it is can also be viewed at: http://www.youtube.com/watch?v=ENiiAccY1v0 With an aim of "Let Web Security Be Served By Web Server", don't make it a headache of Web Developer. I'm a security enthusiast and developer who is trying to build a Web Server secured from ground level up.
  • 2. 2 PoC of XSS Patch ,-by ABK [http://www.twitter.com/abionic] To start with enabling server with the facilities to subvert any kind of XSS attacks. For, this I’ve implemented a trick I discovered last year for implementing security in one of my college project. I was just waiting for a proper PoC and more testing on my part, which took somewhat longer time due to lack of managed time. Concept: Browser uses ‘JavaScript Blockers’ but those services even block the legitimate <SCRIPT/> to run. So, here I’ve a way using which all the illegitimate <SCRIPT/> can be made inactive automatically without use of any Blocker/Filter/Validation. So, Web Developer and Web Browser don’t require any kind of Blocking/Filtering/Validation to implement this solution. Since Blocking avoids execution of legitimate code also. Filtering and Validation may sometimes not work due to advanced obfuscation of <SCRIPT/> injected. Any attacker succeeding in injecting a <SCRIPT/> portion in your Web Content can launch an XSS Attack. But, no matter what kind of <SCRIPT/> is injected, that will get loaded as part of <BODY/> tag. So, using this method will allow activity of all <SCRIPT/> in <HEAD/> tag. Along with that, it would make inactive all the <SCRIPT/> injected (sync/async both modes) in <BODY/> tag. It doesn’t require any new feature to be implemented for this, but simply uses a Bug (facility for us) of Browsers to implement this.
  • 3. 3 PoC of XSS Patch ,-by ABK [http://www.twitter.com/abionic] Working Mechanism: Suppose, Web-App has a page with code: <html> <head> <script> function h(){alert(“this is web-dev script in HEAD Tag”);}</script> </head> <body>name:<div id=”fromDB” onclick=”h();”>~=ABK=~</div></body> </html> Now, if any attacker visiting this web-application have provided data containing ‘any <SCRIPT/>’ to be inserted in this page. Even then, implementing this solution web-developer needs to validate no XSS attacks (remember our aim is leave it to Web Server). So, suppose there was a <SCRIPT/> provided by attacker, which got saved in your DB and will be retrieved back to <DIV id=’fromDB’/> present in <BODY/> tag. So, it would look like something… <html> <head> <script>function h(){alert(“this is web-dev script in HEAD Tag”);}</script> </head> <body>name: <div id=”fromDB” onclick=”h();”> <script>alert(‘attacker injected it, could do anything’);</script> </div> </body> </html>
  • 4. 4 PoC of XSS Patch ,-by ABK [http://www.twitter.com/abionic] Wait, this is not the end  But, this is just the Web-Page generated at server-side and handled to our Web-Server… now our Web-Server has a module to transform it into something like this… <html> <head> <script> function h(){alert(“this is web-dev script in HEAD Tag”);}</script> </head> <BD> <BODY > <script type='text/javascript'> x=document.getElementsByTagName("BODY"); x[0].innerHTML = "name:<div id="fromDB" onclick="h();"><script>alert('attacker injected it, could do anything');</script></div>" </script> </BODY> </BD> </html> then, the attackers <SCRIPT/> (which is still present there) would not execute at all.
  • 5. 5 PoC of XSS Patch ,-by ABK [http://www.twitter.com/abionic] As below, we can see the modified HTTP Response sent for a normal generated MarkUp Page Although, this can also be implemented at Web-Developer side using Server-Side Scripts and took benefit of until their Web-Server don’t apply such MODs or ‘ABK (secure) SiteHoster’ is mature enough to suit all their requirements. Now, here even if any <SCRIPT/> is fetched asynchronously and injected in <BODY/> part… even that would remain inactive inside the already formed container. PATCH#2 This disabling <BODY/> inline <SCRIPT/> was noticed failing in cases, user gives input like <image src=”a.gif” onclick=”javascript:maliciousFunctions(args);”/> So, here I just used another bug; in all such cases which would not effect in content display of Page, but just disable these attempts. It simple replaces all body ‘javascript’ data with ‘javascript<span/>’ and gets lucky. CONCLUSION Currently, my server is not mature enough to serve all kind of Web Applications… but this approach is not just server-dependent. So, contributors for other Servers could write a module for other servers manipulating the Final Web-Page data sent to User in above required manner. And until then, Web-Developers can themselves introduce a module in their Web-Application to handle all requests and response… thus just a single point would be able to serve the purpose. You can mail me at above e-mail ID if you face any issue in implementing the method, or think it is flawed in any way.