$domain= ”YOURDOMAIN”$pass=ConvertTo-SecureString -String ‘YOURPASS’ -AsPlainText -Force$creds=New-Object System.Management.Automation.pscredential -ArgumentList $domain, $pass (Get-Content c:\server_list.txt| Foreach{Invoke-Command -ComputerName $_ -Verbose -ScriptBlock{get-windowsfeature |Where-Object{$_.installed -eq $true -and $_.featuretype -eq ‘Role’} |select name, installed -ExcludeProperty subfeatures} -Credential $creds}) | `Format-Table -Property Name, Installed, @{name=’Server Name’;expression={$_.pscomputername}} -AutoSize
Gaining Access to a Windows Host via reverse TCP shell and Key Logging captured keystrokes.
In this tutorial we will create a reverse shell to a Windows laptop which is running in my lab environment this will be the victim. First we need to create a malicious .exe file We will also need to a…
Build NGINX Server / Firewalld with Ansible
ssh-copy-id root@10.66.10.29 You should now be able to SSH into the host without a password you can try this Configure your ansible host these are in /etc/ansible/hosts [testserver]10.66.10.29 cd to /etc/ansible/playbook place the below in this directory, along with index.html…
Unify Controller
docker create –name=unifi-controller -e PUID=1000 -e PGID=1000 -p 3478:3478/udp -p 10001:10001/udp -p 8080:8080 -p 8443:8443 -v /config –restart unless-stopped linuxserver/unifi-controller Restore the controller from a backup or reconfigure the controller. If the controller is new and not adopted then you…
Increase disk on Centos 7
My instance of centos is running on azure this should not have any difference. First of all lets view the current drive information. The drive i will be extending is /dev/sda1 To ensure our results are correct along the way,…
Bulk Add WVD users / AD export
The start of coronavirus we had to spin up WVD on azure due to not having enough personal laptops. The below script was used to export all users in our AD and import into the WVD so they could log…
Reset Centos 8 “root” password.
Oh no ! You have forgot or mistyped your root password on Centos 8 what do we do ? Boot to the grub menu Go to the line which beings with “kernal auto” press “CTRL+E” to go to the end…
Bash Script To Rotate A Log file To A Time Stamped File – Linux
A bash script that rotates a file (logfile.txt) to a timestamped file(logfile_20180719.txt), which could be invoked by cron every 24 hours. Move the created bash file to newly created scripts folder. mv /home/hass/rotate.sh /var/scripts/rotate.sh Change permission to allow +x (execute…