TUTORIAL Monitors: root part for free
by siracuso - April 26, 2021 at 12:47 PM
#13
If you have problems compiling on remote container, perform a reset on the machine. Maybe it's bugged or somebody before already installed a kernel module before you.
Reply
#14
(April 26, 2021 at 10:19 PM)siracuso Wrote: If you have problems compiling on remote container, perform a reset on the machine. Maybe it's bugged or somebody before already installed a kernel module before you.

I also tried in personal instance but same error
Reply
#15
(April 26, 2021 at 10:48 PM)patelcha Wrote:
(April 26, 2021 at 10:19 PM)siracuso Wrote: If you have problems compiling on remote container, perform a reset on the machine. Maybe it's bugged or somebody before already installed a kernel module before you.

I also tried in personal instance but same error

Hii bro,

Still stuck?
Reply
#16
(April 27, 2021 at 09:57 AM)wizardhulk Wrote:
(April 26, 2021 at 10:48 PM)patelcha Wrote:
(April 26, 2021 at 10:19 PM)siracuso Wrote: If you have problems compiling on remote container, perform a reset on the machine. Maybe it's bugged or somebody before already installed a kernel module before you.

I also tried in personal instance but same error

Hii bro,

Still stuck?
yes bro 
any help?
Reply
#17
thanks in advance bro, will try to root it
Reply
#18
(April 27, 2021 at 01:36 PM)coolencyclopedia Wrote:
(April 27, 2021 at 09:57 AM)wizardhulk Wrote:
(April 26, 2021 at 10:48 PM)patelcha Wrote:
(April 26, 2021 at 10:19 PM)siracuso Wrote: If you have problems compiling on remote container, perform a reset on the machine. Maybe it's bugged or somebody before already installed a kernel module before you.

I also tried in personal instance but same error

Hii bro,

Still stuck?
yes bro 
any help?

I change the upload destination to -> /root folder of the container instead of /tmp then it workout

something funny about the $PATH variable
Reply
#19
(April 27, 2021 at 03:27 PM)pauk59 Wrote:
(April 27, 2021 at 01:36 PM)coolencyclopedia Wrote:
(April 27, 2021 at 09:57 AM)wizardhulk Wrote:
(April 26, 2021 at 10:48 PM)patelcha Wrote:
(April 26, 2021 at 10:19 PM)siracuso Wrote: If you have problems compiling on remote container, perform a reset on the machine. Maybe it's bugged or somebody before already installed a kernel module before you.

I also tried in personal instance but same error

Hii bro,

Still stuck?
yes bro 
any help?

I change the upload destination to -> /root folder of the container instead of /tmp then it workout

something funny about the $PATH variable
i tried but still getting same error.
i'd really appreciate the help here.
Reply
#20
(April 27, 2021 at 04:51 PM)coolencyclopedia Wrote:
(April 27, 2021 at 03:27 PM)pauk59 Wrote:
(April 27, 2021 at 01:36 PM)coolencyclopedia Wrote:
(April 27, 2021 at 09:57 AM)wizardhulk Wrote:
(April 26, 2021 at 10:48 PM)patelcha Wrote: I also tried in personal instance but same error

Hii bro,

Still stuck?
yes bro 
any help?

I change the upload destination to -> /root folder of the container instead of /tmp then it workout

something funny about the $PATH variable
i tried but still getting same error.
i'd really appreciate the help here.

Taking a look at the error it throws make sure to have your files called: reverse-shell.c and Makefile. Note: Makefile has to be with capital M :).
Reply
#21
(April 26, 2021 at 06:37 PM)wizardhulk Wrote: Again facing problem with make command


[email protected]:/tmp# make
make
make -C /lib/modules/4.15.0-142-generic/build M=/tmp modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-142-generic'
  CC [M]  /tmp/reverse-shell.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/Makefile.build:339: /tmp/reverse-shell.o] Error 1
make[1]: *** [Makefile:1584: _module_/tmp] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-142-generic'
make: *** [Makefile:3: all] Error 2
[email protected]:/tmp#

sollution : 
export PATH=$PATH/usr/lib/gcc/x86_64-linux-gnu/8/

error : 
cc1: error: code model kernel does not support PIC mode

make clean
make all

Works for me
Reply
#22
(April 27, 2021 at 09:10 PM)patelcha Wrote:
(April 26, 2021 at 06:37 PM)wizardhulk Wrote: Again facing problem with make command


[email protected]:/tmp# make
make
make -C /lib/modules/4.15.0-142-generic/build M=/tmp modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-142-generic'
  CC [M]  /tmp/reverse-shell.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/Makefile.build:339: /tmp/reverse-shell.o] Error 1
make[1]: *** [Makefile:1584: _module_/tmp] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-142-generic'
make: *** [Makefile:3: all] Error 2
[email protected]:/tmp#

sollution : 
export PATH=$PATH/usr/lib/gcc/x86_64-linux-gnu/8/

error : 
cc1: error: code model kernel does not support PIC mode

make clean
make all

Works for me
are you suggesting to go in /usr/lib/gcc/x86_64-linux-gnu/8/ and then use curl to download reverse-shell.c and Makefile?
I tried to go in this repository but could not fild gcc in /usr/lib.

(April 27, 2021 at 09:10 PM)patelcha Wrote:
(April 26, 2021 at 06:37 PM)wizardhulk Wrote: Again facing problem with make command


[email protected]:/tmp# make
make
make -C /lib/modules/4.15.0-142-generic/build M=/tmp modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-142-generic'
  CC [M]  /tmp/reverse-shell.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/Makefile.build:339: /tmp/reverse-shell.o] Error 1
make[1]: *** [Makefile:1584: _module_/tmp] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-142-generic'
make: *** [Makefile:3: all] Error 2
[email protected]:/tmp#

sollution : 
export PATH=$PATH/usr/lib/gcc/x86_64-linux-gnu/8/

error : 
cc1: error: code model kernel does not support PIC mode

make clean
make all

Works for me

[email protected]:/usr/lib/gcc/x86_64-linux-gnu/8# ls
ls
Makefile      libcc1.so      liblto_plugin.so      libstdc++.so
cc1        libgcc_s.so    liblto_plugin.so.0      libtsan.so
cc1plus        libgcc_s.so.1  liblto_plugin.so.0.0.0  libubsan.so
collect2      libgomp.so    libmpx.so        lto-wrapper
include        libgomp.spec  libmpx.spec      lto1
include-fixed  libitm.so      libmpxwrappers.so      plugin
libasan.so    libitm.spec    libquadmath.so      reverse-shell.c
libatomic.so  liblsan.so    libsanitizer.spec



[email protected]:/usr/lib/gcc/x86_64-linux-gnu/8# make       
make
make -C /lib/modules/4.15.0-142-generic/build M=/usr/lib/gcc/x86_64-linux-gnu/8 modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-142-generic'
  CC [M]  /usr/lib/gcc/x86_64-linux-gnu/8/reverse-shell.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/Makefile.build:339: /usr/lib/gcc/x86_64-linux-gnu/8/reverse-shell.o] Error 1
make[1]: *** [Makefile:1584: _module_/usr/lib/gcc/x86_64-linux-gnu/8] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-142-generic'
make: *** [Makefile:3: all] Error 2
[email protected]:/usr/lib/gcc/x86_64-linux-gnu/8#


still getting same error.
 "cc1" is present in this repository but still giving error 'cc1' no such file or directory.
Reply
#23
root hash : 7eb76f29d76efa98048bd80e5e9eb511
Reply
#24
(April 28, 2021 at 02:04 AM)coolencyclopedia Wrote:
(April 27, 2021 at 09:10 PM)patelcha Wrote:
(April 26, 2021 at 06:37 PM)wizardhulk Wrote: Again facing problem with make command


[email protected]:/tmp# make
make
make -C /lib/modules/4.15.0-142-generic/build M=/tmp modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-142-generic'
  CC [M]  /tmp/reverse-shell.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/Makefile.build:339: /tmp/reverse-shell.o] Error 1
make[1]: *** [Makefile:1584: _module_/tmp] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-142-generic'
make: *** [Makefile:3: all] Error 2
[email protected]:/tmp#

sollution : 
export PATH=$PATH/usr/lib/gcc/x86_64-linux-gnu/8/

error : 
cc1: error: code model kernel does not support PIC mode

make clean
make all

Works for me
are you suggesting to go in /usr/lib/gcc/x86_64-linux-gnu/8/ and then use curl to download reverse-shell.c and Makefile?
I tried to go in this repository but could not fild gcc in /usr/lib.

(April 27, 2021 at 09:10 PM)patelcha Wrote:
(April 26, 2021 at 06:37 PM)wizardhulk Wrote: Again facing problem with make command


[email protected]:/tmp# make
make
make -C /lib/modules/4.15.0-142-generic/build M=/tmp modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-142-generic'
  CC [M]  /tmp/reverse-shell.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/Makefile.build:339: /tmp/reverse-shell.o] Error 1
make[1]: *** [Makefile:1584: _module_/tmp] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-142-generic'
make: *** [Makefile:3: all] Error 2
[email protected]:/tmp#

sollution : 
export PATH=$PATH/usr/lib/gcc/x86_64-linux-gnu/8/

error : 
cc1: error: code model kernel does not support PIC mode

make clean
make all

Works for me

[email protected]:/usr/lib/gcc/x86_64-linux-gnu/8# ls
ls
Makefile      libcc1.so      liblto_plugin.so      libstdc++.so
cc1        libgcc_s.so    liblto_plugin.so.0      libtsan.so
cc1plus        libgcc_s.so.1  liblto_plugin.so.0.0.0  libubsan.so
collect2      libgomp.so    libmpx.so        lto-wrapper
include        libgomp.spec  libmpx.spec      lto1
include-fixed  libitm.so      libmpxwrappers.so      plugin
libasan.so    libitm.spec    libquadmath.so      reverse-shell.c
libatomic.so  liblsan.so    libsanitizer.spec



[email protected]:/usr/lib/gcc/x86_64-linux-gnu/8# make       
make
make -C /lib/modules/4.15.0-142-generic/build M=/usr/lib/gcc/x86_64-linux-gnu/8 modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-142-generic'
  CC [M]  /usr/lib/gcc/x86_64-linux-gnu/8/reverse-shell.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/Makefile.build:339: /usr/lib/gcc/x86_64-linux-gnu/8/reverse-shell.o] Error 1
make[1]: *** [Makefile:1584: _module_/usr/lib/gcc/x86_64-linux-gnu/8] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-142-generic'
make: *** [Makefile:3: all] Error 2
[email protected]:/usr/lib/gcc/x86_64-linux-gnu/8#


still getting same error.
 "cc1" is present in this repository but still giving error 'cc1' no such file or directory.


Go to "/" , u will see two files (.deb) , proceed to install that.
Reply

Possibly Related Threads…
Thread Author Replies Views Last Post
TUTORIAL Htb PiT Root Part xander2000 7 1,029 May 17, 2021 at 08:05 PM
Last Post: zable1
TUTORIAL Monitors HTB Detailed Writeup 0xmahesh 0 1,105 April 29, 2021 at 03:27 PM
Last Post: 0xmahesh
TUTORIAL Monitors Detailed Writeup Jockerjock 1 1,047 April 29, 2021 at 03:23 PM
Last Post: 0xmahesh

 Users browsing this thread: 2 Guest(s)