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

【API安全】crAPI靶场全解

目录

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选项

选用空算法伪造攻击 

 

伪造邮箱,成功越权 

相关文章:

【API安全】crAPI靶场全解

目录 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 …...

HCIP-HarmonyOS Application Developer 习题(四)

1、以下哪个Harmonyos的AI能力可以提供文档翻拍过程中的辅助增强功能? A.文档检测矫正 B.通用文字识别 C.分词 D.图像超分辨率 答案:A 分析:文档校正提供了文档翻拍过程的辅助增强功能,包含两个子功能: 文档检测:能够…...

【Python报错已解决】TypeError: ‘int‘ object is not subscriptable

🎬 鸽芷咕:个人主页 🔥 个人专栏: 《C干货基地》《粉丝福利》 ⛺️生活的理想,就是为了理想的生活! 专栏介绍 在软件开发和日常使用中,BUG是不可避免的。本专栏致力于为广大开发者和技术爱好者提供一个关于BUG解决的经…...

《OpenCV》—— 指纹验证

用两张指纹图片中的其中一张对其验证 完整代码 import cv2def cv_show(name, img):cv2.imshow(name, img)cv2.waitKey(0)def verification(src, model):sift cv2.SIFT_create()kp1, des1 sift.detectAndCompute(src, None)kp2, des2 sift.detectAndCompute(model, None)fl…...

HBase 性能优化的高频面试题及答案

目录 高频面试题及答案1. 如何通过数据建模优化 HBase 性能?2. 如何优化 HBase 的写入性能?3. 如何通过压缩优化 HBase 的存储性能?4. 如何通过调整 RegionServer 配置优化性能?5. 如何优化 HBase 的读取性能?6. 如何通过使用 HBase 的版本控制优化性能?7. 如何通过使用合…...

excel不经过后台实现解析和预览(vue)

数据流读取和数据解析方面通过xlsx组件 安装命令 npm install xlsx -S 它先将上传的excel变成流,然后再根据流进行下一步处理。这个流可以交给其他组件处理比如我用的预览组件是用了其他组件(vue-office/excel)就是把这个流交给其它组件就…...

html5 + css3(上)

目录 HTML认知web标准vscode的简介和使用注释标题和段落换行和水平线标签文本格式化标签图片图片-基本使用图片-属性 绝对路径相对路径音频标签视频标签超链接 HTML基础列表列表-无序和有序列表-自定义 表格表格-使用表格-表格标题和表头单元格表格-结构标签(了解&a…...

Flask+微信小程序实现Login+Profile

Python代码 首先flask的session用不了,只能用全局变量来实现。 import pymysql from flask import Flask, request, jsonify, session from flask_cors import CORS from flask import make_responseapp Flask(__name__) CORS(app, supports_credentialsTrue) #…...

后缀表达式中缀表达式转后缀表达式

后缀表达式的计算机求值 计算规则 从左至右扫描表达式,遇到数字时,将数字压入堆栈,遇到运算符时,弹出栈顶的两个数,用运算符对它们做相应的计算(次顶元素 和 栈顶元素),并将结果入…...

Qemu开发ARM篇-7、uboot以及系统网络连接及配置

文章目录 1、uboot及linux版本网络设置1、宿主机虚拟网卡创建2、uboot使用tap0网卡3、启动测试 2、访问外网设置 在上一篇Qemu开发ARM篇-6、emmc/SD卡AB分区镜像制作并通过uboot进行挂载启动中,我们制作了AB分区系统镜像,并成功通过uboot加载kernel以及d…...

两数相加leetcode

第一个是测试用例代码&#xff0c;测试的是两个带头的逆序链表相加&#xff0c;并且有反转操作 但是题目要求的是不带头链表直接相加&#xff0c;不需要逆转&#xff0c;输出结果也是逆序的&#xff0c; 题解放在第二个代码中 #include<stdio.h> #include<stdlib.h…...

C0004.Qt中QComboBox设置下拉列表样式后,下拉列表样式无效的解决办法

问题描述 我们平时在使用Qt Creator对控件QComboBox的样式进行设置后&#xff0c;在运行程序启动界面时&#xff0c;发现设置的样式无效&#xff0c;效果如下&#xff1a; /* 设置下拉菜单框的样式 */ QComboBox QAbstractItemView {border: 1px solid rgb(161,161,161); /* …...

AI 对话工具汇总

&#x1f423;个人主页 可惜已不在 &#x1f424;这篇在这个专栏AI_可惜已不在的博客-CSDN博客 &#x1f425;有用的话就留下一个三连吧&#x1f63c; 目录 前言: 正文: 前言: 在科技飞速发展的时代&#xff0c;AI 对话正逐渐成为我们获取信息、交流思想的新方式。它以强…...

面试题05.08绘制直线问题详解(考察点为位运算符)

目录 一题目&#xff1a; 二详细思路汇总&#xff1a; 三代码解答&#xff08;带注释版&#xff09;&#xff1a; 一题目&#xff1a; leetcode原题链接&#xff1a;. - 力扣&#xff08;LeetCode&#xff09; 二详细思路汇总&#xff1a; 这里先剧透一下简单版思路哦&…...

埃及 Explained

古埃及&#xff0c;位于尼罗河畔的神秘文明&#xff0c;曾在北非的荒漠中繁荣昌盛。这个充满谜团的王国凭借其宏伟的成就和神秘的文化&#xff0c;数百年来吸引了无数人的好奇心。 埃及人创造了复杂的象形文字&#xff0c;建造了像吉萨大金字塔这样宏伟的建筑&#xff0c;并通…...

【Linux】第一个小程序——进度条实现

&#x1f525; 个人主页&#xff1a;大耳朵土土垚 &#x1f525; 所属专栏&#xff1a;Linux系统编程 这里将会不定期更新有关Linux的内容&#xff0c;欢迎大家点赞&#xff0c;收藏&#xff0c;评论&#x1f973;&#x1f973;&#x1f389;&#x1f389;&#x1f389; 文章目…...

如何确定光纤用几芯 用光纤与网线区别在哪里

光纤用几芯&#xff1f; 光纤芯数&#xff0c;主要和光纤连接的设备接口和设备的通信方式有关。一般来说&#xff0c;光纤中光芯的数量&#xff0c;为设备接口总数乘以2后&#xff0c;再加上10%&#xff5e;20&#xff05;的备用数量&#xff0c;而如果设备的通信方式有设备多…...

使用Chrome浏览器时打开网页如何禁用缓存

缓存是浏览器用于临时存储网页资源的一种机制&#xff0c;可以提高网页加载速度和减轻服务器负载。 然而&#xff0c;有时候我们需要阻止缓存中的Chrome浏览器&#xff0c;以便获取最新的网页内容。以下是一些方法可以实现这个目标&#xff1a; 1、强制刷新页面&#xff1a;在C…...

zabbix7.0创建自定义模板的案例详解(以监控httpd服务为例)

前言 服务端配置 链接: rocky9.2部署zabbix服务端的详细过程 环境 主机ip应用zabbix-server192.168.10.11zabbix本体zabbix-client192.168.10.12zabbix-agent zabbix-server(服务端已配置) 创建模板 模板组直接写一个新的&#xff0c;不用选择 通过名称查找模板&#xf…...

从零开始Ubuntu24.04上Docker构建自动化部署(五)Docker安装jenkins

安装jenkins 下载 sudo docker pull jenkins/jenkins:lts docker-compose启动 jenkins: image: jenkins/jenkins:lts container_name: compose_jenkins user: root restart: always ports: - 28080:8080 volumes: - /home/jenkins_home/:/var/jenkins_home - /usr/local/bin/d…...

开源智能抓取系统Elsa-OpenClaw:从感知到执行的完整技术栈解析

1. 项目概述&#xff1a;当开源大模型遇上“机械爪”最近在AI和机器人交叉领域&#xff0c;一个名为“Elsa-OpenClaw”的项目引起了我的注意。乍一看&#xff0c;这像是一个将大型语言模型&#xff08;LLM&#xff09;与机械臂末端执行器&#xff08;俗称“机械爪”&#xff09…...

SystemVerilog仿真探秘:从delta-cycle到时间片的时序解析

1. 揭开SystemVerilog仿真的神秘面纱 刚接触SystemVerilog仿真时&#xff0c;很多人都会被"delta-cycle"和"时间片"这些概念搞得一头雾水。我刚开始学习时也是这样&#xff0c;直到在实际项目中遇到了信号竞争问题&#xff0c;才真正理解这些概念的重要性。…...

3PEAK思瑞浦 TPA2772-VS1R MSOP8 运算放大器

特性 供电电压:3V至36V 偏移电压:在25C时最大3.5mV 轨到轨输入和输出 带宽:4.6 MHz 噪声容限:-良好&#xff0c;THD0.0008% 低噪声:1kHz时53nV/vHz 零交叉输入: -优异的总谐波失真加噪声:0.0008%...

AI提示词工程实战:结构化系统与用户提示词提升AI工具效能

1. 项目概述&#xff1a;一个为AI工具提供高质量提示词的“弹药库”如果你和我一样&#xff0c;每天都在和各种AI工具打交道——从写代码的Cursor、ChatGPT&#xff0c;到画图的Midjourney、DALL-E&#xff0c;再到处理数据的Pandas AI——那你肯定遇到过这样的时刻&#xff1a…...

Unity中Spine混合模式插槽的Shader实现与优化

1. Spine混合模式插槽的核心问题解析 当你把Spine动画导入Unity后&#xff0c;发现角色颜色变得灰蒙蒙的&#xff0c;就像蒙了一层雾。这种情况在游戏开发中特别常见&#xff0c;尤其是当美术同学在Spine编辑器中精心调制的渐变效果&#xff0c;到了Unity里却完全走样。问题的根…...

VCSA 7.0 报 vAPI Endpoint 黄灯告警?别慌,这份保姆级排查与修复指南帮你搞定

VCSA 7.0 vAPI Endpoint黄灯告警全流程诊断手册 凌晨三点&#xff0c;监控系统突然弹出一条告警——vCenter Server的vAPI Endpoint服务状态由绿转黄。作为运维负责人&#xff0c;你需要在最短时间内判断这是需要立即处理的严重故障&#xff0c;还是可以暂缓的偶发异常。本文将…...

别再只盯着密钥了!深入ESP32 eFuse,看懂flash加密背后的硬件安全逻辑

别再只盯着密钥了&#xff01;深入ESP32 eFuse&#xff0c;看懂flash加密背后的硬件安全逻辑 当你在ESP32项目中使用flash加密功能时&#xff0c;是否曾疑惑过&#xff1a;为什么简单地烧录几个eFuse位就能实现固件保护&#xff1f;那些看似神秘的DISABLE_DL_DECRYPT、FLASH_CR…...

动手写一个 JVM 调优学习项目:6 个真实场景带你掌握性能优化

动手写一个 JVM 调优学习项目&#xff1a;6 个真实场景带你掌握性能优化 项目地址: https://gitee.com/jiucenglou/jvm-tuning-lab 技术栈: Java 8 Maven 适合人群: Java 开发者、性能调优初学者、面试准备者 &#x1f914; 为什么写这个项目&#xff1f; 在实际开发和面试中…...

MATLAB 2018a/2023b实测:Libsvm安装后如何用自带数据集快速验证与跑通第一个模型

MATLAB 2018a/2023b实战&#xff1a;Libsvm安装后快速验证与模型跑通全流程 当你第一次在MATLAB中成功安装Libsvm后&#xff0c;那种兴奋感可能很快会被"接下来该做什么"的迷茫所取代。别担心&#xff0c;这篇文章将带你用Libsvm自带的heart_scale数据集&#xff0c;…...

别再只点保存了!QGIS工程文件.QGZ和.QGS到底怎么选?附XML结构详解

QGIS工程文件格式深度解析&#xff1a;.QGZ与.QGS的选择策略与XML实战指南 当你在QGIS中完成一幅精心设计的地图&#xff0c;点击保存按钮时&#xff0c;系统弹出的格式选择对话框可能让你陷入短暂的犹豫——该选择.QGZ还是.QGS&#xff1f;这个看似简单的选择背后&#xff0c;…...