Giter Club home page Giter Club logo

saferwall's Introduction

Saferwall logo

Collaborative and Streamlined Threat Analysis at Scale

Stars Discord Coverage GitHub Workflow Status Report Card GitHub

Saferwall allows you to analyze, triage and classify threats in just minutes.

Collaborative - Built for security teams and researchers to streamline analysis, identification and sharing malware samples.

☁️ Fast & cloud-native - Scalable and cloud-native by design, deploy in minutes to bare metal or in the cloud.

Save time - Automate cumbersome tasks, generate IoC's and reports with zero friction.

📦 Batteries included - All your favorite tools included, build intelligence feeds for hunting threats or generating signatures.

❤️ Open source first - We are open-source, developer friendly and user driven.

Batteries Included

  • Static Analysis:

  • Dynamic Analysis:

    • Automated Malware Analysis using a Hypervisor based VM.
    • Intercepting OS System Calls to build an execution trace of executable files.
    • Generate detailed reports and gain insight into malware behavior.
    • Choose which API's to trace, grab screenshots and file changes as well as memory dumps.
  • Multiple AV scanner supporting major vendors:

    Vendors status Vendors status
    Avast ✔️ FSecure ✔️
    Avira ✔️ Kaspersky ✔️
    Bitdefender ✔️ McAfee ✔️
    ClamAV ✔️ Sophos ✔️
    Comodo ✔️ Symantec ✔️
    ESET ✔️ Windows Defender ✔️
    TrendMicro ✔️ DrWeb ✔️
  • Integrations with your own data processing pipeline.

Get Started

Saferwall takes advantage of Kubernetes for its high availability, scalability and ecosystem behind it.

Everything runs inside Kubernetes. You can either deploy it in the cloud or have it self hosted.

Here are the different deployment options available depending on how you are planning to use it:

  • "I want to try it first" : Use the cloud instance in https://saferwall.com.

  • "I want to run it locally" : A Vagrant box is available, the only requirements are VirtualBox and Vagrant with full support of Windows, Linux and OSX, see the guide for detailed steps.

  • "I want to make a PR or make changes" : When you intend to make changes to the code or make PR's, see this guide for detailed steps.

  • "I love it ! I want to run it in prod" : First get you a kops and check this guide.

The production deployment using Kops automatically provisions a Kubernetes cluster hosted on AWS, GCE, DigitalOcean or OpenStack and also on bare metal. For the time being, only AWS is officially supported. A helm chart is also provided for fast deployment. This setup works well for companies or small teams planning to scan a massive amounts of file.

Our Stack:

Current architecture / Workflow:

Here is a basic workflow of what happens when a new file is submitted:

  • Frontend talks to the the backend via REST APIs.
  • Backend uploads samples to the object storage.
  • Backend pushes a message into the scanning queue.
  • Consumer fetches the file and copies it to the nfs share avoiding to pull the sample on every container.
  • Consumer starts scanning routines for static information such as (File metadata, File format details...)
  • Consumer calls asynchronously scanning services (like AV scanners) via gRPC calls and waits for results.

Acknowledgements

Contributing

Please read docs/CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

saferwall's People

Contributors

actuallyachraf avatar akhouad avatar dependabot[bot] avatar kerkesni avatar lordnoteworthy avatar mrassili avatar rc1140 avatar sarmadkung avatar yassinrais avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

saferwall's Issues

[ui] file upload

Hey @mrassili

Till now, we have not been uploading files to the backend, we only used data which already was available on the database. The upload part is one of the most important ones, it needs to be reliable. You are free to use whatever library you want or you can roll your own, but it should support the following features:

  • Drag & drop support
  • Upload progress bar
  • Chunked uploads (Large files can be uploaded in smaller chunks with browsers supporting the Blob API).

When the file gets selected in the browser, we calculate :

  1. Its size first, if more than 64MB, we should notify the user the file size is too big (this is already implemented), but I would like to change the notification style to the one available in vue-admin under : /components/notification

  2. If size is OK, we locally calculate its sha256 hash (this is already implemented), then, we issue a GET to api.saferwall.com/v1/files/<sha256>, if file exists (status code 200), we redirect to the summary view of the hash. Because the file exists, we do not need to upload it, we just fetch the JSON immediately and display as before, this way we don't waste bandwidth.

  3. If the file does not exist, you need to make a POST request to the following endpoint: api.saferwall.com/v1/files, it is a multipart form upload, if the server returns status code 201, it means all went fine and we need to display a progress tracker similar to the one in vue-admin under: /components/progress-tracker:

  • Step 1: Uploaded
  • Step 2: Queued
  • Step 3: Processing
  • Step 4: Finished

When the file gets successfully uploaded, you can keep pulling the server by making a GET request to api.saferwall.com/v1/files/<sha256>, the JSON will contain a state variable to indicate the progress of the scan, called status. We might user socket io later to avoid this pulling.

Thanks!

[ui] Fix broken strings view

Hello @mrassili

The strings view seems to be broken as well.

The server returns a json similar to this:

"strings": [
    {
      "encoding": "ascii",
      "value": "!This program cannot be run in DOS mode."
    },
    {
      "encoding": "ascii",
      "value": "D$(+D$ SSP"
    },
    {
      "encoding": "ascii",
      "value": "RichEdit20A"
    },
    {
      "encoding": "ascii",
      "value": ".DEFAULT\\Control Panel\\International"
    },
    {
      "encoding": "ascii",
      "value": "Control Panel\\Desktop\\ResourceLocale"
    },
]

The table should display the encoding and the value of the string, the filter is a basic string filter that operates like a search, the table have also a botton to limit the items in the table and a simple sorter to sort the string asc and desc. It was working before, for some reason, it seems broken.

At the beginning, I suggested to use datatables, but the previous developer implemeted it that way which also did the job. Can you please look at what is going on their.

Thank you.

[ui] Display exif metadata in the summary tab under the basic properties table

Hello @mrassili

In the summary tab, under the basic properties table, we need another table which displays the content of exif metadata. This data can be found in the json which you receive while doing a get request to the endpoint hardcoded in the source code, we will modify it later. Just to get things going on for now. The field in the json is called exif:

  "exif": {
    "CodeSize": "23552",
    "EntryPoint": "0x30e3",
    "ExiftoolVersionNumber": "10.80",
    "FileSize": "2.1 MB",
    "FileType": "Win32 EXE",
    "FileTypeExtension": "exe",
    "ImageVersion": "0.0",
    "InitializedDataSize": "164864",
    "LinkerVersion": "6.0",
    "MachineType": "Intel 386 or later, and compatibles",
    "MimeType": "application/octet-stream",
    "OsVersion": "4.0",
    "PeType": "PE32",
    "Subsystem": "Windows GUI",
    "SubsystemVersion": "4.0",
    "UninitializedDataSize": "1024"
  }

So basically it is gonna be a table of 2 columns, and a dynamic number of lines. The name of the table should be: ExifTool File Metadata

BR,
Thanks.

[ui] Fix broken AntiVirus View

Hey @mrassili

The Antivirus view needs some tweaks to get it work again. It is currently broken due to the json response from the server, which have been slightly changed.

Before, the json was like this

{
    "av": {
        "first_scan": [
            {
                "detected": true,
                "output": "Win32:Ransom-AQL [Trj]",
                "vendor": "Avast"
            },
            {
                "detected": true,
                "output": "TR/Crilock.A.11",
                "vendor": "Avira"
            },
        ],
        "last_scan": [
            {
                "detected": true,
                "output": "Win32:Ransom-AQL [Trj]",
                "vendor": "Avast"
            },
            {
                "detected": true,
                "output": "TR/Crilock.A.11",
                "vendor": "Avira"
            },
            {
                "detected": false,
                "output": "Clean",
                "vendor": "ClamAV"
            },
            {
                "detected": true,
                "output": "Win32/Filecoder.BQ",
                "vendor": "ESET-NOD32"
            },
   
        ]
    },

The string output becomes result. The vendor now becomes outside the dict.

After:

 "multiav": {
    "first_scan": {
      "Avast": {
        "detected": false,
        "result": ""
      },
      "Bitdefender": {
        "detected": true,
        "result": "Not-a-virus:HEUR:AdWare.Win32.Generic"
      },
      "Microsoft": {
        "detected": true,
        "result": "PUA:Win32/Puwaders.B!ml"
      },
      "clamav": {
        "detected": true,
        "result": "Win32:DealPly-AJ [Adw]"
      }
    },
    "last_scan": {
      "Avast": {
        "detected": false,
        "result": ""
      },
      "Bitdefender": {
        "detected": true,
        "result": "Not-a-virus:HEUR:AdWare.Win32.Generic"
      },
      "Microsoft": {
        "detected": true,
        "result": "PUA:Win32/Puwaders.B!ml"
      },
      "clamav": {
        "detected": true,
        "result": "Win32:DealPly-AJ [Adw]"
      }
    }
  },

The number if dicts inside this array is not fixable, you should be able to iterate through it
The result at the end should look like this:

Unable to install helm chart

Hi

When attempting to install the helm chart I get the following error

manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-instal"
Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "CouchbaseCluster" in version "couchbase.com/v1"

Reading up a bit on the error led me to the conclusion that the cluster is not being installed correctly.

Is this a known issue with saferwall or do I just need a specific set of steps to get the chart installed.

Kind Regards

[core] identify suspicious strings

  • build an ML classifier to classify a string as suspicious.
  • expose a service via our back end api so users can find out potentially suspicious strings.

[Docs] Paid AV Instructions

Hello,

Please provide a list of where you can obtain the AV licenses for the non-free AVs. Also please then explain how we can create those containers since we are unable to pull them from the cloud.

Thank you!

Change base url?

Hello,

Is it possible to change the base url or just use the IP address of the container. We want to use this in a bare metal single server setup but make it a little bit more "dev" friendly for testing files so everyone doesnt have to add to their host files and/or exceptions to SSLs

Thanks!

Error Make ui-build

Dear Team,

frontend.mk require Dockerfile.frontend and it is missing in saferwall/build/docker/
previous version Docker file to build UI was Dockerfile and it was in saferwall/ui/

Cheers

An error pops up when saferwall page is loading

Hi, my safer wall is up and I can access it on web, but an error box pops up when its page is loading. After a long time, three containers are not ready yet, and I guess that is the issue.
Find related info as follows:

The error box screenshot:
Screenshot from 2021-01-16 11-05-43

Output of the command "kubectl get pods | grep -v Run":

NAME                                                    READY   STATUS     RESTARTS   AGE
venus-kibana-65f5794dc7-6vfvc                           0/1     Pending    0          6d
venus-saferwall-backend-6cdc76fcf8-wwltt                0/1     Init:0/1   2          6d
venus-saferwall-consumer-797fc9cf77-5vw9k               0/1     Init:0/2   2          6d

Messages for "kubectl describe pod venus-kibana-65f5794dc7-6vfvc"

Events:
  Type     Reason            Age                From               Message
  ----     ------            ----               ----               -------
  Warning  FailedScheduling  2d1h               default-scheduler  0/1 nodes are available: 1 Insufficient cpu, 1 Insufficient memory.
  Warning  FailedScheduling  26m                default-scheduler  0/1 nodes are available: 1 Insufficient cpu, 1 Insufficient memory.
  Warning  FailedScheduling  27m (x3 over 27m)  default-scheduler  0/1 nodes are available: 1 Insufficient cpu, 1 Insufficient memory.

Messages for "kubectl describe pod venus-saferwall-backend-6cdc76fcf8-wwltt"

Events:
  Type    Reason          Age   From     Message
  ----    ------          ----  ----     -------
  Normal  SandboxChanged  29m   kubelet  Pod sandbox changed, it will be killed and re-created.
  Normal  Pulling         28m   kubelet  Pulling image "groundnuty/k8s-wait-for:v1.3"
  Normal  Pulled          28m   kubelet  Successfully pulled image "groundnuty/k8s-wait-for:v1.3" in 14.188220183s
  Normal  Created         28m   kubelet  Created container wait-for-couchbase
  Normal  Started         28m   kubelet  Started container wait-for-couchbase

Messages for "kubectl describe pod venus-saferwall-consumer-797fc9cf77-5vw9k"

Events:
  Type     Reason          Age                From     Message
  ----     ------          ----               ----     -------
  Warning  FailedMount     29m (x6 over 29m)  kubelet  MountVolume.NodeAffinity check failed for volume "pvc-b12c3905-954b-4b77-9b9a-4f9649604355" : error retrieving node: node "saferwall-control-plane" not found
  Warning  FailedMount     27m                kubelet  Unable to attach or mount volumes: unmounted volumes=[samples], unattached volumes=[default-token-ht6zd samples venus-consumer-configmap-volume]: timed out waiting for the condition
  Normal   SandboxChanged  27m                kubelet  Pod sandbox changed, it will be killed and re-created.
  Normal   Pulling         27m                kubelet  Pulling image "groundnuty/k8s-wait-for:v1.3"
  Normal   Pulled          27m                kubelet  Successfully pulled image "groundnuty/k8s-wait-for:v1.3" in 10.206919149s
  Normal   Created         27m                kubelet  Created container wait-for-couchbase
  Normal   Started         27m                kubelet  Started container wait-for-couchbase

It seems messages describe the issues clearly but I do not know how to solve the issues, please help.

Connection to localhost:8080 was refused

I follow the setup installation from https://github.com/saferwall/saferwall/blob/master/docs/BUILDING.md for the Deploying in Minikube and I'm stuck at step 11.

Can you help me?

sw@sw:~/saferwall$ make helm-init-cert-manager
# Create the namespace for cert-manager.
kubectl create namespace cert-manager
The connection to the server localhost:8080 was refused - did you specify the right host or port?
make: *** [build/mk/helm.mk:34: helm-init-cert-manager] Error 1

[ui] Design a sign in/sign up page

Hello @mrassili

We need to design a sign in / sign up page.

Sign up contains the following input fields

  • email
  • username
  • password

Plus a checkbox about: I agree to the terms and conditions
Then a button to Submit.

Notes:

  • We dont need a repeat password.
  • Fot the moment, let's enforce any 8 char length.
  • Input should be highlighted by red/green depending on success. I will give you later how you can contact the backend to know if username/email are available. In this task, you can just check if email format is valid in client side.

Sign in contains the following fields

  • email or username
  • password

Not a member ? Sign up
Forgot password ?

Below is an example, the form should be placed in the center of the page, under our logo, also only the header (top navbar) and the footer should exist in the page, no left sidebar.

Logo: https://github.com/saferwall/saferwall/blob/master/website/_assets/images/saferwall.png

You can check the dashboard I provided before, at the section forms, there are examples you can use.

Cheers,

help pls.

~/saferwall # make saferwall
Makefile:18: /root/saferwall/.env: No such file or directory
make: *** No rule to make target '/root/saferwall/.env'. Stop.

helm-update-dep Error - prometheus-operator

Hi

am getting this error when trying to build with kind on Ubuntu 18.04 (local), when following this https://github.com/saferwall/saferwall/blob/master/docs/DEPLOYING-DEV.md

are you able to advise?

sudo make helm-update-dep
cd  /home/lab-admin/saferwall/deployments \
	&& helm dependency update saferwall
Getting updates for unmanaged Helm repositories...
...Successfully got an update from the "https://kubernetes-charts.storage.googleapis.com/" chart repository
...Successfully got an update from the "https://kubernetes-charts.storage.googleapis.com/" chart repository
...Successfully got an update from the "https://kubernetes-charts.storage.googleapis.com/" chart repository
...Successfully got an update from the "https://kubernetes-charts.storage.googleapis.com/" chart repository
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "couchbase" chart repository
...Successfully got an update from the "ingress-nginx" chart repository
...Successfully got an update from the "elastic" chart repository
...Successfully got an update from the "jetstack" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 10 charts
Downloading minio from repo https://kubernetes-charts.storage.googleapis.com/
Downloading couchbase-operator from repo https://couchbase-partners.github.io/helm-charts/
Downloading efs-provisioner from repo https://kubernetes-charts.storage.googleapis.com/
Downloading nfs-server-provisioner from repo https://kubernetes-charts.storage.googleapis.com/
Downloading cert-manager from repo https://charts.jetstack.io
Downloading ingress-nginx from repo https://kubernetes.github.io/ingress-nginx/
Downloading filebeat from repo https://helm.elastic.co
Downloading elasticsearch from repo https://helm.elastic.co
Downloading kibana from repo https://helm.elastic.co
Downloading prometheus-operator from repo https://kubernetes-charts.storage.googleapis.com/
Save error occurred:  could not download https://charts.helm.sh/stable/prometheus-operator-9.3.2.tgz: failed to fetch https://charts.helm.sh/stable/prometheus-operator-9.3.2.tgz : 404 Not Found
Deleting newly downloaded charts, restoring pre-update state
Error: could not download https://charts.helm.sh/stable/prometheus-operator-9.3.2.tgz: failed to fetch https://charts.helm.sh/stable/prometheus-operator-9.3.2.tgz : 404 Not Found
build/mk/helm.mk:35: recipe for target 'helm-update-dep' failed
make: *** [helm-update-dep] Error 1

Potential import collision: import path "github.com/bitly/go-nsq" should be deleted

Background

I find that github.com/nsqio/go-nsq and github.com/bitly/go-nsq coexist in this repo:
https://github.com/saferwall/saferwall/blob/master/go.mod#L7 (Line 7 & 16)

github.com/bitly/go-nsq v1.0.7
github.com/nsqio/go-nsq v1.0.8

The "github.com/nsqio/go-nsq" and "github.com/bitly/go-nsq" are the same repos. The "github.com/bitly/go-nsq" has already been redirected to "github.com/nsqio/go-nsq". "github.com/bitly/go-nsq" is the old path of go-nsq.
https://github.com/nsqio/go-nsq/blob/v1.0.7/config_flag_test.go

package nsq_test
import (
	"flag"
	"github.com/nsqio/go-nsq"
)

And it seems to be nowhere to use the import path "github.com/bitly/go-nsq" in this repo.
https://github.com/saferwall/saferwall/search?q=bitly%2Fgo-nsq&unscoped_q=bitly%2Fgo-nsq

$go mod why github.com/bitly/go-nsq
# github.com/bitly/go-nsq
(main module does not need package github.com/bitly/go-nsq)

Solution

Delete the old import paths "github.com/bitly/go-nsq".
Where did you import it: https://github.com/saferwall/saferwall/search?q=bitly%2Fgo-nsq&unscoped_q=bitly%2Fgo-nsq

Use UpperCase in Search Hash Header

Hello LordNoteworthy,

Some my Hash Program return Upper Case output. I just want to share with you that i can edit it in /ui/src/components/partials/Header.vue

from "this.hash" to "this.hash.toLowerCase()"

searchByHash() {
      if (!this.hash.trim()) {
        this.$awn.warning("Empty Field!")
        return
      }
      this.$http
        .get(`${this.$api_endpoints.FILES}${this.hash}/`, {
          validateStatus: (status) => status === 200,
        })
        .then((data) => {
          this.updateHash(this.hash)
          this.track()
          this.$router.push(this.$routes.SUMMARY.path + this.hash)
        })
        .catch(() => {
          this.$awn.alert(
            "Sorry, we couldn't find the file you were looking for, please upload it to view the results!",
          )
        })
    },
    track() {
      this.$gtag.event("search", {
        search_term: this.hash,
      })
    },

Malicious file marked as clean

Hi, I tried to scan a malicious file from https://capesandbox.com/analysis/110788/ using Saferwall, unfortunately it is marked as clean which is different compared to result in VirusTotal.

image

Also I tried to scan directly using mpclient, the output only shows EngineScanCallback(): Scanning input:

root@multiav-pod:/opt/windows-defender# sha256sum /malware 
50e2c6aac34de9ed4e1b3fcfcd5aaa34892696f2681aa5e8c45a5dbe0915a43c  /malware
root@multiav-pod:/opt/windows-defender# ./mpclient /malware
main(): Scanning /malware...
EngineScanCallback(): Scanning input
root@multiav-pod:/opt/windows-defender#

To verify that my build is working, I have no problem scanning eicar file:

root@multiav-pod:/opt/windows-defender# ./mpclient /eicar
main(): Scanning /eicar...
EngineScanCallback(): Scanning input
EngineScanCallback(): Threat Virus:DOS/EICAR_Test_File identified.
root@multiav-pod:/opt/windows-defender#

Notes

I'm using a different repo extra2000/saferwall/tree/rootless-podman-upstream because I'm using Podman and then build with extra2000/saferwall-box (branch dev)

So I'm not sure if it just me or anyone else is having the same issue too.

[ui] add packer filed in summary

Hello @mrassili

I introduced a new filed in the json called packer, it contains an array of strings, it needs to be displayed in the summary view under the field called trid.

Because it is an array of string, you can display it as we have done for trid, bear in mind that the count of the strings is dynamic.

Thanks.

Vagrant Box not working

Hello,

Following the README for the vagrant box also doesn't work on windows/linux/macos. I keep getting the same error of authentication isn't correct.

I get this by trying to following:

vagrant init saferwall/saferwall
vagrant up

The private key is there, I think it might not be downloading the correct one.

Thanks,

Error while make multiav-build-go

Dear Saferwall Team.

i got stuck at making multiav-build-go

[*] =============== Building go-clamav ===============
make[1]: Entering directory '/home/saferwall/saferwall'
sudo make docker-build IMG=goclamav VERSION=0.0.2
DOCKER_FILE=build/docker/Dockerfile.goclamav
DOCKER_DIR=pkg/grpc/multiav/clamav/server
docker build -t saferwall/goclamav -f build/docker/Dockerfile.goclamav pkg/grpc/multiav/clamav/server
Sending build context to Docker daemon 5.167kB
Step 1/17 : FROM golang:1.14-alpine AS builder
---> 30df784d6206
Step 2/17 : RUN apk update && apk add --no-cache git ca-certificates tzdata && update-ca-certificates 2>/dev/null || true
---> Using cache
---> 4363dbd6c935
Step 3/17 : WORKDIR $GOPATH/src/saferwall/clamav/
---> Using cache
---> 5ef4c90682cd
Step 4/17 : COPY . .
---> Using cache
---> aa8bec7444e9
Step 5/17 : RUN go get -d -v
---> Running in 234abb799a92
github.com/minio/minio-go (download)
package github.com/minio/minio-go/v6: cannot find package "github.com/minio/minio-go/v6" in any of:
/usr/local/go/src/github.com/minio/minio-go/v6 (from $GOROOT)
/go/src/github.com/minio/minio-go/v6 (from $GOPATH)

The command '/bin/sh -c go get -d -v' returned a non-zero code: 1
build/mk/docker.mk:4: recipe for target 'docker-build' failed
make: *** [docker-build] Error 1
build/mk/multiav.mk:59: recipe for target 'multiav-build-av-go' failed
make[1]: *** [multiav-build-av-go] Error 2
make[1]: Leaving directory '/home/saferwall/saferwall'
/bin/bash: line 4: test: !: binary operator expected

[ui] Request password reset

Let's start by designing a password reset page.

Should be similar to the login one but will contain only one field which is the email which to request a password for. Do validation in the client-side for the email.

Then send me that email to: api.saferwall.com/auth/password/reset/

If you get status code 200: You could then warn the user with a message like:
The first step of the password reset process has been successfully completed, in a few minutes you will receive an email with further instructions to create a new password.

if you get status code 404:: Which is the email is not found in DB just warn the user that that email he requests to change the password for does not exist in our DB.

make multiav-build failed

I tried to build multiav images using make multiav-build mention in docs but it seems docker doesn't understand the -t/--tag argument that passed to it.

systems:

  • OS : Ubuntu 18.04.5
  • Docker : Docker version 19.03.13, build 4484c46d9d
  • Minikube : minikube version: v1.12.2 commit: be7c19d391302656d27f1f213657d925c4e1cfc2-dirty
  • Kubectl:
    Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:41:02Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:43:34Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
  • go : go version go1.15.2 linux/amd64

Error msg:

user@saferwall:~/saferwall$ make multiav-build
for av in /home/user/saferwall/pkg/grpc/multiav ; do \
	echo " [*] =============== Building $av =============== " ; \
	make multiav-build-av AV_VENDOR=$av ; \
	EXIT_CODE=$? ; \
	if test $EXIT_CODE ! 0; then \
		make multiav-build-av AV_VENDOR=$av ; \
	fi; \
done
 [*] =============== Building /home/user/saferwall/pkg/grpc/multiav =============== 
make[1]: Entering directory '/home/user/saferwall'
invalid argument "saferwall//home/user/saferwall/pkg/grpc/multiav" for "-t, --tag" flag: invalid reference format
See 'docker build --help'.
build/mk/docker.mk:4: recipe for target 'docker-build' failed
make: *** [docker-build] Error 125
build/mk/multiav.mk:20: recipe for target 'multiav-build-av' failed
make[1]: *** [multiav-build-av] Error 2
make[1]: Leaving directory '/home/user/saferwall'
/bin/bash: line 4: test: !: binary operator expected

The argument that passed to -t/--tag parameter was saferwall//home/user/saferwall/pkg/grpc/multiav should it be something like thissaferwall/multiav ?

AVs not actually working

When scanning files they get all the green pass boxes but in reality they are not even being scanned:

{"level":"error","msg":"Failed to scan file [avira]: rpc error: code = Unknown desc = signal: killed","sha256":"36384e03d05303377c152e81fe7adf20aaeb5f453ec5433498da2e74f9088478","time":"2020-12-15T18:17:43Z"}
{"level":"error","msg":"Failed to scan file [comodo]: rpc error: code = Unknown desc = signal: killed","sha256":"36384e03d05303377c152e81fe7adf20aaeb5f453ec5433498da2e74f9088478","time":"2020-12-15T18:17:46Z"}

root@saferwall1:# kubectl logs venus-saferwall-multiav-avira-855d75fcff-tk9kp
time="2020-12-15T17:35:59Z" level=info msg="Starting Avira gRPC server ..."
root@saferwall1:
# kubectl logs venus-saferwall-multiav-comodo-fd5fcb85f-kvqv2
time="2020-12-15T17:36:06Z" level=info msg="Starting Comodo gRPC server ..."

[ui] general improvement of UI

Hi @mrassili

This issue is about many small improvements we need to do before we release the v0.0.1.

  1. Some features are not yet fully finished from my side. Let's hide them from the UI for now.
  • At the top navbar, statistics and search needs to be hidden, you can just comment code so it does not show up.
  • There is an upload button with icon in the top navbar in the middle, let's take that one out as well.
  • Keep the upload which is on the top-right side of the navbar, add to it an ulpload icon.
  1. At the left sidebar, let's hide Dynamic analysis and its descendants.
  2. At the top left corner, there is an image saferwall, let's change it with the one we have in the root project README.

Cheers.

[ui] Fix few routing problems

Hi @mrassili

First issue:

When you are talking to the backend:

axios
      .get(`/api/v1/files/${this.$route.params.hash}/`)

When you do that, it tries to use the host name of the UI, though the backend and the frontend are not in the same server. In production, the UI will be hosted directly on saferwall.com, and the backend is on api.saferwall.com. So You need to expose an entry in the config for the backend.

Second issue:

When you click in antivirus for example, at the moment, it takes you to a particular hardcoded url, normally, it should be displaying the context of the file we are looking at it now, by that I mean if the user searched a file using the top search bar, the context is that hash, so imagine someone wrote:

275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f

When the user clicks on antivirus, the ui url should be:
http://saferwall.com/files/df50dd428c2c0a6c2bffc6720b10d690061f1e3e0d1f5ef2f926942cbf4fc69c/antivirus

Same applies for all components in the left side bar.

Cheers.

[ui] search file by hash

Hello @mrassili

When a user types a hash (sha256) at the top bar:

Imgur

You do the request as usual and you display the result.

If the file is found, you get a status code of 200.
If the file is not found, you get a status code of 404, you could show a notification that the file does not exist.

Cheers.

clamav issue

Hello there!
I have just tried to setup your project in my environment and I had issue with one of pods.
The pod is "venus-saferwall-multiav-clamav-86f56dcc74-w5889" and here is output of the command "kubectl get pods"
can anyone help me to fix this issue?

Screenshot from 2021-01-09 15-27-57

Stuck at building Consumer

Hello Team.

I have these Error:
Installing Capstone...
make[1]: Entering directory '/saferwall/capstone/cstool'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/saferwall/capstone/cstool'
make -C tests
make[1]: Entering directory '/saferwall/capstone/tests'
/bin/sh: cc: not found
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/saferwall/capstone/tests'
make -C suite/fuzz
make[1]: Entering directory '/saferwall/capstone/suite/fuzz'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/saferwall/capstone/suite/fuzz'

Step 8/35 : RUN GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o /go/bin/consumer pkg/consumer/main.go pkg/consumer/helpers.go pkg/consumer/scanners.go pkg/consumer/tagger.go
---> Running in 0389a35b4612

runtime/cgo

exec: "gcc": executable file not found in $PATH
The command '/bin/sh -c GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o /go/bin/consumer pkg/consumer/main.go pkg/consumer/helpers.go pkg/consumer/scanners.go pkg/consumer/tagger.go' returned a non-zero code: 2
make: *** [build/mk/docker.mk:4: docker-build] Error 2
make: *** [build/mk/consumer.mk:2: consumer-build] Error 2

i tried to install saferwall in local host

[ui] download a file

Hi @mrassili

The user should be able to download a file, the endpoint is:
e.GET("/v1/files/:sha256/download/", file.Download, m.RequireLogin).

It requires login. You will get a binary blob of data (responseType: 'blob')

You can check this snippet: https://www.itsolutionstuff.com/post/how-to-download-file-using-axios-vue-jsexample.html

This is also a good read:
https://medium.com/@fakiolinho/handle-blobs-requests-with-axios-the-right-way-bb905bdb1c04

We need to trigger this API when a button is clicked.

Cheers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.