Skip to content

Commit

Permalink
0.2 Color changes, Welcome, types changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Neo23x0 committed Jan 18, 2015
1 parent 8248419 commit 3230e12
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
Binary file modified loki.exe
Binary file not shown.
28 changes: 14 additions & 14 deletions loki.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Florian Roth
# BSK Consulting GmbH
# January 2015
# v0.1
# v0.2
#
# DISCLAIMER - USE AT YOUR OWN RISK.

Expand Down Expand Up @@ -160,12 +160,12 @@ def scanProcesses(rules, filename_iocs):
log("INFO", "[INFO] Skipping Process - PID: %s NAME: %s CMD: %s" % ( pid, name, cmd ))
continue

log("INFO", "Scanning Process - PID: %s NAME: %s CMD: %s" % ( pid, name, cmd ))
log("NOTICE", "Scanning Process - PID: %s NAME: %s CMD: %s" % ( pid, name, cmd ))

# Psexec command check
# Skeleton Key Malware Process
if re.search(r'psexec .* [a-fA-F0-9]{32}', cmd, re.IGNORECASE):
log("ALERT", "Process that looks liks SKELETON KEY psexec execution detected PID: %s NAME: %s CMD: %s" % ( pid, name, cmd))
log("WARNING", "Process that looks liks SKELETON KEY psexec execution detected PID: %s NAME: %s CMD: %s" % ( pid, name, cmd))
compromised = True

# Yara rule match
Expand Down Expand Up @@ -286,15 +286,17 @@ def log(mes_type, message):
if mes_type == "ERROR":
color = Fore.MAGENTA
if mes_type == "INFO":
color = Fore.CYAN
color = Fore.GREEN + Style.BRIGHT
if mes_type == "ALERT":
color = Fore.RED
if mes_type == "DEBUG":
color = Fore.WHITE
if mes_type == "WARNING":
color = Fore.YELLOW
if mes_type == "NOTICE":
color = Fore.CYAN

print color, "\b[%s] %s" % (mes_type, message), Fore.WHITE
print color, "\b[%s] %s" % (mes_type, message), Fore.WHITE, Style.NORMAL

# Write to file
with open(args.l, "a") as logfile:
Expand All @@ -314,23 +316,21 @@ def getSyslogTimestamp():


def printWelcome():
print Back.CYAN, " ", Back.BLACK
print Fore.CYAN
print " _ ___ _ _____"
print " | | / _ \| |/ /_ _|"
print " | | | | | | ' / | |"
print " | |__| |_| | . \ | |"
print " |_____\___/|_|\_\___|"
print Back.GREEN, " ", Back.BLACK
print " "
print " " + Back.GREEN + " " + Back.BLACK + " " + Back.GREEN + " " + Back.BLACK + " " + Back.GREEN + " " + Back.BLACK + " " + Back.GREEN + " " + Back.BLACK + " " + Back.GREEN + " " + Back.BLACK
print " " + Back.GREEN + " " + Back.BLACK + " " + Back.GREEN + " " + Back.BLACK + " " + Back.GREEN + " " + Back.BLACK + " " + Back.GREEN + " " + Back.BLACK + " " + Back.GREEN + " " + Back.BLACK
print " " + Back.GREEN + " " + Back.BLACK + " " + Back.GREEN + " " + Back.BLACK + " " + Back.GREEN + " " + Back.BLACK + " " + Back.GREEN + " " + Back.BLACK + " " + Back.GREEN + " " + Back.BLACK
print " "
print " Simple IOC Scanner"
print " "
print " (C) Florian Roth - BSK Consulting GmbH"
print " Jan 2015"
print " Version 0.1"
print " Version 0.2"
print " "
print " DISCLAIMER - USE AT YOUR OWN RISK"
print " "
print Back.CYAN, " ", Back.BLACK
print Back.GREEN, " ", Back.BLACK
print Fore.WHITE+''+Back.BLACK


Expand Down
Binary file modified screens/lokiscan1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screens/lokiscan2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screens/lokiscan3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3230e12

Please sign in to comment.