5G协议栈逆向工程:基于开源模拟器的核心网信令分析实战

5G核心网信令逆向分析:基于Open5GS与UERANSIM的实践 5G核心网作为通信网络的控制中枢,其信令流转机制是理解和排障的关键。在标准协议栈中,注册、鉴权、会话管理等流程由NAS、NGAP、PFCP等信令协同完成,形成闭环。利用开源模拟器Open5GS与UERANSIM,可在本地低成本搭建可观测的5G网络环境,将黑盒转为灰盒,通过Wireshark逐条拆解信令消息,真实还原终端注册到PDU会话建立的全过程。该方法不仅适用于技术学习,也能高效定位网络配置或参数导致的鉴权失败、隧道建立异常等疑难问题,帮助工程师从协议底层理解5G核心网行为,提升排障效率。本文即围绕这套实 阅读详情

5G协议栈逆向工程:基于开源模拟器的核心网信令分析实战

在移动通信技术快速迭代的今天,5G网络的安全研究已成为行业焦点。本文将带您深入5G核心网信令分析的实战领域,通过Free5GC和UERANSIM这对黄金组合,构建完整的5G协议分析环境,解密NGAP/NAS信令交互过程,并探索安全漏洞挖掘的实用方法。

1. 环境构建:从零搭建5G分析沙箱

搭建高保真的5G分析环境是研究的基础。我们选择Ubuntu 20.04 LTS作为基础平台,其长期支持特性和稳定的内核版本(建议5.4.0以上)能完美支持GTP5G内核模块的编译。

关键组件安装步骤:

# 安装基础依赖
sudo apt update && sudo apt install -y git gcc g++ make cmake autoconf libtool pkg-config libmnl-dev libyaml-dev libsctp-dev lksctp-tools mongodb wget

# 安装特定版本Golang(Free5GC要求)
wget https://dl.google.com/go/go1.17.8.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.17.8.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
source ~/.bashrc

网络配置要点:

  • 采用双网卡架构:NAT网卡(ens33)用于外网访问,Host-Only网卡(ens37)用于核心网与RAN通信

  • 必须开启IP转发并配置NAT规则:

    sudo sysctl -w net.ipv4.ip_forward=1
    sudo iptables 
5G核心网安全测试实战:基于5greplay的协议模糊测试与漏洞挖掘 模糊测试(Fuzzing)是一种通过向目标系统输入大量非预期、畸形或随机数据,以发现软件漏洞和安全缺陷的自动化测试技术。其核心原理在于突破程序预设的输入边界,触发异常处理路径,从而暴露在代码解析、状态机管理和内存操作中潜藏的缓冲区溢出、逻辑错误等漏洞。在5G、物联网等复杂通信系统中,模糊测试的技术价值尤为突出,它能系统性地评估协议栈健壮性,发现传统扫描工具难以触及的深层安全隐患。应用场景广泛覆盖运营商安全评估、设备供应商协议测试、渗透测试及安全研究等领域。本文聚焦5G核心网,深入解析如何利用5greplay 阅读详情

相关推荐

手把手教你用Wireshark抓包分析5G信令流程(附SA核心网仿真环境搭建)

本文详细介绍了如何使用Wireshark抓包分析5G信令流程,并提供了SA核心网仿真环境的搭建教程。通过Open5GS和UERANSIM的组合,读者可以快速部署5G仿真环境,掌握关键信令流程的捕获与解析技巧,包括系统消息获取、随机接入、NAS鉴权等核心流程,为网络工程师和通信专业学生提供实践指导。

weixin_33736048的博客 254

开源模拟器实战:5G核心网信令逆向分析全流程

5G核心网作为移动通信网络的中枢,其信令流程的复杂度直接影响网络运维与问题排查效率。在技术演进中,理解协议栈分层与核心网接口交互是掌握5G网络的基础,而信令分析则是洞察网元间协作逻辑的关键手段。借助开源软件构建可控的本地实验环境,能够帮助开发者深入剖析NGAP与NAS消息的字段含义和状态迁移过程,从而高效定位注册失败、切片配置冲突等实际问题。这种基于仿真环境的协议逆向方法,既适用于协议栈开发者进行功能验证,也为网络工程师提供了一条低成本的学习路径。本文基于真实项目实践,完整展示了从环境搭建到信令抓取、从流程

weixin_34212762的博客 356

5G核心网协议栈逆向工程:基于开源模拟器的信令流程深度解析

在移动通信网络中,协议栈是实现设备间互联互通的核心软件基础,它定义了数据封装、传输和处理的规则。其工作原理遵循分层模型,通过标准化的接口和状态机,确保信令和数据的可靠、高效传递。理解协议栈的内部机制,对于网络性能优化、故障排查和安全研究具有极高的技术价值,尤其在5G、物联网和云原生网络等复杂应用场景中至关重要。本文聚焦于5G核心网(5GC)这一关键领域,针对其内部状态机转换和协议数据单元(PDU)构造细节不透明的问题,提供了一套基于开源模拟器(如Open5GS和UERANSIM)的逆向工程实战方法。该方法通

weixin_34082854的博客 445

Free5GC + UERANSIM:从零搭建5G端到端测试环境

本文详细介绍了如何使用开源工具Free5GC和UERANSIM从零搭建5G端到端测试环境。通过核心网部署、无线接入网配置和终端模拟,开发者可以在普通PC上实现完整的5G网络模拟,适用于技术学习、应用测试和研究验证。文章包含硬件要求、软件安装、关键配置和常见问题排查,是5G网络开发的实用指南。

weixin_30808693的博客 540

VLA、世界模型与端到端在智驾中的本质关系与工程落地

世界模型并非3D重建,而是对环境状态转移函数的可微分建模;VLA不是视觉+语言+动作的简单拼接,核心在于跨模态语义对齐。二者共同支撑具身智能系统实现从感知到行动的闭环推演,其技术价值体现在长尾场景泛化能力提升与决策延迟降低。在自动驾驶领域,真实量产方案均采用VLA架构作为多模态感知基础,嵌入轻量级世界模型以支持反事实轨迹推演,并通过WA硬件封装保障实时性,最终由端到端控制层完成像素到扭矩的语义贯通。这种混合架构已成L2+/L3智驾系统的工程共识。

weixin_34163553的博客 370

用 Python 和 uiautomation 实现微信批量发送

思路是这样,将要发送的人员名单(包括称呼)以及发送内容都维护到Excel里,程序运行时读取Excel里内容,自动搜索人员姓名(微信昵称或备注名),填入要发送的内容,拼接上称呼(如果需要的话)自动点击发送,这样轮巡直至名单人员全部发送完成。、

jankingdom的专栏 1474

Unity URP风格化水面Shader全流程实现与性能优化指南

在游戏开发中,Shader是实现特定视觉风格的核心技术,它通过编写在GPU上运行的程序,控制模型每个像素的最终颜色与光照表现。其原理在于对顶点位置、纹理坐标、光照信息及深度等数据进行一系列数学运算与插值。这项技术的价值在于能够以极高的自由度创造从写实到卡通的各种渲染效果,同时通过算法优化实现对硬件资源的精准控制。在移动游戏、独立游戏等对性能与风格化有强烈需求的场景中,自定义Shader尤为重要。本文聚焦于使用Unity URP渲染管线,从零构建一个高效的风格化水面Shader,详细拆解了深度色、波浪动画、边

weixin_34320724的博客 374

手把手教你玩转服务器芯片架构--​​7.1 项目1:基于FPGA的RISC-V软核设计(Verilog实现核心指令执行单元)​

本文介绍了基于FPGA的RISC-V软核设计实践项目。项目采用Verilog实现RV32I指令集核心处理器,包含指令解码、ALU、寄存器堆等关键模块设计,并通过功能仿真验证。在Xilinx Artix-7 FPGA上完成综合与部署,资源利用率控制在5%以内。最后探讨了五级流水线优化、指令集扩展等进阶方案。该实践完整覆盖了从指令集设计、RTL实现到FPGA部署的全流程,可作为学习处理器架构与FPGA开发的典型案例。

MHD0815的博客 182

SimpleITK使用——1. 进行Resample/Resize操作

文章目录1. 变换到一个新的spacing1.1 使用Resample()的方法1.1.1 完整代码1.1.2 转换前后图像1.2 使用ResampleImageFilter()的方法2. 已知原图和变换后目标图像的大小2.1 代码2.2 转换后图像3. 相关内容说明3.0 体素和spacing3.1 Resample() 函数说明3.2 itk::simple::ResampleImageFilter函数说明 1. 变换到一个新的spacing 1.1 使用Resample()的方法 1.1.1

啷个哩个啷 8085

抖音中动态生成msToken的方法

抖音中动态生成msToken的方法

sh_moranliunian的博客 2493

使用 Prometheus 监控 Spring Boot 应用

本文介绍了使用SpringBoot+Prometheus+Grafana实现应用监控的方案。首先在SpringBoot项目中集成Micrometer和Actuator组件,通过配置暴露Prometheus监控端点。接着配置Prometheus采集应用指标数据,并通过Grafana可视化展示。具体步骤包括:1)SpringBoot集成Micrometer;2)配置Prometheus抓取应用指标;3)安装Grafana并导入SpringBoot监控模板;4)展示JVM和业务指标。该方案可以实现对SpringB

蔡定努 436

配置 SAP Fiori 服务的 ICF 节点:从 SICF 激活到访问链路打通的完整实践

在SAP Fiori项目实施中,ICF节点配置是关键前置条件却常被忽视。ICF(Internet Communication Framework)作为HTTP请求入口,需要通过SICF事务码激活相关服务节点,否则即使应用开发完善,用户仍可能遇到页面无法访问等问题。典型问题表现为:磁贴可点击但页面空白、资源加载失败等。激活路径主要涉及三组节点:bsp分支下的管理入口、ui5_ui5分支下的应用资源,以及public/bc下的公共资源。项目实施中需特别注意同名服务在不同分支下的差异化作用,确保完整链路通畅。IC

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 278

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

上一篇: GEE批量处理MCD12Q1土地利用数据:从下载到可视化全流程指南
下一篇: FPGA图像压缩算法实战:从哈夫曼编码到DCT变换
CHENG XIE
博客等级 码龄10年 59粉丝 1618原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址