Skip to content

Commit cea0cea

Browse files
committed
remove the crypto command
fixes: #227
1 parent 0dccdcc commit cea0cea

File tree

6 files changed

+8
-1586
lines changed

6 files changed

+8
-1586
lines changed

README.md

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ performs the following steps:
100100
3. added files are copied into the hidden directory `.ret/files` inside a subfolder that is named using the sha-2-256 hex digest of the file content
101101
4. save metadata about the files, specifically their length, location and file type (i.e. elf or not), in the files json file in the hidden `.ret` directory
102102
5. uses strings, with widths of 8, 16 and 32 bits per character, in combination with grep to search for flags according to the flag format
103-
6. uses yara to search for constants associated with cryptography. this is equivilent to running the `crypto` command on the files
104-
105103
added files are subject to processing by other commands that operate on the set of added files
106104

107105
adding a file does not prevent changes from occuring to the source file nor does it detect them for you, like a version control system would
@@ -200,10 +198,9 @@ checks for the following:
200198
3) ida
201199
4) ghidra
202200
5) pin
203-
6) yara
204-
7) gcloud
205-
8) 7z
206-
9) pin
201+
6) gcloud
202+
7) 7z
203+
8) pin
207204

208205
🔗 https://github.com/rerrorctf/ret/blob/main/commands/check.go
209206

@@ -237,18 +234,6 @@ if you provide a custom url it should be the equivalent of https://gchq.github.i
237234

238235
---
239236

240-
### 🚀 <u>cr</u>ypto
241-
242-
```
243-
$ ret crypto [file1 file2 file3...]
244-
```
245-
246-
search for crypto constants using yara rules with ret
247-
248-
🔗 https://github.com/rerrorctf/ret/blob/main/commands/crypto.go
249-
250-
---
251-
252237
### 🚩 <u>ct</u>ftime
253238

254239
```

commands/add.go

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func init() {
3030
List: true,
3131
},
3232
},
33-
SeeAlso: []string{"status", "crypto"}})
33+
SeeAlso: []string{"status"}})
3434
}
3535

3636
func AddHelp() string {
@@ -41,7 +41,6 @@ func AddHelp() string {
4141
"3. added files are copied into the hidden directory " + theme.ColorCyan + "`.ret/files`" + theme.ColorReset + " inside a subfolder that is named using the sha-2-256 hex digest of the file content\n" +
4242
"4. save metadata about the files, specifically their length, location and file type (i.e. elf or not), in the files json file in the hidden " + theme.ColorCyan + "`.ret`" + theme.ColorReset + " directory\n" +
4343
"5. uses strings, with widths of 8, 16 and 32 bits per character, in combination with grep to search for flags according to the flag format\n" +
44-
"6. uses yara to search for constants associated with cryptography. this is equivilent to running the `crypto` command on the files\n\n" +
4544
"added files are subject to processing by other commands that operate on the set of added files\n\n" +
4645
"adding a file does not prevent changes from occuring to the source file nor does it detect them for you, like a version control system would\n\n" +
4746
"you can track several version of a file by adding each of them remembering that they are addressed according to the hash of their content\n\n" +
@@ -171,19 +170,6 @@ func addFile(srcPath string) {
171170
grep2Win(dstPath, "")
172171
grep2Win(dstPath, "-el")
173172
grep2Win(dstPath, "-eL")
174-
175-
var buffer bytes.Buffer
176-
util.CryptoWithYara(dstPath, &buffer)
177-
178-
scanner := bufio.NewScanner(&buffer)
179-
for i := 0; i < 4; i++ {
180-
if scanner.Scan() {
181-
fmt.Printf(theme.ColorPurple+"🚀 %s"+theme.ColorReset+"\n", scanner.Text())
182-
}
183-
}
184-
if scanner.Scan() {
185-
fmt.Printf(theme.ColorGray + "🚀 one or more lines hidden" + theme.ColorReset + "\n")
186-
}
187173
}
188174

189175
func Add(args []string) {

commands/check.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func init() {
1212
Emoji: "✅",
1313
Func: Check,
1414
Help: CheckHelp,
15-
SeeAlso: []string{"crypto", "angr", "sage", "docker", "libc", "inscount"},
15+
SeeAlso: []string{"angr", "sage", "docker", "libc", "inscount"},
1616
})
1717
}
1818

@@ -24,10 +24,9 @@ func CheckHelp() string {
2424
theme.ColorGray + "3) " + theme.ColorReset + "ida\n" +
2525
theme.ColorGray + "4) " + theme.ColorReset + "ghidra\n" +
2626
theme.ColorGray + "5) " + theme.ColorReset + "pin\n" +
27-
theme.ColorGray + "6) " + theme.ColorReset + "yara\n" +
28-
theme.ColorGray + "7) " + theme.ColorReset + "gcloud\n" +
29-
theme.ColorGray + "8) " + theme.ColorReset + "7z\n" +
30-
theme.ColorGray + "9) " + theme.ColorReset + "pin\n"
27+
theme.ColorGray + "6) " + theme.ColorReset + "gcloud\n" +
28+
theme.ColorGray + "7) " + theme.ColorReset + "7z\n" +
29+
theme.ColorGray + "8) " + theme.ColorReset + "pin\n"
3130
}
3231

3332
func testCommand(command string, args ...string) bool {
@@ -66,8 +65,6 @@ func Check(args []string) {
6665
suggestLink("https://www.intel.com/content/www/us/en/developer/articles/tool/pin-a-binary-instrumentation-tool-downloads.html")
6766
}
6867

69-
testCommand("yara", "--help")
70-
7168
testCommand("7z", "--help")
7269

7370
if !testCommand("stat", "/opt/pin/pin") {

commands/crypto.go

Lines changed: 0 additions & 52 deletions
This file was deleted.

util/crypto.go

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)