exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Spark 2.5 Arbitrary File Read

Spark 2.5 Arbitrary File Read
Posted Nov 3, 2016
Authored by aj

Spark version 2.5 suffers from an arbitrary file read vulnerability.

tags | exploit, arbitrary
SHA-256 | ab13f783a63bd501130714b05a757e9c4fa7bddb35f7e1197b0d5fdac659ce1d

Spark 2.5 Arbitrary File Read

Change Mirror Download
Hey folks,


Spark (sparkjava.com) is a mildly hyped Java micro web framework that
also provides functionality to serve static files. Unfortunately,
there's no protection against directory traversal attacks and I haven't
been able to contact anyone related to the project (after trying 4
people over 2 weeks). As this bug is not that awesome, and fairly
trivial to find, please help yourself to some semi-shitty 0-day.

If configured, Spark provides two ways to serve static files, either
from the classpath via Spark.staticFileLocation() or the filesystem via
Spark.externalStaticFileLocation().


-----------------------------------

Classpath Vuln

-----------------------------------

Exploit the classpath based vulnerability with something like:

curl "http://<host>/..\..\spark\Spark.class"

The number of ..\ you need in the path depends on where in the classpath
the static file location is configured to be. If you don't have the
right amount then you don't get anything, but this is trivially brute
forced. The classpath often has juicy things like configuration files
and keystores, or you could look for non-framework class files and
decompile them.


-----------------------------------

Filesystem Vuln

-----------------------------------

Try something like:

curl
"http://<host>/..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\etc\passwd"


I'm sure you can figure out what to do from here.



This is tested on Spark 2.5 and git master, it should work on earlier
versions.

If you need a workaround, don't use Spark to serve static files and move
them to another web server.


Cheers,
aj


Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    19 Files
  • 23
    Jul 23rd
    17 Files
  • 24
    Jul 24th
    47 Files
  • 25
    Jul 25th
    31 Files
  • 26
    Jul 26th
    13 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    27 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close