---
title: Install sectrain on Linux | Snap Store
description: Get the latest version of sectrain for Linux - A training tool displaying
  some techniques for secure web app development
url: https://snapcraft.io/sectrain
---

# sectrain

[Joe McManus (joesecurity)](https://snapcraft.io/publisher/joesecurity "View all snaps from Joe McManus (joesecurity)")

* [Joe McManus (joesecurity)](https://snapcraft.io/publisher/joesecurity "View all snaps from Joe McManus (joesecurity)")
* [Education](https://snapcraft.io/search?categories=education)
* [Security](https://snapcraft.io/search?categories=security)

latest/stable 9.6

Install latest/stable of sectrain

This channel hasn't been updated in a while. It might be unmaintained and have stability or security issues.

---

**Install using the command line**

```
sudo snap install sectrain
```

Don't have snapd? [Get set up for snaps](https://snapcraft.io/docs/installing-snapd).

---

### Package name

* sectrain

---

### License

* GPL-3.0+

---

### Last updated

* 8 October 2023 - latest/stable
* 8 October 2023 - latest/edge

This snap hasn't been updated in a while. It might be unmaintained and have stability or security issues.

---

##### Report a Snap Store violation

* [Report this Snap](https://snapcraft.io/sectrain#report-snap-modal)

---

* [Description](https://snapcraft.io/sectrain#tab-description)
* [Security](https://snapcraft.io/sectrain#tab-security)

#### A training tool displaying some techniques for secure web app development

**Overview**
sectrain is a program to illustrate some of the security issues common in applications such as XSS and buffer overflows along with how to stop them. Currently this shows example in PHP and
Python.

Still to be done is include javascript, SQLi and C++ buffer overflows, should be done shortly.

**Installation**

The simplest way to install sectrain is to use the snap

```
 sudo snap install sectrain
```

\*\*Web Starting \*\*

```
 sectrain startweb
```

**Web Stopping**

```
 sectrain stopweb
```

\*\*Web Usage \*\*

Open your browser to your host on port 1984, then browse choose the secure or insecure links. Try an exploit such as :

```
 "><script>alert('xss');</script>
```

You will see how sanitizing the input/output helps solve these issues.

**Python Buffer Overflows**

There are two examples to look at, pybuffgood and pybuffbad, sending in too long of a string breaks it. Simple, but still a good way to illustrate the point.

```
 sectrain pybuffbad  abcdefghijkl
 sectrain pybuffgood abcdefghijkl
```

Clearly more can be done, but this is just to aid in getting people interested in fixing their code.

---

## Install sectrain on your Linux distribution

Choose your Linux distribution to get detailed installation instructions. If yours is not shown, get more details on the [installing snapd documentation](https://snapcraft.io/docs/installing-snapd).

[### Arch Linux](https://snapcraft.io/install/sectrain/arch)

[### CentOS](https://snapcraft.io/install/sectrain/centos)

[### Debian](https://snapcraft.io/install/sectrain/debian)

[### elementary OS](https://snapcraft.io/install/sectrain/elementary)

[### Fedora](https://snapcraft.io/install/sectrain/fedora)

[### KDE Neon](https://snapcraft.io/install/sectrain/kde-neon)

[### Kubuntu](https://snapcraft.io/install/sectrain/kubuntu)

[### Manjaro](https://snapcraft.io/install/sectrain/manjaro)

[### Pop!\_OS](https://snapcraft.io/install/sectrain/pop)

[### openSUSE](https://snapcraft.io/install/sectrain/opensuse)

[### Red Hat Enterprise Linux](https://snapcraft.io/install/sectrain/rhel)

[### Ubuntu](https://snapcraft.io/install/sectrain/ubuntu)

[### Raspberry Pi](https://snapcraft.io/install/sectrain/raspbian)
