Shikata Ga Nai

Private? There is no such things.

Breaking Business Logic - Part: 2^7 = 1を訳してみた

Hello there, ('ω')ノ

 

ビジネス ロジックの破綻 - パート: 2^7 = 1

 

脆弱性

 レースコンディション

 

記事:

 https://systemweakness.com/breaking-business-logic-part-2-7-1-f19924b18783

 

今回は、あるプログラムで見つけた Race Conditions について。

このアプリケーションでは、ユーザがチームを作成でき。

このチームで、管理者はチームを作成し、チームに他のユーザを追加して。

開発者関連のタスクを実行できて。


プレミアム ユーザには複数のチームを追加する権限がありますが。

無料アカウントの場合、ユーザは 1つのチームしか追加できず。

複数回追加しようとすると、アプリケーションは複数のチームの追加を拒否して。

 

1.まず、[チーム フォームの追加] をクリックしてフォームに入力し。

 [送信] をクリックして。

 

2.リクエストを傍受して Turbo-Intruder に送信し。

 その後現在のリクエストを破棄して。

 Turbo Intruder について知らない人は、Race-Condition および。

 Brute-Forcing タスクを実行するための Burp Suiteの素晴らしいアドオンで。

 これは Burp-Suite コミュニティの追加でも利用でき。

 以下のスクリーンショットを参考までに。

 

 

3.使用した競合状態のコードは次のようになり。

 これはインターネット上のどこでも見つけることができますが。

 便宜上ここにコードを貼り付けることに。

 

# Find more example scripts at https://github.com/PortSwigger/turbo-intruder/blob/master/resources/examples/default.py


def queueRequests(target, wordlists):
    engine = RequestEngine(endpoint=target.endpoint,
                           concurrentConnections=30,
                           requestsPerConnection=30,
                           pipeline=False
                           )# the 'gate' argument blocks the final byte of each request until openGate is invoked
    for i in range(30):
        engine.queue(target.req, target.baseInput, gate='race1')# wait until every 'race1' tagged request is ready
    # then send the final byte of each request
    # (this method is non-blocking, just like queue)
    engine.openGate('race1')engine.complete(timeout=60)def handleResponse(req, interesting):
    table.add(req)

 

https://github.com/PortSwigger/turbo-intruder/blob/master/resources/examples/default.py

 

4.上記のコードは、30 の同時接続で 30 の同時要求を作成し

 都合に応じて増減できて。

 

5.このタイプの競合状態を実行するには、(%s) として示される。

 リクエスト ヘッダにペイロードを追加する必要があり。

 追加のヘッダがペイロードとして追加されて、以下のようになり。

 

 

6.攻撃をクリックすると、出力は次のようになり。

 アプリケーションに競合状態があり。

 アプリケーションは、同時に複数の要求でリソースの状態を検証せず。

 

 

Best regards, (^^ゞ