Wednesday, November 18, 2009

Another day behind the virus

This time another virus utilized my time and effort.

The virus was an executable g8k.exe. My system was behaving weird ..but unfortunately, I couldn't force remove this executable and made me dig deep into this.

Part 1:
A little bit of google led me to the fact that there are some more files related to g8k.exe

1. %temp%/herss.exe
2. %temp%/cvasds0.dll
3. %temp%/cvasds1.dll

Remember to boot in safe mode to remove them.If you don't have access to safe mode, then remove hidden attributes for these file and do a force delete.

Part 2: TPShocks.exe is misused by this virus. Kill this from task manager and you can remove g8k.exe peacefully.

The reason why I said TPShocks is misused is because it is supposed to be for IBM Hard Drive Active Protection. So don't go and kill this, thinking its a virus...Since it maybe an actual hard drive protection service! Don't mess up too much!

Monday, September 28, 2009

Hack the Communicator

I am back...This time with some Microsoft Office Comunicator Hacks...

I dont know how many use Microsoft Office Communicator 2005..at least we have it in our corporate laptops ..ssshhh..

Its pretty good....although there are some things which I find are messy..and my hacks are to make my life easier..If you like it..you are free to use it..

One of the messiest thing I found was the status change in the communicator. If we are idle for 5 minutes, it changes our status from "Available" to "Away".. Although its true that we are away..not everytime do I want people to know I am away alright.. What if I am sleeping and I dont want people to know that..I am actually not away right..(OK..I am not available either..Thats a different thing :P)

Actually Communicator gives us an option to change this value from 5 minutes to 1 hour. But only 1 hour?? I am not happy with that either...Now thats when I went deep to find a way to change it...and here you go..again its a registry hack as you might have guessed by now!

HKCU\Software\Microsoft\Communicator:
Set IdleThreshold to how much ever value you need...I have set it to 400 (ssshhhh)

Ok you are done .. Now you may sleep for as much as you want and you will still be Online on IM...But wait..dont forget to set you system to not go for lock..on being idle...If your system gets locked..then the status changes to Away..so that is a different option altogether...

To be frank this is not a hack you know..they do allow till 1 hour..I just wanted some more... Yeh dil mange more!!

There are more things you can do with the registry entries there...Will be back with more on the Communicator soon...

Till then happy instant messaging / sleeping... :)

Wednesday, June 3, 2009

White hat / black hat /grey hat ...Are you one of them?

You know who a hacker is..alright...but do you know all types of hackers??

Black hat - A villain or the bad guy. A hacker who performs hacking for his selfish needs. Now that could range from logging into your computer and stealing off your personal and important information ... So watch out for such hackers!

White hat - A hero or a good guy. A hacker who performs hacking to find the loopholes and fix it. Who has no selfish motives.

Grey hat - Now this is someone..who is not interested in being branded a black hat or a white hat...Someone who cannot be identified within the borders of black or white. Someone who could be a black hat at times and a white hat at other times...

Now if you are a hacker..which one will you belong to?

Friday, April 24, 2009

W32/Conficker.worm

This time I am with a fix for a new virus - W32/Conficker.worm

Now this one was with the testing team laptop (Not mine, fortunately and believe me, I am in no way involved in spreading it either).

The symptom was the following:
The McAfee scan used to pop up a message quite frequently blocking svchost.exe saying there was a buffer overflow and svchost.exe gets blocked.[svchost.exe Kernel LoadstringA() used to give the buffer overflow]

The system was having Windows XP SP2 installed in it. Google search gave the info that this was the W32/Conficker.worm malware. A security patch has been provided by Microsoft for fixing this issue.

This is the link:
http://www.microsoft.com/technet/security/bulletin/ms06-040.mspx

If you have SP3, then no worries, the fix should already be there!

Will update this link if issue still persists :) I am looking forward for more viruses ;)

Wednesday, April 8, 2009

CString in MFC

Localization in a VC++ project has been one of the things that I have been working on recently. I haven't come across much issues. But one thing which really surprised me was the MakeUpper() function in CString.

CString is supposed to handle UNICODE character set. So I was expecting MakeUpper() to generally convert the string in unicode to its respective uppercase characters..Alas!!

If you tend to have accented characters in your string then MakeUpper() doesnt work as expected. So the fix??

I did quite a number of searches and found out that many have faced this issue and found out the fix too. Make use of setlocale() function. This function sets the locale to the locale that we specify. For instance, we re working on hungarian characters and we intend to convert the french characters to uppercase, then we need to set the locale to french code page first and then call the MakeUpper() of CString.

The fix is as follows:

_tsetlocale(LC_CTYPE, L"French_Canada.1252");
CString temp(csUserName);
csUserName.MakeUpper();


There is a catch here too. If the code page is UTF-7 or UTF-8, then setlocale() fails.

MSDN link for setlocale()

Thursday, March 5, 2009

Working with Microsoft Speech API (SAPI)

SAPI or Speech Application Programming Interface is provided by Microsoft for converting text-to-speech and speech recognition.

Isn't it fun to have your own application which would read out text to you? Here is the sample vbscript code:

Dim name, sapi, reply
name = InputBox("Please enter your name","I would like to talk to you!")
Set sapi = CreateObject("sapi.spvoice")
Set sapi.Voice = sapi.GetVoices().Item(1)
reply = "Hello" & name
sapi.Speak reply
sapi.Speak "How are you doing?"

Save this code as "test.vbs" for example and run it. Enter your name in the prompt and enjoy the computer speaking to you :)

Explaining the code:
Line No.2 prompts the user to enter name. The name entered by user is saved in variable "name".
Line No.3 creates the sapi object for manipulation
Line No.4 selects the voice available in the system
Line No.5 adds Hello to the name
Line No.6 and 7 speaks out the string to the user

For more information on SAPI, Microsoft Speech API 5.3

Monday, March 2, 2009

Put your system to hibernate in a double click

So I am back with more tips for people who are lazy like me.

In one of my earlier, blogs I had mentioned, how lazy I felt to lock my desktop and how I wanted it in a double-click.

Well, being lazy again, now I have decided to put my system in hibernate or standby in a double click too.

Here's the code:

#include "windows.h"
#include "atlbase.h"

void create(TCHAR argv[100])
{
STARTUPINFO si;
PROCESS_INFORMATION pi;

ZeroMemory( & si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( & pi, sizeof(pi) );

// Start the child process.
if( !CreateProcess( NULL, // No module name (use command line)
argv, // Command line
NULL, // Process handle not inheritable
NULL, // Thread handle not inheritable
FALSE, // Set handle inheritance to FALSE
0, // No creation flags
NULL, // Use parent's environment block
NULL, // Use parent's starting directory
&si, // Pointer to STARTUPINFO structure
&pi ) // Pointer to PROCESS_INFORMATION structure
)
{
printf( "CreateProcess failed (%d).\n", GetLastError() );
return;
}

// Wait until child process exits.
WaitForSingleObject( pi.hProcess, INFINITE );

// Close process and thread handles.
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );

}
int _tmain(int argc, _TCHAR* argv[])
{
USES_CONVERSION;
char tmp_path[MAX_PATH];
char cmd[MAX_PATH];
strcpy_s(tmp_path, MAX_PATH,"%windir%\\System32\\rundll32.exe powrprof.dll,SetSuspendState");
ExpandEnvironmentStringsA(tmp_path, cmd, MAX_PATH);

TCHAR* str= A2T(cmd);
create(str);
}

Yahooooo... You are done!

Its too bad that blogger doesnt allow me to upload executables..else I would have just uploaded it for you. Maybe I should start a website for all these executables :)

Monday, February 9, 2009

From one of my old web pages











Interview Questions

C/C++ Interview Questions C/C++ Notes for Interviews Microsoft Interview Questions
Puzzles Operating Systems Notes Win32 Tutorials
Data Structure Notes Software Testing Notes Mathematical Puzzles





1. C/C++ Interview Questions:

1.
http://www.softcorp.demon.co.uk/c++2.htm

2.
http://www.onesmartclick.com/interviews/interviews-programming.html

3.
http://www.cpuniverse.com/newsite/archives/1999/mar/c++.html

4.
http://www.oneparticularharbor.net/sam/interview.html

5.
http://www.acetheinterview.com/cgi-bin/qanda.cgi?action=topics&number=5

6.
http://www.geocities.com/Athens/Agora/3027/work/interviewQuestions.html

7.
http://www.moskalyuk.com/jobs/cpp_5.htm

8.
http://www.moskalyuk.com/jobs/java_1.htm

9.
http://www.cs.unc.edu/~scheib/work/questions/

10.
http://www.cis.temple.edu/~ingargio/cis307/assessment/interviews.html

11.
http://www.geocities.com/SiliconValley/Park/1512/cpuz_l1.html



2. C/C++ Notes for Interviews:

1. http://leepoint.net/notes/cpp/

2.
http://www.parashift.com/c++-faq-lite/

3.
My Notes

4.
http://cslibrary.stanford.edu/

3. Microsoft Interview Questions:

1.
http://halcyon.usc.edu/~kiran/msqs.html

2.
http://www.4guysfromrolla.com/ASPscripts/PrintPage.asp?REF=/webtech/012700-1.shtml

3.
http://www.sellsbrothers.com/fun/msiview/default.aspx?content=question.htm

4.
http://www.acetheinterview.com/qanda/microsoft_interview.html

5.
http://bbs.mit.edu/cgi-bin/BBS0an?/groups/GROUP_3/JobHunting/Interview

6.
http://www.bucketobits.com/chris/programmerinterviewquestions.html

4. Puzzles:

1.
http://www.techinterview.org/archive/

2.
http://puzzle.dse.nl/index_us.html

3.
http://www.chlond.demon.co.uk/academic/puzzles.html

4.
http://pub13.ezboard.com/fvisualbasicexplorerfrm44

5. Operating Systems Notes:

1.
http://williamstallings.com/Extras/OS-Notes/notes.html

2.
http://www.ibilce.unesp.br/courseware/opsys/ostart.htm

3.
http://pages.cs.wisc.edu/~solomon/cs537.html

4.
http://www.cs.wisc.edu/~bart/537/lecturenotes/titlepage.html


6. Win32 Tutorials:

1.
http://www.winprog.org/tutorial/

2.
http://www.gajits.com/win32.asp

7. Data Structure Notes:

1. http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/ds_ToC.html

2.
http://www.csl.mtu.edu/cs2321.rp/www/lectures/cs2321lectures.htm

8. Software Testing Notes:

1.
http://louisa.levels.unisa.edu.au/se1/testing-notes/testing.htm

2.
http://hebb.cis.uoguelph.ca/~dave/343/Lectures/testing.html

3.
http://www.cee.hw.ac.uk/~air/se4/

4.
http://www.darkshire.org/~jhkim/programming/process/testing.html


9. Mathematical Puzzles

1.
http://thinks.com/webguide/mathpuzzles.htm

2.
http://www.syvum.com/teasers/

3.
http://www.eduplace.com/math/brain/

4.
http://www.brainbashers.com/

5.
http://barryispuzzled.com/

6.
http://www.braingle.com/

Tutorials

I am planning to do my MS..and I found myself searching a long time on internet to get tutorials...and worst of all, is the Ghajini effect on me.. I forget the link that I found useful once...and then search for a long time and hit upon this site and I feel "Man I have seen this earlier..How could I forget!"

So I will be adding on the links I found useful.. for my reference and if it could help others I will be only glad..

My only hope is I dont forget my bloglink :)

Advanced Operating Systems
http://www.webkinesia.com/online/adv_os/notes/index.php

Computer Graphics
http://www.webkinesia.com/online/graphics/notes/index.php

Data Mining
http://www-users.cs.umn.edu/~kumar/dmbook/index.php

Data Structures
http://www.webkinesia.com/online/datastruct/notes/index.php
http://www.cs.sunysb.edu/~skiena/214/lectures
http://www.brpreiss.com/books/opus5/html/book.html
http://www.cs.auckland.ac.nz/software/AlgAnim/ds_ToC.html

Database System Concepts
http://www.db-book.com/

Internet Programming
http://www.webkinesia.com/online/internet/notes/index.php

Object Oriented Programming
http://www.webkinesia.com/online/oop/notes/index.php

Operating Systems
http://www.webkinesia.com/online/os/notes/index.php

http://codex.cs.yale.edu/avi/os-book/os7/slide-dir/index.html


Unix Network Programming
http://www.ebook-search-engine.com/unix-network-socket-programming--ebook-all.html