@@ -481,25 +481,28 @@ def myworkspace
481
481
end
482
482
483
483
it 'ip nhrp authentication' do
484
- expect ( aux_cisco ) . to receive ( :print_good ) . with ( "127.0.0.1:1337 NHRP Authentication Key somestring for Interface Tunnel " )
484
+ expect ( aux_cisco ) . to receive ( :print_good ) . with ( "127.0.0.1:1337 NHRP Authentication Key 1511021F0725 for Interface Tunnel " )
485
485
expect ( aux_cisco ) . to receive ( :store_loot ) . with (
486
- "cisco.ios.config" , "text/plain" , "127.0.0.1" , "ip nhrp authentication somestring " , "config.txt" , "Cisco IOS Configuration"
486
+ "cisco.ios.config" , "text/plain" , "127.0.0.1" , "ip nhrp authentication 1511021F0725 " , "config.txt" , "Cisco IOS Configuration"
487
487
)
488
488
expect ( aux_cisco ) . to receive ( :store_loot ) . with (
489
- "cisco.ios.nhrp_tunnel_key" , "text/plain" , "127.0.0.1" , "tunnel_somestring " , "nhrp_tunnel_key.txt" , "Cisco NHRP Authentication Key"
489
+ "cisco.ios.nhrp_tunnel_key" , "text/plain" , "127.0.0.1" , "tunnel_1511021F0725 " , "nhrp_tunnel_key.txt" , "Cisco NHRP Authentication Key"
490
490
)
491
- expect ( aux_cisco ) . to receive ( :store_cred ) . with (
491
+ expect ( aux_cisco ) . to receive ( :create_credential_and_login ) . with (
492
492
{
493
- host : "127.0.0.1" ,
493
+ address : "127.0.0.1" ,
494
494
port : 1337 ,
495
- user : "" ,
496
- pass : "somestring" ,
497
- type : "password" ,
498
- collect_type : "password" ,
499
- active : true
495
+ protocol : "tcp" ,
496
+ workspace_id : workspace . id ,
497
+ origin_type : :service ,
498
+ service_name : '' ,
499
+ module_fullname : "auxiliary/scanner/snmp/cisco_dummy" ,
500
+ private_data : "1511021F0725" ,
501
+ private_type : :nonreplayable_hash ,
502
+ status : Metasploit ::Model ::Login ::Status ::UNTRIED
500
503
}
501
504
)
502
- aux_cisco . cisco_ios_config_eater ( '127.0.0.1' , 1337 , 'ip nhrp authentication somestring ' )
505
+ aux_cisco . cisco_ios_config_eater ( '127.0.0.1' , 1337 , 'ip nhrp authentication 1511021F0725 ' )
503
506
end
504
507
505
508
context 'username privilege secret' do
@@ -511,17 +514,21 @@ def myworkspace
511
514
expect ( aux_cisco ) . to receive ( :store_loot ) . with (
512
515
"cisco.ios.username_password" , "text/plain" , "127.0.0.1" , "someusername_level0:1511021F0725" , "username_password.txt" , "Cisco IOS Username and Password"
513
516
)
514
- expect ( aux_cisco ) . to receive ( :store_cred ) . with (
517
+ expect ( aux_cisco ) . to receive ( :create_credential_and_login ) . with (
515
518
{
516
- host : "127.0.0.1" ,
519
+ address : "127.0.0.1" ,
517
520
port : 1337 ,
518
- user : "someusername" ,
519
- pass : "1511021F0725" ,
520
- type : "password" ,
521
- collect_type : "password" ,
522
- active : true
521
+ protocol : "tcp" ,
522
+ workspace_id : workspace . id ,
523
+ origin_type : :service ,
524
+ service_name : '' ,
525
+ module_fullname : "auxiliary/scanner/snmp/cisco_dummy" ,
526
+ private_data : "1511021F0725" ,
527
+ private_type : :nonreplayable_hash ,
528
+ status : Metasploit ::Model ::Login ::Status ::UNTRIED
523
529
}
524
530
)
531
+
525
532
aux_cisco . cisco_ios_config_eater ( '127.0.0.1' , 1337 , 'username someusername privilege 0 secret 0 1511021F0725' )
526
533
end
527
534
@@ -534,6 +541,20 @@ def myworkspace
534
541
"cisco.ios.username_password_hash" , "text/plain" , "127.0.0.1" , "someusername_level0:1511021F0725" ,
535
542
"username_password_hash.txt" , "Cisco IOS Username and Password Hash (MD5)"
536
543
)
544
+ expect ( aux_cisco ) . to receive ( :create_credential_and_login ) . with (
545
+ {
546
+ address : "127.0.0.1" ,
547
+ port : 1337 ,
548
+ protocol : "tcp" ,
549
+ workspace_id : workspace . id ,
550
+ origin_type : :service ,
551
+ service_name : '' ,
552
+ module_fullname : "auxiliary/scanner/snmp/cisco_dummy" ,
553
+ private_data : "1511021F0725" ,
554
+ private_type : :nonreplayable_hash ,
555
+ status : Metasploit ::Model ::Login ::Status ::UNTRIED
556
+ }
557
+ )
537
558
aux_cisco . cisco_ios_config_eater ( '127.0.0.1' , 1337 , 'username someusername privilege 0 secret 5 1511021F0725' )
538
559
end
539
560
@@ -546,15 +567,18 @@ def myworkspace
546
567
expect ( aux_cisco ) . to receive ( :store_loot ) . with (
547
568
"cisco.ios.username_password" , "text/plain" , "127.0.0.1" , "someusername_level0:cisco" , "username_password.txt" , "Cisco IOS Username and Password"
548
569
)
549
- expect ( aux_cisco ) . to receive ( :store_cred ) . with (
570
+ expect ( aux_cisco ) . to receive ( :create_credential_and_login ) . with (
550
571
{
551
- host : "127.0.0.1" ,
572
+ address : "127.0.0.1" ,
552
573
port : 1337 ,
553
- user : "someusername" ,
554
- pass : "cisco" ,
555
- type : "password" ,
556
- collect_type : "password" ,
557
- active : true
574
+ protocol : "tcp" ,
575
+ workspace_id : workspace . id ,
576
+ origin_type : :service ,
577
+ service_name : '' ,
578
+ module_fullname : "auxiliary/scanner/snmp/cisco_dummy" ,
579
+ private_data : "cisco" ,
580
+ private_type : :password ,
581
+ status : Metasploit ::Model ::Login ::Status ::UNTRIED
558
582
}
559
583
)
560
584
aux_cisco . cisco_ios_config_eater ( '127.0.0.1' , 1337 , 'username someusername privilege 0 secret 7 1511021F0725' )
@@ -571,15 +595,18 @@ def myworkspace
571
595
"cisco.ios.username_password" , "text/plain" , "127.0.0.1" , "someusername:1511021F0725" , "username_password.txt" ,
572
596
"Cisco IOS Username and Password"
573
597
)
574
- expect ( aux_cisco ) . to receive ( :store_cred ) . with (
598
+ expect ( aux_cisco ) . to receive ( :create_credential_and_login ) . with (
575
599
{
576
- host : "127.0.0.1" ,
600
+ address : "127.0.0.1" ,
577
601
port : 1337 ,
578
- user : "someusername" ,
579
- pass : "1511021F0725" ,
580
- type : "password" ,
581
- collect_type : "password" ,
582
- active : true
602
+ protocol : "tcp" ,
603
+ workspace_id : workspace . id ,
604
+ origin_type : :service ,
605
+ service_name : '' ,
606
+ module_fullname : "auxiliary/scanner/snmp/cisco_dummy" ,
607
+ private_data : "1511021F0725" ,
608
+ private_type : :nonreplayable_hash ,
609
+ status : Metasploit ::Model ::Login ::Status ::UNTRIED
583
610
}
584
611
)
585
612
aux_cisco . cisco_ios_config_eater ( '127.0.0.1' , 1337 , 'username someusername secret 0 1511021F0725' )
@@ -594,6 +621,20 @@ def myworkspace
594
621
"cisco.ios.username_password_hash" , "text/plain" , "127.0.0.1" , "someusername:1511021F0725" , "username_password_hash.txt" ,
595
622
"Cisco IOS Username and Password Hash (MD5)"
596
623
)
624
+ expect ( aux_cisco ) . to receive ( :create_credential_and_login ) . with (
625
+ {
626
+ address : "127.0.0.1" ,
627
+ port : 1337 ,
628
+ protocol : "tcp" ,
629
+ workspace_id : workspace . id ,
630
+ origin_type : :service ,
631
+ service_name : '' ,
632
+ module_fullname : "auxiliary/scanner/snmp/cisco_dummy" ,
633
+ private_data : "1511021F0725" ,
634
+ private_type : :nonreplayable_hash ,
635
+ status : Metasploit ::Model ::Login ::Status ::UNTRIED
636
+ }
637
+ )
597
638
aux_cisco . cisco_ios_config_eater ( '127.0.0.1' , 1337 , 'username someusername secret 5 1511021F0725' )
598
639
end
599
640
@@ -607,15 +648,18 @@ def myworkspace
607
648
"cisco.ios.username_password" , "text/plain" , "127.0.0.1" , "someusername:cisco" , "username_password.txt" ,
608
649
"Cisco IOS Username and Password"
609
650
)
610
- expect ( aux_cisco ) . to receive ( :store_cred ) . with (
651
+ expect ( aux_cisco ) . to receive ( :create_credential_and_login ) . with (
611
652
{
612
- host : "127.0.0.1" ,
653
+ address : "127.0.0.1" ,
613
654
port : 1337 ,
614
- user : "someusername" ,
615
- pass : "cisco" ,
616
- type : "password" ,
617
- collect_type : "password" ,
618
- active : true
655
+ protocol : "tcp" ,
656
+ workspace_id : workspace . id ,
657
+ origin_type : :service ,
658
+ service_name : '' ,
659
+ module_fullname : "auxiliary/scanner/snmp/cisco_dummy" ,
660
+ private_data : "cisco" ,
661
+ private_type : :password ,
662
+ status : Metasploit ::Model ::Login ::Status ::UNTRIED
619
663
}
620
664
)
621
665
aux_cisco . cisco_ios_config_eater ( '127.0.0.1' , 1337 , 'username someusername secret 7 1511021F0725' )
0 commit comments