Secure
2 minutos de lectura
Se nos proporciona este sitio web (https://puzzler7.imaginaryctf.org:7002/
):
Dado que el nombre del reto es “Secure” y el navegador mostró una advertencia que decía que el certificado es autofirmado, deberíamos examinar el certificado.
Flag
Por ejemplo, podemos usar curl
con modo informativo (-v
) e inseguro (-k
). Y ahí está la flag, en los campos asunto y emisor del certificado:
$ curl -vk https://puzzler7.imaginaryctf.org:7002/
* Trying 137.184.207.224:7002...
* Connected to puzzler7.imaginaryctf.org (137.184.207.224) port 7002 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
* subject: C=US; ST=California; L=ictf{securesecuresecuresecuresecuresecuresecuresecuresecure}; O=ImaginaryCTF
* start date: Nov 8 09:57:31 2022 GMT
* expire date: Nov 8 09:57:31 2023 GMT
* issuer: C=US; ST=California; L=ictf{securesecuresecuresecuresecuresecuresecuresecuresecure}; O=ImaginaryCTF
* SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET / HTTP/1.1
> Host: puzzler7.imaginaryctf.org:7002
> User-Agent: curl/7.86.0
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: Werkzeug/2.1.2 Python/3.8.10
< Date: Fri, 16 Dec 2022 14:20:27 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 6
< Connection: close
<
* Closing connection 0
* TLSv1.3 (OUT), TLS alert, close notify (256):
secure