<?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 Marcos Tolosa on Medium]]></title>
        <description><![CDATA[Stories by Marcos Tolosa on Medium]]></description>
        <link>https://medium.com/@marcostolosa?source=rss-63b0d664626d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lwf7bRsadNl81icdPl4F4Q.jpeg</url>
            <title>Stories by Marcos Tolosa on Medium</title>
            <link>https://medium.com/@marcostolosa?source=rss-63b0d664626d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 14:06:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@marcostolosa/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[Basic Linux Privilege Escalation]]></title>
            <link>https://medium.com/basic-linux-privilege-escalation/basic-linux-privilege-escalation-966de11f9997?source=rss-63b0d664626d------2</link>
            <guid isPermaLink="false">https://medium.com/p/966de11f9997</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[exploitation]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Marcos Tolosa]]></dc:creator>
            <pubDate>Fri, 09 Nov 2018 19:22:30 GMT</pubDate>
            <atom:updated>2018-11-09T19:22:30.593Z</atom:updated>
            <content:encoded><![CDATA[<h3>Enumeration is the Key</h3><p>(Linux) privilege escalation is all about:</p><ul><li>Collect — <strong>Enumeration</strong>, more enumeration and some more enumeration</li><li>Process — Sort through data, <strong>analyse</strong> and priorisation.</li><li>Search — Know what to search for and where to <strong>find</strong> the exploit code.</li><li>Adapt — <strong>Customize</strong> the exploit, so it fits. Not every exploit work for every system “out of the box”.</li><li>Try — Get ready for (lots of) <strong>trial and error</strong></li></ul><h3>Operating System</h3><blockquote>What’s the distribution type? What version?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*XszguJIvMkWVH-H7-NkD6g.jpeg" /></figure><blockquote><strong>What’s the kernel version? Is it 64-bit?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*2ahl49kHe8ggL8EyiO26jQ.jpeg" /></figure><blockquote><strong>What can be learnt from the environmental variables?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*ALJCLelAqvh8oulis2Wwdw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*WphZFIXibkDae0hB0jxiKw.jpeg" /><figcaption><strong>Is there a printer?</strong></figcaption></figure><h3>Applications &amp; Services</h3><blockquote><strong>What services are running? <em>Which service has which user privilege?</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*AsrsgZDDwjQXnc0xW0eh3w.jpeg" /></figure><blockquote><strong>Which service(s) are been running by root? Of these services, which are vulnerable — it’s worth a double check!</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*gNlmd7N4PGYZ1bHVO-hCFA.jpeg" /></figure><blockquote><strong>What applications are installed? What version are they? Are they currently running?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*BlgoHywVmFfErDCZMZmsYg.jpeg" /></figure><blockquote><strong>Any of the service(s) settings misconfigured? Are any (vulnerable) plugins attached?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*jYXSBy9szP2FrPMvUXDuZg.jpeg" /></figure><blockquote><strong>What jobs are scheduled?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*_OGzGYIsnZNdTgEVi2aToA.jpeg" /></figure><blockquote><strong>Any plain text usernames and/or passwords?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*-Qi96kbg0EVAnBsXMNO_Ng.jpeg" /></figure><h3>Communications &amp; Networking</h3><blockquote><strong>What NIC(s) does the system have? Is it connected to another network?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*BkkBu_i6ZiF0SsUbeQS0Pw.jpeg" /></figure><blockquote><strong>What are the network configuration settings? <em>What can you find out about this network? DHCP server? DNS server? Gateway?</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*U2xJvm1ieMQZKcdqTFGCDg.jpeg" /></figure><blockquote><strong>What other users &amp; hosts are communicating with the system?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*tNu1XIN4AoYQXnFV4Vu07Q.jpeg" /></figure><blockquote><strong>Whats cached? IP and/or MAC addresses</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*zZpHI-lPk8cIcBUXwyGyug.jpeg" /></figure><blockquote><strong>Is packet sniffing possible? What can be seen? <em>Listen to live traffic</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*Lp7ShcbDWtCMo4m3u-DDug.jpeg" /></figure><p><strong>Note</strong>: tcpdump tcp dst [ip] [port] and tcp dst [ip] [port]</p><blockquote><strong>Have you got a shell? Can you interact with the system?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*g8Gm4KWd-X7wIXUHPQ8IHQ.jpeg" /></figure><p><strong><em>Note</em></strong>: <a href="http://lanmaster53.com/2011/05/7-linux-shells-using-built-in-tools/">http://lanmaster53.com/2011/05/7-linux-shells-using-built-in-tools/</a></p><blockquote><strong>Is port forwarding possible? Redirect and interact with traffic from another view</strong></blockquote><p><strong>Note</strong>: <a href="http://www.boutell.com/rinetd/">http://www.boutell.com/rinetd/</a></p><p><strong>Note</strong>: <a href="http://www.howtoforge.com/port-forwarding-with-rinetd-on-debian-etch">http://www.howtoforge.com/port-forwarding-with-rinetd-on-debian-etch</a></p><p><strong>Note</strong>: <a href="http://downloadcenter.mcafee.com/products/tools/foundstone/fpipe2_1.zip">http://downloadcenter.mcafee.com/products/tools/foundstone/fpipe2_1.zip</a></p><p><strong>Note</strong>: FPipe.exe -l [local port] -r [remote port] -s [local port] [local IP]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*SlfoT1_BXVB1ydZ2NE0naw.jpeg" /></figure><p><strong>Note</strong>: ssh -[L/R] [local port]:[remote IP]:[remote port] [local user]@[local IP]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*lMv6X-p68WgwMIKVD7YGLg.jpeg" /></figure><p><strong>Note</strong>: mknod backpipe p ; nc -l -p [remote port] &lt; backpipe | nc [local IP] [local port] &gt; backpipe</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hMvyJ3Qgg0zDWpDCRu1QWQ.jpeg" /></figure><blockquote><strong>Is tunnelling possible? Send commands locally, remotely</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*0S4muS_lhtJtIfv3asJmdg.jpeg" /></figure><h3>Confidential Information &amp; Users</h3><blockquote><strong>Who are you? Who is logged in? Who has been logged in? Who else is there? Who can do what?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*4AvmZDKeESjkHfA-6p_y6A.jpeg" /></figure><blockquote><strong>What sensitive files can be found?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*KxtuwXxOOoAS2UxY1fLeiA.jpeg" /></figure><blockquote><strong>Anything “interesting” in the home directorie(s)? If it’s possible to access</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*NuVEBZhERHUK6nuA9aVk1A.jpeg" /></figure><blockquote><strong>Are there any passwords in; scripts, databases, configuration files or log files? Default paths and locations for passwords</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*_nOAEEB9vcJFARg_pTWUPA.jpeg" /></figure><blockquote><strong>What has the user being doing? Is there any password in plain text? What have they been editing?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*-K3yuW3cb68G37SpKoW_-Q.jpeg" /></figure><blockquote><strong>What user information can be found?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*D6eMs1HiT3kRFlDhI5ZKbA.jpeg" /></figure><blockquote><strong>Can private-key information be found?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*BruKKrFZKkYQMVOtny57Ug.jpeg" /></figure><h3>File Systems</h3><blockquote><strong>Which configuration files can be written in /etc/? Able to reconfigure a service?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*TRNvLcoDlFOiOg85jXuBCg.jpeg" /></figure><blockquote><strong>What can be found in /var/ ?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*1P_w0V49aKX-kH8sxFvstA.jpeg" /></figure><blockquote><strong>Any settings/files (hidden) on website? Any settings file with database information?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*KbkOmX2XQM71bIfNlE4TzA.jpeg" /></figure><blockquote><strong>Is there anything in the log file(s) (Could help with “Local File Includes”!)</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I3dkWMcUJDwe_Y3gmvjw_Q.jpeg" /></figure><p><strong>Note</strong>: <a href="http://www.thegeekstuff.com/2011/08/linux-var-log-files/">http://www.thegeekstuff.com/2011/08/linux-var-log-files/</a></p><blockquote><strong>If commands are limited, you break out of the “jail” shell?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*nrZP9Q2Jhr1iypG0ANxqEw.jpeg" /></figure><blockquote><strong>How are file-systems mounted?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*ve2iyRJ7-DguweuvDJ1XeQ.jpeg" /></figure><blockquote><strong>Are there any unmounted file-systems?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*YcA2nWnXbCKKuB_4WtL3Zw.jpeg" /></figure><blockquote><strong>What “Advanced Linux File Permissions” are used? Sticky bits, SUID &amp; GUID</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cyW1Nfxb0HofyidXFM3X_A.jpeg" /></figure><blockquote><strong>Where can written to and executed from? A few ‘common’ places: /tmp, /var/tmp, /dev/shm</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*ZC2coZqwduSUMmaeDvat1A.jpeg" /></figure><blockquote><strong>Any “problem” files? Word-writeable, “nobody” files</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*1nqfU8BRATWNtGWsHH6MqA.jpeg" /></figure><h3>Preparation &amp; Finding Exploit Code</h3><blockquote><strong>What development tools/languages are installed/supported?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*hj2yXXgqbZRQc8GC4AzFmA.jpeg" /></figure><blockquote><strong>How can files be uploaded?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*OK0XpQ6dzwRIlaaRUcol9Q.jpeg" /></figure><blockquote><strong>Finding exploit code</strong></blockquote><p><a href="http://www.exploit-db.com/">http://www.exploit-db.com/</a></p><p><a href="http://1337day.com/">http://1337day.com/</a></p><p><a href="http://www.securiteam.com/">http://www.securiteam.com/</a></p><p><a href="http://www.securityfocus.com/">http://www.securityfocus.com/</a></p><p><a href="http://www.exploitsearch.net/">http://www.exploitsearch.net/</a></p><p><a href="http://metasploit.com/modules/">http://metasploit.com/modules/</a></p><p><a href="http://securityreason.com/">http://securityreason.com/</a></p><p><a href="http://seclists.org/fulldisclosure/">http://seclists.org/fulldisclosure/</a></p><p><a href="http://www.google.com/">Google</a></p><blockquote><strong>Finding more information regarding the exploit</strong></blockquote><p><a href="http://www.cvedetails.com/">CVE security vulnerability database. Security vulnerabilities, exploits, references and more</a></p><pre><a href="http://packetstormsecurity.org/files/cve/[CVE]">http://packetstormsecurity.org/files/cve/[CVE]</a></pre><pre>http://cve.mitre.org/cgi-bin/cvename.cgi?name=[CVE]</pre><pre>http://www.vulnview.com/cve-details.php?cvename=[CVE]</pre><blockquote><strong>(Quick) “Common” exploits. Warning. Pre-compiled binaries files. Use at your own risk</strong></blockquote><p><a href="http://web.archive.org/web/20111118031158/http://tarantula.by.ru/localroot/">http://web.archive.org/web/20111118031158/http://tarantula.by.ru/localroot/</a></p><p><a href="http://www.kecepatan.66ghz.com/file/local-root-exploit-priv9/">http://www.kecepatan.66ghz.com/file/local-root-exploit-priv9/</a></p><h3>Mitigations</h3><blockquote><strong>Is any of the above information easy to find?</strong></blockquote><p>Try doing it! Setup a cron job which automates script(s) and/or 3rd party products</p><blockquote><strong>Is the system fully patched?</strong></blockquote><p>Kernel, operating system, all applications, their plugins and web services</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*52C_LDlI1ySxIZ91q_cqzg.jpeg" /></figure><blockquote><strong>Are services running with the minimum level of privileges required?</strong></blockquote><p>For example, do you need to run MySQL as root?</p><blockquote><strong>Scripts Can any of this be automated?!</strong></blockquote><p><a href="http://pentestmonkey.net/tools/unix-privesc-check/">http://pentestmonkey.net/tools/unix-privesc-check/</a></p><p><a href="http://labs.portcullis.co.uk/application/enum4linux/">http://labs.portcullis.co.uk/application/enum4linux/</a></p><p><a href="http://bastille-linux.sourceforge.net/">BASTILLE-LINUX</a></p><h3>Other (quick) guides &amp; Links</h3><blockquote><strong>Enumeration</strong></blockquote><p><a href="http://www.0daysecurity.com/penetration-testing/enumeration.html">http://www.0daysecurity.com/penetration-testing/enumeration.html</a></p><p><a href="http://www.microloft.co.uk/hacking/hacking3.htm">http://www.microloft.co.uk/hacking/hacking3.htm</a></p><blockquote><strong>Misc</strong></blockquote><p><a href="http://jon.oberheide.org/files/stackjacking-infiltrate11.pdf">http://jon.oberheide.org/files/stackjacking-infiltrate11.pdf</a></p><p><a href="http://pentest.cryptocity.net/files/operations/2009/post_exploitation_fall09.pdf">http://pentest.cryptocity.net/files/operations/2009/post_exploitation_fall09.pdf</a></p><p><a href="http://insidetrust.blogspot.com/2011/04/quick-guide-to-linux-privilege.html">http://insidetrust.blogspot.com/2011/04/quick-guide-to-linux-privilege.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=966de11f9997" width="1" height="1" alt=""><hr><p><a href="https://medium.com/basic-linux-privilege-escalation/basic-linux-privilege-escalation-966de11f9997">Basic Linux Privilege Escalation</a> was originally published in <a href="https://medium.com/basic-linux-privilege-escalation">Basic Linux Privilege Escalation</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>