Security oriented linux command cheatsheets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ "x$1" = "x" ]; | |
| then echo "You need to specify an input file containing domain names to iterate over!";echo "Usage: $0 list_of_domain_names.txt" | |
| exit; | |
| fi | |
| if ! [ -x "$(command -v psql)" ]; then | |
| echo 'Error: psql is not installed.' >&2 | |
| echo 'Try installing it: sudo apt install postgresql-client' >&2 |
November 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # There's no simple built-in equivalent of the powershell Get-AzAccessToken to dump the active Auth/Bearer/token | |
| # from the session initiated with Connect-ExchangeOnline | |
| # This dumps all active sessions in current PoSH context | |
| [Microsoft.Exchange.Management.ExoPowershellSnapin.ConnectionContextFactory]::GetAllConnectionContexts() | ConvertTo-JSON | |
| [Microsoft.Exchange.Management.ExoPowershellSnapin.ConnectionContextFactory]::GetAllConnectionContexts() | select PowerShellTokenInfo | ConvertTo-JSON | |
| [Microsoft.Exchange.Management.ExoPowershellSnapin.ConnectionContextFactory]::GetAllConnectionContexts() | Where-Object {-not [System.String]::IsNullOrEmpty($_.PowerShellCredentials)} | select PowerShellTokenInfo | ConvertTo-JSON |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Write-Host "Hello World, via powershell cradle" |
https://gist.github.com/inaz2/5fa3ca02f4e8204a7dd4d4b50fd0c13f
Shell32.dll {6DA736C9-DCDE-4651-82A8-56E4EF1D8DD7} CLSID_ScfFileExecute
Any class that extends the following methods render the classes ICON file (arbitrary file = potentially an SMB connection/hash relay)
OlderNewer