GithubHelp home page GithubHelp logo

Comments (11)

eliasgranderubio avatar eliasgranderubio commented on May 29, 2024

Hi @BiJason ,

Dagda uses TiredofitClamav docker image which contains Clamav AV. If you use Clamav without any docker image for scanning the TheZoo project, do you get any malware detection?

If you get any malware, perhaps it would be interesting review the docker image with Clamav. Else, the problem could be in the Clamav itself.

Regards.

from dagda.

BiJason avatar BiJason commented on May 29, 2024

Hey @eliasgranderubio , thanks for the response!

I ran a ClamAV with the following steps on an infected docker image.

Steps to create infected docker image:

  1. Use a secure virtual machine with strict access rules, in my case I used an Amazon AWS EC2 instance.
  2. Create a Dockerfile with the line: git clone https://github.com/ytisf/theZoo (be careful, this repo contains malware). Here's the Dockerfile that I used:

FROM python:2.7-alpine
RUN apk add --no-cache sqlite-libs=3.28.0-r0
RUN apk update
RUN apk add git
RUN apk add py-pip
RUN addgroup -S sasquatch
RUN adduser -S sasquatch -G sasquatch
RUN git clone https://github.com/ytisf/theZoo
WORKDIR /theZoo
RUN apk add bash
RUN apk add python-dev
RUN pip install wheel
RUN apk add gcc musl-dev
RUN apk add linux-headers
RUN pip install --user pyminizip
RUN yes | apk add sudo
EXPOSE 5000
USER sasquatch

  1. Built the Dockerfile into a container.
  2. Ran the container.
  3. Ran docker exec -u 0 -it "CONTAINER_NAME" /bin/sh
  4. Within the container, ran python theZoo.py
  5. Followed steps within the program, and called the corresponding commands to install malware onto the image. (use #malwareID followed by get #malwareID)
  6. Ran docker commit on the container to build final infected image.

Steps to run ClamAV scan:

  1. "sudo apt-get install clamav" on the vm with infected image.
  2. "clamscan -r /var/lib/docker

output:

Known viruses: 6218676
Engine version: 0.100.3
Scanned directories: 15041
Scanned files: 110008
Infected files: 323
Data scanned: 3004.39 MB
Data read: 10153.11 MB (ratio 0.30:1)
Time: 1302.386 sec (21 m 42 s)

from dagda.

eliasgranderubio avatar eliasgranderubio commented on May 29, 2024

If you run the same analysis with the next method used by Dagda, do you get the same report?

In your case, the parameters would be:

  • temp_dir = /var/lib/docker
  • docker_driver is the docker_driver.py included in this project

from dagda.

BiJason avatar BiJason commented on May 29, 2024

What steps are required to run that method?

from dagda.

eliasgranderubio avatar eliasgranderubio commented on May 29, 2024

If you use the docker_driver.py script as docker driver for that method, run it should be easy (the imports have been omitted):

d = DockerDriver()
output = get_malware_included_in_docker_image(d, “/var/lib/docker”)
print(output)

from dagda.

BiJason avatar BiJason commented on May 29, 2024

Yes, it's still returning an empty list with the python script.

from dagda.

eliasgranderubio avatar eliasgranderubio commented on May 29, 2024

The last chance. If you run the docker run whithout my Python script with the same parameters as this script, do you get the empty list?

from dagda.

eliasgranderubio avatar eliasgranderubio commented on May 29, 2024

Any update about the last proposed test @BiJason ?

from dagda.

BiJason avatar BiJason commented on May 29, 2024

Yes, still no findings.

from dagda.

eliasgranderubio avatar eliasgranderubio commented on May 29, 2024

Then, could you build a docker image with ClamAV which it be capable of malware detection for your described use case?

A PR would be appreciated :-)

from dagda.

eliasgranderubio avatar eliasgranderubio commented on May 29, 2024

Closed due to inactivity.

from dagda.

Related Issues (20)

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.