首页 > 其他分享 >stack smashing--canary报错利用

stack smashing--canary报错利用

时间:2024-04-11 23:49:00浏览次数:15  
标签:__ -- smashing canary flag 报错 stack

stack smashing--canary报错利用

一般这种都是考察点比较狭窄,因为这个漏洞在libc2.23以上就被修复了,漏洞产生的原因是因为当覆盖掉canary的时候程序会报错,程序会执行 __stack_chk_fail 函

数来打印 __libc_argv[0] 指针所指向的字符串,如果把这个字符串覆盖成flag地址那么就可以得到flag

那么我们看一下保护,这种canary保护都是开启的

32位ida载入

一次read一次printf就是格式化字符串漏洞了,而且程序给了后门函数,那么我们可以修改_stack_chk_fail的got表或者修改

__do_global_dtors_aux_fini_array_entry地址为后门函数地址来读取flag

找一下偏移就可以开始写脚本了

exp

标签:__,--,smashing,canary,flag,报错,stack
From: https://www.cnblogs.com/CH13hh/p/18130254

相关文章

  • 52 Things: Number 23: Write a C program to implement Montgomery arithmetic.
    52Things:Number23:WriteaCprogramtoimplementMontgomeryarithmetic.52件事:第23件:写一个C程序来实现Montgomery算术。 Thisisthelatestinaseriesofblogpoststoaddressthelistof这是一系列博客文章中最新的一篇'52ThingsEveryPhDStudentShould......
  • 52 Things: Number 22: How do you represent a number and multiply numbers in Mont
    52Things:Number22:HowdoyourepresentanumberandmultiplynumbersinMontgomeryarithmetic?52件事:数字22:在蒙哥马利算术中,你如何表示一个数字并将其相乘? Thisisthelatestinaseriesofblogpoststoaddressthelistof '52ThingsEveryPhDStudentSh......
  • 挂载命名空间机制
    原文:https://blog.mufanc.xyz/posts/4104300991/何为「挂载」?  手册中对于挂载的描述是这样的:AllfilesaccessibleinaUnixsystemarearrangedinonebigtree,thefilehierarchy,rootedat/.Thesefilescanbespreadoutoverseveraldevices.Themountcom......
  • 52 Things: Number 24: Describe the binary, m-ary and sliding window exponentiati
    52Things:Number24:Describethebinary,m-aryandslidingwindowexponentiationalgorithms.52件事:第24件:描述二进制、m进制和滑动窗口求幂算法。 Thisisthelatestinaseriesofblogpoststoaddressthelistof '52ThingsEveryPhDStudentShouldKnow......
  • 52 Things: Number 25: Methods for modular reduction using "special" primes that
    52Things:Number25:Methodsformodularreductionusing"special"primesthatdefine GF(p) and GF(2n)52件事:第25件:使用定义 GF(p) 和#1的“特殊”素数进行模归约的方法# Thisisthelatestinaseriesofblogpoststoaddressthelistof '52ThingsEver......
  • 2024.4.11
    所学时间:2小时代码行数:81博客园数:1篇所学知识:我的结对作业伙伴是龚涵彬,我们今天写迪杰斯特拉算法,用来解决最短路径问题,定义了一个名为Dijkstra的类,其中包含了计算最短路径的静态方法calculate和一些辅助方法。类中使用了HashMap<Station,Result>result来存储每个站点到目标......
  • 分库分表
    分库分表什么是ShardingSphereApacheShardingSphere是一款分布式的数据库生态系统。可以将任意数据库转换为分布式数据库,并通过数据分片、弹性伸缩、加密等能力对原有数据库进行增强。详细见官网详解什么是ShardingSphere-JDBCShardingSphere-JDBC定位为轻量级Java框架,在Jav......
  • 52 Things: Number 26: Describe the NAF scalar multiplication algorithm.
    52Things:Number26:DescribetheNAFscalarmultiplicationalgorithm.52件事:第26件:描述NAF标量乘法算法。 Thisisthelatestinaseriesofblogpoststoaddressthelistof '52ThingsEveryPhDStudentShouldKnow' todoCryptography:asetofquestion......
  • 正则化项
    以下为ai生成:正则化项是机器学习中用于控制模型复杂度的一种技术,它通过向损失函数添加额外的惩罚项来实现这一目的。这样做的主要好处是防止模型过拟合训练数据,从而帮助模型更好地泛化到未见过的数据。正则化项的作用是通过对模型参数进行惩罚,鼓励模型选择更简单的解决方案,例如通......
  • 5. bn和ln
    batchnormalization和layernormalization,主要区别在于normalization的方向不同。normalizationNormalization:规范化或标准化,就是把输入数据X,在输送给神经元之前先对其进行平移和伸缩变换,将X的分布规范化成在固定区间范围的标准分布。Normalization的作用很明显,把数据拉回标准......