<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="https://rainerinfosec.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://rainerinfosec.com/" rel="alternate" type="text/html" /><updated>2021-07-22T01:16:26+00:00</updated><id>https://rainerinfosec.com/feed.xml</id><title type="html">RainerInfoSec</title><subtitle>Cyber Stuff.</subtitle><author><name>Rainer</name></author><entry><title type="html">LLMNR Poisoning</title><link href="https://rainerinfosec.com/activedirectory/LLMNR-Poisoning/" rel="alternate" type="text/html" title="LLMNR Poisoning" /><published>2021-07-21T00:00:00+00:00</published><updated>2021-07-21T00:00:00+00:00</updated><id>https://rainerinfosec.com/activedirectory/LLMNR-Poisoning</id><content type="html" xml:base="https://rainerinfosec.com/activedirectory/LLMNR-Poisoning/">&lt;h1 id=&quot;llmnr-poisoning&quot;&gt;LLMNR Poisoning&lt;/h1&gt;

&lt;p&gt;LLMNR - The link-local multicast name resolution. A protocol with a similar function as that of NetBIOS (Outdated) and generally, is used as a replacement.&lt;br /&gt;
LLMNR and NetBIOS allow name resolution for devices on the network, essentially - A DNS type function, without needing DNS configuration. As LLMNR sends its requests via broadcast packets, it is possible to intercept them and perform a Man-in-the-Middle (MITM) attack.&lt;/p&gt;

&lt;h2 id=&quot;example-attack&quot;&gt;Example Attack:&lt;/h2&gt;

&lt;p&gt;First things first a lab is required for the example attack. For the example attack below the following config was used:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Machines&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;A Domain Controller running active directory.&lt;/li&gt;
  &lt;li&gt;A Windows 10 (Education) workstation added to the domain network.&lt;/li&gt;
  &lt;li&gt;Parrot OS machine, not added to the domain, however, still on the same network.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tools&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Responder&lt;/li&gt;
  &lt;li&gt;Hashcat&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How the attack works&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Victim user will try to access something like a drive, which is spelt in correctly or not resolvable via DNS.&lt;/li&gt;
  &lt;li&gt;Responder will act as a DNS server “knowing” where this drive is.&lt;/li&gt;
  &lt;li&gt;Victim sends over NTLMv2 username and password hash.&lt;/li&gt;
  &lt;li&gt;Password is cracked with Hashcat.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Firstly, start Responder. Keep it running until traffic is received.&lt;/p&gt;

&lt;p&gt;For this attack the options -rdw and -v are used.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;r = Enables Responder to answer NetBIOS wredir queries.&lt;/li&gt;
  &lt;li&gt;d = Enables Responder to answer NetBIOS domain suffix queries.&lt;/li&gt;
  &lt;li&gt;w = Start the WPAD server.&lt;/li&gt;
  &lt;li&gt;v = Verbose, so that captures can be handled as they come in.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/imgs/Posts/LLMNR/Responder.png&quot; alt=&quot;Responder&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The user victim mistakenly tries to connect to the network drive “marketig”. This causes LLMNR to broadcast packets to the entire network to see if there is any machine that knows the location of this drive.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/imgs/Posts/LLMNR/Responder_Catch.png&quot; alt=&quot;Responder Catch&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Looking at the NTLMv2 hash, it is possible to see its format - Username::Domain:Password-Hash. Knowing that the hash is NTLMv2, cracking the hash is an option. By cracking the hash, it is possible to open a door into the network. Getting a user and their password allows for a potential pivot in the network.&lt;/p&gt;

&lt;p&gt;Using Hashcat, it is possible to crack the password using the module 5600.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/imgs/Posts/LLMNR/Hashcat.png&quot; alt=&quot;Responder Catch&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And behold… the password of Password123 has been uncovered.&lt;/p&gt;</content><author><name>Rainer</name></author><category term="ActiveDirectory" /><summary type="html">An article to show LLNMR Poisoning</summary></entry><entry><title type="html">CTF Site Scanner (Python)</title><link href="https://rainerinfosec.com/scripting/python/ctf/CTF-Site-Scanner/" rel="alternate" type="text/html" title="CTF Site Scanner (Python)" /><published>2021-01-01T00:00:00+00:00</published><updated>2021-01-01T00:00:00+00:00</updated><id>https://rainerinfosec.com/scripting/python/ctf/CTF-Site-Scanner</id><content type="html" xml:base="https://rainerinfosec.com/scripting/python/ctf/CTF-Site-Scanner/">&lt;h1 id=&quot;simple-ctf-script&quot;&gt;Simple CTF script&lt;/h1&gt;
&lt;hr /&gt;

&lt;p&gt;You’re doing a CTF and your wordlist isn’t finding any directories… maybe they are using custom url’s on purpose so that the wordlist won’t work? Maybe they’ve hidden comments in the source code to point to a dev area? It can be annoying to search through, even more so when there is a large page with a ton of source code!&lt;/p&gt;

&lt;p&gt;I created this script to look through html and find interesting elements, such as urls, comments and soon to be, hidden html elements. In scope of this project will be the ability for recursive searching using a word list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does it do?&lt;/strong&gt;
This script will pull the site source code, look for any urls and comments, then parse them out.&lt;/p&gt;

&lt;p&gt;Updates to come:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Search for hidden html elements.&lt;/li&gt;
  &lt;li&gt;Ability to search multiple urls and output them together in one output.&lt;/li&gt;
&lt;/ul&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;requests&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;bs4&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BeautifulSoup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Comment&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;sys&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;os&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;#Colour list
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ansi_Black&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\u001b&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;[30m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ansi_Red&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\u001b&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;[31m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ansi_Green&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\u001b&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;[32m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ansi_Yellow&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\u001b&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;[33m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ansi_Blue&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\u001b&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;[34m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ansi_Magenta&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\u001b&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;[35m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ansi_Cyan&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\u001b&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;[36m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ansi_White&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\u001b&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;[37m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ansi_Reset&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\u001b&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;[0m&quot;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;#Windows has weird python bug, where it won't load ANSI colors unless cls is run first, so... we run cls
#os.system(&quot;cls&quot;)
&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Error: Too many positional arguments! &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'Error: You must provide a URL'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;startswith&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;startswith&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'Error: You must provide http:// or https://'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;URL&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;requests&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;URL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;soup&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BeautifulSoup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;'html.parser'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;#Search URLS
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;href_Arr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;link&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;soup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find_all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'a'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;href_Arr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'href'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ansi_Red&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Starting search.... &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'''&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ansi_Yellow&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;URLS found on webpage &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;URL&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ansi_Reset&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;
============================================== &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ansi_Cyan&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'''&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;href_Arr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ansi_Reset&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;==============================================&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;#Search for comments
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;comments_arr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;comments&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;soup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findAll&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;isinstance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Comment&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;comments_arr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;comments&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'''&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ansi_Yellow&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Comments found on webpage &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;URL&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ansi_Reset&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;
============================================== &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ansi_Green&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'''&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;comments_arr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ansi_Reset&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;==============================================&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Example output (From http://RainerInfoSec.com)
&lt;img src=&quot;/assets/imgs/site_script1.PNG&quot; alt=&quot;Script Output&quot; /&gt;&lt;/p&gt;</content><author><name>Rainer</name></author><category term="scripting" /><category term="python" /><category term="CTF" /><summary type="html">A simple script to grab all url's and comments from a source page.</summary></entry><entry><title type="html">JUICESHOP LEVEL 1</title><link href="https://rainerinfosec.com/juiceshop/JuiceBox-Level-1-Walkthrough/" rel="alternate" type="text/html" title="JUICESHOP LEVEL 1" /><published>2020-09-06T00:00:00+00:00</published><updated>2020-09-06T00:00:00+00:00</updated><id>https://rainerinfosec.com/juiceshop/JuiceBox-Level-1-Walkthrough</id><content type="html" xml:base="https://rainerinfosec.com/juiceshop/JuiceBox-Level-1-Walkthrough/">&lt;p&gt;Here we will go through Juiceshop Level 1&lt;/p&gt;

&lt;!--more--&gt;
&lt;blockquote&gt;
  &lt;p&gt;Curabitur blandit tempus porttitor. Nullam quis risus eget urna mollis ornare vel eu leo. Nullam id dolor id nibh ultricies vehicula ut id elit.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3 id=&quot;level-1&quot;&gt;Level 1&lt;/h3&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Challenge&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;u&gt;Bonus Payload&lt;/u&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Use the bonus payload &amp;lt;iframe width=&quot;100%&quot; height=&quot;166&quot; scrolling=&quot;no&quot; frameborder=&quot;no&quot; allow=&quot;autoplay&quot; src=&quot;https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/771984076&amp;amp;color=%23ff5500&amp;amp;auto_play=true&amp;amp;hide_related=false&amp;amp;show_comments=true&amp;amp;show_user=true&amp;amp;show_reposts=false&amp;amp;show_teaser=true&quot;&amp;gt;&amp;lt;/iframe&amp;gt; in the DOM XSS challenge.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;u&gt;Confidential Document&lt;/u&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Access a confidential document.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;u&gt;DOM XSS&lt;/u&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Perform a DOM XSS attack with &amp;lt;iframe src=&quot;javascript:alert(`xss`)&quot;&amp;gt;.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;u&gt;Error Handling&lt;/u&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Provoke an error that is neither very gracefully nor consistently handled.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;u&gt;Exposed Metrics&lt;/u&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Find the endpoint that serves usage data to be scraped by a popular monitoring system.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;u&gt;Missing Encoding&lt;/u&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Retrieve the photo of Bjoern’s cat in “melee combat-mode”.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;u&gt;Outdated Whitelist&lt;/u&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Let us redirect you to one of our crypto currency addresses which are not promoted any longer.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;u&gt;Privacy Policy&lt;/u&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Read our privacy policy&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;u&gt;Repetitive Registration&lt;/u&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Follow the DRY principle while registering a user.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;u&gt;Zero Stars&lt;/u&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Give a devastating zero-star feedback to the store.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;</content><author><name>Rainer</name></author><category term="Juiceshop" /><summary type="html">Here we will go through Juiceshop Level 1</summary></entry><entry><title type="html">USERS ARE DANGEROUS</title><link href="https://rainerinfosec.com/misc/Users-are-dangerous/" rel="alternate" type="text/html" title="USERS ARE DANGEROUS" /><published>2020-08-24T00:00:00+00:00</published><updated>2020-08-24T00:00:00+00:00</updated><id>https://rainerinfosec.com/misc/Users-are-dangerous</id><content type="html" xml:base="https://rainerinfosec.com/misc/Users-are-dangerous/">&lt;h1 id=&quot;users-are-dangerous&quot;&gt;Users are dangerous&lt;/h1&gt;

&lt;p&gt;Users are at the forefront of most experiences when external users or customers interact with a company. Ranging from customer services to IT technicians, users will be using either published applications or those created in house for tasks specific to the company. With users having access to systems, comes the risk of data loss, corruption or data transferring into the hands of unauthorised people.&lt;!--more--&gt;
Any compromised data integrity will result in reputational and financial damage. With recent EU GDPR laws having been updated and enforced from  25th May 2018, companies can now get a fine of up to 4% of their worldwide annual turnover and a ban on data processing.  With such severe consequences, important processes must be in place within the company to mitigate risk and penalty upon breach.&lt;/p&gt;

&lt;p&gt;IBM’s 2014 Cyber Security Intelligence Index stated that 95% of security breaches were caused by human error, with the highest contributing factor being malicious emails.
There are many factors that can cause users to be the key to a security breach. With Cisco’s 2018 Annual Cybersecurity Report showing phishing the top entry point for a breach. A notable example of a phishing email attack was the 2015 Anthem data breach. It was believed to have started due to the stealing of “credentials of five different tech workers, possibly through some kind of “phishing” scheme” (Insurance Journal, 2015).
Unfortunately, there are still many practices that users follow for ease of work, rather than the security of the company. Writing down or sharing passwords are prime examples of how users, seek the simplest way to work, without considering the implications and risks it involves. Due to the technical skills of most users, they are unable to fully understand the consequences of what these types of incidents can lead to. Other than financial and reputational damage, a breach and lead to the destruction of misuse of data. This In turn, without sufficient backups, could break the company and shut it down.
Best practices to mitigate user risk.
As with human error, expecting a 100% risk-free environment is nearly impossible to accomplish. Following industry best practices is key to mitigating potential dangers. Industry best practices will usually be set by the technology creator, for example, Microsoft and Active Directory or Cisco IOS.&lt;/p&gt;

&lt;p&gt;It is important to apply all updates to any technology used from these manufacturers, as they will be patching any undisclosed or public security concerns. Hackers will constantly be finding bugs and exploits within technology. Users will be the hackers gate into a computer system. This will work by users allowing them access, usually by accident malicious code, most commonly within social engineered emails.
Parallel with patching via vendors, systems should also follow all configuration best practises recommended by the vendor. Vendors will have completed rigorous testing on their technology so are best accustomed to make the best decisions on how to securely use their systems. In regard to basic user configuration, in a Windows environment, Microsoft have best practices on how to use Active Directory and Group Policy.  Administrators are recommended basic steps such as password complexity and force password change every 90 days minimum. It will be important to only provide users with the lowest permissions they will need.&lt;/p&gt;

&lt;p&gt;User Training will make a big difference to a company’s workforce. Teaching users about basic cybersecurity, for example, not clicking on links within emails that you were not expecting. A good example of this training will be phishing test software such as Sophos. It allows an organised and controlled sending of customised phishing attacks on behalf of the company. This will allow tracking of users who have actioned the suspicious email with a click. Once a company has a list of these users, it can pinpoint training to those who are susceptible to phishing attacks. Alongside these tests, users should undertake training, normally with a compliance department or IT.
User attacks can start from poor user management. It is vital to remove and disable all accounts once a user has left, even more importantly, if they were an administrator to any system or were able to log in remotely. Disgruntled users can seek to cause damage to a company due to spite.
With most companies using remote workers, it’s crucial to ensure that the users can continue to work off-site in conjunction with secure data. Device encryption together with 2-factor authentication is the safest method of creating such an environment. This will allow all data to safe if the user loses who has their laptop stolen.
Conclusion&lt;/p&gt;

&lt;p&gt;As much as users pose a threat to business, there are many ways to limit damage or prevent accidental damage to start with. With basic steps being taken by companies to ensure mitigation, as described by IBM’s 2014 Cyber Security Intelligence Index, only 5% of breaches would be successful.
It is important to follow all steps ranging from patch management, configuration, user management, training, and encryption. Once all steps are firmly satisfied, a company should be safe from a breach resulting from a user. With staff turn around, there will always be a need to refresh these principles to ensure a continuously safe environment&lt;/p&gt;</content><author><name>Rainer</name></author><category term="misc" /><category term="users" /><category term="dangerous" /><summary type="html">Users are at the forefront of most experiences when external users or customers interact with a company...</summary></entry></feed>