'mysql'에 해당되는 글 52건

  1. 2011/09/27 MySql.Com Hacked with Blind SQL Injection by Jackh4xor
  2. 2011/08/09 MySQL Query cache 의 구조
  3. 2011/05/25 MysqlPasswordAuditor : Mysql Password Recovery & Auditing
2011/09/27 16:55

MySql.Com Hacked with Blind SQL Injection by Jackh4xor


The Mysql website offers database software, services and support for your business, including the Enterprise server, the Network monitoring and advisory services and the production support. The wide range of products include: Mysql clusters, embedded database, drivers for JDBC, ODBC and Net, visual database tools (query browser, migration toolkit) and last but not least the MaxDB- the open source database certified for SAP/R3. The Mysql services are also made available for you. Choose among the Mysql training for database solutions, Mysql certification for the Developers and DBAs, Mysql consulting and support. It makes no difference if you are new in the database technology or a skilled developer of DBA, Mysql proposes services of all sorts for their customers.


Vulnerable Target http://mysql.com/customers/view/index.html?id=1170
Host IP 213.136.52.29
Web Server Apache/2.2.15 (Fedora)
Powered-by PHP/5.2.13
Injection Type MySQL Blind
Current DB Web

Data Bases:

information_schema
bk
certification
c?ashme
cust_sync_interim
customer
dbasavings
downloads
feedback
glassfish_interface
intranet
kaj
license_customers
manual
manual_search
mem
mysql
mysqlforge
mysqlweb
news_events
partner_t?aining
partners
partners_bak
phorum5
planetmysql
qa_contribution
quickpoll
robin
rp
sampo
sampo_interface
sessions
softrax
softrax_interim
solutions
tco
test
track
track_refer
wb
web
web_control
web_projects
web_training
webwiki
wordpress
zack

Current DB: web

Tables:

xing_validation
v_web_submissions
userbk
user_extra
user  Columns: cwpid version lead_quality sfid industry address2 created last_modified lang notify newsletter gid title fax cell phone country zipcode state city address business company position lastname firstname passwd verified bounces email user_id
us_zip_state
us_area_state
unsub_log
trials
trial_external_log
trial_data
trial_alias
training_redirect
tag_blacklist
tag_applied
tag
support_feeds_DROP
support_entries_DROP
states
snapshots_builds
snapshots
sakilapoints
regions
quote_customer
quote
quicklinks
promo
product_releases
position
partner
paper_lead
paper_details_options
paper_details_old
paper_details
paper
newsletter_unsub
nav_sites
nav_items
mysql_history
mirror_status
mirror_country
mirror_continent
mirror
mailing_list_member
mailing_list
locks
lead_validity_rules
lead_source_xref
lead_source_external
lead_source
lead_routing_rule
lead_rep
lead_old
lead_note
lead_extra_old
lead_extra_new
lead_extra
lead_companies
lead_campaign_member
lead
language_strings
language_modules
imagecache
hall_of_fame
g_search_term
g_search_data
g_blog_data
forum_comment
forms
field_xref
field_options
field_match
email_blacklist
email_a_friend
drpl_manual_review
drpl_denied
drpl_check_log
drpl_cache
customer_meta_sets
customer_meta_set
customer_meta
customer
coupon_product
coupon_campaign_attribute
coupon_campaign
coupon
country
countries
campaign_type
campaign_topic
campaign_score
campaign_listdata
campaign_detail
business
bounces

Database : mysql

Table:

user_info
user     Column: Update_pri Insert_priv Select_priv Password User Host
time_zone_transition_type
time_zone_transition
time_zone_name
time_zone_leap_second
time_zone
tables_priv
slow_log
?ervers
procs_priv
proc
plugin
ndb_binlog_index
inventory
host
help_topic
help_relation
help_keyword
help_category
general_log
func
event
db
columns_priv

# mysql.user Data

Password                                                                     User            Host
wembaster     %
monitor         10.%
sys                %
sys               localhost
*06581D0A5474DFF4D5DA3CE0CD7702FA52601412      forumread     %
*0702AEBF8E92A002E95D40247776E1A67CD2CA3F     wb                %
*2A57F767D29295B3CB8D01C760D9939649483F85        flipper           10.%
*32F623705BFFFE682E7BD18D5357B38EF8A5BAA9     wordpress       %
*66A905D4110DF14B41D585FDBCE0666AD13DD8C1     nagios            %
*704EB56151317F27573BB4DDA98EDF00FFABAAF8     root              localhost
*ED1BDC19B08FD41017EE180169E5CEB2C77F941A     mysqlforge     %
*FD75B177FFEC3590FE5D7E8459B3DDC60AE8147B     webleads      10.%
00680dd718880337                                                        olof                %
077f61a849269b62                                                         qa_r               %
077f61a849269b62                                                         qa_rw             %
077f61a849269b62                                                         qa_adm          %
0c2f46ba6b87d4ea                                                         trials_admin    10.%
1856b9b03b5a6f47                                                         cacti               %
19519e95545509b5                                                        certification      %
1a39dcad63bbc7a6                                                        gf_mschiff        %
2277fd7d562ec459                                                         webslave        localhost
2277fd7d562ec459                                                         webslave          %
304404b114b5516c                                                        planetmysql_rw %
35e376451a87adb0                                                        planetmysql_ro  %
4e203d581b756a93                                                        webmaster     localhost
4e203d581b756a93                                                        webmaster        %
4e93479179a8ec93                                                        sysadm             %
575ec47e16c7e20e                                                        phorum5            %
575ec47e16c7e20e                                                        lenz                  %
5f340ec40a706f64                                                          robin                 %
61113da02d2c97a5                                                        regdata              %
616075f256f111ba                                                          myadmin        10.100.6.44
61711eea3de509ac                                                        merlin             127.0.0.1
6302de0909a369a1                                                        ebraswell           %
6b72b2824cc7f6fe                                                          mysqlweb          %
6ffd2b17498cdd44                                                          zack                 %
70599cf351c6f591                                                          repl                   %
740284817e3ed5a8                                                        webwiki             %
74c5529b41a97cc2                                                        web_projects

Databsae: web_control

Table:

system
system_command
service_request
run_control
request_daemon
rebuild_server
rebuild_queue
rebuild_control
quarterly_lead_report
newsletter_log
newsletter_control
ips
hosts  Columns:notes description name
dns_servers Columns: name internal ip

Database: certification

Tables:

signup
corpcustomers
certexamdata
certcandidatedata
certaccess

Database: wordpress

Tables:

wp_4_term_taxonom
wp_4_term_relationships
wp_4_posts
wp_4_postmeta
wp_4_options
wp_4_links
wp_4_comments
wp_3_terms
wp_3_term_taxonomy
wp_3_term_relationships
wp_3_posts
wp_3_postmeta
wp_3_options
wp_3_links
wp_3_comments
wp_2_terms
wp_2_term_taxonomy
wp_2_term_relationships
wp_2_posts
wp_2_postmeta
wp_2_options
wp_2_links
wp_2_comments
wp_1_terms
wp_1_term_taxonomy
wp_1_term_relationships
wp_1_posts
wp_1_postmeta
wp_1_options
wp_1_links
wp_1_comments
wp_11_terms
wp_11_term_taxonomy
wp_11_term_relationships
wp_11_posts
wp_11_postmeta
wp_11_options
wp_11_links
wp_11_comments
wp_10_terms
wp_10_term_taxonomy
wp_10_term_relationships
wp_10_posts
wp_10_postmeta
wp_10_options
wp_10_links
wp_10_comments
remove_queries

Database: bk

Table:

wp_backupterm_taxonomy
wp_backupterm_relationships
wp_backupposts
wp_backuppostmeta
wp_backupoptions
wp_backuplinks
wp_backupcomments

News Source : Jackh4xor



출처 : thehackernews.com
저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License

Trackback 0 Comment 0
2011/08/09 17:48

MySQL Query cache 의 구조


작동 방식
  • Query cache는 system-wide한 글로벌 메모리 공간
  • Query cache는 Full scan등과 같이 큰 공간이 필요한 결과는 캐시하지 않도록 
    캐시 최대 사이즈를 제한(query_cache_limit)
  • Query의 결과를 캐시하기 위해서 메모리의 공간을 할당 받을 때, 
    query_cache_min_res_unit 단위로 할당 받으며 (필요시 더 추가적으로), 
    캐시 작업이 완료된 이후 남은 미사용 공간은 반납하게 된다.
  • Query cache는 테이블 단위로 Invalidate 되기 때문에, 
    테이블이 상당히 자주 변경된다면 cache의 효율이 떨어질 수 있다.
  • 일반적으로는 Query cache의 매치 기준은 Query 문장이 동일한지(대소문자 및 공백까지) 비교하는 방식이며 InnoDB의 경우에는 레코드 기반의 락을 사용하며 MVCC의 제어가 필요하기 때문에 
    재사용 가능한지 판단은 Query 문장뿐만 아니라 Transaction Id로 레코드 접근성까지 비교해야 함
  • Query cache의 관리 비용은 얻는 효과에 비하면 아주 미미하지만, 
    가끔은 캐시 내용을 invalidate 하는데 상당히 많은 비용이 필요할 수도 있음
  • 일반적으로 Query cache는 아래의 경우 상당히 도움이 된다.
     - 테이블이 자주 변경되지 않는 경우
     - 쿼리의 실행 과정은 복잡하고 많은 처리가 필요하지만 결과 셋의 사이즈가 작은 경우
     - 동일 쿼리가 자주 실행되는 경우
  • Query cache의 Hit-Ratio는 계산하는 MySQL의 Status 값 Key_reads를 Status값 Key_read_requests로 나누는 방법으로 계산하지만, 이 값이 90%면 좋고 20%면 나쁘다는 단순한 판단은 힘듬 
      -> Query cache의 효율성 판단은 실제 운영 시스템에서 활성화/비활성화를 비교해보는 것이 제일 좋을 듯 하지만, 운영 시스템이므로 주의가 필요
      -> query_cache_size 설정 변수는 전역이면서 동적 변수이기 때문에 실시간으로 변경이 가능하므로 서비스 영향 없이 설정 변경 후 비교 가능 
         (주의해야 할 것은 기존과 동일하든지 다른 값이든지 일단 한번 설정이 되면 지금까지의 캐시된 내용은 모두 제거됨)

메모리 할당 방식

  • 1) 그림의 아래 부분 처럼 각 색깔별로 A,B,C,D,E 쿼리들이 실행되어서, 1) 번과 같은 상태의 Query cache가 있다고 가정해보자
    - 그림에서 하나의 영역은 Query cache block 으로 일반적으로 "query_cache_min_res_unit"로 정의된 사이즈이며, 
    - <1>번이라고 적힌 영역은 캐시될 ResultSet 을 저장하기 위해서 "query_cache_min_res_unit" 크기의 메모리 블럭을 할당 받아서 사용하다가 남는 공간은 다시 반납하게 되는데, 이 때문에 발생한 빈 공간임 (Fragmentation이라고도 하며, 이런 공간들은 쉽게 재활용되지 못함)
    - 뒷 부분의 흰색 블럭들은 아직 미사용된 블럭들을 표시함 
  • 2) 이 상태에서 아래와 같이 tab2와 tab4를 변경하는 쿼리가 실행되면, 해당 테이블을 참조하는 모든 Query cache는 모두 제거됨
    - UPDATE tab2 SET ... WHERE ...
    - UPDATE tab4 SET ... WHERE ... 
    이런 공간들은 주위의 미사용 영역들과 병합되어서, 나중에 재활용될 수 있음 
    (이런 공간들도 모두 일반적으로 Fragmentation 이라고 표현함) 
  • 3) 아래 명령을 이용하여 이렇게 발생한 Query cache의 Fragmentation을 제거하고, 
    미 사용 영역을 모두 연속된 공간으로 만들어줄 수 있음
    - FLUSH QUERY CACHE;
    이 명령은 Query cache 전체에 대해서 변경되지 않도록 락을 걸기 때문에 조심해서 실행해야 함 
  • 이러한 Query cache 의 block 할당에 관련된 정보는 MySQL의 상태값으로 확인 가능함
    - Qcache_total_blocks   : 무조건 할당된 공간까지의 모든 block들(사용중이든 아니든)의 수를 보여줌
    - Qcache_free_blocks    : 미사용 block들 (Fragmentation이라고 표현한 영역들)의 수를 보여줌
    - 1)번 그림 : Qcache_total_blocks -> 16,  Qcache_free_blocks -> 2
    - 2)번 그림 : Qcache_total_blocks -> 16,  Qcache_free_blocks -> 3
    - 3)번 그림 : Qcache_total_blocks -> 11,  Qcache_free_blocks -> 1

제약 사항 
  • 아래와 같은 형태로 실행되는 쿼리는 Query cache를 사용하지 못함
    - PreparedStatement로 실행되는 쿼리 (MySQL 5.1.17 이후 부터는 Query cache를 사용 가능)
    - Stored Procedure, Function, Trigger 내부에서 실행되는 쿼리
    - Sub Query 형태로 실행되는 쿼리

관련 설정 변수
  • query_cache_limit 
    이 값으로 설정된 사이즈 이상의 결과 셋을 가지는 경우에는 Query cache에 캐시하지 않도록 설정
  • query_cache_min_res_unit 
    Query cache에서 결과 셋을 캐시하기 위한 메모리 공간을 할당 받을 때 사용하는 메모리 할당 최소 단위 사이즈
  • query_cache_size 
    Query cache의 전체 사이즈를 설정하며 1024Byte의 배수로 설정, 
    Query cache를 완전히 비활성화하기 위해서는 이 변수의 값을 0으로 설정해야 한다.
  • query_cache_type 
    Query 의 결과 셋을 어떻게 저장할지를 결정함, 
    - OFF는 캐시하지 않음, 
    - ON은 SQL_NO_CACHE 힌트가 없는 SELECT 문장의 결과 셋은 캐시 대상으로 가정, 
    - DEMAND 는 SQL_CACHE 힌트가 SELECT 문장에 있는 결과 셋만 캐시 대상으로 가정
  • query_cache_wlock_invalidate 
    어떤 Client가 MyISAM 테이블에 Write lock을 가지고 있는 경우, 
    다른 Client가 Query cache에서 결과를 가져갈 수 있는 SELECT문장을 실행하는 것은 Block되지 않는데, 이 값을 TRUE로 설정하면 결과를 Query cache에서 가져갈 수 있다 하더라도, 다른 Client는 대기해야 하도록 만든다.


출처 : http://intomysql.blogspot.com/
저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License

Trackback 0 Comment 0
2011/05/25 18:52

MysqlPasswordAuditor : Mysql Password Recovery & Auditing


About MysqlPasswordAuditor
 

MysqlPasswordAuditor is the FREE Mysql password recovery and auditing software. Mysql is one of the popular and powerful database software used by most of the web based and server side applications.
If you have ever lost or forgotten your Mysql database password then MysqlPasswordAuditor can help in recovering it easily. It can also help you to audit Mysql database server setup in an corporate environment by discovering the weak password configurations. This makes it one of the must have tool for IT administrators & Penetration Testers. 

MysqlPasswordAuditor is very easy to use with the simple dictionary based password recovery method. By default it includes small password list file, however you can find more password dictionary files at OpenWall collection. You can also use tools like Crunch, Cupp to generate custom password list files on your own and then use it with MysqlPasswordAuditor.

MysqlPasswordAuditor works on wide range of platforms starting from Windows XP to latest operating system Windows 7.

Features of MysqlPasswordAuditor

Here are some of the special features of MysqlPasswordAuditor
  • Free and Simple software to Recover/Audit Mysql Password.
  • Very useful for IT administrators & Penetration Testers
  • Dictionary based Password Recovery method
  • Detailed statistics such as  tested passwords, elapsed time, progress bar is displayed during Audit operation.
  • Simple, easy to use GUI interface
  • Integrated Installer for local Installation & Uninstallation. 

IInstalling MysqlPasswordAuditor

MysqlPasswordAuditor comes with Installer which can help you in local installation & un-installation. It has intuitive setup wizard (as shown in the screenshot below) which guides you through series of steps in completion of installation. At any point of time you can use Uninstaller to remove the software from the system.


Using MysqlPasswordAuditor

MyMysqlPasswordAuditor is GUI application which is easy to use even for beginners.

Here are simple steps
  • Launch MysqlPasswordAuditor on your system from installed location.
  • Enter your Mysql server IP address, port number, username for which to recover the password.
  • Next select or drag & drop the password list file (you can find one in the installed location)
  • Finally click on 'Start Audit' button to start the Mysql Password recovery operation.
  • You will see detailed statistics during password audit operation
  • On success, it will display the recovered password as shown in the screenshot below.
  • Else you will see the failure message and you can then try with bigger password list file. 

Screenshots of MysqlPasswordAuditor

Here are the screenshots of MysqlPasswordAuditor
 
ScScreenshot 1:MysqlPasswordAuditor is showing the recovered Mysql Password



출처 : securityxploded.com

 
저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License

Trackback 0 Comment 0