Created
September 15, 2022 13:02
-
-
Save strayge/5a8c43067ea90cf3ca916af6cf279ede to your computer and use it in GitHub Desktop.
goad windows wsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from windows (example below with zsh syntax) | |
py -m pip install pywinrm | |
git clone https://github.com/Orange-Cyberdefense/GOAD.git | |
cd GOAD | |
VAGRANT_HOME=.vagrant_home vagrant up | |
# in case no port access for winrm | |
# https://stackoverflow.com/questions/54010365/how-to-see-what-is-reserving-ephemeral-port-ranges-on-windows | |
# from WSL2 (ubuntu) | |
cd GOAD | |
python3 -m venv venv | |
source ./venv/bin/activate | |
pip install ansible-core pywinrm | |
cd ansible | |
ansible-galaxy install -r requirements.yml | |
ANSIBLE_CONFIG=ansible.cfg ansible-galaxy collection install community.windows:==1.10.0 | |
ANSIBLE_CONFIG=ansible.cfg ansible-playbook main.yml | |
# in case no network access | |
https://github.com/microsoft/WSL/issues/4288 | |
my solve: | |
enable forwarding for vEthernet*, VirtualBox* | |
create new hyper-v switch, external, virtual box interface | |
# wsl network nat fix | |
Get-NetIPInterface | select ifIndex,InterfaceAlias,AddressFamily,ConnectionState,Forwarding | Sort-Object -Property IfIndex | Format-Table | |
Set-NetIPInterface -ifAlias "vEthernet*" -Forwarding Enabled |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment