#koth

1 messages · Page 5 of 1

broken pilot
#

im watching port 9999 every second so i can tell as soon as king changes

valid cairn
#

its a pretty cool thing

broken pilot
#

watch -n 1 "curl -sL http://10.10.235.218:9999 | figlet"

#

will show you who is king every second lol

naive goblet
#

so not watch -n 1 "cat /root/king.txt | figlet" ????

broken pilot
#

hahahaha how many times did you mount

valid cairn
#

i dont even remember at this point

#

bro I was just spamming mount read write/read only commands while trying to fix it

#

btw how are you looking at the things I have done

broken pilot
naive goblet
#

oooh that explains it a lot better... also shadows command requires that you have a root shell on the target machine

#

which someone could kill

#

realised that a short bit after posting shadows command

valid cairn
#

even if I am root all time, Ill still take the L so GG bro

naive goblet
#

still wanna do the nyancat spam onto some other user during a koth game

broken pilot
#

20 mins

valid cairn
#

@fossil pecan can you read the /root/?

fossil pecan
#

Ah i missed this whole thread haha

fossil pecan
fossil pecan
#

omg im an hour late .. must have been from last game 🤣

valid cairn
#

it couldnt locate even 1 file

fossil pecan
# valid cairn btw what did you do to find?

some on this box are random names, a few named "flag" (none end with ".txt" tho 😉 ) ... the rest are just regular files like names of "games" (fortune/casino theme) 😛

valid cairn
#

your ip ends with 232

#

?

fossil pecan
valid cairn
fossil pecan
#

so i only take it end of minute, and give it back after

#
Thu  6 Apr 03:10:57 BST 2023 - YOINK
Thu  6 Apr 03:11:04 BST 2023 - KNIOY
Thu  6 Apr 03:11:57 BST 2023 - YOINK
Thu  6 Apr 03:12:04 BST 2023 - KNIOY
fossil pecan
west seal
zenith agate
#

i'm boutta get clapped

#

very new to KOTH

valid cairn
zenith agate
#

are you allowed to have a script that puts your name into king.txt every x seconds

valid cairn
valid cairn
#

I would recommend you rather do a loop

valid cairn
fossil pecan
#

Everyone has something in a loop for king at the end

#

Not autopwn

#

Just scripts 😁

valid cairn
#

if you are remotely accessing it and putting in name isnt autopwn?

fossil pecan
#

If it happens all automatically within 60s of game starting than ya

#

But pieces by themselves as scripts are fine

#

Some king fighting scripts or at least bash one line loops are essential for fighting king against a good player

valid cairn
zenith agate
#

🤔

valid cairn
#

its gonna give you adrealine, dissapointment and stress

#

all at the same tme

zenith agate
#

fair nuff

#

it does feel good to win tho

valid cairn
fossil pecan
valid cairn
#

Some times I wonder if winning feels good, I am pretty sure its putting your name in king.txt that feels better

valid cairn
fossil pecan
#

Autopwn rules are for people who automate everything to get in, get root, put name in king, and patch/shutdown services to keep everyone out ... When all that happens in first 1-3 minutes, game's no fun for everyone else rest of the hour 😂

valid cairn
#

you know the good stuff

zenith agate
#

are you playing in this one snipe

fossil pecan
charred hare
#

koth is a gentlemen's game, just play fair

fossil pecan
valid cairn
#

quite honestly that sounds like a fair trade to me -Drake definetly

fossil pecan
# valid cairn so flags for scripts?

i'm inventing my own F11[...] style flags haha, gonna start hiding them all over my f11snipe.XYZ domains and also might put them into like koth matches for ppl to find

fossil pecan
#

you "mwahaha9" ?

zenith agate
#

what privescs are there for food other than vim.basic

valid cairn
zenith agate
#

for the future

valid cairn
#

wait not custom but you can find it online that will work for screen

quiet schooner
zenith agate
#

👌

zenith agate
fossil pecan
#

some ascii art

#

simple bash commands

zenith agate
#

hello friend

fossil pecan
#

gonna add more soon (hopefully haha)

zenith agate
#

cool concept 👍

fossil pecan
sour vectorBOT
#

Gave +1 Rep to @zenith agate

valid cairn
broken pilot
#

20 mins

valid cairn
valid cairn
#

2mins

valid cairn
#

@proud moth bro Stop removing all perms for low privs users

#

thats against the rule

#

you keep removing sudo by changing the perms for /etc/sudoers

#

Your doing this for the second time now

proud moth
#

Thats the part of securing bruh. That's not against rules. Lol

valid cairn
proud moth
#

I didn't messed with sudo.

valid cairn
#

changing perms for it so it cant execute is against the rules

proud moth
#

Wait.

valid cairn
proud moth
proud moth
#

we cant disable ssh logins, user deletion, and removing any commands.

#

sudoers is a part of securing. and we can even modify configs to secure. from getting any command executions.

#

is sathas you ?? @valid cairn

valid cairn
#

thats me

proud moth
#

okay.

#

and even removing flags are also agains the rules.

valid cairn
valid cairn
proud moth
#

sudo binary is there. i removed users from sudoers. from using sudo...!!

valid cairn
#

if I do 755 /usr/bin/ thats against the rules

proud moth
#

if you know root password you can use sudo

#

yh.

proud moth
valid cairn
#

wait I had cleared my terminal

#

I dont have the command on me

#

It said /usr/bin/sudo not found or something

valid cairn
#

btw I am not sathas

#

I am R3GNUM

proud moth
#

oaky

valid cairn
proud moth
#

@valid cairn you removed wget, curl. 🤣 so how its legal to you to play

valid cairn
#

nor did I change their permissions

#

They are right there

#

I dont break the rules.

proud moth
#

ssh is also blocked

#

bruh seriously ??

valid cairn
#

Not blocked

#

thats against the rules

charred hare
#

probably changed the PATH variable

median tapir
#

Why does Carnage keep breaking?

charred hare
valid cairn
#

thats not fair play

valid cairn
charred hare
#

just export the path back

valid cairn
sour vectorBOT
#

Gave +1 Rep to @charred hare

fossil pecan
#

to alter for other users you'd probably make edits in ~/.bashrc , can dbl check that or use sh and export your own path from scratch to force it (i do this alot :P)

valid cairn
#

i will surely research alot about this

fossil pecan
fossil pecan
#

can always inspect to see what your's is

#
echo $PATH
valid cairn
sour vectorBOT
#

Gave +1 Rep to @fossil pecan

fossil pecan
# valid cairn so what does it do?

this just resets to generic/safe defaults ... the $PATH environment variable is what determines which commands are available in your shell without a prefix (i.e. nmap instead of /usr/bin/nmap )

full path to binary/executable should always work, but only ones within a directory specified in $PATH (separated by :) will be available as "global" aliases 👍 😄

valid cairn
#

Wow its simple but so much usage 👍

#

ahh shit here we go again lma

#

mathuez and Trap

#

this is gonna be hell of a match

broken pilot
#

why the reset tho?

valid cairn
#

I left the match

#

long time ago

broken pilot
#

why?

valid cairn
valid cairn
#

3 mins

broken pilot
broken pilot
#

20 mins

subtle python
#

start 30 mins

broken pilot
#

20 mins

broken pilot
broken pilot
subtle python
subtle python
#

23 mins

rain junco
#

Is anyone want to play king of the hill right now?? blobhuh

valid cairn
#

sure

#

come on

#

are you hk.hacker?

#

@rain junco are you ☝️

rain junco
#

yeah

valid cairn
#

okay I am R3GNUM

#

I had to go out

#

so sorry about the last match 👍

valid cairn
#

@rain junco

valid cairn
#

@rain junco try this one

rain junco
valid cairn
valid cairn
#

@rain junco it doesnt show ip and name ?

#

It isnt showing

broken pilot
#

@valid cairn when that happens try to vote rest on machine and ip should show up… it’s a weird bug happened to me a few times

valid cairn
#

its super werid

#

other people werent reseting it

subtle python
#

18 mins

valid cairn
#

Yay 🥳 🎊

fossil pecan
valid cairn
radiant sun
#

Sup bois

valid cairn
radiant sun
#

yo everything lit here

#

what about u

valid cairn
#

wbu?

valid cairn
#

where have you been

#

?

broken pilot
#

15 mins

broken pilot
ionic phoenix
broken pilot
#

20 mins

naive hull
#

Hey everyone, is there a way around if someone makes the file king.txt immutable and deletes chattr?

fossil pecan
shrewd spire
#

Or a c script that invokes ioctl directly

austere obsidian
#

surely you can call ioctl from python?

valid cairn
broken pilot
#

Aye rootkits can be beat too…

naive goblet
broken pilot
#

Try harder 🤣 hahahaha j/p but yea don’t give up keep trying.. there’s ways around em

valid cairn
naive goblet
#

it was koth for shadow and @fast copper

#

shadow won by figuring out that chattr exists

valid cairn
#

But, Tbh rootkits add a new dimension to the game.

#

But learning them and making them is the harder part.

broken pilot
naive goblet
valid cairn
#

its very possible to overcome.
But, its only hour long with every minute being a point.
so its really really hard to over come.

naive goblet
#

shadow is pointing at people giving up if the challenge becomes to large for them as then it feels like there is no point trying

broken pilot
#

But its also a mindset obstacle… hacking isn’t easy and you need to keep trying new things eventually something works

broken pilot
#

starts in 15 mins

plain nacelle
#

What are the Best learning path/modules to help get better at KoTH?

austere obsidian
#

I think there's a koth room somewhere

austere obsidian
#

But I had a similar question - where can you learn the skills which are specific to attack/defence ctfs and koth style challenges with multiple players fighting over a machine?

jovial field
#

for me it was learning by doing

#

just play some games and try to split the challenge in smaller parts like getting into the machine, escalating priviliges, protecting king.txt, defending against process killing ...

jade rapids
#

starts in 7min

valid cairn
#

Petition for more machines for KOTH.

naive goblet
valid cairn
naive goblet
valid cairn
naive goblet
#

or are you asking for something else??

valid cairn
#

So I just design a vm and than hand it over to THM staff?

naive goblet
#

¯_(ツ)_/¯

#

think it starts the same way as normal room creation.... just it needs multiple paths to foothold and root

valid cairn
#

hmmmmmmmmmmmmmm

#

okay

broken pilot
naive goblet
#

so then what is shadow doing as a room tester???

broken pilot
#

Even had people who said they wouldn’t mind doing it for free

naive goblet
#

well gonna leave it at that then

broken pilot
naive goblet
steep agate
steep agate
short tusk
#

That's not at all the reason, I'd love for you to name and shame whoever said that

broken pilot
#

Start of the same conversation….

#

Here was a suggestion to help with cost to review boxes… #koth message

#

But maybe with the new price increase…. 🤷‍♂️🤷‍♂️

short tusk
#

That’s how it used to be, now we have in-house testers to test machines and volunteers.

But it’s not the testing that’s the problem it’s the setup for the machines themselves

#

Currently, our teams are so busy with making sure the core of the website is the best it can be and pump out new content, KoTH boxes take a really long time to configure and they can only be configured by a few people

#

KoTH is due an update so maybe further down the line the process will be automated

#

I can’t say anything for sure

broken pilot
short tusk
#

Currently we are focusing on updating the platform, if you have noticed the various pages being updated

#

There are no voluntary roles available, other than being a room tester (which only test the upcoming content), but you are welcome to apply to be an employee if you think you can help improve the platform

broken pilot
short tusk
#

Not exactly

#

There isn't really one role, I don't know how much I can say, cc @sonic belfry any help so I don't expose all our company secrets? 😁

steep agate
#

how can we become room tester?

fossil pecan
short tusk
#

All jobs are on the career page

short tusk
broken pilot
sonic belfry
#

The implementation and execution of the testing effort depends on the planning/implementation of the expansion effort for KotH regarding machines. No news on that yet. 🙂

fossil pecan
worthy geyser
#

I was on a game and I was unable to write to king.txt because someone set the filesystem as read-only root@host:~# echo wyldgoat > king.txt -bash: king.txt: Read-only file system Does anyone know what I could do to circumvent this? I tried running mount -o remount,rw , but no success

worn island
#

Hey I’m new and I had some questions. How do I get started? Do I watch videos or just play? How did you experts start

charred bobcat
#

A wild F11 appears

#

👀

fossil pecan
#

😄

#

👋

charred bobcat
#

I was thinking about doing KoTH again...

fossil pecan
#

I play KoTH on stream a lot @worthy geyser i went over read-only mounts a while back 😉
https://f11snipe.live

#

I'm happy to host or join private matches for practice anytime 👍

charred bobcat
#

We should do a session. I'm always willing to. Just @ me. I like practicing.. because I'm no where near as good as F11

sour vectorBOT
#

Gave +1 Rep to @fossil pecan

charred bobcat
#

F11 is pretty Fing epic fr...

broken pilot
broken pilot
#

20 mins

fossil pecan
broken pilot
#

10 mins

broken pilot
median tapir
#

Is deleting chmod allowed?

short tusk
median tapir
short tusk
#

Check pins

charred hare
median tapir
broken pilot
broken pilot
median tapir
broken pilot
fossil pecan
onyx dust
#

how much do the koth hosts vary? are they mostly windows?

willow raptor
#

!docs koth

pearl gladeBOT
willow raptor
#

@onyx dust this should tell you most basics about koth

#

and here's the pool of machines

onyx dust
sour vectorBOT
#

Gave +1 Rep to @willow raptor

austere obsidian
#

mostly linux, which is good

#

need to watch some youtube videos of people doing koth to get some handle on what to do

peak peak
fossil pecan
wintry gust
#

Anyone Up for friendly Koth Game?

#

I Just Wanna See how we used to do Koth

fossil pecan
wintry gust
#

i am so stuck with this Koth lol

fossil pecan
broken pilot
#

10 mins

fair adder
#

7 minutes

fair adder
#

wow I just realized I'm in the koth room and the message above mine was sent yesterday. I thought I was in general
l
o
l
NotLikeThis

unborn ice
#

how do I fix this error while using my own chattr in target machine ?

nova igloo
#

Yo what's up people

#

I haven't done anything related to cyber security for about a year now

naive goblet
#

so you don't just upload busybox then????

#

then again that might be a bit bloated but it should work

nova igloo
#

excuse me?

naive goblet
#

was refering to @steep agate

nova igloo
#

oh haha my bad

#

If anyone is interested in a friendly 1v1 or so...

#

I'm gonna join the vc

steep agate
steep agate
#

.

naive goblet
#

yeah you are just making a static chattr binary

steep agate
#

yes

naive goblet
#

busybox has a lot of other binaries bundled together

#

hence might be a bit bloated for this purpose

steep agate
steep agate
#

wow, I could have sworn that this new THM event, was something related to KoTH because of the crown hahaha, it wasn't this time, F

naive goblet
#

then again people might be looking for files called chattr instead of files called busybox

naive goblet
steep agate
sour vectorBOT
#

Gave +1 Rep to @steep agate

swift laurel
#

Is it possible to play koth with the attack box ?? I’m bored at work with no VM lol

weary tangle
#

i think this is possible

#

the attack box is available

broken pilot
#

Whatever helps you learn.. it’s a good idea to take notes as you’re playing as some of the machines have the same credentials and ports opened… I would also keep notes on any flags that you find because those are static as well…

broken pilot
#

It all depends on what you want to focus on… me personally I don’t patch the machines I might make them more vulnerable to allow more players on the box and let’s fight for king.. other players might patch the boxes.. but if I get in before you then you’ll have to find all my back doors and patch those as well… other players have rootkits and use koth as a testing ground… it all depends on what you choose to focus on @lavish lance

sour vectorBOT
#

Gave +1 Rep to @broken pilot

fossil pecan
#

Flags can be submitted anytime (if you hover over the flag icon next to input, it'll say how many total flags are available on that box 😉)

#

So you can hunt for the rest! 😁

sour vectorBOT
#

Gave +1 Rep to @fossil pecan

broken pilot
#

20 mins

short tusk
#

@broken pilot ... have you been promoting your Discord server on KoTH?

short tusk
#

Please respond or I will have to take action^

broken pilot
broken pilot
fossil pecan
broken pilot
#

20 mins

ember lodge
#

is it fair to kill apache or make 403 in place of patching the vuln on a box have only ssh and apache open?

#

3 reset, 2 appache kill and maybe 1 chmod on root folder
this is my first time , i want to know if i can do that too (break service in place of patching them) ?

ember lodge
#

@steep agate are you MatheuZSec ?
someone can tell me why with a root shell i can't chmod +w king.txt please?
and how people do to write and flood on my shell please

broken pilot
#

As far as flooding your shell that could be /dev/urandom .. it’s hard to know exactly.. if you want to check if a file has any attributes set you could run lsattr and that will list attributes for all the files in your current directory

broken pilot
broken pilot
#

i mean sure in private games.... im sure people can get around that script tho 😉 .. let me kno if you want to test it out

#

i was talking about you trying it against me....😎

fierce halo
#

sup

swift laurel
#

🤣

swift laurel
fierce halo
swift laurel
fierce halo
#

pretty good

swift laurel
#

That's great news

fierce halo
#

zho is the root now

swift laurel
#

I failed miserably to get persistence🤣

fierce halo
#

i failed qlso to put the god damn password

swift laurel
#

for what ?

fierce halo
#

i could do better

#

@broken pilot bro stop closing ssh session damn

broken pilot
#

i just snatched king

fierce halo
#

soory mabqd

#

my bad

swift laurel
#

Please forgive me guys , I have sinned 🤣 leave me alone now

fierce halo
#

ding i repeted same cmds for 8 times

#

of you guys killing the session hahaha

#

9

#

im done see you guys later

steep agate
#

🤣 🤣 🤣 🤣 🤣

#

WTF

#
sudo chmod -x /bin/systemctl
sudo chmod -x /usr/bin/wget
sudo chmod -x /usr/bin/chmod
sudo chmod -x /bin/chmod
sudo rm -rf /usr/bin/rm```
#

this literally and certainly is VERY prohibited and results in a nice ban

fossil pecan
fossil pecan
#

do you want to try my kingme challenge?? 😄

nova tide
#

It definitely is not and I would not recommend anyone using these. I have removed the link and please don't use these in public games it can result in a ban.

ember lodge
#

someone can explain me why? please

gilded roost
#

@ember lodge yes, because I figured it out. I'm not sure what they did is within the rules

#

they changed the working directory of the koth process to /etc/trace, which had its own king.txt

ember lodge
gilded roost
#

To me that sounds pretty iffy from a rule 4, perspective: "Do not attack, modify or stop the service(king/KoTH service) on 9999 (this includes a 'KoTH' binary placed by default in /root and things like changing service locations.)"

#

plus, someone that round removed execute permissions from a whole bunch of stuff including chmod

ember lodge
gilded roost
#

"8: Do NOT delete system binaries (except chattr) or change executable permissions on them (or their directory)."

#

so changing exec permissions on anything but chattr is off limits

ember lodge
#

ok thx, i have started koth yesterday, someone have made me the same yesterday, i was thinking was intended sry

nova tide
gilded roost
#

That actually doesnt seem to violate the rule to me

nova tide
#

It is up to the participants if they want to report or not.

gilded roost
#

I mean, does a mv /root /somewhere violate the rules?

#

It doesn't actuallyseem like it to me and I'd like to know so I know whether I can do it or not

nova tide
#

It would be somewhere in the grey area, but I still would not recommend doing it.

gilded roost
#

Hm

#

Yeah it's a weird case where it's hard to see a rule it clearly violates, especially when you put a copy in its place. It feels sort of like putting a mount over /root where the koth process is in a directory that isn't at /root anymore

fierce halo
#

sup

#

how are you

nova tide
#

If people won’t stop breaking the rules it might start soon.

fierce halo
#

we whant new kind of games on THM like koth

#

its hard to win against some one ho just played 1 or 2y on koth haha

#

dingo

ember lodge
#

i have play with you yesterday for my first day in koth, you have kill apache in place of sanitising the vuln it was against the 2nd rule, is realy unfair
and on another box, instant change password after reset, with no time to connect on it like using a aupown script

#

2 time in a raw ...
on the third one you have chmod -w the upload folder

#

i got 403 on upload on the third reset, the fairr path was to sanitise the upload php file i mean, dont break it

#

we will see the next time you will be in front of me

fierce halo
#

oooooohhhhhh i like that

ember lodge
ember lodge
#

on my first game you have intentionaly break it ...

fierce halo
#

bruuuh stop you both go and play a clean koth room you 2 a privite room

#

and show us who is the king

ember lodge
#

if you take permission to wast 30 min (+ 1h waiting the end) off my time waiting to enter in a room and instant break it , i mean i have permission to say what i want too

ember lodge
#

next time i will

fierce halo
#

guys how can i exit vim

#

:p

ember lodge
fierce halo
#

thanks buddy

fossil pecan
#

Let me know when! You can pick any Linux machine, and we can join a private match to see if you can break my king challenge 😎

fierce halo
#

sup guys

#

someone post link to koth room shrek noz

#

now

#

@steep agate drop the link man i like the shrek room

short tusk
#

Hey everyone,

Please do not post your social media/ use various tools to spam users with your social media (Twitch, Discord, other) during KoTH. Users want to have a game of KoTH, not follow your Instagram page.

If users are promoting their socials in your game, please ping me (or any of the KOTH staff) in Discord or drop me an email at koth@tryhackme.com.

fierce halo
#

@fossil pecan can i DM

fossil pecan
fossil pecan
#

haha nice! I'm curious to check it out again, but I didn't save the link to repo before ... can you DM it to me again?

gilded roost
#

How often are new koth boxes added?

#

@fair adder I'm not sure it's kosher to remove the setuid bit from pkexec. That fundamentally breaks the functionality of pkexec rather than patching a hole

#

remounting the root filesystem readonly is almost certainly also not kosher due to breaking anything on the machine that wants to write a file

fossil pecan
gilded roost
fossil pecan
#

yes hahahaha that's not kosher 🤣

gilded roost
#

it also won't work on many of the machines because their root device isn't /dev/sda1, but still

jovial field
#

right, the rest of the stuff is already known, nothing new

#

this is not allowed

#

I mean it is easy to undo but still not allowed

gilded roost
#

Yeah it's akin to temporarily taking down a service which is also not allowed

#

What's the variance in difficulty on the koth targets like btw? I've done panda, food, and Tyler so far and they were all pretty easy

fossil pecan
#

Carnage can be a bit tricky for some too 😉

gilded roost
fossil pecan
steep agate
steep agate
#

but my LD_PRELOAD is almost ready too, maybe I'll make a video explaining how to make one from 0, or a post

stiff egret
gilded roost
#

The mv case is weird to me because it sounds like mounting something atop /root actually is okay, even though it results in something extemely similar: the working directory of the koth process no longer living at /root

stiff egret
#

Exactly, though the kernel side is in the gray area. But I can confidently comment on moving the root directory. Directly or indirectly you are messing with koth service, which is not allowed.

gilded roost
fierce halo
#

and why you are moving the root like

stiff egret
#

Exactly lol.

fierce halo
#

maybe he got a dark secret tho

stiff egret
gilded roost
#

I've not done either of these things, I've just been in koths where someone else has

#

I brought up both those examples because they aren't clearly modifying the koth service directly or indirectly to me. Like, if you mount something on top of root, the koth service still has its original working directory and is still reading the same king.txt it was before, it's just that that directory is no longer at /root in the fs hierarchy (in the shadowing case it's nowhere).

#

I'm actually sort of surprised you said the kernel hooking is grey though because that's an absolutely clear indirect modification of the service to me

gilded roost
# fierce halo and why you are moving the root like

In a game I was in someone moved /root and then copied it back, with the end result that everything looked fine and the flag was still there but the koth service was now reading a different king.txt than /root/king.txt. It took me like 30 minutes to figure out what was going on an I ended up stracing the koth process and realizing it was using relative paths, then did a search and found the moved king.txt

fossil pecan
fossil pecan
gilded roost
#

Also, just from a clarity and understanding perspective, "Modify covers everything" doesn't actually clarify anything, because the question is about what counts as a direct or indirect modification. Re-emphasizing that you can't do any such modifications doesn't help clarify where the line is as far as what's an indirect modification to the koth service and what's a wider allowed modification to the system

fossil pecan
#

I try my best to fix and help people understand rules and how to abide without breaking stuff 😜

gilded roost
#

(really, that experience made me feel that the koth service should be using absolute paths, as that would alleviate this whole issue)

#

But currently it just opens "king.txt" so it's working dir dependant

fossil pecan
#

some are absolute

gilded roost
#

Well, at least I have a pretty good idea of what I can do that definitely okay...I'm going to see if I can write a tiny rootkit this weekend. I have an idea that would me it very subtle and maddening

fossil pecan
gilded roost
fossil pecan
#

this is a great blog series going over all the basics to orient building LKMs, you can probably knock out a handful of the parts together if you can follow the lower level C/memory stuff 👍
https://xcellerator.github.io/posts/linux_rootkits_01/

gilded roost
#

It seems the standard approach is a kernel module, which makes total sense. Roughly it seems like the process is actually rather similar to writing a DLL injected game hack, actually

fossil pecan
#

idk much about windows hacking still haha ... been too deep in linux for many years 😆

gilded roost
#

The thing I'd really like to do if I could is move the code out of the module after loading though, so that the module doesn't need to stay loaded and could even instantly unload itself. I'll have to look into that

fossil pecan
#

ah ya, i can follow concepts ok haha, but haven't been "hands on" windows enough

#

I've been playing with process injection/hollow stuff on linux, pretty cool

gilded roost
#

And that could get weird I expect because there isn't really a legitimate reason to do that. Have to find some executable place to put it and ensure its relocatable assembly etc

#

So that'll be some interesting research

fossil pecan
#

ya sounds interesting

gilded roost
#

Yeah it'll mean researching more generally about how kernel modules work and how the Linux kernel does memory management

fossil pecan
broken pilot
#

10 mins

gilded roost
#

Effectively the module would allocate memory, copy the hook fn to it, create an executable alias for it with vmap, hook syscalls into it, and then somehow unload itself and effectively leak the memory it allocated

fierce halo
#

is it chatrr -ai

#

illegal

broken pilot
fierce halo
#

ofc no

#

dingo gg trap

#

i got just 3m in the king haha but well played

broken pilot
#

oh to unlock king? yea it was ... I thought you were asking was it illegal to chattr -ia

#

its not even locked right now

fierce halo
#

yea but im low khnowledge of how get king back

#

so how can i get king back like

broken pilot
#

echo username > king.txt

fierce halo
#

nah cant

broken pilot
#

why not??

fierce halo
#

idk

#

something you have runned

broken pilot
#

i just echo X3.A > king.txt now your king

fierce halo
#

im going to tell you what they say

#

its chatrr i guees

broken pilot
fierce halo
#

and i could not unlock it by chattr -ai

broken pilot
fierce halo
#

cmd

broken pilot
#

but king isnt even locked right now

fierce halo
#

yea it was loked in first 6 minits

broken pilot
#

you can run lsattr to list attributes

fierce halo
#

ok

#

im just new on this so my brain is

broken pilot
broken pilot
fierce halo
#

yea gotcha

#

thanks too mutshc for infos

gilded roost
#

@fossil pecan one thing I'm sort of surprised about reading on hook methods is that none of the common ones seem similar to what I used to see in game hacking and all seem quite detectable. What I expected to see was replacing the beginning of the original function with a jmp to the hook (or a wrapper since it'll be weird asm not-really-a-function stuff and you probably want the hook body in conventional C) and putting whatever you replaced with jump near the end of the hook, followed by a specially crafted ret to return into the original syscall in a way that's fairly invisible (no intermediary stack frame for your hook, for instance)

broken pilot
#

yea that script isnt going to work anymore.... @fierce halo your goin to have to actually echo X3.A > king.txt if you want any points

fierce halo
#

yea that what i do

#

and i copy some cmds and i past them aslo

gilded roost
fierce halo
#

@broken pilot are you the creator of shrek machine

#

what is cmd to serch flags i just what to win @broken pilot damn

#

i didnt understand this room well

#

i need to replay it later

broken pilot
fierce halo
#

thanks you

#

gg well played @broken pilot if it was just unlocked on first it was a win

#

thanks for the fun im going to eat and chill out

broken pilot
#

GG

fierce halo
#

wooo i losed by 10 points hahaahahahaha

steep agate
gilded roost
#

@fossil pecan how do you deal with all the old kernel versions hanging around the koth boxes? Do they all have what's needed for compiling out of tree modules? Compiling against a local kernel tree seems hellish for old kernel versions because of the dependency on gcc versions

steep agate
#

on some koth machines, the kernel is 3x, or others that don't have gcc, and others that don't have make installed @gilded roost

#

what makes it harder

fossil pecan
gilded roost
#

yeah I figured that was the only real solution. So I'm gonna need a bunch of ancient ubuntu VMs I guess

fossil pecan
#

Ubuntu 16+, Debian 8+, and some CentOS

#

Covers most of them

gilded roost
steep agate
sour vectorBOT
#

Gave +1 Rep to @fossil pecan

fossil pecan
#

No every unique version gets it's own build, but not a whole lot of difference in the code ... My new ones are much cleaner lol 😆

#

I needed to install all headers for each, super easy with apt on Ubuntu within a generation

#

Others were harder to get source and build off versions

gilded roost
fossil pecan
#

Found the headers . RPM s and actually ended up bringing and installing live in game i think haha ... For some reason had trouble on those with local VM

#

Def trickier haha

reef osprey
#

@steep agate GG

steep agate
reef osprey
#

what about that script?

#

Why I wasn't able to change permission on king.txt

steep agate
reef osprey
reef osprey
steep agate
steep agate
jovial field
charred hare
#

what is the point of these 2 lines

gilded roost
#

I don't see why you'd need to remove it. It's just a shell alias

charred hare
gilded roost
#

Guess it's time for me to set up LKM build VMs for all these targets...ugh

gilded roost
#

I wonder how many people are putting GPL as their module license and thus obliging themselves to give their rootkit source code to anyone who ends up with a copy of the binary module in a koth :P

reef osprey
naive goblet
#

well dunno but think the powershell findstr will be in there somewhere

steep agate
#

you can use findstr

reef osprey
#

Thanks

ember lodge
restive folio
#

anybody wanna play some KoTH?

ember lodge
restive folio
#

plugging in mic rn

ember lodge
#

anybody wanna play some KoTH?

gilded roost
#

Managed to finish a first version of my rootkit over the weekend and built it for all targets except h1-hard.

gilded roost
steep agate
#

i was doing one in user land to leave open src

gilded roost
#

it's not very featureful, given that it's basically a weekend project. But it has the essential features I wanted. But yeah it's kernel space

steep agate
#

nice!

gilded roost
#

it's not particularly resilient or persistent though. That's not where I spent the time. It'll be v2 stuff

swift laurel
opal lagoon
#

Anyone up for a game?

broken pilot
#

20 mins

jovial field
#

20mins

narrow shadow
#

10 mins

broken pilot
short tusk
#

@steep agate Mind if I dm?

steep agate
short tusk
#

Thanks

steep agate
fair adder
#

Anyone up for a game?

#

In 11 minutes…

#

You guys want to hop on voice chat?

fair adder
#

Thank you @steep agate

sour vectorBOT
#

Gave +1 Rep to @steep agate

steep agate
fair adder
#

Its a trap

#

Nvm

steep agate
broken pilot
#

15 mins

steep agate
muted wigeon
#

@steep agate HUGE respect for you friend on your defense strategy once the box is rooted 👏 One day I'll figure it out . . . until then I'll keep getting nynynynynynynynynyny'ed 🤪

steep agate
#

Hahahaha

#

Thanks!

fair adder
#

do you have to have a certain level to play KOTH

somber marsh
fair adder
fair adder
#

Ok good. I did it and then afterwards I was wondering if I broke the rules haha

fair adder
nova tide
fair adder
sour vectorBOT
#

Gave +1 Rep to @nova tide

fair adder
#

(didnt mean to put caps)

twin valley
#

hm do i also have the attack machine on koth, or do i need to vpn with my own?

naive goblet
tropic harness
#

hi, i've got a question about KOTH

#

there is 3 of us in the room and none of us scored any flag. Why one of us is getting points for being "King"?

jagged flicker
#

he probably has his name in the /root/king.txt and just forgot to get the root flag

#

or can't access it

#

jup

#

that's how koth works

tropic harness
#

makes sense if he indeed put his name in /root/king.txt

#

thanks for the response

north sky
north sky
#

Hey

#

Anyone up for koth???

broken pilot
north sky
#

yea ofc that will be a lot fun : )

steep agate
#

I'm about to stop playing koth, and I want to leave a memory for KoTH players, leave my tricks that I used in koth, so I could make a github, with all the machines teaching how to patch the machines, protect the king in many ways, web app's, etc ? Or would that be too much against the rules? @short tusk

#

or would it be better to simply write a blog/article, where I talk about the tricks of defending crates, patching a webapp, protecting the king, etc.

broken pilot
stiff egret
stiff egret
steep agate
#

ohh, nice!!

#

sure

#

I'm going to start writing the posts, and when it's ready I'll send it to you

broken pilot
#

@steep agate#0 I would also include ways to stop some of your king techniques…. Just to make it fair… cuz imagine if everyone had F11’s v4 lkm with no way to stop it…. Would probably kill koth as people would probably abuse it….

steep agate
# broken pilot <@745672959804571742>#0 I would also include ways to stop some of your king tech...

My syscall write intercept is similar to F11's, but if you read the code, research and study more, I'm sure it will be stronger than F11's, besides, I'm going to put a command that completely blocks the insertion of any LKM, and for you to be able to put LKM again, you would have to restart the machine and that is against the rules, but for that, you would have to be faster than F11snipe, because if it loads first, it won't do much good 😄

broken pilot
#

Maybe…. But honestly I think F11’s will have it beat every time only cuz I know which syscall he is hooking and without spoiling too much I think his trumps the write syscall

#

But the lkm blocker would be helpful if you could load it first…

steep agate
steep agate
broken pilot
#

But just being able to read and analyze your code for the write syscall would be helpful also… let me know when you release this I will take a look at it @steep agate

steep agate
#

I still have to see when I'm going to release this, because I haven't even started writing yet 🤣

broken pilot
#

We gotta get that rematch in before you quit playing also 🎉🎉.. maybe one last tournament or something… @steep agate

steep agate
#

ya hahaha

jovial field
#

I stopped playing a while ago too. Maybe i will drop a github repo with my scripts and tricks too

jovial field
#

btw. Matheuz i will propably drop the killswitch for rootkits so they become completly useless

low dagger
#

@stiff egret any guidelines AGAINST setting up community events and tournaments for KOTH

stiff egret
#

thoughts? cc: @nova tide @short tusk

short tusk
#

Yes^ please run community events by the community manager.

We need to ensure we can accommodate and keep an eye.

short tusk
#

You’ll find more information about that when the team is ready:)

short tusk
low dagger
broken pilot
#

@fossil pecan upvote 🤔 maybe we can get challenges into a community event?? Guess we just have to find the community manager…..

peak peak
#

when does koth usually have the most players?

#

i just tried to join one and nobody else was on

broken pilot
broken pilot
#

20 mins

broken pilot
gritty cedar
jovial field
broken pilot
north sky
#

Can someone help me with this error please ‽ why am i getting that error : (

jovial field
broken pilot
north sky
#

Yes I'm talking about wget problem and that vpn thing

#

No I didn't reste it

#

How can I ?

jovial field
jovial field
north sky
#

fk sry

#

i did it on wrong channel

muted wigeon
sour vectorBOT
#

Gave +1 Rep to @jovial field

rare hedge
#

Im a noob does anyone else want to try koth out?

violet moth
stiff egret
broken pilot
broken pilot
proud moth
#

@stiff egret dude thm's openvpn os down or what ??
my vpn connection just stays for few sec's. and randomly again get ping back and it goes off after few ping requests.

steep agate
#

I'm getting to the final parts, I'll update my repository as soon as everything is ready 😄

hasty hemlock
#

@broken pilot bro you are awesome. I really enjoyed it, how many years have you been playing ctf?

broken pilot
steep agate
#

Hello everyone how are you? Hope well 😄 . Well, after 2 years, I finally updated my tryhackme koth tricks repository with new tricks, I hope you like it, anything I'm available to help 🙂

charred hare
#

Nice work :)

steep agate
#

thanks 🙂

fast copper
#

Cool stuff. HappyOwl

steep agate
sour vectorBOT
#

Gave +1 Rep to @fast copper

fair adder
#

+rep @steep agate

sour vectorBOT
#

Gave +1 Rep to @steep agate

muted wigeon
sour vectorBOT
#

Gave +1 Rep to @steep agate

broken pilot
broken pilot
stuck sierra
broken pilot
#

20 mins

broken pilot
thorny tide
#

are koth beginner friendly ?

#

i mean i reached the easy-medium level on CTF in thm, can i dive into koth ?

broken pilot
sour vectorBOT
#

Gave +1 Rep to @broken pilot

broken pilot
elder cloud
#

hi every one

steel arch
#

Hello all.

#

Rogue12 from the 171 lobby here. Looking forward to playing.

broken pilot
#

10 mins

broken pilot
#

20 mins

visual phoenix
#

do the private games get listed under recent games

short tusk
prime steeple
#

Anyone want a game?

broken pilot
short tusk
#

@fossil pecan Mind if I DM?

fossil pecan
prime steeple
#

jump on guys

steel arch
prime steeple
#

anyone want a game?

modern totem
#

Hey guys, the actual round of KotH is almost over... it was the carnage machine.. i found an img upload page which i think could be an entry point if i can somehow get around the restriction of pictures. May someone explain to me how that might work for the next time

#

@fossil pecan did you get it via the upload portal?

fossil pecan
fair adder
#

when should i start doing koths

fossil pecan
# fair adder when should i start doing koths

Can start anytime! Helps to be somewhat familiar with challenge boxes in general, like scanning and initial access, then privesc, etc

I'm happy to help if you have any questions, or want to try out some private practice matches first! Feel free to DM me if you want 😁

fervent compass
#

Hey gys help me also

#

I also wanna learn

obsidian lark
#

Hey bravosec, good game man, sorry for killing your session every time ... xD

alpine mango
quaint remnant
#

hey any body there?

quaint remnant
#

Any body knows . which room this is?

steep agate
quaint remnant
sour vectorBOT
#

Gave +1 Rep to @steep agate

quaint remnant
quaint remnant
#

Any body playing rn?

quaint remnant
manic hawk
thorny tide
fossil pecan
thorny tide
upbeat peak
#

Is there a way to find a chattr binary if it has been renamed or is the best way to get past a chattr binary simply to get your own version onto the box?

broken pilot
upbeat peak
jovial field
upbeat peak
#

Oh of course I could just write something with ioctl() in C and perhaps even C++

broken pilot
#

Or python … or still bypass the chattr lock all together…

upbeat peak
#

How would one bypass it?

broken pilot
#

You could just mount over the chattr locked file… with an unlocked file

steep agate
broken pilot
#

mount —bind -o ro /tmp/king.txt /root/king.txt this will mount /tmp/king.txt over /root/king.txt and also make /root/king.txt a read only file…. This can be reversed by umount -l /root/king.txt

upbeat peak
broken pilot
#

And matheuz command will download a static chattr for you

upbeat peak
#

So while it's mounted, the file in the example you gave /tmp/king.txt is the one that is actually being read instead of king.txt. Think i'm understanding it. Thanks guys!

jovial field
upbeat peak
#

Just looking at it now, Thanks a lot!

steep agate
waxen geyser
#

you can try ddos

waxen geyser
jovial field
waxen geyser
#

CAN IT HARM MY PC

jovial field
#

no it is free and harmless for your PC

#

just press f11 when you visit the site as fast as possible to protect your pc

steep agate
agile linden
radiant sun
#

rather than find use grep -ri "pattern" <dir> 2>/dev/null 😉

fast copper
#

Config files, SQL databases, ….

#

The list of ways to hide strings is pretty long.

fast copper
#

(It will take forever tho)

radiant sun
#

that's why mentioned <dir> not '/'

#

common one's are /etc/ , /mnt, /var, ...

agile linden
#

on some folders which have files with txt,css,html etc....*

#

guys is this a flag

#

{plague august14 02c2704c036a25d997ca09461eaf8d92}

radiant sun
#

grep -rioE "thm{.*?}" /etc 2>/dev/null

agile linden
#

i found a flag on a config (/etc/vsftpd.conf)

#

ok so till now thy r just 7

radiant sun
#

ig total are 9?

agile linden
#

yuh 9 so still 2 left !!

radiant sun
#

/var

agile linden
#

home,root,etc r all done but var has nothing

#

etc has one on the config file

#

yup var has one on the ftp which was the first one found it !!

radiant sun
#

etc has 2, and check after connecting to ftp , explore port 80 website pages

#

can't give more hints

agile linden
#

ok thnx

radiant sun
#

have fun 🚀

agile linden
#

i tried to do something like

#

thm{02c2704c036a25d997ca09461eaf8d92}

#

haha

radiant sun
#

uhm all flags are in format thm{...}

agile linden
#

thnx all guys 🙂 ! , found all of them , last one was in .css 😉

#

thnx , especially u who gave this command grep -ri

steep agate
steep agate
steep agate
fallen owl
#

9 minutes left guys

civic vortex
#

Can someone help? everytime I play the machine Offline, the king server is always not working

low dagger
#

Is anyone interested in a tournament for KOTH?

steep agate
#

I am @low dagger

low dagger
steep agate
#

sure

broken pilot
low dagger
low dagger
karmic beacon
#

Im down too

fossil pecan
light relic
#

I'm wondering, are there really 4 flags in KOTH Production machine? Or there are just 3 and I missed last one?

lavish haven
#

it is 4

light relic
#

Okay, thanks

swift laurel
#

👋 @fossil pecan

fossil pecan
prime steeple
leaden panther
#

Koth time koth time

toxic ice
#

in the rules it says
"Scripts that automatically hack(autopwns) and/or harden the machine are forbidden."

Does that include stuff like.. the vuln script on nmap or linpeas?

leaden panther
# toxic ice in the rules it says "Scripts that automatically hack(autopwns) and/or harden t...

To my knowledge that would be a no. There are scripts out there that are created specifically to do enumeration and then from what it gains it starts automatically trying to exploit the system and then escalate. Those are the only types that are banned because it can be unfair or break a lot of things. Even programs like metasploit should be fine since they are not automatically trying to attack the system you still have to determine what attacks to use and how to use them.

toxic ice
sour vectorBOT
#

Gave +1 Rep to @leaden panther

leaden panther
violet moth
slender frost
#

Hi I'm root in KOTH and I cannot add my username to king.txt

slender frost
#

😁

slender frost
broken pilot
# slender frost I was in your game

Ohhh you were going up against matheuz…. It’s a little harder to take king from matheuz lol … it can be done but you will need more than a chattr lock lol…

broken pilot
# slender frost Can you help ?

Sure … I can point you in the right direction.. but you will have to do your research to understand different techniques…

slender frost
#

Ok

sour vectorBOT
#

Gave +1 Rep to @broken pilot

slender frost
#

So he's using what techniques ?

broken pilot
#

It would be hard to tell without being in the game but there are certain things you can look for that will let you know like what errors do you see when you try to put your name in king.txt

#

Usually with some of the better players the techniques used will be based off your experience…. For example why use a rootkit to take king if I can get the same results using a chattr lock… and then if you can take king from chattr lock the next technique might be used

broken pilot
slender frost
#

So if I'm against him again what do I do ?

broken pilot
#

Well it could be a number of things… it would all depend on what kinda errors you see… could be a script, could be a mount, could be a chattr lock, could be a rootkit, could be an Alias, could be a cronjob, could be a combo of these 🤷‍♂️. Dm??

sour vectorBOT
#

Gave +1 Rep to @broken pilot

slender frost
#

But when I do cat /root/king.txt there is not my name

#

Can mention @ here ?

#

To invite to a private game ?

broken pilot
slender frost
#

Yeah I saw them

#

But it doesn't match

obsidian lark
slender frost
obsidian lark
#

I do DM

jovial field
#

PORT STATE SERVICE REASON
7777/tcp open cbt syn-ack
9999/tcp open abyss syn-ack

#

also ssh on port 7777 is denying any request

#

you are not allowed to shut nearly every service on the machine you know

civic vortex
#

ohh sorry

#

I think init command messed up

#

I will reboot it

jovial field
#

I still see no reboot