text stringlengths 0 93.6k |
|---|
elif(raw=='modify'): |
if not (os.path.isfile(modifyfile)): |
print 'Annoying user by randomly flipping characters...' |
open(modifyfile,'a').close() |
else: |
print 'stopping the modify attack.' |
os.remove(modifyfile) |
elif(raw=='startrun'): |
print 'Start/Run executing...' |
open(startrunfile,'a').close() |
elif(raw=='cmd'): |
print 'Sending command...' |
open(blindcmdfile,'a').close() |
elif(raw=='getfile'): |
print 'This requires you to have copied over powershell exfil code.' |
print 'Example: g(\'o.txt\')' |
print 'Attempting to download a file...' |
open(shellfile,'a').close() |
elif(raw=='putfile'): |
file=raw_input("Enter filename to copy: "); |
print 'Attempting to copy file ' + str(file) |
try: |
copyfile(file, '/tmp/badusb2-copyme') |
except: |
print "Failed to access file" |
pass |
elif(raw=='exit'): |
opt=False |
# <FILESEP> |
###################################################### |
# MISPego API miscellaneous functions. |
# |
# Author: Tom King (Based upon Emmanuel Bouillon's |
# MISP_Maltego) |
# Date: 09/03/2016 |
###################################################### |
import argparse |
import re |
import shelve |
from datetime import datetime, timedelta |
from pymisp import PyMISP, MISPEvent, MISPAttribute |
from MaltegoTransform import * |
from mispego_util import * |
try: |
misp = PyMISP(BASE_URL, API_KEY, MISP_VERIFYCERT, 'json', MISP_DEBUG) |
except Exception as e: |
mt = MaltegoTransform() |
mt.addException("[Error] Cannot connect to MISP instance using %s with API key %s. Please check and try again" % (BASE_URL, API_KEY)) |
mt.addException("[Error] %s" % e) |
mt.throwExceptions() |
eventDB = "event.db" |
def addDomain(domainValue): |
eid = checkAge() |
mispAttribute = MISPAttribute() |
mispAttribute.type = 'domain' |
mispAttribute.value = domainValue |
misp.add_attribute(eid, mispAttribute) |
returnSuccess("domain",domainValue,eid) |
def addIP(ipValue): |
eid = checkAge() |
mispAttribute = MISPAttribute() |
mispAttribute.type = 'ip-dst' |
mispAttribute.value = ipValue |
misp.add_attribute(eid,mispAttribute) |
returnSuccess("IP address",ipValue,eid) |
def addEmail(emailValue): |
eid = checkAge() |
mispAttribute = MISPAttribute() |
mispAttribute.type = 'email' |
mispAttribute.value = emailValue |
misp.add_attribute(eid, mispAttribute) |
returnSuccess("email",emailValue,eid) |
def addBIC(bicValue): |
eid = checkAge() |
mispAttribute = MISPAttribute() |
mispAttribute.type = 'bic' |
mispAttribute.value = bicValue |
misp.add_attribute(eid, mispAttribute) |
returnSuccess("Bank Account", bicValue, eid) |
def addFullName(fullnameValue): |
eid = checkAge() |
mispAttribute = MISPAttribute() |
mispAttribute.type = 'first-name' |
mispAttribute.value = fullnameValue |
misp.add_attribute(eid, mispAttribute) |
returnSuccess("Full Name", fullnameValue, eid) |
def addHash(hashValue): |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.