{"id":131758,"date":"2023-02-08T17:12:26","date_gmt":"2023-02-08T17:12:26","guid":{"rendered":"https:\/\/blog.finxter.com\/?p=1118920"},"modified":"2023-02-08T17:12:26","modified_gmt":"2023-02-08T17:12:26","slug":"ezpzshell-an-easy-peasy-python-script-that-simplifies-revshell-creation","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2023\/02\/08\/ezpzshell-an-easy-peasy-python-script-that-simplifies-revshell-creation\/","title":{"rendered":"EzpzShell: An Easy-Peasy Python Script That Simplifies Revshell Creation"},"content":{"rendered":"\n<div class=\"kk-star-ratings kksr-auto kksr-align-left kksr-valign-top\" data-payload='{&quot;align&quot;:&quot;left&quot;,&quot;id&quot;:&quot;1118920&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;top&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;1&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;5\\\/5 - (1 vote)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n<div class=\"kksr-stars\">\n<div class=\"kksr-stars-inactive\">\n<div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div class=\"kksr-stars-active\" style=\"width: 142.5px;\">\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/div>\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\"> 5\/5 &#8211; (1 vote) <\/div>\n<\/p><\/div>\n<p><code>EzpzShell = \"Easy Peasy Shell\" <\/code><\/p>\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube\"><a href=\"https:\/\/blog.finxter.com\/ezpzshell-a-cool-all-in-one-python-script-that-simplifies-revshell-creation\/\"><img decoding=\"async\" src=\"https:\/\/blog.finxter.com\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0UI4X6rigQA%2Fhqdefault.jpg\" alt=\"YouTube Video\"><\/a><figcaption><\/figcaption><\/figure>\n<p class=\"has-base-background-color has-background\"><img decoding=\"async\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/72x72\/1f449.png\" alt=\"\ud83d\udc49\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> <strong>EzpzShell GitHub<\/strong>: <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/H0j3n\/EzpzShell\" target=\"_blank\">https:\/\/github.com\/H0j3n\/EzpzShell<\/a><\/p>\n<h2>WHAT IS EzpzShell?<\/h2>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/github.com\/H0j3n\/EzpzShell\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/github.com\/H0j3n\/EzpzShell\/raw\/main\/demo.gif\" alt=\"\"\/><\/a><\/figure>\n<\/div>\n<p>EzpzShell is a Python script that helps to streamline the revshell payload and listener creation process for <a rel=\"noreferrer noopener\" href=\"https:\/\/blog.finxter.com\/top-developer-jobs-for-white-hat-hackers-in-2023\/\" data-type=\"post\" data-id=\"428295\" target=\"_blank\">ethical hackers<\/a>, <a rel=\"noreferrer noopener\" href=\"https:\/\/blog.finxter.com\/how-i-set-up-my-virtual-hacking-laboratory-for-safe-and-legal-penetration-testing\/\" data-type=\"post\" data-id=\"1116603\" target=\"_blank\">pentesters<\/a>, and <a rel=\"noreferrer noopener\" href=\"https:\/\/blog.finxter.com\/tryhackme-mr-robot-capture-the-flag-ctf-challenge\/\" data-type=\"post\" data-id=\"955490\" target=\"_blank\">CTF gamers<\/a>. <\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"527\" height=\"348\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-119.png\" alt=\"\" class=\"wp-image-1119016\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-119.png 527w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-119-300x198.png 300w\" sizes=\"auto, (max-width: 527px) 100vw, 527px\" \/><\/figure>\n<\/div>\n<p>There are many file types available, and it outputs several different payload options to choose from, letting you pick the most efficient option for your specific use case. <\/p>\n<p>Today I\u2019ll guide you through the installation and setup of <code>EzpzShell.py<\/code> on Kali Linux in a virtual hacking lab setup.&nbsp;<\/p>\n<p class=\"has-base-background-color has-background\"><img decoding=\"async\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/72x72\/1f449.png\" alt=\"\ud83d\udc49\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> <strong>Recommended<\/strong>: <a href=\"https:\/\/blog.finxter.com\/how-i-set-up-my-virtual-hacking-laboratory-for-safe-and-legal-penetration-testing\/\" data-type=\"post\" data-id=\"1116603\" target=\"_blank\" rel=\"noreferrer noopener\">How I Set Up My Virtual Hacking Laboratory for Safe and Legal Penetration Testing<\/a><\/p>\n<h2>INSTALLATION<\/h2>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"606\" height=\"911\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-120.png\" alt=\"\" class=\"wp-image-1119019\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-120.png 606w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-120-200x300.png 200w\" sizes=\"auto, (max-width: 606px) 100vw, 606px\" \/><\/figure>\n<\/div>\n<p>We\u2019ll need to temporarily switch the internet setting on our attack machine (Kali) to \u201cbridged adapter\u201d. This will create an IP for our virtual machine as if it was a physical machine on our own network. <\/p>\n<p>After switching the setting, we boot up Kali and grab the Git repo for <code>EzpzShell.py<\/code>.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"722\" height=\"493\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-117.png\" alt=\"\" class=\"wp-image-1118929\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-117.png 722w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-117-300x205.png 300w\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" \/><\/figure>\n<\/div>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"588\" height=\"263\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-116.png\" alt=\"\" class=\"wp-image-1118928\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-116.png 588w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-116-300x134.png 300w\" sizes=\"auto, (max-width: 588px) 100vw, 588px\" \/><\/figure>\n<\/div>\n<p>Now that we have installed <code>EzpzShell.py<\/code> on our Kali VM, let\u2019s shut it down and switch the network setting back to \u201chost-only adapter\u201d. <\/p>\n<p>This will switch the internet off again and put the attack box back into the hacking lab network.<\/p>\n<h2>CREATE A BASH ALIAS<\/h2>\n<p>To simplify the command (<code>python3 ~\/EzpzShell.py<\/code>) into a one-word command we can add the following line to a new file <code>.bash_aliases<\/code><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"811\" height=\"109\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-115.png\" alt=\"\" class=\"wp-image-1118927\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-115.png 811w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-115-300x40.png 300w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-115-768x103.png 768w\" sizes=\"auto, (max-width: 811px) 100vw, 811px\" \/><\/figure>\n<\/div>\n<p>Next, let\u2019s run the following command to make the bash alias permanent.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">source ~\/.bashrc<\/pre>\n<p>Now we can easily run <code>EzPzShell.py<\/code> from any directory on Kali with the command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ezpz<\/pre>\n<h2>EXAMPLE OF A REVERSHELL EZPZSHELL ON OUR VIRTUAL HACKINGLAB<\/h2>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"626\" height=\"400\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-114.png\" alt=\"\" class=\"wp-image-1118926\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-114.png 626w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-114-300x192.png 300w\" sizes=\"auto, (max-width: 626px) 100vw, 626px\" \/><\/figure>\n<\/div>\n<p>We\u2019ll run the command \u201c<code>ezpz 192.168.60.4 8888 py<\/code>\u201d to see a list of reverse shell payloads. <\/p>\n<p>This is quicker than poking around the web for the right kind of shell, and it is also super handy that the listener is automatically started up and set to receive the revshell. <\/p>\n<p>Let\u2019s use the first payload, the python script:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"811\" height=\"532\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-113.png\" alt=\"\" class=\"wp-image-1118925\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-113.png 811w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-113-300x197.png 300w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-113-768x504.png 768w\" sizes=\"auto, (max-width: 811px) 100vw, 811px\" \/><\/figure>\n<\/div>\n<p>After copying and pasting this into a new <code>shell.py<\/code> file on the target machine, we can trigger the revshell by running the program on our target machine:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">python shell.py<\/pre>\n<p>And we catch it with EzPzShell immediately on our Kali attack machine!<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"444\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-112-1024x444.png\" alt=\"\" class=\"wp-image-1118924\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-112-1024x444.png 1024w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-112-300x130.png 300w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-112-768x333.png 768w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-112.png 1374w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<h2>FINAL THOUGHTS<\/h2>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"608\" height=\"919\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-121.png\" alt=\"\" class=\"wp-image-1119024\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-121.png 608w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2023\/02\/image-121-198x300.png 198w\" sizes=\"auto, (max-width: 608px) 100vw, 608px\" \/><\/figure>\n<\/div>\n<p>As you can see, EzPzShell is a versatile Python script for reverse shell payload creation and listener spawning. <\/p>\n<p>It seamlessly sets up our listener to catch the revshell using the file type of our choice from a long list of options. I\u2019ll be adding EzPzShell to my regular pen-testing toolkit and am confident that it will save me lots of time down the road in various CTF challenges and pentesting scenarios. <\/p>\n<p>Lookout for EzpzShell in future hacking tutorial videos.<\/p>\n<p class=\"has-base-background-color has-background\"><img decoding=\"async\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/72x72\/1f449.png\" alt=\"\ud83d\udc49\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> <strong>Recommended<\/strong>: <a href=\"https:\/\/blog.finxter.com\/tryhackme-skynet-walkthrough-using-remote-file-inclusion\/\" data-type=\"URL\" data-id=\"https:\/\/blog.finxter.com\/tryhackme-skynet-walkthrough-using-remote-file-inclusion\/\" target=\"_blank\" rel=\"noreferrer noopener\">[TryHackMe] Skynet Walkthrough Using Remote File Inclusion<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>5\/5 &#8211; (1 vote) EzpzShell = &#8220;Easy Peasy Shell&#8221; EzpzShell GitHub: https:\/\/github.com\/H0j3n\/EzpzShell WHAT IS EzpzShell? EzpzShell is a Python script that helps to streamline the revshell payload and listener creation process for ethical hackers, pentesters, and CTF gamers. There are many file types available, and it outputs several different payload options to choose from, letting [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[857],"tags":[73,468,528],"class_list":["post-131758","post","type-post","status-publish","format-standard","hentry","category-python-tut","tag-programming","tag-python","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/131758","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=131758"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/131758\/revisions"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=131758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=131758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=131758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}