Autonomous Machines & Society.

2022-07-13
Repl For Assembly Code

with processor flags output

https://github.com/yrp604/rappel

msf provided repl

msf-nasm_shell

Read More

2022-07-11
Create And Import Backups In Standardnotes

Read More

2022-07-11
Self Hosted Web Applications

common web applications could be big, like search engines. this is a list of open-sourced self hosted services:

https://github.com/awesome-selfhosted/awesome-selfhosted

Read More

2022-07-11
Terminal autocomplete

Linux support in alpha, currently MacOS only:

fig

warp

why my vim stops working?

warp known issues

Read More

2022-07-11
Zeroday Ai, Hacking Assistant: 0Dai

zeroday ai, hacking assistant: 0dai


免杀 av evasion

https://github.com/fdx-xdf/darkPulse

https://www.shellterproject.com/


别动不动就想日站 收集信息 熟悉工具 做好能做到的 把一路学到的经验总结下来

trufflehug find credentials from open sources

stryker: wifi hacking tool includes dust attack, pin attack

found multiple websites on lonely planet tourist guide of america (all over the place!)

oneforall subdomain finder

hack in one including:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Anonymously Hiding Tools
Information gathering tools
Wordlist Generator
Wireless attack tools
SQL Injection Tools
Phishing attack tools
Web Attack tools
Post exploitation tools
Forensic tools
Payload creation tools
Exploit framework
Reverse engineering tools
DDOS Attack Tools
Remote Administrator Tools (RAT)
XSS Attack Tools
Steganograhy tools
Vulnerablities Scanner
IOT Tools
Other tools

all defense tool: 半/全自动化利用工具, 信息收集工具, 漏洞利用工具, 内网渗透工具, 运维&甲方&防守方工具, 安全资料整理

botnet ips are detected by some websites like URLHaus. there’s a tendency to use common passwords to bruteforce the credential for such botnets, such as inori miral cnc scraper, l4tt/Botnet-Reaper. setting botnets by yourself has advantage of connecting to machines without public ip.

MHDDoS best ddos tool (someone may make living on that), providing multiple WAF bypass techniques (what about Akamai?)

although sqlmap is somehow out-of-date (wracked by WAF, unable to exploit latest nodedb library), there is a tendency to combine subdirectory/url collector like subfinder with it like codewatchorg/sqlipy and zt2/sqli-hunter, automate the exploitation. search for sql injection (deep/machine learning) in github for latest tools and wiki.

undetectable credential stealer created by psauxxx. is it coincidence?

psauxx (twitter) created multiple accounts on github. the original one (in archive) is deactivated, now named as l4tt. vulnnr (auto exploiter) has some tutorials from geekforgeeks and xploitlab (linked to other interesting tools), and is renamed as uscan. search for vulnnr in github and there is a favourite hack tool collection

socialfish clone website and collect credentials (phishing) with web controller interfaces

sploitus search for latest sploits and POC-code (usually after patching is done)

bearSG 符合国人习惯的社工密码生成器 java开发 自带GUI

cupper 社工密码生成器

社会工程工具列表security list的一部分 其中推荐独立开发者怎么赚钱 (有免费API接口介绍 但是有的站已经没了) -> 国内独立开发者项目列表 -> bufpay 免签支付 (需要按月交费)

内容包括:

1
2
3
4
5
6
7
8
9
虚拟身份
钓鱼框架
网站克隆
邮件伪造
服务密码爆破
测试字典集
密码破解还原
在线密码破解

mosint email osint

payloadallthethings (40k stars!) by swisskyrepo

openai written phishing and directory bruteforcing

ghunt google osint

scarecrow payload generator targeting win 10-11

scarecrow cobalt strike plugin

cryptographic related python libraries gmpy2 pycryptodome libnum yafu rsa-wiener-attack RsaCtfTool

ciphery auto decryption

pwntools used by fmyy and more doc

angr to reverse engineer binaries, mostly in ctf? docs

angr ctf use cases: case 1 case 2

angr ctf reverse binaries and print “good job”

angr ctf build binaries from source

defcon ctf quals 2021 ooo

factordb.com find prime numbers, decomposition for rsa

reverse shell generator while shellcode cannot have null bytes, you need to xor your things with tool or assembly.

挖0day 或者利用现成漏洞 fuzzers for kali

kali tools

blackarch tools

all in one hacking tool

villainbackdoorgenerator

don’t aim big, aim small. things like bilibili password database dump, or some Intel internal data leak, are done by professional hackers on professional hardware. some corp will even attempt to retaliate like nvidia. you have been warned.

To exploit zerodays, you need rasp, aka ‘is my application doing something undefined/unexpected?’

利用公共WiFi 比如用WiFi炮连接远处的WiFi 控制云端的攻击服务器

黑客第一步是找目标 (CTF可能不会教你怎么找目标 白帽也不会 因为目标很单一)不管漏洞存不存在 目标究竟是个啥目标 是人(联系方式?)还是机器(URL?)还是AI (验证码?)怎么交互(可能)是什么漏洞 以及采取什么攻击措施 都得先把目标罗列清楚 可以借助搜索引擎 fofa漏洞搜索 邮箱信息 社交软件的信息 木马跟踪他人的信息 大多数人访问的信息 爬虫信息 监控本地软件访问网络的记录 或者直接随便扫描 存到数据库里面

第二步就是交互 利用漏洞 装后门 控制目标 比如挖矿 继续收集网站信息 密码信息 cookies 继续散播病毒 拓展攻击面

第三步持久作战 持续提高反侦查意识 学习收集信息工具 提高黑客能力 利用各种方法 比如社会工程学 利用匿名账号或者免费邮箱账号 传播带木马的免费应用程序 病毒邮件 坚持就是胜利

https://github.com/mikaelkall/HackingAllTheThings

https://github.com/akenofu/HackAllTheThings

memory editing, game hacking:

https://github.com/qb-0/pyMeow

https://github.com/srounet/Pymem

mirai botnet

defcon for news, intro, wiki

infocon for software, code, wordlists

mec mass exploiting

notes

pc微信hook 获取二维码

pc微信逆向

几个觉得还不错的靶场

封神台:https://hack.zkaq.cn/index

Hack The Box :https://www.hackthebox.com/

htb邀请码获取方法:https://www.mad-coding.cn/2019/11/11/hackthebox%E5%88%9D%E6%8E%A2%E4%B9%8B%E8%8E%B7%E5%8F%96%E9%82%80%E8%AF%B7%E7%A0%81/#0x00-%E5%89%8D%E8%A8%80

Vulhub:https://www.vulnhub.com/

Pikachu:https://github.com/zhuifengshaonianhanlu/pikachu

search engines

youcode search engine for coders, enter coding question to get result

self-hosted recon intelligence tool: osint

ivre network recon framework

publicwww: search for html/css/js source code in website

searchpedia: search engine collection

top 5 recon/intelligence/information gathering tools

search engine hacking, manual and automation

best hacker search engines

scripting

writing nmap scripts

information gathering

uncover quickly discover hosts using multiple search engines

dirsearch scan web paths

1
2
pip3 install dirsearch

virus, botnet

botnet with super escalation system for linux and windows, automatically spread the virus out

webshell 免杀

Hacking tutorials

maybe you should follow kali/parrot/blackarch tutorials first?

暗网 社工库 数据库 暗网黑客教学

暗网自由社区,中文社区,无下限讨论

zuw2gvomnfx5mt6g626srambeqo2yxmac5jpoccttq54z7se36svmlyd.onion

the payload, dedicated tutorial

https://github.com/swisskyrepo/PayloadsAllTheThings

sure it needs everything to hack. the assembly, the tools, the experience, the examples, the automation, the persistence, the vision.

all in one hack tool:

https://github.com/Z4nzu/hackingtool

awesome hacking:

https://github.com/Hack-with-Github/Awesome-Hacking

hacking tutorials and tools:

https://github.com/carpedm20/awesome-hacking

https://github.com/sundowndev/hacker-roadmap

https://github.com/jekil/awesome-hacking

https://github.com/carlospolop/hacktrick

ctf tutorials and tools:

https://github.com/xtiankisutsa/awesome-mobile-CTF

https://github.com/Naetw/CTF-pwn-tips

https://github.com/firmianay/CTF-All-In-One

https://github.com/taviso/ctftool

https://github.com/UnaPibaGeek/ctfr

https://github.com/RsaCtfTool/RsaCtfTool

https://github.com/Gallopsled/pwntools

https://github.com/0Chencc/CTFCrackTools

https://github.com/google/google-ctf

https://github.com/ctf-wiki/ctf-wiki

https://github.com/apsdehal/awesome-ctf

https://github.com/p4-team/ctf

https://github.com/zardus/ctf-tools

some other tools and resources

https://github.com/jopohl/urh

https://github.com/sundowndev/hacker-roadmap

all in one hacking tool for kali linux

https://github.com/edoardottt/awesome-hacker-search-engines

hacker pro hacktool for termux and linux, maybe macos?

sql/xxs scanner, dos, bruteforce ftp/ssh/mail accounts

https://github.com/hacktoolspack/hack-tools

https://github.com/hahwul/WebHackersWeapons

https://github.com/jekil/awesome-hacking

Read More

2022-07-11
Python Bytecode, Time Travel Debugging, Resurrection, Ante-Mortem Debugging, Interactive Debugging, Resume After Exception, Python Ignore All Exceptions And Continue Execute Next Line In Given Section Of Code, Edit And Continue

Python Bytecode, Time Travel Debugging, Resurrection, Ante-Mortem Debugging, Interactive Debugging, Resume after Exception, Python ignore all exceptions and continue execute next line in given section of code

why i hate exceptions

lisp-style resumption error-handling semantics

python for lisp programmers

practical common lisp

arithmatic infix

common lisp debugging

common lisp related libraries

slime

portacle

talk on reddit

ruby

pry-rescue may not resume execution?

java

eclipse hot code swap fix

hot code replace in vscode for java

python

bytecode hack, pyhotswap

python lisp-style exception as condition handling

dump different level of reloading call history

reload code blocks which are syntatically different, if black formatter fails after dedent then there shall be error

decide to reload extra parts of functions in the next run if selected

load newly added functions, remove old functions, execute added lines, reload entire module and update namespace depending on condition

check other programming language whether it jas similar capabilities

visit this thread of ruby in archive.org

wallabyjs

either bytecode or modify the source code

bookmarks

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
https://docs.python.org/3/library/code.html
https://docs.python.org/3/library/cmd.html
https://docs.python.org/3/library/threading.html#threading.settrace
https://mail.python.org/archives/list/python-dev@python.org/thread/OGPO6KWHQGO47KOJKNEWNZS3LLMVXBEV/
https://github.com/TomOnTime/timetravelpdb
https://github.com/nfd/on_error_resume_next/blob/master/basic.py
https://github.com/search?p=5&q=BEFORE_ASYNC_WITH&type=Code
https://github.com/Martmists-GH/pyasm/blob/a306f23cbed13505687eb0ca86f010e5fe3101b5/asm/ops/py35.py
https://github.com/Martmists-GH/pyasm
https://github.com/kr1surb4n/copypaster_filedecks/blob/3f2ca44c4f984652585a1e7f1e589966e8867da6/filedecks_archive/python/library/dis/Python%20Bytecode%20Instructions/opcodeBEFOREASYNCWIT
https://github.com/kholia/dedrop/blob/60da43889be89950cadbbb6b54489eb1841c70da/src/dedrop-ng/opcode_mapper.py
https://github.com/brettlangdon/gython
https://github.com/Exitialium/Github-Drive/blob/5284358a163c4ea25c63f4157d41af5f638950a2/deap/include/python3.9/opcode.h
https://github.com/ajalt/fuckitpy
https://code.lardcave.net/2020/12/29/1/
https://github.com/asrp/python_terp/blob/master/test/buggy_ex.py
https://github.com/HugoDelval/reversibleInterpreter
https://github.com/topics/reversible-programming-language
https://github.com/jndean/railway/wiki/Variables,-Data-and-Scope
https://cn.bing.com/search?q=python+run+bytecode&qs=UT&pq=python+run+byteco&sc=1-17&cvid=79F89EEA4A564540BF79A8DBB63284CE&FORM=QBRE&sp=1
https://opensource.com/article/18/4/introduction-python-bytecode
http://www.aosabook.org/en/500L/a-python-interpreter-written-in-python.html
https://github.com/nedbat/byterun
https://unpyc.sourceforge.net/Opcodes.html
https://docs.python.org/3/library/codeop.html
https://docs.python.org/3/library/dis.html
https://docs.python.org/3/library/dis.html
https://docs.python.org/3/library/codeop.html
https://blog.quarkslab.com/building-an-obfuscated-python-interpreter-we-need-more-opcodes.html
https://github.com/fietensen/PyOpcodeAsm
https://pypi.org/project/BytecodeAssembler/
http://probablyprogramming.com/2008/04/18/ppya-python-assembler
https://pypi.org/project/BytecodeAssembler/#description
http://peak.telecommunity.com/DevCenter/BytecodeAssembler
https://github.com/pib/papaya
https://www.programcreek.com/python/?CodeExample=get+opcode
https://unpyc.sourceforge.net/Opcodes.html
https://www.synopsys.com/blogs/software-security/understanding-python-bytecode/
https://github.com/neuroo/equip
https://tenthousandmeters.com/blog/python-behind-the-scenes-4-how-python-bytecode-is-executed/
https://tenthousandmeters.com/blog/python-behind-the-scenes-5-how-variables-are-implemented-in-cpython/
https://discuss.python.org/t/exec-with-return-keyword/19916/25
https://cn.bing.com/search?q=interactive%20debugging%20python&qs=n&form=QBRE&=%25eManage%20Your%20Search%20History%25E&sp=-1&pq=interactive%20debugging%20&sc=3-22&sk=&cvid=30D653A233984DD685DE7CE79AD46318&ghsh=0&ghacc=0&ghpl=
https://www.digitalocean.com/community/tutorials/how-to-debug-python-with-an-interactive-console
https://nedbatchelder.com/blog/200509/interactive_debugging_in_python.html
https://derpops.bike/python/computers/kubernetes/2017/10/26/interactive-debugging-python-kubernetes.html
https://bytes.com/topic/python/answers/46053-resume-after-exception
https://pytrace.com/
https://github.com/gleb-sevruk/pycrunch-trace/issues

contextlib usage detail, to make customized “with” statements:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from contextlib import AbstractContextManager
class suppress2(AbstractContextManager):
"""Context manager to suppress specified exceptions
After the exception is suppressed, execution proceeds with the next
statement following the with statement.
with suppress(FileNotFoundError):
os.remove(somefile)
# Execution still resumes here if the file was already removed
"""
def __init__(self, *exceptions):
self._exceptions = exceptions
def __enter__(self):
print(dir(self))
pass
def __exit__(self, exctype, excinst, exctb):
# Unlike isinstance and issubclass, CPython exception handling
# currently only looks at the concrete type hierarchy (ignoring
# the instance and subclass checking hooks). While Guido considers
# that a bug rather than a feature, it's a fairly hard one to fix
# due to various internal implementation details. suppress provides
# the simpler issubclass based semantics, rather than trying to
# exactly reproduce the limitations of the CPython interpreter.
#
# See http://bugs.python.org/issue12029 for more details
print("EXCTYPE", exctype)
print("EXCINST", excinst)
print("EXCTB",exctb) # exception
print(dir(exctb))
breakpoint()
return exctype is not None and issubclass(exctype, self._exceptions)

python grammar sugar: brackets

https://pypi.org/project/brackets/

does that work in eval()?

use contextlib.suppress to replace try…except: pass

might investigate source code of the suppress object.

https://opensource.com/article/18/5/how-retrieve-source-code-python-functions

to execute code grouped by lowest level of indentation, we can def those lines of code and pass the code by dill.source.getsource(functionName) and eval within given global/local variables.

my solution is down here, with concrete examples.

hereby we recommend to insert a conditional return statement to ensure we will exit this buggy code at the best time. maybe we could put it into a dictionary somehow, tuples within string or something.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
import dill
from contextlib import suppress
import traceback
def skipException(func, debug_flag=False, breakpoint_flag=False):
def space_counter(line):
counter = 0
for x in line:
if x == " ": counter+=1
else: break
return counter
def remove_extra_return(code):
while True:
if "\n\n" in code:
code = code.replace("\n\n","\n")
else: break
return code
def isEmptyLine(line):
emptyChars = ["\n","\t","\r"," "]
length = len(line)
emptyCounts=0
for char in line:
if char in emptyChars: emptyCounts += 1
return emptyCounts == length
def getCodeBlocks(lines):
mBlocks=[]
current_block = lines[0]
lines = lines+[""]
keywords = [" ", "def", "async def", "with", "class", "@"]
for line in lines[1:]:
if sum([line.startswith(keyword) for keyword in keywords]):
current_block+="\n"
current_block+=line
else:
mBlocks.append(current_block)
current_block = line
return mBlocks
def getExtendedLines(splited_code):
splited_code = [x.rstrip() for x in splited_code]
splited_code = "\n".join(splited_code).replace("\\\n","")
splited_code = remove_extra_return(splited_code)
splited_code = splited_code.split("\n")
return splited_code
def new_func(*args, **kwargs):
func_name = func.__name__
func_code = dill.source.getsource(func)
if debug_flag:
print("########## FUNCTION CODE #########")
print(func_code) # do not use chained decorator since doing so will definitely fail everything?
print("########## FUNCTION CODE #########")
print("########## FUNCTION #########")
# print(func_code)
func_code = remove_extra_return(func_code)
splited_code = func_code.split("\n")
splited_code = getExtendedLines(splited_code)
# index 0: decorator
# index 1: function name
# no recursion support. may work inside another undecorated function.
try:
assert splited_code[0].strip().startswith("@skipException")
except:
raise Exception("Do not nesting the use of @skipException decorator")
function_definition = splited_code[1]
function_args=function_definition[:-1].replace("def {}".format(func_name),"")
if debug_flag:
print("FUNCTION ARGS:", function_args)
kwdefaults = func.__defaults__
pass_kwargs = {}
if "=" in function_args:
assert kwdefaults!=None
arg_remains = function_args.split("=")[0]
kwarg_remains = function_args.replace(arg_remains,"")
kwarg_extra_names =[content.split(",")[-1].strip() for index, content in enumerate(kwarg_remains.split("=")) if index%2 ==1]
mfunctionArgsPrimitive = arg_remains.replace("(","").split(",")
kwarg_names = [mfunctionArgsPrimitive[-1].strip()]+kwarg_extra_names
mfunctionArgs = mfunctionArgsPrimitive[:-1]
if debug_flag:
print("PASSED KEYWORD ARGS:", kwargs)
print("KWARG NAMES:", kwarg_names)
for key, value in zip(kwarg_names, kwdefaults):
pass_kwargs.update({key: value})
for key in kwargs.keys():
assert key in kwarg_names
pass_kwargs[key] = kwargs[key]
else:
assert kwdefaults == None
mfunctionArgs = function_args.replace("(","").replace(")","").split(",")
mfunctionArgs = [x.strip() for x in mfunctionArgs]
mfunctionArgs = [x for x in mfunctionArgs if not isEmptyLine(x)]
if debug_flag:
print("POSITIONAL ARGS:",mfunctionArgs)
assert len(args) == len(mfunctionArgs)
for key, value in zip(mfunctionArgs, args):
exec("{} = {}".format(key, value))
if kwdefaults is not None:
for key, value in pass_kwargs.items():
exec("{} = {}".format(key, value))
actualCode = splited_code[2:]
actualCode = [x for x in actualCode if not isEmptyLine(x)]
minIndent = min([space_counter(line) for line in actualCode])
# split the code into different sections.
if debug_flag:
print(minIndent)
newLines = [line[minIndent:] for line in actualCode]
codeBlocks = getCodeBlocks(newLines)
for block in codeBlocks:
if debug_flag:
print("##########CODEBLOCK##########")
print(block)
print("##########CODEBLOCK##########")
if not debug_flag:
with suppress(Exception):
exec(block)
else:
try:
exec(block)
except:
traceback.print_exc()
if breakpoint_flag: breakpoint()
if debug_flag:
print("########## FUNCTION #########")
return new_func
def skipExceptionVerbose(func): return skipException(func, debug_flag=True)
def skipExceptionBreakpoint(func): return skipException(func, breakpoint_flag=True)
def skipExceptionDebug(func): return skipException(func, breakpoint_flag=True, debug_flag=True)
@skipException
def someOtherShit():
amd=[1,2,3]
amd[4]
print("shit happens")
def anotherShit():
@skipException
def mySuperFunction(d,e,f):
someOtherShit()
print("YOU WIN")
a = [1,2,3]
a[3] # will not continue execute the code down there
print("YOU WIN")
a[4]
print("INSIDE FUNCTION",d,e,f)
print("YOU WIN")
mySuperFunction(1,2,3)
# print(dir(mySuperFunction))
anotherShit()
# breakpoint()

Read More

2022-07-10
Video Effects Transitions

Read More

2022-07-10
Advanced Ass Subtitle Karaoke Effects

Advanced ASS Subtitle Karaoke Effects

library collection and guide on how to create karakoe effects programmatically

lrc files

crop music that does not sing too early? maybe no need.

we need to sort them out by time! prevent serious issues.

skip empty lines?

lrc files only have start time but no end time.

we group parallel lyrics by time, if they are close enough we make it into a group.

groups act as time separators. no two group share the same time. also group have maximum span time, minimum span time calculated by content, and group should always in bound.

should apply the same min-max rule when selecting my video clips

all ass file tags, for custom karaoke effects creation

my karaoke effect:

1
2
3
{\k-50\K400}
{\k-<initial offset>\K<total duration>}

play ass file with mpv on demo video, full screen, no audio:

1
2
3
rootpath=/Users/jamesbrown/desktop/works/pyjom_remote/
mpv --fs --no-audio --sub-file="$rootpath/tests/karaoke_effects/pyonfx_test/examples/2 - Beginner/Output.ass" "$rootpath/samples/video/karaoke_effects_source.mp4"

create karaoke effects

https://github.com/Kagu-chan/FXSpindle

karaoke effects

https://github.com/Youka/NyuFX

pyonfx code

recommend to use effect 2 beginners -> 3 variants in examples, while 3 advanced -> 2 testing pixels as reference (more advanced but incomplete, and might be very intensive)

pyonfx documentation

https://github.com/logarrhythmic/karaOK

aegisub and its plugins

https://github.com/Myaamori/aegisub-cli

https://github.com/qwe7989199/Lyric-Importer-for-Aegisub

https://github.com/qwe7989199/aegisub_scripts

https://github.com/lyger/Aegisub_automation_scripts

http://www.aegisub.org/

eyecandy create karaoke ass files:

https://github.com/Alquimista/Eyecandy-py

create karaoke effects subtitle with lrc file, support chinese

https://github.com/DYY-Studio/lrc2ass_py3

Read More

2022-07-10
Video Editors

Read More

2022-07-10
Beautify 美颜

opencv bilateral filter python

1
2
3
4
5
import cv2 as cv
img = cv.imread('image.jpg')
bilateral = cv.bilateralFilter(img, 15, 75, 75)
cv2.imwrite('img_bilateral.jpg', bilateral)

https://github.com/xujingzhou/VideoBeautify

python美颜瘦脸

https://github.com/Sharpiless/opencv-pyqt-makeup-software

https://github.com/geeklili/Opencv_PIL

https://github.com/PerpetualSmile/BeautyCamera

JavaScript 美颜

https://github.com/KikyoMiao/beauty

Read More