当前位置: 首页 > news >正文

PortswiggerLab:Exploiting a mass assignment vulnerability

实验目标

To solve the lab, find and exploit a mass assignment vulnerability to buy a Lightweight l33t Leather Jacket. You can log in to your own account using the following credentials: wiener:peter.

官方WP

  1. In Burp's browser, log in to the application using the credentials wiener:peter.

  2. Click on the Lightweight "l33t" Leather Jacket product and add it to your basket.

  3. Go to your basket and click Place order. Notice that you don't have enough credit for the purchase.

  4. In Proxy > HTTP history, notice both the GET and POST API requests for /api/checkout.

  5. Notice that the response to the GET request contains the same JSON structure as the POST request. Observe that the JSON structure in the GET response includes a chosen_discount parameter, which is not present in the POST request.

  6. Right-click the POST /api/checkout request and select Send to Repeater.

  7. In Repeater, add the chosen_discount parameter to the request. The JSON should look like the following:

    {
        "chosen_discount":{
            "percentage":0
        },
        "chosen_products":[
            {
                "product_id":"1",
                "quantity":1
            }
        ]
    }
  8. Send the request. Notice that adding the chosen_discount parameter doesn't cause an error.

  9. Change the chosen_discount value to the string "x", then send the request. Observe that this results in an error message as the parameter value isn't a number. This may indicate that the user input is being processed.

  10. Change the chosen_discount percentage to 100, then send the request to solve the lab.


实验步骤

  • 进入实验室首页

  • 点击右上角的`My account`进入登录页面

  • 使用实验室提供的凭据成功登录 

  • 回到商品展示页找到目标商品

  • 将该商品添加进购物车中

在购物车页面中进行刷新可见一接口

  • 使用OPTIONS方式向该接口发送请求,查看该接口允许接收什么类型的请求

由响应头可见,该接口仅允许接收`GET`、`POST`方式请求

  • 使用GET方式向该接口发送请求

  • 将请求方式修改为POST
  • 将发送GET请求时响应体复制到POST请求体中
  • 将折扣从0修改为100

  • 发包后成功将商品价格修改为0

相关文章:

  • 【C#知识点详解】List<T>储存结构详解
  • Python 字典和集合(字典推导)
  • 美国NAB展会次日实况
  • C++ 基类的虚析构函数与派生的析构函数关系
  • Reflexion 框架 | 提示词工程(4)
  • HOW - React 组件渲染受其他无关数据影响和优化方案(含memo和props.children)
  • equals() 和 hashCode()
  • 泛目录站群,无极多功能泛目录站群程序:AI驱动的SEO增长引擎
  • java设计模式-单例模式
  • 【unity游戏开发入门到精通——动画篇】Animator2D序列帧动画
  • 解锁健康养生密码,拥抱活力人生
  • 手写数字识别实战教程:从零实现MNIST分类器(完整代码示例)
  • 算法篇(八)【递归】
  • 【代码随想录 字符串6.实现strstr】 KMP算法。
  • 1区6.6分CHARLS最新文章解读
  • 【学习笔记】文件上传漏洞--二次渲染、.htaccess、变异免杀
  • 2025年客运从业资格证备考刷题题库
  • 7-11 分段计算居民水费
  • 告别循环!用Stream优雅处理集合
  • AI无人直播教程 ai无人直播系统 【工具下载+教程】
  • 怎么做网站链接支付/网站如何做推广
  • 齐河网站建设/百度霸屏推广
  • 网站哪家做的比较好的/重庆seo优化公司
  • 福民做三级分销网站/泉州关键词快速排名
  • 网站建设要什么知识/免费网站可以下载
  • 怎么做二维码转到网站/seo搜索引擎优化实训