1 year ago

#253036

test-img

RRHS

sh: 1: : not found when trying to open a new shell

I am trying to get a shell but it either doesn't open one or it throws an error and gets stuck saying

^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B
sh: 1: : not found

Below is the .c code

#include<stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <grp.h>
    
int main(void)
{
    setgid(0);
    setuid(0);
    execl("/bin/sh", "sh", 0);
}

Please help me out with this as I'm new to it.

c

shell

root

setuid

reverse-shell

0 Answers

Your Answer

Accepted video resources