【API安全】crAPI靶场全解

news2024/9/27 20:40:23

目录

BOLA Vulnerabilities

Challenge 1 - Access details of another user’s vehicle

Challenge 2 - Access mechanic reports of other users

Broken User Authentication

Challenge 3 - Reset the password of a different user

Excessive Data Exposure

Challenge 4 - Find an API endpoint that leaks sensitive information of other users

Challenge 5 - Find an API endpoint that leaks an internal property of a video

Rate Limiting

Challenge 6 - Perform a layer 7 DoS using ‘contact mechanic’ feature

BFLA

Challenge 7 - Delete a video of another user

Mass Assignment

Challenge 8 - Get an item for free

Challenge 9 - Increase your balance by $1,000 or more

​编辑

Challenge 10 - Update internal video properties

SSRF

Challenge 11 - Make crAPI send an HTTP call to "www.google.com" and return the HTTP response.

NoSQL Injection

Challenge 12 - Find a way to get free coupons without knowing the coupon code.

SQL Injection

Challenge 13 - Find a way to redeem a coupon that you have already claimed by modifying the database

Unauthenticated Access

Challenge 14 - Find an endpoint that does not perform authentication checks for a user.

JWT Vulnerabilities

Challenge 15 - Find a way to forge valid JWT Tokens


似乎只能本地访问,所以直接windows本机部署了: 

GitHub - OWASP/crAPI: completely ridiculous API (crAPI)

BOLA Vulnerabilities

Challenge 1 - Access details of another user’s vehicle

To solve the challenge, you need to leak sensitive information of another user’s vehicle.

  • Since vehicle IDs are not sequential numbers, but GUIDs, you need to find a way to expose the vehicle ID of another user.

  • Find an API endpoint that receives a vehicle ID and returns information about it.

 

 Community里随便访问用户

 抓包拿到其vehicleid

记录一下敏感信息 

nickname: "Robot", email: "robot001@example.com", vehicleid: "ec9c90c0-8647-47f7-960e-4d0012cec600"
nickname: "Pogba", email: "pogba006@example.com", vehicleid: "8104792f-a7a2-44ae-ba99-d8a5de8ae8f6"
nickname: "Adam", email: "adam007@example.com", vehicleid: "887eb746-2d93-4373-8b93-56f1cd7dbd51"

访问8025端口的车辆邮件

 获取车辆

刷新定位,抓包

带着前面信息泄露的vehcileid访问即可

Challenge 2 - Access mechanic reports of other users

crAPI allows vehicle owners to contact their mechanics by submitting a "contact mechanic" form. This challenge is about accessing mechanic reports that were submitted by other users.

  • Analyze the report submission process

  • Find an hidden API endpoint that exposes details of a mechanic report

  • Change the report ID to access other reports

 提交维修报告,抓包

 返回了一个查看报告的url

 访问

修改report_id查看其它用户提交的维修报告

 

Broken User Authentication

Challenge 3 - Reset the password of a different user

  • Find an email address of another user on crAPI

  • Brute forcing might be the answer. If you face any protection mechanisms, remember to leverage the predictable nature of REST APIs to find more similar API endpoints.

 修改密码

提交,抓包 

 

 可以填入泄露的邮箱&爆破OTP

 opt爆多了会拒绝访问

 将v3改为v2,用历史api爆破

修改他人密码成功 

Excessive Data Exposure

Challenge 4 - Find an API endpoint that leaks sensitive information of other users

challenge1的community界面抓包后forward即可批量读取敏感信息

/community/api/v2/community/posts/recent?limit=30&offset=0

 

Challenge 5 - Find an API endpoint that leaks an internal property of a video

In this challenge, you need to find an internal property of the video resource that shouldn’t be exposed to the user. This property name and value can help you to exploit other vulnerabilities.

个人信息可以上传视频,抓包

  

 请求

/identity/api/v2/user/videos/6

Rate Limiting

Challenge 6 - Perform a layer 7 DoS using ‘contact mechanic’ feature

 

 

将失败后重新请求选项打开,请求次数设置为大数,并将mechanic_code改为错误的

BFLA

Challenge 7 - Delete a video of another user

  • Leverage the predictable nature of REST APIs to find an admin endpoint to delete videos

  • Delete a video of someone else

注意RESTful风格预测性 

将challenge 6视频信息泄露的GET方法改成DELETE方法,发现需要admin

将/identity/api/v2/user/videos/6改成/identity/api/v2/admin/videos/6

 

Mass Assignment

Challenge 8 - Get an item for free

crAPI allows users to return items they have ordered. You simply click the "return order" button, receive a QR code and show it in a USPS store. To solve this challenge, you need to find a way to get refunded for an item that you haven’t actually returned.

  • Leverage the predictable nature of REST APIs to find a shadow API endpoint that allows you to edit properties of a specific order.

 

查看订单细节,抓包 

PUT方法修改quantity(数量)

 

成功零元购了一个商品 

 

 

 

Challenge 9 - Increase your balance by $1,000 or more

After solving the "Get an item for free" challenge, be creative and find a way to get refunded for an item you never returned, but this time try to get a bigger refund.

增加数量,测试出可以将status修改为已退款returned 

 

令status为returned 

成功爆金币 

 

Challenge 10 - Update internal video properties

After solving the "Find an API endpoint that leaks an internal property of videos" challenge, try to find an endpoint that would allow you to change the internal property of the video. Changing the value can help you to exploit another vulnerability.

 和challenge5一样,先上传一个视频,GET方法请求信息

 PUT修改文件名

SSRF

Challenge 11 - Make crAPI send an HTTP call to "www.google.com" and return the HTTP response.

和challenge 6的接口一样

将 mechanic_api 的值改为http://google.com

成功SSRF

NoSQL Injection

Challenge 12 - Find a way to get free coupons without knowing the coupon code.

靶场的nosql数据库是mongodb

抓包

payload:

{"coupon_code": {"$ne": "test"}}

返回所有 coupon_code 值不为 test的数据,拿到优惠券的code为TRAC075

SQL Injection

Challenge 13 - Find a way to redeem a coupon that you have already claimed by modifying the database

 sql数据库用的是pgsql

先验证 TRAC075

抓包,再forward,看到

payload:

{"coupon_code":"1'or '1'='1","amount":75}

 

Unauthenticated Access

Challenge 14 - Find an endpoint that does not perform authentication checks for a user.

/workshop/api/shop/orders/1

 

JWT Vulnerabilities

Challenge 15 - Find a way to forge valid JWT Tokens

JWT Authentication in crAPI is vulnerable to various attacks. Find any one way to forge a valid JWT token and get full access to the platform.

jdk21环境下下载JWT Editor插件

dashboard处抓包forward访问到/identity/api/v2/user/dashboard

可以看到插件已经识别到Authorization请求头里的jwt

repeater中可以看到JSON WEB TOKEN选项

选用空算法伪造攻击 

 

伪造邮箱,成功越权 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2170987.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

深度解析APP软件开发:构建卷轴式分销系统的实践探索

在移动互联网的浪潮中,APP软件的开发与应用不断推动着商业模式的创新与发展。其中,卷轴模式分销系统作为一种新兴的营销手段,正逐渐受到市场的青睐。作为程序员,深入探索并实践这一模式的系统开发,不仅是对技术能力的挑…

深入理解函数【JavaScript】

在 JavaScript 中,函数作为一种重要的基本结构,承载着编程中的许多关键概念。下面是与函数相关的内容介绍: 1. 函数定义 JavaScript 中有多种方式定义函数: 1.1 函数声明(Function Declaration) functi…

温州大麓青年音乐节即将开唱,37组音乐人国庆齐聚共谱华章

金秋十月,当丰收的季节与音乐的旋律相遇,温州将迎来一场前所未有的文化盛事。2024年10月1日至4日,温州大麓青年音乐节将在瓯海盛大举行。不仅是一场音乐的狂欢,更是一次多元文化的碰撞与融合。本届音乐节邀请了37组以上的知名音乐…

WEB3.0是什么?

WEB3.0是什么? web3 之前用户创作分享内容,内容信息用户信息被运营平台的科技公司控制,比如某云,某信,某音,用户对直接的数据没有真正的所有权,web2平台拥有绝对控制权,想禁用你的账…

为什么说3-8岁的行为塑造奠定孩子的一生?

亲爱的爸爸妈妈: 育儿征程中会有无数问题在脑海中闪烁。孩子成长的每一步,都紧紧牵动着我们的心弦。 实际上,成长的关键在于塑造孩子五个至关重要的能力,分别是专注力、思维力、沟通力、抗逆力和行动力。 数业智能心大陆基于自研 …

CJEval:一个基于中国初中考试的多样化考试问题数据集

2024-09-26,由腾讯YouTu Lab和北京大学联合发布的CJEval,是一个基于中国初中生考试数据的评估基准,用于测试和分析大型语言模型(LLMs)在教育任务中的表现,从而提高在线教育平台的智能化水平。 一、背景&…

(done) 声音信号处理基础知识(11) (Complex Numbers for Audio Signal Processing)

参考:https://www.youtube.com/watch?vDgF4m0AWCgA&t1047s 似乎是因为信号处理需要使用复数,作者花了一节课介绍复数 据油管主所说,声学信号处理中引入复数的原因是:快速完成部分计算 这里的例子是,当我们做傅里…

Python库matplotlib之一

Python库matplotlib之一 plot函数使用列表或数组画线绘图的格式 matplotlib.pyplot 是使 matplotlib 像 MATLAB 一样工作的函数集合。每个 pyplot 函数都会对图形进行一些更改:例如, 创建图形在图形中创建绘图区域在绘图区域中绘制一些线条用标签装饰绘…

Redis --- 第一讲 --- 分布式简单介绍

一、认识Redis 定义变量,不就是在内存中存储数据吗?Redis是在分布式系统中,才能发挥威力的。如果只是单机程序。直接通过变量存储数据的方式势必使用Redis更优的选择。由于进程的的隔离性。进程之间通过网络通信,就能共享数据。Re…

keepalived+nginx实现高可用的案例详解(主主模式)

文章目录 前言keepalived主备模式和主主模式有什么区别1. 主备模式(Master-Backup Mode)2. 主主模式(Active-Active Mode 或 Dual Master Mode)主备模式 vs 主主模式 的区别总结: 环境案例实现具体步骤ngx1ngx2验证 前…

【教学类-56-05】数感训练——数字05(指定数字出现次数,速度快)

背景需求: 昨天有客户订购“阿拉伯数字的数感训练” 我查看文件夹,发现前期没有生成过0-50的数字(只研究了学号数感训练的学具) 赶紧用之前写过的代码生成了一份 【教学类-56-01】数感训练——数字01(同样的数字涂色…

猫头虎分享已解决Bug:npm warn old lockfile Could not fetch metadata for yallist@3.1.1

🐯猫头虎分享已解决Bug:npm warn old lockfile Could not fetch metadata for yallist3.1.1 今天有粉丝问猫哥:“🐯猫头虎,我在使用 npm 安装依赖时遇到了一个错误提示 Could not fetch metadata for yallist3.1.1&am…

凿岩机械液压比例多路阀控制器

工程机械应用的BEUEC比例放大器控制比例多路阀主要应用于以下几大类设备中: 1. 挖掘机械:包括挖掘机、挖掘装载机、挖掘船等,主要用于挖掘土壤、煤和矿石等物料。 2. 铲土运输机械:如推土机、铲运机、装载机等,主要用…

亚马逊测评,容易掉评是什么原因,怎么解决

大家好,今天来深入探讨如何有效提升亚马逊测评中的留评率,并解析那些导致评论掉落或难以留下的常见原因,以便采取针对性的策略来优化这一过程。作为卖家,提升留评率无疑是提升产品曝光度和销量的关键一环。 亚马逊测评掉评与留评…

【机器学习】目标分类算法概述

🌈个人主页: 鑫宝Code 🔥热门专栏: 闲话杂谈| 炫酷HTML | JavaScript基础 ​💫个人格言: "如无必要,勿增实体" 文章目录 目标分类算法概述传统机器学习方法支持向量机(SVM)决策树和随机森林特征提取 基…

docker_阿里云镜像仓库

1.创建个人实例 登录阿里云——控制台——容器镜像服务——创建个人版实例 2.设置密码 设置后可在终端复制上图2测试 [rootserver ~]# sudo docker login --usernameyou_aliyun_name crpi-8y14tvgewmc6tisz.cn-hangzhou.personal.cr.aliyuncs.com Password: WARNING! Your …

Linux环境下安装python

Linux 环境下安装python 以下是在Linux环境下安装Python - 3.9.4.tgz的详细步骤:1. 下载Python - 3.9.4.tgz(如果未下载)2.解压文件3.安装依赖项(如果需要)4.配置和编译5.安装6.创建一个别名(alias&#xf…

中国车主,撑起天猫又一个万亿赛道

"今年双十一,预计会有超过1亿消费者来淘宝天猫汽车类目消费。3~5年之后,天猫汽车有望冲刺为阿里继大服饰、大快消、家装家电等之后又一个GMV(商品成交总额)破万亿的品类。" 淘天集团汽车事业部总经理、天猫养车总裁无封…

UART配置流程

S3C2440A 的通用异步收发器(UART)配有3 个独立异步串行I/O(SIO)端口,每个都可以是基于中断或基于DMA 模式的操作。换句话说,UART 可以通过产生中断或DMA 请求来进行CPU 和UART 之间的数据传输。UART 通过使…

网络安全 DVWA通关指南 DVWA Weak Session IDs(弱会话)

DVWA Weak Session IDs(弱会话) 文章目录 DVWA Weak Session IDs(弱会话)Low LevelMedium LevelHigh LevelImpossible Level 参考文献 WEB 安全靶场通关指南 相关阅读 Brute Force (爆破) Command Injection(命令注入…