Academy Skills Assessment - LFI help

@Wiiz4Rd said:

Why is there such an uninformative discussion here? It all comes down to “I’ve solved it” or " look carefully."

Largely because everything else gets flagged as spoiler and deleted.

I look carefully for the second day, tried everything I could from the training section and did not get any result. What should I pay attention to?

When you make a request to create a new user account, look at everything that is sent. Dont just click submit and let it happen. Intercept and inspect it. When you’ve done this and think you understand all the things sent, one will be an obvious candidate to be tampered.

Tamper with it and see what happens to the account you create.

Its important to note, it only works on a new account creation, once the account exists, you’ve missed your chance.

TazWake, thank you for paying attention to my efforts.

@TazWake said:

Tamper with it and see what happens to the account you create.

Its important to note, it only works on a new account creation, once the account exists, you’ve missed your chance.

I can’t find the account creation form on the site under investigation.
The source code of the main page showed me 3 possible arguments for index.php. Attempts to use different arguments for ‘index.php?page=’ failed.

ffuf does not let you know what other directories or pages there are.

js/main.js didn’t say anything either. Deobfuscation of other scripts, too.

The form for sending messages from the contacts section didn’t help.

The only result I could get was a message about incorrect input when I used the page= arguments of the form in all sorts of ways …//

Which direction should I go next? Maybe I’m not using some application or script that isn’t mentioned in the tutorial section?

1 Like

@Wiiz4Rd said:

Which direction should I go next? Maybe I’m not using some application or script that isn’t mentioned in the tutorial section?

I have a massive apology here. I am an a$$hole and got confused what this was about.

I am so sorry for leading you astray. I thought it was for Academy.htb not one of the sections on the Academy. I misread the entire thread.

I will look to see if I can find a way to be more helpful now.

Annoyingly, its the second time Ive done this mistake… This time round I changed the thread title to try and stop myself doing it a third time.

Questions for this part of the Academy are spread across a few threads, is this any help:

It still doesn’t work. I understand that the server is nginx and not Apache, I fix the file paths, but I can’t get anything. Neither using the User-Agent, nor any wrappers.

What else do I need to know besides what the academy has given me in this section?

In theory, nothing. It should all be in the section on Academy.

DOne!!!

Greetings, today I have started this test and I am stagnant; I have tried all the techniques that were developed in the module including those of wrapper and obfuscation of html code but apparently this has mechanisms that do not allow it.

What I see is that they indicate to focus first on the index file but here I have a doubt they refer to the index of the main page which is a php extension and I download it with wget but when checking only in the final part, js files appear. Can someone give me any clues that I can follow.

@thenevvin said:
Hello everyone,
I have been staring at the screen for days trying to figure this out. I have have successfully located the admin panel. But I cant figure out how to get to root. Someone help me please my brain is hurting.

Update: just finished. that was lit!

hmmm I’m also now at the admin panel and I think I have tried all the rce methods listed in the tutorial but nothing seems to be working?

I couldn’t find cookies for the webpage so that rules out the session files method, and I have tried the expect wrapper, data wrapper, rfi with python http server, and none of which seems to work.

I’m completely new to penetration testing. Could someone gimme a hint or sth? I’m stuck at getting rce for the last stage.

#btw basic LFI seems to work in the admin panel, but I believe it’s of no use?

Type your comment> @dragonwarrior said:

@thenevvin said:
Hello everyone,
I have been staring at the screen for days trying to figure this out. I have have successfully located the admin panel. But I cant figure out how to get to root. Someone help me please my brain is hurting.

Update: just finished. that was lit!

hmmm I’m also now at the admin panel and I think I have tried all the rce methods listed in the tutorial but nothing seems to be working?

I couldn’t find cookies for the webpage so that rules out the session files method, and I have tried the expect wrapper, data wrapper, rfi with python http server, and none of which seems to work.

I’m completely new to penetration testing. Could someone gimme a hint or sth? I’m stuck at getting rce for the last stage.

#btw basic LFI seems to work in the admin panel, but I believe it’s of no use?

Admin panel is needed to complete the lab. Read the “LFI to RCE” part entirely, there is a specific section that will help you get RCE.

PD: Apache is not the only software for server applications.

@surfinerd said:
Type your comment> @dragonwarrior said:

@thenevvin said:
Hello everyone,
I have been staring at the screen for days trying to figure this out. I have have successfully located the admin panel. But I cant figure out how to get to root. Someone help me please my brain is hurting.

Update: just finished. that was lit!

hmmm I’m also now at the admin panel and I think I have tried all the rce methods listed in the tutorial but nothing seems to be working?

I couldn’t find cookies for the webpage so that rules out the session files method, and I have tried the expect wrapper, data wrapper, rfi with python http server, and none of which seems to work.

I’m completely new to penetration testing. Could someone gimme a hint or sth? I’m stuck at getting rce for the last stage.

#btw basic LFI seems to work in the admin panel, but I believe it’s of no use?

Admin panel is needed to complete the lab. Read the “LFI to RCE” part entirely, there is a specific section that will help you get RCE.

PD: Apache is not the only software for server applications.

Thxxx I see what u mean by the last sentence. I should’ve read the title twice.

Finally solved this task.

Step to complete this task

Read source code

Take the new LFI to a RCE

Read the “flag”

If you need any herlp ypu can pm me.

Skills Assessment - File Inclusion/Directory Traversal
Assess the web application and use a variety of techniques to gain remote code execution and find a flag in the / root directory of the file system. Submit the contents of the flag as your answer.

guy I m stuck on this anyone helps me plz

@lordangelus
Hello!

I wanted to ask some questions concerning this assessment if its alright with you;

  1. When you say: “read the source code”, is this simply by right-clicking on the webpage and selecting “view source” (or using cURL on the url) ?

  2. And then after obtaining the source code, I wanted to confirm, I should then be finding a hint which suggests where the LFI is?

  3. Finally, there is speak of an admin panel somewhere - I have attempted to use dirsearch, but this did not show any “admin.php” panel hiding anywhere… Any suggestions here?

Thank you :slight_smile:

Type your comment> @corelee said:

@lordangelus
Hello!

I wanted to ask some questions concerning this assessment if its alright with you;

  1. When you say: “read the source code”, is this simply by right-clicking on the webpage and selecting “view source” (or using cURL on the url) ?

  2. And then after obtaining the source code, I wanted to confirm, I should then be finding a hint which suggests where the LFI is?

  3. Finally, there is speak of an admin panel somewhere - I have attempted to use dirsearch, but this did not show any “admin.php” panel hiding anywhere… Any suggestions here?

Thank you :slight_smile:

Reading the source code is reading the index.php file. If you simply right click and select source code, it will only show you the html code. Check out the php wrappers section to figure that out. Once you find the clue, you can read the source code of the next level and find out that there is a vulnerability there that wasn’t in the home page. Check out the LFI to RCE section.

1 Like

Thanks! Im now attempting the wrappers; but without success.

I shall keep attempting ^.^

Solved!

I got the LFI and then the RCE . Where should I look for the flag of the question “Use a vulnerable plugin to download a file containing a flag value via an unauthenticated file download.”?

Can someone give me a tip, I’ve got RCE and I’ve found the name of the flag file in the root directory but I’m struggling to read the contents of the file. I’ve tried using printf and echo but both don’t output anything