Skip to content

Commit

Permalink
Added Support for AutoTyping software such as KeePass, LastPass, and …
Browse files Browse the repository at this point in the history
…Breevy (so that they don't get caught as a false positive) [On Python Script Only - Builds yet to be Updated]
  • Loading branch information
pmsosa committed Nov 4, 2016
1 parent 4870b3b commit aa3282d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@

**Extras**
- Program Blacklist: If there are specific programs you neve use (cmd, powershell). Consider interactions with them as highly suspecious and take action based on the protection policy.

- Support for AutoType software (eg. KeePass, LastPass, Breevy)

<h3>Setup</h3>
**Regular users**:
- Choose and download one of the two options that best suits you:
Expand All @@ -33,6 +34,7 @@

**Advanced Users**
- Keep Reading...
- Feel Free to contact me, add issues, fork, and get involved with this project :). Together we can make a stronger tool!

<h3>Requirements</h3>

Expand Down
3 changes: 2 additions & 1 deletion duckhunt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ blacklist = "Command Prompt, Windows PowerShell" # List of Blacklisted Progr
threshold = 30 # Speed Threshold between keystrokes in Milliseconds (Default: ~30 Miliseconds) | Anything faster than this is suspicious.
size = 25 # Size of array that holds the history of keystroke speeds (Default: 25 Keystokes)
randdrop = 6 # How often should one drop a letter in Sneaky mode (Default: 6)
filename = "log.txt" # Log Filename
filename = "log.txt" # Log Filename
allow_auto_type_software = True #Doesn't block software such as KeyPass or LastPass which inject keystrokes through software. (Default: True)
12 changes: 10 additions & 2 deletions duckhunt.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
size = duckhunt.size # Size of history array
policy = duckhunt.policy.lower() # Designate Policy Type
password = duckhunt.password # Password used in Paranoid Mode
allow_auto_type_software = duckhunt.allow_auto_type_software #Allow AutoType Software (eg. KeyPass or LastPass)
################################################################################
pcounter = 0 # Password Counter (If using password)
speed = 0 # Current Average Keystroke Speed
Expand Down Expand Up @@ -74,6 +75,7 @@ def caught(event):
print "Quack! Quack! -- Time to go Duckhunting!"
intrusion = True;


#Paranoid Policy
if (policy == "paranoid"):
win32ui.MessageBox("Someone might be trying to inject keystrokes into your computer.\nPlease check your ports or any strange programs running.\nEnter your Password to unlock keyboard.", "KeyInjection Detected",4096) # MB_SYSTEMMODAL = 4096 -- Always on top.
Expand Down Expand Up @@ -106,8 +108,14 @@ def KeyStroke(event):
global speed, prevTime, i, history, intrusion,blacklist

print event.Key;


print event.Message;
print "Injected",event.Injected;

if (event.Injected != 0 and allow_auto_type_software):
print "Injected by Software"
return True;


#If an intrusion was detected and we are password protecting
#Then lockdown any keystroke and until password is entered
if (policy == "paranoid" and intrusion):
Expand Down

0 comments on commit aa3282d

Please sign in to comment.