| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -43,10 +43,29 @@ tool, [postject][]: | |||
| 43 | 43 | ``` | |
| 44 | 44 | ||
| 45 | 45 | 4. Create a copy of the `node` executable and name it according to your needs: | |
| 46 | + | ||
| 47 | + * On systems other than Windows: | ||
| 48 | + | ||
| 46 | 49 | ```console | |
| 47 | 50 | $ cp $(command -v node) hello | |
| 48 | 51 | ``` | |
| 49 | 52 | ||
| 53 | + * On Windows: | ||
| 54 | + | ||
| 55 | + Using PowerShell: | ||
| 56 | + | ||
| 57 | + ```console | ||
| 58 | + $ cp (Get-Command node).Source hello.exe | ||
| 59 | + ``` | ||
| 60 | + | ||
| 61 | + Using Command Prompt: | ||
| 62 | + | ||
| 63 | + ```console | ||
| 64 | + $ for /F "tokens=*" %n IN ('where.exe node') DO @(copy "%n" hello.exe) | ||
| 65 | + ``` | ||
| 66 | + | ||
| 67 | + The `.exe` extension is necessary. | ||
| 68 | + | ||
| 50 | 69 | 5. Remove the signature of the binary (macOS and Windows only): | |
| 51 | 70 | ||
| 52 | 71 | * On macOS: | |
@@ -61,13 +80,14 @@ tool, [postject][]: | |||
| 61 | 80 | skipped, ignore any signature-related warning from postject. | |
| 62 | 81 | ||
| 63 | 82 | ```console | |
| 64 | - $ signtool remove /s hello | ||
| 83 | + $ signtool remove /s hello.exe | ||
| 65 | 84 | ``` | |
| 66 | 85 | ||
| 67 | 86 | 6. Inject the blob into the copied binary by running `postject` with | |
| 68 | 87 | the following options: | |
| 69 | 88 | ||
| 70 | - * `hello` - The name of the copy of the `node` executable created in step 2. | ||
| 89 | + * `hello` / `hello.exe` - The name of the copy of the `node` executable | ||
| 90 | + created in step 4. | ||
| 71 | 91 | * `NODE_SEA_BLOB` - The name of the resource / note / section in the binary | |
| 72 | 92 | where the contents of the blob will be stored. | |
| 73 | 93 | * `sea-prep.blob` - The name of the blob created in step 1. | |
@@ -79,12 +99,18 @@ tool, [postject][]: | |||
| 79 | 99 | ||
| 80 | 100 | To summarize, here is the required command for each platform: | |
| 81 | 101 | ||
| 82 | - * On systems other than macOS: | ||
| 102 | + * On Linux: | ||
| 83 | 103 | ```console | |
| 84 | 104 | $ npx postject hello NODE_SEA_BLOB sea-prep.blob \ | |
| 85 | 105 | --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 | |
| 86 | 106 | ``` | |
| 87 | 107 | ||
| 108 | + * On Windows: | ||
| 109 | + ```console | ||
| 110 | + $ npx postject hello.exe NODE_SEA_BLOB sea-prep.blob \ | ||
| 111 | + --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 | ||
| 112 | + ``` | ||
| 113 | + | ||
| 88 | 114 | * On macOS: | |
| 89 | 115 | ```console | |
| 90 | 116 | $ npx postject hello NODE_SEA_BLOB sea-prep.blob \ | |
@@ -106,15 +132,25 @@ tool, [postject][]: | |||
| 106 | 132 | binary would still be runnable. | |
| 107 | 133 | ||
| 108 | 134 | ```console | |
| 109 | - $ signtool sign /fd SHA256 hello | ||
| 135 | + $ signtool sign /fd SHA256 hello.exe | ||
| 110 | 136 | ``` | |
| 111 | 137 | ||
| 112 | 138 | 8. Run the binary: | |
| 139 | + | ||
| 140 | + * On systems other than Windows | ||
| 141 | + | ||
| 113 | 142 | ```console | |
| 114 | 143 | $ ./hello world | |
| 115 | 144 | Hello, world! | |
| 116 | 145 | ``` | |
| 117 | 146 | ||
| 147 | + * On Windows | ||
| 148 | + | ||
| 149 | + ```console | ||
| 150 | + $ .\hello.exe world | ||
| 151 | + Hello, world! | ||
| 152 | + ``` | ||
| 153 | + | ||
| 118 | 154 | ## Generating single executable preparation blobs | |
| 119 | 155 | ||
| 120 | 156 | Single executable preparation blobs that are injected into the application can | |
| Back | FazBrowse Home | New Git URL |
0 commit comments