How to solve AWS (AMAZON) WAF Captcha Token

Logo of Capsolver

CapSolver Blogger

How to use capsolver

12-Jul-2023

How to Solve AWS WAF Captcha

Solve AWS Captcha
aws captcha grid solver

Before we start solving AWS WAF Captcha, there are some requirements and points that we need to be aware of:

🔒 Requirements:

  • CapSolver Key
  • Proxy (Optional)

Proxy is optional, depends on the task type used, will be required / optional.

📒 Points to be aware of:

⚠️When the status code returned by the captcha page is 202, you only need to pass awsChallengeJs.
⚠️ When the status code returned by the captcha page is 405, you need to pass in awsKey, awsIv, awsContext, and awsChallengeJs.

  • Ensure the validity of the website URL
    To verify the authenticity of the website URL, ensure that it returns a 405 status code and the HTML contains elements like iv, key, and context.
  • Triggering the AWS Captcha is necessary to access this URL.
  • The URL should yield an HTML response comprising the key, iv, and context.
    As illustrated in these images, a matching URL will yield a 405 status code, and its HTML will include elements such as key, iv, and context.
    Page with status code 405
    Html of a page with status code 405
    - Save the url of the challenge script, context value, iv value and key value.

To solve AWS WAF Captcha, follow our documentation. For this example, we will only use the required parameters. The task types for AWS WAF Captcha are:

  • AntiAwsWafTaskProxyless: This task type use the proxies from capsolver.
  • AntiAwsWafTask: This task type requires your own proxies.

In this case, the task type that will be used in this blog, will be AntiAwsWafTaskProxyLess.

📤 Step 1: Submit the information to Capsolver

⚠️ When the status code returned by the captcha page is 405, you need to pass awsKey, awsIv, awsContext, and awsChallengeJs.

Status code 405

POST https://api.capsolver.com/createTask
{
 "clientKey":"yourapiKey",
 "task":
 {
 "type":"AntiAwsWafTaskProxyless",
 "websiteURL":"https://efw47fpad9.execute-api.us-east-1.amazonaws.com/latest",
  "awsKey":"key value",
  "awsIv":"iv value",
  "awsContext":"context value",
  "awsChallengeJS":"Url of the js challenge"
 }
}

⚠️When the status code returned by the captcha page is 202, you only need to pass awsChallengeJs.

Status code 202

{
 "clientKey":"yourapiKey",
 "task":
 {
 "type":"AntiAwsWafTaskProxyless",
 "websiteURL":"https://efw47fpad9.execute-api.us-east-1.amazonaws.com/latest",
  "awsKey":"",
  "awsIv":"",
  "awsContext":"",
  "awsChallengeJS":"Url of the js challenge"
 }
}

This will return a response that contains taskId, save this value and submit to the step 2.

🔖 Step 2: Get the results

We will need to retrieve the getTaskResult method until the captcha is solved. Retrieve every 3-5s.

POST https://api.capsolver.com/getTaskResult
Host: api.capsolver.com
Content-Type: application/json
{
 "clientKey":"YOUR_API_KEY",
 "taskId": "TASKID OF CREATETASK" //ID created by the createTask method
}

Captcha solution will look like:
AWS CAPTCHA TOKEN SOLUTION

After the captcha has been solved, you need to create the cookie aws-waf-token and add the value that you got from capsolver response.

In conclusion, solving AWS WAF Captcha can be a daunting task, but with the help of capsolver.com, it can be done quickly and efficiently. By following the steps outlined above, you can easily solve AWS WAF Captcha.

Ещеe

Web Scraping vs API
Веб-скрапинг против API: Сбор данных с помощью веб-скрапинга и API

В современном мире, ориентированном на данные, способность собирать и анализировать огромные объемы информации имеет огромное значение...

The other captcha

29-Mar-2024

Как решить DataDome с помощью Python
Как решить DataDome с помощью Python

В этой статье мы покажем вам, как решить DataDome с помощью Python.

The other captcha

16-Nov-2023

Как решить Queue-it Captcha
Как решить Queue-it Captcha

Очередь — это виртуальная система зала ожидания, используемая для управления трафиком веб-сайта в часы пик. Иногда он применяет CAPTCHA для проверки того, что пользователи являются людьми, а не ботами. CAPSOLVER — это автоматизированный инструмент, который можно использовать для решения CAPTCHA, что может помочь вам быстрее обходить Queue-it CAPTCHA.

The other captcha

12-Jul-2023

Обход CAPTCHA DataDome с помощью
Обход CAPTCHA DataDome с помощью

Этот блог предоставляет руководство по обходу CAPTCHA DataDome с использованием API CapSolver. Процесс включает создание задачи с использованием определенного метода, ее отправку, а затем получение решения с использованием ID задачи. В посте также отмечается, что можно использовать прокси, и приводятся примеры запросов дл

The other captcha

14-Jun-2023

Что такое DataDome
Что такое DataDome

Этот блог подробно рассказывает о том, как решить капчу DataDome с помощью сервиса capsolver.com. В нем приводятся конкретные шаги для решения капчи, включая подготовку необходимых данных, использование API capsolver для создания задачи и получения результата, а также общие рекомендации и предупреждения по использованию сервиса. Блог является очень полезным ресурсом для тех, кто сталкивается с капчами DataDome и ищет способы их обхода.

The other captcha

13-Jun-2023

Обход AWS WAF Captcha с помощью распознавания изображений
Обход AWS WAF Captcha с помощью распознавания изображений

Amazon WAF - это веб-приложение firewall, которое помогает защитить ваши веб-приложения или API от обычных веб-эксплуатаций, которые могут повлиять на доступность, нарушить безопасность или потребить чрезмерные ресурсы. Amazon WAF дает вам контроль над тем, как трафик достигает ваших приложений, позволяя вам создавать правила безопасности, которые блокируют общие шаблоны атак.

The other captcha

30-May-2023