devops:mock:hoverfly
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| devops:mock:hoverfly [2023/06/22 13:55] – skipidar | devops:mock:hoverfly [2023/11/01 07:15] (current) – ↷ Page moved from camunda:devops:mock:hoverfly to devops:mock:hoverfly skipidar | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| Like CA LISA: http:// | Like CA LISA: http:// | ||
| + | Microservices and " | ||
| + | https:// | ||
| === Hoverfly === | === Hoverfly === | ||
| Line 15: | Line 17: | ||
| - | DOcumentation: https:// | + | Documentation: https:// |
| Repository: https:// | Repository: https:// | ||
| Line 23: | Line 25: | ||
| - | === Starting | + | === Starting |
| - | <code> | + | <sxh js> |
| - | hoverctl.exe start | + | |
| - | hoverctl.exe login --username | + | # start |
| - | </code> | + | hoverfly \ |
| + | -ap 8006 \ | ||
| + | -pp 8005 \ | ||
| + | -username " | ||
| + | -password " | ||
| + | -listen-on-host 0.0.0.0 \ | ||
| + | -logs-file "/ | ||
| + | |||
| + | # start on windows | ||
| + | .\hoverfly ` | ||
| + | -ap 8888 ` | ||
| + | -pp 8005 ` | ||
| + | -username | ||
| + | -password | ||
| + | -listen-on-host 0.0.0.0 ` | ||
| + | -logs-file "/ | ||
| + | </sxh> | ||
| === Enable proxy === | === Enable proxy === | ||
| Line 47: | Line 65: | ||
| {{https:// | {{https:// | ||
| - | And recode | + | And record |
| Then export the strategy.json | Then export the strategy.json | ||
| + | |||
| < | < | ||
| hoverctl export simulation.json | hoverctl export simulation.json | ||
| Line 75: | Line 94: | ||
| the tool *proxychains* is recommended. | the tool *proxychains* is recommended. | ||
| + | |||
| + | @Deprecated | ||
| https:// | https:// | ||
| + | |||
| + | Replacement | ||
| + | https:// | ||
| + | |||
| + | |||
| + | == Install proxychains == | ||
| + | |||
| + | <sxh shell> | ||
| + | sudo apt update | ||
| + | sudo apt install proxychains4 | ||
| + | </ | ||
| + | |||
| + | |||
| + | == Configure the proxychain == | ||
| + | |||
| + | **sudo vim / | ||
| + | |||
| + | <sxh shell> | ||
| + | # proxychains.conf | ||
| + | # | ||
| + | # HTTP, SOCKS4, SOCKS5 tunneling proxifier with DNS. | ||
| + | # | ||
| + | |||
| + | # The option below identifies how the ProxyList is treated. | ||
| + | # only one option should be uncommented at time, | ||
| + | # otherwise the last appearing option will be accepted | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # Dynamic - Each connection will be done via chained proxies | ||
| + | # all proxies chained in the order as they appear in the list | ||
| + | # at least one proxy must be online to play in chain | ||
| + | # (dead proxies are skipped) | ||
| + | # otherwise EINTR is returned to the app | ||
| + | # | ||
| + | strict_chain | ||
| + | # | ||
| + | # Strict - Each connection will be done via chained proxies | ||
| + | # all proxies chained in the order as they appear in the list | ||
| + | # all proxies must be online to play in chain | ||
| + | # otherwise EINTR is returned to the app | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # Random - Each connection will be done via random proxy | ||
| + | # (or proxy chain, see chain_len) from the list. | ||
| + | # this option is good to test your IDS :) | ||
| + | |||
| + | # Make sense only if random_chain | ||
| + | #chain_len = 2 | ||
| + | |||
| + | # Quiet mode (no output from library) | ||
| + | #quiet_mode | ||
| + | |||
| + | # Proxy DNS requests - no leak for DNS data | ||
| + | proxy_dns | ||
| + | |||
| + | # Some timeouts in milliseconds | ||
| + | tcp_read_time_out 15000 | ||
| + | tcp_connect_time_out 8000 | ||
| + | |||
| + | # ProxyList format | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # Examples: | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # proxy types: http, socks4, socks5 | ||
| + | # ( auth types supported: " | ||
| + | # | ||
| + | [ProxyList] | ||
| + | # add proxy here ... | ||
| + | # meanwile | ||
| + | # defaults set to " | ||
| + | http 127.0.0.1 | ||
| + | </ | ||
| + | |||
| + | |||
| + | *note* : | ||
| + | |||
| + | " | ||
| + | |||
| + | |||
| + | == Make the OS trust the hoverfly CA certificate == | ||
| + | |||
| + | Add it to the trusted certificates https:// | ||
| + | |||
| + | <sxh shell> | ||
| + | # get the hoverfly cert | ||
| + | wget https:// | ||
| + | |||
| + | sudo apt-get install -y ca-certificates | ||
| + | sudo cp / | ||
| + | sudo update-ca-certificates | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | == Call some URL with proxy in the middle == | ||
| + | |||
| + | Now you can make " | ||
| + | |||
| + | |||
| + | <sxh shell> | ||
| + | proxychains curl -iv https:// | ||
| + | |||
| + | |||
| + | [proxychains] config file found: / | ||
| + | [proxychains] preloading / | ||
| + | [proxychains] DLL init: proxychains-ng 4.14 | ||
| + | * | ||
| + | * TCP_NODELAY set | ||
| + | [proxychains] Strict chain ... 127.0.0.1: | ||
| + | * Connected to google.com (127.0.0.1) port 443 (#0) | ||
| + | * ALPN, offering h2 | ||
| + | * ALPN, offering http/1.1 | ||
| + | * successfully set certificate verify locations: | ||
| + | * | ||
| + | CApath: / | ||
| + | * 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_128_GCM_SHA256 | ||
| + | * ALPN, server did not agree to a protocol | ||
| + | * Server certificate: | ||
| + | * subject: O=GoProxy untrusted MITM proxy Inc; CN=google.com | ||
| + | * start date: Jan 1 00:00:00 1970 GMT | ||
| + | * expire date: Dec 31 00:00:00 2049 GMT | ||
| + | * subjectAltName: | ||
| + | * issuer: O=Hoverfly Authority; CN=hoverfly.proxy | ||
| + | * SSL certificate verify ok. | ||
| + | > GET / HTTP/1.1 | ||
| + | > Host: google.com | ||
| + | > User-Agent: curl/7.68.0 | ||
| + | > Accept: */* | ||
| + | > | ||
| + | * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): | ||
| + | * Mark bundle as not supporting multiuse | ||
| + | < HTTP/1.1 301 Moved Permanently | ||
| + | HTTP/1.1 301 Moved Permanently | ||
| + | < Alt-Svc: h3=": | ||
| + | Alt-Svc: h3=": | ||
| + | < Cache-Control: | ||
| + | Cache-Control: | ||
| + | < Connection: close | ||
| + | Connection: close | ||
| + | < Content-Security-Policy-Report-Only: | ||
| + | Content-Security-Policy-Report-Only: | ||
| + | < Content-Type: | ||
| + | Content-Type: | ||
| + | < Date: Fri, 23 Jun 2023 06:30:08 GMT | ||
| + | Date: Fri, 23 Jun 2023 06:30:08 GMT | ||
| + | < Expires: Fri, 23 Jun 2023 06:30:08 GMT | ||
| + | Expires: Fri, 23 Jun 2023 06:30:08 GMT | ||
| + | < Hoverfly: Was-Here | ||
| + | Hoverfly: Was-Here | ||
| + | < Location: https:// | ||
| + | Location: https:// | ||
| + | < P3p: CP=" | ||
| + | P3p: CP=" | ||
| + | < Server: gws | ||
| + | Server: gws | ||
| + | < Set-Cookie: CONSENT=PENDING+692; | ||
| + | Set-Cookie: CONSENT=PENDING+692; | ||
| + | < Transfer-Encoding: | ||
| + | Transfer-Encoding: | ||
| + | < X-Frame-Options: | ||
| + | X-Frame-Options: | ||
| + | < X-Xss-Protection: | ||
| + | X-Xss-Protection: | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | The document has moved | ||
| + | <A HREF=" | ||
| + | </ | ||
| + | * Closing connection 0 | ||
| + | * TLSv1.3 (OUT), TLS alert, close notify (256): | ||
| + | </ | ||
| + | |||
devops/mock/hoverfly.1687442155.txt.gz · Last modified: by skipidar
