<?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>Forem: FENIL SHAH</title>
    <description>The latest articles on Forem by FENIL SHAH (@th3lazykid).</description>
    <link>https://forem.com/th3lazykid</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%2F316764%2F7d1fe8c8-1b0b-4d18-9b30-f317e2e6f085.png</url>
      <title>Forem: FENIL SHAH</title>
      <link>https://forem.com/th3lazykid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/th3lazykid"/>
    <language>en</language>
    <item>
      <title>Day-11: Read Info-sec Write-Ups!</title>
      <dc:creator>FENIL SHAH</dc:creator>
      <pubDate>Sat, 27 Jun 2020 17:20:28 +0000</pubDate>
      <link>https://forem.com/th3lazykid/day-11-read-info-sec-write-ups-3cd1</link>
      <guid>https://forem.com/th3lazykid/day-11-read-info-sec-write-ups-3cd1</guid>
      <description>&lt;p&gt;&lt;strong&gt;Day-11:&lt;/strong&gt; Did Unix badge exercise on Pentesterlab and was not in the mood to do research so did read some amazing info-sec write-ups! Understanding and reading other's methodology always helps you make your thoughts broad!&lt;/p&gt;

&lt;h4&gt;
  
  
  1. &lt;strong&gt;Access to Server and Database of a French Bank&lt;/strong&gt; &lt;strong&gt;💸&lt;/strong&gt; ~ &lt;strong&gt;Thibeault Chenu!&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Understanding the structure of Target is Important!&lt;/li&gt;
&lt;li&gt;This was pretty good but I guess I need more knowledge to understand this completely if you can help, lemme know in the comment section! Thanks!❤️&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. &lt;strong&gt;Getting First Bounty with IDOR&lt;/strong&gt; ~ &lt;strong&gt;Mukul Trivedi&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Idor's are great when you get the logic errors!&lt;/li&gt;
&lt;li&gt;He also linked amazing blogs about IDOR in his blog, do not forget to check that out also!&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. &lt;strong&gt;How Inspect Element Got me a Bounty&lt;/strong&gt; ~ &lt;strong&gt;Aditya Soni&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Make Inspect Element your best friend! &lt;/li&gt;
&lt;li&gt;Idk I never tried to change value which is disabled by default! Nice catch though!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;PS: It is pretty easy to understand, If you do not understand lemme know in the comment section, I'll help you!&lt;/p&gt;




&lt;h1&gt;
  
  
  &lt;strong&gt;Resources:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Medium Blogs:&lt;/strong&gt; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://medium.com/bugbountywriteup/how-did-i-get-access-to-server-and-database-of-a-french-bank-6bab0ed30463"&gt;https://medium.com/bugbountywriteup/how-did-i-get-access-to-server-and-database-of-a-french-bank-6bab0ed30463&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/bugbountywriteup/all-about-getting-first-bounty-with-idor-849db2828c8"&gt;https://medium.com/bugbountywriteup/all-about-getting-first-bounty-with-idor-849db2828c8&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/bugbountywriteup/how-inspect-element-got-me-a-bounty-58d3a9946225"&gt;https://medium.com/bugbountywriteup/how-inspect-element-got-me-a-bounty-58d3a9946225&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Contact:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Got doubts? Contact me on &lt;a href="https://twitter.com/FenilShah1616"&gt;Twitter&lt;/a&gt;. &lt;br&gt;
Feedbacks are welcomed, do comment it down below! :)&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
      <category>blogaday</category>
      <category>infosec</category>
    </item>
    <item>
      <title>Day-10: Bash Scripting - #2</title>
      <dc:creator>FENIL SHAH</dc:creator>
      <pubDate>Fri, 26 Jun 2020 17:29:05 +0000</pubDate>
      <link>https://forem.com/th3lazykid/day-10-bash-scripting-2-2hn</link>
      <guid>https://forem.com/th3lazykid/day-10-bash-scripting-2-2hn</guid>
      <description>&lt;p&gt;&lt;strong&gt;Day-10:&lt;/strong&gt; So I did continued with bash scripting today! Going more deep in bash scripts! Check out my &lt;a href="https://dev.to/fenilshah16/day-9-bash-scripting-1-mi7"&gt;Bash Scripting - #1&lt;/a&gt; before reading the below notes! &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Variables!&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In bash syntax, variables $1 to represent the first command-line argument, $2 to represent the second command-line argument, and so on. And “$@” is the variable name for all arguments passed in. Use the syntax &lt;code&gt;VARIABLE_NAME=VARIABLE_VALUE&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

BIRTHDATE=$1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Operating the Variables!&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The user’s input string will be in the format of “2020–05–06”, we can convert the user’s birthdate to a Unix timestamp.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

BIRTHDATE=$(date -jf “%Y-%m-%d” $1 +%s)
NOW=$(date -jf “%a %b %d %T %Z %Y” “$(date)” +%s)

DIFF_IN_SECONDS=$(expr $NOW — $BIRTHDATE)
DIFF_IN_DAYS=$(expr $DIFF_IN_SECONDS / 86400)

echo "You are $DIFF_IN_DAYS days old."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Breaking down, The $() tells Unix to execute the command surrounded by the parenthesis and replace the variable with the output of the command. This is called "command substitution".&lt;/li&gt;
&lt;li&gt;Date: displays time on Unix systems!&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-jf&lt;/code&gt;: Convert one date format to another&lt;/li&gt;
&lt;li&gt;'%Y-%m-%d': Tells date that the input date string will be in the format of year-month-day!&lt;/li&gt;
&lt;li&gt;$1: Specifies that the input string is the first argument of the script!&lt;/li&gt;
&lt;li&gt;&lt;p&gt;+%s: Tells date to output the date as the number of seconds that have passed since the “Unix epoch”.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The second line command: &lt;code&gt;NOW=$(date -jf “%a %b %d %T %Z %Y” “$(date)” +%s)&lt;/code&gt; in this converted the current time into a Unix timestamp.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The third line command:&lt;code&gt;DIFF_IN_SECONDS=$(expr $NOW — $BIRTHDATE)&lt;/code&gt; in this calculated the difference between the two dates in seconds. We can calculate the difference between the two timestamps by using &lt;code&gt;"expr"&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The fourth line command: &lt;code&gt;DIFF_IN_DAYS=$(expr $DIFF_IN_SECONDS / 86400)&lt;/code&gt; then converted the difference in seconds to a difference in days by dividing the time difference in seconds by 86400. 86400 Seconds = 1 day.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The fifth line command: &lt;code&gt;echo "You are $DIFF_IN_DAYS days old."&lt;/code&gt; used echo then to display the time difference!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  &lt;strong&gt;Resources:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Bash Scripting Cheatsheet:&lt;/strong&gt; &lt;a href="https://devhints.io/bash"&gt;https://devhints.io/bash&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Bash Script examples:&lt;/strong&gt; &lt;a href="https://linuxhint.com/30_bash_script_examples/"&gt;https://linuxhint.com/30_bash_script_examples/&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Medium Blog:&lt;/strong&gt; &lt;a href="https://medium.com/swlh/the-bash-scripting-tutorial-part-2-e94d113cf33"&gt;Bash Scripting&lt;/a&gt; (You need Premium subs to access this!)&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Contact:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Got doubts? Contact me on &lt;a href="https://twitter.com/FenilShah1616"&gt;Twitter&lt;/a&gt;. &lt;br&gt;
Feedbacks are welcomed, do comment it down below! :)&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
      <category>bash</category>
      <category>blogaday</category>
    </item>
    <item>
      <title>Day-9: Bash Scripting - #1 </title>
      <dc:creator>FENIL SHAH</dc:creator>
      <pubDate>Thu, 25 Jun 2020 17:17:33 +0000</pubDate>
      <link>https://forem.com/th3lazykid/day-9-bash-scripting-1-mi7</link>
      <guid>https://forem.com/th3lazykid/day-9-bash-scripting-1-mi7</guid>
      <description>&lt;p&gt;&lt;strong&gt;Day-9:&lt;/strong&gt; Started my day with completing 5 exercises out of 35 of &lt;em&gt;Unix Badge&lt;/em&gt; on pentesterlab! After that did some research on Bash scripting, follow my notes below to know more!&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Bash Scripting, Whattttt?&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Okay so, BASH stands for &lt;em&gt;Bourne-Again SHell&lt;/em&gt;. what it does is that it takes in commands from the user and performs actions using operating system services. It is basically a shell interpreter! &lt;/li&gt;
&lt;li&gt;A Bash script is a plain text file which contains a series of commands.&lt;/li&gt;
&lt;li&gt;For example, the &lt;code&gt;ls&lt;/code&gt; command lists the files and folders in a directory. Bash is the improved version of Sh (Bourne Shell).&lt;/li&gt;
&lt;li&gt;Bash Scripting is used for: 

&lt;ul&gt;
&lt;li&gt;Managing complexities and for automating recurrent tasks.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;h3&gt;
  
  
  &lt;strong&gt;Writing the first Script!&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;The first line should be "shebang" - (#!). Starts with hash character (#) and a bang character (!) and it declares the interpreter for the script.

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;#!/bin/bash&lt;/code&gt; - This line indicates that we are using bash interpreter!&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adding Commands:&lt;/strong&gt; The command “echo” prints out its arguments to standard output. “$@” is the variable name for all arguments passed in.
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dFqNfc2k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ssaduy8uoyi45puua0qx.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File Permissions:&lt;/strong&gt; First save the file in your current directory with the extension of ".sh" (The “.sh” extension is conventional for shell scripts.) and then give permission with the following command! The “chmod” command edits the permissions for a file, and “+x” indicates that we want to add the permission to execute for all users.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod +x hello.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4 .   &lt;strong&gt;Executing the script:&lt;/strong&gt; Now you can execute the file &lt;code&gt;./hello.sh&lt;/code&gt; and it will give you the following result!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CcDAnOIL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gshhjbvtw2ak6toydmp3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CcDAnOIL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gshhjbvtw2ak6toydmp3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PS: You can use any file editor like nano, vim, etc. Here I used &lt;code&gt;nano hello.sh&lt;/code&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  &lt;strong&gt;Resources:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Bash Scripting Cheatsheet:&lt;/strong&gt; &lt;a href="https://devhints.io/bash"&gt;https://devhints.io/bash&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Bash Script examples:&lt;/strong&gt; &lt;a href="https://linuxhint.com/30_bash_script_examples/"&gt;https://linuxhint.com/30_bash_script_examples/&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Contact:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Got doubts? Contact me on &lt;a href="https://twitter.com/FenilShah1616"&gt;Twitter&lt;/a&gt;. &lt;br&gt;
Feedbacks are welcomed, do comment it down below! :)&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
      <category>blogaday</category>
      <category>bash</category>
    </item>
    <item>
      <title>Day-8: Started with Pentesterlab!</title>
      <dc:creator>FENIL SHAH</dc:creator>
      <pubDate>Wed, 24 Jun 2020 17:01:55 +0000</pubDate>
      <link>https://forem.com/th3lazykid/day-8-started-with-pentesterlab-39mi</link>
      <guid>https://forem.com/th3lazykid/day-8-started-with-pentesterlab-39mi</guid>
      <description>&lt;p&gt;Day-8: Today was a very busy day so couldn't do any research on any specific topic but I did start with pentesterlab and done with the introduction badge!&lt;/p&gt;

&lt;p&gt;Some tips from today's learnings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Always look for robots.txt! (I repeat do not ignore robots.txt)&lt;/li&gt;
&lt;li&gt;Make developers tools (available in chrome as well as firefox) your best friends!&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  &lt;strong&gt;Contact:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Got doubts? Contact me on &lt;a href="https://twitter.com/FenilShah1616"&gt;Twitter&lt;/a&gt;. &lt;br&gt;
Feedbacks are welcomed, do comment it down below! :)&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
      <category>infosec</category>
      <category>blogaday</category>
    </item>
    <item>
      <title>Day-7: Nmap -- Hacker's Favourite Scanning Tool!</title>
      <dc:creator>FENIL SHAH</dc:creator>
      <pubDate>Tue, 23 Jun 2020 17:36:52 +0000</pubDate>
      <link>https://forem.com/th3lazykid/day-7-nmap-hacker-s-favourite-scanning-tool-23j1</link>
      <guid>https://forem.com/th3lazykid/day-7-nmap-hacker-s-favourite-scanning-tool-23j1</guid>
      <description>&lt;p&gt;&lt;strong&gt;Day-7:&lt;/strong&gt; I started my day watching Dude perfect's &lt;a href="https://www.youtube.com/watch?v=lbK24iwrYbY"&gt;documentary&lt;/a&gt; and ended it learning Nmap and about its scan types! Also, In between, I bought pentesterlab pro access (3mths - Student access). &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I won't be writing more in deep, but my notes! And will be providing all the links/resources (Don't forget to check-out the resource section) from where I learned so that you can refer to that resource and learn more! Thanks!❤️&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is Nmap?&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Nmap stands for Network Mapped (Nmap) and is a network scanning and host detection tool that is very useful during several steps of penetration testing. &lt;/li&gt;
&lt;li&gt;Nmap is open source and can be used to:

&lt;ul&gt;
&lt;li&gt;Detect the live host on the network (host discovery)&lt;/li&gt;
&lt;li&gt;Detect the open ports on the host (port discovery or enumeration)&lt;/li&gt;
&lt;li&gt;Detect the software and the version to the respective port (service discovery)&lt;/li&gt;
&lt;li&gt;Detect the operating system, hardware address, and the software version&lt;/li&gt;
&lt;li&gt;Detect the vulnerability and security holes (Nmap scripts)&lt;/li&gt;
&lt;/ul&gt;


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

&lt;h3&gt;
  
  
  &lt;strong&gt;Nmap Syntax:&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nmap [scan type] [options] [target specification]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Nmap Scan types:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;TCP SCAN&lt;/li&gt;
&lt;li&gt;UDP SCAN&lt;/li&gt;
&lt;li&gt;SYN SCAN&lt;/li&gt;
&lt;li&gt;ACK SCAN&lt;/li&gt;
&lt;li&gt;FIN SCAN&lt;/li&gt;
&lt;li&gt;NULL SCAN&lt;/li&gt;
&lt;li&gt;XMAS SCAN&lt;/li&gt;
&lt;li&gt;RPC SCAN&lt;/li&gt;
&lt;li&gt;IDLE SCAN&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Using Nmap help:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The best way to get used to nmap and its flags is using &lt;code&gt;nmap -h&lt;/code&gt;, run this command in the terminal and will give you the following results:
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bXDiAITo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7m1r2w75jbmccq2b6vr1.png" alt="Alt Text"&gt; and one more screenshot, but it is creating a mess so wont post it! Try yourself and explore the world of nmap! Happy Scanning!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Port states recognized by Nmap?&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt; Six port states recognized by Nmap are:

&lt;ul&gt;
&lt;li&gt;Open&lt;/li&gt;
&lt;li&gt;Closed&lt;/li&gt;
&lt;li&gt;Filtered&lt;/li&gt;
&lt;li&gt;Unfiltered&lt;/li&gt;
&lt;li&gt;Openfiltered&lt;/li&gt;
&lt;li&gt;Closedfiltered&lt;/li&gt;
&lt;/ul&gt;


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




&lt;h1&gt;
  
  
  &lt;strong&gt;Resources:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Medium Blogs:&lt;/strong&gt; &lt;a href="https://medium.com/bugbountywriteup/intro-to-nmap-192c1796bb39"&gt;https://medium.com/bugbountywriteup/intro-to-nmap-192c1796bb39&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Nmap Installation:&lt;/strong&gt; &lt;a href="https://nmap.org/download.html"&gt;https://nmap.org/download.html&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;HackerSploit Nmap Tutorial:&lt;/strong&gt; &lt;a href="https://www.youtube.com/watch?v=5MTZdN9TEO4&amp;amp;list=PLBf0hzazHTGM8V_3OEKhvCM9Xah3qDdIx"&gt;YouTube&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Port Scanning basics:&lt;/strong&gt; &lt;a href="https://nmap.org/book/man-port-scanning-basics.html"&gt;https://nmap.org/book/man-port-scanning-basics.html&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Scan Types:&lt;/strong&gt; &lt;a href="https://www.edureka.co/blog/nmap-tutorial/"&gt;Edureka&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Contact:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Got doubts? Contact me on &lt;a href="https://twitter.com/FenilShah1616"&gt;Twitter&lt;/a&gt;. &lt;br&gt;
Feedbacks are welcomed, do comment it down below! :)&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
      <category>infosec</category>
      <category>blogaday</category>
    </item>
    <item>
      <title>Day-6: JSON Web Tokens (JWT).</title>
      <dc:creator>FENIL SHAH</dc:creator>
      <pubDate>Mon, 22 Jun 2020 18:07:29 +0000</pubDate>
      <link>https://forem.com/th3lazykid/day-6-json-web-tokens-jwt-1gc3</link>
      <guid>https://forem.com/th3lazykid/day-6-json-web-tokens-jwt-1gc3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Day-6:&lt;/strong&gt; It was a lazy day but also excited at the same time because WWDC Apple Event 2020 happening today. As said on day-4 that will do research on cross-site WebSocket hijacking, I'm not doing this right now because It's kinda more advance to me or will need more time, So I have marked this into my list, will do soon! Today did research on Json web Tokens (JWT)! So let's get started...!&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is JSON Web Tokens (JWT)?&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;JSON Web Token (JWT) is an open standard (RFC 7519) that means that anyone can use and it is used to Securely transfer information between any two bodies like any two servers or any two users. &lt;/li&gt;
&lt;li&gt;The main reason it is used because it is &lt;em&gt;digitally signed&lt;/em&gt; that means the information is verified and trusted. There is no alteration of data in between the transfer!&lt;/li&gt;
&lt;li&gt;It is &lt;em&gt;compact:&lt;/em&gt; It can be sent via URL, post request, Http header and also this makes the transmission process fast!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What problem does it solve?&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Authentication&lt;/li&gt;
&lt;li&gt;Authorization&lt;/li&gt;
&lt;li&gt;Federated identity&lt;/li&gt;
&lt;li&gt;Client-side sessions (“stateless” sessions)&lt;/li&gt;
&lt;li&gt;Client-side secrets&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is the JSON Web Token structure?&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A JSON Web Token looks like this,&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Breaking down, JWT token is divided into 3 parts i.e:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Header:&lt;/strong&gt; eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payload:&lt;/strong&gt; eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signature:&lt;/strong&gt; SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Header:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Consists of 2 parts: Type of Token and Algorithm!&lt;/li&gt;
&lt;li&gt;This JSON is Base64Url encoded!&lt;/li&gt;
&lt;li&gt;Eg.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "alg": "HS256",
  "typ": "JWT"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Payload:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It contains the claims. Basically claims are user details and additional data like iss (issuer), exp (expiration time), sub (subject), aud (audience), etc.&lt;/li&gt;
&lt;li&gt;There are 3 types of claims:

&lt;ul&gt;
&lt;li&gt;Registered claims&lt;/li&gt;
&lt;li&gt;Public claims&lt;/li&gt;
&lt;li&gt;Private claims&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;This JSON is Base64Url encoded!&lt;/li&gt;
&lt;li&gt;Eg.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Signature:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It is formed by Combining the encoded header, the encoded payload with the &lt;em&gt;secret&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;The signature is used to verify the message wasn't changed along the way!&lt;/li&gt;
&lt;li&gt;Eg.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HMACSHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),
  secret)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;How does it works?&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;This Picture explains in a perfect way,&lt;/li&gt;
&lt;/ul&gt;

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




&lt;h1&gt;
  
  
  &lt;strong&gt;Resources:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Jwt.io doc:&lt;/strong&gt; &lt;a href="https://jwt.io/introduction/"&gt;https://jwt.io/introduction/&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;JWT Handbook:&lt;/strong&gt; &lt;a href="https://www.fomasgroup.com/Portals/0/MgmNewsDocuments/jwt-handbook.pdf"&gt;https://www.fomasgroup.com/Portals/0/MgmNewsDocuments/jwt-handbook.pdf&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Contact:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Got doubts? Contact me on &lt;a href="https://twitter.com/FenilShah1616"&gt;Twitter&lt;/a&gt;. &lt;br&gt;
Feedbacks are welcomed, do comment it down below! :)&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
      <category>javascript</category>
      <category>blogaday</category>
    </item>
    <item>
      <title>Day-5: A day off but...</title>
      <dc:creator>FENIL SHAH</dc:creator>
      <pubDate>Sun, 21 Jun 2020 16:11:39 +0000</pubDate>
      <link>https://forem.com/th3lazykid/day-5-a-day-off-but-5fjd</link>
      <guid>https://forem.com/th3lazykid/day-5-a-day-off-but-5fjd</guid>
      <description>&lt;p&gt;&lt;strong&gt;Day-5:&lt;/strong&gt; Sunday...Hmmm! Today I did nothing In research but I read Two Medium blogs/Write-Ups one on ATO (Account Takeover) and one on Bypassing 2FA (2 Factor Authentication). And gave the rest of my time to family. Also realized Family talks actually makes your stress/Confusion low!😛&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Lessons learned:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ATO by Avanish Pathak:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Changing value in Email Parameter in response request can lead to ATO! &lt;/li&gt;
&lt;li&gt;The company was asking for OTP for login, what he did was: Put in the write email and code and then,

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Capture the request in Burp ==&amp;gt; Response request ==&amp;gt; Change the Email in Email Parameter to victim's email with correct OTP code ==&amp;gt; BOOM!&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;For more In detail Information check out his blog! Link in Resource down there!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2FA bypass by Seqrity:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Subdomain enumeration helps alot! It opens a whole lot of opportunities to attack the target! &lt;/li&gt;
&lt;li&gt;If the main domain is asking for 2FA Don't forget to check out that other domains are?, You can change the Host Header and can bypass 2FA!&lt;/li&gt;
&lt;li&gt;For more In detail Information check out his blog! Link in Resource down there!&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;PS: Happy Father's Day to all Fathers out there!❤️&lt;/p&gt;




&lt;h1&gt;
  
  
  &lt;strong&gt;Resources:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;ATO WriteUp by Avanish Pathak:&lt;/strong&gt; &lt;a href="https://medium.com/@avanishpathak46/an-interesting-account-takeover-vulnerability-f5bf6a89152c"&gt;https://medium.com/@avanishpathak46/an-interesting-account-takeover-vulnerability-f5bf6a89152c&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;2FA bypass by Seqrity:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://medium.com/@seqrity/bypass-2fa-like-a-boss-378787707ba"&gt;https://medium.com/@seqrity/bypass-2fa-like-a-boss-378787707ba&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Contact:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Got doubts? Contact me on &lt;a href="https://twitter.com/FenilShah1616"&gt;Twitter&lt;/a&gt;. &lt;br&gt;
Feedbacks are welcomed, do comment it down below! :)&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
      <category>blogaday</category>
      <category>infosec</category>
    </item>
    <item>
      <title>Day-4: WebSocket! Wait, what???</title>
      <dc:creator>FENIL SHAH</dc:creator>
      <pubDate>Sat, 20 Jun 2020 14:48:58 +0000</pubDate>
      <link>https://forem.com/th3lazykid/day-4-websocket-wait-what-2m6a</link>
      <guid>https://forem.com/th3lazykid/day-4-websocket-wait-what-2m6a</guid>
      <description>&lt;p&gt;&lt;strong&gt;Day-4:&lt;/strong&gt; Okay so I was scrolling on Twitter and read this,&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r6lG7zXf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/x48w6yoxefvpv9n5sja0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r6lG7zXf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/x48w6yoxefvpv9n5sja0.png" alt="Alt Text"&gt;&lt;/a&gt; This made me think what the heck is WebSocket? I never heard about it before!👀&lt;/p&gt;

&lt;p&gt;Also, he got $8000 as Bug bounty for his submission on another report! Basically, it was somewhat related to Npm token as well as WebSocket hijacking! At first, I watched his WriteUp Video and then read his WriteUp but was not clear so I thought let's understand the concept and then maybe I understand what he wanted to say!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is WebSocket?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ohhhh lol, Websocket is just like Http, a communication protocol that enables interaction between a browser and a web server. I thought it was linked with a socket or something (Just Kidding)! &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;WebSocket is especially great for services that require continuous data exchange, e.g. online games, real-time trading systems and so on. For example, Slack’s web app uses WebSocket connections to sync messages in its chat functionality.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;During the lifetime of a WebSocket connection, the client and the server are free to exchange any amount of data without incurring the overhead and latency of using traditional HTTP requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For more good Understanding I prefer you to watch this &lt;a href="https://www.youtube.com/watch?v=ZbrEztkwcw8"&gt;https://www.youtube.com/watch?v=ZbrEztkwcw8&lt;/a&gt;!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How WebSocket it different from HTTP?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=i5OVcTdt_OU"&gt;https://www.youtube.com/watch?v=i5OVcTdt_OU&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How WebSocket connections are created?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A WebSocket connection between a client and a server is established through a WebSocket handshake.&lt;/li&gt;
&lt;li&gt;To open a WebSocket connection, we need to create new WebSocket using the special protocol &lt;code&gt;ws://&lt;/code&gt; in the URL.&lt;/li&gt;
&lt;li&gt;There's also an encrypted &lt;code&gt;wss://&lt;/code&gt; protocol. It’s like HTTPS for WebSockets.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Problems with WebSocket?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WebSocket allows an unlimited number of connections to the target server and thus resources on the server can be exhausted because of DOS attack. &lt;/li&gt;
&lt;li&gt;WebSockets are vulnerable to malicious input data attacks, therefore leading to attacks like Cross-Site Scripting (XSS).&lt;/li&gt;
&lt;li&gt;The Websocket protocol doesn’t handle authorization and/or authentication. Application-level protocols should handle that separately in case sensitive data is being transferred.&lt;/li&gt;
&lt;li&gt;Also, some more problems, Do refer &lt;a href="https://resources.infosecinstitute.com/websocket-security-issues/#gref"&gt;WebSocket Issues&lt;/a&gt; for the same!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;PS: Now I got Idea what actually WebSocket is, So probably I'll do research about Hijacking WebSockets on Day-5! I hope my notes from different websites are/will helping/help you! Thanks!❤️&lt;/p&gt;




&lt;h1&gt;
  
  
  &lt;strong&gt;Resources&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Aseem's WriteUp:&lt;/strong&gt; &lt;a href="https://medium.com/@aseem.shrey/one-token-to-leak-them-all-the-story-of-a-8000-npm-token-79b13af182a3"&gt;https://medium.com/@aseem.shrey/one-token-to-leak-them-all-the-story-of-a-8000-npm-token-79b13af182a3&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Aseem's WriteUp Video:&lt;/strong&gt; &lt;a href="https://www.youtube.com/watch?v=9LBl-uFiYUE"&gt;YouTube&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Javascript Docs:&lt;/strong&gt; &lt;a href="https://javascript.info/websocket"&gt;https://javascript.info/websocket&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Infosecinstitue:&lt;/strong&gt; &lt;a href="https://resources.infosecinstitute.com/websocket-security-issues/#gref"&gt;WebSocket Issues&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Contact:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Got doubts? Contact me on &lt;a href="https://twitter.com/FenilShah1616"&gt;Twitter&lt;/a&gt;. &lt;br&gt;
Feedbacks are welcomed, do comment it down below! :)&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>javascript</category>
      <category>security</category>
      <category>blogaday</category>
    </item>
    <item>
      <title>Day-3: Bypassing the SOP!💣</title>
      <dc:creator>FENIL SHAH</dc:creator>
      <pubDate>Fri, 19 Jun 2020 17:40:04 +0000</pubDate>
      <link>https://forem.com/th3lazykid/day-3-bypassing-the-sop-4a8j</link>
      <guid>https://forem.com/th3lazykid/day-3-bypassing-the-sop-4a8j</guid>
      <description>&lt;p&gt;&lt;strong&gt;Day-3:&lt;/strong&gt; Yesterday I looked and researched about what actually the SOP is and what actually the SOP does, Today I looked at all the attack vectors for SOP and also watched Nahamsec's Interview with Ngalongc! Nahamsec is one of the famous hackers who frequently does youtube videos as well as goes live on Twitch doing live hacking and interviews and much more. Do check out &lt;a href="https://www.twitch.tv/nahamsec"&gt;https://www.twitch.tv/nahamsec&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Attacking the SOP!&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;There are often ways that an attacker can use to manipulate cross-origin communication because of faulty implementation of one of the SOP relaxing techniques. (Refer Day-2 for Relaxing techniques!)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This faulty implementation of one of the SOP relaxing techniques, may can cause private information to be leaked and often leads to more vulnerabilities such as authentication bypass, account takeover and large data breaches.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I got quite a good result by researching ways of how the attacker can achieve this, Let's talk about some:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;1.) &lt;strong&gt;XSS!&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;XSS is full SOP bypass because attacker can run malicious script executed on the victim page, the script can access the page’s resources and data. For example: running alert(document.cookie), This will return all the cookies and also we can get this with the help of src vector!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2.) &lt;strong&gt;Exploiting CORS!&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Exploitable misconfigurations:

&lt;ul&gt;
&lt;li&gt;When the site uses weak regex to validate origins. For example, have a look at this &lt;a href="https://medium.com/@minosagap/same-origin-policy-and-ways-to-bypass-250effdc4a12"&gt;blog&lt;/a&gt; (Refer to CORS)!&lt;/li&gt;
&lt;li&gt;Another misconfiguration of CORS that can be exploited is setting allowed origins to NULL or &lt;code&gt;attacker.com&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Unexploitable misconfigurations:

&lt;ul&gt;
&lt;li&gt;When custom headers are used for authentication, or when there are random, unguessable keys placed in the request or the URL.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;3.) &lt;strong&gt;Exploiting postMessage:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When using postMessage, both the sender and the receiver of the message should verify the origin of the other side. Vulnerabilities happen when pages enforce poor origin check (weak regex, for example), or lack origin checks altogether.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To exploit this issue, an attacker can create a malicious HTML page that listens for events coming from the vulnerable page. The attacker can then trick victims into triggering the postMessage utilizing a malicious link or fake image and make the victim page send data to the attacker’s page. (Refer Medium blog 1 for more details)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  &lt;strong&gt;Resources:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Medium blogs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://medium.com/swlh/hacking-the-same-origin-policy-f9f49ad592fc"&gt;https://medium.com/swlh/hacking-the-same-origin-policy-f9f49ad592fc&lt;/a&gt; (You need premium subs to read this blog).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/@minosagap/same-origin-policy-and-ways-to-bypass-250effdc4a12"&gt;https://medium.com/@minosagap/same-origin-policy-and-ways-to-bypass-250effdc4a12&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Hackerone Report:&lt;/strong&gt; &lt;a href="https://hackerone.com/reports/47495"&gt;https://hackerone.com/reports/47495&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Fedora bypassing SOP docs:&lt;/strong&gt; &lt;a href="https://docs.fedoraproject.org/en-US/Fedora_Security_Team/1/html/Secure_Ruby_Development_Guide/ch03s02s02.html"&gt;SOP DOC&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Mozilla web docs:&lt;/strong&gt; &lt;a href="https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy"&gt;Same-Origin Policy&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Tool to Remove SOP issues:&lt;/strong&gt; &lt;a href="https://github.com/bripkens/proxrox"&gt;Proxrox&lt;/a&gt; (This tool removes same-origin policy issues that typically occur during development.)&lt;br&gt;
&lt;strong&gt;Nahamsec's Interview with Ngalongc:&lt;/strong&gt; &lt;a href="https://www.youtube.com/watch?v=5HE68I4hILg"&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Contact:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Got doubts? Contact me on &lt;a href="https://twitter.com/FenilShah1616"&gt;Twitter&lt;/a&gt;. &lt;br&gt;
Feedbacks are welcomed, do comment it down below! :)&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
      <category>blogaday</category>
      <category>infosec</category>
    </item>
    <item>
      <title>Day-2: Understanding the SOP! 🔪</title>
      <dc:creator>FENIL SHAH</dc:creator>
      <pubDate>Thu, 18 Jun 2020 17:40:02 +0000</pubDate>
      <link>https://forem.com/th3lazykid/day-2-understanding-the-sop-254j</link>
      <guid>https://forem.com/th3lazykid/day-2-understanding-the-sop-254j</guid>
      <description>&lt;p&gt;&lt;strong&gt;Day-2:&lt;/strong&gt; I started My day with Netflix (Peaky Blinders) and ended it with watching OWASP Stockholm - Mathias Karlsson's Talk on YouTube (How to Differentiate Yourself as a Bug Bounty Hunter) and In between I read and researched about Same-Origin Policy!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So, What the heck is SOP?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;As you can see the cover page of this blog, you can cleary understand what actually Same-Origin Policy means! In simple words, A script from page A can only access data from page B if they are of the same origin.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Who has the Same Origin?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If Two urls share the same protocol, hostname and port number are said to have Same Origin.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example 1 is given in the starting of the blog!&lt;/p&gt;

&lt;p&gt;Example 2: &lt;code&gt;https://fenilshah.com&lt;/code&gt;. [Port 443 by default]&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://fenilshah.com/ (same origin because same protocol(https), hostname(fenilshah) and port number(443) )
http://fenilshah.com/ (different origin, because protocol differs (http insted of https) )
https://fenil.com/ (different origin, because hostname differs (fenil instead of fenilshah) )
https://fenilshah.com:8080/ (different origin, because port number differs (8080 instead of 443) )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What actually the Same-Origin Policy does?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modern web applications often base their authentication on HTTP cookies, and servers take action based on the cookies included automatically by the browser. This makes SOP especially important.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Okay, so imagine you are logged in &lt;code&gt;apple.com&lt;/code&gt; and at the same time you are visiting &lt;code&gt;fenilshah.com&lt;/code&gt;. If SOP doesn’t exist, a script hosted on &lt;code&gt;fenilshah.com&lt;/code&gt; is free to access your information on &lt;code&gt;apple.com&lt;/code&gt;, since your browser would automatically include your &lt;code&gt;apple.com&lt;/code&gt; cookies in every request you send to &lt;code&gt;apple.com&lt;/code&gt; (Even if the request is a malicious one generated from a script hosted on &lt;code&gt;fenilshah.com&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;This way attacker can steal the csrf tokens, private email addresses, addresses and other information parsed from the page. And this is why Same-Origin Policy is Important, as SOP will prevent the malicious script hosted on &lt;code&gt;fenilshah.com&lt;/code&gt; to read the HTML data returned from &lt;code&gt;apple.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Relaxing the SOP!&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Large websites would not be able to share information with each other because of the restrictive Same-Origin Policy so for such Issues new ways were Invented such as:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Setting document.domain!&lt;br&gt;
Cross-origin resource sharing (CORS)!&lt;br&gt;
Cross-domain messaging (postMessage)!&lt;br&gt;
JSON with Padding (JSONP)!&lt;/p&gt;
&lt;/blockquote&gt;


&lt;/blockquote&gt;




&lt;p&gt;&lt;strong&gt;Resources:&lt;/strong&gt; &lt;a href="https://medium.com/swlh/hacking-the-same-origin-policy-f9f49ad592fc"&gt;https://medium.com/swlh/hacking-the-same-origin-policy-f9f49ad592fc&lt;/a&gt; (You need premium subs to read this blog).&lt;br&gt;
&lt;strong&gt;Mozilla web docs:&lt;/strong&gt; &lt;a href="https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy"&gt;Same-Origin Policy&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Tool to Remove SOP issues:&lt;/strong&gt; &lt;a href="https://github.com/bripkens/proxrox"&gt;Proxrox&lt;/a&gt; (This tool removes same-origin policy issues that typically occur during development.)&lt;br&gt;
&lt;strong&gt;Mathias Karlsson's Talk&lt;/strong&gt;: &lt;a href="https://www.youtube.com/watch?v=WTH6f0R7uzo&amp;amp;list=LLJH-DeLtNAwhw5Ble1bjuEA&amp;amp;index=5&amp;amp;t=0s"&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Got doubts? Contact me on &lt;a href="https://twitter.com/FenilShah1616"&gt;Twitter&lt;/a&gt;. &lt;br&gt;
Feedbacks are welcomed, do comment it down below! :)&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>infosec</category>
      <category>blogaday</category>
      <category>security</category>
    </item>
    <item>
      <title>Day-1: Understanding Base64</title>
      <dc:creator>FENIL SHAH</dc:creator>
      <pubDate>Wed, 17 Jun 2020 15:13:10 +0000</pubDate>
      <link>https://forem.com/th3lazykid/day-1-understanding-base64-662</link>
      <guid>https://forem.com/th3lazykid/day-1-understanding-base64-662</guid>
      <description>&lt;p&gt;Same as other students who want to become software engineer or full stack developer I decided to start my journey in website hacking/pentesting, I'll be posting everyday what I learnt that particular day! The motive of doing this is simple which is to share knowledge. Maybe my daily blogging may help people who want to do the same as me but donno where to start with and also in the other way this will help me to keep tracking of my learnings!&lt;/p&gt;

&lt;p&gt;About me: I'm Fenil Shah(18), I'm a security enthusiast as well as a Mozillian. Currently pursuing Bachelor of Computer Application (Second Year).&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Day-1:&lt;/strong&gt; Before moving on to different types of vulnerability I am starting with concepts of website or say how the internet works or types of encryptions and tokens used! &lt;/p&gt;

&lt;p&gt;Today I read a blog of Vickie Li in which she explains what base64 encoding is, how to identify the base64 string, how does base64 work, decoding it and other base64 implementations!&lt;/p&gt;

&lt;p&gt;Base64 is a binary to ASCII encoding scheme. The pilot use case of base64 is to transmit data across different machines.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This is how base64 encoded string looks like,
eg: SGVsbG8gZGV2enohCkhvcGUgeW91J2xsIGFyZSBkb2luZyB3ZWxsIQ==

- Upper case alphabet characters A-Z.
- Lower case alphabet characters a-z.
- Number characters 0–9.
- Characters + and /.
- The = character is used for padding.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each Base64 digit represents exactly 6 bits of data. The = padding character is added so that the last encoded block will have four base64 characters. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is it used for?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data transmission&lt;/li&gt;
&lt;li&gt;File embedding&lt;/li&gt;
&lt;li&gt;Data hashing&lt;/li&gt;
&lt;li&gt;Cryptography&lt;/li&gt;
&lt;li&gt;Data obfuscation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How does base64 work?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Base64 encoding converts every three bytes of data into four base64 characters. For more to understand in a practical way, I would suggest to have a look at this video on &lt;a href="https://www.youtube.com/watch?v=aUdKd0IFl34"&gt;YouTube&lt;/a&gt;. &lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;: &lt;a href="https://medium.com/swlh/powering-the-internet-with-base64-d823ec5df747"&gt;https://medium.com/swlh/powering-the-internet-with-base64-d823ec5df747&lt;/a&gt; (You need premium subs to read this blog).&lt;br&gt;
Encoding: You can encode any base64 string &lt;a href="https://www.base64encode.org"&gt;here&lt;/a&gt;&lt;br&gt;
Decoding: You can Decode any base64 string &lt;a href="https://www.base64decode.org"&gt;here&lt;/a&gt;&lt;br&gt;
Another Tool for Encoding and Decoding: &lt;a href="https://url-decode.com/tool/base64-decode"&gt;https://url-decode.com/tool/base64-decode&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Got doubts? Contact me on &lt;a href="https://twitter.com/FenilShah1616"&gt;Twitter&lt;/a&gt;. &lt;br&gt;
Feedbacks are welcomed, do comment it down below! :)&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>infosec</category>
      <category>blogaday</category>
      <category>security</category>
    </item>
  </channel>
</rss>
