Skip to content

Instantly share code, notes, and snippets.

@michalcza
michalcza / WIN10_GP_prompt for credentials.txt
Created March 7, 2023 22:42
WIN10 GP (Prompt for credentials)
% Force user to type password to elevate permissions
% Many WIN10 compromises are initiated through keyboard sequence commands. User permissions are
% elevated through simply by allowing attacker to click Yes/Enter when asked to authorize permission
% elevation. Changing this parameter in WIN10 forces the user to type their password to elevate permissions.
% This thwarts any automated keystroke attempts and also forces user to pause and think before
% raising permission level. This is similar to the 'sudo' command in Linux environments.
1. WIN+R
2. Type: 'gpedit.msc' to launch group policy editor.
3. Select: 'Yes' to elevate user permissions.

Keybase proof

I hereby claim:

  • I am michalcza on github.
  • I am michalcza (https://keybase.io/michalcza) on keybase.
  • I have a public key ASCamSoA4ixtZBOJOBiYFHozp5YS_klrHZ6-t-lgkEhSlAo

To claim this, I am signing this object:

@michalcza
michalcza / FirewallLockout.txt
Created March 26, 2019 23:58
Prevent firewall lockout
# PREVENT BEING LOCKED OUT FROM REMOTE DEVICE WHEN UPDATING UFW FIREWALL RULES
# OPERATING SYSTEM LINUX/UBUNTU
# MICHAL CZARNECKI (MCZARNECKI@GMAIL.COM)
# ADDITIONAL PACKAGES REQUIRED: ufw, at
#
We add a new rule to the firewall configuration
$> sudo ufw allow ARGS
$> sudo ufw status
$> Status: inactive
If we enable the rules we might lock ourselves out, we will set the UFW rules to automatically revert in 5 minutes. If we lock ourselves out we can get back in.