-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathlinux_mock_data.yaml
More file actions
738 lines (622 loc) · 15.5 KB
/
linux_mock_data.yaml
File metadata and controls
738 lines (622 loc) · 15.5 KB
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
linux_connect_console_server:
preface: |
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
prompt: ""
commands:
"":
new_state: linux_login2
connect_ssh:
preface: |
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
RSA key fingerprint is a1:07:ac:9b:8c:c2:db:c5:4c:dc:70:b5:09:2a:a5:b1.
prompt: "Are you sure you want to continue connecting (yes/no)? "
commands:
"yes":
new_state: password
connect_ssh_key_error:
preface: |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:zDkX6A76of5LWxP8FQD9dZULQVQCpvYaGcWS4PnyqPE.
Please contact your system administrator.
Add correct host key in ~/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in ~/.ssh/known_hosts:13
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
virl@172.25.192.90: Permission denied (publickey,password).
prompt: ""
commands: ""
connect_sma:
prompt: "testuser@pod-esa01's password: "
commands:
"cisco":
response: |
AsyncOS 11.5.0 for Cisco C690 build 014
Welcome to the Cisco C690 Email Security Appliance
new_state: sma_prompt
"cisco1":
response: |
AsyncOS 11.5.0 for Cisco C690 build 014
Welcome to the Cisco C690 Email Security Appliance
new_state: sma_prompt_1
connect_for_password:
prompt: "Password for testuser@2pod2m-client025.ibauto: "
commands:
"cisco":
new_state: exec6
"bad_pw":
response: |
Permission denied, please try again.
login:
preface: "\n\n"
prompt: "Login: "
commands:
"cisco":
new_state: password
linux_login2:
prompt: "Login: "
commands:
"cisco":
new_state: linux_password2
linux_login3:
prompt: "Identifier: "
commands:
"user3":
new_state: linux_password3
password:
prompt: "cisco@localhost password: "
commands:
"cisco":
new_state: exec
"wrong_password":
response: |
Login incorrect
new_state: login
linux_password2:
prompt: "cisco@localhost password: "
commands:
"cisco":
new_state: exec3
linux_password3:
prompt: "name@localhost Passe: "
commands:
"cisco":
new_state: exec
linux_password4:
prompt: "admin@1.1.1.1's password: "
commands:
"cisco":
response: |
Command Line Interface is starting up, please wait ...
Welcome to the Platform Command Line Interface
VMware Installation:
2 vCPU: Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
Disk 1: 110GB, Partitions aligned
8192 Mbytes RAM
new_state: exec17
exec:
prompt: "%N$ "
commands: &cmds
"stty cols 200": ""
"stty rows 200": ""
"prompt1":
new_state: exec
"prompt2":
new_state: exec2
"prompt3":
new_state: exec3
"prompt4":
new_state: exec4
"prompt5":
new_state: exec5
"prompt6":
new_state: exec6
"prompt7":
new_state: exec7
"prompt8":
new_state: exec8
"prompt9":
new_state: exec9
"prompt10":
new_state: exec10
"prompt11":
new_state: exec11
"prompt12":
new_state: exec12
"prompt13":
new_state: exec13
"prompt14":
new_state: exec14
"prompt15":
new_state: exec15
"prompt16":
new_state: exec16
"prompt17":
new_state: exec17
"prompt18":
new_state: exec18
"prompt19":
new_state: exec19
"prompt20":
new_state: exec20
"prompt21":
new_state: exec21
"prompt22":
new_state: exec22
"ls": |
/tmp
/var
/opt
"sudo ls": |
/tmp
/var
/opt
"sudo":
new_state: sudo_password
"sudo2":
new_state: sudo_password2
"exit":
new_state: login
"telnet localhost 64001":
new_state: ios_connect_console_server
"telnet 127.0.0.1 64001":
new_state: ios_connect_console_server
"telnet 7009":
new_state: linux_connect_console_server
"source env.sh": ""
"ping -c 1 localhost": |
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.031 ms
--- localhost ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.031/0.031/0.031/0.000 ms
"ssh localhost": ""
"ssh -l admin localhost": ""
"ssh -l cisco2 localhost": ""
"telnet 10.3.3.1":
new_state: ios_r1_telnet
"xml":
response: |
<xml>
<a>looks like a prompt</a>
</xml>
timing:
- 0:,0,0.05
"banner1":
response: |
#########
Banner #
#########
timing:
- 0:,0,0.05
"banner2":
response: |
%%%%%%%%
Banner %
%%%%%%%%
timing:
- 0:,0,0.05
"ping -A -c5 127.0.0.1":
response: |
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.022 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.022 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.024 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.029 ms
--- 127.0.0.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 801ms
rtt min/avg/max/mdev = 0.018/0.023/0.029/0.003 ms, ipg/ewma 200.425/0.020 ms
timing:
- 0:1,0
- 1:6,0,0.2
- 6:,0
"ping -A -c5 2.2.2.2":
response: |
PING 2.2.2.2 (2.2.2.2) 56(84) bytes of data.
--- 2.2.2.2 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 14005ms
timing:
- 0:1,0
- 1:,1,0.05
"ping -A -c10 127.0.0.1":
response: |
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.022 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.022 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.024 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.029 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.022 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.022 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.024 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.029 ms
--- 127.0.0.1 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 801ms
rtt min/avg/max/mdev = 0.018/0.023/0.029/0.003 ms, ipg/ewma 200.425/0.020 ms
"ping6 -A -c5 ::1":
response: |
PING ::1(::1) 56 data bytes
64 bytes from ::1: icmp_seq=1 ttl=64 time=0.016 ms
64 bytes from ::1: icmp_seq=2 ttl=64 time=0.031 ms
64 bytes from ::1: icmp_seq=3 ttl=64 time=0.031 ms
64 bytes from ::1: icmp_seq=4 ttl=64 time=0.045 ms
64 bytes from ::1: icmp_seq=5 ttl=64 time=0.071 ms
--- ::1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 801ms
rtt min/avg/max/mdev = 0.016/0.038/0.071/0.020 ms, ipg/ewma 200.464/0.029 ms
"ssh -l admin 127.0.0.1 -p 64100":
new_state: ios_exec
'cd abc': |
bash: cd: abc: No such file or directory
"echo $?":
response:
- '1'
- '0'
- '2'
"sudo_invalid":
new_state: sudo_invalid
"sudo bash":
new_state: sudo_password
"trex-console":
new_state: trex_console
"uname": "\x1b[?2004l\rLinux\r\r\n\x1b[?2004h"
"ls -ltr":
response: "ls -ltr\r\n\x1b[?2004l\rtotal 35828\r\ndrwxr-xr-x 11 root root 4096 Feb 22 14:21 \x1b[01;34mdata\x1b[0m\r\n\x1b[?2004hndfc-web:~ # "
timing:
- 0:,0,0.1,0.01
"uptime":
response: "20:17:07 up 1 min, 1 user, load average: 0.13, 0.05, 0.02"
timing:
- 0:,0,0.1,0.01
trex_console:
prompt: "trex> "
commands:
"help": "help"
"exit":
new_state: exec
exec2:
prompt: "Linux# "
commands: *cmds
exec3:
prompt: "Linux> "
commands: *cmds
exec4:
prompt: "user@host ~$ "
commands: *cmds
exec5:
prompt: "agent-lab9-pm:~:2017> "
commands: *cmds
exec6:
prompt: "root@agent-lab11-pm:~# "
commands: *cmds
exec7:
prompt: "root@localhost ~% "
commands: *cmds
exec8:
prompt: "vm-7:3>"
commands: *cmds
exec9:
prompt: "%1B]0;cisco@dev-server:~^Gcisco@dev-server:3> "
commands: *cmds
exec10:
prompt: "(dev) user@dev-1-name dir$ "
commands: *cmds
exec11:
prompt: "[user@new-host dir]$ "
commands: *cmds
exec12:
prompt: "host ~ # "
commands: *cmds
exec13:
prompt: "host:~ # "
commands: *cmds
exec14:
prompt: "%1B]0;rally@rally: /workspace\x07rally@rally:/workspace$ %1B[K"
commands: *cmds
exec15:
prompt: "$ "
commands: *cmds
exec16:
prompt: "root@sj21-pxe-03.cisco.com:~/"
commands: *cmds
exec17:
prompt: "admin:"
commands: *cmds
exec18:
preface:
response: |
########################################################################
<host:root>/root:
timing:
- 0:,0,0.05
prompt: "# "
commands: *cmds
exec19:
prompt: "~ #"
commands: *cmds
exec20:
prompt: "[%N] # "
commands: *cmds
exec21:
prompt: "cxta@mock-server:~$ "
commands: *cmds
exec22:
prompt: "(server.cisco.com)~ : "
commands: *cmds
sma_prompt:
prompt: "sma03:testuser 1] "
commands: *cmds
sma_prompt_1:
prompt: "pod-esa01.cisco.com:testuser 1] "
commands: *cmds
sudo_password:
prompt: "[sudo] password for cisco: "
commands:
"sudo_password":
new_state: sudo
sudo_password2:
prompt: "This is your UNIX password: "
commands:
"sudo_password":
new_state: sudo
sudo:
prompt: "Linux# "
commands:
<<: *cmds
"exit":
new_state: exec
sudo_invalid:
prompt: "[sudo] password for cisco: "
commands:
"unknown":
response: "cisco is not in the sudoers file. This incident will be reported."
new_state: sudo
"invalid": "Sorry, try again."
"sudo":
new_state: sudo_password
hit_enter:
prompt: "Hit Enter to proceed: "
commands:
"":
new_state: exec2
### Cisco IOS states for proxy testing
ios_connect_console_server:
preface: |
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
prompt: ""
commands:
"":
new_state: ios_login
ios_login:
prompt: "Username: "
commands:
"admin":
new_state: ios_exec
ios_exec:
prompt: "Router>"
commands:
"enable":
new_state: ios_enable
ios_enable:
prompt: "Router#"
commands:
"term length 0": ""
"term width 0": ""
"show version": ""
"config term":
new_state: ios_config
ios_config:
prompt: "Router(conf)#"
commands:
"no logging console": ""
"line console 0":
new_state: ios_config_line
"line vty 0 4":
new_state: ios_config_line
"exit":
new_state: ios_enable
"end":
new_state: ios_enable
ios_config_line:
prompt: "Router(config-line)#"
commands:
"exec-timeout 0": ""
"line vty 0 4": ""
"end":
new_state: ios_enable
ios_r1_telnet:
preface: |2
Trying 10.3.3.1...
Connected to 10.3.3.1.
Escape character is '^]'.
User Access Verification
prompt: "Password:"
commands:
"cisco1":
new_state: ios_r1_exec
ios_r1_exec:
prompt: "R01>"
commands:
"enable":
new_state: ios_r1_password
"":
new_state: ios_r1_exec
ios_r1_password:
prompt: "Password:"
commands:
"cisco11":
new_state: ios_r1_enable
ios_r1_enable:
prompt: "R01#"
commands:
"telnet 2.2.2.2":
new_state: ios_r2_telnet
"ssh 2.2.2.2 username user1":
new_state: ios_r2_telnet
ios_r2_telnet:
preface: |2
Trying 2.2.2.2...
Connected to 2.2.2.2.
Escape character is '^]'.
User Access Verification
prompt: "Password:"
commands:
"cisco2":
new_state: ios_r2_exec
ios_r2_exec:
prompt: "R02>"
commands:
"enable":
new_state: ios_r2_password
ios_r2_password:
prompt: "Password:"
commands:
"cisco22":
new_state: ios_r2_enable
ios_r2_enable:
prompt: "R02#"
commands:
"telnet 10.2.3.3":
new_state: ios_sw3_telnet
"telnet 10.2.3.4":
new_state: ios_sw4_telnet
ios_sw3_telnet:
preface: |
Trying 10.2.3.3 ... Open
User Access Verification
prompt: "Password:"
commands:
"cisco3":
new_state: ios_sw3_exec
ios_sw3_exec:
prompt: "Sw03>"
commands:
"enable":
new_state: ios_sw3_enable
ios_sw3_password:
prompt: "Password:"
commands:
"cisco33":
new_state: ios_sw03_enable
ios_sw3_enable:
prompt: "Sw03#"
commands:
"term length 0": ""
"term width 0": ""
"show version": ""
ios_sw4_telnet:
preface: |
Trying 10.2.3.4 ... Open
User Access Verification
prompt: "Password:"
commands:
"cisco4":
new_state: ios_sw4_exec
ios_sw4_exec:
prompt: "Sw04>"
commands:
"show version | include operating mode": ""
"enable":
new_state: ios_sw4_password
ios_sw4_password:
prompt: "Password:"
commands:
"cisco44":
new_state: ios_sw4_enable
ios_sw4_enable:
prompt: "Sw04#"
commands:
"term length 0": ""
"term width 0": ""
"show version": ""
"enable": ""
"show version | include operating mode": ""
"show install summary": ""
"config term":
new_state: ios_sw4_config
ios_sw4_config:
prompt: "Sw04(config)#"
commands:
"no logging console": ""
"line console 0":
new_state: ios_sw4_config_line
"line vty 0 4":
new_state: ios_sw4_config_line
"exit":
new_state: ios_sw4_enable
"end":
new_state: ios_sw4_enable
ios_sw4_config_line:
prompt: "Sw04(config-line)#"
commands:
"exec-timeout 0": ""
"line vty 0 4": ""
"end":
new_state: ios_sw4_enable
exec_ps1:
prompt: "Linux$ "
commands:
"stty cols 200": ""
"stty rows 200": ""
"for x in 1 2 3; do":
new_state: exec_ps2
exec_ps2:
prompt: "> "
commands:
"echo $x":
response: |
>
>
timing:
- 0:,0.5,0.5
"done":
new_state: exec
response: |
1
2
3
login_ssh_delay:
preface:
response: |
Last login: Tue Dec 11 16:01:04 2018 from localhost
timing:
- 0:,10
prompt: "[user@host ~]$ "
commands: *cmds
login_passphrase:
preface:
response: |
Last login: Tue Dec 11 16:01:04 2018 from localhost
prompt: "Enter passphrase for key '/home/virl/.ssh/id_rsa': "
commands:
"cisco":
new_state: exec
prompt_recovery:
prompt: "this is not a valid prompt"
commands:
"":
new_state: exec
ansi_prompt:
prompt: "\x1b[37mapc>"
commands: *cmds
ansi_prompt2:
prompt: "\x1b[0;32m[user@host:~] >\x1b[m \x1b[m\x0f"
commands: *cmds
slow_connection_exec:
preface:
response: ""
timing:
- 0:,15
prompt: "%N$ "
commands: *cmds