#koth

1 messages Β· Page 7 of 1

rose folio
#

Yeah. I wonder if it's possible to run some sort of anti-rootkit/backdoor software on the machine to clear it of backdoors or if that would violate the "no auto-scripts to harden the machine" rule

steep agate
viscid torrent
#

gg @young bramble

jovial field
# rose folio Yeah. I wonder if it's possible to run some sort of anti-rootkit/backdoor softwa...

I think you got the critics from my github post. The Thing is most people don't have enough time to build a working rootkit for every koth kernel and like @steep agate said it is pretty hard to remove them. It is possible to remove less sophisticated rootkits but there are hiding techniques where I doubt the "defuse" of matheuz would work. Without Rootkits it is more a "live" fight between players and not a fight against a rootkit that may take a few days or more

steep agate
#

It's interesting research, but of course, as there will always be a bypass for an EDR/XDR, there will be a means of detection, the same with the trick I'm going to put in the zine

#

Use rootkits against strong opponents, but I think against normal players I don't know if it's worth risking using more advanced techniques

young bramble
jovial field
#

yeah i am also interested with what trick you came up with

steep agate
#

so much so that this trick, in a test with @fossil pecan , I managed to defuse his updated lkm rootkit, so it's really worth playing against opponents like this, as it forces you to learn more things

obsidian lark
#

@north wolf using a custom koth binary for king? unacceptable

#

anw gg

north wolf
obsidian lark
#

yeah but your using a custom koth binary for king

north wolf
#

Just that name of my custom binary is also koth since I'm "playing" koth 😐 compiled from koth.c

obsidian lark
#

bruh

north wolf
#

If you wish then, I can share you source code to koth.c

obsidian lark
#

nah i thought you took over port 9999 using another binary, cause /root/king.txt had my name

#

sorry anw gg

north wolf
#

no no i didn't touch port 9999

#

||code redacted||

:P
obsidian lark
#

kk lol i trust you

north wolf
#

oki then

#

it was fun though playing with you, normally i see 1 king change but this game was fun!

obsidian lark
#

lemme know if ya wanna play more, i didn't use any of my good tricks, too lazy haha

north wolf
#

nah, time for my lunch lol

rose folio
#

Are there any Macintosh KOTH boxes?

near lily
#

Doubt it.

rose folio
#

I imagine there's no appeal, but eh

near lily
#

You can't run MacOs on none Apple hardware.

rose folio
#

Hrm, not even on a VM?

near lily
#

Nope, it's against Apples EULA.

rose folio
#

I see. I know quite a few players dislike the windows boxes

sonic belfry
# rose folio Are there any Macintosh KOTH boxes?

Costly, mac instance types on AWS are provisioned at a minimum cost of 24 hours, enforced by Apple's OS license requirements. So even when a mac target machine would be used for less than an hour for a KotH game, it would incur the cost of 24 hours.

sharp siren
#

it seems pretty good ngl

obsidian lark
#

bspwm

sharp siren
sour vectorBOT
#

Gave +1 Rep to @obsidian lark (current: #616 - 6)

elder rapids
#

Playing my first koth, hop in if you want to join

elder rapids
#

Getting smoked lol, cant figure out how to properly set up for an upload vulnerability

north wolf
#

All I can say is this πŸ‘†

#

good luck!

elder rapids
#

lol

#

At least I'm still tied for last πŸ˜‚

north wolf
elder rapids
#

I would really appreciate that

jovial field
#

xD

civic vortex
#

and naryal2580, spamming his koth binary and causes the machine to halt : /

north wolf
north wolf
#

this time makes me wonder why didn't matheuz play πŸ€”

north wolf
civic vortex
#

I liked the way you created the folder though, made me learn new thing

north wolf
#

hehe

#

but I wonder where do others hide lol

civic vortex
#

loads directly to memory maybe

north wolf
#

I've found user's binaries on other games but never on koth lol, I feel I'm the only one who runs being so exposed lol

civic vortex
#

I would like to know too

sonic night
#

koth is great, until you start looking threw the box and find folks messing around with cr4p rendering the usability of the box.

#

no bueno

steep agate
sonic night
#

Last game i played, the password to usernames were changed making initial foothold near impossible

steep agate
#

4-5 ways depending on the box

#

And that doesn't make the game impossible lol

sonic night
#

Correct, but the ports which were open would be good indicators for gaining access. From logging in to API access, vftp, or funky ports with nc

steep agate
violet zealot
#

what was the box?

#

because i can confirm that without creds u can get a foothold on the machine

#

but yeah consider that most players change user passwords once root

sonic night
#

The box was hackers, ironically so

My understanding of rules was you can patch and such. But not make changes to application functionality or service changes

sharp siren
#

@north wolf Bruh

molten scroll
#

boring...

wind kite
#

huh

north wolf
north wolf
sharp siren
sharp siren
keen remnant
sharp siren
#

idk how it works

#

xD

keen remnant
#

lmao πŸ˜„

craggy storm
naive goblet
#

nyancat > /dev/ptsX

violet zealot
violet zealot
#

gg @north wolf and the others that i can't ping

violet zealot
#

@civic vortex u are not supposed to delete /lib buddy NotLikeThis

violet zealot
#

because before u got king i could use chattr

#

and after u got it i tried chattr and got this

#

so idk what u using but it seems that u deleted /lib

civic vortex
#

I only assume someone did something after looking at command logs

#

I got king and go played my game

jovial field
#

check /etc/ld.so.preload next time

#

(and the env var)

violet zealot
#

hmmmm okey idk about it

jovial field
#

for reference read the notice in my kirito rk on github. I encountered the same problem

sour vectorBOT
#

Gave +1 Rep to @jovial field (current: #700 - 5)

keen remnant
jovial field
#

sure this also works

#

i would still recommend statically linking the rk

#

because else you may break other binaries loading the older version of glibc and the newer version

keen remnant
#

staticaly linking glibc? πŸ˜•

jovial field
#

at the same time

obsidian lark
#

i compile my binaries on a ubuntu 18.04 vm and works fine with all koth and btg boxes

jovial field
#

nah either you build on the machine itself and use it's glibc

#

or you statically link it or you bring the glibc required with you

#

and sure you can compile on a similar machine and get lucky

civic vortex
#

Next time do something to fetch command logs before blindly blaming people JoyFacepalm

keen remnant
#

glibc is backwards compatable you can use a very old and it will work on most machines

obsidian lark
violet zealot
#

it was just for a curl so idc

jovial field
#

it just isn't good practice

keen remnant
#

fair enough

#

just saying there is a way to avoid compiling on target and staticaly linking glibc

#

πŸ™‚

jovial field
#

sure thing definetly worth trying

steep agate
#

This happens because you need to compile your binary statically, otherwise it will obviously give errors with lib and compatibility

violet zealot
#

nope i already have it on my machine and curl it on the koth

violet zealot
steep agate
#

@violet zealot

violet zealot
steep agate
#

If you compile something on your machine, most likely, especially on koth machines that are very old, it won't work, you always have to compile chattr, etc., statically in order for it to work

violet zealot
#

okey so i have to curl the c program and then compile it on koth machines?

steep agate
#

you have to compile your binaries statically

violet zealot
#

hmmmm

#

i'll check that

steep agate
#

.

#

@violet zealot

violet zealot
#

thx i'll check that for next games

steep agate
#

nice

violet zealot
#

im trying to get as much documentation to write my own script

#

btw ur demonizedshell is pretty cool, didn't try all features

steep agate
#

thanks! There are still more features to add, I'm just a little lazy to update some things haha, even so, it's a good script to learn persistence and use them.

civic vortex
#

TBH, I would just google the error message, reporting someone for that stupid issue looks like a skid

civic vortex
short tusk
civic vortex
#

Sure, I will keep that in mind

copper olive
keen remnant
#

his username on github is the same as discord πŸ™‚

jovial field
copper olive
#

Thank you!

violet zealot
#

gg @verbal viper

sharp siren
#

any one online? been waiting in lobby for 1 hour

violet zealot
#

@steep agate afk ?

steep agate
violet zealot
#

wtf where is king file?

violet zealot
#

and why do my king time dont move while im king?

#

i feel like this box is broken

sharp siren
#

Hey correct if I'm wrong should I be posting this here or at #site-bugs

#

I'm not a part of this game and still able to see the machine's ip

violet zealot
#

i think someone just fucked up the game with rootkit abuse or whatever

sharp siren
violet zealot
sharp siren
violet zealot
#

yeah maybe

#

@muted gyro is still on the box despite being broken on my side

sharp siren
#

well we can't say for certain maybe it is just a technical issue

violet zealot
#

maybe he did something?

sharp siren
#

broken*

#

@violet zealot the port 80 is borken no? NotLikeThis

crimson atlas
#

Ive had a handful of machines just have either some ports that should be open, closed or all ports closed when some should be open

sharp siren
crimson atlas
crimson atlas
sharp siren
#

even root

#

or admins

crimson atlas
#

So just kill chattr should fix?

sharp siren
#

u need to unlock the file first

#

then you can remove the binary

crimson atlas
#

ah ok

#

Ill google that thanks

sour vectorBOT
#

Gave 1 Rep to m4lisio (current: #1024 - 3)

steep agate
#

once playing koth, they did this redirect traffic (which is certainly against the rules), it could have been the same thing that happened to you in that game

#

.

steep agate
sharp siren
violet zealot
#

Damn NotLikeThis

obsidian lark
violet zealot
#

what's happening ?

#

i can't wget or curl anything

sharp siren
#

haha

#

guess no koth before bed

north wolf
#

If anyone's got issue with koth game, write it down here. I don't personally like to cry the moment someone does something horrible while playing I've just ignored it (except for the first time).

It helps us find the person really behind mischief than someone else being accused.

short tusk
north wolf
sour vectorBOT
#

Gave +1 Rep to @short tusk (current: #6 - 1219)

slender frost
#

How is Matheuz locking the root.txt I can't modify it even if I have root perms

#

bash: king.txt: Permission denied

obsidian lark
#

Prolly he's using chattr

slender frost
#

How to counter this ?

naive goblet
#

the immutability bit from chattr most likely

slender frost
#

How can I get my name in king.txt with the chattr activated ?

obsidian lark
# slender frost How to counter this ?

One of the attributes it can set is called the "immutable bit." When the immutable bit is set on a file, it prevents anyone, even the root user, from modifying or deleting that file.

slender frost
#

So I can't put my name ?

obsidian lark
#

If chattr is not in the system, upload your own to the box

slender frost
#

Didn't wotk

#

work

#

Matheuz name is still in king.txt

#

Even after I removed the immutable bit

obsidian lark
#

what was the error message

slender frost
#

Nothinh

#

Nothing

obsidian lark
#

oh it's prolly a rootkit then

slender frost
#

And how to counter this ?

obsidian lark
#

Haha, check out dmesg! Mathuez is quite the clever cookie; he won't let his rootkit show up that easily!

slender frost
#

I just tap dmesg ?

#

@obsidian lark

obsidian lark
#

type yeah

slender frost
#

@obsidian lark

obsidian lark
#

yeah it's hidden

#

maybe it's a userland rootkit try cat /etc/ld.so.preload

slender frost
#

@obsidian lark

obsidian lark
#

then it's a lkm

#

try lsmod

slender frost
#

@obsidian lark

obsidian lark
#

hmm, it hides from lsmod as well

slender frost
obsidian lark
#

So there's almost nothing you can do, other than enumeration within the box. Mathuez is good with kernel stuff, he's rks are almost unbeatable. But, you can still try, there are some places on the system where rootkit's data is visible ig. Tools like strace and ltrace can also help. Good Luck!

sharp siren
#

guys what can it be ?

broken pilot
obsidian lark
#

you gotta find the loop's pid and kill it or you can remove the binaries (only ones that are uploaded) the loop is using

jovial field
obsidian lark
true valve
#

I don't know, it would probably be wiser to hide the binary somewhere because you would have to rebuild chattr, or upload a statically compiled binary in the future. Someone else will just find a way to set (and remove,) the immutable bit, and you would most likely require chattr to remove it again.

obsidian lark
jovial field
#

but lets say you have a binary witch sets the attributes via iocl linux doesnt care a bit if the binary still exists. The process will still do its thing

true valve
true valve
#

Rookie mistake there.

obsidian lark
true valve
#

Not renaming chattr if you are hiding it.

obsidian lark
#

the are more ways to hide like changing timestamps

true valve
#

Oh, I didn't know about that method.

obsidian lark
#

I use a custom ioctl binary as Terraminator mentioned

#

plus using a static bash will hide (bash scripts) from pspy/snoopy

true valve
#

I'll try these out in my next koth game.

obsidian lark
sharp siren
sour vectorBOT
#

Gave +1 Rep to @obsidian lark (current: #562 - 7)

young bramble
#

some people just don't know how to lose a game

violet zealot
#

wym?

obsidian lark
#

he stops services, moves/removes koth binary, and on top of all uses iptables to configure the firewall to not let other ips access the box

obsidian lark
violet zealot
blissful kettle
#

If there is someone breaking the rules in koth you can report it to support@tryhackme with the session id

obsidian lark
violet zealot
#

yeah @steep agate is cheating too but still here

obsidian lark
violet zealot
#

(im joking plz dont hit me)

obsidian lark
violet zealot
young bramble
# violet zealot i just see a closed session so he could have just killed his shell

in linux, poweroff does one single thing: Shutdown. And this is mentioned in the first rule of the game. Of course if you know how to read. It's not the first time we see Massco failing to obey the rules. I'm not mad at him, I was waiting for him to spawn reset, reboot, shutdown, flood the terminals or kill shells... but I was disappointed to see the methods he used after initial foothold, lack of fair-play and sometime lack of basic knowledge. For example you don't upload pwnkit if pkexec is not suid anymore. Just a waste of time

naive goblet
true valve
young bramble
naive goblet
#

but capabilites are also easy to find if the person knows what they are looking for

true valve
naive goblet
#

getcap -r /

#

tada you now know all capabiliteis on the machine

young bramble
#

how many search for that ?

naive goblet
#

some few ctfs on tryhackme use caps

young bramble
#

Hackers machine on KotH has also a cap_setuid on python3.6 . This is where I got the idea of making my own password protected shell with setuid capability

violet zealot
#

who's a1mr?

#

he constantly logged me out from shell

#

im not saying hes cheating, just wondering what he did

#

i had to spam my commands again and again 🫠

#

never typed that fast on a keyboard

young bramble
#

spacejam has a dangerours initial foothold as root on port 3000. he can kill all your shells from there if you don't patch it

true valve
#

he probably went 'netstat -anp | grep ESTABLISHED' and did 'kill -9 YOURSHELLPID'

violet zealot
#

yeah i didn't patch cuz i had like 5sec shell every time

young bramble
#

when players don't know too many ways to protect king.txt, they are busy with other users's shells. This is a lack of fair-play

violet zealot
violet zealot
#

kicking my shell but didn't protect king file at all

young bramble
violet zealot
#

yup i knew what his pid session was but didn't have enough time so i gave priority on keeping king.txt than kicking his shell

young bramble
#

You won, but I guess you did learn something from this. and next time you can be more prepared. In the end, it's not that important to win, but to learn and have more tools ready

#

I did once killed one user's shells because he sent /dev/urandom on all my terminals. And the one-liner script I wrote to kill all his shells every 5 or 10 seconds was something for the moment. But If paranoya hits you, or the user is so bad and toxic, you can easily change it to kill shells ever 1 second

violet zealot
#

yeah but i don't really want to add shell kicking to my script, cuz if nobody can log to the machine what's the point of playing koth ? 🫠

young bramble
#

exactly. This is only for those players that just don't understand the rules or the fun of playing the game. Having the one-liner ready doesn't mean you should use it in every game. And BTW you need to adapt to what binaries you have available on each machine (netstat, ss,lsof, etc.)

jovial field
#

lol would just have done something like cp /usr/bin/bash /tmp/jehsjyjcikmd && /tmp/jehsjyjcikmd

jovial field
# violet zealot why?

because he propably is just spamming something like pkill sh and this won't hit me like this

#

and as soon as I have a few seconds I would try to either create persistence by pulling my persistence script or i would try to find and kill his sessions

violet zealot
#

am i not supposed to be asked a passphrase?

sharp siren
violet zealot
#

i dont think so because the guy with me don't have any access

violet zealot
#

i tried too but nothing

#

i just decided to go through another path

light relic
light relic
# violet zealot why?

AFAIK, sometimes for older SSH's you need to specify type of key encryption. Default one could be something else than ssh-rsa (like some aes or hmac). I've seen it once or twice even in tryhackme boxes

terse willow
#

Oh, wait, you did specify a key. Missed that. Ignore me lmao

terse willow
violet zealot
#

i'll try next time thx

young bramble
#

hackers machine is regenerating the ssh key and credentials every time it spawns. You cannot have initial aceces with a saved ssh key for user gcrawford because it is different. You have to login in another way, get the encrypted key /home/gcrawford/.ssh/id_rsa ... then crack the passphrase for the key (ssh2john & john+rockyou) and after that you can use ssh -i id_rsa gcrawford@hackers with the cracked passphrase

obsidian lark
violet zealot
obsidian lark
fair adder
#

Hi there. Is it in terms of hardening correct to change found weak credentials on an service? Or is this prohibited?

light relic
fair adder
#

@coral bloom How did you protect that king file xD didn't find any shell script or crontab.

light relic
young bramble
#

@north wolf GG

subtle python
violet zealot
#

i don't understand how to root carnage

#

i thought i had the privesc but nothing works

subtle python
subtle python
sharp siren
# violet zealot i don't understand how to root carnage

depends on the user you have creds for.
For exemple find have the suid bit but only the user booba can use it
vim.tiny have the Suid bit also but only yooda can abuse it.
and lastely for the user Duku can use /usr/bin/netnetkit-ftp

subtle python
fair adder
#

I was doing the po koth and was bruting the pass for po but wasn’t working. It was fine bc I used hydra instead but can someone explain why it didn’t work

blissful swallow
fair adder
#

Ooooooohhh

#

Aaaaaah

#

Okay

#

Thc u

blissful swallow
#

eeeeeeh

#

no problem

#

let me know if it goes

sharp siren
blissful swallow
sharp siren
blissful swallow
sharp siren
#

lol never seen a box have ssl in thm

#

@blissful swallow

#

@fair adderProblem with url i guess?

blissful swallow
#

and look

#

or try with the domain instead of ip

fair adder
#

okay, will try all that next time i do panda koth

fair adder
#

(i see the arch logo thro the image u sent

#

also i like ur profile pic coolguy

sharp siren
sharp siren
violet zealot
subtle python
obsidian lark
#

@violet zealot /boot/koth.sh 🀣

violet zealot
#

?

obsidian lark
#

i removed all your bs scipts

#
  • they are from another player lol
violet zealot
obsidian lark
#

then what's check and guardian lmao

violet zealot
violet zealot
#

but it's not mine

#

just let them in my script but i just curl them

obsidian lark
#

mounting and unmounting can cause it the machine to break and lag

obsidian lark
violet zealot
#

but yeah im just doing some test with my script, that's why when it broke i let u on the game

obsidian lark
#

/bin/bash ./check mk0x

violet zealot
#

i don't plan on trying too hard, just doing some crash test

#

proof of what?

obsidian lark
#

i pulled all scripts as well

violet zealot
#

oh but that's what i said

obsidian lark
#

/bin/bash ./guardian 10.8.15.228

obsidian lark
sharp siren
#

@violet zealot
chmod -x /usr/bin/curl
chmod -x /usr/bin/wget

#

against rules no?

naive goblet
#

@short tusk should be able to clearify but would think it is against the rules too

violet zealot
#

idk because many people change binaries permissions so i guess it's okey

#

before doing it too i got in a few games where i couldn't curl anything because of that

short tusk
violet zealot
#

anyway if it's against the rules i'll change my script, i don't really care

violet zealot
#

but when i see some of the remaining players (even top players) playing against the said rules and keep staying here im a lil confused

#

but yeah if u tell me to change it then np i'll change it

sharp siren
#
  • every player from time to time break rules even if intentionally or not
violet zealot
#

@sharp siren why i couldn't kill ur shell?

sharp siren
#

xD

violet zealot
#

?

north wolf
#

I just got ghost pinged, may I know why?

violet zealot
sharp siren
violet zealot
sharp siren
#

he was referring to your script xD

violet zealot
#

oh okey

#

but idk why NotLikeThis

#

let my meow meow alone

violet zealot
#

how to break someone symlink on king file?

#

do we have to find the linked file or do we have another method?

sharp siren
#

unlink <path-to-symlink>

violet zealot
#

okey so i still have to find the symlink path

#

it could be any file NotLikeThis

north wolf
#

πŸ€”

echo -e "meow\nmeow" | passwd root
#

irony is that I found it here, a game without mk0

violet zealot
naive goblet
naive goblet
true valve
#

gg

steep agate
#

hehe

broken pilot
broken pilot
fair adder
#

anyone wanna join in

broken pilot
fair adder
#

please use vc though

#

?

broken pilot
true valve
#

who's killing my shells?

true valve
#

good game @sharp siren

sharp siren
strange hornet
#

Do You Passively Farm Points If You Join Late or What's Happening With Scoring System? (Given That Noone Has Flag)

broken pilot
strange hornet
broken pilot
#

it can be abused .... 🀣 or dont go for ties. Usually when players are battling for king theres rarely a tie unless its intentional

#

but say no one got king or flags then last person to join wins..

violet zealot
#

and honestly i don't hide that well my script, some people here may have it and it's okey

proud moth
violet zealot
strange hornet
#

Every Flag Is Fixed For Every Challenge? I Played KoTH Food CTF As A Box And Now I Just Pwned The Flags D:

#

Also What's Up With Port 9999?

true valve
broken pilot
strange hornet
#

o7

sharp siren
violet zealot
#

anyone have an issue with symlink?

#

in previous matches i had this issue where i get an error saying the file /root/king.txt already exist

#

when i first implemented this technique to my script it was working but seems now it doesn't, even if i try it manually

violet zealot
#

it never asked me a password before...

#

what's happening ?

true valve
#

probably reduced privileges.

violet zealot
#

i did this box a couple of times now and always could use sudo on tha one

terse willow
steep agate
#

yeah

#

lol

sharp siren
#

yes?

#

I dont know any php so decided to remove it to push you to explore others ways to get a foothold

steep agate
#

lol, you delete all web pages on the machine, just because "you dont know what is php"?

sharp siren
#

No I dont know how to patch it

steep agate
#

anyway, this is against rules in public games

sharp siren
#

is it against rules? dont seem to find any thin

steep agate
sharp siren
#

in rules

steep agate
#

wtf

#

If you don't know how to fix a path to root, will you remove all users or everything on the machine?

sharp siren
#

no

#

the service is still up.

#

didn't stop the service

#

idk what I did against rules.
If i did somethign wrong sorry

steep agate
sharp siren
#

I apologize

sharp siren
steep agate
steep agate
sharp siren
#

is it against rules to delete web pages?

sharp siren
sour vectorBOT
#

Gave +1 Rep to @steep agate (current: #148 - 47)

steep agate
sharp siren
#

I see i see

violet zealot
#

@sharp siren if u don't know anything about php it's okey, u can find patched versions on wu

sharp siren
terse willow
#

So either someone broke in before you, patched it, and hid their session, or someone opened up an extra vuln the last time you had the machine.

#

I would say the first option is significantly more likely, but...

sharp siren
#

is this against rules since changing Permissions on flags in against rules?
machine:Panda

true valve
#

yes.

violet zealot
#

wtf is happening, i get disconnected every time i do this command

#

and it happens everytime on this machine

violet zealot
#

and the food machine is broken, it's been like 15mins im waiting

young bramble
violet zealot
violet zealot
#

this is definitely broken...

broken pilot
violet zealot
#

yup

#

but for a few days i keep getting this error

broken pilot
#

I think root would need to run that systemctl to actually have proper suid bit set on /tmp/bash... Not πŸ’― sure tho since you are making a copy of bash. Have you tried running the systemctl command already? Did it add suid bit to /tmp/bash?

#

If so try /tmp/bash -p

violet zealot
#

how am i supposed to run it?

broken pilot
#

./systemctl

violet zealot
#

because i never had this error before, i just had to change the path and get root

keen remnant
violet zealot
violet zealot
broken pilot
#

Then do ls -la /tmp/bash what are the permissions

violet zealot
broken pilot
#

So then root needs to run this first ... Check cronjobs

violet zealot
#

because i can't get it with root since the path command doesn't work

broken pilot
#

By changing the path I'm not sure if you would be able to start any other services using that systemctl .... I see what you are trying to do tho... But you will also need to make sure root is going to be starting or stopping services..

violet zealot
broken pilot
#

What about if you run find / -perm -4000 2>/dev/null are there any other easy wins since someone else is already root

violet zealot
#

what is this sorcery

broken pilot
#

Or even getcap -r / to check capabilities

violet zealot
steep agate
#

not bash -p

#

or ./bash -p

violet zealot
#

already did that

violet zealot
#

that's why

#

but see

steep agate
broken pilot
#

Yea but you are calling /bin/bash still

steep agate
steep agate
#

πŸ€·β€β™‚οΈ

violet zealot
#

naaaaa 🫠

steep agate
#

I've played against players who did loops to remove the king, lol

violet zealot
#

i can't connect to my session

#

i get kicked out

#

bruh ok...

#

never thought about that

steep agate
# violet zealot bruh ok...

bruh, killing sessions or removing all binaries when you can't king is the skiddie thing I've ever seen in koth NotLikeThis

violet zealot
#

i guess someone wants to be alone on the machine 🫠

steep agate
#

@violet zealot soon I'm going to release something I made

severe hazel
steep agate
violet zealot
#

join or spectate?

steep agate
#

join

violet zealot
steep agate
#

i will watch this πŸ‘€

#

10.8.11.186:6666

violet zealot
steep agate
#

who is this ip?

#

killing all sessions

steep agate
fossil pecan
hoary mulch
#

Man. I got ssh into fortune but I couldn’t exploit the pico SUID for some reason.

violet zealot
hoary mulch
#

Yeah was still set. Nah don’t think anyone got in yet

violet zealot
#

hmmm

#

can u try pwnkit?

hoary mulch
#

I could... can you get that machine when its not KoTH

hoary mulch
#

yeah i got Fortuna's password

hoary mulch
#

yeah ok, never played with the rootpass before.. how does that one work?
Yeah did try sudo Pico but it didnt work

hoary mulch
#

Is there any way to speed up the hydra scan? (KoTH Hackers) taking a very long time aha ||hydra -l gcrawford -P /usr/share/wordlists/rockyou.txt 10.10.228.111 ftp||

fading moat
#

Anyone up for a private room

violet zealot
fading moat
#

Alr I'll make one and send u the link

fading moat
#

Koth is so good

#

I'll start playing it more

fading moat
#

@severe hazel bruh I'm trying to get rce and connection times out

#

Lmfao I had 2 ways to get rce and it can't reach back

#

Idk why

fading moat
#

Doesn't it work on 8000

#

In the admin panel

#

It runs code it just can't reach my machine

severe hazel
#

idk, use 8002

fading moat
#

Is it same interface?

#

I'm rebooting my machine rn

#

8000 has a cms login panel

severe hazel
fading moat
#

Ah

severe hazel
#

and load reverse shell php

fading moat
#

Now my VPN tweaking

#

Hahaah

#

Worlds against me

#

Oh it's my internet connection

#

It times out

#

Fuck bruh

#

I was so hyped

fading moat
rain junco
#

hello, today I'm playing Koth, after successfully becoming king (for the first time), another player first removed me then I joined again and I got a message from him on my ssh command line saying "You again, bye" and removed again, then changed the password for ssh... Anybody know how he did this??

steep agate
#

Here are some techniques that I put together for koth, this will help you a lot against players who already play or have played koth before

sour vectorBOT
#

Gave +1 Rep to @steep agate (current: #139 - 49)

rain junco
#

one more thing, if someone continuously removes you and also changes ssh password how do you get root back..?

steep agate
#

you can create your own script to create your persistence/backdoor on the machine

rain junco
#

is netcat reverse shell with crontab is also some type of backdoor

#

?

steep agate
rain junco
#

oh ok thanks again...

steep agate
broken pilot
sour vectorBOT
#

Gave +1 Rep to @broken pilot (current: #114 - 56)

fading moat
sour vectorBOT
#

Can't give that much (max 1)

fading moat
#

Woops

sour vectorBOT
#

Gave 1 Rep to trapnatized (current: #112 - 57)

fading moat
#

@fossil pecan @bitter tree good job guys

fossil pecan
fading moat
#

Thanks! You too :D

#

Visit port i0

#

80

fading moat
#

Did you send the messages with wall

bitter tree
#

Thank god, now I can type

#

GG @fading moat

fading moat
#

Thanks :) well played

#

How did you send these messages, I wanna knoe

#

OH

#

lemme gueds

#

Dev/tty

broken pilot
#

If you were on a pts could be with wall 'message' or could be echo 'message' > /dev/pts/#

fading moat
#

Ahh I see

#

πŸ”₯πŸ”₯

#

Lit

fossil pecan
#
  • figlet for big font πŸ˜„
fading moat
#

This was my first koth win, can yall tell me if this strategy is good: after getting root, create a user and chown the flag to the user

#

Tried to do it but there was no point plus my python pty was tweaking

fossil pecan
fading moat
#

Oh

#

Alright

fossil pecan
#

but king.txt can be edited as you want

fading moat
#

I see

#

I saw @steep agate talking about catching write syscalls with kernel modules. Super interesting

#

Also, can we stop services?

#

Except the 9999

fossil pecan
#

no

broken pilot
#

Depends on which services ....

fading moat
#

Ex. Apache2

fossil pecan
#

main rule is "machine continues as designed" ... so except for patching vulns, or removing other players shells/scripts - keep everything as is and functional (allowed to remove chattr binary only)

broken pilot
#

If I create a new service for persistence, I think that would be fair game.. but services like apache2 I don't think you should stop em... Just get good at taking king and can leave the box wide open for everyone 😜

fading moat
#

Ah okay

fossil pecan
# broken pilot Depends on which services ....

if another player adds a service for themselves as rev/web shell or something then you can (as patching them out) ... but anything "built into" the box should be kept alive (can be restarted if needed)

fading moat
#

I'm sorry it was like my first game which I managed to get root

steep agate
#

hehe

#

this is super interesting

fading moat
#

The room was space jam, so I don't think apache mattered too much

#

There could've been some xss in the contact form though

#

Do there's that

broken pilot
steep agate
fading moat
#

Yep most definitely broke the last one

violet zealot
fading moat
#

I'm sorry yall wont happen again

broken pilot
violet zealot
fading moat
steep agate
violet zealot
#

some people here knows the rules but.... πŸ‘€

fading moat
#

I just fd the game up 🀣

broken pilot
#

It's a part of learning

steep agate
#

I personally stopped playing koth lol, if anyone has any questions about protecting king, or anything like that in koth, my dm will be free

violet zealot
#

any idea?

fading moat
steep agate
broken pilot
#

Some players play dirty and rm -rf / when they can't take king.... But can always plan for that and still keep the game alive

violet zealot
fading moat
#

What kind of kamikaze tactic is thst lmfso

violet zealot
#

i just edited the one on ur github

broken pilot
steep agate
#

What I mean is that there is a way to create an LKM that can prevent any symbolic links in the king.txt file for example

fading moat
#

Defending koth, mb

broken pilot
violet zealot
broken pilot
fading moat
#

Mhm interesting

steep agate
fading moat
#

Yeah

violet zealot
fading moat
#

Theres an option to disable LKMs though isn't it

#

I dont remember the command

violet zealot
#

im learning kernel and tbh it's less difficult than i thought

#

doing some secmalloc in school too

steep agate
fading moat
#

Any resources? I wanna stsrt learning too

violet zealot
steep agate
broken pilot
fading moat
#

Catching syscalls sounds fascinating and I don't have any idea on how thsts done

#

But I wanna learn

steep agate
# fading moat I dont remember the command

sudo sysctl -w kernel.modules_disabled=1 , but that doesn't do much good, I'll give you an example, if someone loads any LKM or Rootkit before you run this command it won't work

violet zealot
#

but now im trying to understand the issue with my symlink, maybe @broken pilot could tell me more in dm? πŸ‘€

fading moat
#

Yup

#

??

#

Ah

fading moat
#

Also noob linux question, can you "log out a session" if you kill their shell process

#

I tried it in the box idk if it work

fading moat
#

@fossil pecan verify

violet zealot
fading moat
#

🀣

fading moat
steep agate
fading moat
steep agate
fading moat
#

πŸ˜‚πŸ€©

#

I mean I figured it should work but I haven't appreciated how straightforward linux is if you understand it

violet zealot
#

u are gonna be alone on the machine, so not much interest

broken pilot
fading moat
#

Yeah I'm just asking if it would work

#

That's super unfair and I can't learn anything if I use it

broken pilot
violet zealot
#

but yeah in fact u can write a script that kill all sessions every 5 sec

fading moat
#

Yup

#

Whats usually your approach for defending king, like your goto

#

Besides patching vulns, I mean the file itself

broken pilot
#

Me?

fading moat
#

(Yes matheuz I've read your repo)

violet zealot
#

playing with chattr and other perms

fading moat
#

I mean all of u guys I'm here to learn so

fading moat
broken pilot
#

🀣

steep agate
#

with symlink, rename, read, etc

broken pilot
# fading moat Whats usually your approach for defending king, like your goto

Normally I won't patch anything,,, I will make the box more vulnerable cuz I like the challenge of fighting for king .. my techniques are usually based on the opponents skill... So I might start off with chattr. If u unlock I'll move to next tactic... If you are writing rootkits to take king, I'm looking for flaws or things you didn't expect

broken pilot
fading moat
#

I first need to understand linux better

#

I have a beginner to intermediate understanding

steep agate
#

or view all proc dir

#

ls -la /proc/*/cwd

fading moat
#

Why 1337

steep agate
#

I already got several scripts from @broken pilot like this haha

fading moat
#

πŸ˜‚

#

I'll be sliding into his dms

steep agate
broken pilot
#

Lol least you didn't do it like someone else .... @steep agate

fading moat
#

ah cool haxor

fading moat
#

My brain bugged

steep agate
#

btw, when you upload a file to the machine, don't leave your files in any folder haha, delete them immediately

fading moat
#

I'll keep that in mind

steep agate
fading moat
#

Yeah

#

How to patch the rce in space jam?

#

Didn't find anything useful online

steep agate
fading moat
#

Alright when I stumble upon spacejam again I'll try

#

I couldn't find where the source was located tho

#

Do I check/proc/pid?

broken pilot
steep agate
fading moat
#

Alr

fading moat
#

I'll invite yall to a koth game some day

#

Learn from the jedis

broken pilot
#

Need to update my scripts anyways... Going to make em interactive so I can change stuff up on the fly

#

I wrote those when I first started koth 🀣

#

Kinda like the last script you got from me πŸ˜‰

steep agate
violet zealot
violet zealot
#

@steep agate i saw u

broken pilot
#

If you ever want to practice dm me I'll jump in a private game and teach a few things I've learned

violet zealot
#

this time when lockbit was giving 5k$ to anyone getting a tattoo of their logo

steep agate
violet zealot
#

and the leader once offered a big amount to anyone who can find his name

steep agate
#

yeah

violet zealot
#

not even 5k

broken pilot
#

Playing koth has helped me learn a lot of new things.. I just jumped in not knowing much and lost alot, but I didn't quit so I just kept coming back until I could win, then just started working on sneaky techniques and improving my persistence..

violet zealot
#

tbh playing koth is really helping me in understanding linux, because u are up to use some commands that u dont need to use every day

broken pilot
#

Do you have a subscription to THM? If so you can create a private game to any machine you want to practice on and I can see what you know for protecting king and go from there

#

Yea I sent u a dm

steep agate
#

other tool with help you a lot of is snoopy

#

command logger

broken pilot
#

Oooo I saw u were watching a game with f11 🀣

violet zealot
steep agate
broken pilot
violet zealot
#

i'll try it thx

steep agate
#

There are a lot of cool tricks that you can use in Koth

violet zealot
#

yeah that's why im taking my time to learn all that

#

i was just recently focusing on my certifications

steep agate
fading moat
#

@timid rapids check the webpage

#

On port 8639

#

I added a root ssh key 😭😭

north wolf
#

I found this useful

$ file /proc/*/cwd
steep agate
north wolf
steep agate
north wolf
#

I lost my last match but it was fun, because it was!

#

am I the only one who actually likes being defeated on koth? πŸ˜…

steep agate
north wolf
whole plaza
#

staff? i have a question. I'm playing a room called hogwarts, in king of the hill. There are only 2 ports, 22 and 9999. 22 port is open, but when i try to connect it says "connection closed by server"

near lily
charred hare
#

It's possible somebody has messed with the service

near lily
#

Nah, I think I know what the issue is.

I just need confirmation.

steep agate
near lily
whole plaza
#

second

near lily
whole plaza
#

ssh ip

near lily
#

Is it an SSH service

whole plaza
#

yes, 22

whole plaza
steep agate
whole plaza
near lily
steep agate
near lily
#

What does nmap say?

radiant sun
sour vectorBOT
#

Gave +1 Rep to @near lily (current: #1 - 2243)

near lily
steep agate
radiant sun
whole plaza
steep agate
near lily
whole plaza
#

ssh

near lily
#

Let's see a screenshot, lol

steep agate
#

btw, on hogwarts machine, you cannot join in ssh on 22 port

radiant sun
#

yuh

whole plaza
#

there are only 2 ports

#

22 and 9999

steep agate
# whole plaza how then

As I said, try using nmap with more threads and on all ports, or use rustscan (which is much faster than nmap, and helps on the Hogwarts machine)

whole plaza
near lily
#

Well what do you know, lol.

radiant sun
#

nmap -p- -T4 hogwarts.thm

whole plaza
#

hogwarts.thm ?

radiant sun
#

just put ip instead of that

whole plaza
steep agate
radiant sun
#

it'll scan ports ranging from 0 - 65535

radiant sun
#

i think refas is new to this

whole plaza
#

i am

near lily
#

They are.

whole plaza
#

they?

steep agate
#

what?

whole plaza
radiant sun
#

its alr, rustscan is must faster than nmap and good for ctf purposes

whole plaza
#

ok

steep agate
# whole plaza nwm

I'm trying to help you, if you don't want help I can't do anything πŸ€·β€β™‚οΈ

radiant sun
#

that's all matheuz tryna tell u refas

steep agate
whole plaza
#

what's the difference between nmap and rustscan?

steep agate
#

If the player chooses to use nmap at Hogwarts, it will take a long time, and he will lose the advantage

steep agate
steep agate
fair adder
#

waoh waoh

#

what we got in here?!!

steep agate
whole plaza
steep agate
radiant sun
fair adder
steep agate
whole plaza
sour vectorBOT
#

Gave +1 Rep to @radiant sun (current: #390 - 12)

fair adder
steep agate
fair adder
whole plaza
fair adder
fair adder
steep agate
#

oh yeah, I saw this project on github, but I never got to test it

fair adder
#

study kek

north wolf
#

gg @broken pilot

broken pilot
crystal flame
#

anyone have any tips on learning how to solve King of the Hill challenges on THM?

steep agate
#

I have repo about KoTH with tricks for defense king and patch machine

#

this might be useful for you

crystal flame
#

appreciate it πŸ‘

cold bronze
#

Anyone wanna do some Koth while calling?

obsidian lark
#

im down

north wolf
broken pilot
sharp siren
cold bronze
broken pilot
#

8 mins ^^ public game

cold bronze
#

present

sharp siren
sharp siren
#

join link

broken pilot
#

scroll up a few messages

sharp siren
#

ty ❀️

north wolf
#

nobody is using LKM rootkit in this game lol, and someone just tried disabling LKM rootkit lolz

north wolf
broken pilot
#

GG

north wolf
#

GG!! guys!

#

dedicated for Indian #koth players πŸ˜‚

sharp siren
#

man the while loops are battling.
Last machine crashed cz of it

north wolf
broken pilot
north wolf
broken pilot
#

yea it was easy to break his loop just remove /tmp/.c/chatr

north wolf
#

why use busybox's chattr while you can chattr via your custom bin? big_think

sharp siren
broken pilot
keen remnant
broken pilot
#

i usually save those tho..

#

pspy64

keen remnant
sour vectorBOT
#

Gave +1 Rep to @broken pilot (current: #109 - 59)

north wolf
broken pilot
#

i kept killing every bodies pspy64... there was a few ppl watching processes

north wolf
#

I was busy watching ya'll πŸ˜†

broken pilot
#

did you get the nyancat at the end lol

north wolf
#

nope, most probably its this; I didn't have a pty/pts idk tf's that

#

lmao its still running like anything πŸ˜†

broken pilot
#

lol yea i wasnt on pts so probably came through funny.... i have a game also but i need to figure out a way to let the ppl i send it too control the movements....

#

or make them trigger it themselves...

jovial field
#

actually this isn't too hard I think

#

or you just go and inject your game as a shellcode into a running process

#

this is a bit trickier

#
#

I would recommend trying to use ptrace

steep agate
#

injected init process

jovial field
#

I used that for a while to hide my main process

steep agate
jovial field
#

wtf powershell on linux?

#

did you just change the process name or is this an actual thing