blob: 6505749a66011d98697e5f5770bf133b2e0da388 (
plain)
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
|
/* burneye - stub appended header
*
* -scut
*
* this is appended to the stub binary. see stub.lds, stub.c and wrap.c
* for further description
*/
#ifndef BURNEYE_STUBHDR_H
#define BURNEYE_STUBHDR_H
#define BE_FLAG_PASSWORD 0x0001 /* password protected */
#define BE_FLAG_PASSWORD_CHECK 0x0002 /* check if it was valid */
#define BE_FLAG_BANNER 0x0004 /* show banner */
#define BE_FLAG_BANNER_TTY 0x0008 /* .. on tty */
#define BE_FLAG_FINGERPRINT 0x0010 /* fingeprinted */
#define BE_FLAG_FINGERPRINT_CHK 0x0020 /* check success */
#define BE_FLAG_UNLINK 0x0040 /* unlink on env */
#define BE_FLAG_SEALNOW 0x0080 /* to-be-sealed binary */
#define BE_FLAG_SEALED 0x0100 /* just a tag-flag */
#define BE_FLAG_TAGGED 0x0200 /* is binary tagged ? */
typedef struct {
unsigned char ul_env[16]; /* variable */
} stubhdr_unlink;
typedef struct {
unsigned char tag_env[20];
unsigned char tag_value[64];
} stubhdr_tag;
typedef struct {
unsigned long int banner_len; /* length of banner[] bytes */
/* variable sized banner here */
/* unsigned char banner[]; */
} stubhdr_banner;
typedef struct {
unsigned char pw_check[4]; /* first 4 bytes of hash */
unsigned char pw_xor[20]; /* dynamic xor hash */
unsigned char pw_env[16]; /* environment variable */
} stubhdr_pass;
typedef struct {
unsigned long int stubhdr_size; /* length of this header */
unsigned long int payload_len; /* length of payload */
unsigned long int flags; /* generic flags */
/*** DYNAMIC/OPTIONAL elements come here */
#if 0 /* appended if BE_FLAG_BANNER */
stubhdr_banner banner;
#endif
#if 0 /* appended if BE_FLAG_PASSWORD */
stubhdr_pass spass;
#endif
/* ... variable lenght content from here on ... */
} stubhdr;
#define MAX_BANNER 1024
#define MAX_FINGERPRINT 4096
#define SHDR_MAXSIZE (sizeof (stubhdr) + \
sizeof (stubhdr_unlink) + sizeof (stubhdr_tag) + \
sizeof (stubhdr_banner) + MAX_BANNER + \
sizeof (stubhdr_pass) + MAX_FINGERPRINT)
#endif
|