?

FreeDNS Services

upx and exe2hex

UPX is an executable packer on Kali for compressing PE.

upx -9 <EXE_File>

After compression, you could transfer it to a Windows script.

exe2hex -x <EXE_file> -p <xxx.cmd>

After transferring to the target Windows machine, rebuild the exe:

powershell -Command "$h=Get-Content -readcount 0 -path './xx.hex';$l=$h[0].length;$b=New-Object byte[] ($l/2);$x=0;for ($i=0;$i -le $l-1;$i+=2){$b[$x]=[byte]::Parse($h[0].Substring($i,2),[System.Globalization.NumberStyles]::HexNumber);$x+=1};set-content -encoding byte 'xx.exe' -value $b;Remove-Item -force xx.hex;"

IPTable Default

#!/bin/bash
# Clear iptables rules 
iptables -P INPUT ACCEPT 
iptables -P FORWARD ACCEPT 
iptables -P OUTPUT ACCEPT 
iptables -F 
iptables -X

APT install sucks

When installing stuff using apt install , sometimes you will see dependencies error and it suggests you to do apt --fix-broken install.

If you are seeing something like:

dpkg: error processing archive /var/cache/apt/archives/oracle-instantclient-basic_19.6.0.0.0-0kali1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/oracle/19.6/client64/bin/adrci', which is also in package oracle-instantclient19.6-basic 19.6.0.0.0-2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/oracle-instantclient-basic_19.6.0.0.0-0kali1_amd64.deb

What you can do is:

apt --fix-broken install -o Dpkg::Options::="--force-overwrite"

Last updated