-3

I have a server with trasversal directory allowed where I'm able to use curl to read system operating files.

I'd like to read the /proc directory as well but for some reason, I receive this:

curl -v http://myserver:9999///proc/cpuinfo
*   Trying myserver...
* TCP_NODELAY set
* Connected to myserver (myserver) port 9999 (#0)
> GET ///proc/cpuinfo HTTP/1.1
> Host: myserver:9999
> User-Agent: curl/7.60.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Cache-Control: no-cache
< Content-length: 0
< Content-type: text/plain
< 
* Connection #0 to host myserver left intact

Maybe the reason is the Content-lenght equal to zero but even though I pass the parameter --ignore-content-lenght the result is the same.

if I use cat:

cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 78
model name  : Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
stepping    : 3
cpu MHz     : 2400.032
cache size  : 3072 KB
physical id : 0
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 22
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc eagerfpu pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch rdseed clflushopt
bugs        :
bogomips    : 4800.06
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

Any help? Thank you

  • curl option --ignore-content-length: "If this option is used, curl will not be able to accurately report progress, and will simply stop the download when the server ends the connection." This does not say that if the server determines that the content is zero octets curl will change the behaviour of the server in sending zero octets. – user4556274 Jun 11 '18 at 16:15
1

The question doesn't seem very "legit", pardon me if i'm misleading but you look like you're accessing someone else server...

As for the /proc directory, it is a special one, with every "file" in there mapping to kernel access and reporting empty size.

I would assume that the file-reading script isn't really able to cope with thoses.

  • Sure, it's a penetration test laboratory. :D – Daniel PC Jun 13 '18 at 5:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.