Creation of /home/zapotek/ folder

Louis Nadeau's Avatar

Louis Nadeau

16 Feb, 2015 03:42 PM

Hi

On two different machines (Kali instance) I noticed the creation of a "zapotek" folder under /home after the installation of Arachni. This folder contains a bunch of "cache" files (see screenshot) under /home/zapotek/arachni-build-dir/arachni/system/usr/var/cache/fontconfig. It seems like and issue with the build or install script.

Thanks

  1. Support Staff 1 Posted by Tasos Laskos on 16 Feb, 2015 03:45 PM

    Tasos Laskos's Avatar

    Oh FFS fontconfig doesn't dynamically resolve $HOME. I'll look into this, thanks for the heads-up.

  2. Support Staff 2 Posted by Tasos Laskos on 16 Feb, 2015 03:53 PM

    Tasos Laskos's Avatar

    OK, the build scripts shouldn't do this. How did you install Arachni?

  3. 3 Posted by Louis Nadeau on 16 Feb, 2015 04:07 PM

    Louis Nadeau's Avatar

    There was a couple attempts at installing it in these machines and I'm not clear which one did it. If you cannot find the issue, I will create a fresh Kali instance and will try to find which install method did it. The first install was done using the Kali package, however it was removed because it is outdated. Then a naïve git clone and bundle install of https://github.com/Arachni/arachni was attempted but failed. Finally we followed the instruction here : https://github.com/Arachni/arachni-ui-web/tree/framework-v1.1#linux... like civilized people and without surprise it worked.

  4. Support Staff 4 Posted by Tasos Laskos on 16 Feb, 2015 04:17 PM

    Tasos Laskos's Avatar

    Can you also try the official packages and see if they create that dir please?

  5. 5 Posted by Louis Nadeau on 16 Feb, 2015 04:35 PM

    Louis Nadeau's Avatar

    Ok, it is when the arachni-web is started or the first scan is started through the web-ui that the folder appear.

    Starting from a clean Kali without Arachni, I installed the default package and check under /home and the zapotek folder was not there. Then I started arachni_web and launched a scan and the folder appeared. See the (truncated) console log :

    root@kali:/home# apt-get install arachni
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
    libafpclient0 libcrypt-passwdmd5-perl libmozjs22d xulrunner-22.0 Use 'apt-get autoremove' to remove them.
    The following NEW packages will be installed:
    arachni 0 upgraded, 1 newly installed, 0 to remove and 31 not upgraded.
    Need to get 69.8 MB of archives.
    After this operation, 232 MB of additional disk space will be used.
    Get:1 http://http.kali.org/kali/ kali/main arachni amd64 1.0.2-0.5.3-0kali1 [69.8 MB]
    Fetched 69.8 MB in 2min 44s (425 kB/s)
    Selecting previously unselected package arachni.
    (Reading database ... 353776 files and directories currently installed.) Unpacking arachni (from .../arachni_1.0.2-0.5.3-0kali1_amd64.deb) ...
    Setting up arachni (1.0.2-0.5.3-0kali1) ...
    root@kali:/home# ls
    root@kali:/home# arachni_web
    arachni_web arachni_web_change_password arachni_web_create_user arachni_web_import arachni_web_task
    root@kali:/home# arachni_web
    Thin web server (v1.6.2 codename Doc Brown)
    Maximum connections set to 1024
    Listening on 0.0.0.0:9292, CTRL+C to stop
    127.0.0.1 - - [16/Feb/2015 11:27:48] "GET /unauthenticated HTTP/1.1" 302 - 0.0492
    127.0.0.1 - - [16/Feb/2015 11:27:48] "GET /d/users/sign_in HTTP/1.1" 200 - 0.0659
    127.0.0.1 - - [16/Feb/2015 11:27:48] "GET %2Fassets%2Fapplication-2ecd5f621f319192858fd62ec85c04db.css HTTP/1.1" 200 157194 0.0050
    127.0.0.1 - - [16/Feb/2015 11:27:48] "GET %2Fassets%2Fapplication-2fe2bd4760bc8fce81bfba445116f8e2.js HTTP/1.1" 200 349355 0.0074
    127.0.0.1 - - [16/Feb/2015 11:27:48] "GET /404 HTTP/1.1" 404 728 0.0031
    [----truncated----] 127.0.0.1 - - [16/Feb/2015 11:28:35] "GET /scans/1.js?overview=false&scan_id=1&tab=all HTTP/1.1" 200 - 0.0818
    ^CI, [2015-02-16T11:28:37.954057 #28931] INFO -- System: Shutting down in 2 seconds... I, [2015-02-16T11:28:38.536497 #28931] INFO -- Call: service.native_progress [127.0.0.1]
    Stopping ...
    root@kali:/home# ls
    zapotek
    root@kali:/home#

  6. Support Staff 6 Posted by Tasos Laskos on 17 Feb, 2015 11:57 PM

    Tasos Laskos's Avatar

    So, it seems that fontconfig grabs the compile-time --prefix and uses it for the cache dir, and if it's not available it creates it with something like mkdir -p.
    Which is only a problem when Arachni is being run as root, otherwise /home/zapotek/ won't be able to be created.

    I don't really have any idea of how to configure this properly.

  7. 7 Posted by Louis Nadeau on 18 Feb, 2015 07:46 PM

    Louis Nadeau's Avatar

    could you change the fontconfig path to something like tmp ? I really don't know a thing about fontconfig but googling for "fontconfig" and "cache" I see things like :
    "export XDG_CACHE_HOME=/path/to/cachedir" that can be use to change the location of the cache. Maybe you could to this prior to compiling the arachni package ?

  8. Support Staff 8 Posted by Tasos Laskos on 18 Feb, 2015 07:54 PM

    Tasos Laskos's Avatar

    I think that this is enforced during runtime, not compile-time. And I tried it that too but did no good. Unless I did something wrong...

  9. 9 Posted by Louis Nadeau on 18 Feb, 2015 08:11 PM

    Louis Nadeau's Avatar

    A bad workaround could be to have a special user with its home in /tmp/ for when you are compiling :P

  10. Support Staff 10 Posted by Tasos Laskos on 18 Feb, 2015 08:39 PM

    Tasos Laskos's Avatar

    Nah, it doesn't just grab the username, it uses the ./configure --prefix directory which points to a directory in the package which is of course under my username.

    However, I could just build the packages under /tmp so that the --prefix at the time will be something like /tmp/arachni-build-dir/arachni/system/usr/var/cache/fontconfig.

    Nice idea man. :)

  11. Tasos Laskos closed this discussion on 05 Mar, 2015 05:58 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac