-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
1,408 additions
and
17 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Introduction to the use of strace for dynamic analysis |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
strace | ||
reverse engineering |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
portnumber : RAND_REPLACE : the-client:ob.c;the-server:ob.c : MY_PORT_NUMBER : 1 : 20000 : 2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
GLOBAL_SETTINGS | ||
LAB_MASTER_SEED strace_mike_master_seed | ||
NETWORK LAN | ||
MASK 10.10.0.0/24 | ||
GATEWAY 10.10.0.101 | ||
CONTAINER the-server | ||
USER ubuntu | ||
X11 YES | ||
LAN 10.10.0.2 | ||
CONTAINER the-client | ||
USER ubuntu | ||
X11 YES | ||
LAN 10.10.0.1 |
65 changes: 65 additions & 0 deletions
65
labs/strace/dockerfiles/Dockerfile.strace.the-client.student
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# | ||
# Labtainer Dockerfile | ||
# | ||
# This is the default Labtainer Dockerfile template for CentOS | ||
# | ||
# | ||
ARG registry | ||
FROM $registry/labtainer.ghidra2 | ||
# | ||
# lab is the fully qualified image name, e.g., mylab.some_container.student | ||
# labdir is the name of the lab, e.g., mylab | ||
# imagedir is the name of the container | ||
# user_name is the USER from the start.config, if other than ubuntu, | ||
# then that user must be added in this dockerfile | ||
# before the USER command | ||
# | ||
ARG lab | ||
ARG labdir | ||
ARG imagedir | ||
ARG user_name | ||
ARG password | ||
ARG apt_source | ||
ARG version | ||
LABEL version=$version | ||
ENV APT_SOURCE $apt_source | ||
RUN /usr/bin/yum-source.sh | ||
# | ||
# put package installation here | ||
# | ||
# | ||
# Install the system files found in the _system directory | ||
# | ||
ADD $labdir/$imagedir/sys_tar/sys.tar / | ||
ADD $labdir/sys_$lab.tar.gz / | ||
# | ||
RUN useradd -ms /bin/bash $user_name | ||
RUN echo "$user_name:$password" | chpasswd | ||
# replace above with below for centos/fedora | ||
RUN usermod $user_name -a -G wheel | ||
|
||
RUN yum clean metadata | ||
RUN yum install -y strace gcc | ||
|
||
# | ||
# **** Perform all root operations, e.g., **** | ||
# **** "apt-get install" prior to the USER command. **** | ||
# | ||
USER $user_name | ||
ENV HOME /home/$user_name | ||
# | ||
# Install files in the user home directory | ||
# | ||
ADD $labdir/$imagedir/home_tar/home.tar $HOME | ||
# remove after docker fixes problem with empty tars | ||
RUN rm -f $HOME/home.tar | ||
ADD $labdir/$lab.tar.gz $HOME | ||
# | ||
# The first thing that executes on the container. | ||
# | ||
USER root | ||
RUN systemctl enable rc-local | ||
CMD ["/usr/sbin/init"] | ||
# | ||
# DO NOT add below this line. | ||
# |
73 changes: 73 additions & 0 deletions
73
labs/strace/dockerfiles/Dockerfile.strace.the-server.student
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# | ||
# Labtainer Dockerfile | ||
# | ||
# This is the default Labtainer Dockerfile template, plesae choose the appropriate | ||
# base image below. | ||
# | ||
# The labtainer.base image includes the following packages: | ||
# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev | ||
# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog | ||
# | ||
# The labtainer.network image adds the following packages: | ||
# openssl openssh-server openvpn wget tcpdump update-inetd xinetd | ||
# | ||
ARG registry | ||
FROM $registry/labtainer.network2 | ||
#FROM $registry/labtainer.network | ||
#FROM $registry/labtainer.centos | ||
#FROM $registry/labtainer.lamp | ||
# | ||
# lab is the fully qualified image name, e.g., mylab.some_container.student | ||
# labdir is the name of the lab, e.g., mylab | ||
# imagedir is the name of the container | ||
# user_name is the USER from the start.config, if other than ubuntu, | ||
# then that user must be added in this dockerfile | ||
# before the USER command | ||
# | ||
ARG lab | ||
ARG labdir | ||
ARG imagedir | ||
ARG user_name | ||
ARG password | ||
ARG apt_source | ||
ARG version | ||
LABEL version=$version | ||
ENV APT_SOURCE $apt_source | ||
RUN /usr/bin/apt-source.sh | ||
# | ||
# put package installation here, e.g., | ||
# RUN apt-get update && apt-get install -y --no-install-recommends somepackage | ||
# | ||
# | ||
# | ||
# Install the system files found in the _system directory | ||
# | ||
ADD $labdir/$imagedir/sys_tar/sys.tar / | ||
ADD $labdir/sys_$lab.tar.gz / | ||
# | ||
RUN useradd -ms /bin/bash $user_name | ||
RUN echo "$user_name:$password" | chpasswd | ||
RUN adduser $user_name sudo | ||
# replace above with below for centos/fedora | ||
#RUN usermod $user_name -a -G wheel | ||
|
||
|
||
# | ||
# **** Perform all root operations, e.g., **** | ||
# **** "apt-get install" prior to the USER command. **** | ||
# | ||
USER $user_name | ||
ENV HOME /home/$user_name | ||
# | ||
# Install files in the user home directory | ||
# | ||
ADD $labdir/$imagedir/home_tar/home.tar $HOME | ||
# remove after docker fixes problem with empty tars | ||
RUN rm -f $HOME/home.tar | ||
ADD $labdir/$lab.tar.gz $HOME | ||
# | ||
# The first thing that executes on the container. | ||
# | ||
USER root | ||
CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
strace.pdf: strace.tex header.tex | ||
pdflatex -jobname=strace strace | ||
pdflatex -jobname=strace strace | ||
|
||
clean: | ||
rm -fr auto | ||
rm -f *.aux *.log *.pdf *.dvi *.out |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
\documentclass[11pt]{article} | ||
|
||
\usepackage{times} | ||
\usepackage{epsf} | ||
\usepackage{epsfig} | ||
\usepackage{amsmath, alltt, amssymb, xspace} | ||
\usepackage{wrapfig} | ||
\usepackage{fancyhdr} | ||
\usepackage{url} | ||
\usepackage{verbatim} | ||
\usepackage{fancyvrb} | ||
\usepackage{float} | ||
|
||
\usepackage{subfigure} | ||
\usepackage{cite} | ||
\usepackage{hyperref} | ||
\hypersetup{% | ||
pdfborder = {0 0 0} | ||
} | ||
\topmargin -0.50in % distance to headers | ||
\oddsidemargin 0.0in | ||
\evensidemargin 0.0in | ||
\textwidth 6.5in | ||
\textheight 8.9in | ||
|
||
|
||
%\centerfigcaptionstrue | ||
|
||
%\def\baselinestretch{0.95} | ||
|
||
|
||
\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} | ||
%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} | ||
\newtheorem{problem}{Problem}[section] | ||
%\newtheorem{theorem}{Theorem} | ||
%\newtheorem{fact}{Fact} | ||
\newtheorem{define}{Definition}[section] | ||
%\newtheorem{analysis}{Analysis} | ||
\newcommand\vspacenoindent{\vspace{0.1in} \noindent} | ||
|
||
%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} | ||
%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} | ||
|
||
%\newcommand\reducespace{\vspace{-0.1in}} | ||
% reduce the space between lines | ||
%\def\baselinestretch{0.95} | ||
|
||
\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } | ||
\newcommand{\todo}[1]{ | ||
\vspace{0.1in} | ||
\fbox{\parbox{6in}{TODO: #1}} | ||
\vspace{0.1in} | ||
} | ||
|
||
\newcommand{\mybox}[1]{ | ||
\vspace{0.2in} | ||
\noindent | ||
\fbox{\parbox{6.5in}{#1}} | ||
\vspace{0.1in} | ||
} | ||
|
||
|
||
\newcounter{question} | ||
\setcounter{question}{1} | ||
|
||
\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} | ||
|
||
\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} | ||
|
||
|
||
\newcommand{\copyrightnotice}[1]{ | ||
\vspace{0.1in} | ||
\fbox{\parbox{6in}{ | ||
This lab was developed for the Labtainer framework by the Naval Postgraduate | ||
School, Center for Cybersecurity and Cyber Operations under sponsorship from | ||
the National Science Foundation Award Number 1932950. This work is in the public domain, and cannot be copyrighted.}} | ||
\vspace{0.1in} | ||
} | ||
|
||
|
||
\newcommand{\idea}[1]{ | ||
\vspace{0.1in} | ||
{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} | ||
\vspace{0.1in} | ||
} | ||
|
||
\newcommand{\questionblock}[1]{ | ||
\vspace{0.1in} | ||
\fbox{\parbox{6in}{#1}} | ||
\vspace{0.1in} | ||
} | ||
|
||
|
||
\newcommand{\argmax}[1]{ | ||
\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} | ||
argmax | ||
#1 | ||
\end{center}\end{minipage} | ||
\; | ||
} | ||
|
||
\newcommand{\bm}{\boldmath} | ||
\newcommand {\bx} {\mbox{\boldmath $x$}} | ||
\newcommand {\by} {\mbox{\boldmath $y$}} | ||
\newcommand {\br} {\mbox{\boldmath $r$}} | ||
|
||
|
||
\newcommand{\tstamp}{\today} | ||
%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} | ||
|
||
\pagestyle{fancy} | ||
\lhead{\bfseries Labtainers} | ||
\chead{} | ||
\rhead{\small \thepage} | ||
\lfoot{} | ||
\cfoot{} | ||
\rfoot{} | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The lab manual is at | ||
file://LAB_DOCS/strace.pdf | ||
|
||
You may open these by right clicking | ||
and select "Open Link". |
Binary file not shown.
Oops, something went wrong.