text
stringlengths 0
1.99k
|
|---|
6) For the non-custom software they're running, get a copy to look at. If it's
|
free software you can just download it. If it's proprietary you can usually
|
pirate it. If it's proprietary and obscure enough that you can't pirate it you
|
can buy it (lame) or find other sites running the same software using google,
|
find one that's easier to hack, and get a copy from them.
|
[0] http://www.cirt.net/nikto2
|
[1] http://www.morningstarsecurity.com/research/whatweb
|
[2] http://wpscan.org/
|
[3] https://code.google.com/p/cms-explorer/
|
[4] http://sourceforge.net/projects/joomscan/
|
[5] https://code.google.com/p/zaproxy/
|
For finsupport.finfisher.com the process was:
|
* Start nikto running in the background.
|
* Visit the website. See nothing but a login page. Quickly check for sqli in the
|
login form.
|
* See if WhatWeb knows anything about what software the site is running.
|
* WhatWeb doesn't recognize it, so the next question I want answered is if this
|
is a custom website by Gamma, or if there are other websites using the same
|
software.
|
* I view the page source to find a URL I can search on (index.php isn't
|
exactly unique to this software). I pick Scripts/scripts.js.php, and google:
|
allinurl:"Scripts/scripts.js.php"
|
* I find there's a handful of other sites using the same software, all coded by
|
the same small webdesign firm. It looks like each site is custom coded but
|
they share a lot of code. So I hack a couple of them to get a collection of
|
code written by the webdesign firm.
|
At this point I can see the news stories that journalists will write to drum
|
up views: "In a sophisticated, multi-step attack, hackers first compromised a
|
web design firm in order to acquire confidential data that would aid them in
|
attacking Gamma Group..."
|
But it's really quite easy, done almost on autopilot once you get the hang of
|
it. It took all of a couple minutes to:
|
* google allinurl:"Scripts/scripts.js.php" and find the other sites
|
* Notice they're all sql injectable in the first url parameter I try.
|
* Realize they're running Apache ModSecurity so I need to use sqlmap [0] with
|
the option --tamper='tamper/modsecurityversioned.py'
|
* Acquire the admin login information, login and upload a php shell [1] (the
|
check for allowable file extensions was done client side in javascript), and
|
download the website's source code.
|
[0] http://sqlmap.org/
|
[1] https://epinna.github.io/Weevely/
|
Looking through the source code they might as well have named it Damn Vulnerable
|
Web App v2 [0]. It's got sqli, LFI, file upload checks done client side in
|
javascript, and if you're unauthenticated the admin page just sends you back to
|
the login page with a Location header, but you can have your intercepting proxy
|
filter the Location header out and access it just fine.
|
[0] http://www.dvwa.co.uk/
|
Heading back over to the finsupport site, the admin /BackOffice/ page returns
|
403 Forbidden, and I'm having some issues with the LFI, so I switch to using the
|
sqli (it's nice to have a dozen options to choose from). The other sites by the
|
web designer all had an injectable print.php, so some quick requests to:
|
https://finsupport.finfisher.com/GGI/Home/print.php?id=1 and 1=1
|
https://finsupport.finfisher.com/GGI/Home/print.php?id=1 and 2=1
|
reveal that finsupport also has print.php and it is injectable. And it's
|
database admin! For MySQL this means you can read and write files. It turns out
|
the site has magicquotes enabled, so I can't use INTO OUTFILE to write files.
|
But I can use a short script that uses sqlmap --file-read to get the php source
|
for a URL, and a normal web request to get the HTML, and then finds files
|
included or required in the php source, and finds php files linked in the HTML,
|
to recursively download the source to the whole site.
|
Looking through the source, I see customers can attach a file to their support
|
tickets, and there's no check on the file extension. So I pick a username and
|
password out of the customer database, create a support request with a php shell
|
attached, and I'm in!
|
--[ 5 ]-- (fail at) Escalating
|
___________
|
< got r00t? >
|
-----------
|
\ ^__^
|
\ (oo)\_______
|
(__)\ )\/\
|
||----w |
|
|| ||
|
^^^^^^^^^^^^^^^^
|
Root over 50% of linux servers you encounter in the wild with two easy scripts,
|
Linux_Exploit_Suggester [0], and unix-privesc-check [1].
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.