Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
53 changes: 53 additions & 0 deletions apache_example.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<IfModule mod_ssl.c>
<VirtualHost *:443>
# 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
</VirtualHost>
</IfModule>
12 changes: 12 additions & 0 deletions tailscale/tailscaled/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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/")