Skip to content

Commit 76081a5

Browse files
committed
Crowdin
1 parent 8eb5c4e commit 76081a5

8 files changed

+601
-1
lines changed

crowdin.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
project_identifier_env: CROWDIN_PROJECT_ID
2+
#project_identifier_env: CROWDIN_DOCUSAURUS_PROJECT_ID
3+
#api_key_env: CROWDIN_DOCUSAURUS_API_KEY
4+
api_key_env: CROWDIN_API_KEY
5+
base_path: "./"
6+
preserve_hierarchy: true
7+
8+
files:
9+
-
10+
source: '/docs/*.md'
11+
translation: '/website/translated_docs/%locale%/%original_file_name%'
12+
languages_mapping: &anchor
13+
locale:
14+
'af': 'af'
15+
'ar': 'ar'
16+
'bs-BA': 'bs-BA'
17+
'ca': 'ca'
18+
'cs': 'cs'
19+
'da': 'da'
20+
'de': 'de'
21+
'el': 'el'
22+
'es-ES': 'es-ES'
23+
'fa': 'fa-IR'
24+
'fi': 'fi'
25+
'fr': 'fr'
26+
'he': 'he'
27+
'hu': 'hu'
28+
'id': 'id-ID'
29+
'it': 'it'
30+
'ja': 'ja'
31+
'ko': 'ko'
32+
'mr': 'mr-IN'
33+
'nl': 'nl'
34+
'no': 'no-NO'
35+
'pl': 'pl'
36+
'pt-BR': 'pt-BR'
37+
'pt-PT': 'pt-PT'
38+
'ro': 'ro'
39+
'ru': 'ru'
40+
'sk': 'sk-SK'
41+
'sr': 'sr'
42+
'sv-SE': 'sv-SE'
43+
'tr': 'tr'
44+
'uk': 'uk'
45+
'vi': 'vi'
46+
'zh-CN': 'zh-Hans'
47+
'zh-TW': 'zh-Hant'
48+
-
49+
source: '/website/i18n/en.json'
50+
translation: '/website/i18n/%locale%.json'
51+
languages_mapping: *anchor

docs/tutorial-localscan.md

+266
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
---
2+
id: tutorial-localscan
3+
title: Tutorial: Local Scan Mode
4+
---
5+
6+
sidebar_label: Example Page
7+
8+
# Tutorial: Local Scan Mode
9+
10+
This tutorial will let you scan the vulnerabilities on the localhost with Vuls.
11+
This can be done in the following steps.
12+
13+
1. Launch CentOS
14+
1. Install requirements
15+
1. Deploy go-cve-dictionary
16+
1. Deploy goval-dictionary
17+
1. Deploy Vuls
18+
1. Configuration
19+
1. Check config.toml and settings on the server before scanning
20+
1. Scan
21+
1. Reporting
22+
1. TUI(Terminal-Based User Interface)
23+
1. Web UI ([VulsRepo](https://github.com/usiusi360/vulsrepo))
24+
25+
## Step1. Launch CentOS7
26+
27+
- We are using the old AMI for this example
28+
- Add the following to the cloud-init, to avoid auto-update at the first launch.
29+
30+
```
31+
#cloud-config
32+
repo_upgrade: none
33+
```
34+
35+
- [Q: How do I disable the automatic installation of critical and important security updates on initial launch?](https://aws.amazon.com/amazon-linux-ami/faqs/?nc1=h_ls)
36+
37+
## Step2. Install requirements
38+
39+
Vuls requires the following packages.
40+
41+
- SQLite3, MySQL, PostgreSQL, Redis
42+
- git
43+
- gcc
44+
- GNU Make
45+
- go v1.8.3 or later (The latest version is recommended)
46+
- https://golang.org/doc/install
47+
48+
```bash
49+
$ ssh [email protected] -i ~/.ssh/private.pem
50+
$ sudo yum -y install sqlite git gcc make wget
51+
$ wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
52+
$ sudo tar -C /usr/local -xzf go1.8.3.linux-amd64.tar.gz
53+
$ mkdir $HOME/go
54+
```
55+
Add these lines into /etc/profile.d/goenv.sh
56+
57+
```bash
58+
export GOROOT=/usr/local/go
59+
export GOPATH=$HOME/go
60+
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
61+
```
62+
63+
Set the OS environment variable to current shell
64+
```bash
65+
$ source /etc/profile.d/goenv.sh
66+
```
67+
68+
## Step3. Deploy go-cve-dictionary
69+
70+
[go-cve-dictionary](https://github.com/kotakanbe/go-cve-dictionary)
71+
72+
```bash
73+
$ sudo mkdir /var/log/vuls
74+
$ sudo chown centos /var/log/vuls
75+
$ sudo chmod 700 /var/log/vuls
76+
$
77+
$ mkdir -p $GOPATH/src/github.com/kotakanbe
78+
$ cd $GOPATH/src/github.com/kotakanbe
79+
$ git clone https://github.com/kotakanbe/go-cve-dictionary.git
80+
$ cd go-cve-dictionary
81+
$ make install
82+
```
83+
The binary was built under `$GOPATH/bin`
84+
If the installation process stops halfway, try increasing the instance type of EC2. An out of memory error may have occurred.
85+
86+
87+
Fetch vulnerability data from NVD.
88+
It takes about 10 minutes (on AWS).
89+
90+
```bash
91+
$ cd $HOME
92+
$ for i in `seq 2002 $(date +"%Y")`; do go-cve-dictionary fetchnvd -years $i; done
93+
... snip ...
94+
$ ls -alh cve.sqlite3
95+
-rw-r--r--. 1 centos centos 51M Aug 6 08:10 cve.sqlite3
96+
-rw-r--r--. 1 centos centos 32K Aug 6 08:10 cve.sqlite3-shm
97+
-rw-r--r--. 1 centos centos 5.1M Aug 6 08:10 cve.sqlite3-wal
98+
```
99+
100+
## Step4. Deploy goval-dictionary
101+
102+
[goval-dictionary](https://github.com/kotakanbe/goval-dictionary)
103+
104+
```bash
105+
$ mkdir -p $GOPATH/src/github.com/kotakanbe
106+
$ cd $GOPATH/src/github.com/kotakanbe
107+
$ git clone https://github.com/kotakanbe/goval-dictionary.git
108+
$ cd goval-dictionary
109+
$ make install
110+
```
111+
The binary was built under `$GOPATH/bin`
112+
If the installation process stops halfway, try increasing the instance type of EC2. An out of memory error may have occurred.
113+
114+
Then fetch OVAL data of RedHat since the server to be scanned is CentOS. [README](https://github.com/kotakanbe/goval-dictionary#usage-fetch-oval-data-from-redhat)
115+
116+
```bash
117+
$ goval-dictionary fetch-redhat 7
118+
```
119+
120+
If you want to scan other than CentOS 7, fetch OVAL data according to the OS type and version of scan target server in advance.
121+
- [Alpine](https://github.com/kotakanbe/goval-dictionary#usage-fetch-alpine-secdb-as-oval-data-type)
122+
- [RedHat, CentOS](https://github.com/kotakanbe/goval-dictionary#usage-fetch-oval-data-from-redhat)
123+
- [Debian](https://github.com/kotakanbe/goval-dictionary#usage-fetch-oval-data-from-debian)
124+
- [Ubuntu](https://github.com/kotakanbe/goval-dictionary#usage-fetch-oval-data-from-ubuntu)
125+
- [Oracle Linux](https://github.com/kotakanbe/goval-dictionary#usage-fetch-oval-data-from-oracle)
126+
- [SUSE](https://github.com/kotakanbe/goval-dictionary#usage-fetch-oval-data-from-suse)
127+
128+
## Step5. Deploy Vuls
129+
130+
Launch a new terminal and SSH to the ec2 instance.
131+
132+
```
133+
$ mkdir -p $GOPATH/src/github.com/future-architect
134+
$ cd $GOPATH/src/github.com/future-architect
135+
$ git clone https://github.com/future-architect/vuls.git
136+
$ cd vuls
137+
$ make install
138+
```
139+
If you have previously installed vuls and want to update, please do the following
140+
```
141+
$ rm -rf $GOPATH/pkg/linux_amd64/github.com/future-architect/vuls/
142+
$ rm -rf $GOPATH/src/github.com/future-architect/vuls/
143+
$ cd $GOPATH/src/github.com/future-architect
144+
$ git clone https://github.com/future-architect/vuls.git
145+
$ cd vuls
146+
$ make install
147+
```
148+
149+
The binary was built under `$GOPATH/bin`
150+
If the installation process stops halfway, try increasing the instance type of EC2. An out of memory error may have occurred.
151+
152+
## Step6. Configuration
153+
154+
Create a config file(TOML format).
155+
```
156+
$ cd $HOME
157+
$ cat config.toml
158+
[servers]
159+
160+
[servers.localhost]
161+
host = "localhost"
162+
port = "local"
163+
```
164+
165+
166+
## Step7. Check config.toml and settings on the server before scanning
167+
168+
```
169+
$ vuls configtest
170+
```
171+
172+
see [Usage: configtest](#usage-configtest)
173+
174+
## Step8. Start Scanning
175+
176+
```
177+
$ vuls scan
178+
179+
... snip ...
180+
181+
One Line Summary
182+
================
183+
localhost centos7.3.1611 31 updatable packages
184+
185+
```
186+
187+
## Step9. Reporting
188+
189+
View one-line summary
190+
191+
```
192+
$ vuls report -format-one-line-text -cvedb-path=$PWD/cve.sqlite3 -ovaldb-path=$PWD/oval.sqlite3
193+
194+
One Line Summary
195+
================
196+
localhost Total: 109 (High:35 Medium:55 Low:16 ?:3) 31 updatable packages
197+
198+
```
199+
200+
View short summary
201+
202+
```
203+
$ vuls report -format-short-text
204+
205+
localhost (centos7.3.1611)
206+
==========================
207+
Total: 109 (High:35 Medium:55 Low:16 ?:3) 31 updatable packages
208+
209+
CVE-2015-2806 10.0 HIGH (nvd)
210+
Stack-based buffer overflow in asn1_der_decoding in libtasn1 before 4.4 allows
211+
remote attackers to have unspecified impact via unknown vectors.
212+
---
213+
https://nvd.nist.gov/vuln/detail/CVE-2015-2806
214+
https://access.redhat.com/security/cve/CVE-2015-2806 (RHEL-CVE)
215+
10.0/AV:N/AC:L/Au:N/C:C/I:C/A:C (nvd)
216+
2.6/AV:N/AC:H/Au:N/C:N/I:N/A:P (redhat)
217+
https://nvd.nist.gov/vuln-metrics/cvss/v2-calculator?name=CVE-2015-2806
218+
3.3/CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L (redhat)
219+
https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?name=CVE-2015-2806
220+
Confidence: 100 / OvalMatch
221+
222+
... snip ...
223+
````
224+
225+
View full report.
226+
227+
```
228+
$ vuls report -format-full-text | less
229+
localhost (centos7.3.1611)
230+
==========================
231+
Total: 109 (High:35 Medium:55 Low:16 ?:3) 31 updatable packages
232+
233+
CVE-2015-2806
234+
----------------
235+
Max Score 10.0 HIGH (nvd)
236+
nvd 10.0/AV:N/AC:L/Au:N/C:C/I:C/A:C
237+
redhat 2.6/AV:N/AC:H/Au:N/C:N/I:N/A:P
238+
redhat 3.3/CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
239+
CVSSv2 Calc https://nvd.nist.gov/vuln-metrics/cvss/v2-calculator?name=CVE-2015-2806
240+
CVSSv3 Calc https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?name=CVE-2015-2806
241+
Summary Stack-based buffer overflow in asn1_der_decoding in libtasn1 before 4.4 allows
242+
remote attackers to have unspecified impact via unknown vectors.
243+
Source https://nvd.nist.gov/vuln/detail/CVE-2015-2806
244+
RHEL-CVE https://access.redhat.com/security/cve/CVE-2015-2806
245+
CWE-119 (nvd) https://cwe.mitre.org/data/definitions/119.html
246+
Package/CPE libtasn1-3.8-3.el7 -
247+
Confidence 100 / OvalMatch
248+
249+
... snip ...
250+
```
251+
252+
## Step10. TUI
253+
254+
Vuls has Terminal-Based User Interface to display the scan result.
255+
256+
```
257+
$ vuls tui
258+
```
259+
260+
![Vuls-TUI](img/hello-vuls-tui.png)
261+
262+
## Step11. Web UI
263+
264+
[VulsRepo](https://github.com/usiusi360/vulsrepo) is a awesome Web UI for Vuls.
265+
Check it out the [Online Demo](http://usiusi360.github.io/vulsrepo/).
266+

docs/tutorial.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
id: tutorial
3+
title: Tutorial
4+
sidebar_label: Tutorial
5+
---
6+
7+
# Tutorial
8+
9+
To give you an idea of how easy Vuls is to use.
10+
This tutorial consists of three steps.
11+
1. Tutorial: Local Scan Mode
12+
- Launch CentOS on AWS
13+
- Deploy Vuls
14+
- Scan localhost, Reporting
15+
1. Tutorial: Remote Scan Mode
16+
- Launch Ubuntu Linux on AWS
17+
- Scan this Ubuntu from the Vuls you set up earlier
18+

website/i18n/en.json

+11
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"doc3": "This is document number 3",
1111
"doc4": "Other Document",
1212
"doc5": "Fifth Document",
13+
"tutorial-localscan": "Tutorial: Local Scan Mode",
14+
"tutorial": "Tutorial",
15+
"Tutorial": "Tutorial",
1316
"Docs": "Docs",
1417
"Community": "Community",
1518
"Blog": "Blog",
@@ -19,6 +22,14 @@
1922
"Second Category": "Second Category"
2023
},
2124
"pages-strings": {
25+
"Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)|no description given": "Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)",
26+
"Browse Docs|no description given": "Browse Docs",
27+
"Ask questions about the documentation and project|no description given": "Ask questions about the documentation and project",
28+
"Join the community|no description given": "Join the community",
29+
"Find out what's new with this project|no description given": "Find out what's new with this project",
30+
"Stay up to date|no description given": "Stay up to date",
31+
"Need help?|no description given": "Need help?",
32+
"This project is maintained by a dedicated group of people.|statement made to reader": "This project is maintained by a dedicated group of people.",
2233
"Help Translate|recruit community translators for your project": "Help Translate",
2334
"Edit this Doc|recruitment message asking to edit the doc source": "Edit",
2435
"Translate this Doc|recruitment message asking to translate the docs": "Translate"

0 commit comments

Comments
 (0)