-
Notifications
You must be signed in to change notification settings - Fork 1
/
AC.smv
8173 lines (7879 loc) · 509 KB
/
AC.smv
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
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/--
NGCoVerif
---------
A Formal Model for 5G access control policy and Verifier
To use 2 consumer system and test related properites, uncomment line s2: protocol() in VAR section of main module.
For other cases, comment it out for better performance and clutterfree counterexamples.
--/
MODULE NF
VAR
model_id: 0..20;
CCA_subject: {none, 1, 2, 3, 4,5};
nfInstanceId: {none, 1, 2, 3, 4,5};
nfType: {none, nf_1, nf_2, nf_3, nf_4};
nfStatus: {none, REGISTERED, SUSPENDED, UNDISCOVERABLE};
sNssais: array 1..2 of {none, 1, 2, 3};
allowedNFTypes: array 1..2 of {none, nf_1, nf_2, nf_3, nf_4};
allowedsNssais: array 1..2 of {none, 1, 2, 3};
load: 0..10;
capacity: 0..10;
priority: 0..10;
nfService1: NFService;
DEFINE
isNFInstanceValid :=
CCA_subject != none
& nfInstanceId != none
& CCA_subject = nfInstanceId
& nfType != none
& nfStatus = REGISTERED
& nfService1.isServiceInstanceValid
& ( !(sNssais[1] = none & sNssais[2] = none) -> (sNssais[1] != sNssais[2] ))
& nfService1.sNssais[1] in {sNssais[1], sNssais[2], none}
& nfService1.sNssais[2] in {sNssais[1], sNssais[2], none}
& ( !(allowedsNssais[1] = none & allowedsNssais[2] = none) -> (allowedsNssais[1] != allowedsNssais[2] ))
;
MODULE NFService
VAR
allowedNFTypes: array 1..2 of {none, nf_1, nf_2, nf_3, nf_4};
load: 0..10;
capacity: 0..10;
oauth2Required: boolean;
priority: 0..10;
serviceInstanceId: {none, 41, 11, 21, 31};
serviceName: {none, service_1, service_2, service_3, service_4};
serviceStatus: {none, REGISTERED, SUSPENDED, UNDISCOVERABLE};
sNssais: array 1..2 of {none, 1, 2, 3};
allowedsNssais: array 1..2 of {none, 1, 2, 3};
operation1: Operation;
operation2: Operation;
DEFINE
isServiceInstanceValid :=
serviceInstanceId != none
& serviceName != none
& serviceStatus = REGISTERED
& ( !(sNssais[1] = none & sNssais[2] = none) -> (sNssais[1] != sNssais[2] ))
& ( !(allowedsNssais[1] = none & allowedsNssais[2] = none) -> (allowedsNssais[1] != allowedsNssais[2] ))
& ((operation1.opName != none | operation2.opName != none) -> (operation1.opName != operation2.opName))
& operation1.isOperationValid
& operation1.opScope1 = serviceName
& operation2.isOperationValid
& operation2.opScope1 = serviceName;
MODULE Operation
VAR
allowedNFInstances: array 1..2 of {none, 1, 2, 3, 4,5};
allowedNFTypes: array 1..2 of {none, nf_1, nf_2, nf_3, nf_4};
opName: {none, op_1, op_2, op_3, op_4, op_5, op_6, op_7, op_8};
opScope1: {none, service_1, service_2, service_3, service_4};
opScope2: {none, op_scope_1, op_scope_2, op_scope_3, op_scope_4, op_scope_5, op_scope_6, op_scope_7, op_scope_8};
param1: Param;
param2: Param;
DEFINE
isOperationValid :=
opName != none
& opScope1 in {none, service_1, service_2, service_3, service_4}
& opScope2 in {none, op_scope_1, op_scope_2, op_scope_3, op_scope_4, op_scope_5, op_scope_6, op_scope_7, op_scope_8}
& (opScope2 = none <-> ((allowedNFTypes[1] = none & allowedNFTypes[2] = none) & (allowedNFInstances[1] = none & allowedNFInstances[2] = none)))
& ( param1.name = none & param2.name = none
| param1.name != none & param2.name = none
| param1.name != none & param2.name != none
)
& (!(param1.name = none & param2.name = none) -> param1.name != param2.name)
& (param1.name = none -> param1.value = 0)
& (param2.name = none -> param2.value = 0)
& (param1.isSensitive -> param1.name != none)
& (param2.isSensitive -> param2.name != none)
;
isParamVerified :=
isOperationValid
& param1.isParamVerified
& param2.isParamVerified;
MODULE Param
VAR
isSensitive: boolean;
name: {none, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16};
value: 0..100;
isVerified : boolean;
DEFINE
isParamVerificationReq := !(name in {none}) & isSensitive;
isParamVerified :=
case
!isParamVerificationReq : TRUE;
isParamVerificationReq & isVerified: TRUE;
isParamVerificationReq & !isVerified: FALSE;
TRUE: FALSE;
esac;
---------- begin NFDiscoveryRequest declaration ----------
MODULE NFDiscoveryRequest
VAR
requesterID : {none, 1, 2, 3, 4,5};
targetNFType : {none, nf_1, nf_2, nf_3, nf_4};
requesterNFType : {none, nf_1, nf_2, nf_3, nf_4};
sNssais : {none, 1, 2, 3};
serviceName : {none, service_1, service_2, service_3, service_4};
targetNfInstanceId : {none, 1, 2, 3, 4,5};
requesterSNssais : {none, 1, 2, 3};
DEFINE
isNFDiscReqValid :=
requesterID != none
& targetNFType != none
& requesterNFType != none
;
---------- begin AccessTokenRequest declaration ----------
MODULE AccessTokenRequest(reqForSpecificProducer)
VAR
grantType : {none, client_credentials};
nfInstanceId : {none, 1, 2, 3, 4,5};
scopeService : {none, service_1, service_2, service_3, service_4};
scopeOperation : {none, op_scope_1, op_scope_2, op_scope_3, op_scope_4, op_scope_5, op_scope_6, op_scope_7, op_scope_8};
targetNFType : {none, nf_1, nf_2, nf_3, nf_4};
targetNfInstanceId : {none, 1, 2, 3, 4,5};
targetSnssaiList : {none, 1, 2, 3};
requesterSNssais : {none, 1, 2, 3};
DEFINE
isATReqValid :=
grantType != none
& nfInstanceId != none
& scopeService != none
& (targetNfInstanceId = none xor targetNFType = none)
& ((reqForSpecificProducer) -> (targetNfInstanceId != none))
& ((!reqForSpecificProducer) -> (targetNFType != none))
;
---------- begin AccessToken declaration ----------
MODULE AccessToken(reqForSpecificProducer)
VAR
sub : {none, 1, 2, 3, 4,5};
aud_NFInstanceId : {none, 1, 2, 3, 4,5};
aud_NFType : {none, nf_1, nf_2, nf_3, nf_4};
scopeService : {none, service_1, service_2, service_3, service_4};
scopeOperation : {none, op_scope_1, op_scope_2, op_scope_3, op_scope_4, op_scope_5, op_scope_6, op_scope_7, op_scope_8};
exp_ : boolean;
producerSnssaiList : array 1..2 of {none, 1, 2, 3};
DEFINE
isTokenValid :=
sub != none
& (aud_NFInstanceId = none xor aud_NFType = none)
& ((reqForSpecificProducer) -> (aud_NFInstanceId != none))
& ((!reqForSpecificProducer) -> (aud_NFType != none))
& scopeService != none
& exp_ = FALSE;
---------- begin ServiceRequest declaration ----------
MODULE ServiceRequest
VAR
subjectID : {none, 1, 2, 3, 4,5};
audienceID : {none, 1, 2, 3, 4,5};
service : {none, service_1, service_2, service_3, service_4};
operation : {none, op_1, op_2, op_3, op_4, op_5, op_6, op_7, op_8};
param1: Param;
param2: Param;
sNssais : {none, 1, 2, 3};
DEFINE
isServiceRequestValid :=
subjectID != none
& audienceID != none
& service != none
& operation != none;
MODULE main
VAR
--------- NF Configuration variable ----------------
consumer1: NF;
consumer2: NF;
producer1: NF;
producer2: NF;
reqForSpecificProducer: boolean;
------------------- OAM
OAMConsumerPresent: boolean;
OAMProducerPresent: boolean;
OAMConsumer1Approve: boolean;
OAMConsumer2Approve: boolean;
OAMProducer1Approve: boolean;
OAMProducer2Approve: boolean;
updateConsumer1: boolean;
adversaryUpdateConsumer1: boolean;
updateConsumer2: boolean;
adversaryUpdateConsumer2: boolean;
updateProducer1: boolean;
adversaryUpdateProducer1: boolean;
updateProducer2: boolean;
adversaryUpdateProducer2: boolean;
-------------------- Update------------------------
-- 0: no update; 1: everything; 2: most things 3: only some
updateLevelConsumer1: 0..3;
updateLevelConsumer2: 0..3;
updateLevelProducer1: 0..3;
updateLevelProducer2: 0..3;
updateDiscoveryRequest: boolean;
updateATRequest: boolean;
updateServiceRequest: boolean;
--------- Adversary Control variable ----------------
adversaryPresent : boolean;
adversaryDiscoveryRequest: boolean;
adversaryATRequest: boolean;
adversaryServiceRequest: boolean;
------------------------ other params-----------
disableOptionalParams_AT: boolean;
s1: protocol(consumer1,consumer2,producer1,producer2,reqForSpecificProducer,OAMConsumerPresent,OAMProducerPresent,OAMConsumer1Approve,OAMConsumer2Approve,OAMProducer1Approve,OAMProducer2Approve,updateConsumer1,updateConsumer2,benignUpdateConsumer,updateProducer1,updateProducer2,benignUpdateProducer,adversaryPresent,adversaryUpdateConsumer1,adversaryUpdateConsumer2,adversaryUpdateProducer1,adversaryUpdateProducer2,adversaryDiscoveryRequest,adversaryATRequest,adversaryServiceRequest,updateDiscoveryRequest,updateATRequest,updateServiceRequest,disableOptionalParams_AT);
-- Comment out/uncomment the following line to disable/enable the 2nd consumer. (2nd consumer is not necessary for Finding 1-4.)
-- s2: protocol(consumer1,consumer2,producer1,producer2,reqForSpecificProducer,OAMConsumerPresent,OAMProducerPresent,OAMConsumer1Approve,OAMConsumer2Approve,OAMProducer1Approve,OAMProducer2Approve,updateConsumer1,updateConsumer2,benignUpdateConsumer,updateProducer1,updateProducer2,benignUpdateProducer,adversaryPresent,adversaryUpdateConsumer1,adversaryUpdateConsumer2,adversaryUpdateProducer1,adversaryUpdateProducer2,adversaryDiscoveryRequest,adversaryATRequest,adversaryServiceRequest,updateDiscoveryRequest,updateATRequest,updateServiceRequest,disableOptionalParams_AT);
--------------------- service request-related properties -----------------
/-- Property 1.1:
For a service to be granted, consumer's serving slice info must be allowed by the producer.
Adversary Assumption: OAMs present, No adversary NF update, adversaryDiscoveryRequest enabled
Result: Confused Producer Attack
--/
-- LTLSPEC
-- (
-- ------------OAM control-----------
-- G(OAMConsumerPresent)
-- & G(!OAMConsumer1Approve)
-- & G(!OAMConsumer2Approve)
-- & G(OAMProducerPresent)
-- & G(!OAMProducer1Approve)
-- & G(!OAMProducer2Approve)
-- ------------adversary control---------
-- & G(adversaryPresent)
-- & G(!adversaryATRequest)
-- & G(!adversaryServiceRequest)
-- ------------update control---------
-- & G(updateLevelConsumer1=0)
-- & G(updateLevelConsumer2=0)
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- & G(!updateDiscoveryRequest)
-- & G(!updateServiceRequest)
-- & G(!updateATRequest)
-- ------------others-----------------
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- & isOpParamSensitivityConsistent
-- )
-- )->
-- G(
-- ((s1.serviceRequest.service = s1.producer.nfService1.serviceName & s1.isServiceReqGranted) ->(
-- (( !((s1.producer.nfService1.allowedsNssais[1] = none) & (s1.producer.nfService1.allowedsNssais[2] = none)) )-> (
-- (
-- (( (s1.consumer.sNssais[1] != none & s1.consumer.sNssais[2] != none) ) -> (
-- (s1.consumer.sNssais[1] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- |
-- (s1.consumer.sNssais[2] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- ))
-- &
-- (( (s1.consumer.sNssais[1] != none & s1.consumer.sNssais[2] = none) ) -> (
-- (s1.consumer.sNssais[1] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- ))
-- &
-- ((s1.consumer.sNssais[1] = none & s1.consumer.sNssais[2] != none) -> (
-- (s1.consumer.sNssais[2] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- ))
-- )
-- ))
-- ))
-- );
/-- Property 1.2:
Implementation idea: same as P1.1. the above counterexample is for specific nf type. So, other attacks might exist for specific producer type ATReq.
Adversary Assumption: OAMs present, No adversary NF update, adversaryDiscoveryRequest enabled.
notable property Assumption: access token request not for specificNFtype
Result: No counterexample
--/
-- LTLSPEC
-- (
-- ------------OAM control-----------
-- G(OAMConsumerPresent)
-- & G(!OAMConsumer1Approve)
-- & G(!OAMConsumer2Approve)
-- & G(OAMProducerPresent)
-- & G(!OAMProducer1Approve)
-- & G(!OAMProducer2Approve)
-- ------------adversary control---------
-- & G(adversaryPresent)
-- & G(!adversaryATRequest)
-- & G(!adversaryServiceRequest)
-- ------------update control---------
-- & G(updateLevelConsumer1=0)
-- & G(updateLevelConsumer2=0)
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- & G(!updateDiscoveryRequest)
-- & G(!updateServiceRequest)
-- & G(!updateATRequest)
-- ------------others-----------------
-- & G(reqForSpecificProducer)
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- & isOpParamSensitivityConsistent
-- )
-- )->
-- G(
-- ((s1.serviceRequest.service = s1.producer.nfService1.serviceName & s1.isServiceReqGranted) ->(
-- (( !((s1.producer.nfService1.allowedsNssais[1] = none) & (s1.producer.nfService1.allowedsNssais[2] = none)) )-> (
-- (
-- (( (s1.consumer.sNssais[1] != none & s1.consumer.sNssais[2] != none) ) -> (
-- (s1.consumer.sNssais[1] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- |
-- (s1.consumer.sNssais[2] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- ))
-- &
-- (( (s1.consumer.sNssais[1] != none & s1.consumer.sNssais[2] = none) ) -> (
-- (s1.consumer.sNssais[1] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- ))
-- &
-- ((s1.consumer.sNssais[1] = none & s1.consumer.sNssais[2] != none) -> (
-- (s1.consumer.sNssais[2] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- ))
-- )
-- ))
-- ))
-- );
/-- Property 1.3:
Same as P1.1. However, enabling benign update in producer's profile might bring about new attack.
Adversary Assumption: OAMs present, No adversary NF update.
notable property Assumption: benign update = 3 of producer enabled for atmost once.
Result: Access Token Reuse attack, for specific nf type
--/
-- LTLSPEC
-- (
-- ------------OAM control-----------
-- G(OAMConsumerPresent)
-- & G(!OAMConsumer1Approve)
-- & G(!OAMConsumer2Approve)
-- ------------adversary control---------
-- & G(adversaryPresent)
-- & G(!adversaryDiscoveryRequest)
-- & G(!adversaryATRequest)
-- & G(!adversaryServiceRequest)
-- ------------update control---------
-- & G(updateLevelConsumer1=0)
-- & G(updateLevelConsumer2=0)
-- & G(updateLevelProducer1 in {0,3}) & G(updateLevelProducer1 = 3 -> X(G(updateLevelProducer1 = 0)))
-- & G(updateLevelProducer2 in {0,3}) & G(updateLevelProducer2 = 3 -> X(G(updateLevelProducer2 = 0)))
-- & G(!updateDiscoveryRequest)
-- & G(!updateServiceRequest)
-- & G(!updateATRequest)
-- ------------others-----------------
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- & isOpParamSensitivityConsistent
-- )
-- )->
-- G(
-- ((s1.serviceRequest.service = s1.producer.nfService1.serviceName & s1.isServiceReqGranted) ->(
-- (( !((s1.producer.nfService1.allowedsNssais[1] = none) & (s1.producer.nfService1.allowedsNssais[2] = none)) )-> (
-- (
-- (( (s1.consumer.sNssais[1] != none & s1.consumer.sNssais[2] != none) ) -> (
-- (s1.consumer.sNssais[1] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- |
-- (s1.consumer.sNssais[2] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- ))
-- &
-- (( (s1.consumer.sNssais[1] != none & s1.consumer.sNssais[2] = none) ) -> (
-- (s1.consumer.sNssais[1] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- ))
-- &
-- ((s1.consumer.sNssais[1] = none & s1.consumer.sNssais[2] != none) -> (
-- (s1.consumer.sNssais[2] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- ))
-- )
-- ))
-- ))
-- );
/-- Property 1.4:
Same as P1.3. However, the counterexample of P1.3 is for ATReq for specific nf type only. Toggling this might give new attacks.
Adversary Assumption: OAMs present, No adversary NF update.
Notable property Assumption: Toggled the reqForSpecificProducer control variable to off, benign update of producer enabled for atmost once.
Result: Revoked Accesss Token Reuse Attack for specific nf instance.
--/
-- LTLSPEC
-- (
-- ------------OAM control-----------
-- G(OAMConsumerPresent)
-- & G(!OAMConsumer1Approve)
-- & G(!OAMConsumer2Approve)
-- ------------adversary control---------
-- & G(adversaryPresent)
-- & G(!adversaryDiscoveryRequest)
-- & G(!adversaryATRequest)
-- & G(!adversaryServiceRequest)
-- ------------update control---------
-- & G(updateLevelConsumer1=0)
-- & G(updateLevelConsumer2=0)
-- & G(updateLevelProducer1 in {0,3}) & G(updateLevelProducer1 = 3 -> X(G(updateLevelProducer1 = 0)))
-- & G(updateLevelProducer2 in {0,3}) & G(updateLevelProducer2 = 3 -> X(G(updateLevelProducer2 = 0)))
-- & G(!updateDiscoveryRequest)
-- & G(!updateServiceRequest)
-- & G(!updateATRequest)
-- ------------others-----------------
-- & G(reqForSpecificProducer)
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- & isOpParamSensitivityConsistent
-- )
-- )->
-- G(
-- ((s1.serviceRequest.service = s1.producer.nfService1.serviceName & s1.isServiceReqGranted) ->(
-- (( !((s1.producer.nfService1.allowedsNssais[1] = none) & (s1.producer.nfService1.allowedsNssais[2] = none)) )-> (
-- (
-- (( (s1.consumer.sNssais[1] != none & s1.consumer.sNssais[2] != none) ) -> (
-- (s1.consumer.sNssais[1] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- |
-- (s1.consumer.sNssais[2] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- ))
-- &
-- (( (s1.consumer.sNssais[1] != none & s1.consumer.sNssais[2] = none) ) -> (
-- (s1.consumer.sNssais[1] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- ))
-- &
-- ((s1.consumer.sNssais[1] = none & s1.consumer.sNssais[2] != none) -> (
-- (s1.consumer.sNssais[2] in {s1.producer.nfService1.allowedsNssais[1], s1.producer.nfService1.allowedsNssais[2]})
-- ))
-- )
-- ))
-- ))
-- );
/-- Property 1.5:
Query: For a service to be granted, consumer's serving slice info must be allowed by the producer.
Adversary Assumption: OAMs present, uConsumer = 3 once, adversaryDiscoveryRequest adversaryATRequest adversaryServiceRequest enabled.
Notable property Assumption: Toggled the reqForSpecificProducer control variable to off, benign update of producer enabled for atmost once.
Result: Confused Producer Attack
--/
-- LTLSPEC
-- (
-- ------------adversary control---------
-- G(adversaryPresent)
-- ------------update control---------
-- & G(updateLevelConsumer1 in {0,3})
-- & G(updateLevelConsumer1 in {3} -> X(G(updateLevelConsumer1 = 0)))
-- & G(updateLevelConsumer2 in {0,3})
-- & G(updateLevelConsumer2 in {3} -> X(G(updateLevelConsumer2 = 0)))
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- ------------others-----------------
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- & isOpParamSensitivityConsistent
-- )
-- )->
-- G(
-- slice_check_for_property
-- );
/-- Property 1.6:
Query: For a service to be granted, consumer's serving slice info must be allowed by the producer.
Adversary Assumption: OAMs present, uConsumer = 3 once, adversaryDiscoveryRequest adversaryATRequest adversaryServiceRequest enabled.
Notable property Assumption: reqForSpecificProducer enabled
Result: No counterexample
--/
-- LTLSPEC
-- (
-- ------------adversary control---------
-- G(adversaryPresent)
-- ------------update control---------
-- & G(updateLevelConsumer1 in {0,3})
-- & G(updateLevelConsumer1 in {3} -> X(G(updateLevelConsumer1 = 0)))
-- & G(updateLevelConsumer2 in {0,3})
-- & G(updateLevelConsumer2 in {3} -> X(G(updateLevelConsumer2 = 0)))
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- ------------others-----------------
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- & isOpParamSensitivityConsistent
-- )
-- & G(reqForSpecificProducer)
-- )->
-- G(
-- slice_check_for_property
-- );
/-- Property 1.7:
Query: For a service to be granted, consumer's serving slice info must be allowed by the producer.
Adversary Assumption: OAMs present, uConsumer = 3 or 0 always, adversaryDiscoveryRequest adversaryATRequest adversaryServiceRequest enabled.
Notable property Assumption: reqForSpecificProducer enabled
Result: No counterexample
--/
-- LTLSPEC
-- (
-- ------------adversary control---------
-- G(adversaryPresent)
-- ------------update control---------
-- & G(updateLevelConsumer1 in {0,3})
-- & G(updateLevelConsumer1 in {3} -> X(G(updateLevelConsumer1 = 0)))
-- & G(updateLevelConsumer2 in {0,3})
-- & G(updateLevelConsumer2 in {3} -> X(G(updateLevelConsumer2 = 0)))
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- ------------others-----------------
-- & G(reqForSpecificProducer)
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- & isOpParamSensitivityConsistent
-- )
-- )->
-- G(
-- slice_check_for_property
-- );
/-- Property 1.8:
Adversary Assumption: OAMs present, uConsumer = 3 or 2 or 0 once, adversaryDiscoveryRequest adversaryATRequest adversaryServiceRequest enabled.
Notable property Assumption: reqForSpecificProducer enabled
Result: Variation of attack 1 for AT req for specific nf type
--/
-- LTLSPEC
-- (
-- ------------adversary control---------
-- G(adversaryPresent)
-- ------------update control---------
-- & G(updateLevelConsumer1 in {0,2,3})
-- & G(updateLevelConsumer1 in {2,3} -> X(G(updateLevelConsumer1 = 0)))
-- & G(updateLevelConsumer2 in {0,2,3})
-- & G(updateLevelConsumer2 in {2,3} -> X(G(updateLevelConsumer2 = 0)))
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- ------------others-----------------
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- )
-- )->
-- G(
-- slice_check_for_property
-- );
/-- Property 1.9:
Adversary Assumption: OAMs present, uConsumer = 3 or 2 or 0 once, adversaryDiscoveryRequest adversaryATRequest adversaryServiceRequest enabled.
Notable property Assumption: reqForSpecificProducer enabled
Result: Access Token Reuse attack (Due to consumer's NF update)
--/
-- LTLSPEC
-- (
-- ------------adversary control---------
-- G(adversaryPresent)
-- ------------update control---------
-- & G(updateLevelConsumer1 in {0,2,3})
-- & G(updateLevelConsumer1 in {2,3} -> X(G(updateLevelConsumer1 = 0)))
-- & G(updateLevelConsumer2 in {0,2,3})
-- & G(updateLevelConsumer2 in {2,3} -> X(G(updateLevelConsumer2 = 0)))
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- ------------others-----------------
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- & isOpParamSensitivityConsistent
-- )
-- & G(reqForSpecificProducer)
-- )->
-- G(
-- slice_check_for_property
-- );
/-- Property 1.10:
Adversary Assumption: OAMs present, uConsumer = 3 or 2 or 0 once, adversaryDiscoveryRequest adversaryATRequest adversaryServiceRequest disabled.
Notable property Assumption: reqForSpecificProducer enabled
Result: Access Token Reuse attack (Due to consumer's NF update)
--/
-- LTLSPEC
-- (
-- ------------adversary control---------
-- G(adversaryPresent)
-- & G(!adversaryDiscoveryRequest)
-- & G(!adversaryATRequest)
-- & G(!adversaryServiceRequest)
-- ------------update control---------
-- & G(updateLevelConsumer1 in {0,2,3})
-- & G(updateLevelConsumer1 in {2,3} -> X(G(updateLevelConsumer1 = 0)))
-- & G(updateLevelConsumer2 in {0,2,3})
-- & G(updateLevelConsumer2 in {2,3} -> X(G(updateLevelConsumer2 = 0)))
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- & G(!updateDiscoveryRequest)
-- & G(!updateServiceRequest)
-- & G(!updateATRequest)
-- ------------others-----------------
-- & G(reqForSpecificProducer)
-- )->
-- G(
-- slice_check_for_property
-- );
/-- Property 1.11:
For a nf service request to be granted, consumer's serving sNssais must be allowed in
allowedSnssais attribute of the the producer's nfservice.
Adversary Assumption: OAMs present, No adversary NF update
Resilt: Confused producer attack in combination with Default Overprivilege Attack when consumer.sNssais is empty
--/
-- LTLSPEC
-- (
-- ------------OAM control-----------
-- G(OAMConsumerPresent)
-- & G(!OAMConsumer1Approve)
-- & G(!OAMConsumer2Approve)
-- & G(OAMProducerPresent)
-- & G(!OAMProducer1Approve)
-- & G(!OAMProducer2Approve)
-- ------------adversary control---------
-- & G(adversaryPresent)
-- & G(!adversaryDiscoveryRequest)
-- & G(!adversaryATRequest)
-- & G(!adversaryServiceRequest)
-- ------------update control---------
-- & G(updateLevelConsumer1=0)
-- & G(updateLevelConsumer2=0)
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- & G(!updateDiscoveryRequest)
-- & G(!updateServiceRequest)
-- & G(!updateATRequest)
-- ------------other constraints---------
-- & X(s1.consumer.nfInstanceId = consumer1.nfInstanceId)
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- )
-- )->
-- G(
-- ((
-- s1.isServiceReqGranted
-- & s1.producer1.nfService1.allowedsNssais[1] != none
-- & s1.producer1.nfService1.allowedsNssais[2] = none
-- ) -> (
-- s1.producer1.nfService1.allowedsNssais[1] in {s1.consumer.sNssais[1], s1.consumer.sNssais[2]}
-- ))
-- );
/-- Property 1.12:
For a nf service request to be granted, consumer's serving sNssais must be allowed in
allowedSnssais attribute of the the producer's nfservice.
Adversary Assumption: OAMs present, No adversary NF update
Notable property Assumption: Both consumer's sNssais should not be none initally.
Resilt: Confused producer attack
--/
-- LTLSPEC
-- (
-- ------------OAM control-----------
-- G(OAMConsumerPresent)
-- & G(!OAMConsumer1Approve)
-- & G(!OAMConsumer2Approve)
-- & G(OAMProducerPresent)
-- & G(!OAMProducer1Approve)
-- & G(!OAMProducer2Approve)
-- ------------adversary control---------
-- & G(adversaryPresent)
-- & G(!adversaryDiscoveryRequest)
-- & G(!adversaryATRequest)
-- & G(!adversaryServiceRequest)
-- ------------update control---------
-- & G(updateLevelConsumer1=0)
-- & G(updateLevelConsumer2=0)
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- & G(!updateDiscoveryRequest)
-- & G(!updateServiceRequest)
-- & G(!updateATRequest)
-- ------------other constraints---------
-- & X(s1.consumer.nfInstanceId = consumer1.nfInstanceId)
-- & X !(s1.consumer.sNssais[1] = none & s1.consumer.sNssais[2] = none)
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- )
-- )->
-- G(
-- ((
-- s1.isServiceReqGranted
-- & s1.producer1.nfService1.allowedsNssais[1] != none
-- & s1.producer1.nfService1.allowedsNssais[2] = none
-- ) -> (
-- s1.producer1.nfService1.allowedsNssais[1] in {s1.consumer.sNssais[1], s1.consumer.sNssais[2]}
-- ))
-- );
/-- Property 1.13:
For a nf service request to be granted, consumer's serving sNssais must be allowed in
allowedSnssais attribute of the the producer's nfservice.
Adversary Assumption: OAMs present, No adversary NF update
Notable property Assumption: Both consumer's sNssais should not be none initally, reqForSpecificProducer.
Resilt: No counterexample.
--/
-- LTLSPEC
-- (
-- ------------OAM control-----------
-- G(OAMConsumerPresent)
-- & G(!OAMConsumer1Approve)
-- & G(!OAMConsumer2Approve)
-- & G(OAMProducerPresent)
-- & G(!OAMProducer1Approve)
-- & G(!OAMProducer2Approve)
-- ------------adversary control---------
-- & G(adversaryPresent)
-- & G(!adversaryDiscoveryRequest)
-- & G(!adversaryATRequest)
-- & G(!adversaryServiceRequest)
-- ------------update control---------
-- & G(updateLevelConsumer1=0)
-- & G(updateLevelConsumer2=0)
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- & G(!updateDiscoveryRequest)
-- & G(!updateServiceRequest)
-- & G(!updateATRequest)
-- ------------other constraints---------
-- & G(reqForSpecificProducer)
-- & X(s1.consumer.nfInstanceId = consumer1.nfInstanceId)
-- & X !(s1.consumer.sNssais[1] = none & s1.consumer.sNssais[2] = none)
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- )
-- )->
-- G(
-- ((
-- s1.isServiceReqGranted
-- & s1.producer.nfInstanceId != producer2.nfInstanceId
-- & s1.producer1.nfService1.allowedsNssais[1] != none
-- & s1.producer1.nfService1.allowedsNssais[2] = none
-- ) -> (
-- s1.producer1.nfService1.allowedsNssais[1] in {s1.consumer.sNssais[1], s1.consumer.sNssais[2]}
-- ))
-- );
------------------------ NF Discovery related properties ------------------
/-- Property 2.1:
For a nf service to be discovered, consumer's serving slice info must be allowed by the producer.
Adversary Assumption: OAMs present, No adversary NF update.
Result: No counterexample.
--/
-- LTLSPEC
-- (
-- ------------OAM control-----------
-- G(OAMConsumerPresent)
-- & G(!OAMConsumer1Approve)
-- & G(!OAMConsumer2Approve)
-- & G(OAMProducerPresent)
-- & G(!OAMProducer1Approve)
-- & G(!OAMProducer2Approve)
-- ------------adversary control---------
-- & G(adversaryPresent)
-- & G(!adversaryDiscoveryRequest)
-- & G(!adversaryATRequest)
-- & G(!adversaryServiceRequest)
-- ------------update control---------
-- & G(updateLevelConsumer1=0)
-- & G(updateLevelConsumer2=0)
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- & G(!updateDiscoveryRequest)
-- & G(!updateServiceRequest)
-- & G(!updateATRequest)
-- ------------others-----------------
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- )
-- )->
-- G(
-- ((s1.nfDiscoveryRequest.serviceName = s1.producer1.nfService1.serviceName & s1.isNFDiscovered1) ->(
-- (( !((s1.producer1.nfService1.allowedsNssais[1] = none) & (s1.producer1.nfService1.allowedsNssais[2] = none)) )-> (
-- (
-- (( (s1.consumer.sNssais[1] != none & s1.consumer.sNssais[2] != none) ) -> (
-- (s1.consumer.sNssais[1] in {s1.producer1.nfService1.allowedsNssais[1], s1.producer1.nfService1.allowedsNssais[2]})
-- |
-- (s1.consumer.sNssais[2] in {s1.producer1.nfService1.allowedsNssais[1], s1.producer1.nfService1.allowedsNssais[2]})
-- ))
-- &
-- (( (s1.consumer.sNssais[1] != none & s1.consumer.sNssais[2] = none) ) -> (
-- (s1.consumer.sNssais[1] in {s1.producer1.nfService1.allowedsNssais[1], s1.producer1.nfService1.allowedsNssais[2]})
-- ))
-- &
-- ((s1.consumer.sNssais[1] = none & s1.consumer.sNssais[2] != none) -> (
-- (s1.consumer.sNssais[2] in {s1.producer1.nfService1.allowedsNssais[1], s1.producer1.nfService1.allowedsNssais[2]})
-- ))
-- )
-- ))
-- ))
-- );
--
/-- Property 2.2:
For a nf service to be discovered, consumer's serving slice info must be allowed by the producer
insight for the property assumption:
P2.1 does not provide a counterexample probably because adversary discovery request update is disabled.
Adversary Assumption: OAMs present, No adversary NF Update, adversaryDiscoveryRequest enabled.
Result: Default Overprivilege Attack(when requesterSnssai = none and consumer sNssais = none.)
--/
-- LTLSPEC
-- (
-- ------------OAM control-----------
-- G(OAMConsumerPresent)
-- & G(!OAMConsumer1Approve)
-- & G(!OAMConsumer2Approve)
-- & G(OAMProducerPresent)
-- & G(!OAMProducer1Approve)
-- & G(!OAMProducer2Approve)
-- ------------adversary control---------
-- & G(adversaryPresent)
-- -- & G(!adversaryDiscoveryRequest)
-- & G(!adversaryATRequest)
-- & G(!adversaryServiceRequest)
-- ------------update control---------
-- & G(updateLevelConsumer1=0)
-- & G(updateLevelConsumer2=0)
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- & G(!updateDiscoveryRequest)
-- & G(!updateServiceRequest)
-- & G(!updateATRequest)
-- ------------NF configuration Constraints-----------------
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- )
-- ------------other constraints---------
-- )->
-- G(
-- ((s1.isNFDiscovered1 & s1.nfDiscoveryRequest.serviceName = s1.producer1.nfService1.serviceName) ->(
-- (( !((s1.producer1.nfService1.allowedsNssais[1] = none) & (s1.producer1.nfService1.allowedsNssais[2] = none)) )-> (
-- (
-- (( (s1.consumer.sNssais[1] != none & s1.consumer.sNssais[2] != none) ) -> ( -- TRUE
-- (s1.consumer.sNssais[1] in {s1.producer1.nfService1.allowedsNssais[1], s1.producer1.nfService1.allowedsNssais[2]})
-- |
-- (s1.consumer.sNssais[2] in {s1.producer1.nfService1.allowedsNssais[1], s1.producer1.nfService1.allowedsNssais[2]})
-- ))
-- &
-- (( (s1.consumer.sNssais[1] != none & s1.consumer.sNssais[2] = none) ) -> (
-- (s1.consumer.sNssais[1] in {s1.producer1.nfService1.allowedsNssais[1], s1.producer1.nfService1.allowedsNssais[2]})
-- ))
-- &
-- ((s1.consumer.sNssais[1] = none & s1.consumer.sNssais[2] != none) -> (
-- (s1.consumer.sNssais[2] in {s1.producer1.nfService1.allowedsNssais[1], s1.producer1.nfService1.allowedsNssais[2]})
-- ))
-- )
-- ))
-- ))
-- );
--
/-- Property 2.3:
For a nf service to be discovered, consumer's serving slice info must be allowed by the producer
Notable property Assumption: consumer sNssais != none at least initially.
insight for the property assumption:
Let's consider consumer sNssais != none at least initially.
Adversary Assumption: OAMs present, No adversary NF Update, adversaryDiscoveryRequest enabled.
Result: NFDiscovery Bypass attack (requesterSnssais != none.)
--/
-- LTLSPEC
-- (
-- ------------OAM control-----------
-- G(OAMConsumerPresent)
-- & G(!OAMConsumer1Approve)
-- & G(!OAMConsumer2Approve)
-- & G(OAMProducerPresent)
-- & G(!OAMProducer1Approve)
-- & G(!OAMProducer2Approve)
-- ------------adversary control---------
-- & G(adversaryPresent)
-- & G(!adversaryATRequest)
-- & G(!adversaryServiceRequest)
-- ------------update control---------
-- & G(updateLevelConsumer1=0)
-- & G(updateLevelConsumer2=0)
-- & G(updateLevelProducer1=0)
-- & G(updateLevelProducer2=0)
-- & G(!updateServiceRequest)
-- & G(!updateATRequest)
-- ------------NF configuration Constraints-----------------
-- & G(
-- isNFServiceNFTypeConsistent
-- & isOpNameOpScopeConsistent
-- & isOpNameNFServiceNameConsistent
-- & isOpNameParamConsistent
-- & isOpScopeAuthAttribConsistent
-- )
-- ------------other constraints---------
-- & (!(consumer1.sNssais[1] = none & consumer1.sNssais[2] = none))
-- )->
-- G(
-- ((s1.isNFDiscovered1 & s1.nfDiscoveryRequest.serviceName = s1.producer1.nfService1.serviceName) ->(