<?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: Rahul Mishra</title>
    <description>The latest articles on DEV Community by Rahul Mishra (@rahulmishra05).</description>
    <link>https://dev.to/rahulmishra05</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%2F485568%2Ff407ca53-4460-43e7-89fb-3abfe9fc6a9e.jpg</url>
      <title>DEV Community: Rahul Mishra</title>
      <link>https://dev.to/rahulmishra05</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rahulmishra05"/>
    <language>en</language>
    <item>
      <title>Broken Authentication: Methodology &amp; Prevention </title>
      <dc:creator>Rahul Mishra</dc:creator>
      <pubDate>Wed, 12 May 2021 16:42:16 +0000</pubDate>
      <link>https://dev.to/rahulmishra05/broken-authentication-methodology-prevention-33nd</link>
      <guid>https://dev.to/rahulmishra05/broken-authentication-methodology-prevention-33nd</guid>
      <description>&lt;p&gt;&lt;strong&gt;In this article we will see that how hacker/penetration testers can exploit broken authentication vulnerability, in the authentication system of a website. In the end we will also see some ways by which you can prevent issues related to authentication of your website.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Before we discuss about ways in which a hacker/penetration tester can exploit broken authentication vulnerability, we must know the answer of these two questions.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 What is broken authentication?
&lt;/h3&gt;

&lt;p&gt;Authentication is broken when attackers are able to compromise passwords, keys or session tokens, user account information, and other details to assume user identities. Due to weakness in design and implementation of identity and access controls, the prevalence of broken authentication is widespread.&lt;/p&gt;

&lt;h3&gt;
  
  
  ☠️ What is the impact of broken authentication?
&lt;/h3&gt;

&lt;p&gt;In summary, broken authentication and session management has the potential to steal a user login data, or forge session data, such as cookies, to gain unauthorized access to websites. However, there are clear and easy solutions to prevent your site from being affected by this vulnerability.&lt;/p&gt;

&lt;p&gt;Now let’s discuss the way a hacker/penetration tester can exploit this vulnerability.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;u&gt;&lt;strong&gt;Credential stuffing attack:&lt;/strong&gt;&lt;/u&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An attack where the attacker uses lists of compromised credentials to breach a system.&lt;/li&gt;
&lt;li&gt;Typically uses a bot to automate this process.&lt;/li&gt;
&lt;li&gt;Has success rate around 0.1%.&lt;/li&gt;
&lt;/ul&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620836802294%2FQabPRIhAot.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620836802294%2FQabPRIhAot.png" alt="image1.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;u&gt;&lt;strong&gt;Brute force and weak passwords:&lt;/strong&gt;&lt;/u&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Brute force involves trying common passwords or random combinations to login.&lt;/li&gt;
&lt;li&gt;Take advantage of weak passwords.&lt;/li&gt;
&lt;li&gt;Works best on services that do not limit login attempts. &lt;/li&gt;
&lt;/ul&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620836818937%2FqduhygZgM.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620836818937%2FqduhygZgM.png" alt="image2.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;u&gt;&lt;strong&gt;Weak credential recovery:&lt;/strong&gt;&lt;/u&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When a user forgot their password, they may need to recover it.&lt;/li&gt;
&lt;li&gt;Password recovery should only work for the user who owned the account.&lt;/li&gt;
&lt;li&gt;Methods such as recovery questions can be easily guessed, if the hacker/penetration tester knows the person or had done a very good reconnaissance on the target user.&lt;/li&gt;
&lt;/ul&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620836834664%2Fm86de_ZPm.jpeg" 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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620836834664%2Fm86de_ZPm.jpeg" alt="image3.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;u&gt;&lt;strong&gt;Missing multi-factor authentication:&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-factor authentication can help add a layer of security to authentication.&lt;/li&gt;
&lt;li&gt;Options such as biometrics, phone and e-mail based authentication are good options.&lt;/li&gt;
&lt;li&gt;Missing multi-factor authentication makes brute force and credential stuffing more effective.&lt;/li&gt;
&lt;/ul&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620836848969%2FJWR2UQ0VK.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620836848969%2FJWR2UQ0VK.png" alt="image4.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;u&gt;&lt;strong&gt;Exposed session ID:&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If a session ID is exposed through URL or cookies, it can be used by an attacker to authenticate.&lt;/li&gt;
&lt;li&gt;Session IDs should be properly handles, ideally only on the server side.&lt;/li&gt;
&lt;/ul&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620836877978%2FBTcUH-mIG.jpeg" 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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620836877978%2FBTcUH-mIG.jpeg" alt="image5.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So far we have discussed most common ways to exploit broken authentication vulnerability, now it’s time to see some safety measures to prevent this vulnerability.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implement some form of multi-factor authentication.&lt;/li&gt;
&lt;li&gt;Use a password policy to prevent weak logins.&lt;/li&gt;
&lt;li&gt;Do not ship with default credentials, such as &lt;code&gt;admin:admin&lt;/code&gt; or &lt;code&gt;root:password&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Limit failed login attempts.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Keep session IDs on server side.&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620836953757%2FXt0h-ykC7.jpeg" 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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620836953757%2FXt0h-ykC7.jpeg" alt="image6.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;So this was all about methodology and prevention of broken authentication vulnerability. I hope you liked it and learned something new from it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have any doubt, question, quires related to this topic or just want to share something with me, than please feel free to contact me. &lt;/p&gt;

&lt;h3&gt;
  
  
  🖥 My personal blog
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://thehackedsite.netlify.app/" rel="noopener noreferrer"&gt;The Hacked Site&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📱 Contact Me
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/r_mishra10" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/rahul-mishra-66210b185" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://t.me/rahul_mishra10" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.instagram.com/rahul_mishra10/?hl=en" rel="noopener noreferrer"&gt;Instagram&lt;/a&gt;,&lt;/p&gt;

&lt;h3&gt;
  
  
  📧 Write a mail
&lt;/h3&gt;

&lt;p&gt;&lt;a href="mailto:rahulmishra102000@gmail.com"&gt;rahulmishra102000@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Other links
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/rahulMishra05" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.hackerrank.com/rahulmishra10201" rel="noopener noreferrer"&gt;HackerRank&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://tryhackme.com/p/rahulMishra05" rel="noopener noreferrer"&gt;Tryhackme&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>security</category>
      <category>beginners</category>
      <category>github</category>
    </item>
    <item>
      <title>Web Application Penetration Test Checklist | Part - 02</title>
      <dc:creator>Rahul Mishra</dc:creator>
      <pubDate>Sun, 11 Apr 2021 08:09:09 +0000</pubDate>
      <link>https://dev.to/rahulmishra05/web-application-penetration-test-checklist-part-02-1igc</link>
      <guid>https://dev.to/rahulmishra05/web-application-penetration-test-checklist-part-02-1igc</guid>
      <description>&lt;p&gt;&lt;strong&gt;In this article I am going to share a checklist which you can use when you are doing a penetration test on a website, you can also use this list as a reference in bug bounties. This list is made for intermediates, so they can look it for reference.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Before starting this list I want to make a request that this is my advice that you should complete the previous &lt;a href="https://dev.to/rahulmishra05/web-application-penetration-test-checklist-part-01-4bf"&gt;checklist&lt;/a&gt;, so in this process you will not get confused.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;You are not genius!!&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Remember this thing, so if you don’t understand something just Google about it and so some research, I also don’t know everything and there could be things that I have missed, so don’t worry and keep learning.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  📋 The list
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Test for credentials transported over encryption.

&lt;ul&gt;
&lt;li&gt;When you submit your login/registration data try intercepting the request and changing the requests method. &lt;code&gt;POST&lt;/code&gt; to &lt;code&gt;GET&lt;/code&gt;, and &lt;code&gt;GET&lt;/code&gt; to &lt;code&gt;POST&lt;/code&gt;. If any points of time you find the data submitted by user are transported without encryption you can make this as low-level bug.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Test for default credentials on admin page/console or any sign in panel.

&lt;ul&gt;
&lt;li&gt;Try submitting default username passwords like &lt;code&gt;admin&lt;/code&gt;:&lt;code&gt;admin&lt;/code&gt;, &lt;code&gt;admin&lt;/code&gt;:&lt;code&gt;password&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Bypassing the authentication. 

&lt;ul&gt;
&lt;li&gt;Forced browsing: Directly visiting the section of the website which requires authentication. For example, if you have to login at &lt;a href="https://testwebsite.com/login"&gt;https://testwebsite.com/login&lt;/a&gt; to visit &lt;a href="https://testwebsite.com/information"&gt;https://testwebsite.com/information&lt;/a&gt;, but if you can visit &lt;a href="https://testwebiste.com/information"&gt;https://testwebiste.com/information&lt;/a&gt; directly just by typing this URL in the browser without authenticating then this will be known as forced browsing.&lt;/li&gt;
&lt;li&gt;Parameter modification: Try changing response which comes from the server for example, if your server response &lt;a href="https://testwebsite.com/auth=false"&gt;https://testwebsite.com/auth=false&lt;/a&gt; then try changing the parameter &lt;code&gt;auth=false&lt;/code&gt; to &lt;code&gt;auth-true&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Session ID brute forcing.&lt;/li&gt;
&lt;li&gt;SQL injection. &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Check for broken access control.&lt;/li&gt;
&lt;li&gt;Remember password checking.

&lt;ul&gt;
&lt;li&gt;Check that is password being stored in the cookies or being constantly transferred in every request of the website. The credentials should only be sent I login phase.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Check for directory traversal includes file input.

&lt;ul&gt;
&lt;li&gt;You have to check each and every input which your website and its directories take from user.&lt;/li&gt;
&lt;li&gt;You can referrer to this &lt;a href="https://medium.com/@nerdy_researcher/directory-traversal-aka-path-traversal-c76dc7bbe61#:~:text=What%20is%20Directory%20Traversal%3F,and%20sensitive%20operating%20system%20files"&gt;article&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Checking for privilege escalation.

&lt;ul&gt;
&lt;li&gt;You can check for this at some places like if user can make payment, adding something, sending message to someone.&lt;/li&gt;
&lt;li&gt;You can intercept request of two different sets of account and try modifying parameters like grp, id, and role if they exist.&lt;/li&gt;
&lt;li&gt;You can referrer to this &lt;a href="https://shahjerry33.medium.com/privilege-escalation-hello-admin-a53ac14fd388"&gt;article&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Check for IDOR &lt;em&gt;(Insecure Direct Object Reference)&lt;/em&gt;.

&lt;ul&gt;
&lt;li&gt;You can try for getting access to other user data by changing parameters in URL.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Check for bypassing session management object.

&lt;ul&gt;
&lt;li&gt;Set-cookies are secure or not?&lt;/li&gt;
&lt;li&gt;Are cookies transmitted in encrypted manner?&lt;/li&gt;
&lt;li&gt;Make sure cookies are not same every time when your browse website.&lt;/li&gt;
&lt;li&gt;Sometimes website can leak their token structure/information try to find it.&lt;/li&gt;
&lt;li&gt;Session ID predictability.&lt;/li&gt;
&lt;li&gt;Brute forcing session ID.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Check for CSRF.&lt;/li&gt;
&lt;li&gt;Check for XSS &lt;em&gt;(stored, reflected, blind)&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Check for SQL injection &lt;em&gt;(blind, In band, Out band, Error based etc.).&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Check for XML injection.&lt;/li&gt;
&lt;li&gt;Check for file upload.&lt;/li&gt;
&lt;li&gt;Check for open redirection or client-side open redirection.

&lt;ul&gt;
&lt;li&gt;You can referrer to this &lt;a href="https://corneacristian.medium.com/top-25-open-redirect-bug-bounty-reports-5ffe11788794"&gt;article&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Checking for web sockets vulnerabilities.&lt;/li&gt;
&lt;li&gt;Check for code execution. 

&lt;ul&gt;
&lt;li&gt;You can referrer to this &lt;a href="https://medium.com/@ashishrohra/remote-code-execution-explaination-writeups-and-tools-a8e4c3362259"&gt;article&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Check for SSRF &lt;em&gt;(Server Side Request Forgery)&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Check fir command injection.

&lt;ul&gt;
&lt;li&gt;You can referrer to this &lt;a href="https://medium.com/ax1al/os-command-injection-beginners-guide-637e1eed1fde"&gt;article&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Checking for business logic flaws.

&lt;ul&gt;
&lt;li&gt;You can referrer to this &lt;a href="https://medium.com/armourinfosec/exploiting-business-logic-vulnerabilities-234f97d6c4c0"&gt;article&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Checking for LDAP injection.

&lt;ul&gt;
&lt;li&gt;You can referrer to this &lt;a href="https://medium.com/@hunter_55/ldap-admin-account-bypassed-2cc8b264d66e"&gt;article&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Check for HTTP request smuggling. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;So this was all about some more things to check while doing penetration test on a website or in a bug bounty program. Hope you liked it and learned something new from it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have any doubt, question, quires related to this topic or just want to share something with me, than please feel free to contact me.&lt;/p&gt;

&lt;h3&gt;
  
  
  🖥 My personal blog
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://thehackedsite.netlify.app/"&gt;The Hacked Site&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📱 Contact Me
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/r_mishra10"&gt;Twitter&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/rahul-mishra-66210b185"&gt;LinkedIn&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://t.me/rahul_mishra10"&gt;Telegram&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.instagram.com/rahul_mishra10/?hl=en"&gt;Instagram&lt;/a&gt;,&lt;/p&gt;

&lt;h3&gt;
  
  
  📧 Write a mail
&lt;/h3&gt;

&lt;p&gt;&lt;a href="mailto:rahulmishra102000@gmail.com"&gt;rahulmishra102000@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Other links
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/rahulMishra05"&gt;GitHub&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.hackerrank.com/rahulmishra10201"&gt;HackerRank&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://tryhackme.com/p/rahulMishra05"&gt;Tryhackme&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>linux</category>
      <category>beginners</category>
      <category>github</category>
    </item>
    <item>
      <title>Web Application Penetration Test Checklist | Part - 01</title>
      <dc:creator>Rahul Mishra</dc:creator>
      <pubDate>Sat, 10 Apr 2021 08:42:07 +0000</pubDate>
      <link>https://dev.to/rahulmishra05/web-application-penetration-test-checklist-part-01-4bf</link>
      <guid>https://dev.to/rahulmishra05/web-application-penetration-test-checklist-part-01-4bf</guid>
      <description>&lt;p&gt;&lt;strong&gt;In this article I am going to share a checklist which you can use when you are doing a penetration test on a website, you can also use this list as a reference in bug bounties. This is beginner’s friendly list, so they can look it for reference.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Before stating the list I want to make something clear, that before you start using this list for finding bugs/vulnerabilities make sure that you have already completed the first step which is *&lt;/em&gt;&lt;strong&gt;&lt;em&gt;Reconnaissance&lt;/em&gt;&lt;/strong&gt;*&lt;em&gt;. Otherwise you will find it hard to find bug/vulnerabilities.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You are not genius! Remember this thing, so if you don’t understand something just Google about it and so some research, I also don’t know everything and there could be things that I have missed, so don’t worry and keep learning.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  General things to do
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Create 2 accounts on the same website if it has login functionality. You can use this &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/"&gt;extension&lt;/a&gt; to use same browser for creating different accounts on the same website.&lt;/li&gt;
&lt;li&gt;Try directory forcing using tools like &lt;strong&gt;Dirsearch&lt;/strong&gt;, &lt;strong&gt;FeroBuster&lt;/strong&gt;, &lt;strong&gt;Ffuf&lt;/strong&gt;, might be possible some directory may reveal sensitive information.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Login page
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Session expiration &lt;/li&gt;
&lt;li&gt;Improper session validation &lt;/li&gt;
&lt;li&gt;OAuth bypass &lt;em&gt;(it includes features like login with Google, Microsoft, Instagram or any)&lt;/em&gt;

&lt;ul&gt;
&lt;li&gt;OAuth token stealing&lt;/li&gt;
&lt;li&gt;Authentication bypass&lt;/li&gt;
&lt;li&gt;Privilege escalation&lt;/li&gt;
&lt;li&gt;SQLi&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Registration page
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;XML file upload using SVG &lt;em&gt;(if website asks for documents upload or profile upload then you can try this)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Bypassing limitation on file types to upload &lt;em&gt;(if they just allow jpg, png then try to upload &lt;code&gt;.php&lt;/code&gt; or &lt;code&gt;.py&lt;/code&gt;)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Bypassing mobile or email verification&lt;/li&gt;
&lt;li&gt;Brute forcing OTP sent&lt;/li&gt;
&lt;li&gt;Try inserting XSS payload whenever possible &lt;em&gt;(like If you can enter payload in first name/last name/address etc text box makes sure to enter because sometimes it may reflects somewhere else or maybe it’s stored XSS)&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Forgot password page
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Password reset poisoning &lt;em&gt;(kind of similar way we do host header injection)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Reset token/link expiring &lt;em&gt;(maybe they pay)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Reset token leaks &lt;em&gt;(this can happen when some website interacts to third party services at that point of time maybe password reset token is sent via referrer part and maybe it can leak)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Check for sub-domain takeover.&lt;/li&gt;
&lt;li&gt;Check for older version of service is being used by your target and if they so try to find existing exploit for the target.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;So this was all about some basic things to check while doing penetration test on a website or in a bug bounty program. Hope you liked it and learned something new from it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have any doubt, question, quires related to this topic or just want to share something with me, than please feel free to contact me.&lt;/p&gt;

&lt;h3&gt;
  
  
  🖥 My personal blog
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://thehackedsite.netlify.app/"&gt;The Hacked Site&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📱 Contact Me
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/r_mishra10"&gt;Twitter&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/rahul-mishra-66210b185"&gt;LinkedIn&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://t.me/rahul_mishra10"&gt;Telegram&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.instagram.com/rahul_mishra10/?hl=en"&gt;Instagram&lt;/a&gt;,&lt;/p&gt;

&lt;h3&gt;
  
  
  📧 Write a mail
&lt;/h3&gt;

&lt;p&gt;&lt;a href="mailto:rahulmishra102000@gmail.com"&gt;rahulmishra102000@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Other links
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/rahulMishra05"&gt;GitHub&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.hackerrank.com/rahulmishra10201"&gt;HackerRank&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://tryhackme.com/p/rahulMishra05"&gt;Tryhackme&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>security</category>
      <category>beginners</category>
      <category>github</category>
    </item>
    <item>
      <title>Amass: A Beginner's Guide For Reconnaissance </title>
      <dc:creator>Rahul Mishra</dc:creator>
      <pubDate>Sun, 28 Mar 2021 07:33:23 +0000</pubDate>
      <link>https://dev.to/rahulmishra05/amass-a-beginner-s-guide-for-reconnaissance-4a0p</link>
      <guid>https://dev.to/rahulmishra05/amass-a-beginner-s-guide-for-reconnaissance-4a0p</guid>
      <description>&lt;p&gt;&lt;strong&gt;In this article we will see how to use a tool named “amass” which is used for reconnaissance when doing website penetration testing or bug bounty. This tool is used to list sub-domains related to the target domain.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is not a complete guide for the amass tool, but instead this is an introduction to the reconnaissance using amass. &lt;a href="https://github.com/OWASP/Amass"&gt;Amass github&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Amass is an open source network mapping and attack surface discovery tool that uses information gathering and other techniques such as active reconnaissance and external asset discovery to scrap all the available data.&lt;/li&gt;
&lt;li&gt;In order to accomplish this, it uses its own internal machinery and it also integrates smoothly with different external services to increase its results, efficiency and power.&lt;/li&gt;
&lt;li&gt;This tool maintains a strong focus on DNS, HTTP and SSL/TLS data discovering and scrapping.
Installation&lt;/li&gt;
&lt;li&gt;To install this tool you can use the official package manager of kali Linux, and use this command &lt;code&gt;sudo apt-get install amass&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;And if you are on Mac than use this command &lt;code&gt;brew install amass&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Usage
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;When using a new tool it is always a good habit to see the help menu or man page for that tool. So to get the help menu of this tool use this command &lt;code&gt;amass -help&lt;/code&gt; or &lt;code&gt;amass -h&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Now at the end of the help menu you can see that there is a list of subcommand, with the help of these subcommand we can perform many different operations, I am not going in detail of every command rather I will just explain the most important and used subcommands of amass.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NV22ty4l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1616916368552/GaNyPSm_T.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NV22ty4l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1616916368552/GaNyPSm_T.png" alt="photo1.PNG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The main two subcommand that are used most are &lt;code&gt;amass intel&lt;/code&gt; and &lt;code&gt;amass enum&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;To get the help for these subcommand you can use this command &lt;code&gt;amass intel -help&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;amass intel&lt;/code&gt; it collects the intelligence on the target in order to determine the starting point. It give us various details such as AS number, whois record of the website. We can find AS number using amass like this &lt;code&gt;amass intel –org uber&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cguMFJMm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1616916377689/-FS620Mji.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cguMFJMm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1616916377689/-FS620Mji.png" alt="photo2.PNG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An Autonomous System (AS) is a group of IP networks run by one or more network operators with a single, clearly defined routing policy. When exchanging exterior routing information, each AS is identified by a unique number: the Autonomous System Number (ASN). We can easily find AS number of website from this website &lt;a href="https://bgp.he.net/"&gt;https://bgp.he.net/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Now &lt;code&gt;amass enum&lt;/code&gt; performs enumeration and mapping your target to determine possible attack avenues. &lt;/li&gt;
&lt;li&gt;We can use &lt;code&gt;amass enum&lt;/code&gt; for finding sub-domains of a website. For that we can use a command like this &lt;code&gt;amass enum –d uber.com –o /root/uber.txt&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;In the above command “-d” is used to determine the domain name, &lt;code&gt;-o&lt;/code&gt; is to determine the output file where we want to save our results. There are many more options available you can see that by using the help command like this &lt;code&gt;amass enum -help&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;So this was all about the basics of amass. Hop you like it and learned something new from it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have any doubt, question, quires related to this topic or just want to share something with me, than please feel free to contact me.&lt;/p&gt;

&lt;h3&gt;
  
  
  🖥 My personal blog
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://thehackedsite.netlify.app/"&gt;The Hacked Site&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📱 Contact Me
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/r_mishra10"&gt;Twitter&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/rahul-mishra-66210b185"&gt;LinkedIn&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://t.me/rahul_mishra10"&gt;Telegram&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.instagram.com/rahul_mishra10/?hl=en"&gt;Instagram&lt;/a&gt;,&lt;/p&gt;

&lt;h3&gt;
  
  
  📧 Write a mail
&lt;/h3&gt;

&lt;p&gt;&lt;a href="mailto:rahulmishra102000@gmail.com"&gt;rahulmishra102000@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Other links
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/rahulMishra05"&gt;GitHub&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.hackerrank.com/rahulmishra10201"&gt;HackerRank&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://tryhackme.com/p/rahulMishra05"&gt;Tryhackme&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>linux</category>
      <category>webdev</category>
      <category>github</category>
    </item>
    <item>
      <title>CSRF &amp; SSRF</title>
      <dc:creator>Rahul Mishra</dc:creator>
      <pubDate>Sat, 27 Mar 2021 08:28:04 +0000</pubDate>
      <link>https://dev.to/rahulmishra05/csrf-ssrf-2enp</link>
      <guid>https://dev.to/rahulmishra05/csrf-ssrf-2enp</guid>
      <description>&lt;p&gt;&lt;strong&gt;In this article we going to learn about CSRF and SSRF, both of these vulnerabilities take advantage of how server process URLs. These are very common and well known vulnerabilities and understanding about these vulnerabilities is very important for web application penetration testing.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;em&gt;First let’s get an introduction about these attacks.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  CSRF:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;CSRF stands for &lt;strong&gt;&lt;em&gt;cross-site request forgery&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;This vulnerability was present in OWASP top 10 list, but was removed after in the edition came after 2017.&lt;/li&gt;
&lt;li&gt;This vulnerability is still present in 5% of the web applications.&lt;/li&gt;
&lt;li&gt;CSRF happen at the client side, in technical terms the forgery happens at the client side.&lt;/li&gt;
&lt;li&gt;The main purpose of CSRF attacks is to force user to take undesirable actions on their online account.&lt;/li&gt;
&lt;li&gt;Suppose we have a website named &lt;code&gt;example.com&lt;/code&gt; and we are logged in to that website, in this case there will be some cookies that will be stored and these cookies will be use when we make some request to the website to perform some action. Now what happens in CSRF a malicious website can perform the same action using cookies related to the &lt;code&gt;example.com&lt;/code&gt;. And this could happen if somehow we visit that malicious website or click on the URL of that website.&lt;/li&gt;
&lt;li&gt;There are many actions that could be performed on a website using this vulnerability such as &lt;em&gt;changing the password&lt;/em&gt; or &lt;em&gt;making online transactions&lt;/em&gt;. The action is highly depends on the nature and use case of that website.&lt;/li&gt;
&lt;li&gt;CSRF attacks work because the user is already authenticated to the target website and the forced request includes the cookies containing session information.&lt;/li&gt;
&lt;li&gt;Standard CSRF attacks assume that a user is already authenticated to a website, but CSRF attacks can also be &lt;em&gt;stored.&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SSRF
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;SSRF stands for &lt;strong&gt;&lt;em&gt;server-side request forgery&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;SSRF attacks are designed to exploit how a server processes external information.&lt;/li&gt;
&lt;li&gt;If an attacker can modify the target URL, they can potentially exfilterate sensitive information from the website or inject untrusted input into it.&lt;/li&gt;
&lt;li&gt;Suppose we have a website named &lt;code&gt;example.com&lt;/code&gt;, it uses an API to fetch some data from the web server. If we make a request to &lt;code&gt;localhost/admin&lt;/code&gt; and get the response than this is a serious problem.&lt;/li&gt;
&lt;li&gt;If we can access the admin panel using the localhost than we do not need to authenticate to use admin panel, because here server is making a request to the localhost to access the &lt;code&gt;/admin&lt;/code&gt; page and it is displaying the result on the client side.&lt;/li&gt;
&lt;li&gt;The vulnerability associated with SSRF vulnerabilities is not limited to data exfiltration. In some cases application may be designed to read data from URL. If this URL is trusted, the application may not perform data validation. This could allow an attacker to provide malicious input that could exploit a buffer overflow, integer overflow, SQL injection or other vulnerability in the web application. &lt;/li&gt;
&lt;li&gt;The impact of SSRF vulnerability can be significant. A recent example of an attack exploiting SSRF (and the difficulty of protecting against it) is the &lt;a href="https://www.americanbanker.com/news/capital-one-to-pay-80m-in-connection-with-massive-data-breach#:~:text=The%20hack%20compromised%20personal%20data,were%2080%2C000%20bank%20account%20numbers."&gt;Capital One data breach&lt;/a&gt;, which expose the personal information of 106 million people.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Difference between CSRF and SSRF:
&lt;/h3&gt;

&lt;p&gt;Both CSRF and SSRF vulnerabilities take advantage of how a web server handles URLs. However, they differ on the bases of target of the attack and purpose of the attack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Attack Target&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The target of a CSRF attack is the user. While it accomplished suing flaws in how the website is designed, its purpose is to perform legitimate but unauthorized actions on the user’s account with the web-based service.&lt;/li&gt;
&lt;li&gt;SSRF on the other hand is designed to primarily target the server. While, in the long run, the attack may affect users of the service, the primary purpose of the attack is theft of sensitive information on the server or exploiting other vulnerabilities by using SSRF to bypass input validation countermeasures.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Attack purpose&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the case of SSRF, the primary purpose of the attack is to gain access to sensitive information/data. This could be performed directly (by forcing it to write data to an attacker-supplied URL) or indirectly (by allowing exploitation of a vulnerability that can be used to steal data).&lt;/li&gt;
&lt;li&gt;CSRF vulnerabilities, on the other hand, do not provide an attacker with any access to sensitive data. While the attacker forces a user’s browser to visit the target site, the actual request and response are performed independently. Even if the attack results in sensitive data being sent in response to the malicious request, this data only goes to the target user’s computer, not the attacker’s. The purpose of exploiting CSRF vulnerability is to force the target user to take action in the attacker’s interest, like changing an account password to one known to the attacker. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion:
&lt;/h3&gt;

&lt;p&gt;While CSRF and SSRF vulnerabilities are very different, they both enable by the same problem “a failure to properly use URLs by the server.” When looking for potential vulnerabilities in a website, examining how the website uses URLs and the types, formats and destination of request made to or by it can help in identification of these vulnerabilities.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So this was all about CSRF and SSRF. Hope you liked it and learned something new from it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have any doubt, question, quires related to this article or just want to share something with me, than please feel free to contact me.&lt;/p&gt;

&lt;h3&gt;
  
  
  🖥 My personal blog
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://thehackedsite.netlify.app/"&gt;The Hacked Site&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📱 Contact Me
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/r_mishra10"&gt;Twitter&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/rahul-mishra-66210b185"&gt;LinkedIn&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://t.me/rahul_mishra10"&gt;Telegram&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.instagram.com/rahul_mishra10/?hl=en"&gt;Instagram&lt;/a&gt;,&lt;/p&gt;

&lt;h3&gt;
  
  
  📧 Write a mail
&lt;/h3&gt;

&lt;p&gt;&lt;a href="mailto:rahulmishra102000@gmail.com"&gt;rahulmishra102000@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Other links
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/rahulMishra05"&gt;GitHub&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.hackerrank.com/rahulmishra10201"&gt;HackerRank&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://tryhackme.com/p/rahulMishra05"&gt;Tryhackme&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>security</category>
      <category>beginners</category>
      <category>linux</category>
    </item>
    <item>
      <title>File Encrypter and Decrypter </title>
      <dc:creator>Rahul Mishra</dc:creator>
      <pubDate>Mon, 08 Mar 2021 12:08:22 +0000</pubDate>
      <link>https://dev.to/rahulmishra05/file-encrypter-and-decrypter-10mo</link>
      <guid>https://dev.to/rahulmishra05/file-encrypter-and-decrypter-10mo</guid>
      <description>&lt;p&gt;&lt;strong&gt;In this article I am going to show you how to make a command line tool that will encrypt a file or decrypt a file. This command line tool is going to be a shell script.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Before diving into the development phase let’s clear some concepts and terminologies.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is encryption?&lt;/strong&gt;&lt;br&gt;
Encryption is a way of scrambling data so that only authorized parties can understand the information. In technical terms, it is the process of converting human-readable plaintext to incomprehensible text, also known as ciphertext. In simple terms, encryption takes readable data and alters it so that it appears random. Encryption requires the use of a cryptographic key. It is a set of mathematical values that both the sender and the recipient of an encrypted message agree on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is decryption?&lt;/strong&gt;&lt;br&gt;
The conversion of encrypted data into its original form is called decryption. It is generally a reverse process of encryption. It decodes the encrypted information so that an authorized user can only decrypt the data because decryption requires a secret key or password.&lt;/p&gt;

&lt;p&gt;Now that you have a basic understanding of encryption and decryption, the image of this project is becoming clear, but now you want to know that how will we do this. So for that we will be using GPG, and you will be thinking that what this &lt;strong&gt;GPG&lt;/strong&gt; is.&lt;br&gt;
GPG or GnuPG, stands for GNU Privacy Guard. GPG is a different implementation of the open PGP standard and a strong alternative to Symantec’s official PGP software.&lt;br&gt;
GPG is defined by RFC 4880 &lt;em&gt;(the official name for the Open GPG standard.)&lt;/em&gt; The GPG project provides the tools and libraries to allow users to integrate encryption with emails and operating systems like Linux. GPG can open and decrypt files encrypted by PGP or open PGP, meaning it works well with other products.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Enough theory let’s start coding our file encrypter and decrypter.&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Step one make a shell script file using touch command and give whatever name you want to give it. I am giving it &lt;a href="https://github.com/rahulMishra05/file_encrypter_decrypter/blob/main/encrypt.sh"&gt;encrypt.sh&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;encrypt.sh
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Make sure to make changes in the file permissions so that you can execute this shell script file, you can do it like this&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;744 encrypt.sh
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Now start coding the script. First prompt a message to the user and ask what they want to do encrypt or decrypt.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"File encrypter/decrypter"&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Please select what you want to do"&lt;/span&gt;

&lt;span class="nv"&gt;choise&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Encrypt Decrypt"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Then we will use a select statement and make a decision on the basic of input&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;select &lt;/span&gt;option &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$choise&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="k"&gt;do&lt;/span&gt;
    &lt;span class="c"&gt;# Code will come here&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then use if-else statement and perform encryption or decryption.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;If user entered 1 than write the logic of encrypting a file, if user enter 2 than write the logic to decrypt the file and if the user enter something other than this, that prompt an error. &lt;br&gt;
So the code for it will be like this.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;$REPLY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; 1 &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;then 
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"You have selected Encryption"&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Please enter the name of the file (including extension)"&lt;/span&gt;
    &lt;span class="nb"&gt;read &lt;/span&gt;file&lt;span class="p"&gt;;&lt;/span&gt;
    gpg &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="nv"&gt;$file&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"File is encrypted"&lt;/span&gt;
    &lt;span class="nb"&gt;break

&lt;/span&gt;&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;$REPLY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; 2 &lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;then 
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"You have selected Decryption"&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Please enter the name of the file (including extension)"&lt;/span&gt;
    &lt;span class="nb"&gt;read &lt;/span&gt;file2&lt;span class="p"&gt;;&lt;/span&gt;
    gpg &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nv"&gt;$file2&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"File is decrypted"&lt;/span&gt;
    &lt;span class="nb"&gt;break

&lt;/span&gt;&lt;span class="k"&gt;else
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"You have selected invalid option"&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The code for file encryption and decryption completed. You can also see the complete code &lt;a href="https://github.com/rahulMishra05/file_encrypter_decrypter"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So this was all about file encrypter and decrypter. Hope you liked it and learned something new from it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you have any doubt, question, quires related to this article or just want to share something with me, than please feel free to contact me.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🖥 My personal blog
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://thehackedsite.netlify.app/"&gt;The Hacked Site&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📱 Contact Me
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/r_mishra10"&gt;Twitter&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/rahul-mishra-66210b185"&gt;LinkedIn&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://t.me/rahul_mishra10"&gt;Telegram&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.instagram.com/rahul_mishra10/?hl=en"&gt;Instagram&lt;/a&gt;,&lt;/p&gt;

&lt;h3&gt;
  
  
  📧 Write a mail
&lt;/h3&gt;

&lt;p&gt;&lt;a href="mailto:rahulmishra102000@gmail.com"&gt;rahulmishra102000@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Other links
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/rahulMishra05"&gt;GitHub&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.hackerrank.com/rahulmishra10201"&gt;HackerRank&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://tryhackme.com/p/rahulMishra05"&gt;Tryhackme&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>codenewbie</category>
      <category>cybersecurity</category>
      <category>bash</category>
    </item>
    <item>
      <title>Thrashing | Operating System - M05 P16</title>
      <dc:creator>Rahul Mishra</dc:creator>
      <pubDate>Thu, 31 Dec 2020 11:13:32 +0000</pubDate>
      <link>https://dev.to/rahulmishra05/thrashing-operating-system-m05-p16-463a</link>
      <guid>https://dev.to/rahulmishra05/thrashing-operating-system-m05-p16-463a</guid>
      <description>&lt;p&gt;&lt;strong&gt;This is a multipart blog article series, and in this series I am going to explain you the concepts of operating system. This article series is divided into multiple modules and this is the fifth module which consists of 26 articles.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In this article we will see that what is thrashing? Why it is used and what are the problems thrashing has and also how can be solve those problems.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Thrashing
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;We divide process into multiple pages and load them in RAM. Our main focus is to increase degree of multiprogramming so CPU utilization can also increase.&lt;/li&gt;
&lt;li&gt;One way to do this is we can load one page of every process in RAM so degree of multiprogramming would be highest.&lt;/li&gt;
&lt;li&gt;But there is a problem with this approach that suppose CPU request a page from &lt;code&gt;P1&lt;/code&gt; process which is not present in RAM than it will be termed as &lt;strong&gt;page fault&lt;/strong&gt; and there could be a worst case scenario that RAM is full with different pages of different processes but CPU call a page which is not present in RAM.&lt;/li&gt;
&lt;li&gt;In this scenario to recover from page fault a large amount of time is required, and during that time CUP utilization will also decrease.&lt;/li&gt;
&lt;/ul&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1609412977519%2FhMPWaDo7W.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1609412977519%2FhMPWaDo7W.png" alt="Thrashing-300x236.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When the system is recovering from page fault and CPU utilization is less that is known as thrashing.&lt;/li&gt;
&lt;li&gt;We can remove thrashing when we use long term scheduler.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;So this was all about &lt;strong&gt;thrashing&lt;/strong&gt;. Hope you liked it and learned something new from it.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;If you have any doubt, question, quires related to this article or just want to share something with me, than please feel free to contact me. &lt;/p&gt;

&lt;h3&gt;
  
  
  📱 Contact Me
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/r_mishra10" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/rahul-mishra-66210b185" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;br&gt;
&lt;a href="https://t.me/rahul_mishra10" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.instagram.com/rahul_mishra10/?hl=en" rel="noopener noreferrer"&gt;Instagram&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📧 Write a mail
&lt;/h3&gt;

&lt;p&gt;&lt;a href="mailto:rahulmishra102000@gmail.com"&gt;rahulmishra102000@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Other links
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/rahulMishra05" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.hackerrank.com/rahulmishra10201" rel="noopener noreferrer"&gt;HackerRank&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Question on Inverted Paging | Operating System - M05 P15</title>
      <dc:creator>Rahul Mishra</dc:creator>
      <pubDate>Wed, 30 Dec 2020 12:40:58 +0000</pubDate>
      <link>https://dev.to/rahulmishra05/question-on-inverted-paging-operating-system-m05-p15-4pii</link>
      <guid>https://dev.to/rahulmishra05/question-on-inverted-paging-operating-system-m05-p15-4pii</guid>
      <description>&lt;p&gt;&lt;strong&gt;This is a multipart blog article series, and in this series I am going to explain you the concepts of operating system. This article series is divided into multiple modules and this is the fifth module which consists of 26 articles.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In this article we will see a question on inverted paging and try to understand the concept of inverted paging.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Question:&lt;/em&gt;&lt;/strong&gt; Consider a virtual address space of 32 bits and page size of 4 KB, system is having a RAM of 128 KB. Than what will be the ratio of page table and inverted page table size, if each entry in both is of size 4 B?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Answer:&lt;/em&gt;&lt;/strong&gt; Virtual address space = 32 bits&lt;/p&gt;

&lt;p&gt;Page size = 4 KB = 2&lt;sup&gt;2&lt;/sup&gt; x 2&lt;sup&gt;10&lt;/sup&gt; = 2&lt;sup&gt;12&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Therefore, Number of page = 2&lt;sup&gt;20&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Number of page bits = 20&lt;/p&gt;

&lt;p&gt;Size of page table = 2&lt;sup&gt;20&lt;/sup&gt; x 4 B&lt;/p&gt;

&lt;p&gt;In inverted paging table &lt;code&gt;number of entries = number frames in main memory&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Physical address = 128 KB = 2&lt;sup&gt;7&lt;/sup&gt; x 2&lt;sup&gt;10&lt;/sup&gt; = 2&lt;sup&gt;17&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Frame offset = Page offset&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Therefore, number of frames in main memory = 2&lt;sup&gt;5&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Size of inverted page table = 2&lt;sup&gt;5&lt;/sup&gt; x 4 B&lt;/p&gt;

&lt;p&gt;Therefore, according to the question &lt;/p&gt;

&lt;p&gt;2&lt;sup&gt;20&lt;/sup&gt; x 4 B/ 2&lt;sup&gt;5&lt;/sup&gt; x 4 B = 2&lt;sup&gt;15&lt;/sup&gt;:1&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So this was a simple question on inverted paging. Hope you liked it and learned something new from it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have any doubt, questions, quires related to this article or just want to share something with me, than please feel free to contact me.&lt;/p&gt;

&lt;h3&gt;
  
  
  📱 Contact Me
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/r_mishra10"&gt;Twitter&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/rahul-mishra-66210b185"&gt;LinkedIn&lt;/a&gt;&lt;br&gt;
&lt;a href="https://t.me/rahul_mishra10"&gt;Telegram&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.instagram.com/rahul_mishra10/?hl=en"&gt;Instagram&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📧 Write a mail
&lt;/h3&gt;

&lt;p&gt;&lt;a href="mailto:rahulmishra102000@gmail.com"&gt;rahulmishra102000@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Other links
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/rahulMishra05"&gt;GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.hackerrank.com/rahulmishra10201"&gt;HackerRank&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>beginners</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Inverted Paging | Operating System - M05 P14 </title>
      <dc:creator>Rahul Mishra</dc:creator>
      <pubDate>Tue, 29 Dec 2020 12:53:45 +0000</pubDate>
      <link>https://dev.to/rahulmishra05/inverted-paging-operating-system-m05-p14-2nd7</link>
      <guid>https://dev.to/rahulmishra05/inverted-paging-operating-system-m05-p14-2nd7</guid>
      <description>&lt;p&gt;&lt;strong&gt;This is a multipart blog article series, and in this series I am going to explain you the concepts of operating system. This article series is divided into multiple modules and this is the fifth module which consists of 26 articles.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In this article we will see about inverted paging, we will see that what is the need of inverted paging and why it is used.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Inverted paging
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In normal paging each process has its own page table and page table is present in main memory.&lt;/li&gt;
&lt;li&gt;So some place in main memory is used to store the page table and it is not good.&lt;/li&gt;
&lt;li&gt;In inverted paging instead of making page table for every process we make a global page table.&lt;/li&gt;
&lt;li&gt;Number of entries in global page table will be equal to total number of frame number in main memory.&lt;/li&gt;
&lt;li&gt;There is a problem in inverted paging that its searching time is more.&lt;/li&gt;
&lt;li&gt;While it uses less memory than normal paging because of the use of global page table.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;So this was a brief description about inverted paging. Hope you liked it and learned something new form it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have any doubt, question, quires related to this topic article or just want to share something with me, than please feel free to contact me.&lt;/p&gt;

&lt;h3&gt;
  
  
  📱 Contact Me
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/r_mishra10"&gt;Twitter&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/rahul-mishra-66210b185"&gt;LinkedIn&lt;/a&gt;&lt;br&gt;
&lt;a href="https://t.me/rahul_mishra10"&gt;Telegram&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.instagram.com/rahul_mishra10/?hl=en"&gt;Instagram&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📧 Write a mail
&lt;/h3&gt;

&lt;p&gt;&lt;a href="mailto:rahulmishra102000@gmail.com"&gt;rahulmishra102000@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Other links
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/rahulMishra05"&gt;GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.hackerrank.com/rahulmishra10201"&gt;HackerRank&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>devops</category>
    </item>
    <item>
      <title>2-Level Paging | Operating System - M05 P13</title>
      <dc:creator>Rahul Mishra</dc:creator>
      <pubDate>Mon, 28 Dec 2020 12:11:16 +0000</pubDate>
      <link>https://dev.to/rahulmishra05/2-level-paging-operating-system-m05-p13-3f0n</link>
      <guid>https://dev.to/rahulmishra05/2-level-paging-operating-system-m05-p13-3f0n</guid>
      <description>&lt;p&gt;&lt;strong&gt;This is a multipart blog article series, and in this series I am going to explain you the concepts of operating system. This article series is divided into multiple modules and this is the fifth module which consists of 26 articles.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In this article we will see what 2 level paging is, and with the help of a question we will try to understand the need of 2 level paging.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2-level paging
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Suppose the size of page table is greater than that of frame table, so it cannot fit in frame that’s why we use multiple page tables.&lt;/li&gt;
&lt;li&gt;Because it divides the page table in smaller parts which can get fit in frame table.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s see an example to get better understanding of the topic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Question:&lt;/em&gt;&lt;/strong&gt; Physical address space = 256 MB = 228, logical address space = 4 GB, frame size = 4 KB = 212, page table entry = 2 B. Solve and find that whether outer page table is required or not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Answer:&lt;/em&gt;&lt;/strong&gt; As we know that &lt;code&gt;frame number = physical address space – frame size&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Frame number = 228 – 212 = 216 &lt;/p&gt;

&lt;p&gt;Size of page table = 210 x 2 = 2 MB&lt;/p&gt;

&lt;p&gt;Size of frame and page is not equal. So, we have to divide page into smaller parts.&lt;/p&gt;

&lt;p&gt;Therefore, &lt;br&gt;
2 MB/ 4 KB = 221/212 = 29&lt;/p&gt;

&lt;p&gt;Now we will make another page table and it will be known as outer page table, which will have 29 entries.&lt;/p&gt;

&lt;p&gt;Total size of outer page table = 29 x 2 B = 1 KB &lt;/p&gt;

&lt;p&gt;&lt;em&gt;So this was all about 2 level paging, I tries to explain you the concept with the help of a question. Hope you liked it and learned something new from it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have any doubt, question, quires related to this article or just want to share something with me, than please feel free to contact me.    &lt;/p&gt;

&lt;h3&gt;
  
  
  📱 Contact Me
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/r_mishra10"&gt;Twitter&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/rahul-mishra-66210b185"&gt;LinkedIn&lt;/a&gt;&lt;br&gt;
&lt;a href="https://t.me/rahul_mishra10"&gt;Telegram&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.instagram.com/rahul_mishra10/?hl=en"&gt;Instagram&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📧 Write a mail
&lt;/h3&gt;

&lt;p&gt;&lt;a href="mailto:rahulmishra102000@gmail.com"&gt;rahulmishra102000@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Other links
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/rahulMishra05"&gt;GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.hackerrank.com/rahulmishra10201"&gt;HackerRank&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Page Table Entry | Operating System - M05 P12</title>
      <dc:creator>Rahul Mishra</dc:creator>
      <pubDate>Sat, 26 Dec 2020 13:52:43 +0000</pubDate>
      <link>https://dev.to/rahulmishra05/page-table-entry-operating-system-m05-p12-5hi0</link>
      <guid>https://dev.to/rahulmishra05/page-table-entry-operating-system-m05-p12-5hi0</guid>
      <description>&lt;p&gt;&lt;strong&gt;This is a multipart blog article series, and in this series I am going to explain you the concepts of operating system. This article series is divided into multiple modules and this is the fifth module which consists of 26 articles.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In this article we will see that what is present inside a page table. We will discuss about all the different fields present in page table briefly.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Page table entry
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In the page table in one row there are many things/details that are placed/ situated.&lt;/li&gt;
&lt;li&gt;We use page table because by the help of page table &lt;strong&gt;MMU&lt;/strong&gt; &lt;em&gt;(Memory management unit)&lt;/em&gt; maps the logical address into physical address.&lt;/li&gt;
&lt;/ul&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1608990626057%2FqqrVSdTU8.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1608990626057%2FqqrVSdTU8.png" alt="Untitled Diagram.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Frame No.:&lt;/strong&gt; 

&lt;ul&gt;
&lt;li&gt;At this place frame number is written.&lt;/li&gt;
&lt;li&gt;One or multiple frames can reside in a frame, so when we want to map frame, fame number is used.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Valid/invalid:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Suppose we are finding a page so we go to frame number, this section tell us that whether the page is actually present or not at the frame number. If not than &lt;code&gt;0&lt;/code&gt; will be written there.&lt;/li&gt;
&lt;li&gt;It can happen we are using the concept of virtual memory.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protection:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;(rwx)&lt;/em&gt; r-&amp;gt; read, w-&amp;gt; write, x-&amp;gt; execute.&lt;/li&gt;
&lt;li&gt;This section will tell us that the file is protected or not and what type of permission is given to the user who is trying to access the file.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reference:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;We generally do swap-in swap-out of pages from main-memory. So here, we have to tell that whether in past does this page came in the memory or not.&lt;/li&gt;
&lt;li&gt;When the page is coming first time in the memory than at this place &lt;code&gt;0&lt;/code&gt; will be written.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cashing:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;It contains a value of enable and disable which means that if we want to enable or disable cashing.&lt;/li&gt;
&lt;li&gt;When a data is being called multiple times, than we will place that in cash due to which less time will be required to execute that process.&lt;/li&gt;
&lt;li&gt;But this is not valid at every place such as while doing transactions. &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dirty/modify:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;By the help of dirty we can check that whether the page is modified or not. So by it we can easily and effetely update the hard disk when data is changed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;So this was all about page table classification. Hope you liked it and learned something new from it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have any doubt, question, quires related to this article or just want to share something with me, than please feel free to contact me. &lt;/p&gt;

&lt;h3&gt;
  
  
  📱 Contact Me
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/r_mishra10" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/rahul-mishra-66210b185" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;br&gt;
&lt;a href="https://t.me/rahul_mishra10" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.instagram.com/rahul_mishra10/?hl=en" rel="noopener noreferrer"&gt;Instagram&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📧 Write a mail
&lt;/h3&gt;

&lt;p&gt;&lt;a href="mailto:rahulmishra102000@gmail.com"&gt;rahulmishra102000@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Other links
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/rahulMishra05" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.hackerrank.com/rahulmishra10201" rel="noopener noreferrer"&gt;HackerRank&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Question on Logical Address &amp; Physical Address | Operating System - M05 P11</title>
      <dc:creator>Rahul Mishra</dc:creator>
      <pubDate>Fri, 25 Dec 2020 14:52:35 +0000</pubDate>
      <link>https://dev.to/rahulmishra05/question-on-logical-address-physical-address-operating-system-m05-p11-21n5</link>
      <guid>https://dev.to/rahulmishra05/question-on-logical-address-physical-address-operating-system-m05-p11-21n5</guid>
      <description>&lt;p&gt;&lt;strong&gt;This is a multipart blog article series, and in this series I am going to explain you the concepts of operating system. This article series is divided into multiple modules and this is the fifth module which consists of 26 articles.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In this article we will see a question on logical address and physical address space, to understand the concept of paging in operating system.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Question:&lt;/em&gt;&lt;/strong&gt; Consider a system which has LA = 7 bits, PA = 6 bits, page size = 8 words, then calculate number of pages and number of frames.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Answer:&lt;/em&gt;&lt;/strong&gt; Total bits of LA = 7 bits, which means it is equal to 2&lt;sup&gt;7&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;The page size = 8 words which means 2&lt;sup&gt;3&lt;/sup&gt; so we can say it is of 3 bits&lt;/p&gt;

&lt;p&gt;Therefore, Page No. = 4 which we can say is 2&lt;sup&gt;4&lt;/sup&gt; and then total number of pages = 2&lt;sup&gt;4&lt;/sup&gt; = 16&lt;/p&gt;

&lt;p&gt;While total number of bits required to respond total number of page = 4 bits.&lt;/p&gt;

&lt;p&gt;PA = 6 bits, total size of PA = 2&lt;sup&gt;6&lt;/sup&gt; = 64&lt;/p&gt;

&lt;p&gt;Now, we know that &lt;code&gt;frame offset = Page offset&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Number of frames = 2&lt;sup&gt;3&lt;/sup&gt; = 8&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Total number of entries in page table = number of pages&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Total number of entries = 16&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Total size of page table = 24 x 8&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So, this was a simple question on logical address and physical address space. Hope you liked it and learned something new from it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have a doubt, question, quires related to this article or just want to share something with me, than please feel free to contact me. &lt;/p&gt;

&lt;h3&gt;
  
  
  📱 Contact Me
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/r_mishra10"&gt;Twitter&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/rahul-mishra-66210b185"&gt;LinkedIn&lt;/a&gt;&lt;br&gt;
&lt;a href="https://t.me/rahul_mishra10"&gt;Telegram&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.instagram.com/rahul_mishra10/?hl=en"&gt;Instagram&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📧 Write a mail
&lt;/h3&gt;

&lt;p&gt;&lt;a href="mailto:rahulmishra102000@gmail.com"&gt;rahulmishra102000@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Other links
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/rahulMishra05"&gt;GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.hackerrank.com/rahulmishra10201"&gt;HackerRank&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
