神兵利器 - Shellcode 加解密脚本

VSole2023-06-25 09:04:56

安装

git clone https://github.com/blacknbunny/Shellcode-Encrypter-Decrypter.git && cd Shellcode-Encrypter-Decrypter/
python encdecshellcode.py --help

示例

Encryption:
    python encdecshellcode.py --shellcode \x41\x41\x42\x42 --key SECRETKEY --option encrypt
Decryption:
    python encdecshellcode.py --shellcode \x41\x41\x42\x42 --key SECRETKEY --option decrypt

各种shellcode

http://shell-storm.org/shellcode/

import argparse
from sys import argv, stdout, exit
parser = argparse.ArgumentParser(description="Encrypting & Decrypting Shellcode")
parser.add_argument('-s', '--shellcode', help='Shellcode To Encrypt & Decrypt')
parser.add_argument('-k', '--key', help='Key Of The Shellcode To Encrypt & Decrpyt', default='key')
parser.add_argument('-o', '--option', help='Argument For Encrypting or Decrypting The Shellcode')
args = parser.parse_args()
def EncryptShellcode(shellcode, key):
    shellcode_encrypted_hex = []
    shellcode_decrypted_hex = []
    shellcode_replaced_hex = ''
    count = 0
    for d in range(0, len(shellcode) / 4):
        count += 4
        shellcode_decrypted_hex.append(shellcode[count-4:count].replace(r'\x', ''))
    for x in range(0, len(shellcode_decrypted_hex)):
        for d in range(0, len(key)):
            shellcode_encrypted_hex.append(hex(ord(shellcode_decrypted_hex[x].decode('hex')) ^ ord(key[d])))
    for y in range(0, len(shellcode_encrypted_hex)):
        shellcode_replaced_hex += shellcode_encrypted_hex[y].replace('0x', r'\x')
    return shellcode_replaced_hex
def DecryptShellcode(shellcode, key):
    shellcode_decrypted = []
    shellcode_xor_headers = []
    shellcode_replaced_hex = ''
    string = ''
    for x in shellcode:
        string += shellcode.replace(r'\x', '')
        break
    count = 0
    for y in string:
        shellcode_xor_headers.append(string[count:count+2])
        count += 6
    while '' in shellcode_xor_headers:
        shellcode_xor_headers.remove('')
    for z in range(len(shellcode_xor_headers)):
        shellcode_decrypted.append(hex(ord(shellcode_xor_headers[z].decode('hex')) ^ ord(key[0])))
    for h in range(0, len(shellcode_decrypted)):
        shellcode_replaced_hex += shellcode_decrypted[h].replace('0x', r'\x')
    return shellcode_replaced_hex
def PrintHelp():
    parser.print_help()
    exit(1)
def main():
    try:
        shellcode = args.shellcode
        key = args.key
        if args.option == "encrypt":
            print( "Encrypted Shellcode = " + EncryptShellcode(shellcode, key) )
        elif args.option == "decrypt":
            print( "\nDecrypted Shellcode = " + DecryptShellcode(shellcode, key) )
        else:
            PrintHelp()
    except Exception as e:
        PrintHelp()
        print(e)
if __name__ == '__main__':
    exit(main())

项目地址:https://github.com/blacknbunny/encdecshellcode

hex
本作品采用《CC 协议》,转载必须注明作者和本文链接
Hex Comparison注册分析
2023-10-12 10:49:49
在学习Flexlm ECC patch过程中,需要对比下别人patch的exe和原本exe的差异,使用到这款Hex Comparison这款二进制比较工具。那么就先来学习一下这款软件的注册机制。
IDA 插件大赛 2022
2022-12-14 09:42:50
Hex-rays 每年都会为 IDA 举办插件大赛,该大赛每年都会涌现出各种类型的插件,有安全团队也有个人安全研究员,为了解决各种问题从而开发各种插件。今年的插件大赛一共入围了九款插件。ida_bochs_windowshttps://github.com/therealdreg/ida_bochs_windowsida_kcpp该插件基于 ida_kernelcache 插件的分析结果,使研究人员可以更方便地对 iOS 内核缓存进行逆向工程。ida_kcpphttps://github.com/cellebrite-labs/ida_kcppida_names该插件使用函数名重命名伪代码窗口,这对打开非常多个窗口的用户来说非常有用。ida_nameshttps://github.com/archercreat/ida_namesquokka该插件为导出工具,将 IDA 分析的信息进行导出。
0RAYS-L3HCTF2021 writeup-web
2021-11-18 16:22:06
Easy PHP页面看起来没毛病 复制一下就发现有问题看响应包hex 再url编码即可GET /?解法一 hash长度扩展攻击原理hash长度扩展攻击的基本场景:网上很多讲的很难理解简单来说 已知?做题根据上面的对应关系 使用工具./hash_extender?
MTCTF-2022 部分WriteUp
2022-11-23 09:35:37
MTCTF 本次比赛主力输出选手Article&Messa&Oolongcode,累计解题3Web,2Pwn,1Re,1CryptoWeb★easypickle题目给出源码:。import base64import picklefrom flask import Flask, sessionimport osimport random. @app.route('/')def hello_world(): if not session.get: session['user'] = ''.join return 'Hello {}!\x93作用同c,但是将从stack中出栈两元素分别导入的模块名和属性名:此外对于蓝帽杯WP还存在一个小问题,原题采用_loads函数加载pickle数据但本题是loads,在opcodes处理上会有些微不通具体来说就是用loads加载时会报错误如下:对着把传入参数换成元组就行,最终的payload如下
VulFi,即“漏洞发现者”,它是一个IDA Pro插件,可以帮助广大研究人员在二进制文件中查找漏洞。它的的主要目标是在一个单一视图中给研究人员提供包含了各种函数交叉引用的相关信息。需要注意的是,搜索函数时需要精确匹配。这意味着or 不会被检测为标准函数,因此在寻找潜在漏洞时不会被考虑。除此之外,VulFi将尽最大努力来过滤所有明显的误报。
近日,广东省茂名市网信办依法依规关停假冒新闻网站和微信公众号。茂名市网信办相关负责人表示,依法办网是网站的生命线,各网站和账号平台要切实履行主体责任,依法依规开展互联网信息服务。接下来,市网信办将会同有关部门继续加大监管和执法力度,营造风清气正的网络空间。
总部位于韩国的网络安全公司AhnLab今天发布了一款疫苗应用程序,可阻止GandCrab勒索软件生根并加密用户文件。此疫苗应用程序通过在加密用户数据之前在GandCrab勒索软件检查的用户计算机上创建一个名为[hexadecimal-string].lock的特殊文件来工作。
一个CTF+渗透测试工具包,主要实现一些常用的加密与编码功能,在软件使用过程中发现问题或建议欢迎提交 issue,也欢迎提交新功能需求。前身为CryptionTool,为更方便的开发更换框架重构。软件基于JDK17开发,使用JAVAFX UI框架以及JFoenixUI组件架构。详见开发文档。
论坛中某锁机软件破解及注册码计算过程起因最开始是今天下午在论坛病毒样本区发现了这个锁机软件,出于学习与助人的目的对该锁机软件进行了逆向分析。并编写了注册机注册代码。原帖的地址贴在下面。https://www.52pojie.cn/thread-1757174-1-1.html直入主题该锁机软件,共需要解锁三次。每次注册码的计算都大体上相同,但是有细微的区别。这里先给出注册码计算代码 复制代码 隐藏代码。且返回结果为大写的md5结果。将其截取前9位并凭借在"
VSole
网络安全专家