Add plink, allow mimikatz
This commit is contained in:
parent
b9790c7d9f
commit
6a5e28dc1c
86
config.json
86
config.json
@ -27,16 +27,25 @@
|
||||
"BloodHoundAD/BloodHound": [
|
||||
"Collectors/SharpHound.exe"
|
||||
],
|
||||
"InitRoot/SweetPotato": [
|
||||
"SweetPotato.exe"
|
||||
],
|
||||
"PowerShellMafia/PowerSploit": [
|
||||
"Recon/PowerView.ps1"
|
||||
],
|
||||
"Flangvik/SharpCollection": [
|
||||
"NetFramework_4.7_Any/Rubeus.exe"
|
||||
],
|
||||
"calebstewart/CVE-2021-1675": [
|
||||
"CVE-2021-1675.ps1"
|
||||
],
|
||||
"besimorhino/powercat": [
|
||||
"powercat.ps1"
|
||||
],
|
||||
"r3motecontrol/Ghostpack-CompiledBinaries": [
|
||||
"Seatbelt.exe"
|
||||
]
|
||||
},
|
||||
"githubreleasesync": {
|
||||
"carlospolop/PEASS-ng": {
|
||||
"local_version": "20220807",
|
||||
"local_version": "20230326",
|
||||
"files": [
|
||||
"linpeas.sh",
|
||||
"winPEAS.bat",
|
||||
@ -44,35 +53,60 @@
|
||||
"winPEASany_ofs.exe"
|
||||
]
|
||||
},
|
||||
"jpillora/chisel": {
|
||||
"local_version": "v1.7.7",
|
||||
"files": [
|
||||
{
|
||||
"filename": "chisel_{short_version}_windows_386.gz",
|
||||
"binpath": "chisel.exe"
|
||||
},
|
||||
{
|
||||
"filename": "chisel_{short_version}_linux_386.gz",
|
||||
"binpath": "chisel"
|
||||
},
|
||||
{
|
||||
"filename": "chisel_{short_version}_linux_amd64.gz",
|
||||
"binpath": "chisel64"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AlessandroZ/LaZagne": {
|
||||
"local_version": "2.4.3",
|
||||
"local_version": "v2.4.5",
|
||||
"files": [
|
||||
"lazagne.exe"
|
||||
]
|
||||
},
|
||||
"DominicBreuker/pspy": {
|
||||
"local_version": "v1.2.0",
|
||||
"local_version": "v1.2.1",
|
||||
"files": [
|
||||
"pspy32",
|
||||
"pspy64"
|
||||
]
|
||||
},
|
||||
"itm4n/PrintSpoofer": {
|
||||
"local_version": "v1.0",
|
||||
"files": [
|
||||
"PrintSpoofer32.exe",
|
||||
"PrintSpoofer64.exe"
|
||||
]
|
||||
},
|
||||
"jpillora/chisel": {
|
||||
"local_version": "v1.8.1",
|
||||
"files": [
|
||||
{
|
||||
"filename": "chisel_{short_version}_windows_386.gz",
|
||||
"inpath": "chisel.exe",
|
||||
"outpath": "chisel.exe"
|
||||
},
|
||||
{
|
||||
"filename": "chisel_{short_version}_linux_386.gz",
|
||||
"inpath": "chisel",
|
||||
"outpath": "chisel"
|
||||
},
|
||||
{
|
||||
"filename": "chisel_{short_version}_linux_amd64.gz",
|
||||
"inpath": "chisel64",
|
||||
"outpath": "chisel64"
|
||||
}
|
||||
]
|
||||
},
|
||||
"gentilkiwi/mimikatz": {
|
||||
"local_version": "2.2.0-20220919",
|
||||
"files": [
|
||||
{
|
||||
"filename": "mimikatz_trunk.zip",
|
||||
"inpath": "Win32/mimikatz.exe",
|
||||
"outpath": "mimikatz32.exe"
|
||||
},
|
||||
{
|
||||
"filename": "mimikatz_trunk.zip",
|
||||
"inpath": "x64/mimikatz.exe",
|
||||
"outpath": "mimikatz64.exe"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"ncat": {
|
||||
@ -87,5 +121,11 @@
|
||||
"files": [
|
||||
"nc.exe"
|
||||
]
|
||||
},
|
||||
"plink": {
|
||||
"local_version": "0.78",
|
||||
"files": [
|
||||
"w32/plink.exe"
|
||||
]
|
||||
}
|
||||
}
|
@ -97,10 +97,11 @@ def githubreleasesync(reponame, repoinfo, credz):
|
||||
|
||||
for filename in filenames:
|
||||
if isinstance(filename, dict):
|
||||
binpath = filename['binpath']
|
||||
inpath = filename['inpath']
|
||||
outpath = filename['outpath']
|
||||
filename = filename['filename']
|
||||
filename = filename.replace('{last_version}', last_version).replace('{short_version}', short_version)
|
||||
localfile = Path('files').joinpath(Path(binpath).name)
|
||||
localfile = Path('files').joinpath(outpath)
|
||||
print(f" * {localfile} ", end='')
|
||||
|
||||
else:
|
||||
@ -109,16 +110,20 @@ def githubreleasesync(reponame, repoinfo, credz):
|
||||
print(f" * {localfile} ", end='')
|
||||
|
||||
if filename.endswith('.gz'):
|
||||
is_gz = True
|
||||
is_gz, is_zip = True, False
|
||||
elif filename.endswith('.zip'):
|
||||
is_gz, is_zip = False, True
|
||||
else:
|
||||
is_gz = False
|
||||
is_gz, is_zip = False, False
|
||||
|
||||
urldl = f'https://github.com/{reponame}/releases/download/{last_version}/{filename}'
|
||||
|
||||
if not localfile.exists():
|
||||
content = requests.get(urldl, auth=credz).content
|
||||
if is_gz:
|
||||
extract_bin('gz', binpath, localfile, content)
|
||||
extract_bin('gz', inpath, localfile, content)
|
||||
elif is_zip:
|
||||
extract_bin('zip', inpath, localfile, content)
|
||||
else:
|
||||
with open(localfile, 'wb') as f:
|
||||
f.write(content)
|
||||
@ -131,7 +136,9 @@ def githubreleasesync(reponame, repoinfo, credz):
|
||||
else:
|
||||
content = requests.get(urldl, auth=credz).content
|
||||
if is_gz:
|
||||
extract_bin('gz', binpath, localfile, content)
|
||||
extract_bin('gz', inpath, localfile, content)
|
||||
elif is_zip:
|
||||
extract_bin('zip', inpath, localfile, content)
|
||||
else:
|
||||
with open(localfile, 'wb') as f:
|
||||
f.write(content)
|
||||
@ -251,6 +258,50 @@ def netcatsync(conf):
|
||||
json.dump(data, jsonfile, indent=4)
|
||||
|
||||
|
||||
def plinksync(conf):
|
||||
r = requests.get('https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html')
|
||||
last_version = r.text.split('PuTTY.\nCurrently this is ')[1].split(', ')[0]
|
||||
local_version = conf['local_version']
|
||||
|
||||
for filename in conf['files']:
|
||||
localfile = Path('files').joinpath(Path(filename).name)
|
||||
print(f" * {localfile} ", end='')
|
||||
|
||||
urldl = 'https://the.earth.li/~sgtatham/putty/latest/w32/plink.exe'
|
||||
|
||||
if not localfile.exists():
|
||||
content = requests.get(urldl).content
|
||||
with open(localfile, 'wb') as f:
|
||||
f.write(content)
|
||||
|
||||
print('-> Installed! ;)')
|
||||
else:
|
||||
if local_version == last_version:
|
||||
print('-> Up-to-date.')
|
||||
|
||||
else:
|
||||
content = requests.get(urldl).content
|
||||
with open(localfile, 'wb') as f:
|
||||
f.write(content)
|
||||
|
||||
with open("config.json", "r") as jsonfile:
|
||||
data = json.load(jsonfile)
|
||||
|
||||
data['plink']['local_version'] = last_version
|
||||
|
||||
with open("config.json", "w") as jsonfile:
|
||||
json.dump(data, jsonfile, indent=4)
|
||||
print('-> Updated!')
|
||||
|
||||
with open("config.json", "r") as jsonfile:
|
||||
data = json.load(jsonfile)
|
||||
|
||||
data['plink']['local_version'] = last_version
|
||||
|
||||
with open("config.json", "w") as jsonfile:
|
||||
json.dump(data, jsonfile, indent=4)
|
||||
|
||||
|
||||
def update(config):
|
||||
print("Updating...")
|
||||
with open("credz.json", "r") as jsonfile:
|
||||
@ -263,8 +314,9 @@ def update(config):
|
||||
for reponame, repoinfo in config['githubreleasesync'].items():
|
||||
githubreleasesync(reponame, repoinfo, credz)
|
||||
|
||||
ncatsync(config['ncat'])
|
||||
# ncatsync(config['ncat'])
|
||||
netcatsync(config['netcat'])
|
||||
plinksync(config['plink'])
|
||||
make_executable()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user