Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
hello lel
Browse files Browse the repository at this point in the history
  • Loading branch information
CF @invist committed Nov 4, 2019
0 parents commit 37c96d1
Show file tree
Hide file tree
Showing 156 changed files with 23,773 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build.sh
static/node_modules
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
static/node_modules
static/dist/*.js
crts/
pkg/
_lel-ansible-playbook/inv.yml
_lel-ansible-playbook/seafile.release.txt
_lel-ansible-playbook/sync-server.retry
20 changes: 20 additions & 0 deletions .goxc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"AppName": "LeL",
"PackageVersion": "v0.0.1",
"ConfigVersion": "0.9",
"Resources": {
"Include": "README.md,static/dist/app-prod.js,static/dist/icons/*,static/dist/vendor/*,_lel-*",
"Exclude": "*.go"
},
"go-fmt": {
"dir": "./..."
},
"ArtifactsDest": "./pkg/{{.AppName}}",
"Tasks": ["xc", "archive"],
"BuildConstraints": "linux,amd64 windows,amd64,darwin",
"TaskSettings": {
"xc": {
"GOARM": "7"
}
}
}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Changelog (todo.txt)
(A) 2019-11-04 Launching LEL +genesis +editor +v0.0.1 +beta @iNvist
46 changes: 46 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# --[Dockerfile for building LEL by your own]--

FROM node AS build-frontend
COPY ./static/*js /app/
COPY ./static/.babelrc /app/
COPY ./static/src /app/src/
COPY ./static/package.json /app/
WORKDIR /app
RUN mkdir dist \
&& npm install \
&& npm install react@^16.9.0 \
&& npm install react-dom@^16.9.0 \
&& npm run build

# --[Builder]--
FROM golang:1.13-alpine as build-backend
WORKDIR /go/src/github.com/c-f/lel
COPY ./ .
RUN cd cmd/lel && go build -o /tmp/lel

# --[GOXC]--
# used as a template
FROM golang:1.13-alpine as goxc
WORKDIR /go/src/github.com/c-f/lel
COPY ./ .
COPY --from=build-frontend /app/dist/app-prod.js static/dist/
RUN go get && go get github.com/laher/goxc

# --[Final LEL server]--
FROM alpine:3.10
ARG USER_ID=1000

WORKDIR /app

RUN adduser -H -D -u "${USER_ID}" lel \
&& mkdir -p /app/static/dist \
&& mkdir -p /project

COPY --from=build-frontend /app/dist/app-prod.js static/dist/
COPY --from=build-backend /tmp/lel /app/lel
COPY static/dist/icons /app/static/dist/icons
COPY static/dist/vendor /app/static/dist/vendor

RUN chown -R lel:lel /app && chown -R lel:lel /project
VOLUME /project
USER lel
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 c-f

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
156 changes: 156 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# LEL

```bash
TLDR; Explode your notes.
A PoC for a better keepnote
```

![LEL - no need for more](./docs/LEL.png)

LEL is a visualization layer and helper for relevant documentation and note taking focused on IT operations.

LEL is built with <3 in Go and React by [iNvist](https://twitter.com/invist) .

[Website](https://editor.l3l.lol) |
[Documentation](./docu/guide.md) |
[Installation Guide](./docs/installation.md)

[![GoDoc](https://godoc.org/github.com/c-f/lel?status.svg)](https://godoc.org/github.com/c-f/lel)
[![Build Status](https://api.travis-ci.org/c-f/lel.svg?branch=master)](https://travis-ci.org/c-f/lel)
[![Go Report Card](https://goreportcard.com/badge/github.com/c-f/lel)](https://goreportcard.com/report/github.com/c-f/lel)

## Overview

![STATUS:BETA](https://img.shields.io/badge/Status-beta-blue)

The tool is heavily focused to help structuring relevant infos for Redteam, Pentest, Research, Bugbounty and Ops. Go create your own **explosion**

https://editor.l3l.lol

---

**Installation**:
[here](#install)

**Usage**:
[here](#usage)

**Dependencies**:
[here](docs/dependencies.md).

**Development**:
[Dev-Docs](docs/development.md)

**Bugs**:
[More information](docs/bugs.md)

**Automation**:
[Automation](docs/automation.md)

**API**:
[API](docs/api.md)

**Guide**:
[guide](docs/guide.md)

---

## Install

> LEL can be cross compiled and is therefore available for Windows, Linux
LEL can be downloaded through github releases

### Docker

In this repo you find a `docker-compose.yml`, which can be used to start LEL:

```bash
docker pull invist/lel:v0.0.1
docker-compose up
```

The official Repo for lel is [invist/lel:v0.0.1](https://hub.docker.com/r/invist/lel).

## Usage

> Because sharing is Caring
[More examples](docs/guide.md) can be found in the guide:

```bash
./lel -docu <docupath> -editor /usr/bin/code -addr 127.0.0.1:8888
```

## Metatags

Metatags are the explosion parts of LEL:

More details and documentation can be found [here](./docs/metatags.md)

| Metatag | Required | Short definition |
| ------- | -------- | ------------------------------------------- |
| @ref | - | Link between entities |
| @todo | - | Indicates the start of a todo list |
| @tags | - | Give your notes some context and group them |
| @name | yes | Id parameter to reference the entity. |
| @label | - | Graph label for node |
| @entity | yes | Specifiy which entity a note should be. |
| @icon | - | Lets you specify your own icon |
| | - | |
| ? | - | Do you think we missed one ? -> gh issue <3 |

````
```
@name example.com, 127.0.0.1, HOST.ad.example.com
@entity server
@label example.com
@tags entrypoint, linux, dmz, germany,
# references
@ref (c2)->[:webshell-1]->(this)
@ref (this)->[access]->(proxy)
@ref (this)->[access]->(intra.example.com)
```
# Example.com
> Some information about the host
## Postexploitation
```
@todo post
run +mimikatz +postexploit
collect +creds
deploy webshell
```
````

## FAQ

- **Q:** My External editor is not working ?

**A** Please specify an external editor with the `-editor` parameter and click the toggleButton in the LeL settings.

- **Q:** Can I use LEL for private/corporate projects ?

**A:** Absolutely

- **Q:** What does LEL stand for ?

**A:** Of course LEL stands for the [_Lower explosion limit_](https://en.wikipedia.org/wiki/Flammability_limit).

_The lowest concentration (percentage) of a gas or a vapor in air capable of producing a flash of fire in the presence of an ignition source (arc, flame, heat)_

- **Q:** But why should i use LEL when i have xyz

**A** You can choose whatever editor you like. In fact LEL is supporting external editors :) Try it out LEL can coexist between sublime, VS-code, Seafile, Gitlab

- **Q:** Why a Logo / Website / Stuff ?

**A** Just for fun ¯\_(ツ)\_/¯ - giving something back to the community: https://editor.l3l.lol/

- **Q:** But XYZ is missing !

**A** No problem - write an issue and we add it to the feature board.
2 changes: 2 additions & 0 deletions _lel-ansible-playbook/misc_docu_srv._usernames.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
operators:
- [email protected]
17 changes: 17 additions & 0 deletions _lel-ansible-playbook/roles/seafile_server/files/Dockerfile.client
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ubuntu:bionic

RUN apt update && apt install -y software-properties-common \
&& add-apt-repository ppa:seafile/seafile-client \
&& apt update -y \
&& apt install -y seafile-gui seafile-cli procps curl grep \
&& rm -rf /var/lib/apt/lists/*

VOLUME /seafile-client
WORKDIR /seafile-client

RUN useradd -U -d /seafile-client -s /bin/bash seafile \
&& usermod -G users seafile \
&& chown seafile:seafile -R /seafile-client \
&& su - seafile -c "seaf-cli init -d /seafile-client"

CMD ["seafile-applet"]
97 changes: 97 additions & 0 deletions _lel-ansible-playbook/roles/seafile_server/files/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Documentation Documentation :D
> This file contains all information in order to setup and configure the client properly.
## Prequisition
docker, docker-compose, socat

```bash
sudo apt install docker.io socat
# can also be docker-ce (based on the official installation)
sudo pip install docker-compose
```

## Setup
> (simple VM has internet access, direct SSH connection possible)
0. Create a new Directory for the docu
```bash
lel@srv:~$ mkdir -p ~/_current/docu
```
1. Download the following files into your documentation VM (except for the docker-compose.yml)
```bash
README.md client.Dockerfile docker-compose.client.yml setup.sh
```
2. Create the environment (./setup.sh)
```bash
lel@srv:~/_current/docu$ ./setup.sh
```
3. Create SSH-Connection
Forward the remote port 127.0.0.1:13331 to the docker network of the container
```bash
lel@srv:~/_current/docu$ export DOCU_NET=$(docker network inspect client-test_default -f "{{range .IPAM.Config}}{{.Gateway}}{{end}}")
lel@srv:~/_current/docu$ ssh -L 127.0.0.1:13331:$(DOCU_NET):13331 <docu_srv>

# or in the SSH-config (vim ~/.ssh/config)
LocalForward <docker-network>:13331 127.0.0.1:13331
```
------------------------------------

## Setup Restricted
> (VM has no dns/internet - only socks)
0. Use the same step until step 2.
1. Configure Docker to use the socks proxy
```bash
root@srv:/home/lel/_current/docu# mkdir -p /etc/systemd/system/docker.service.d
root@srv:/home/lel/_current/docu# echo -e '[Service]\nEnvironment="ALL_PROXY=socks5://<>:1080"' > /etc/systemd/system/docker.service.d/socks-proxy.conf
root@srv:/home/lel/_current/docu# systemctl daemon-reload && systemctl restart docker
```
2. Configure docker-compose to use socks proxy.
> Add additional args to the docker-compose.client.yml file/ replace <socks>:1080 with your addrs.
> Please add it to both client
```
client:
build:
context: .
dockerfile: client.Dockerfile
args:
- USER_ID=${UID}
- http_proxy=socks5h://<socks>:1080
- https_proxy=socks5h://<socks>:1080
- ALL_PROXY=socks5h://<socks>:1080
```
3. Create the environment (./setup.sh) (same)
```bash
lel@srv:~/_current/docu$ ./setup.sh
```
4. Use Socat to tunnel from the other SSH-IP to the documentation container
```bash
lel@srv:~/_current/docu$ export DOCU_NET=$(docker network inspect client-test_default -f "{{range .IPAM.Config}}{{.Gateway}}{{end}}")
lel@srv:~/_current/docu$ socat TCP-LISTEN:13331,bind=${DOCU_NET},fork TCP:<ssh-forward-ip>:13331
```
---------------------------------------

## Usage Seafile
1. Configure seafile:
```bash
/seafile-client is the location

Server is the docu_net, which was previously exported into ${DOCU_NET}
Protocol is http, Port is 13331

e.g. http://172.22.0.1:13331

User and Password are generated and will be provided.
```
2. After login you'll see the library "docu", which is a end-to-end lib
```bash
Right-click and use "Sync this Library", specify /data

E2E-Password was allready generated and will be provided.
```
3. Finished
> The documentation folder is now synced and can also be accessed in the normal folder
```bash
`pwd`/seafile-data
```

Loading

0 comments on commit 37c96d1

Please sign in to comment.