zoukankan      html  css  js  c++  java
  • MSF进程迁移

    目的

    通过msf得到的会话容易被发现,导致后渗透失败。因此我们可以把shell的进程迁移绑定到目标机正常的进程中

    操作

    • 手动迁移
    • 自动迁移

    手动迁移:
    首先反弹一个shell,在meterpreter中执行ps命令查看目标机器的进程。x64_8080.exe是我用msf生成的payload,在目标机器的任务管理器中也可以看到该进程。

    我们可以使用migrate这个命令将进程迁移

    meterpreter > migrate
    Usage: migrate <<pid> | -P <pid> | -N <name>> [-t timeout]
    
    Migrates the server instance to another process.
    NOTE: Any open channels or other dynamic state will be lost.
    

    migrate的参数可以是pid也可以是进程的名称
    我们将进程迁移到explorer.exe(任务管理器)中可以执行
    migrate 2228或migrate -P 2228(pid根据实际情况而定)
    还可以执行migrate -N explorer.exe

    在执行ps命令,可以看到之前的x64_8080.exe的进程已经看不到了

    自动迁移:
    自动迁移指一反弹shell就自动执行进程迁移命令
    在配置监听器的时候可以设置

    set autorunscript migrate -N explorer.exe
    或
    set autorunscript -f
    

    第一个是指定迁移到哪个进程,第二个默认迁移到notepad(记事本)

  • 相关阅读:
    hdu 5101 Select
    hdu 5100 Chessboard
    cf B. I.O.U.
    cf C. Inna and Dima
    cf B. Inna and Nine
    cf C. Counting Kangaroos is Fun
    Radar Installation 贪心
    spfa模板
    Sequence
    棋盘问题
  • 原文地址:https://www.cnblogs.com/g0udan/p/12411937.html
Copyright © 2011-2022 走看看