Recovering a scan that was deleted in Web UI

Alessandro Di Giuseppe's Avatar

Alessandro Di Giuseppe

23 Oct, 2015 06:51 PM

Is it possible to recover/undelete a scan that was deleted via the arachni Web UI?

Also, I tried importing scans from v1.3.1 to v1.3.2 but it kicked back an error stating that scans cannot be imported from different versions; is that correct?

  1. Support Staff 1 Posted by Tasos Laskos on 23 Oct, 2015 07:30 PM

    Tasos Laskos's Avatar

    Are you trying to import scans (like from AFR reports) or the previous DB?

    If it's the latter you can try removing these 2 lines from the script at system/arachni-ui-web/script/import.

  2. 2 Posted by Alessandro Di G... on 23 Oct, 2015 08:20 PM

    Alessandro Di Giuseppe's Avatar

    The latter - trying to import the previous DB of scans into an updated instance. I tried your recommendation, but I don't see the old scans in the new console.

    What about recovering an accidentally deleted scan, is it possible in any way? (even at the file system level?)

  3. Support Staff 3 Posted by Tasos Laskos on 24 Oct, 2015 02:18 AM

    Tasos Laskos's Avatar

    No unfortunately not, everything is in the DB.

  4. 4 Posted by Alessandro Di G... on 24 Oct, 2015 02:28 AM

    Alessandro Di Giuseppe's Avatar

    Bummer about deleted scans being unrecoverable.

    Also, the previous DB import no longer throws the error, but it doesn't seem to accomplish the task - the previous scans don't appear in the new instance.

    Thanks for the prompt responses!

  5. Support Staff 5 Posted by Tasos Laskos on 24 Oct, 2015 02:29 AM

    Tasos Laskos's Avatar

    Were you using PG or the default SQLite?

  6. 6 Posted by Alessandro Di G... on 24 Oct, 2015 02:31 PM

    Alessandro Di Giuseppe's Avatar

    Default SQlite DB; is there a log file generated by the import script that might explain what is happening?

    For the deleted scans, I tried browsing the DB with SQLite Browser, but you're right, those scan entries are gone now. (I was hoping they had just been removed from the index and that the data entries would still be there)

  7. Support Staff 7 Posted by Tasos Laskos on 24 Oct, 2015 02:34 PM

    Tasos Laskos's Avatar

    No there's not, what output does it print?

  8. 8 Posted by Alessandro Di G... on 24 Oct, 2015 02:46 PM

    Alessandro Di Giuseppe's Avatar

    See arachni_web_scan_import script output below:

    root@kali:/opt/arachni/bin# ./arachni_web_scan_import ../../arachni-1.3.1/
    DEPRECATION WARNING: The configuration option `config.serve_static_assets` has been renamed to `config.serve_static_files` to clarify its role (it merely enables serving everything in the `public` folder and is unrelated to the asset pipeline). The `serve_static_assets` alias will be removed in Rails 5.0. Please migrate your configuration files accordingly. (called from block in <top (required)> at /opt/arachni/system/arachni-ui-web/config/environments/production.rb:22)
    DEPRECATION WARNING: You did not specify a `log_level` in `production.rb`. Currently, the default value for `log_level` is `:info` for the production environment and `:debug` in all other environments. In Rails 5 the default value will be unified to `:debug` across all environments. To preserve the current setting, add the following line to your `production.rb`:
    
       config.log_level = :info
    
    . (called from block in tsort_each at /opt/arachni/system/usr/lib/ruby/2.2.0/tsort.rb:226)
    Owner not specified.
    root@kali:/opt/arachni/bin#
    

    N.B. Afterwards, I ran the arachni_web_import after this to import all settings, and it seems to have fixed it. Originally, I wanted to import the scans only, but it seems by importing all the settings, the scan import issue was fixed in the process. (Fulfilled pre-requisites/dependencies, I guess?)

  9. Support Staff 9 Posted by Tasos Laskos on 24 Oct, 2015 02:48 PM

    Tasos Laskos's Avatar

    No, arachni_web_scan_import imports a scan from an AFR file, arachni_web_import imports the DB of the package you specified.

  10. 10 Posted by Alessandro Di G... on 24 Oct, 2015 03:00 PM

    Alessandro Di Giuseppe's Avatar

    OK, my mistake; I thought it only imported the scan portion of the DB, rather that the whole DB.

    I see now on the GitHub page it's described clearly. I didn't see anything at the CLI about AFR files when I was trying it though.

    Will RTFM more carefully next time.

  11. Support Staff 11 Posted by Tasos Laskos on 24 Oct, 2015 03:28 PM

    Tasos Laskos's Avatar

    No worries, it happens.

    Cheers

  12. Tasos Laskos closed this discussion on 24 Oct, 2015 03:28 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