diff --git a/README.md b/README.md index c7698c4..f93c5c7 100644 --- a/README.md +++ b/README.md @@ -91,12 +91,14 @@ dist/ │ ├── tailscaled.exe # Standalone tailscaled for attack VM │ ├── tailscale.exe # Standalone tailscale CLI for attack VM │ ├── tailscaled # Linux tailscaled binary +│ ├── tailscale # Linux tailscale client binary │ └── wintun.dll # WinTun driver (bundled) ├── x86/ │ ├── beacon.dll │ ├── tailscaled.exe │ ├── tailscale.exe │ ├── tailscaled +│ ├── tailscale │ └── wintun.dll └── ost/ ├── tailscale_ost_bof.s1.py # Outflank Stage1 integration diff --git a/apache_example.conf b/apache_example.conf new file mode 100644 index 0000000..cd830ec --- /dev/null +++ b/apache_example.conf @@ -0,0 +1,53 @@ + + + # The ServerName directive sets the request scheme, hostname and port that + # the server uses to identify itself. This is used when creating + # redirection URLs. In the context of virtual hosts, the ServerName + # specifies what hostname must appear in the request's Host: header to + # match this virtual host. For the default virtual host (this file) this + # value is not decisive as it is used as a last resort host regardless. + # However, you must set it for any further virtual host explicitly. + ServerName cdn.example.org + + + SSLCertificateFile /etc/letsencrypt/live/cdn.example.org/fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live/cdn.example.org/privkey.pem + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html + + # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, + # error, crit, alert, emerg. + # It is also possible to configure the loglevel for particular + # modules, e.g. + #LogLevel info ssl:warn + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + # For most configuration files from conf-available/, which are + # enabled or disabled at a global level, it is possible to + # include a line for only one particular virtual host. For example the + # following line enables the CGI configuration for this host only + # after it has been globally disabled with "a2disconf". + #Include conf-available/serve-cgi-bin.conf + + SSLEngine On + + ProxyRequests Off + ProxyPreserveHost On + + # ProxyTimeout of 0 is not allowed on standard Apache2 configurations. This is in seconds so about 70 days before it times out + ProxyTimeout 100000000000 + ProxyPass /ts2021 ws://localhost:5566/ts2021 + ProxyPassReverse /ts2021 ws://localhost:5566/ts2021 + + ProxyPass /derp ws://localhost:5566/derp + ProxyPassReverse /derp ws://localhost:5566/derp + + ProxyPass /key http://localhost:5566/key + ProxyPassReverse /key http://localhost:5566/key + +Include /etc/letsencrypt/options-ssl-apache.conf + + diff --git a/tailscale/tailscaled/CMakeLists.txt b/tailscale/tailscaled/CMakeLists.txt index 13d418b..a184b74 100644 --- a/tailscale/tailscaled/CMakeLists.txt +++ b/tailscale/tailscaled/CMakeLists.txt @@ -10,6 +10,7 @@ set(GO_OUTPUT_EXE ${CMAKE_BINARY_DIR}/tailscaled.${ARCH}/tailscaled.exe) set(GO_OUTPUT_CLI_EXE ${CMAKE_BINARY_DIR}/tailscaled.${ARCH}/tailscale.exe) set(GO_OUTPUT_LINUX ${CMAKE_BINARY_DIR}/tailscaled.${ARCH}/tailscaled) +set(GO_OUTPUT_CLI_LINUX ${CMAKE_BINARY_DIR}/tailscaled.${ARCH}/tailscale) if(${ARCH} MATCHES "x64") set(GO_COMPILER "x86_64-w64-mingw32-gcc") @@ -58,15 +59,26 @@ add_custom_command( DEPENDS ${GO_SRC_DIR} ) +add_custom_command( + OUTPUT ${GO_OUTPUT_CLI_LINUX} + COMMAND ${CMAKE_COMMAND} -E env + GOOS=linux GOARCH=${GO_ARCH} CGO_ENABLED=0 + go build -trimpath -ldflags="-s -w" -o ${GO_OUTPUT_CLI_LINUX} + WORKING_DIRECTORY ${GO_SRC_CLI_DIR} + DEPENDS ${GO_SRC_CLI_DIR} +) + add_custom_target(tailscaled.${ARCH} ALL DEPENDS ${GO_OUTPUT}) add_custom_target(tailscaled_cmd.${ARCH} ALL DEPENDS ${GO_OUTPUT_EXE}) add_custom_target(tailscale_cmd.${ARCH} ALL DEPENDS ${GO_OUTPUT_CLI_EXE}) add_custom_target(tailscaled_linux.${ARCH} ALL DEPENDS ${GO_OUTPUT_LINUX}) +add_custom_target(tailscale_linux.${ARCH} ALL DEPENDS ${GO_OUTPUT_CLI_LINUX}) add_dependencies(tailscaled.${ARCH} beacon) install(FILES ${GO_OUTPUT} DESTINATION "pe/") install(FILES ${GO_OUTPUT_EXE} DESTINATION "${ARCH}/") install(FILES ${GO_OUTPUT_CLI_EXE} DESTINATION "${ARCH}/") install(FILES ${GO_OUTPUT_LINUX} DESTINATION "${ARCH}/") +install(FILES ${GO_OUTPUT_CLI_LINUX} DESTINATION "${ARCH}/") install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/wintun.dll DESTINATION "${ARCH}/") install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/tailscaled_ost_bof.s1.py DESTINATION "ost/")