Hey There, I'm Sourya from India and Creative World is my website, I provide services on Music production, Graphics & Web Design, UI/UX, Tshirt design, Illustration, Photography, Hardware Networking, Cyber security, Ethical Hacking, Website Vulnerability analysis, SEO, Digital Marketing, Paid ad campaign Management, also provide Tutorials and coaching on various topics, Also I'm a certified Yoga trainer and Calisthenics Instructor. B.Tech in CSE and BFA in fine art. And a freelancer.
IP addresses are generally divided into 3 classes.
Class A: 0.0.0.0 - 127.255.255.255
Class B: 128.0.0.0 - 191.255.255.255
Class C: 192.0.0.0 - 223.255.255.255
A public IP address is an IP address that can be accessed directly over the internet and is assigned to your network router by your internet service provider (ISP). Your personal device also has a private IP that remains hidden when you connect to the internet through your router's public IP.
A private IP address is an address your network router assigns to your device. Each device within the same network is assigned a unique private IP address, this is how devices on the same internal network talk to each other. When you type ipconfig or ifconfig then your computer shows you the private IP of your device eg:- 192.168.xxx.xxx
An IP packet consists of mainly 6 parts:-
Header:- It contains the header and version information of an IP address.
Checksum:- This field is used to keep the checksum value of the entire header which is then used to check if the packet is received error-free.
Source address:- 32-bit address of the Sender (or source) of the packet.
Destination Address:- 32-bit address of the Receiver (or destination) of the packet.
Options:- This is an optional field, which is used if the value of IHL is greater than 5. These options may contain values for options such as Security, Record Route, Time Stamp, etc.
Data:- It contains the actual information which that data packet contains
An IP packet can max 64Kb in length.
IP addresses are classified into 3 categories mainly Class A, B, C. Except this D and E also exist but they are used for another purpose. D used for multicast purpose and E for experimental purpose.
Ethical Hacking for Beginners (Chapter-7)
Networking Protocols and Models
Networking Protocols:-
A network protocol is an established set of rules that determine how data is transmitted between different devices in the same network. Essentially, it allows connected devices to communicate with each other, regardless of any differences in their internal processes, structure, or design.
List of network protocols:-
Transmission Control Protocol (TCP)
Internet Protocol (IP)
User Datagram Protocol (UDP)
Post office Protocol (POP)
Simple mail transport Protocol (SMTP)
File Transfer Protocol (FTP)
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol Secure (HTTPS)
Telnet
Gopher
Some other non-popular protocols:-
ARP (Address Resolution Protocol)
DHCP (Dynamic Host Configuration Protocol)
IMAP4 (Internet Message Access Protocol)
SIP (Session Initiation Protocol)
RTP (Real-Time Transport Protocol)
RLP (Resource Location Protocol)
RAP (Route Access Protocol)
L2TP (Layer Two Tunnelling Protocol)
PPTP (Point To Point Tunnelling Protocol)
SNMP (Simple Network Management Protocol)
TFTP (Trivial File Transfer Protocol)
NAT:- Network address translation (NAT) is a method of mapping an IP address space into another by modifying network address information in the IP header of packets while they are in transit across a traffic routing device.
The NAT device accepts requests to traverse the internet from an internal machine. It then records that machine's IP address in a table and converts the IP address to the external IP address of the router. When the packet returns from its destination, the NAT device looks into its saved table of the original request and forwards the packet to the internal IP address of the system that made the original request within the LAN. And this process is so fast that one can’t even realize this whole conversion is happening on the back end.
OSI Model:-
The OSI Model consists of 7 layers. They are:-
Application Layer (Application Connected to the internet)
Presentation Layer (Standard data representation for application)
Session Layer (Manage session among applications)
Transport Layer (End to end error detection and correction)
Network Layer (Handle connection to the network by a higher layer)
Data Link Layer (provide safe communication of data over the physical network)
Physical layer (Define the physical characteristics of the network)
*Where First 3 are Software Layer and Last 3 are Hardware layer and the Middle one Transport Layer is the heart of OSI Model
We will dive deep into all of these layers in another chapter.
TCP/IP Model:-
TCP/IP model consists of 4 layers only.
Application Layer (In this layer App and processes running on the network.)
Transport layer (Provides end to end data delivery service)
Internet Layer (Make datagram and handles data routines)
Network Layer (Provides routines allowing access to the physical network)
Will discuss all of these layers in detail in the future.
In the next chapter, we will discuss IP Addresses in detail.
Till then Happy Learning!
Ethical Hacking for Beginners (Chapter-6)
Networking Basics
What is Networking?
A network refers to two or more connected computers that can share resources such as data, a printer, an Internet connection, applications, or a combination of these resources.
Types of Network:-
1. LAN (Local Area Network):- Mostly covers buildings or a set of closely related buildings
2. MAN (Metropolitan Area Network):- Covers a metropolitan area or a small geographic area such as a small town.
3. WAN (Wide Area Network):- Covers countries, or a large geographic area.
Open System:- A system that is connected to internet and ready to communicate is called open system
Closed System:- A system is not connected to the internet and can’t be communicated with.
Network topologies:- The arrangement of devices connected to a network.
Some examples are:- Star, bus, Delta, ring, mesh, point to point, daisy chain, tree, hybrid etc.
image source:- Wikimedia commons
Network Components:- A network connection may have multiple other devices by which communication also occurs. Eg:- Router, switch, hub, bridge, wireless router, etc.
Unique identifiers of a network:-
Each device in a network is associated with some unique identifiers by using which a device can be identified.
1. Host Name:- Each device in the network is associated with a unique device name known as Hostname which you can get t know by typing “hostname” in the command prompt (without quotation)
2. IP Address:- It is the logical address of a device connected to a network. It is a unique number assigned to every device connected to the internet. It has 2 versions IPv4 (32 bit long) and IPv6 (128 bit long). You can see it by typing “iconfig” in the command prompt for windows and “ifconfig” in Linux (without quote)
3. MAC Address:- This is the physical address. It is the unique identifier attached with each device NIC card (network interface card). It is 48 bit long. You can check it by using the same command “ipconfig/all”
4. Port:- Can be referred to as a logical channel using which data packets are transferred to any applications. It is a 16-bit long integer number and we have 216 ports available. Start from 0-65535 total 65536 ports. You can check by typing “netstat -a” by typing in the command prompt which ports are currently being used.
List of some important ports:-
20 FTP
21 FTP
22 SSH
23 Telnet
25 SMTP
53 DNS
69 TFTP
80 HTTP
88 Kerberos
110 POP3
123 NTP
135 Microsoft's RPC
137-139 Microsoft's NetBIOS
143 IMAP
161 SNMP
389 LDAP
443 HTTPS or HTTP over SSL
445 SMB
500 IKE
514 syslog
3389 RDP
5. Socket:- Combination of port and IP address is called socket.
In the next chapter, we will discuss some networking protocols.
Till then Happy Learning!.
Ethical Hacking for Beginners (Chapter-5)
Linux Commands Part-2
In the previous chapter, we learned about some Linux commands which are mostly used as shortcuts. But in this chapter, we will discuss some Linux commands which are terminal based. There are so many apart from these which we will discuss during the next chapters. But these are the commonly used and most important ones.
Here are some useful Linux Commands:-
Directory Commands:-
sudo:- superuser is the most important Linux command used to get superuser(System Admin) permission.
apt-get:- used to install/ update/ upgrade/ remove any software package or the entire operating system. The most powerful command for front-end package manager for Linux.
pwd :- Used to display the current working directory
cp:- used to copy a file
chmod:- used to change the mode of a file system
cat:- used to concatenate files and view the result in terminal
echo:- used to display a text or a string as an output.
clear:- used to clear the terminal screen
mkdir:- This command used to create a new directory under any directory
rmdir:- Used to delete a directory.
ls:- This command is used to display a list of content of a directory.
log:- used to check the log
cd:- Used to change the current directory.
history:- used to see the previously used command by a user
grep:- used to find text in a file
reboot:- used to reboot the system.
touch:- used to make a blank new file.
locate:- used to locate a file
df:- used to check the system disk space usage.
head:- used to check the first line of any text file
tail:- used to check the last line of any text file.
chown:- used to change the ownership of a file.
jobs:- used to check the currently running jobs with their statuses.
kill:- used to terminate any program manually.
ping:- used to check your internet connectivity status.
ifconfig:- used to check your internet configuration along with your IP and other info. It's a very useful and most important command.
zip/unzip:- used to compress/ decompress (zip/unzip) a file
ls command:-
-a:- show all including hidden
-R:- Recursive list
-r:- reverse order
-t:- sort by last modified
-S:- sort by file size
-l:- long listing format
-1:- One file per line
-m:- comma-separated output
-Q:- Quoted output
wc command:-
Used to count words
wc -c : Displays the count of bytes in a file.
wc -l : Prints the number of lines in a file.
wc -L : prints only the length of the longest line in a file.
wc -m : prints the count of characters from a file.
wc -w : prints the number of words in a file.
In the upcoming chapters, we will discuss some basic networking
concepts. Till then Happy Learning!.
Ethical Hacking For Beginners (Chapter-4)
Linux Commands(Part-1)
In Ethical Hacking Linux (Kali Linux) is being considered as the most used OS by attackers and cyber security professionals. And The biggest reason is:-
1. It is Open source (In most of the cases you don't have to spend money to buy this OS and most of its applications also you can get free updates as this is open-source. Bugs are being patched as soon as they are spotted because
there is not a specific group of developers who work as Linux developers,
everyone who has knowledge of Linux development can be developer and as soon
as they find any bug they report it and fix it asap. So a wide range of people
work here so finding an unpatched bug here is not easy here, and that's why
it's considered the most secure/ safest OS as well.
2. Reason 2 is highly customizable, as it is open source it allows the user to
see its source code and let them change as per their requirement. Also, most
of its applications don’t want root-level permission. So, there is no such
security concern here to install any unknown application. And most importantly
it’s most of the applications are CLI-based, meaning it shows its user what's
going on behind the screen. So the user can see it and if they find anything
unusual they can act accordingly.
3. Another reason is its virus-proof. Now, virus-proof doesn't mean that it's
not affected virus or Linux virus does not exist. It means It’s not affected
by viruses, not as much as windows get. Because executable files do not exist
for Linux(.exe) they treat exe as a text file(until you don’t use wine). So if
someone tries to hide a payload in an exe and wait for the victim to double
click it, in a Linux environment it will not gonna work out. In simple terms
most of its application comes as package installer(.tar.gz) or Debian
package(.deb). And user can easily check its permission and in most of the
cases its install through the terminal(Similar to command prompt) so the user
can track each and every step that what's going on behind the screen and if it
needs root permission it also inform the user that it needs root permission,
by default it does not takes root always We will deep dive into this later on
the Linux chapter.
4. And the reason behind Linux virus-proof is Most of the Linux users are
computer experts, so they never randomly double click on any unknown file to
blow up their pc without knowing what's gonna happen with that file!
So, Linux is not such a complicated OS or you shouldn't have to be a computer
expert to use Linux. Anyone can use Linux these days. Because most of its
applications are getting user-friendly day by day and getting GUI-based. But
you need to know some basic or essential Linux commands to operate it
smoothly.
In Ethical hacking, we use Kali Linux which is also a Linux Distribution. But
its made for security professionals because it comes with in-built so many
useful penetration testing tool and some more modification which comes handy
while penetration testing.
Here are some Useful Linux Keyboard shortcuts:-
Basic editing
Ctrl+X -Cut line (empty selection)
Ctrl+C -Copy line (empty selection) Alt+ ↓ / ↑ Move line down/up
Ctrl+Shift+K -Delete line
Ctrl+Enter / Ctrl+Shift+Enter -Insert line below/ above
Ctrl+Shift+\ -Jump to matching bracket
Ctrl+] / Ctrl+[ -Indent/Outdent line Home / End Go to beginning/end of line
Ctrl+ Home / -End Go to beginning/end of file
Ctrl+ ↑ / ↓ -Scroll line up/down Alt+ PgUp / PgDn Scroll page up/down
Ctrl+Shift+ [ / ] -Fold/unfold region
Ctrl+K Ctrl+ [ / ] -Fold/unfold all subregions
Ctrl+K Ctrl+0 / Ctrl+K Ctrl+J -Fold/Unfold all regions
Ctrl+K Ctrl+C -Add line comment
Ctrl+K Ctrl+U -Remove line comment
Ctrl+/ -Toggle line comment
Ctrl+Shift+A -Toggle block comment
Alt+Z -Toggle word wrap
File management
Ctrl+N -New File
Ctrl+O -Open File...
Ctrl+S -Save
Ctrl+Shift+S -Save As...
Ctrl+W -Close
Ctrl+K Ctrl+W -Close All
Ctrl+Shift+T -Reopen closed editor
Ctrl+K -Enter Keep preview mode editor open
Ctrl+Tab -Open next
Ctrl+Shift+Tab -Open previous
Ctrl+K P -Copy path of active file
Ctrl+K R -Reveal active file in Explorer
Ctrl+K O -Show active file in new window/instance
Debug
F9 -Toggle breakpoint
F5 -Start / Continue
F11 / Shift+F11 -Step into/out
F10 -Step over
Shift+F5 -Stop
Ctrl+K Ctrl+I -Show hover
In the next chapter, we will discuss more mostly used Linux commands.
Till then keep exploring and Happy Learning.
Ethical Hacking For Beginners (Chapter-3)
Steps used in Ethical Hacking:-
There are mainly 5 steps in ethical hacking/ cyber security.
1. Reconnaissance
2. Scanning
3. Gaining Access
4. Maintaining Access
5. Clearing Track
1. Reconnaissance:-
The process of collecting information about your defined target in depth is known as reconnaissance. Attackers perform this step before diving into any hacking attack. It’s basically a data collection procedure for the targeted victim. It contains several smaller steps also that are:-
- Footprint:- Gathering data about the target system. It mostly scans the OS, firewall, IP address, Server details, ISP/ VPN details of the target system.
- Enumeration:- This is the substep of reconnaissance where the attacker tries to find out the victim’s Name, System’s name( for future attack mostly social engineering attacks.
- Scanning:- The most important step is to find all the machines/ servers in a network/ framework (mostly in LAN mode) associated with a networking device (router) and scan it's an open port for performing an attack to compromise a group of systems or an organization.
2. Scanning:-
The second step after defining and doing background research about
the target victim/ system/ organization.
There are a few types of scanning attempts attackers do they are
mostly:-
- Network Scan:- Scanning of victim’s computer’s Open ports, IP address, the running process in that system, OS details, system configuration etc.
- Port Scan:- It’s similar to finding the backdoor of the victim’s system by using which attacker will gain access later. It include TCP/UDP port scans also
- Vulnerability Scan:- FInding the weakness of the victim's system. Now weakness depends upon various factors. The most common weakness(Vulnerability) is OS vulnerability(outdated OS) and Network vulnerability(Unencrypted network/ using public network/Wifi). And some others are not using firewalls, using unauthenticated software/ keygen which mostly contains malware.
3. Gaining Access:-
Now comes the actual step. Gaining access to the victim's system. There are several methods available for gaining access. Most common are:-
- Password cracking:- most common password cracking methods are brute force, dictionary attack, rainbow table attack, phishing, social engineering, malware attack.
- Unsecured Network:- If the victim using a network which don’t have any encryption, or using any public network,
- Spyware:- Most common method, sending spyware through email, any software or through any communication medium to the victim's system and gaining access to that system through that spyware. (mostly trojan)
- Session Hijacking/ Man in the middle:- This attack is performed using session cookie hijacking from the victim’s browser or through getting access to the victim's unprotected network. And in this case, the attacker silently captures the in/outbound data transmitting from the victim's system.
- Phishing attack:- In this case victim is being tricked by the attacker to enter his/her credentials to a fake website/ system without identifying that fake system. Most attackers send a fake link through mail/ other communication medium pretending to be a legitimate authority.
- Data Breach:- Nowadays it is the most common way of getting the victim of cyber fraud. And it’s out of the end user’s control. Most attackers target the big companies’ user database and find out user information, id card, email id, location, and in fact credit card details too.
To avoid this type of attack users are always warned to change their
credentials at least once in a month(basically password/ security
pin). And never share any sensitive information through phone or mail
without being sure that the person on the other side of the phone/
mail is 100% legitimate.
4. Maintaining access:-
The step is when an attacker tries to maintain the access/ ownership which he gained over the victim’s machine. For this step, they use the backdoor,
rootkit, rat, trojans, etc. And they try to upload sensitive data from the victim’s pc to their server or system. (which they use at a later
point of time for blackmailing/ threatening the victim) And after that
in some cases, they lock(Encrypt) the victim’s PC and ask for ransom
(bribe) to unlock the PC(Ransomware attack). And mostly they just take the ransom and fly away.
5. Clearing Track:-
After performing a successful attack the attacker clears all the evidence of that attack so that cyber forensic experts can’t trace back them or can’t take any legal action. In this step attackers mostly clear all the
log files from the victim's PC as well as their own PC too, Clears up all
connections which they established, destroy all the payloads, rootkits,
rats, trojans, etc. And in some cases, they also destroy their systems too
after backing up all the data from it so that nobody can’t trace it back
them.
In the next chapter, we will discuss Linux. So stay tuned and Happy
Learning!.
Ethical Hacking For Beginners (Chapter-2)
In this Chapter of the Ethical Hacking for Beginners series, we are going
to learn some of the most used Ethical Hacking Terminologies.
Which you'll need to understand how ethical hacking works.
Some Ethical Hacking Terminologies:-
- Adware:- A piece of code/ Software/ script used to show forcefully ads by getting into your system/ browser without your permission.
- Attack:- An action performed to get into your system forcefully without your permission.
- Backdoor:- Basically a method of bypassing authentication in a computer/ system/network. Used by Trojan mainly for obtaining remote access to your system. And spying upon you.
- Breach:- When a hacker successfully exploits a system and gains access to that system or its files or network and most of the cases leak sensitive data or sells them.
- Bugs:- A vulnerability/ weakness in a system/ software/ network/ device. Which was made by developers unintentionally or by mistake.
- Bot:- Short form of robot. Basically, an automated program is used to perform the same task repeatedly for a huge number of time. Like trying different passwords in a login form to get access, where there is no human interaction. The whole script is being run by that bot.
- Buffer Overflow:- A flaw in a program that leads to overflow in a memory block (called buffer memory) by entering data more than the capacity of that memory block and making other data overwritten by that newly entered data and in most of the cases gaining access to that system.
- Deep Fake:- And edited audio or video clip manipulated to seem real or believable. Mostly created/ edited using softwares.
- Encryption:- Process of encoding data to prevent data theft. Only decoded by a virtual key(secret set of data(string))
- Exploit:- A piece of code/ script/ software used to take advantage of a bug or may be to compromise the security of a computer system.
- Pentesting:- Short of Penetration Testing. means of evaluating security using hacker tools and techniques with the aim of discovering vulnerabilities and evaluating security flaws.
- Quarantine:- The process of isolating a file suspected of being infected with a virus in a storage device in order to prevent it from contaminating other files or other drives. Antivirus uses this feature to prevent virus infection in a system.
- Spam:- An unsolicited email/ junk email sent to a group of recipients without their consent. Mostly for advertising or hacking(phishing) purposes.
- Threat:- Possible danger which can compromise a system/ network using a vulnerability/ exploit.
- Vulnerability:- A weakness in a system/ program/ network by using which a hacker can gain access in that system and compromise that system.
These are some of the most important terminologies for ethical hacking.
There are so many others also. Will discuss and introduce those later
during the tutorial.
Ethical Hacking for Beginners (Chapter -1)
What is Ethical Hacking?
Hacking is basically the activity of identifying a vulnerable (Weak)
computer system or a computer network and gaining access(penetrate through)
to that system to get personal data or compromise that system or take over
that system. Ethical hacking is that same thing but doing it legally or
ethically (you can say ‘safe practice’) by taking permission(Mostly written)
from that authority on which you are going to penetrate through their system
so that if anything happens (damage) by your side unintentionally to that
authority or to someone who is connected with that authority, they can’t sue
you up.
Types of Hackers:-
These are Major types of hackers you can see through the globe:-
- Blackhat Hackers(Crackers):- These are the bad guys. Who gains unauthorized access to a system. And steal personal data/ money, misuse them or may compromise or damage your system, violate policy regulations, or may blackmail you for anything(mostly money or sensitive data).
- Whitehat Hackers(Ethical Hackers):- These are the good guys or you can say Cyber Security tester. Who can hack into your system with your permission and let you know about your system's vulnerability or let you know about new security threats and vulnerabilities to make you safe from the latest security threat or data breach.
- Greyhat Hackers(Mixed of two):- These are the mixed kind of guys who may be doing hacking for fun or may be trying to be cool by doing hacking activity. They might hack into your system without your permission or may contact you to let you know your system’s vulnerability. Or may sell your personal data, that totally depends upon them.
Apart from these are the 3 types you can see some other non-popular types
of hackers:-
- Hacktivists:- These are mostly a group of hackers or maybe an individual whose motive is to hack a system for social or political or religious reasons and after that, they just leave their message on that compromised system. In most of the cases, they don’t damage/harm the system. Eg:- Anonymous group
- Script Kiddies:- These are the newbies who have almost 0 knowledge about computer systems(Mostly Programming Language or networking) but passionate about hacking. So they copy other hackers' tools or scripts or methods to hack.
What are the skills you require to be an Ethical Hacker?
- You should have to familiar with Linux Environment
-
Basic and good understanding of Computer Networks (How network
protocols work, what is ports etc.) & Familiar with
Databases.
- Good understanding of Computer hardware(Computer Architecture, Memory blocks, Buffer, Cache, virtualization, bios, firmware) & network security(eg.- firewall, IPS, IDS, Proxy, VPN)
-
Very good understanding of Various programming/ scripting
languages ( Python, Bash, Java, HTML, PHP, C, etc.)
*If you don’t have any of these skills, don’t worry, I will teach
you everything. You just have to know how to use a computer, That's
it. Rest of all I will cover.
What are the basic types of cyber attacks?
- Malware Attack(Virus, worms, trojan, rootkit, spyware, adware, ransomware,
- Phishing Attack
- Keylogging Attack
- Man in the Middle (MITM) attack
- SQL Injection
- Denial of service (DoS) attack
- Social Engineering attack
- Zero-day Exploit attack
- DNS Spoofing attack
- Cross-site scripting (XSS) attack
- Session Hijacking attack
- Insider Threat
- Birthday Attack
- Brute Force Attack Etc.
*(Will discuss these all methods later with examples.)
What are the Safe Practices in Ethical hacking?
- Stay Legal:- Get a proper approval before penetrating through someone’s system.
- Don’t Push Your Limit:- Work in between the safe zone. This means in which area only you got the approval to work on work only in that area. (Eg.:- You got an approval of vulnerability analysis of a website from a client so you will only penetrate through that website, not the other sites it’s backlinked(connected) to)
- Respect Others Privacy:- Don’t misuse others data while you get the approval to penetrate through one’s system. Maybe in some cases you have to sign an NDA(Non-disclosure agreement). If you are found to be disobeying that agreement they can sue you up.
- Report Vulnerability:- As you’re working as an Ethical Hacker your work is to notify the organization about the vulnerability not to misuse that vulnerability.
- NEVER WORK FOR ANY UNAUTHORISED PARTY:- Yes this is the most important point which you will face several times in your Cyber Security / Ethical Hacking career, when you will be treated as an Ethical Hacker. Maybe your friend will ask you to hack his girlfriend’s Facebook account or hack someone’s website to download some premium content for free. NEVER DO THAT. I repeat NEVER DO THAT. You will get sued legally for that, and maybe your Ethical Hacking career gets spoiled as well. Who’re they to order you to penetrate through facebook’s system? Do they have a written permission from Facebook? Or from the service provider? If they gave you one, verify that, I’m sure that will be fake. Facebook never gave permission to hack an individual's personal account. Yes, they have a bug bounty program but that is another thing (I will discuss that later.). I have already faced this same issue so many times in my career.
What are the Cyber Security certifications you can get and you will need:-
- CEH (Certified Ethical Hacking) certification from EC Council
- CHFI(Computer Hacking Forensic Investigation) Certification from EC Council
- CompTIA security+
- CCNA(Cisco Certified Network Associate)
- CCNP(Cisco Certified Network Professional)
- LPT (Licenced Penetration Tester)
- NPT (Network Penetration Tester)
- WAPT(Web Application Penetration Tester)
- CND(Certified Network Defender) etc.
We will discuss some ethical hacking/ Cyber Security terminologies and their
details in the next chapters. Till then Happy learning.✌
If you have any doubts or queries please comment down below I'll try
to answer them all.