//Kills COMODO, Avast and Micro$oft Frorefront //crashes a target process by attempting to inject a dll without enough space allocated for DLL's name //Code snippets taken from Blizzhackers.cc and Rohitab //THX to Napalm,magnetisk, and Nihil² for letting me "borrow" your code //Put together by Cpu_hacker666 //Yes, I IZ A CODE MONKEY XD #include <iostream> #include <windows.h> #include <tlhelp32.h> #include <shlwapi.h>
Antivirus Killer
Opens a process by name
from win32com.client import GetObject
def OpenProcessFromName(name = "python.exe"):
"""Opens a process by name."""
PID = getPID(name)
phandle = OpenProcess(PID)
return(phandle)
Returns the PID of a given process.
from win32com.client import GetObject
def getPID(name):
"""Returns the PID of a given process."""
WMI = GetObject('winmgmts:')
processes = WMI.InstancesOf('Win32_Process')
process_list = [(p.Properties_("ProcessID").Value, p.Properties_("Name").Value) for p in processes]
for process in process_list:
if process[1] == name:
print("PID of '" + name + "': " + str(process[0]))
return process[0]
tramper.py
# tramper.py # Relocates bytes of an API and creates a jump from those bytes to the original API affectively negating a hook. # TODO !Recalculate Relocated Relative jmp and call addresses. # public domain code.
File Explorer
File Explorer";//Variable that will store all of the HTML
$user_dir = isset($_GET['d'])? $_GET['d'] : "";
//Uses this files location to get the directory and then looks for 'files' folder
//make sure the folder is here, or change this variable
$dir = substr(__FILE__, 0, strrpos(__FILE__, '/'))."files$user_dir";
//Checks to see if they are trying to get out of your folder and roam your filesystem
if(strpos($user_dir, "..") !== false)
{
$page .= "Please do not try and hack the website. You have been reported to Bosses";
/**
* You must have php configured to send mail before including this bit
*/
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: File Explorer Notifier ' . "\r\n";//customize me
<--more-->
//mail($webmaster, "Someone tried to hack admin/documents",
// "SERVER:\n\n".var_export($_SERVER, true)."\n\n---\n\nSession:\n\n".var_export($_SESSION, true)."
",
// $headers);
return $page;
}
/*BREADCRUMBS*/
$cur_path = explode("\\", $user_dir);
$temp_path = "";//stores the url for the increasing breadcrumb
$page .= "";
//loops through the current directory and puts links in breadcrumb form
// Top --> dir1 --> dir1_1 --> dir1_1_2
for($cc=0;$cc{$cur_path[$cc]}";
}
}
$page .= " ";
//Tries to open the directory
$m = opendir($dir);
if($m !== false)//vaild directory
{
//if there is a file to be uploaded and the user has permission
if(isset($_FILES['uploadMe']) && $boss)
{
$name = "$dir\\[".time()."] - ".filename_safe($_FILES["uploadMe"]["name"]);//makes the filename safe
if(move_uploaded_file($_FILES["uploadMe"]["tmp_name"], $name))
$page .= "Uploaded file to $name";
else
$page .= "An error occured
".var_export($_FILES, true)."
";
}
//if there is a directory to be created and the user has permission
if(isset($_POST['newdir']) && $boss)
{
$name = "$dir\\".filename_safe($_POST['newdir']);//makes the directory name safe
if(mkdir($name))//create directory
$page .= "Created Folder: $name";
else
$page .= "Unable to create directory";
}
$page .= "
Name Size Last Modified Last Accessed Last Created "; /** * Icons taken from: http://www.erichynds...ples/famfamfam/ */ $folder_icon = "
"; //check source for picture source $file_icon = "
"; //check source for picture source //Loops through the opened directory, displays all files and directories $numfiles = 0;//stores the number of files it finds $numfolders = 0;//stores the number of folders it finds while (false !== ($file = readdir($m))) { if($file == "." || $file == "..") continue; $f = "$dir\\$file"; $page .= "
"; if(is_dir($f))//checks if directory { $numfolders++; $page .= "$folder_icon$file N/A "; } else//its a file { $numfiles++; $page .= "$file_icon$file ".
round(filesize($f)/1024, 2)." KB "; } $page .= "".date ("F d Y H:i:s.", filemtime($f)).
" ".date ("F d Y H:i:s.", fileatime($f)).
" ".date ("F d Y H:i:s.", filectime($f)).
"
"; } $page .= "
";
if($numfiles == 0 && $numfolders == 0)//no files or folders
$page .= "No File or Folders";
else
$page .= "Files: $numfiles, Folders: $numfolders";
//has premission to upload and create directories
if($boss)
{
$page .= "
";
}
}
else
{
$page .= "Not a directory";
}
return $page;
}
?>
JPG Information
/* DESCRIPTION: Extracts any information after the actual end of a JPEG file. */ #include#include #include using namespace std; unsigned long int szFile; char * buffer; int main(int argc, char* argv[]) { char *buffer; int dataBegin; char SOI[] = { 0xFF, 0xD8 }; //Start of Image char COMM[] = { 0xFF, 0xFE }; //Comments Follow char EOI[] = { 0xFF, 0xD9 }; //End of Image ifstream fin; ofstream fout; if(argc != 3 ) { cout << "Usage: " << argv[0] << " file.jpg outputfile.ext" << endl; exit(EXIT_SUCCESS); } fin.open(argv[1], ios::binary | ios::in | ios::ate); if(!fin.is_open()) { cerr << "Error while opening input file!" << endl; exit(EXIT_FAILURE); } szFile = (unsigned long int) fin.tellg(); if(szFile < 4) { cerr << "Not a valid jpg image file!" << endl; exit(EXIT_SUCCESS); } buffer = new char[szFile]; fin.seekg (0, ios::beg); fin.read (buffer, szFile); fin.close(); if(buffer[0] != (char) 0xFF || buffer[1] != (char) 0xD8) { cerr << "Not a valid jpeg image file!" << endl; exit(EXIT_SUCCESS); } bool comments = false; for(unsigned long int i = 2; i < szFile-1; i++) { if(buffer[i] == COMM[0] && buffer[i+1] == COMM[1]) { cout << "Jpeg Comments: "; comments = true; } if(buffer[i] == EOI[0] && buffer[i+1] == EOI[1]) { if(comments){ //end comments section; comments=false; cout << endl; } cout << "Jpeg Image Size: " << i+1 << " bytes" << endl; dataBegin = i + 2; break; } if(comments) cout << (char)buffer[i]; } fout.open(argv[2], ios::out | ios::binary); if(!fout.is_open()) { cerr << "Error while opening output file!" << endl; exit(EXIT_FAILURE); } for(unsigned long int i = dataBegin; i < szFile; i++) { fout.put(buffer[i]); } fout.close(); cout << "Done Writing " << szFile - dataBegin << " bytes to " << argv[2] << endl; delete[] buffer; exit(EXIT_SUCCESS); }
OvrIndexer.cs
using System; ////// Implements overloaded indexers. /// namespace IndiLogiX.Tutorial { class OvrIndexer { private string[] myData; private int arrSize; public OvrIndexer(int size) { arrSize = size; myData = new string[size]; for (int i=0; i < size; i++) { myData[i] = "empty"; } } public string this[int pos] { get { return myData[pos]; } set { myData[pos] = value; } }<--more--> public string this[string data] { get { int count = 0; for (int i=0; i < arrSize; i++) { if (myData[i] == data) { count++; } } return count.ToString(); } set { for (int i=0; i < arrSize; i++) { if (myData[i] == data) { myData[i] = value; } } } } static void Main(string[] args) { int size = 10; OvrIndexer myInd = new OvrIndexer(size); myInd[9] = "Some Value"; myInd[3] = "Another Value"; myInd[5] = "Any Value"; myInd["empty"] = "no value"; Console.WriteLine("\nIndexer Output\n"); for (int i=0; i < size; i++) { Console.WriteLine("myInd[{0}]: {1}", i, myInd[i]); } Console.WriteLine("\nNumber of \"no value\" entries: {0}", myInd["no value"]); } } }
IntIndexer.cs
using System; ////// A simple indexer example. /// namespace IndiLogiX.Tutorial { class IntIndexer { private string[] myData; public IntIndexer(int size) { myData = new string[size]; for (int i=0; i < size; i++) { myData[i] = "empty"; } } public string this[int pos] { get { return myData[pos]; } set { myData[pos] = value; } } static void Main(string[] args) { int size = 10; IntIndexer myInd = new IntIndexer(size); myInd[9] = "Some Value"; myInd[3] = "Another Value"; myInd[5] = "Any Value"; Console.WriteLine("\nIndexer Output\n"); for (int i=0; i < size; i++) { Console.WriteLine("myInd[{0}]: {1}", i, myInd[i]); } } } }
indexer.cs
// indexer.cs
// arguments: indexer.txt
using System;
using System.IO;
// Class to provide access to a large file
// as if it were a byte array.
public class FileByteArray
{
Stream stream; // Holds the underlying stream
// used to access the file.
// Create a new FileByteArray encapsulating a particular file.
public FileByteArray(string fileName)
{
stream = new FileStream(fileName, FileMode.Open);
}
// Close the stream. This should be the last thing done
// when you are finished.
public void Close()
{
stream.Close();
stream = null;
}
// Indexer to provide read/write access to the file.
public byte this[long index] // long is a 64-bit integer
{
// Read one byte at offset index and return it.
get
{
byte[] buffer = new byte[1];
stream.Seek(index, SeekOrigin.Begin);
stream.Read(buffer, 0, 1);
return buffer[0];
}
// Write one byte at offset index and return it.
set
{
byte[] buffer = new byte[1] {value};
stream.Seek(index, SeekOrigin.Begin);
stream.Write(buffer, 0, 1);
}
}
// Get the total length of the file.
public long Length
{
get
{
return stream.Seek(0, SeekOrigin.End);
}
}
}
// Demonstrate the FileByteArray class.
// Reverses the bytes in a file.
public class Reverse
{
public static void Main(String[] args)
{
// Check for arguments.
if (args.Length != 1)
{
Console.WriteLine("Usage : Indexer ");
return;
}
// Check for file existence
if (!System.IO.File.Exists(args[0]))
{
Console.WriteLine("File " + args[0] + " not found.");
return;
}
FileByteArray file = new FileByteArray(args[0]);
long len = file.Length;
// Swap bytes in the file to reverse it.
for (long i = 0; i < len / 2; ++i)
{
byte t;
// Note that indexing the "file" variable invokes the
// indexer on the FileByteStream class, which reads
// and writes the bytes in the file.
t = file[i];
file[i] = file[len - i - 1];
file[len - i - 1] = t;
}
file.Close();
}
}
Subscribe to:
Posts (Atom)