<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Darshan Sahadev Gawade</title>
    <description>The latest articles on DEV Community by Darshan Sahadev Gawade (@darshangawade).</description>
    <link>https://dev.to/darshangawade</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F481647%2F081e3f45-8a80-4c3e-9de1-eec82d820292.jpeg</url>
      <title>DEV Community: Darshan Sahadev Gawade</title>
      <link>https://dev.to/darshangawade</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/darshangawade"/>
    <language>en</language>
    <item>
      <title>Top 10 Common Types of Cyber Security Attacks</title>
      <dc:creator>Darshan Sahadev Gawade</dc:creator>
      <pubDate>Fri, 24 Sep 2021 13:33:31 +0000</pubDate>
      <link>https://dev.to/darshangawade/top-10-common-types-of-cyber-security-attacks-3k52</link>
      <guid>https://dev.to/darshangawade/top-10-common-types-of-cyber-security-attacks-3k52</guid>
      <description>&lt;h2&gt;
  
  
  1. Malware
&lt;/h2&gt;

&lt;p&gt;Malware (short for “malicious software”) is a file or code, typically delivered over a network, that infects, explores, steals or conducts virtually any behavior an attacker wants. And because malware comes in so many variants, there are numerous methods to infect computer systems.&lt;/p&gt;

&lt;h4&gt;
  
  
  Types of Malware:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Botnets&lt;/code&gt; – Short for “robot network,” these are networks of infected computers under the control of single attacking parties using command-and-control servers.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ransomware&lt;/code&gt; – Is a criminal business model that uses malicious software to hold valuable files, data or information for ransom.
Spyware – Malware that collects information about the usage of the infected computer and communicates it back to the attacker. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Trojans&lt;/code&gt; – Malware disguised in what appears to be legitimate software. Once activated, malware Trojans will conduct whatever action they have been programmed to carry out.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Virus&lt;/code&gt; – Programs that copy themselves throughout a computer or network. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Worm&lt;/code&gt; – Self-replicating viruses that exploit security vulnerabilities to automatically spread themselves across computers and networks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Phishing
&lt;/h2&gt;

&lt;p&gt;Phishing attacks are the practice of sending fraudulent communications that appear to come from a reputable source. It is usually done through email. The goal is to steal sensitive data like credit card and login information, or to install malware on the victim’s machine.&lt;/p&gt;

&lt;h4&gt;
  
  
  Types of Phishing:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Deceptive phishing&lt;/code&gt; - In this case, an attacker attempts to obtain confidential information from the victims. Attackers use the information to steal money or to launch other attacks. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Spear phishing&lt;/code&gt; - Spear phishing targets specific individuals instead of a wide group of people. Attackers often research their victims on social media and other sites.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Whaling&lt;/code&gt; - When attackers go after a “big fish” like a CEO, it’s called whaling. These attackers often spend considerable time profiling the target to find the opportune moment and means of stealing login credentials.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Pharming&lt;/code&gt; - Similar to phishing, pharming sends users to a fraudulent website that appears to be legitimate. However, in this case, victims do not even have to click a malicious link to be taken to the bogus site&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Man-in-the-Middle (MitM) Attacks
&lt;/h2&gt;

&lt;p&gt;A man-in-the-middle (MitM) attack is when an attacker intercepts communications between two parties either to secretly eavesdrop or modify traffic traveling between the two. Attackers might use MitM attacks to steal login credentials or personal information, spy on the victim, or sabotage communications or corrupt data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3w3egayap2l38f46wsn4.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3w3egayap2l38f46wsn4.JPG" alt="Man in the middle"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Denial-of-Service (DOS) Attack
&lt;/h2&gt;

&lt;p&gt;A denial-of-service (DoS) attack is a security threat that occurs when an attacker makes it impossible for legitimate users to access computer systems, network, services or other information technology (IT) resources. Attackers in these types of attacks typically flood web servers, systems or networks with traffic that overwhelms the victim's resources and makes it difficult or impossible for anyone else to access them.&lt;/p&gt;

&lt;h4&gt;
  
  
  Types of DoS attacks:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Application layer&lt;/code&gt; - These attacks generate fake traffic to internet application servers, especially domain name system (DNS) servers or Hypertext Transfer Protocol (HTTP) servers.
&lt;code&gt;Buffer overflow&lt;/code&gt; - This type of attack is one that sends more traffic to a network resource than it was designed to handle.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SYN flood&lt;/code&gt; - This attack abuses the TCP handshake protocol by which a client establishes a TCP connection with a server. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Volumetric&lt;/code&gt; - These DoS attacks use all the bandwidth available to reach network resources. To do this, attackers must direct a high volume of network traffic at the victim's systems&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. SQL Injections
&lt;/h2&gt;

&lt;p&gt;An SQL injection attack consists of an insertion or injection of a SQL query via the input data from the client to the application. SQL commands are injected into data-plane input that affect the execution of predefined SQL commands. A successful SQL injection exploit can read sensitive data from the database, modify database data (viz., insert, update, or delete), execute administrative operations on the database, recover the content of a file present in the database management system, and even issue commands to the operating system in some instances.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjcwob3ssmj9rcbimr4au.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjcwob3ssmj9rcbimr4au.JPG" alt="SQL Injection"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Zero-day Exploit
&lt;/h2&gt;

&lt;p&gt;A zero-day vulnerability, at its core, is a flaw. It is an unknown exploit in the wild that exposes a vulnerability in software or hardware and can create complicated problems well before anyone realizes something is wrong. In fact, a zero-day exploit leaves NO opportunity for detection at first.&lt;br&gt;
A zero-day attack happens once that flaw, or software/hardware vulnerability, is exploited and attackers release malware before a developer has an opportunity to create a patch to fix the vulnerability—hence “zero-day.” &lt;/p&gt;

&lt;h2&gt;
  
  
  7. Password Attack
&lt;/h2&gt;

&lt;p&gt;A password attack refers to any of the various methods used to maliciously authenticate into password-protected accounts. These attacks are typically facilitated through the use of software that expedites cracking or guessing passwords.&lt;/p&gt;

&lt;h4&gt;
  
  
  Types of Password Attacks:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Brute Force Attack&lt;/code&gt; - In a brute force attack, a hacker uses a computer program to login to a user’s account with all possible password combinations.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Dictionary Attack&lt;/code&gt; - A dictionary attack allows hackers to employ a program that cycles through common words. A brute force attack goes letter by letter, whereas a dictionary attack only tries possibilities most likely to succeed.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Rainbow Table Attack&lt;/code&gt; - A rainbow table attack is a type of hacking wherein the perpetrator tries to use a rainbow hash table to crack the passwords stored in a database system. A rainbow table is a hash function used in cryptography for storing important data such as passwords in a database.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Credential Stuffing&lt;/code&gt; -  Credential stuffing is a cyberattack method in which attackers use lists of compromised user credentials to breach into a system.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  8. Cross-site Scripting
&lt;/h2&gt;

&lt;p&gt;Cross-site Scripting (XSS) is a client-side code injection attack. The attacker aims to execute malicious scripts in a web browser of the victim by including malicious code in a legitimate web page or web application. The actual attack occurs when the victim visits the web page or web application that executes the malicious code. The web page or web application becomes a vehicle to deliver the malicious script to the user’s browser. Vulnerable vehicles that are commonly used for Cross-site Scripting attacks are forums, message boards, and web pages that allow comments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdypaufbjnjdpwn266nf2.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdypaufbjnjdpwn266nf2.JPG" alt="Cross Site Scripting"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Rootkits
&lt;/h2&gt;

&lt;p&gt;A rootkit is software used by cybercriminals to gain control over a target computer or network. Rootkits can sometimes appear as a single piece of software but are often made up of a collection of tools that allow hackers administrator-level control over the target device.&lt;/p&gt;

&lt;h4&gt;
  
  
  Types of Rootkits:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Hardware or firmware rootkit&lt;/code&gt; -  This type of malware could infect your computer’s hard drive or its system BIOS, the software that is installed on a small memory chip in your computer’s motherboard. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Memory rootkit&lt;/code&gt; - This type of rootkit hides in your computer’s RAM, or Random Access Memory. These rootkits will carry out harmful activities in the background. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Application rootkit&lt;/code&gt; - Application rootkits replace standard files in your computer with rootkit files. They might also change the way standard applications work. These rootkits might infect programs such as Word, Paint, or Notepad.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Kernel mode rootkits&lt;/code&gt; - These rootkits target the core of your computer’s operating system. Cybercriminals can use these to change how your operating system functions. They just need to add their own code to it. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  10. Internet of Things (IoT) Attacks
&lt;/h2&gt;

&lt;p&gt;IoT attacks happen when bad actors try to compromise the security of an Internet of Things (IoT) device or network.  When devices are compromised, attackers can steal or manipulate sensitive data, join IoT devices to a botnet, or take control of a system. &lt;/p&gt;

&lt;p&gt;There are billions of IoT devices in the world, which all collect loads of data in real-time.  These data, if intercepted, could supply an attacker with information about the environment in which the devices operate, about the user’s interaction with the devices, and even information about the user.  Login credentials, health data, location data, and other sensitive personal data can be used for nefarious purposes by bad actors, and all of it could be obtained through IoT attacks. &lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Ransomware Attacks</title>
      <dc:creator>Darshan Sahadev Gawade</dc:creator>
      <pubDate>Wed, 04 Nov 2020 09:24:45 +0000</pubDate>
      <link>https://dev.to/darshangawade/ransomware-attacks-lfi</link>
      <guid>https://dev.to/darshangawade/ransomware-attacks-lfi</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;What is ransomware attack?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Ransomware is malicious software that infects your computer and displays messages demanding a fee to be paid in order for your system to work again. This class of malware is a criminal moneymaking scheme that can be installed through deceptive links in an email message, instant message or website. It has the ability to lock a computer screen or encrypt important, predetermined files with a password.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Types of ransomware attack&lt;/strong&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  1.Scareware
&lt;/h3&gt;

&lt;p&gt;Scareware, as it turns out, is not that scary.  You might receive a pop-up message claiming that malware was discovered and the only way to get rid of it is to pay up. If you do nothing, you’ll likely continue to be bombarded with pop-ups, but your files are essentially safe.&lt;/p&gt;

&lt;p&gt;A legitimate cybersecurity software program would not solicit customers in this way. If you don’t already have this company’s software on your computer, then they would not be monitoring you for ransomware infection. If you do have security software, you wouldn’t need to pay to have the infection removed—you’ve already paid for the software to do that very job.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.Screen Locker
&lt;/h3&gt;

&lt;p&gt;Screen locker ransomware is a form of malware that restricts login or file access while demanding payment to lift the restriction. It’s typically deployed at the operating system (OS) level, meaning you won’t be able to use an infected computer or device. When attempting to log in or power up the computer or device, screen locker ransomware will display a pop-up demanding payment.&lt;/p&gt;

&lt;p&gt;With screen locker ransomware, you won’t be able to use the infected computer or device. It will serve a pop-up message whenever you attempt to log in to the OS. And unlike legitimate pop-ups, you won’t be able to close it.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.Encrypting ransomware
&lt;/h3&gt;

&lt;p&gt;This is the most common attack. These are the guys who snatch up your files and encrypt them, demanding payment in order to decrypt and redeliver. The reason why this type of ransomware is so dangerous is because once cybercriminals get ahold of your files, no security software or system restore can return them to you. Unless you pay the ransom—for the most part, they’re gone. And even if you do pay up, there’s no guarantee the cybercriminals will give you those files back.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;How ransomware attack works?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--A3qXT3r0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pqhdh38t81v9diy58t11.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A3qXT3r0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pqhdh38t81v9diy58t11.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are a number of vectors ransomware can take to access a computer. One of the most common delivery systems is &lt;strong&gt;phishing spam — attachments&lt;/strong&gt; that come to the victim in an email, masquerading as a file they should trust. Once they're downloaded and opened, they can take over the victim's computer, especially if they have built-in social engineering tools that trick users into allowing administrative access. &lt;/p&gt;

&lt;p&gt;There are several things the malware might do once it’s taken over the victim's computer, but by far the most common &lt;code&gt;action is to encrypt some or all of the user's files&lt;/code&gt;. But the most important thing to know is that at the end of the process, the &lt;code&gt;files cannot be decrypted without a mathematical key&lt;/code&gt; known only by the attacker. The user is presented with a message explaining that their files are now are now inaccessible and will only be decrypted if the victim sends an untraceable Bitcoin payment to the attacker.&lt;/p&gt;

&lt;p&gt;In some forms of malware, the attacker might claim to be a law enforcement agency shutting down the victim's computer due to the presence of pornography or pirated software on it, and demanding the payment of a &lt;code&gt;fine&lt;/code&gt; perhaps to make victims less likely to report the attack to authorities. But most attacks don't bother with this pretense. There is also a variation, called &lt;code&gt;leakware&lt;/code&gt; or &lt;code&gt;doxware&lt;/code&gt;, in which the attacker threatens to publicize sensitive data on the victim's hard drive unless a ransom is paid. But because finding and extracting such information is a very tricky proposition for attackers, encryption ransomware is by far the most common type.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;How to prevent ransomware attack?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fKmgFTQg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1e1gp9x8vtd2h5fxvovt.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fKmgFTQg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1e1gp9x8vtd2h5fxvovt.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Backup Your Systems locally and in The Cloud
&lt;/h3&gt;

&lt;p&gt;The first step to take is to always backup your system. Locally, and offsite.&lt;br&gt;
This is essential. First, it will keep your information backed up in a safe area that hackers cannot easily access. Secondly, it will make it easier for you to wipe your old system and repair it with backup files in case of an attack.&lt;br&gt;
Failure to back up your system can cause irreparable damage.&lt;br&gt;
Use a cloud backup solution to protect your data. By protecting your data in the cloud, you keep it safe from infection by ransomware. &lt;/p&gt;

&lt;h3&gt;
  
  
  2. Segment Network Access
&lt;/h3&gt;

&lt;p&gt;Limit the data an attacker can access with network segmentation security. With dynamic control access, you help ensure that your entire network security is not compromised in a single attack. Segregate your network into distinct zones, each requiring different credentials.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Early Threat Detection Systems
&lt;/h3&gt;

&lt;p&gt;You can install ransomware protection software that will help identify potential attacks. Early unified threat management programs can find intrusions as they happen and prevent them. These programs often offer gateway antivirus software as well.&lt;br&gt;
Use a traditional firewall that will block unauthorized access to your computer or network.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Install Anti Malware / Ransomware Software
&lt;/h3&gt;

&lt;p&gt;The security software should consist of antivirus, anti-malware, and anti-ransomware protection. It is also crucial to regularly update your virus definitions.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Run Frequent Scheduled Security Scans
&lt;/h3&gt;

&lt;p&gt;All the security software on your system does no good if you aren’t running scans on your computers and mobile devices regularly.&lt;br&gt;
These scans are your second layer of defense in the security software. They detect threats that your real-time checker may not be able to find.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>SQL Injection</title>
      <dc:creator>Darshan Sahadev Gawade</dc:creator>
      <pubDate>Sun, 04 Oct 2020 14:13:50 +0000</pubDate>
      <link>https://dev.to/darshangawade/sql-injection-2eco</link>
      <guid>https://dev.to/darshangawade/sql-injection-2eco</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;What is SQL Injection ?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;SQL injection is one of the most used and most common web based attack. For SQL injection to work , one require a web application that uses a database.&lt;/p&gt;

&lt;p&gt;Consider a example, where a web application using a database , this web application might be taken input from the user storing the information onto the database or it may fetching any data from the database and displaying data to the user.In this process a database query is created which is sent to the database and this query get executed on the database and hence any related data is displayed on user side.&lt;/p&gt;

&lt;p&gt;In SQL injection, user manipulate this query sent this malicious query to batabase  , it execute there and relevant result are displayed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmk0sx5a499lgo3ox3bn8.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmk0sx5a499lgo3ox3bn8.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;SQL Injection is a code injection technique used to execute malicious SQL statements.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A successful SQL injection attack is capable of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modifying, altering or deleting data from the database&lt;/li&gt;
&lt;li&gt;Reading and extracting sensitive and confidential data from the database&lt;/li&gt;
&lt;li&gt;Retrieving the content of a specific file present on the database management system (DBMS)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Types of SQL injection attack&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe491004nh2jj3csq7y4j.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe491004nh2jj3csq7y4j.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.In-band SQLi (Classic SQLi)&lt;/strong&gt;&lt;br&gt;
In-band SQL Injection is the classic SQLi technique and is the most common and easy-to-exploit of SQL Injection attacks.This type of attack takes place when an attacker is able to use the same communication channel to both launch the attack and gather results from it.&lt;/p&gt;

&lt;p&gt;The types of in-band SQL Injection are Error-based SQLi and Union-based SQLi.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Error-based SQLi&lt;br&gt;
Error-based SQLi is an in-band SQL Injection technique that relies on error messages thrown by the database server to obtain information about the structure of the database. In some cases, error-based SQL injection alone is enough for an attacker to enumerate an entire database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Union-based SQLi&lt;br&gt;
Union-based SQLi is an in-band SQL injection technique that leverages the UNION SQL operator to combine the results of two or more SELECT statements into a single result which is then returned as part of the HTTP response.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2.Inferential SQLi (Blind SQLi)&lt;/strong&gt;&lt;br&gt;
Inferential SQL Injection,  may take longer for an attacker to exploit. It is the most dangerous form of SQL Injection. In an inferential SQLi attack, no data is actually transferred via the web application but the attacker is able to reconstruct the database structure by sending payloads, observing the web application’s response and the resulting behavior of the database server.&lt;/p&gt;

&lt;p&gt;The types of inferential SQL Injection are Blind-boolean-based SQLi and Blind-time-based SQLi.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Boolean-based  Blind SQLi&lt;br&gt;
Boolean-based SQL Injection is an inferential SQL Injection technique that depends on sending an SQL query to the database which forces the application to return a different result depending on whether the query returns a TRUE or FALSE result.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Time-based Blind SQLi&lt;br&gt;
Time-based SQL Injection is an inferential SQL Injection technique that depends on sending an SQL query to the database which forces the database to wait for a specified amount of time (in seconds) before responding. The response time will indicate to the attacker whether the result of the query is TRUE or FALSE.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3.Out-of-band SQLi&lt;/strong&gt;&lt;br&gt;
Out-of-band SQL Injection occurs when an attacker is not able to use the same channel to launch the attack and gather results from it i.e when two different channel is used.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;How SQL injection works ?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In most of the web application ,first page is login page where user has to input their credentials to open it.&lt;/p&gt;

&lt;p&gt;SQL query can be written is &lt;br&gt;
select * from database_table&lt;br&gt;
where username=&lt;code&gt;' '&lt;/code&gt;  and password=&lt;code&gt;' '&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Malicious query is&lt;br&gt;
select * from database_table&lt;br&gt;
where username=&lt;code&gt;'&lt;/code&gt;&lt;strong&gt;'OR 1=1--&lt;/strong&gt;&lt;code&gt;'&lt;/code&gt;  and password=&lt;code&gt;' '&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In SQL injection 'OR' logic is use. User don't have control over sql query and but have control over input . In above example &lt;code&gt;OR 1=1--&lt;/code&gt; is always return true, first inverted comma [&lt;code&gt;'&lt;/code&gt;] is used to close the string parameter, &lt;code&gt;1=1&lt;/code&gt; is always true and  &lt;code&gt;--&lt;/code&gt; is used to comment the remaining sql query &lt;br&gt;
Thus the entire query becomes true and it get executed.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;How to use SQL injection ?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;GET Method :&lt;br&gt;
In GET method data is sent to database through the url of the request due to which it is visible in the url.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Example : https://localhost/index.php?username=abc&amp;amp;password=pass123  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the url data can be easily seen , to apply sql injection we insert the above malicious string .&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faxf01y32w4w38fo989p1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faxf01y32w4w38fo989p1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;POST Method :&lt;br&gt;
In POST method data which is being sent is not visible in the url.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Example : https://localhost/index.php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In post method , to use sql injection enter the malicious string into the input box as shown above.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9dcqgv2utt14wg717xg4.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9dcqgv2utt14wg717xg4.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How to prevent SQL injection ?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In the database prepare and bind parameter is used.bind parameter holds malicious string as a single string&lt;/p&gt;

&lt;p&gt;select * from database_table&lt;br&gt;
where username='&lt;code&gt;'OR 1=1--&lt;/code&gt;'  and password='&lt;code&gt;'OR 1=1--&lt;/code&gt;'&lt;/p&gt;

&lt;p&gt;when bind parameter is used &lt;code&gt;'OR 1=1--&lt;/code&gt; is considered as single string and this statement becomes false as inverted comma is not closing, thus string is logically incorrect.&lt;br&gt;
Therefore bind parameter is used to prevent SQL injection . This is a one method of SQL injection.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Monoalphabetic Cipher</title>
      <dc:creator>Darshan Sahadev Gawade</dc:creator>
      <pubDate>Sun, 04 Oct 2020 10:24:56 +0000</pubDate>
      <link>https://dev.to/darshangawade/monoalphabetic-cipher-30g3</link>
      <guid>https://dev.to/darshangawade/monoalphabetic-cipher-30g3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Monoalphabetic cipher is one where each character of a plain text is mapped to a fixed other character of cipher text. The relationship between a character in the plain text and the characters in the cipher text is one-to-one.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Example : if a plain text has a character ‘a’  and any key then if it convert into other character say ‘t’ so wherever there is ‘a’ character in plain text it will be mapped to character ‘t’ ,Therefore it is called as monoalphabetic cipher.  &lt;/p&gt;

&lt;p&gt;It is a simple type of substitution cipher. Monoalphabetic ciphers are not that stronger as compared to polyalphabetic cipher.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fquoy8qurvyxwy57rg51x.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fquoy8qurvyxwy57rg51x.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Types of monoalphabetic cipher are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Additive Cipher&lt;/li&gt;
&lt;li&gt;Caesar Cipher&lt;/li&gt;
&lt;li&gt;Multiplicative Cipher&lt;/li&gt;
&lt;li&gt;Affine Cipher&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Additive cipher&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Additive cipher is the type of monoalphabetic substitution cipher, in which the each character of a plain text is mapped by some other character depending upon the value of key.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Example: If the plain text contain alphabet 'B' and the value of key is '4', then the alphabet 'B' will be replaced by the alphabet 'F' i.e the 4th alphabet after 'B' .&lt;/p&gt;

&lt;p&gt;Mathematical Representation is&lt;/p&gt;

&lt;p&gt;Encryption process :&lt;br&gt;
&lt;code&gt;C=( P + k) mod 26&lt;br&gt;
where, 'P' is the character in plain text, 'K' is the key and 'C' is the required cipher&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Decryption process :&lt;br&gt;
&lt;code&gt;P=( C - k) mod 26&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Python program for Encryption and Decryption process :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

# Encryption part
def encrypt(message, key):
    cipher = ""
    for i in message:
        if i.isupper():
            cipher += chr((ord(i) + key - 65) % 26 + 65)
        elif i.islower():
            cipher += chr((ord(i) + key - 97) % 26 + 97)
        else:
            cipher+=" "

    return cipher

message = input("Enter the message:")
key = input("Enter the key numeric value or any alphabet:")
if key.isupper():
    key = ord(key) - 65
elif key.islower():
    key = ord(key) - 97
else:
    key = int(key)
print("Cipher:", encrypt(message, key))

# Decryption part
def decrypt(cipher, key):
    message = ""
    for i in cipher:
        if i.isupper():
            message += chr((ord(i) - key - 65) % 26 + 65)
        elif i.islower():
            message += chr((ord(i) - key - 97) % 26 + 97)
        else:
            message+=" "
    return message


cipher = input("Enter the cipher:")
key = input("Enter the key numeric value or any alphabet:")
if key.isupper():
    key = ord(key) - 65
elif key.islower():
    key = ord(key) - 97
else:
    key = int(key)
print("Message", decrypt(cipher, key))


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;OUTPUT :&lt;br&gt;
&lt;em&gt;Enter the message:hello everyone&lt;br&gt;
Enter the key numeric value or any alphabet:19&lt;br&gt;
Cipher: axeeh xoxkrhgx&lt;br&gt;
Enter the cipher:axeeh xoxkrhgx&lt;br&gt;
Enter the key numeric value or any alphabet:19&lt;br&gt;
Message: hello everyone&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Caesar Cipher&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Caesar cipher is the most simplest form of cipher, it is similar to additive cipher .In caesar cipher the value of  key is always '3'.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mathematical Expression is &lt;/p&gt;

&lt;p&gt;Encryption process&lt;br&gt;
&lt;code&gt;C=(P + K) mod 26&lt;br&gt;
where, 'P' is the character in plain text, 'K' is the key  (k=3) and 'C' is the required cipher&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Decryption process&lt;br&gt;
&lt;code&gt;P=(C - K) mod 26&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Python program for Caesar Cipher&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

#Additive cipher is similar to caesar cipher ,in caesar cipher key is always '3'
# Encryption part
def encrypt(message, key):
    cipher = ""
    for i in message:
        if i.isupper():
            cipher += chr((ord(i) + key - 65) % 26 + 65)
        elif i.islower():
            cipher += chr((ord(i) + key - 97) % 26 + 97)
        else:
            cipher+=" "

    return cipher

message = input("Enter the message:")
print("Cipher:", encrypt(message, 3))

# Decryption part
def decrypt(cipher, key):
    message = ""
    for i in cipher:
        if i.isupper():
            message += chr((ord(i) - key - 65) % 26 + 65)
        elif i.islower():
            message += chr((ord(i) - key - 97) % 26 + 97)
        else:
            message+=" "
    return message

cipher = input("Enter the cipher:")
print("Message: ", decrypt(cipher, 3))


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;OUTPUT:&lt;br&gt;
&lt;em&gt;Enter the message:hello everyone&lt;br&gt;
Cipher: khoor hyhubrqh&lt;br&gt;
Enter the cipher:khoor hyhubrqh&lt;br&gt;
Message:  hello everyone&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Multiplicative Cipher&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;In multiplicative cipher, character of a plain text is multiplied with the key and then modulus function is applied on it. It is a type of monoalphabetic substitution cipher hence it is not a stronger cipher.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mathematical Expression &lt;/p&gt;

&lt;p&gt;Encryption process&lt;br&gt;
&lt;code&gt;C=(P * K) mod 26&lt;br&gt;
where, 'P' is the character in plain text, 'K' is the key and 'C' is the required cipher&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Python program for Multiplicative Cipher&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

#Encryption
def check(c):
        if c.isupper():
                c=ord(c)-65
        elif c.islower():
                c=ord(c)-97
        else:
                c=int(c)
        return c

def encrypt(message,k):
        cipher=""
        for i in message:
                if i.isupper():
                        cipher+=chr(((ord(i)-65)*k)%26+65)
                elif i.islower():
                        cipher+=chr(((ord(i)-97)*k)%26+97)
                else:
                        cipher+=" "
        return cipher

message=input("Enter the message:")
k=input("Enter the keys, numeric value or any alphabet:")
k=check(k)

print("Cipher:",encrypt(message,k))

#Decryption part
def getCoeff(d):
        for i in range(1,26):
                j=int(1)
                eqn=int(1)
                while(eqn&amp;gt;=1):
                        eqn=26*i-d*j
                        if eqn==1:
                                return -j
                        j=j+1

def decrypt(cipher,k):
        message=""
        k=getCoeff(k)
        for i in cipher:
                if i.isupper():
                        message+=chr(((ord(i)-65)*k)%26+65)
                elif i.islower():
                        message+=chr(((ord(i)-97)*k)%26+97)
                else:
                        message+=" "
        return message

cipher=input("Enter the cipher:")
k=input("Enter the key, numeric value or any alphabet :")
k=check(k)

print("Message:",decrypt(cipher,k))


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;OUTPUT :&lt;br&gt;
&lt;em&gt;Enter the message:hello everyone&lt;br&gt;
Enter the keys, numeric value or any alphabet:3&lt;br&gt;
Cipher: vmhhq mlmzuqnm&lt;br&gt;
Enter the cipher:vmhhq mlmzuqnm&lt;br&gt;
Enter the key, numeric value or any alphabet :3&lt;br&gt;
Message: hello everyone&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Affine Cipher&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Affine  cipher is the stronger cipher among the additive and multiplicative cipher. Affine cipher consists of two keys as it a combination of additive and multiplicative cipher .&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mathematical Expression is&lt;/p&gt;

&lt;p&gt;Encryption process&lt;br&gt;
&lt;code&gt;C=( P *k1 + k2) mod 26&lt;br&gt;
where, P is the character in plain text, K1 is multiplicative key ,K2 is additive key ,C is the character in cipher.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Decryption process&lt;br&gt;
&lt;code&gt;P=( (C- k2 ) / k1 ) mod 26&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Python program for Affine Cipher .&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

#Encryption
def check(c):
        if c.isupper():
                c=ord(c)-65
        elif c.islower():
                c=ord(c)-97
        else:
                c=int(c)
        return c

def encrypt(message,a,b):
        cipher=""
        for i in message:
                if i.isupper():
                        cipher+=chr(((ord(i)-65)*a+b)%26+65)
                elif i.islower():
                        cipher+=chr(((ord(i)-97)*a+b)%26+97)
                else:
                        cipher+=" "
        return cipher

message=input("Enter the message:")
#’a’ is multiplicative key
#’b’ is additive key
a,b=input("Enter the two keys, numeric value or any alphabet separated spaces:").split()
a=check(a)
b=check(b)

print("Cipher:",encrypt(message,a,b))

#Decryption part
def getCoeff(a):
        for i in range(1,26):
                j=int(1)
                eqn=int(1)
                while(eqn&amp;gt;=1):
                        eqn=26*i-a*j
                        if eqn==1:
                                return -j
                        j=j+1

def decrypt(cipher,a,b):
        message=""
        a=getCoeff(a)
        for i in cipher:
                if i.isupper():
                        message+=chr(((ord(i)-65-b)*a)%26+65)
                elif i.islower():
                        message+=chr(((ord(i)-97-b)*a)%26+97)
                else:
                        message+=" "
        return message

cipher=input("Enter the cipher:")
a,b=input("Enter the two keys, numeric value or any alphabet seperated by spaces:").split()
a=check(a)
b=check(b)

print("Message:",decrypt(cipher,a,b))


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;OUTPUT :&lt;br&gt;
&lt;em&gt;Enter the message: hello everyone&lt;br&gt;
Enter the two keys, numeric value or any alphabet separated spaces:3 5&lt;br&gt;
Cipher: armmv rqrezvsr&lt;br&gt;
Enter the cipher: armmv rqrezvsr&lt;br&gt;
Enter the two keys, numeric value or any alphabet seperated by spaces:3 5&lt;br&gt;
Message: hello everyone&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
