Just recently diablo 3 was announced and I’m quite excited. I once spent a stupidly long period of time playing this game without sleep so a sequel is just the thing my sleeping patterns need. So tonight I’ve got beer, a copy of diablo 2 and nothing but time, bring on it owwwnnnn
Diablo 3
4 07 2008Comments : Leave a Comment »
Tags: beer, diablo 3, lanning, nachos, no sleep
Categories : General
Stuck behind a firewall?
2 07 2008If you’re like me you’re probably stuck behind a really strict firewall at work that virtually disallows anything. SSH doesnt work (hell FTP doesn’t even work). I’m currently testing to see if I can get Remote Desktop Connection working, but until I finish up with that I’ll just post a snippet of information some people may find useful.
If you’re trapped behind a really restrictive firewall and want to access IRC then the best way to beat it is to run a webserver with a CGI based IRC client. Trust me, 9/10 this baby will skip by a firewall no problem
.
I’ll post my findings and a tutorial (if successful) on making an outgoing RDC from a restrictive firewall.
Until next time people!
Comments : Leave a Comment »
Tags: cant ssh, chat, firewall, irc, proxy, restrictive
Categories : General
Prevent your DLL from being unloaded
30 06 2008Here’s the scenario, you’ve just found a neat little way to inject your dll into another process but for one reason or another your dll is being unloaded instantly right after DllMain() is called. Damn, you think! It must be checking the dll somehow and calling FreeLibrary() if it doesn’t match specific requirements, how do I bypass this?
I had no idea either until I read this article.
Essentially what you do is call LoadLibrary() again from inside your DllMain() function so the count for your dll is incremented, the host app calls FreeLibrary() and you stay resident (every one is happy).
Here’s the source for you lazy types….
BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch(ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
LockLibraryIntoProcessMem(hModule, &g_Self);
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
int LockLibraryIntoProcessMem(HMODULE DllHandle, HMODULE *LocalDllHandle)
{
if(NULL == LocalDllHandle)
return ERROR_INVALID_PARAMETER;
*LocalDllHandle = NULL;
TCHAR moduleName[1024];
if(0 == GetModuleFileName(DllHandle, moduleName, sizeof(moduleName)/ sizeof(TCHAR)))
return GetLastError();
*LocalDllHandle = LoadLibrary(moduleName);
if(NULL == *LocalDllHandle)
return GetLastError();
return NO_ERROR;
}
Also I apologise for the shitbox code paste, the <code> tags on wordpress seem to go crazy whenever you insert a newline.
Comments : Leave a Comment »
Tags: freelibrary, loadlibrary, prevent dll being unloaded, trick
Categories : Hacker Tricks