Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. One year ago, searching for "CURLOPT_SSL_VERIFYPEER, 0” gave me 153k hits on GitHub and I blogged about the sorry state of TLS certificate verification in code.

One year ago, searching for "CURLOPT_SSL_VERIFYPEER, 0” gave me 153k hits on GitHub and I blogged about the sorry state of TLS certificate verification in code.

Scheduled Pinned Locked Moved Uncategorized
18 Posts 12 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • bagder@mastodon.socialB bagder@mastodon.social

    One year ago, searching for "CURLOPT_SSL_VERIFYPEER, 0” gave me 153k hits on GitHub and I blogged about the sorry state of TLS certificate verification in code. (as every hit indicates code that probably disables verification)

    Now? 181k hits. 20% more one year later.

    The blog post from last year:

    Link Preview Image
    disabling cert checks: we have not learned much

    And by that I mean the global "we" as in the world of developers. In the beginning there was SSL When I first learned about SSL and how to use it in the mid to late 1990s, it took me a while to realize and understand the critical importance of having the client verifying the … Continue reading disabling cert checks: we have not learned much →

    favicon

    daniel.haxx.se (daniel.haxx.se)

    seaborgium1234@mastodon.socialS This user is from outside of this forum
    seaborgium1234@mastodon.socialS This user is from outside of this forum
    seaborgium1234@mastodon.social
    wrote last edited by
    #3

    @bagder Is the risk that people using curl to download code, could be given malicious code instead?

    I've disabled stuff like that while developing and servers locally. Also, employer intranet sites might sometimes need it off.

    bagder@mastodon.socialB 1 Reply Last reply
    0
    • tante@tldr.nettime.orgT tante@tldr.nettime.org

      @bagder I wonder if that is an artifact that coding agents produce

      bagder@mastodon.socialB This user is from outside of this forum
      bagder@mastodon.socialB This user is from outside of this forum
      bagder@mastodon.social
      wrote last edited by
      #4

      @tante might very well be as there is a lot of such code to "get inspired by" ...

      jcgruenhage@chaos.socialJ 1 Reply Last reply
      0
      • seaborgium1234@mastodon.socialS seaborgium1234@mastodon.social

        @bagder Is the risk that people using curl to download code, could be given malicious code instead?

        I've disabled stuff like that while developing and servers locally. Also, employer intranet sites might sometimes need it off.

        bagder@mastodon.socialB This user is from outside of this forum
        bagder@mastodon.socialB This user is from outside of this forum
        bagder@mastodon.social
        wrote last edited by
        #5

        @seaborgium1234 correct. Without verifying the certificate, the client cannot tell if there is a MITM attack or if the site is an impostor due to a DNS attack or similar.

        It basically disables the security HTTPS otherwise provides.

        seaborgium1234@mastodon.socialS 1 Reply Last reply
        0
        • bagder@mastodon.socialB bagder@mastodon.social

          @seaborgium1234 correct. Without verifying the certificate, the client cannot tell if there is a MITM attack or if the site is an impostor due to a DNS attack or similar.

          It basically disables the security HTTPS otherwise provides.

          seaborgium1234@mastodon.socialS This user is from outside of this forum
          seaborgium1234@mastodon.socialS This user is from outside of this forum
          seaborgium1234@mastodon.social
          wrote last edited by
          #6

          @bagder Don't download places sometimes provide hash codes to prevent this? Though they are easily missed/skips as they are quite boring.

          brahms@chaos.socialB 1 Reply Last reply
          0
          • seaborgium1234@mastodon.socialS seaborgium1234@mastodon.social

            @bagder Don't download places sometimes provide hash codes to prevent this? Though they are easily missed/skips as they are quite boring.

            brahms@chaos.socialB This user is from outside of this forum
            brahms@chaos.socialB This user is from outside of this forum
            brahms@chaos.social
            wrote last edited by
            #7

            @bagder @seaborgium1234 I mean, if I MITM the payload, I can just as easily provide the corresponding hash

            bagder@mastodon.socialB 1 Reply Last reply
            0
            • brahms@chaos.socialB brahms@chaos.social

              @bagder @seaborgium1234 I mean, if I MITM the payload, I can just as easily provide the corresponding hash

              bagder@mastodon.socialB This user is from outside of this forum
              bagder@mastodon.socialB This user is from outside of this forum
              bagder@mastodon.social
              wrote last edited by
              #8

              @brahms @seaborgium1234 exactly. So sure, if you get the hash from a truly separate and independent source that could work. That's just rarely what's done with hashes.

              Digital signatures is typically preferred for integrity checks because of the separate infra used for those.

              seaborgium1234@mastodon.socialS 1 Reply Last reply
              0
              • bagder@mastodon.socialB bagder@mastodon.social

                One year ago, searching for "CURLOPT_SSL_VERIFYPEER, 0” gave me 153k hits on GitHub and I blogged about the sorry state of TLS certificate verification in code. (as every hit indicates code that probably disables verification)

                Now? 181k hits. 20% more one year later.

                The blog post from last year:

                Link Preview Image
                disabling cert checks: we have not learned much

                And by that I mean the global "we" as in the world of developers. In the beginning there was SSL When I first learned about SSL and how to use it in the mid to late 1990s, it took me a while to realize and understand the critical importance of having the client verifying the … Continue reading disabling cert checks: we have not learned much →

                favicon

                daniel.haxx.se (daniel.haxx.se)

                icing@chaos.socialI This user is from outside of this forum
                icing@chaos.socialI This user is from outside of this forum
                icing@chaos.social
                wrote last edited by
                #9

                @bagder Sad. 20% is a lot.

                Then again, Microsoft writing an RCE into Notepad app is hard to beat.

                1 Reply Last reply
                0
                • bagder@mastodon.socialB bagder@mastodon.social

                  One year ago, searching for "CURLOPT_SSL_VERIFYPEER, 0” gave me 153k hits on GitHub and I blogged about the sorry state of TLS certificate verification in code. (as every hit indicates code that probably disables verification)

                  Now? 181k hits. 20% more one year later.

                  The blog post from last year:

                  Link Preview Image
                  disabling cert checks: we have not learned much

                  And by that I mean the global "we" as in the world of developers. In the beginning there was SSL When I first learned about SSL and how to use it in the mid to late 1990s, it took me a while to realize and understand the critical importance of having the client verifying the … Continue reading disabling cert checks: we have not learned much →

                  favicon

                  daniel.haxx.se (daniel.haxx.se)

                  jawnsy@mastodon.socialJ This user is from outside of this forum
                  jawnsy@mastodon.socialJ This user is from outside of this forum
                  jawnsy@mastodon.social
                  wrote last edited by
                  #10

                  @bagder Maybe the real verified peers were the friends we made along the way

                  1 Reply Last reply
                  0
                  • bagder@mastodon.socialB bagder@mastodon.social

                    One year ago, searching for "CURLOPT_SSL_VERIFYPEER, 0” gave me 153k hits on GitHub and I blogged about the sorry state of TLS certificate verification in code. (as every hit indicates code that probably disables verification)

                    Now? 181k hits. 20% more one year later.

                    The blog post from last year:

                    Link Preview Image
                    disabling cert checks: we have not learned much

                    And by that I mean the global "we" as in the world of developers. In the beginning there was SSL When I first learned about SSL and how to use it in the mid to late 1990s, it took me a while to realize and understand the critical importance of having the client verifying the … Continue reading disabling cert checks: we have not learned much →

                    favicon

                    daniel.haxx.se (daniel.haxx.se)

                    durchaus@mastodon.socialD This user is from outside of this forum
                    durchaus@mastodon.socialD This user is from outside of this forum
                    durchaus@mastodon.social
                    wrote last edited by
                    #11

                    @bagder the number is sure to increase as long as people do this and we neglect the existing code that disappears. So, to properly understand this number, we must see it in relation to the amount of newly added code and how they related in the past.

                    1 Reply Last reply
                    0
                    • bagder@mastodon.socialB bagder@mastodon.social

                      @brahms @seaborgium1234 exactly. So sure, if you get the hash from a truly separate and independent source that could work. That's just rarely what's done with hashes.

                      Digital signatures is typically preferred for integrity checks because of the separate infra used for those.

                      seaborgium1234@mastodon.socialS This user is from outside of this forum
                      seaborgium1234@mastodon.socialS This user is from outside of this forum
                      seaborgium1234@mastodon.social
                      wrote last edited by
                      #12

                      @bagder Ah good point. Where I see hashes they tend to appear near the download link. 😩 I will need to be more careful in the future. Thanks for the warning!

                      1 Reply Last reply
                      0
                      • bagder@mastodon.socialB bagder@mastodon.social

                        One year ago, searching for "CURLOPT_SSL_VERIFYPEER, 0” gave me 153k hits on GitHub and I blogged about the sorry state of TLS certificate verification in code. (as every hit indicates code that probably disables verification)

                        Now? 181k hits. 20% more one year later.

                        The blog post from last year:

                        Link Preview Image
                        disabling cert checks: we have not learned much

                        And by that I mean the global "we" as in the world of developers. In the beginning there was SSL When I first learned about SSL and how to use it in the mid to late 1990s, it took me a while to realize and understand the critical importance of having the client verifying the … Continue reading disabling cert checks: we have not learned much →

                        favicon

                        daniel.haxx.se (daniel.haxx.se)

                        nafmo@social.vivaldi.netN This user is from outside of this forum
                        nafmo@social.vivaldi.netN This user is from outside of this forum
                        nafmo@social.vivaldi.net
                        wrote last edited by
                        #13

                        @bagder The main reason to disable this is to work with intranet hosts, where setting up TLS is a major hassle (and browsers enforcing it is becoming a big hindrance).

                        For connecting to the public internet, it doesn't make much sense.

                        Your post prompted a checkbox setting in our software (which often connect to TLS-enabled hosts through IP addresses or non-default interfaces with different DNS names, but sometimes do need to verify the host name and certificate)

                        Link Preview Image
                        1 Reply Last reply
                        0
                        • bagder@mastodon.socialB bagder@mastodon.social

                          One year ago, searching for "CURLOPT_SSL_VERIFYPEER, 0” gave me 153k hits on GitHub and I blogged about the sorry state of TLS certificate verification in code. (as every hit indicates code that probably disables verification)

                          Now? 181k hits. 20% more one year later.

                          The blog post from last year:

                          Link Preview Image
                          disabling cert checks: we have not learned much

                          And by that I mean the global "we" as in the world of developers. In the beginning there was SSL When I first learned about SSL and how to use it in the mid to late 1990s, it took me a while to realize and understand the critical importance of having the client verifying the … Continue reading disabling cert checks: we have not learned much →

                          favicon

                          daniel.haxx.se (daniel.haxx.se)

                          inguin@nerdculture.deI This user is from outside of this forum
                          inguin@nerdculture.deI This user is from outside of this forum
                          inguin@nerdculture.de
                          wrote last edited by
                          #14

                          @bagder Is there any good way to avoid this with embedded devices?

                          We build and sell those, and we don't know in advance what the DNS name or the IP address at the installation site will be. And quite frankly, most customers don't bother rolling out proper certificates even in production.

                          So we ship the device with a demo certificate, and all our SDK libraries have the option to disable certificate verification. Unverified TLS is still better than plain HTTP because it prevents passive snooping.

                          bagder@mastodon.socialB lovestha@floss.socialL 2 Replies Last reply
                          0
                          • inguin@nerdculture.deI inguin@nerdculture.de

                            @bagder Is there any good way to avoid this with embedded devices?

                            We build and sell those, and we don't know in advance what the DNS name or the IP address at the installation site will be. And quite frankly, most customers don't bother rolling out proper certificates even in production.

                            So we ship the device with a demo certificate, and all our SDK libraries have the option to disable certificate verification. Unverified TLS is still better than plain HTTP because it prevents passive snooping.

                            bagder@mastodon.socialB This user is from outside of this forum
                            bagder@mastodon.socialB This user is from outside of this forum
                            bagder@mastodon.social
                            wrote last edited by
                            #15

                            @inguin a popular way is to instead do cert pinning, but that comes with some other challenges.

                            1 Reply Last reply
                            0
                            • bagder@mastodon.socialB bagder@mastodon.social

                              @tante might very well be as there is a lot of such code to "get inspired by" ...

                              jcgruenhage@chaos.socialJ This user is from outside of this forum
                              jcgruenhage@chaos.socialJ This user is from outside of this forum
                              jcgruenhage@chaos.social
                              wrote last edited by
                              #16

                              @bagder @tante it would fit in right with their usual pattern of disabling tests that aren’t passing (or outright changing them so they don’t test the right thing anymore) instead of fixing the code

                              1 Reply Last reply
                              0
                              • bagder@mastodon.socialB bagder@mastodon.social

                                One year ago, searching for "CURLOPT_SSL_VERIFYPEER, 0” gave me 153k hits on GitHub and I blogged about the sorry state of TLS certificate verification in code. (as every hit indicates code that probably disables verification)

                                Now? 181k hits. 20% more one year later.

                                The blog post from last year:

                                Link Preview Image
                                disabling cert checks: we have not learned much

                                And by that I mean the global "we" as in the world of developers. In the beginning there was SSL When I first learned about SSL and how to use it in the mid to late 1990s, it took me a while to realize and understand the critical importance of having the client verifying the … Continue reading disabling cert checks: we have not learned much →

                                favicon

                                daniel.haxx.se (daniel.haxx.se)

                                chris@social.losno.coC This user is from outside of this forum
                                chris@social.losno.coC This user is from outside of this forum
                                chris@social.losno.co
                                wrote last edited by
                                #17

                                @bagder I make verify peers enabled by default, but optional to disable it, in my audio player, because I can't exactly easily grant people the ability to add random certificates for their internet radio streams, which may not even be TLS protected in the first place, so this setting doesn't affect them in that case.

                                1 Reply Last reply
                                0
                                • inguin@nerdculture.deI inguin@nerdculture.de

                                  @bagder Is there any good way to avoid this with embedded devices?

                                  We build and sell those, and we don't know in advance what the DNS name or the IP address at the installation site will be. And quite frankly, most customers don't bother rolling out proper certificates even in production.

                                  So we ship the device with a demo certificate, and all our SDK libraries have the option to disable certificate verification. Unverified TLS is still better than plain HTTP because it prevents passive snooping.

                                  lovestha@floss.socialL This user is from outside of this forum
                                  lovestha@floss.socialL This user is from outside of this forum
                                  lovestha@floss.social
                                  wrote last edited by
                                  #18

                                  @bagder @inguin this is also where some of the corner cases of this being safe are: the important files you use curl to download are verified in some way with data not obtained via curl.

                                  Maybe the files are encrypted/signed in other ways?

                                  1 Reply Last reply
                                  0
                                  • R relay@relay.infosec.exchange shared this topic
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • World
                                  • Users
                                  • Groups