Obscurity

12122232426

Comments

  • edited April 2020

    I started local server with SSS.py, but I do not get any response. I use urllib when sending payload and all I get is
    requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine('No status line received - the server has closed the connection',))
    even for simple request of index.html
    I know that server script runs, because I can print what happens during request handling, I just do not get any response. I think I copied folder structure correctly, so at least I should get 400 or 404 page. Anyone care to nudge me in right direction?

    Nevermind, problem was with my Python version and urllib.parse.unqoute.

    sparrow1

  • Rooted. First time for me doing any RCE and foothold was absolutely brutal. Thanks @Zaitchev for all the help, or I wouldn't have figured it out. User was easier and root came pretty quickly. I need to work on my python and study up in SQL injection.

  • Can't figure out how to reverse the crypt process. I have the pieces running through my head but don't know how to modify/trick the script into giving me what I need.

    Any nudge is greatly appreciated.

  • Finally rooted after three days. God damn, that RCE was brutal. But hey, at least I discovered VSCode has very nice debugger with Python support :wink:
    This machine taught me that no amount of obscure code could hide vulnerabilities. I did not understand fully any of the scripts, but pieces were enough to own it bit by bit. I'm mostly happy that I learned some Python and it's actually possible to use it with good result even for complete noob like me.

    sparrow1

  • Rooted

    Feel free to pm for some tips!

  • Hi guys. I found the python script but I can't get reverse shell. I tried with burp decoder but nothing. Can someone suggest me a guide to "build" the payload or something similar?

  • Rooted!
    [email protected]:~# id
    uid=0(root) gid=0(root) groups=0(root)

    Thanks to EvilT0r13 for nudges.
    Few Hints for those who are stuck.. Feel free to mark spoiler if it is!
    Foothold : You know the file, but don't know the parent dir.. FUZZ accordingly.
    User : No need of any custom scripts. Use common sense with encryption<->key<->decryption. You have everything you need.
    Root: There are 2 ways to get root. Understand the script. Look what it does and where it does and how can you catch it! Once you catch it, you know what to do with it.

    Nice box, but totally CTF like. Thanks to clubby789.

    Feel free to PM if need assistance.

  • edited April 2020

    huhuhu it takes me 2 weeks to freaking root this box.... :(
    okay here's some hint!
    foothold: just enumerate what you see!!
    note: look through it and google everything! if you are just a noob like me!
    user: enumerate and follow the order of the program that you find!
    note: dont forget to add "$()" and then cat it!
    root: look at the code!
    note: seriously look at the code and google everything that you see!!

  • Rooted!, great box loved the custom stuff!!

    The initial foothold was satisfying to get by testing everything and developing a working exploit!
    A tip for user would be using "secret" to give the important argument.
    for root id say, understand the permissions you have on the location being used to perform the weird operation and how you can manipulate it.
    Good Luck! PM for nudges

  • Just rooted this, my favorite so far. Learnt alot, give me a message if you need a hint.

  • Type your comment> @brueh said:

    • you know the child!
    • you want to fuzz the parent-directory!!!....
      what should the command look like?....
      ... /FUZZ/child....

    <3

  • Rooted! Very nice box. the foothold and the not working Gobuster took me some time, but with a response injection i could fix it. The RCE was a nice experience. Decryption was also funny and a nice idea. the root part was the easiest one.

    if anyone need a hint, just let me know.

  • Struggling with finding the right syntax for foothold, any help will be appreciated :)

  • Struggling with the sss.py right after finding the secret directory. I am aware of whats vuln in the script but cant seem to get it going. Can someone dm me to talk about how to get it running properly / character escaping? Thanks.

  • Finally Rooted.!!

    It's a very good box, Basic scripting and code auditing are required and all the hints are there in the above discussions.

    Feel Free to PM anytime!

    Hack The Box

  • Owned! Nice box to practice some scripting.
    PM for help if needed

  • edited April 2020

    so i am getting following while trying get reverse shell, using python script that has url+path , where url=host:proxyport(8x8x), path is payload to get reverseshell

    just going by what i read it seems obscurity box is reseting it, has any of you seen this?
    error:
    requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

    Edit:- never mind guys ran the s*.py locally to test my path, it worked and then tested it via browser, it worked again, got reverseshell, let us see what happens next

  • Finally rooted

    Most of the hints on this forum will eventually get you this box.

    feedback
    Good points
    custom webserver script for foothold was a creative idea, i loved that part. Learned few things on python side.
    usage of certain code for root was also a creative idea, but in the end it was easier then user.

    Not so good part
    Usage of encryption/Decryption could have been better. in Nest vbscode has done some good work in creating that story even that was CTFy but here guess work on permutations and combination to get the key for me was not great experience , made waste a lot of time. in Nest you need to get all the parameters (passphrase, salt etc)right/change for root to decrypt its creds . i loved that part on encryption.

    Anyways Mr. creator Good work in putting all this together , Had fun eventually.

  • edited May 2020

    Rooted. For me rooting was extremely easy... and I think I rooted it using an "alternative" way.

    I believe that the original idea for root was to "watch" for a file and "change" it. How ever I found a much easier way that requires absolutely no effort.

    Anybody interested in discussing it?


    image
                         HTB Profile


  • Been wondering what the 2nd way to root the box is? I rooted it by catching some quick file. Can someone pm me the alternative way?

  • Hi. I found sss.py file. I read code and i understand RCE. But idk how can i use sss.py. Can you help me?

  • edited May 2020

    Type your comment> @piyadist said:

    Hi. I found sss.py file. I read code and i understand RCE. But idk how can i use sss.py. Can you help me?

    Read the code carefully and see which function/method used that can be exploited. It's similar to the way you would with SQLi.
    Try to run that code on your own system to practice RCE is also a good idea because you can see the result of your progress.

  • Hi there, i have been through the first phase of finding the .py file also i am able to figure out the code and point of entry to get a reverse shell. So here is a thing i passed the reverse shell in py over to the "function" and run this on burp suite while waiting for the bash. But i do not get any response blank on the response on burp suite. I am stuck basically. Can anyone help in getting the initial foothold. Also i have seen here on the forum most of the people say simulate it locally. I tried running the code it run successfully and existed. Also please guide me here seems like i needed a nudge .

  • edited May 2020

    So this code's purpose is to run that service you are trying to exploit. You need to write some extra code to make it actually do it job. Think of that downloaded code as a module instead of an executable script.
    If you do it properly, your system will be serving the exact same service that the box is running. Then you can practice you RCE with the visibility. If a payload can get a shell from your own system, it can give you a shell on the target's.

  • Did someone change the key for the SSC because I reverse the algorithm but the a***** key I get does not seem to work.

  • I have SSS.py and i think that there is a RCE in the exec(). Do you have any tips to exploit it ?

  • Type your comment> @avonsec said:

    Type your comment> @piyadist said:

    Hi. I found sss.py file. I read code and i understand RCE. But idk how can i use sss.py. Can you help me?

    Read the code carefully and see which function/method used that can be exploited. It's similar to the way you would with SQLi.
    Try to run that code on your own system to practice RCE is also a good idea because you can see the result of your progress.

    Thnx. I found trick. But i used nc and m***sp**** for reverse shell, not worked. which payload can i use?

  • @Isaac8 said:
    Did someone change the key for the SSC because I reverse the algorithm but the a***** key I get does not seem to work.

    It might be the case, but you can always reset the box.

    @scolethal said:
    I have SSS.py and i think that there is a RCE in the exec(). Do you have any tips to exploit it ?

    I recommend running the SSS code locally to test> @piyadist said:

    Type your comment> @avonsec said:

    Type your comment> @piyadist said:

    Hi. I found sss.py file. I read code and i understand RCE. But idk how can i use sss.py. Can you help me?

    Read the code carefully and see which function/method used that can be exploited. It's similar to the way you would with SQLi.
    Try to run that code on your own system to practice RCE is also a good idea because you can see the result of your progress.

    Thnx. I found trick. But i used nc and m***sp**** for reverse shell, not worked. which payload can i use?

    Make sure you can RCE before think of getting shell, and again the easiest way to see whether you can RCE is to see it run locally.

  • Type your comment> @avonsec said:

    @Isaac8 said:
    Did someone change the key for the SSC because I reverse the algorithm but the a***** key I get does not seem to work.

    It might be the case, but you can always reset the box.

    @scolethal said:
    I have SSS.py and i think that there is a RCE in the exec(). Do you have any tips to exploit it ?

    I recommend running the SSS code locally to test> @piyadist said:

    Type your comment> @avonsec said:

    Type your comment> @piyadist said:

    Hi. I found sss.py file. I read code and i understand RCE. But idk how can i use sss.py. Can you help me?

    Read the code carefully and see which function/method used that can be exploited. It's similar to the way you would with SQLi.
    Try to run that code on your own system to practice RCE is also a good idea because you can see the result of your progress.

    Thnx. I found trick. But i used nc and m***sp**** for reverse shell, not worked. which payload can i use?

    Make sure you can RCE before think of getting shell, and again the easiest way to see whether you can RCE is to see it run locally.

    Thnx. I was embarrassed. it was very easy. i did :)

  • edited May 2020

    Rooted.

    Thnx @avonsec and @mty0x . It seemed difficult initially because I did not know the python language very well. However, I realized later that it was very easy.

    User: Read sss.py and find vulnerability. Then find and read the other files. Understand the logic. if 5+key=10, 10-5=key

    Root: Very easy. You will use a known technique. Read the relevant file and understand how it works.

    PM me for hint

Sign In to comment.