Last active
February 20, 2021 11:35
-
-
Save lesnuages/9909121e8bec5b947b915b496314a813 to your computer and use it in GitHub Desktop.
vscode Sliver devcontainer configuration
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
Show hidden characters
{ | |
"name": "Go", | |
"build": { | |
"dockerfile": "Dockerfile", | |
}, | |
"runArgs": [ | |
"--cap-add=SYS_PTRACE", | |
"--security-opt", | |
"seccomp=unconfined", | |
"--userns=keep-id", | |
"--user=1000:1000", | |
], | |
"workspaceMount": "source=${localWorkspaceFolder},destination=/go/src/github.com/bishopfox/sliver,type=bind,relabel=private", | |
"workspaceFolder": "/go/src/github.com/bishopfox/sliver", | |
// Set *default* container specific settings.json values on container create. | |
"settings": { | |
"terminal.integrated.shell.linux": "/bin/bash", | |
"go.toolsManagement.checkForUpdates": "off", | |
"go.useLanguageServer": true, | |
"go.gopath": "/go", | |
"go.goroot": "/usr/local/go" | |
}, | |
// Add the IDs of extensions you want installed when the container is created. | |
"extensions": [ | |
"golang.Go" | |
], | |
// Use 'forwardPorts' to make a list of ports inside the container available locally. | |
// "forwardPorts": [], | |
// Use 'postCreateCommand' to run commands after the container is created. | |
// "postCreateCommand": "go version", | |
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | |
"remoteUser": "vscode", | |
} |
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 mcr.microsoft.com/vscode/devcontainers/go:1.16 | |
ENV PROTOC_VER 3.11.4 | |
ENV PROTOC_GEN_GO_VER 1.3.5 | |
# Base packages | |
RUN apt-get update --fix-missing && apt-get -y install \ | |
git build-essential zlib1g zlib1g-dev \ | |
libxml2 libxml2-dev libxslt-dev locate curl \ | |
libreadline6-dev libcurl4-openssl-dev git-core \ | |
libssl-dev libyaml-dev openssl autoconf libtool \ | |
ncurses-dev bison curl wget xsel postgresql \ | |
postgresql-contrib postgresql-client libpq-dev \ | |
libapr1 libaprutil1 libsvn1 \ | |
libpcap-dev libsqlite3-dev libgmp3-dev \ | |
zip unzip mingw-w64 binutils-mingw-w64 g++-mingw-w64 \ | |
nasm | |
# Metasploit | |
RUN curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \ | |
chmod 755 msfinstall && \ | |
./msfinstall | |
RUN mkdir -p ~/.msf4/ && touch ~/.msf4/initial_setup_complete && \ | |
su -l vscode -c 'mkdir -p ~/.msf4/ && touch ~/.msf4/initial_setup_complete' | |
# Sliver | |
# protoc | |
WORKDIR /tmp | |
RUN wget -O protoc-${PROTOC_VER}-linux-x86_64.zip https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VER}/protoc-${PROTOC_VER}-linux-x86_64.zip \ | |
&& unzip protoc-${PROTOC_VER}-linux-x86_64.zip \ | |
&& cp -vv ./bin/protoc /usr/local/bin | |
RUN wget -O protoc-gen-go.tar.gz https://github.com/golang/protobuf/archive/v${PROTOC_GEN_GO_VER}.tar.gz \ | |
&& tar xvf protoc-gen-go.tar.gz \ | |
&& cd protobuf-${PROTOC_GEN_GO_VER} \ | |
&& make install | |
RUN mkdir -p /go/src/github.com/bishopfox/sliver | |
WORKDIR /go/src/github.com/bishopfox/sliver | |
ENTRYPOINT ["/bin/bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment