0x06-03 meterpreter 网络相关命令

2018-12-06  本文已影响0人  Gatociego

查看网络相关命令帮助文档

help net

Stdapi: Networking Commands
===========================

    Command       Description
    -------       -----------
    arp           Display the host ARP cache
    getproxy      Display the current proxy configuration
    ifconfig      Display interfaces
    ipconfig      Display interfaces
    netstat       Display the network connections
    portfwd       Forward a local port to a remote service
    resolve       Resolve a set of host names on the target
    route         View and modify the routing table

查看arp缓存

arp

meterpreter > arp

ARP cache
=========

    IP address      MAC address        Interface
    ----------      -----------        ---------
    192.168.10.102  00:0c:29:c1:bf:63
    192.168.10.103  8c:85:90:43:e9:bf
    192.168.10.128  00:0c:29:f7:89:a7

查看目标机的代理配置

getproxy

meterpreter > getproxy
Auto-detect     : No
Auto config URL :
Proxy URL       :
Proxy Bypass    :

查看网络接口

ifconfig

Interface  2
============
Name         : eth0
Hardware MAC : 00:0c:29:7f:de:bf
MTU          : 1500
Flags        : UP,BROADCAST,MULTICAST
IPv4 Address : 10.10.10.254
IPv4 Netmask : 255.255.255.0
IPv6 Address : fe80::20c:29ff:fe7f:debf
IPv6 Netmask : ffff:ffff:ffff:ffff::


Interface  3
============
Name         : eth1
Hardware MAC : 00:0c:29:7f:de:c9
MTU          : 1500
Flags        : UP,BROADCAST,MULTICAST
IPv4 Address : 192.168.10.254
IPv4 Netmask : 255.255.255.0
IPv6 Address : fe80::20c:29ff:fe7f:dec9
IPv6 Netmask : ffff:ffff:ffff:ffff::

查看网络连接信息

netstat

meterpreter > netstat

Connection list
===============

    Proto  Local address         Remote address       State        User  Inode  PID/Program name
    -----  -------------         --------------       -----        ----  -----  ----------------
    tcp    0.0.0.0:8009          0.0.0.0:*            LISTEN       110   0
    tcp    0.0.0.0:3306          0.0.0.0:*            LISTEN       109   0
    tcp    0.0.0.0:139           0.0.0.0:*            LISTEN       0     0
    tcp    0.0.0.0:80            0.0.0.0:*            LISTEN       0     0
    tcp    0.0.0.0:8180          0.0.0.0:*            LISTEN       110   0
    tcp    192.168.10.254:53     0.0.0.0:*            LISTEN       105   0
    tcp    10.10.10.254:53       0.0.0.0:*            LISTEN       105   0
    tcp    127.0.0.1:53          0.0.0.0:*            LISTEN       105   0
    tcp    0.0.0.0:23            0.0.0.0:*            LISTEN       0     0
    tcp    0.0.0.0:5432          0.0.0.0:*            LISTEN       108   0
    tcp    0.0.0.0:25            0.0.0.0:*            LISTEN       0     0
    tcp    127.0.0.1:953         0.0.0.0:*            LISTEN       105   0
    tcp    0.0.0.0:445           0.0.0.0:*            LISTEN       0     0
    tcp    192.168.10.254:54429  192.168.10.102:4444  ESTABLISHED  0     0
    tcp    192.168.10.254:51475  192.168.10.115:4444  ESTABLISHED  0     0
    tcp    192.168.10.254:54428  192.168.10.102:4444  ESTABLISHED  0     0
    tcp    192.168.10.254:35631  192.168.10.102:4433  ESTABLISHED  0     0
    tcp    192.168.10.254:56846  192.168.10.102:4444  ESTABLISHED  0     0
    tcp    192.168.10.254:51204  192.168.10.115:4433  ESTABLISHED  0     0
    tcp    192.168.10.254:59802  192.168.10.103:4444  ESTABLISHED  0     0
    tcp    192.168.10.254:56845  192.168.10.102:4444  ESTABLISHED  0     0
    tcp    192.168.10.254:39782  192.168.10.103:4433  ESTABLISHED  0     0

查看路由信息

route

meterpreter > route

IPv4 network routes
===================

    Subnet        Netmask        Gateway  Metric  Interface
    ------        -------        -------  ------  ---------
    10.10.10.0    255.255.255.0  0.0.0.0  0       eth0
    192.168.10.0  255.255.255.0  0.0.0.0  0       eth1

端口转发

portfwd -a -L 66.66.66.65 -l 444 -h 66.66.66.66 -p 3389

-a 添加一条端口转发规则
在目标机A 66.66.66.65上监听444端口,将流量转发到目标机B 66.66.66.66端口上
上一篇下一篇

猜你喜欢

热点阅读