Skip to content

Instantly share code, notes, and snippets.

View chandanchowdhury's full-sized avatar
💭
Catching up

i_virus chandanchowdhury

💭
Catching up
View GitHub Profile
#add_admin_windows(client, redteam, password)
#add_admin_linux(client, redteam, password)
def add_admin_windows(session, username, userpasswd)
print_status("adding admin user: #{username}")
# Ref: https://www.windows-commandline.com/add-user-from-command-line/
add_user_cmd='cmd.exe /c net user #{username} #{userpasswd} /ADD /PASSWORDCHG:NO'
make_user_admin_cmd='cmd.exe /c net localgroup administrators #{username} /add'

Get sha256 hash of files in a path

Get-FileHash -Path "C:\Program Files (x86)\Dell SecureWorks\Red Cloak*.exe" | Format-List

Check SecureBoot status

Confirm-SecureBootUEFI

SSL certificate problem: self signed certificate in certificate chain

While working from inside company network, which uses self-signed certificate to monitor SSL traffic, various programs will start failing.

Here is list of them and how to resolve the issue.

Browsers

Extract the Root CA and install on the host.

Git

Keybase proof

I hereby claim:

  • I am chandanchowdhury on github.
  • I am i_virus (https://keybase.io/i_virus) on keybase.
  • I have a public key whose fingerprint is 8624 5273 7827 9AC4 E1D9 B257 1F56 4FEC 8D26 4684

To claim this, I am signing this object: