Life is fun and easy!
不正IP報告数
Okan Sensor
ページへ戻る
印刷
macOS/Gatekeeper
をテンプレートにして作成 ::
UJP
tech_regist2
:macOS/Gatekeeper をテンプレートにして作成
開始行:
*macOS Getekeeper考察
**はじめに
macOSにて,ダウンロードしたアプリケーションを実行しよう...
**現象の確認 High Sierraを利用
ダウンロードしたアプリのインストーラ(.pkg方式)を実行...
#ref(site://modules/xelfinder/index.php?page=view&file=71...
これはマルウェア(ウイルスなどの悪意のあるソフトウェア...
このようにブロックされたアプリは,[システム環境設定]の[...
#ref(site://modules/xelfinder/index.php?page=view&file=71...
ここで[このまま開く]ボタンを押下すると,次のようなダイ...
#ref(site://modules/xelfinder/index.php?page=view&file=71...
先ほどとはメッセージが変わった.一度許可すると,「常に...
今回の場合はインストーラなので,いくらでもインストール...
これで[開く]を選択すると,プログラムが実行される.
#ref(site://modules/xelfinder/index.php?page=view&file=71...
今回の場合,pkgファイルなのでインストールが実行できる.
**macOS 10.14 Mojaveでの動作
macOSはバージョンアップの都度,デフォルト設定を強化して...
#ref(site://modules/xelfinder/index.php?page=view&file=71...
この状態でアプリケーションの実行を行う.
#ref(site://modules/xelfinder/index.php?page=view&file=71...
ダイアログにも,控えめにApp Storeのみと書かれている.
#ref(site://modules/xelfinder/index.php?page=view&file=71...
このまま実行する.
#ref(site://modules/xelfinder/index.php?page=view&file=71...
ダウンロードしたアプリケーションを開こうとすると,管理...
**High SierraからMojaveへバージョンアップした時のデフォル...
Mojave(10.14)ではダウンロードしたアプリケーションの実行...
#ref(site://modules/xelfinder/index.php?page=view&file=71...
以前のHigh Sierra(10.13)では,「確認済みの開発元からの...
**確認済みの開発元とはなんなのか
Appleが承認したアプリケーションベンダを「確認済みの開発...
このDeveloper IDで署名したアプリに限り,Cloudkit,Apple...
**ダウンロードしたpkgの証明書を確認する
ダウンロードしたpkgが持っている証明書は,pkgutilを使う...
次の例では,MicrosoftのサイトからダウンロードしたMicros...
$ pkgutil --check-signature Downloads/Teams_osx.pkg🆑
Package "Teams_osx.pkg":
Status: signed by a certificate trusted by Mac OS X
Certificate Chain:
1. Developer ID Installer: Microsoft Corporation (UB...
SHA1 fingerprint: F3 13 36 F7 FF AC 5E 8B 2E 9B 1...
-------------------------------------------------...
2. Developer ID Certification Authority
SHA1 fingerprint: 3B 16 6C 3B 7D C4 B7 51 C9 FE 2...
-------------------------------------------------...
3. Apple Root CA
SHA1 fingerprint: 61 1E 5B 66 2C 59 3A 08 FF 58 D...
$
MicrosoftのDeveloper IDが登録されている.
**ダウンロードしたDMGファイルをspctlコマンドで確認する
DMGファイルは,Disk Imageファイル.昔のフロッピーディス...
このDMGファイルの署名を確認する.
DMGファイルは,spctlコマンドを用いる.
まずは,コマンドの使い方の確認.
$ spctl🆑
System Policy Basic Usage:
spctl --assess [--type type] [-v] path ... # asse...
spctl --add [--type type] [--path|--requirement|-...
spctl [--enable|--disable|--remove] [--type type]...
spctl --status | --master-enable | --master-disab...
Kernel Extension User Consent Usage:
spctl kext-consent <action> ** Modifications...
status
Print whether kernel extension user consent ...
enable
Enable requiring user consent for kernel ext...
disable
Disable requiring user consent for kernel ex...
add <team-id>
Insert a new Team Identifier into the list a...
list
Print the list of Team Identifiers allowed t...
remove <team-id>
Remove a Team Identifier from the list allow...
$
今回は,Microsoft Office互換ソフトのLibreOfficeをダウン...
$ spctl -a -t open --context context:primary-signature -...
Downloads/LibreOffice_6.4.4_MacOS_x86-64.dmg: rejected
source=no usable signature🈁
$
有効な署名は無いと表示された.
次のサンプル.
$ spctl -a -t open --context context:primary-signature -...
Downloads/IINA.v1.0.4.dmg: rejected
source=Developer ID🈁
$
これはDeveloper IDで署名されていると
**インストールしたMac Appの開発元を確認する
すでにインストールされているアプリが,Appleに証明されて...
調べたいアプリを,codesignコマンドで指定する.
まずは,App Storeからインストールした,Monosnapを.
$ codesign --display -vvv /Applications/Monosnap.app🆑
Executable=/Applications/Monosnap.app/Contents/MacOS/Mon...
Identifier=com.monosnap.monosnap
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20200 size=58133 flags=0x200(kill) hashe...
Hash type=sha256 size=32
CandidateCDHash sha256=03bb860ec5dfca4c5b75e649edf9554c6...
Hash choices=sha256
CDHash=03bb860ec5dfca4c5b75e649edf9554c60587adc
Signature size=4617
Authority=Apple Mac OS Application Signing🈁
Authority=Apple Worldwide Developer Relations Certificat...
Authority=Apple Root CA
Info.plist entries=36
TeamIdentifier=8DEE75ARD7
Sealed Resources version=2 rules=13 files=427
Internal requirements count=1 size=224
$
次に,pkgファイルをダウンロードしてインストールしたMicr...
$ codesign --display -vvv /Applications/Microsoft\ Teams...
Executable=/Applications/Microsoft Teams.app/Contents/Ma...
Identifier=com.microsoft.teams
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20500 size=383 flags=0x10000(runtime) ha...
Hash type=sha256 size=32
CandidateCDHash sha1=de20994eafa3411c1c5e35679925ca09ec1...
CandidateCDHash sha256=ef8f97a75abc383dff7936fdd5d8e395a...
Hash choices=sha1,sha256
CDHash=ef8f97a75abc383dff7936fdd5d8e395aefbf3a8
Signature size=9061
Authority=Developer ID Application: Microsoft Corporatio...
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=2020/04/02 7:48:09
Info.plist entries=18
TeamIdentifier=UBF8T346G9
Runtime Version=10.12.0
Sealed Resources version=2 rules=13 files=129
Internal requirements count=1 size=180
$
次に,OSに付属しているSafariを確認.
$ codesign --display -vvv /Applications/Safari.app🆑
Executable=/Applications/Safari.app/Contents/MacOS/Safari
Identifier=com.apple.Safari
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20100 size=321 flags=0x2000(library-vali...
Hash type=sha256 size=32
CandidateCDHash sha256=ab20751f33bbb1371b91a81ea316e2979...
Hash choices=sha256
CDHash=ab20751f33bbb1371b91a81ea316e297901bcc3e
Signature size=4485
Authority=Software Signing
Authority=Apple Code Signing Certification Authority🈁
Authority=Apple Root CA
Info.plist entries=40
TeamIdentifier=not set
Sealed Resources version=2 rules=13 files=1932
Internal requirements count=1 size=64
$
んー.どこ見れば良いのかよくわからん.今日はここまで.
終了行:
*macOS Getekeeper考察
**はじめに
macOSにて,ダウンロードしたアプリケーションを実行しよう...
**現象の確認 High Sierraを利用
ダウンロードしたアプリのインストーラ(.pkg方式)を実行...
#ref(site://modules/xelfinder/index.php?page=view&file=71...
これはマルウェア(ウイルスなどの悪意のあるソフトウェア...
このようにブロックされたアプリは,[システム環境設定]の[...
#ref(site://modules/xelfinder/index.php?page=view&file=71...
ここで[このまま開く]ボタンを押下すると,次のようなダイ...
#ref(site://modules/xelfinder/index.php?page=view&file=71...
先ほどとはメッセージが変わった.一度許可すると,「常に...
今回の場合はインストーラなので,いくらでもインストール...
これで[開く]を選択すると,プログラムが実行される.
#ref(site://modules/xelfinder/index.php?page=view&file=71...
今回の場合,pkgファイルなのでインストールが実行できる.
**macOS 10.14 Mojaveでの動作
macOSはバージョンアップの都度,デフォルト設定を強化して...
#ref(site://modules/xelfinder/index.php?page=view&file=71...
この状態でアプリケーションの実行を行う.
#ref(site://modules/xelfinder/index.php?page=view&file=71...
ダイアログにも,控えめにApp Storeのみと書かれている.
#ref(site://modules/xelfinder/index.php?page=view&file=71...
このまま実行する.
#ref(site://modules/xelfinder/index.php?page=view&file=71...
ダウンロードしたアプリケーションを開こうとすると,管理...
**High SierraからMojaveへバージョンアップした時のデフォル...
Mojave(10.14)ではダウンロードしたアプリケーションの実行...
#ref(site://modules/xelfinder/index.php?page=view&file=71...
以前のHigh Sierra(10.13)では,「確認済みの開発元からの...
**確認済みの開発元とはなんなのか
Appleが承認したアプリケーションベンダを「確認済みの開発...
このDeveloper IDで署名したアプリに限り,Cloudkit,Apple...
**ダウンロードしたpkgの証明書を確認する
ダウンロードしたpkgが持っている証明書は,pkgutilを使う...
次の例では,MicrosoftのサイトからダウンロードしたMicros...
$ pkgutil --check-signature Downloads/Teams_osx.pkg🆑
Package "Teams_osx.pkg":
Status: signed by a certificate trusted by Mac OS X
Certificate Chain:
1. Developer ID Installer: Microsoft Corporation (UB...
SHA1 fingerprint: F3 13 36 F7 FF AC 5E 8B 2E 9B 1...
-------------------------------------------------...
2. Developer ID Certification Authority
SHA1 fingerprint: 3B 16 6C 3B 7D C4 B7 51 C9 FE 2...
-------------------------------------------------...
3. Apple Root CA
SHA1 fingerprint: 61 1E 5B 66 2C 59 3A 08 FF 58 D...
$
MicrosoftのDeveloper IDが登録されている.
**ダウンロードしたDMGファイルをspctlコマンドで確認する
DMGファイルは,Disk Imageファイル.昔のフロッピーディス...
このDMGファイルの署名を確認する.
DMGファイルは,spctlコマンドを用いる.
まずは,コマンドの使い方の確認.
$ spctl🆑
System Policy Basic Usage:
spctl --assess [--type type] [-v] path ... # asse...
spctl --add [--type type] [--path|--requirement|-...
spctl [--enable|--disable|--remove] [--type type]...
spctl --status | --master-enable | --master-disab...
Kernel Extension User Consent Usage:
spctl kext-consent <action> ** Modifications...
status
Print whether kernel extension user consent ...
enable
Enable requiring user consent for kernel ext...
disable
Disable requiring user consent for kernel ex...
add <team-id>
Insert a new Team Identifier into the list a...
list
Print the list of Team Identifiers allowed t...
remove <team-id>
Remove a Team Identifier from the list allow...
$
今回は,Microsoft Office互換ソフトのLibreOfficeをダウン...
$ spctl -a -t open --context context:primary-signature -...
Downloads/LibreOffice_6.4.4_MacOS_x86-64.dmg: rejected
source=no usable signature🈁
$
有効な署名は無いと表示された.
次のサンプル.
$ spctl -a -t open --context context:primary-signature -...
Downloads/IINA.v1.0.4.dmg: rejected
source=Developer ID🈁
$
これはDeveloper IDで署名されていると
**インストールしたMac Appの開発元を確認する
すでにインストールされているアプリが,Appleに証明されて...
調べたいアプリを,codesignコマンドで指定する.
まずは,App Storeからインストールした,Monosnapを.
$ codesign --display -vvv /Applications/Monosnap.app🆑
Executable=/Applications/Monosnap.app/Contents/MacOS/Mon...
Identifier=com.monosnap.monosnap
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20200 size=58133 flags=0x200(kill) hashe...
Hash type=sha256 size=32
CandidateCDHash sha256=03bb860ec5dfca4c5b75e649edf9554c6...
Hash choices=sha256
CDHash=03bb860ec5dfca4c5b75e649edf9554c60587adc
Signature size=4617
Authority=Apple Mac OS Application Signing🈁
Authority=Apple Worldwide Developer Relations Certificat...
Authority=Apple Root CA
Info.plist entries=36
TeamIdentifier=8DEE75ARD7
Sealed Resources version=2 rules=13 files=427
Internal requirements count=1 size=224
$
次に,pkgファイルをダウンロードしてインストールしたMicr...
$ codesign --display -vvv /Applications/Microsoft\ Teams...
Executable=/Applications/Microsoft Teams.app/Contents/Ma...
Identifier=com.microsoft.teams
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20500 size=383 flags=0x10000(runtime) ha...
Hash type=sha256 size=32
CandidateCDHash sha1=de20994eafa3411c1c5e35679925ca09ec1...
CandidateCDHash sha256=ef8f97a75abc383dff7936fdd5d8e395a...
Hash choices=sha1,sha256
CDHash=ef8f97a75abc383dff7936fdd5d8e395aefbf3a8
Signature size=9061
Authority=Developer ID Application: Microsoft Corporatio...
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=2020/04/02 7:48:09
Info.plist entries=18
TeamIdentifier=UBF8T346G9
Runtime Version=10.12.0
Sealed Resources version=2 rules=13 files=129
Internal requirements count=1 size=180
$
次に,OSに付属しているSafariを確認.
$ codesign --display -vvv /Applications/Safari.app🆑
Executable=/Applications/Safari.app/Contents/MacOS/Safari
Identifier=com.apple.Safari
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20100 size=321 flags=0x2000(library-vali...
Hash type=sha256 size=32
CandidateCDHash sha256=ab20751f33bbb1371b91a81ea316e2979...
Hash choices=sha256
CDHash=ab20751f33bbb1371b91a81ea316e297901bcc3e
Signature size=4485
Authority=Software Signing
Authority=Apple Code Signing Certification Authority🈁
Authority=Apple Root CA
Info.plist entries=40
TeamIdentifier=not set
Sealed Resources version=2 rules=13 files=1932
Internal requirements count=1 size=64
$
んー.どこ見れば良いのかよくわからん.今日はここまで.
ページ名: