0
0

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 3 years have passed since last update.

セキュリティ診断とpingコマンド

Last updated at Posted at 2021-08-25

結論

**「ping -nc 2 127.0.0.1」**で、Windows/UNIXを相手にできる


OS Command Injection の試行コマンドとしてのping

セキュリティ上の問題(脆弱性)の一つの**「OSコマンド実行」**というのがある。

ここで、UNIX系統、Windows系統の両方に存在して、実害がないコマンドとして「ping」が使われることが多いと思う。

  • Windeows系統では、オプションなしで、4発で終わってくれる
  • UNIX系統では**「-c」**オプションを与えないと、無限に実行されてしまう
  • Windows系統では**「-n」**オプションが回数の指定
  • Windows系統で**「-c」**オプションを付けるとエラーになってしまう。

ということで、WSL2で試してみた

ping.png

「ping.exe」はWindowsで、「ping」はUbuntu/Linux


以上

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?