Token Attacks Flashcards

1
Q

What is the purpose of making a token analysis in burp suite?

A

To find predictable tokens to aid in a token forgery process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why does the first two parts of a JWT token start with “ey”?

A

The decoded value of these parts are in JSON format, which starts with {“ and the result of making a base64 encode of {“ is ey.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the first step to attack a JWT?

A

Decoding it and analyzing it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What tool can be used to create a list of all possible character combinations?

A

crunch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the 3 parts of a JWT token?

A

Header, payload and signature.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How is a JWT signed?

A

The process of signing a JWT token consists of base64 encoding the header and payload and applying a hash and a secret to that value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain the None attack.

A

The none attack can happen when the algorithm is set or can be set to “none”. This permits the removal of the signature part, since there is no algorithm to check it, making it possible to change the payload.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain the algorithm switch attack.

A

This attack can happen when the api provider is not checking the JWTs properly, making it possible to change the alg header to “none” or some other algorithm. The most common case is that the API accepts more than one algorithm.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain the JWT crack attack.

A

It consists of cracking the secret for the signature hash. Using a tool like hashcat or JWT_Tool, you can provide a token and a list of possible secrets. The tool will take the base64 encoded header and payload and start to make hashes with the elements of the wordlist. Then it will compare each result to the original signature, until it finds a match or the list ends.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly