First of all, let's take a simple look at ifeo. I have not fully copied it on the Internet. I need to search the following keywords in the full text on Google to see the original text.
The information is as follows:
The so-called image hijacking (ifeo) is the image file execution options, which is located in the Registry's HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Image File Execution options. This item is mainly used for debugging.ProgramIt is of little significance to general users. By default, only Administrators and Local systems have the permission to read and write modifications.
Next, let's take a look at the program running mechanism of Windows NT:
When a Windows NT system tries to execute an executable file running request called from a command line, it first checks whether the running program is an executable file. If yes, it then checks the format, then, the system checks whether the image exists (ifeo checks the image ). If it does not exist, it will prompt that the system cannot find the file or "the specified path is incorrect. After deleting these keys, the program can run!
This program is relatively simple. It involves traversing the Image File Execution options to read the hijacked program and add it to ListBox.CodeAs follows:
Protected Void Refreshlistbox ()
{
This . Listbox_ifeo.items.clear ();
String [] Subkeynames;
Registrykey hkml = Registry. localmachine;
Registrykey ifeo = Hkml. opensubkey ( @" SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Image File Execution options " , True );
Subkeynames = Ifeo. getsubkeynames ();
Foreach ( String Keyname In Subkeynames)
{
This. Listbox_ifeo.items.add (keyname );
}
}
The hijacking part is to check whether there is a program to be hijacked in the Image File Execution options. If yes, the system prompts that the program is hijacked. This code is messy. I am not ashamed to announce it here. I only paste the key code:
Registrykey hkml = registry. localmachine;
Registrykey ifeo = hkml. opensubkey (@ "SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Image File Execution options", true );
Registrykey aimdir = ifeo. createsubkey (deny_app );
Aimdir. setvalue ("Debugger", tovalue );
Delete, that is, simple traversal, and then delete the corresponding key.
String [] deletereg;
String undo_ifeo_name = This. listbox_ifeo.selecteditem.tostring ();
Registrykey hkml = registry. localmachine;
Registrykey ifeo = hkml. opensubkey (@ "SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Image File Execution options", true );
Deletereg = ifeo. getsubkeynames ();
Foreach (string aimkey in deletereg)
{
If (aimkey = undo_ifeo_name)
{
Ifeo. deletesubkeytree (undo_ifeo_name );
}
}
This is the key code.
The following Program (summer vacation to start learning, please forgive me a lot of bugs, welcome to raise comments):
http://cid-856b7a1fbf560755.skydrive.live.com/self.aspx/My%20free%20softwares/IFEOhijack.rar