⚠ Authorized Use Only — Educational & Penetration Testing Purposes

The techniques, scripts, and tools described in this post are shared strictly for cybersecurity education, CTF practice, and authorized penetration testing. They are intended to be run only against:

Using these techniques against systems, networks, or accounts without the owner's consent is illegal in most jurisdictions and is not endorsed by this blog. If you're learning, practice in an isolated lab (e.g. your own VMs, Kali + Metasploitable, or a CTF platform) rather than on live third-party targets.

Skip to main content

Posts


Sniffer for email credentials

##Library required ##Variables defined ##Callback function ,when this function is called we check to make sure it has a data payload whether the payload contains the typical USER or PASS mail commands and if we detect an authentication string ,we print out the server we are sending it to and the actual data types of the packet . ##We added a filter that only includes the traffic destined for the common mail ports like "110 (POP3) ,143 (IMAP) ,25 (SMTP)" as well as we used the parameter "store" which is when set to '0' ensures that scapy isn't keeping the packets in memory. If we want to sniff for longer time then its a good idea to keep "store=0" so that it won't be consuming vast amounts of RAM. NOTE: execute this script with admin/root permissions Code repostory : sniffer_for_email_credentials Checkout some more hacking scripts SECURING SYSTEM ...

Sniffer with no Filter

Below code is a simple sniffer that sniffs the packet and dumps its content. ##Library required ##Callback function ,will recieve each sniffed packet ##this will sniff the packets on all interfaces with no filtering NOTE: the script should be executed as admin/root in order to make it work code repository : sniffer_with_no_filter Checkout some more hacking scripts SECURING SYSTEM BLUETOOTH ATTACKS STEALING AND SNIFFING ATTACKS KALI LINUX HACKING COMMANDS CHEATSHEET TROJAN AND BACKDOORS DICTIONARY AND BURTEFORCING ATTACKS MAN IN THE MIDDLE ATTACKS 1. Sign & Verify message 1. Bluetooth discovery 1. Stealing saved wifi password from windows 1. Hacking commands with Kali Linux ...

TCP proxy

Benifits of Tcp proxy we can forward the traffic from host to host as well as useful when assessing network based software. So in this code we will continually read from local ,process and send to remote ,read from remote ,process and send to local until there is no more data detected. ## we will firstly take the command line arguements and then fire up a server loop that listens that listens for connections. once any connection request comes in ,we hand it off to 'proxy_handler' ,which does all the sending and recieving of bits to either side of the data stream. ## we will make sure that we should not be initiating a connection to the remote side and request data before going into our main loop. Then we will use the 'recieve_from' function which we reuse for both side of the communication ,it simply takes in a connected socket object and performs a recieve. Then we will dump the contents of packets so that we can inspect it for anything interesting .then we pa...

Dictionary Attacks

Passwords are not generally stored in plaintext form. crypt() is a one way hash function that expects a plaintext password and a salt value for input and then outputs a hash with the salt value prepended to it. This hash is mathematically irreversible ,meaning that it is impossible to determine the original password using only the hash. So if user wants to authenticate user will enter the password and then hash corresponding to that password will be generated ,and if the hash matches with the hash stored in file ,then user entered the correct password .In this way without storing the password in plaintext form we can have authentication here. With this mechanism ,we can think of that the even encrypted password stored in the file is useful ,so we can have a dictionary attack here by hashing each word in the wordlist and compare it with the hash stored in the file ,so in this way we can crack the password. Dictionary Attack program will just needs to read word from file ,hash each...

Man In The Browser Attack

Introduction This script will first force the user to logout from the site and when user will try to login again it will send the credentials to the server which is in our case is setup in server.py and by default localhost. This script is compatible with internet explorer only and make sure that internet explorer is not forwading you request to the microsoft Edge. TO DISABLE FORWARDING THE REQUEST TO EDGE ,FOLLOW BELOW STEPS : - Go to settings - then click on Default Browser present at left side in the List. - Then change Let Internet Explorer open sites in Microsoft Edge To NEVER Lets walkthrough the code and learn how we can build script to perform mitb from scratch using python You can also checkout other hacking scripts in this page hacking scripts ## Modifications : By default this script will only get the credential of gmail and Facebook , But you can modify according to your need by appendng items in the list in mitb.py file. ## Working : as soon as you will log-in or a...

Hacking with Kali Cheatsheet

Since it is hard as well as no point to remember the tons of commands use to penetrate ,this sheet can be used as reference . ##Dos-Attacks with Slowloris ##Information Gathering ##Nikto Webserver Scanner ##ARP spoofing ##Capturing cookies ##WPA cracking ##cracking WEP Auth ##Deauthentication Attack ##DNS spoofing ##Fake Authentication ##FTP exploitation ##Database hacking ##Injecting packets ##JS injection ##MITMF attack ##web server hacking ##Wireshark sniffing spoofing Checkout some more hacking scripts SECURING SYSTEM BLUETOOTH ATTACKS STEALING AND SNIFFING ATTACKS KALI LINUX HACKING COMMANDS CHEATSHEET TROJAN AND BACKDOORS DICTIONARY AND BURTEFORCING ATTACKS MAN IN THE MIDDLE ATTACKS ...

Sandbox Detection

Sandboxing : - It is a computer security term reffering to when a program in set aside from other progams in a seprate environment so that if errors or security issues occur ,those issues will not spread to other areas on the computer . - Programs are enabled in their own sequestered area ,where they can be worked on without posing any threat to other programs. - Sandboxes can look like a regular operating environment ,or they cna be much more bare bones .V M are often used for what are reffered to as runtime sandboxes. You can also checkout other hacking scripts in this page hacking scripts : SandBox Detection : For defense against Sandbox or to detect wheather our trojan is running in sandbox or actual operating system. We can use a few indicators to try to determine whether our trojan is executing within a sandbox. we'll monitor our target machine for recent user input ,including key-strokes and mouse-clicks. [ Whole concept ] The script will try to determine if the...

Android - CheatSheet

Following page contains ways to execute some methods in android with java : This will keep on updating every week ##Create a Toast ##Set text inside TextView ##Get String from EditText and set to Text View ##Add items into ListView ##Shared preferences ##Adding Video player ##Media Controller for above mentioned video player ##Audio Player ##Seek bar to control volume of above mentioned audio player ##Seek bar to progress along with audio in Audio Player mentioned above ##Run background task with AsyncTask ##Send data from or open one activity to other Get Text in textView and hit submit button ,text will append in second activity Main activity second activity Checkout some more hacking scripts SECURING SYSTEM BLUETOOTH ATTACKS STEALING AND SNIFFING ATTACKS KALI LINUX HACKING COMMANDS CHEATSHEET TROJAN AND BACK...

Screenshot with Python

Introduction Since most of the pieces in the malwares or pentesting frameworks has the ability to tak screenshots against targets system. This can help us to capture images ,video frames or other sensitive data we might not be able to see with the packet captures or keyloggers. Lets walkthrough the code and learn how we can build screenshot capturing script from scratch using python You can also checkout other hacking scripts in this page hacking scripts Code is explained for how we can capture the screenshot ,and merge it in the command and control trojan ##Required Libraries First we acquire a handle to the entire desktop which include the entire viewable area across multiple monitors grab handle to the main desktop window we then determine the size of the size of the screen so that we know the dimensions required for the screenshots determine the size of all monitors in pixels create a device context we create a device context using GetWindowDC function call and pass in...

C/Python for security & hacking

SECURITY SECURING SYSTEM 1. Sign & Verify message 2. SandBox Detection 3. TCP Proxy HACKING STEALING AND SNIFFING ATTACKS 1. Stealing saved wifi password from windows 2. Sniffing packets 3. Email Credential sniffers Bluetooth Attacks 1. Bluetooth discovery 2. Bluetooth SDP browsing 3. Bluetooth OBEX 4. Bluetooth RCOMM channel scanner 5. Blue Bug Exploit ...

Linked List

Linked list can be considered as list of nodes ,where each node consist of data to be stored as well as the address of the next node. Example : consider we have a linked-list as [data | addr_of_nxt_node] -> [data | addr_of_nxt_node] -> [data | addr_of_nxt_node] -> [data | NULL] Last element of the linked list will always hold the addr of next node as NULL ,which will be the indication while traversing the list that linkedlist ends here Linked-List operations : - Insert node at begining. - Insert node at position. - Delete node from linkedlist. - Search node in linkedlist. - Sort linkedlist. Demonstration : Let's start Implementing the linkedlist First we need to define the struct of a node As we can see we will define the struct with help of struct where data will be the addr where we will store the values to be stored and next will be used to store the addr of the next ndoe adjacent to current node. Since we have defined the structure of the node ,now l...

QUEUE

queue works on the simple principle FIFO (First In First Out) The very simple example of queues are consider you are visit your favourite restaurant and there you are standing in a line to order a food This is nothing but a queue ,the person who comes first will be able to order his/her food first and then second person and so on ,same is the case with the queue ,element added in queue will be removed from the queue first. Example : |COUNTER| person1 |COUNTER| person2 |COUNTER| person2 so person1 is in front of the counter so person1 will order the food and will leave the lineand then person2 will be on the counter and will order the food and so on . Let's Dig in the coding part ,how we will design the queue Queue Operations: 1. Enqueue() : To add an element in the queue in front position 2. Dequeue() : To remove an element from the queue from front position Demonstration : First of all we will define pointers as well as the queue and the size of queue we...

STACK

## It is a linear data structre that follows the principle of LIFO i.e Last In First Out Assume you are putting plates on top of previous plate ,like below : Plate-A -> Plate-B -> Plate-C        Plate-A ->  Plate-B           ->  Plate-A in order to get the Plate-A we need to remove all the plate on top of Plate-A which are Plate-B ,Plate-C which is the plate added at last will be remove first which is nothing but LIFO. ## Stack Operations: 1. Push Operation : to add an element in the stack 2. Pop Operation : to remove an element from TOP of the stack 3. Peek Operation : to print the topmost element without removing it from the stack 4. is_full Operation : whether stack is full or not 5. is_empty Operation: whether stack is empty or not ## Demonstration : # we will include the mandate libraries first Then we will define the struct of sta...

Asymptotic notations

## ASYMPTOTIC NOTATION : Efficiency of algorithm depends on amount of time ,storage and other resources required to execute an algorithm. Efficiency is measured with help of asymptotic notations. Asymptotic notations are mathematical notations used to decribe execution time of an algorithm when input tends towards a particular value or limiting value. THREE ASYMPTOTIC NOTATIONS : 1. Big-O notation : used to measure the worst case scenerio of an algorithm .It generally gives an upper bound. in simple words we can say that (O) notation is used to measure the maximum time that an algorithm can take to execute. 2. Omega notations : used to measure the best case scenerio of an algorithm .It generally gives lower bound .In simple words we can say that theta notation is used to measure the minimum time that an alogrithm can take to execute. 3. Theta notations : used to measure the average case scenerio of an alogrithm .It generally gives the average bound. In simple words we ...

Data Structure & Algorithm

## DATA STRUCTURES : It is a way of arranging data on a computer so that it can be accessed & updated efficiently ## ALGORITHMS : Algorithms are an instructions or a way to solve the problem using the data which is stored with the help of data structure. ## TWO TYPES OF DATA STRUCTURE: 1. Linear data structure : 1) Arrays 2) Stack 3) Queue 4) Linked-List 2. Non-Linear data structure: 1. Graphs 2. Trees

Command & Control Trojan With Python

INTRODUCTION Command and Control Trojan : With this Trojan we will be able to asynchronously control ,udpate and recieve data from deployed implants.So we will use Github as a way to store implant configuration information and exfiltrated data as well as any modules that the implanted needs in order to execute tasks.Since Github is encrypted over SSL ,and there are very few enterprises which might have blocked github itself. Let's have a walkthrough of the code on how we can build our github based command and control trojan from scratch. NOTE : you can integrate any module or features availble in this hacking scripts like keylogger ,backdoor etc with this Trojan ## Required Libraries : github3 : To connect authenticate and communicate between the trojan and the attacker via github repo which holds the configuration file threading : To perform some task in threads os : To runs some system commands importlib : to import the library if not exist base64 : to perform th...