项目作者: infobyte

项目描述 :
Faraday's Command Line Interface
高级语言: Python
项目地址: git://github.com/infobyte/faraday-cli.git
创建时间: 2020-08-19T18:55:09Z
项目社区:https://github.com/infobyte/faraday-cli

开源协议:

下载


Faraday on the terminal

Use faraday directly from your favorite terminal

Example

faraday-cli is the official client that make automating your security workflows, easier.

Install from pip

  1. pip install faraday-cli

Install from source

```shell script
git clone https://github.com/infobyte/faraday-cli.git
cd faraday-cli
pip install .

  1. ## Documentation
  2. For more info you can check our [documentation][doc]
  3. ## Use it like a command
  4. ### Login
  5. Configure auth for farday-cli
  6. ```shell script
  7. $ faraday-cli auth

Example

Create a workspace

When you create a workspace by default is selected as active, unless you use the “-d” flag
```shell script
$ faraday-cli workspace create some_name
✔ Created workspace: some_name

  1. ### Select active workspace
  2. ```shell script
  3. $ faraday-cli workspace select some_name
  4. ✔ Selected workspace: some_name

List workspaces

```shell script
$ faraday-cli list_ws
NAME HOSTS SERVICES VULNS ACTIVE PUBLIC READONLY


some_name 14 13 39 True False False

  1. ### List hosts of a workspace
  2. ```shell script
  3. $ faraday-cli host list
  4. ID IP OS HOSTNAMES SERVICES VULNS
  5. ---- ----------- ------- --------------- ---------- -------
  6. 574 127.0.0.1 unknown 1 3
  7. 566 127.0.0.10 unknown 1 3
  8. 569 127.0.0.11 unknown 1 3
  9. 568 127.0.0.12 unknown 1 3
  10. 570 127.0.0.13 unknown 1 3
  11. 576 127.0.0.2 unknown 1 3
  12. 565 127.0.0.3 unknown 1 3
  13. 572 127.0.0.4 unknown 1 3
  14. 573 127.0.0.5 unknown 1 3
  15. 567 127.0.0.6 unknown 1 3
  16. 571 127.0.0.7 unknown 1 3
  17. 564 127.0.0.8 unknown 1 3
  18. 575 127.0.0.9 unknown 1 3
  19. 590 58.76.184.4 unknown www.googlec.com 0 -

Get host

```shell script
$ faraday-cli host get 574

$ faraday-cli host get 574
Host:
ID IP OS HOSTNAMES OWNER OWNED VULNS


574 127.0.0.1 unknown faraday False 3

Services:
ID NAME DESCRIPTION PROTOCOL PORT VERSION STATUS VULNS


2638 ssh tcp 22 unknown open 2

Vulnerabilities:
ID NAME SEVERITY STATUS CONFIRMED TOOL


13509 SSH Weak Encryption Algorithms Supported MED opened False Openvas
13510 SSH Weak MAC Algorithms Supported LOW opened False Openvas
13511 TCP timestamps LOW opened False Openvas

  1. ### Create hosts
  2. ```shell script
  3. $ faraday-cli host create -d \''[{"ip": "stan.local", "description": "some server"}]'\'

Or pipe it
```shell script
$ echo ‘[{“ip”: “1.1.1.5”, “description”: “some text”}]’ | faraday-cli host create —stdin

  1. **The escaping of the single quotes (\\') is only needed when using it as a command.
  2. In the shell or using pipes it not necessary**
  3. ### Import vulnerabilities from tool report
  4. ```shell script
  5. $ faraday-cli tool report "/path/to/report.xml"

Example

Import vulnerabilities from command

```shell script
$ faraday-cli ping -c 1 www.google.com

  1. ![Example](./docs/docs/images/command.gif)
  2. ### List agents
  3. ```shell script
  4. $ faraday-cli agent list
  5. id name active status executors
  6. ---- -------- -------- -------- -----------
  7. 8 internal True online nmap

Run executor

```shell script
$ faraday-cli agent run -a 1 -e nmap -p \’’{“target”: “www.google.com”}’\’
Run executor: internal/nmap [{‘successful’: True}]

  1. ## Use it like a shell
  2. Faraday-cli can be used as a shell and have all the same commands you have as a cli
  3. ![Example](./docs/docs/images/shell.gif)
  4. ## Use cases
  5. ### Continuous scan your assets with faraday
  6. For example run nmap for all the hosts in faraday that listen on the 443 port and import the results back to faraday
  7. ```shell
  8. $ faraday-cli host list --port 443 -ip | nmap -iL - -oX /tmp/nmap.xml && faraday-cli process_report /tmp/nmap.xml

Scan your subdomains

Use a tool like assetfinder to do a domains lookup, scan them with nmap and send de results to faraday

  1. $ assetfinder -subs-only example.com| sort | uniq |awk 'BEGIN { ORS = ""; print " {\"target\":\""}
  2. { printf "%s%s", separator, $1, $2
  3. separator = ","}END { print "\"}" }' | faraday-cli agent run -a 1 -e nmap --stdin