Commit d68aed56 authored by Yann Garcia's avatar Yann Garcia
Browse files

Validate Integrety protection against Open5GS

parent fbb76d9c
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -22,8 +22,6 @@ namespace NG__NAS__EncdecDeclarations {
   * @return  encoded value
   ****************************************************/

  BITSTRING fx__enc__NG__NAS__UL__Message__Type(const NG__NAS__MsgContainers::NG__NAS__UL__Message__Type &p){return int2bit(0,0);}
  BITSTRING fx__enc__NG__NAS__DL__Message__Type(const NG__NAS__MsgContainers::NG__NAS__DL__Message__Type &p){return int2bit(0,0);}
  BITSTRING fx__enc__IntraN1TransparentContainer(const NG__NAS__TypeDefs::IntraN1TransparentContainer &p){return int2bit(0,0);}
  BITSTRING fx__enc__CIoTSmallDataContainer(const NG__NAS__TypeDefs::CIoTSmallDataContainer &p){return int2bit(0,0);}
  BITSTRING fx__enc__EAP__Message__Type(const EAP__TypeDefs::EAP__Message__Type &p){return int2bit(0,0);}
@@ -33,13 +31,10 @@ namespace NG__NAS__EncdecDeclarations {
   * @param   value to encode
   * @return  encoded value
   ****************************************************/
  INTEGER fx__dec__NG__NAS__UL__Message__Type(BITSTRING &b, NG__NAS__MsgContainers::NG__NAS__UL__Message__Type &p) {return -1;}
  INTEGER fx__dec__NG__NAS__DL__Message__Type(BITSTRING &b, NG__NAS__MsgContainers::NG__NAS__DL__Message__Type &p) {return -1;}
  INTEGER fx__dec__IntraN1TransparentContainer(BITSTRING &b, NG__NAS__TypeDefs::IntraN1TransparentContainer &p) {return -1;}
  INTEGER fx__dec__CIoTSmallDataContainer(BITSTRING &b, NG__NAS__TypeDefs::CIoTSmallDataContainer &p) {return -1;}
  INTEGER fx__dec__EAP__Message__Type(BITSTRING &b, EAP__TypeDefs::EAP__Message__Type &p) {return -1;}


} // namespace NG__NAS__EncdecDeclarations

+3 −1
Original line number Diff line number Diff line
@@ -23,8 +23,10 @@ LibNGAP_Pixits.PX_SST := '01'O
LibNGAP_Pixits.PX_SD               := '000009'O

Lib_NG_NAS_Pixits.PX_CHECK_SECURITY                  := false
Lib_NG_NAS_Pixits.PX_SUPI_FORMAT                     := '0000'B
Lib_NG_NAS_Pixits.PX_TYPE_OF_ID                      := '0001'B # SUCI format
Lib_NG_NAS_Pixits.PX_SUPI_DIGITS                     := '00f110214300014444330302'O
Lib_NG_NAS_Pixits.PX_SUCI_DIGITS                     := '0000000010'O;

# OP
Lib_NG_NAS_Pixits.PX_OPERATOR_KEY                    := '00000000000000000000000000000000'O
# OPc
+10 −7
Original line number Diff line number Diff line
@@ -4,12 +4,12 @@
NGAP_Pics.PICS_NGAP_AMF_IUT    := true
NGAP_Pics.PICS_NGAP_GNB_IUT    := false

LibNGAP_Pics.PICS_OFFLINE_MODE := true
LibNGAP_Pics.PICS_OFFLINE_MODE := false

# 5GRegAuthSec_deReg.pcap
LibNGAP_Pixits.PX_AMF_NAME         := "open5gs-amf0"
LibNGAP_Pixits.PX_RAN_UE_NGAP_ID   := 1
LibNGAP_Pixits.PX_AMF_UE_NGAP_ID   := 1
LibNGAP_Pixits.PX_AMF_UE_NGAP_ID   := 2
LibNGAP_Pixits.PX_PLMN_IDENTITY    := '99f907'O
LibNGAP_Pixits.PX_AMF_REGION_ID    := '00000010'B
LibNGAP_Pixits.PX_AMF_SET_ID       := '0000000100'B
@@ -22,8 +22,10 @@ LibNGAP_Pixits.PX_SD := '000009'O
LibNGAP_Pixits.PX_PAGING_DRX       := v128

Lib_NG_NAS_Pixits.PX_CHECK_SECURITY                  := false
Lib_NG_NAS_Pixits.PX_SUPI_FORMAT                     := '0000'B
Lib_NG_NAS_Pixits.PX_SUPI_FORMAT                     := '0000'B # IMSI format
Lib_NG_NAS_Pixits.PX_TYPE_OF_ID                      := '001'B # SUCI type
Lib_NG_NAS_Pixits.PX_SUPI_DIGITS                     := '00f110214300014444330302'O
Lib_NG_NAS_Pixits.PX_MSIN                            := '0000000010'O;

# OP
Lib_NG_NAS_Pixits.PX_OPERATOR_KEY                    := '00000000000000000000000000000000'O
@@ -33,10 +35,11 @@ Lib_NG_NAS_Pixits.PX_FORCE_USING_OPERATOR_SECRET_KEY := true

Lib_NG_NAS_Pixits.PX_SUBSCRIPTION_KEY                := '01000110010110110101110011101000101100011001100110110100100111111010101001011111000010100010111011100010001110001010011010111100'B
# https://www.binaryhexconverter.com/hex-to-binary-converter
Lib_NG_NAS_Pixits.PX_PLMN                            := '00f110'O;
Lib_NG_NAS_Pixits.PX_PLMN                            := '99f907'O;
Lib_NG_NAS_Pixits.PX_BEARER_ID                       := '00001'B

Parameters.px_IMSI_Def                               := '393939373030303030303030303031'H; # 999700000000001
Parameters.px_IMSI_Def                               := '393939373030303030303030303031'H # 999700000000001
Parameters.px_IMEISV_Def                             := '4573806121856151f1'H
NAS_5GC_Parameters.px_NAS_5GC_XRES_Length            := 8 # In ETSI TS 135 206 V16.0.0 (2020-08) Table Table 5. f2 output, RES length is 8 octets (64 bits)

[LOGGING]
@@ -57,10 +60,10 @@ LogEventTypes:= Yes
# In this section you can specify parameters that are passed to Test Ports.

# Open5GS AMF IP and port as listener
#system.NGAP_AMF.params := "NGAP/SCTP(server_mode=1,local_port=38412,debug=1)"
system.NGAP_AMF.params := "NGAP/SCTP(server=127.0.0.5,port=38412,debug=1)"

# Open5GS pcap files
system.NGAP_AMF.params := "NGAP/SCTP_FILE/IP_OFFLINE/ETH(mac_src=8c554ac1eee0,mac_dst=8c554ac1eee1)/PCAP_FILE(file=../captures/open5gs.pcap)"
#system.NGAP_AMF.params := "NGAP/SCTP_FILE/IP_OFFLINE/ETH(mac_src=8c554ac1eee0,mac_dst=8c554ac1eee1)/PCAP_FILE(file=../captures/open5gs.pcap)"

[DEFINE]
# In this section you can create macro definitions,
+2 −1
Original line number Diff line number Diff line
@@ -22,8 +22,9 @@ LibNGAP_Pixits.PX_SD := '000009'O
LibNGAP_Pixits.PX_PAGING_DRX       := v128

Lib_NG_NAS_Pixits.PX_CHECK_SECURITY                  := false
Lib_NG_NAS_Pixits.PX_SUPI_FORMAT                     := '0000'B
Lib_NG_NAS_Pixits.PX_TYPE_OF_ID                      := '0001'B # SUCI format
Lib_NG_NAS_Pixits.PX_SUPI_DIGITS                     := '00f110214300014444330302'O
Lib_NG_NAS_Pixits.PX_SUCI_DIGITS                     := '0000000010'O;

# OP
Lib_NG_NAS_Pixits.PX_OPERATOR_KEY                    := '00000000000000000000000000000000'O
+3 −1
Original line number Diff line number Diff line
@@ -22,11 +22,13 @@ fi

cd $BASE_PATH
ln -f ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/
# TODO Add other patch
cd $BASE_PATH

cd ./ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src
git apply ../../../../patch_abstract_socket/Abstract_Socket.hh.patch
git apply ../../../../patch_abstract_socket/Abstract_Socket.cc.patch
cd $BASE_PATH

# TODO Add other patch

exit 0
Loading