資源簡介
本書定位于初學緩沖區溢出利用的讀者;并照顧想學習緩沖區溢出技術的朋友。
本書的目的是用幽默的語言和通俗的解釋,對Windows緩沖區溢出編程的思路和思維進行詳細分析;并用大量實例對溢出的實際利用進行一次又一次詳盡的講解。
本書沒有枯燥的、大段匯編代碼的解釋;沒有復雜的、Windows系統結構的定義,閱讀起來不會有混混欲睡的乏味感!
書里面,有的是活波生動的語言;有的是的美好純真的校園生活;有的是可遇不可求的經驗;有的是直截了當、圖文并茂的手把手操作;有的是引導讀者感受程序設計的藝術,并在緩沖區溢出的美妙世界中遨游;有的提示和建議是能引起讀者濃厚的興趣,能夠自覺下去再找相關的資料完善自己。
代碼片段和文件信息
#include?
#include?
#include?
#include?
#include?
#pragma?comment(lib“ws2_32“)
#include?
#define?MAX_NUM?2
#define?clear(p)?ZeroMemory(p?sizeof?(p)?);
//---------------------------------------------------------------------------
//??4bit?binary?to?char?0-F
char?Hex2Chr(?unsigned?char?n?)
{
n?&=?0xF;
????if?(?n?10?)
???? return?(?char?)(?n?+?‘0‘?);
????else
???? return?(?char?)(?n?-?10?+?‘A‘?);
}
//---------------------------------------------------------------------------
//??char?0-F?to?4bit?binary
unsigned?char?Chr2Hex(?char?c?)
{
if?(?c?>=?‘a‘?&&?c?<=?‘z‘?)??//??it‘s?toupper
???? c?=?c?-?‘a‘?+?‘A‘;
????if?(?c?>=?‘0‘?&&?c?<=?‘9‘?)
???? return?(?int?)(?c?-?‘0‘?);
????else?if?(?c?>=?‘A‘?&&?c?<=?‘F‘?)
???? return?(?int?)(?c?-?‘A‘?+?10?);
????else
???? return?-1;
}
//---------------------------------------------------------------------------
//??base64?code?table
//??0-63?:?A-Z(25)?a-z(51)?0-9(61)?+(62)?/(63)
char??base2Chr(?unsigned?char?n?)
{
n?&=?0x3F;
if?(?n?26?)
???? return?(?char?)(?n?+?‘A‘?);
????else?if?(?n?52?)
???? return?(?char?)(?n?-?26?+?‘a‘?);
????else?if?(?n?62?)
???? return?(?char?)(?n?-?52?+?‘0‘?);
????else?if?(?n?==?62?)
???? return?‘+‘;
????else
???? return?‘/‘;
}
//---------------------------------------------------------------------------
unsigned?char?Chr2base(?char?c?)
{
if?(?c?>=?‘A‘?&&?c?<=?‘Z‘?)
???? return?(?unsigned?char?)(?c?-?‘A‘?);
????else?if?(?c?>=?‘a‘?&&?c?<=?‘z‘?)
???? return?(?unsigned?char?)(?c?-?‘a‘?+?26?);
????else?if?(?c?>=?‘0‘?&&?c?<=?‘9‘?)
???? return?(?unsigned?char?)(?c?-?‘0‘?+?52?);
????else?if?(?c?==?‘+‘?)
???? return?62;
????else?if?(?c?==?‘/‘?)
???? return?63;
????else
????????return?64;??//??無效字符
}
//---------------------------------------------------------------------------
//??aLen?為?aSrc?的大小,?aDest?所指的緩沖區必須至少為?aLen?的?3?倍!!!
//??返回?aDest?的長度
int?QPEncode(?char?*?const?aDest?const?unsigned?char?*?aSrc?int?aLen?)
{
char?*?p?=?aDest;
????int????i?=?0;
????while?(?i++?????{
???? *p++?=?‘=‘;
????????*p++?=?Hex2Chr(?*aSrc?>>?4?);
????????*p++?=?Hex2Chr(?*aSrc++?);
????}
????*p?=?0;??//??aDest?is?an?ASCIIZ?string
return?(?p?-?aDest?);??//??exclude?the?end?of?zero
}
//---------------------------------------------------------------------------
//??aDest?所指的緩沖區必須至少為?aSrc?長度的?1/3?!!!
//??返回?aDest?的長度
int?QPDecode(?unsigned?char?*?const?aDest?const?char?*?aSrc?)
{
unsigned?char?*?p?=?aDest;
????int?????????????n?=?strlen(?aSrc?);
????unsigned?char???ch?cl;
????while?(?*aSrc?)??//??aSrc?is?an?ASCIIZ?string
????{
???? if?(?(?*aSrc?==?‘=‘?)?&&?(?n?-?2?>?0?)?)
????????{
???????? ch?=?Chr2Hex(?aSrc[1]?);
????????????cl?=?Chr2Hex(?aSrc[2]?);
????????????if?(?(?ch?==?(?unsigned?char?)-1?)?||?(?cl?==?(?unsigned?char?)-1?)?)
???????????? *p++?=?*aSrc++;
????????????else
????????????{
*p++?=?(?ch?<4?)?|?cl;
???? ?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????798??2008-08-04?18:51??Q版緩沖區溢出教程源代碼\chapter1\test\over.cpp
?????文件???????9898??2004-11-23?22:58??Q版緩沖區溢出教程源代碼\chapter1\printer\PrinterCallEbx.c
?????文件???????9894??2004-10-01?05:32??Q版緩沖區溢出教程源代碼\chapter1\printer\iis5hackByIsno.c
?????文件???????8131??2004-10-01?05:32??Q版緩沖區溢出教程源代碼\chapter1\printer\printer.c
?????文件???????4766??2004-10-01?05:32??Q版緩沖區溢出教程源代碼\chapter1\printer\printerJmpEbx.c
?????文件??????36864??2008-08-04?08:55??Q版緩沖區溢出教程源代碼\chapter1\JMPESP2JMPEBX\輕松將jmp?esp方式?改寫為jmp?ebx方式.doc
?????文件???????2228??2004-12-07?23:10??Q版緩沖區溢出教程源代碼\chapter1\IdaIdq\idaidq.c
?????文件??????10718??2004-12-07?20:42??Q版緩沖區溢出教程源代碼\chapter1\Foxmail\foxmail2.c
?????文件??????10718??2004-12-07?20:42??Q版緩沖區溢出教程源代碼\chapter1\Foxmail\foxmail3.c
?????文件??????10844??2004-12-07?20:42??Q版緩沖區溢出教程源代碼\chapter1\Foxmail\foxmail4.c
?????文件??????11203??2004-12-07?21:32??Q版緩沖區溢出教程源代碼\chapter1\Foxmail\foxmail5.c
?????文件??????10678??2008-07-31?16:27??Q版緩沖區溢出教程源代碼\chapter1\Foxmail\foxmail1.c
?????文件????????351??2008-08-04?17:22??Q版緩沖區溢出教程源代碼\chapter2\自動查找函數地址\GetAddr.cpp
?????文件???????1189??2004-12-07?23:28??Q版緩沖區溢出教程源代碼\chapter2\添加用戶ShellCode\AddUserASM.cpp
?????文件???????1109??2004-10-20?04:46??Q版緩沖區溢出教程源代碼\chapter2\添加用戶ShellCode\NetUserAddC.cpp
?????文件????????162??2009-09-11?16:33??Q版緩沖區溢出教程源代碼\chapter2\添加用戶ShellCode\AddUserC.c
?????文件????????108??2004-03-18?17:19??Q版緩沖區溢出教程源代碼\chapter2\開dos窗口ShellCode\cmd.cpp
?????文件????????867??2008-07-31?19:48??Q版緩沖區溢出教程源代碼\chapter2\開dos窗口ShellCode\cmdAsm1.cpp
?????文件????????520??2008-08-04?18:52??Q版緩沖區溢出教程源代碼\chapter2\開dos窗口ShellCode\cmdCode.cpp
?????文件????????979??2008-08-04?17:23??Q版緩沖區溢出教程源代碼\chapter2\開dos窗口ShellCode\cmdAsm2.cpp
?????文件????????347??2008-08-01?11:10??Q版緩沖區溢出教程源代碼\chapter2\開dos窗口ShellCode\cmdGetAddr.cpp
?????文件????????122??2004-11-30?05:37??Q版緩沖區溢出教程源代碼\chapter2\Windows對話框ShellCode\MessageBox.cpp
?????文件????????344??2004-12-07?23:25??Q版緩沖區溢出教程源代碼\chapter2\Windows對話框ShellCode\MessageCode.cpp
?????文件????????955??2009-09-25?15:49??Q版緩沖區溢出教程源代碼\chapter2\Windows對話框ShellCode\MessageASM.cpp
?????文件???????1066??2004-11-22?19:39??Q版緩沖區溢出教程源代碼\chapter3\零管道后門\pipe0C.cpp
?????文件???????1885??2004-11-09?06:23??Q版緩沖區溢出教程源代碼\chapter3\測試雙管道ShellCode\testBindCode1.cpp
?????文件???????1935??2004-11-09?06:15??Q版緩沖區溢出教程源代碼\chapter3\測試雙管道ShellCode\testBindCode2.cpp
?????文件???????1883??2004-11-07?18:24??Q版緩沖區溢出教程源代碼\chapter3\查找網絡函數地址\GetBindAddr.cpp
?????文件????????930??2004-11-08?07:10??Q版緩沖區溢出教程源代碼\chapter3\反向后門\backC.cpp
?????文件???????5047??2008-08-05?17:40??Q版緩沖區溢出教程源代碼\chapter3\雙管道后門\pipe2ASM.cpp
............此處省略130個文件信息
評論
共有 條評論