Skip to content

Random Extension Order #442

@Fussballexperte

Description

@Fussballexperte

When setting Chrome as a predefined browser, I get a random extension order in the JA3 (as expected).

session.Browser = azuretls.Chrome

However, when I set a specific JA3 with session.ApplyJa3(), only this specific JA3 is used every time. There should be an option to explicitly enable extension shuffling in this case, to create a realistic fingerprint from a JA3.

It's possible to use a workaround, but this seems rather ugly:

func enableRandomExtensionOrder(s *azuretls.Session) {
	orig := s.GetClientHelloSpec
	if orig == nil {
		return
	}

	s.GetClientHelloSpec = func() *tls.ClientHelloSpec {
		spec := orig()
		if spec == nil {
			return nil
		}
		spec2 := *spec

		spec2.Extensions = tls.ShuffleChromeTLSExtensions(spec.Extensions)
		return &spec2
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions