-1

While penetration testing for a university assignment, I found an exploit that might be the one the teacher has been hinting for, found here:

https://www.exploit-db.com/exploits/45439/

I used it and got access to the etc/passwd file (which doesn't tell me anything that I do not already know). As well as some other files that do not give any info.

I have tried to access the files that contain important info like the files in folders var/log, etc/shadow, proc/self, etc.

all I get is either permission denied or a 404...

Should I keep looking at this exploit or just forget about it? I can't execute any code so far, not even ls -a or anything

system info:

  • ubuntu server
  • wordpress
  • directory listing enabled
  • 3 users on wordpress and i identified the ssh user
  • mysql db (doesn't show on nmap)

Any help or hint would be appreciated. thanks.

Connor J
  • 1,464
  • 8
  • 11
MonaH
  • 1

2 Answers2

0

Could you run the affected site with wpscan to find vulnerabilities? You can enumerate a lot of things such as users, themes, plugins, timthumbs, and more. It will also scan for vulnerbilites on the site and say what the vulnerability can do. Scan the site with wpscan to make sure there is actual vulns on the site.

zucc0nit
  • 203
  • 1
  • 10
0

The vulnerability that you have identified is known as LFI, or Local File Inclusion, and allows an attacker to read files from the server through a browser.

You do not need to use an pre-made exploit to leverage this vulnerability. In your browser navigate to the site and simply add ?file=../../../../../../../../../../../../etc/passwd to the end of the url.

Using LFI, you have found the /etc/passwd file, which allows you to see users on a system. What I personally do when this vulnerability is present is test for RFI, or remote file inclusion, which will allow for the execution of scripts.

In either case, i'd use burp to intercept the traffic, send it over to repeater and then use it there for speed. You should be able to simply change the url slightly to navigate through the directories. I'd take a look at the .ssh folder, and see if there are any keys that could be used to ssh into the box.

If you want / need more info on any of these topics leave a comment and i'll add to this answer. Best of luck with your assignment.

EDIT: if the site is running PHP, it may be possible to inject PHP into the page and start moving towards RCE (Remote Code Execution) and getting a shell. It can be accomplished with adding ?language=php://input@cmd=ls for a listing command, for example.

Connor J
  • 1,464
  • 8
  • 11
  • Yes sir i understand what you're saying, but the exploit wouldn't let me move anywhere from the etc folder. Each time i try, it just fails, i'm starting to think this isn't the clue they were talking about – MonaH Oct 24 '18 at 16:33
  • and btw, LFI isn't availible on the site without this exploit. Doing it on the url will just give me an opps! that page cant be found – MonaH Oct 24 '18 at 16:38
  • @MonaH try again, I fixed the syntax of the ../../ comment. LFI is still present on the site, even without using the exploit, just not exploiting it correctly ;) – Connor J Oct 24 '18 at 16:59