Tuesday, October 20, 2009

TCP/IP stack repair options for use with Windows XP with SP2.

In general, the TCP/IP stack and the windows sockets registry might get disturbed due to some trojan virus or malwares. Though you remove these malicious programs, you might still be left behind with the aftermath caused by these programs - unresolved. The following tip makes sure that the tcp stack and the windows networking registry are reverted back to their OEM defaults... Make sure to remove all the malwares before testing this tip...

Windows -> Start -> Run -> CMD (to open a command prompt)

Reset WINSOCK entries to installation defaults:
> netsh winsock reset catalog

Reset TCP/IP stack to installation defaults.
> netsh int ip reset reset.log

Reboot the machine and you are done!

Saturday, October 17, 2009

A sample user impersonation on unix using setuid

/* include required header files */

int main()
{
setuid( 32033 );
system( "/test/run.sh" );

/*
shell script is run with a different effective
user id than the executor if this binary is being
set uid
*/

return 0;
}