Page

Tuesday, March 31, 2009

Calculations On Command Prompt

The command processor CMD.EXE comes with a mini-calculator that can perform simple arithmetic on 32-bit signed integers:

C:\>set /a 2+2
4
C:\>set /a 2*(9/2)
8
C:\>set /a (2*9)/2
9
C:\>set /a "31>>2"
7

Note that we had to quote the shift operator since it would otherwise be misinterpreted as a "redirect stdout and append" operator.

For more information, type set /? at the command prompt.

 

Source:- http://www.insecure.in/cal_cmd_trick.asp

Folder Lock Without Any Software

Folder Lock With Password Without Any Software-
Paste the code given below in notepad and 'Save' it as batch file (with extension '.bat').

Any name will do.

Then you see a batch file. Double click on this batch file to create a folder locker.
New folder named 'Locker' would be formed at the same location.

Now bring all the files you want to hide in the 'Locker' folder. Double click on the batch file to lock the folder namely 'Locker'.

If you want to unlock your files,double click the batch file again and you would be prompted for password.

Enter the password and enjoy access to the folder.

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM

echo Are you sure u want to Lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p "pass=>"
if NOT %pass%==type your password here goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End

 

Source:- http://www.insecure.in/folder_lock_trick.asp

Shutdown Command Via Command Prompt

The 'Shutdown' Command Becomes More Flexible and Automated when used from the Command Prompt.

To Run the 'Shutdown' command from the command prompt, go to 'Start > Run', type 'cmd', and press 'Enter'.

In the black box (the command prompt) type 'Shutdown' and the Switches you want to use with the 'Shutdown' command.

You have to use at least one switch for the shutdown command to work.
The Switches :-

The 'Shutdown' command has a few options called Switches. You can always see them by typing 'shutdown -?' in the command prompt if you forget any of them.

-i: Display GUI interface, must be the first option
-l: Log off (cannot be used with -m option)
-s: Shutdown the computer
-r: Shutdown and restart the computer
-a: Abort a system shutdown
-m \\computername: Remote computer to shutdown/restart/abort
-t xx: Set timeout for shutdown to xx seconds
-c “comment”: Shutdown comment (maximum of 127 characters)
-f: Forces running applications to close without warning
-d [u][p]:xx:yy: The reason code for the shutdown u is the user code p is a planned shutdown code xx is the major reason code (positive integer less than 256) yy is the minor reason code (positive integer less than 65536)

Note :- I’ve noticed using a switch with a '-' sign doesn’t work sometimes.
If you are having trouble try using a '/' in place of '-' in your switches.

Examples :-
shutdown –m \\computername –r –f

This command will restart the computer named computername and force any programs that might still be running to stop.

shutdown –m \\computername –r –f –c “I’m restarting your computer. Please save your work now.” –t 120

This command will restart the computer named computername, force any programs that might still be running to stop, give to user on that computer a message, and countdown 120 seconds before it restarts.

shutdown –m \\computername –a
This command will abort a previous shutdown command that is in progress.

Using A Batch File :-
You can create a file that performs the shutdown command on many computers at one time.

In this example I’m going to create a batch file that will use the shutdown command to shut down 3 computers on my home network before I go to bed.

Open 'Notepad' and type the shutdown command to shut down a computer for each computer on the network.

Make sure each shutdown command is on its own line.

An example of what should be typed in notepad is given below-

shutdown –m \\computer1 –s
shutdown –m \\computer2 –s
shutdown –m \\computer3 –s

Now I’ll save it as a batch file by going to file, save as, change save as type to all files, give the file a name ending with '.bat'. I named mine 'shutdown.bat'.

Pick the location to save the batch file in and save it.
When you run the batch file it’ll shutdown computer 1, 2, and 3 for you.
You can use any combination of shutdown commands in a batch file.

Source:- http://www.insecure.in/shutdown_cmd_trick.asp

The Ethical Hacker

Welcome to the unique confluence of hackers , crackers and security professionals on the world wide web.


This is your complete resource for internet security and ethical hacking.


 -: The Ethical Hacker :-hack
Most people think that hackers are computer criminals.
They fail to recognize the fact that criminals and hackers are two totally different things.
Media is responsible for this.
Hackers in reality are actually good and extremely intelligent people who by using their knowledge in a constructive manner help organizations, companies, government, etc. to secure documents and secret information on the internet.

Source:- http://www.insecure.in/

Windows-XP Password Cracking

Here we use the tool "Cain and Abel" for cracking passwords of any local user/administrator.


First download cain and abel from "http://www.oxid.it/cain.html" and install it on your system.


Make sure that you have disabled the antivirus/firewall running on your system before installing and throughout this process.


Two most effective techniques used here are "Brute-Force" and "Cryptanalysis".
Brute-Force:- As this techniques takes more time to complete, the attacker prefer this technique only when there is a hope that the password contain same type of characters or may be two. i.e only loweralpha, only alpha, only numeric or may be loweralpha-numeric, also it should contain less than 7 characters. Otherwise it takes more time to crack password, which may be the mixture of all types of characters along with special symbols.


The step-by-step explaination for this technique is given below-


1) Open the tool "Cain and Abel"  

2) Go into the category "Cracker"      it displays all sub-categories under "Cracker" in left panel.

3) Select "LM & NTLM Hashes" from left panel and then click on      symbol, you will be greeted by a window as shown.

4) Check "import hashes from local system" and then click "Next". This shows all the active accounts on local system like administrator, guest, etc. along with LM and NT hashed values of their respective passwords, as shown below.

5) Right clicking on any username shows all available options using which we can crack it's password.

6) Here we select "Brute-Force Attack" and then "NTLM Hashes", since windows uses NTLM hashes to store local users' passwords.
7) You will be greeted by a window where you can modify properties for brute-force attack such as password length, character set, etc.

8) Click on "Start" button.
9) On completion it will reveal the exact password.

 

Cryptanalisys :- Basically, Cryptanalisys means Operations performed in converting encrypted messages to plain text without initial knowledge of the crypto-algorithm and/or key employed in the encryption.


This is the fastest technique of password cracking possible due to "Rainbow Tables".


A rainbow table is a file that is used to lookup an unknown plaintext from a known hash for an algorithm that does not usually permit this operation.


Steps 1 to 4 i.e upto importing hashes from local system, are similar to previous technique (i.e brute-force). The steps coming after that are as follows-


5) Here, select "cryptanalisys attack" then "NTLM hashes" and then select "via rainbow tables". Here we can choose either OphCrack or RainbowCrack formats of tables. The rainbow tables are available free to download on internet.


Due to large file size of rainbow tables (350MB - 3GB); instead of downloading we can also create at own just by downloading rainbow table generator (winrtgen.zip of 181KB) free download at "http://www.oxid.it/downloads/winrtgen.zip"

6) Click on "Add Table"

7) Browse for the location of rainbow table on your system, select proper table and click "open".

8) Select the loaded table and then click on "Start" button.

9) On completetion it will show the exact password.


To learn windows password cracking techniques properly, one must understand "LM" & "NTLM" algorithms, SAM File, Dumping NTLM hashes from local SAM, Rainbow Tables, etc.......!

Source:- http://www.insecure.in/winxp_passcrack.asp