<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pentesting on rchitect</title><link>https://www.rchitect.in/series/pentesting/</link><description>Recent content in Pentesting on rchitect</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 15 Sep 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://www.rchitect.in/series/pentesting/index.xml" rel="self" type="application/rss+xml"/><item><title>gpp-decrypt for password de-crypt</title><link>https://www.rchitect.in/posts/gpp-decrypt/</link><pubDate>Thu, 15 Sep 2022 00:00:00 +0000</pubDate><guid>https://www.rchitect.in/posts/gpp-decrypt/</guid><description>&lt;h1 id="usage-of-gpp-decrypt"&gt;
 Usage of gpp-decrypt
 &lt;a class="heading-link" href="#usage-of-gpp-decrypt"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;&amp;ldquo;gpp-decrypt&amp;rdquo; is a tool built of python3 which can be used for decrypting AD related passwords.&lt;/p&gt;
&lt;p&gt;During some of the active directory labs, I could see a &amp;ldquo;groups.xml&amp;rdquo; which contain the local admininistartor password in encrypted format. I have used the &amp;ldquo;gpp-decrypt&amp;rdquo; to decrypt the password.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\Groups\&amp;gt; ls
 . D 0 Sat Jul 21 06:37:44 2018
 .. D 0 Sat Jul 21 06:37:44 2018
 Groups.xml A 533 Wed Jul 18 16:46:06 2018

 5217023 blocks of size 4096. 278651 blocks available
smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\Groups\&amp;gt; get Groups.xml 
getting file \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\Groups\Groups.xml of size 533 as Groups.xml (0.9 KiloBytes/sec) (average 0.9 KiloBytes/sec)
smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\Groups\&amp;gt; exit

┌──(rocky㉿kali)-[~/hckbox/Active-1/smb]
└─$ cat Groups.xml 
&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;
&amp;lt;Groups clsid=&amp;#34;{3125E937-EB16-4b4c-9934-544FC6D24D26}&amp;#34;&amp;gt;&amp;lt;User clsid=&amp;#34;{DF5F1855-51E5-4d24-8B1A-D9BDE98BA1D1}&amp;#34; name=&amp;#34;active.htb\SVC_TGS&amp;#34; image=&amp;#34;2&amp;#34; changed=&amp;#34;2018-07-18 20:46:06&amp;#34; uid=&amp;#34;{EF57DA28-5F69-4530-A59E-AAB58578219D}&amp;#34;&amp;gt;&amp;lt;Properties action=&amp;#34;U&amp;#34; newName=&amp;#34;&amp;#34; fullName=&amp;#34;&amp;#34; description=&amp;#34;&amp;#34; cpassword=&amp;#34;edBSHOwhZLTjt/QS9FeIcJ83mjWA98gw9guKOhJOdcqh+ZGMeXOsQbCpZ3xUjTLfCuNH8pG5aSVYdYw/NglVmQ&amp;#34; changeLogon=&amp;#34;0&amp;#34; noChange=&amp;#34;1&amp;#34; neverExpires=&amp;#34;1&amp;#34; acctDisabled=&amp;#34;0&amp;#34; userName=&amp;#34;active.htb\SVC_TGS&amp;#34;/&amp;gt;&amp;lt;/User&amp;gt;
&amp;lt;/Groups&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h5 id="why-this-password-was-shown-in-this-folder"&gt;
 Why this password was shown in this folder:
 &lt;a class="heading-link" href="#why-this-password-was-shown-in-this-folder"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h5&gt;
&lt;p&gt;This was due to the Microsoft group policy preference. Due to this settings a sysvol is created with encrypted password of admin. More can be read &lt;a href="https://adsecurity.org/?p=2288" class="external-link" target="_blank" rel="noopener"&gt;here&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>John the ripper as passowrd cracking tool</title><link>https://www.rchitect.in/posts/john-ripper/</link><pubDate>Wed, 13 Apr 2022 00:00:00 +0000</pubDate><guid>https://www.rchitect.in/posts/john-ripper/</guid><description>&lt;h1 id="john-the-ripper-for-bruteforcing"&gt;
 John the Ripper for Bruteforcing
 &lt;a class="heading-link" href="#john-the-ripper-for-bruteforcing"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h1&gt;
&lt;h4 id="case1-the-zip-passowrd-cracking"&gt;
 Case1: The zip passowrd cracking
 &lt;a class="heading-link" href="#case1-the-zip-passowrd-cracking"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h4&gt;
&lt;p&gt;In below case there is zip file which require password to open.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;──(rocky㉿kali)-[~/hckbox/node]
└─$ unzip newbackup.zip 
Archive: newbackup.zip
 creating: var/www/myplace/
[newbackup.zip] var/www/myplace/package-lock.json password: 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This requires a password and we need to crack the zip with john to get passowrd.&lt;/p&gt;
&lt;p&gt;As this is a zip file we need to use the script from John for converting this to a hash value. The scripts are usually located under /usr/share/john&lt;/p&gt;</description></item><item><title>Directory scan to identify the sub domains of website</title><link>https://www.rchitect.in/posts/directoryscan/</link><pubDate>Tue, 29 Mar 2022 00:00:00 +0000</pubDate><guid>https://www.rchitect.in/posts/directoryscan/</guid><description>&lt;h1 id="directory-scanning-to-identify-the-sub-domains"&gt;
 Directory Scanning to identify the sub domains
 &lt;a class="heading-link" href="#directory-scanning-to-identify-the-sub-domains"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Using the gobuster fing the sub directories&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;gobuster dir -u http://10.10.10.88 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt 
===============================================================
Gobuster v3.1.0
by OJ Reeves (@TheColonial) &amp;amp; Christian Mehlmauer (@firefart)
===============================================================
[+] Url: http://10.10.10.88
[+] Method: GET
[+] Threads: 10
[+] Wordlist: /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
[+] Negative Status codes: 404
[+] User Agent: gobuster/3.1.0
[+] Timeout: 10s
===============================================================
2022/03/23 20:44:04 Starting gobuster in directory enumeration mode
===============================================================
/webservices (Status: 301) [Size: 316] [--&amp;gt; http://10.10.10.88/webservices/]
/server-status (Status: 403) [Size: 299] 

===============================================================
2022/03/23 21:01:06 Finished
===============================================================###### Login Credentials and Rabithole
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As we found one sub directory, always run one more gobuster scan with new subdirectory url to find if any more sub directories are present.&lt;/p&gt;</description></item><item><title>Bruteforce using Hydra</title><link>https://www.rchitect.in/posts/hydra/</link><pubDate>Sun, 20 Mar 2022 00:00:00 +0000</pubDate><guid>https://www.rchitect.in/posts/hydra/</guid><description>&lt;h1 id="bruteforce-using-hydra"&gt;
 Bruteforce using Hydra
 &lt;a class="heading-link" href="#bruteforce-using-hydra"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;To use Hydra we need to mainly identify 4 Parameters:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;&amp;lt;IP Address&amp;gt; = &amp;#34;&amp;#34;

&amp;lt;Login Page&amp;gt; = &amp;#34;&amp;#34;

&amp;lt;Request Body&amp;gt; = &amp;#34;&amp;#34;

&amp;lt;Error Message&amp;gt; =&amp;#34;&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To identify these parameters, lets intercept the request with Burp.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rchitect.in/images/walk/Nineveh/4.png" alt="hydra"&gt;&lt;/p&gt;
&lt;p&gt;Based on the intercepted values, I have filled the values for HTTPS site subdomain&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;= &amp;ldquo;10.10.10.43&amp;rdquo;&lt;/p&gt;
&lt;p&gt;= &amp;ldquo;/db/index.php&amp;rdquo;&lt;/p&gt;
&lt;p&gt;= &amp;ldquo;^PASS^&amp;amp;login=Log+In&amp;amp;proc_login=true&amp;rdquo;&lt;/p&gt;
&lt;p&gt;=&amp;ldquo;Incorrect password.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now Formulate the bruteforce command using hydra. For using hydra always username is required. In this case we can give any fixed value. Remember to use &amp;ldquo;https-post-form&amp;rdquo; as its a ssl website.&lt;/p&gt;</description></item></channel></rss>