了解 ISO 8583 消息日志

发布于 2024-12-13 10:20:49 字数 1766 浏览 0 评论 0 原文

我在 WIKI代码项目;我理解 ISO 8583 消息基本上可以分为 3 个部分:

  1. MTI(消息类型指示符)

1.1。 版

1.2 。消息类别

1.3。 消息功能

1.4. 消息源位

指示存在哪些数据元素。

  1. DataElement

整个 ISO 消息的本质,包含有关交易的信息,例如:

  • 交易类型、

  • 金额、

  • customerid 等。 p>

因此,在阅读这两个 Web 参考资料后,我想将 ISO 消息日志划分为 MTI、位图和数据元素。

例如:

(0800 2020000000800000   000000 000001 3239313130303031)
MTI:  0800 (1987 version, Network Management Message, Request, Acquirer)
Bitmap: 20 20 00 00 00 80 00 00 (eg. 20 = 0010 0000 ,so position 3 is on)
DataElement:(by seeing Bitmap , we can defined data element as follow)
    field 03:000000 (Processing Code)
    field 11:000001 (Systems trace audit number)
    field 41:3239313130303031 (Card acceptor terminal idenfication)

但我的挑战是我的 ATM 机上已经有 ISO 8583 消息日志。

这个实际输出的消息日志并不像上面代码片段中的那样非常清晰。

所以我不能像上例那样将此消息分为 MTI、位图和数据元素。

00000:00 5B 30 31 31 30 30 30 30 30 30 30 30 38 32 30 80 38 00 00  [.[01100000000820.8..]
00020:00 81 00 00 04 00 00 00 00 00 00 00 33 36 32 39 31 30 31 30  [............36291010]
00040:32 39 35 37 31 30 33 31 31 30 30 30 30 30 30 35 30 33 31 53  [2957103110000005031S]
00060:55 32 30 31 31 31 30 33 31 31 30 32 39 35 37 32 30 31 31 31  [U2011103110295720111]
00080:30 33 31 31 30 32 39 35 37 33 30 30 31                       [0311029573001       ]

我之前没有ISO 8583留言经验,欢迎提出建议。

I read about ISO 8583 messaging at WIKI and Code Project; I understood ISO 8583 messages can basically be divided in 3 parts:

  1. MTI (Message Type Indicator)

1.1. Version

1.2. Message Class

1.3. Message Function

1.4. Message Origin

  1. Bitmap

Indicate which data elements are present.

  1. DataElement

The essence of the whole ISO message, contain information about the transaction such as:

  • transaction type,

  • amount,

  • customerid, etc.

So, after reading these two web references, I want to make divide my ISO messaging log as MTI, bitmap, and Data Element.

For example:

(0800 2020000000800000   000000 000001 3239313130303031)
MTI:  0800 (1987 version, Network Management Message, Request, Acquirer)
Bitmap: 20 20 00 00 00 80 00 00 (eg. 20 = 0010 0000 ,so position 3 is on)
DataElement:(by seeing Bitmap , we can defined data element as follow)
    field 03:000000 (Processing Code)
    field 11:000001 (Systems trace audit number)
    field 41:3239313130303031 (Card acceptor terminal idenfication)

But my challenge is that I already have ISO 8583 messaging log from my ATM Machine.

This actual output messaging log is not very clear like the one in the snippet above.

So I cannot divide this message to MTI, Bitmap and Data element like upper example.

00000:00 5B 30 31 31 30 30 30 30 30 30 30 30 38 32 30 80 38 00 00  [.[01100000000820.8..]
00020:00 81 00 00 04 00 00 00 00 00 00 00 33 36 32 39 31 30 31 30  [............36291010]
00040:32 39 35 37 31 30 33 31 31 30 30 30 30 30 30 35 30 33 31 53  [2957103110000005031S]
00060:55 32 30 31 31 31 30 33 31 31 30 32 39 35 37 32 30 31 31 31  [U2011103110295720111]
00080:30 33 31 31 30 32 39 35 37 33 30 30 31                       [0311029573001       ]

I have no previous experience in ISO 8583 message and welcome suggestions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

︶ ̄淡然 2024-12-20 10:20:49

知道了,

该消息分为如下:

前2个字节是消息长度00 5B = 91

后跟 14 个字节的标头 = 01100000000820

后跟 BMP,如下所示:

  • 主 BMP = 80 38 00 00 00 81 00 00 = 字段 {1, 11,12, 13, 41, 48} 存在

    字段 1 表示辅助 BMP 存在
  • 辅助 BMP = 04 00 00 00 00 00 00 00 = 字段 70 存在

我不确定 MTI 在哪里,会是标头尾部的 0820 ?因为它是 ASCII 格式的,通常它的数值为 08 20,但这可能是规范的一部分。 无论如何, 0820 表示网络管理建议

,解码后的 BMP 中的字段如下:

  • DE 11 = 362910
    系统跟踪审核编号
  • DE 12 = 102957
    本地交易时间 hh(24)mmss
  • DE 13 = 1031
    本地交易日期 MMDD
  • DE 41 = 10000005
    终端 ID
  • DE 48 = (031) SU20111031102957201110311029573

    请注意该字段中剩余数据之前的 3 位长度字段。这是一个通用(未来/私人使用)字段
  • DE 70 = 001

    网络管理信息代码<001 = 登录>

从 DE 70 值 001 开始,这是一条登录消息,必须是 0800 MTI。

要获取有关 MTI 位置和 DE 48 含义的更多信息,您应该阅读该设备的手册(技术规格)以获取更多信息。

Got it,

This message is divided as follows:

First 2 bytes are the message length 00 5B = 91

Followed by 14 bytes of header = 01100000000820

Followed somehow by BMP as follows:

  • Primary BMP = 80 38 00 00 00 81 00 00 = Fields {1, 11,12, 13, 41, 48} exist

    Field 1 means secondary BMP exist
  • Secondary BMP = 04 00 00 00 00 00 00 00 = Field 70 exist

I am not sure where is MTI, will it be the 0820 at the trailer of the header? since it is in ASCII and usually it comes in numeric value of 08 20 but this might be part of the specs. 0820 means network management advice

anyways, the fields from the decoded BMP as follows:

  • DE 11 = 362910
    System Trace Audit Number
  • DE 12 = 102957
    Local transaction time hh(24)mmss
  • DE 13 = 1031
    Local transaction date MMDD
  • DE 41 = 10000005
    terminal ID
  • DE 48 = (031) SU20111031102957201110311029573

    notice the 3 digits length field preceding the remaining data in this field. which is a generic (future/private use) field
  • DE 70 = 001

    network management information code <001 = sign on>

From DE 70 value 001 this is a sign on message, which must be a 0800 MTI.

To get more information about the location of the MTI and the meaning of DE 48, you should read the manual (technical specs) of this device to get more information.

若沐 2024-12-20 10:20:49

在发送 ISO 8583 消息时,我们将其转换为 BCD/HEX 形式,使用 Wireshark 工具

跟踪 IP 和端口之间的通信。

while sending ISO 8583 message we are converting it in BCD/HEX form ,use Wireshark tool to

track communication between IP and Ports.

明媚殇 2024-12-20 10:20:49

一个好的在线位图分析工具是 https://neapay.com/online-tools /bitmap-fields-decoder.html

有时,https://codebeautify.org/hex-string-converter 工具会有所帮助。

为了更好地理解 ISO 8583 消息格式,手动分析每个字段很有用。但是,每个字段可以具有不同格式(BCD、EBCDIC、ASCII ...)的长度和值子字段。并且某些字段可能具有内部字段,例如 BMP 48 或 60 经常用作嵌套字段树的容器。这些内部字段可以具有标签、长度和值。并且这些字段的嵌套字段可能又具有不同的格式:)。例如 https://github.com/credibledoc/credible-doc/blob/master/iso-8583-packer/doc/ebcdic/ebcdic-decimal-tag-packer.md页面描述了带有 EBCDIC 的字段标签和 BCD 值。

您可以使用 https://github.com/credibledoc/ credible-doc/tree/master/iso-8583-packer 用于构建 ISO 8583 消息的 Java 库(我是作者)。上面的 ISO 消息示例可以使用 iso-8583-packer 库进行解包和打包。

消息数据:

<f name="Root" lenHex="005B">
    <f name="Header" val="0110000000" valHex="30313130303030303030"/>
    <f name="MTI" val="0820" valHex="30383230"/>
    <f name="Bitmap" bitmapHex="80380000008100000400000000000000" bitSet="{1, 11, 12, 13, 41, 48, 70}">
        <f name="SystemTraceAuditNumber" fieldNum="11" val="362910" valHex="333632393130"/>
        <f name="LocalTransactionTimeHHMMSS" fieldNum="12" val="102957" valHex="313032393537"/>
        <f name="LocalTransactionDateMMDD" fieldNum="13" val="1031" valHex="31303331"/>
        <f name="TerminalId" fieldNum="41" val="10000005" valHex="3130303030303035"/>
        <f name="PrivateData_48" fieldNum="48" val="SU20111031102957201110311029573" lenHex="303331" valHex="53553230...39353733"/>
        <f name="NetworkManagementInformationCode" fieldNum="70" val="001" valHex="303031"/>
    </f>
</f>

消息结构:

<f type="LEN_VAL" name="Root" lengthPacker="BinaryLengthPacker" bodyPacker="AsciiBodyPacker">
    <f type="VAL" name="Header" bodyPacker="AsciiBodyPacker" len="10"/>
    <f type="VAL" name="MTI" bodyPacker="AsciiBodyPacker" len="4"/>
    <f type="BIT_SET" name="Bitmap" bitMapPacker="IfbBitmapPacker">
        <f type="VAL" fieldNum="11" name="SystemTraceAuditNumber" bodyPacker="AsciiBodyPacker" len="6"/>
        <f type="VAL" fieldNum="12" name="LocalTransactionTimeHHMMSS" bodyPacker="AsciiBodyPacker" len="6"/>
        <f type="VAL" fieldNum="13" name="LocalTransactionDateMMDD" bodyPacker="AsciiBodyPacker" len="4"/>
        <f type="VAL" fieldNum="41" name="TerminalId" bodyPacker="AsciiBodyPacker" len="8"/>
        <f type="LEN_VAL" fieldNum="48" name="PrivateData_48" lengthPacker="AsciiLengthPacker" bodyPacker="AsciiBodyPacker"/>
        <f type="VAL" fieldNum="70" name="NetworkManagementInformationCode" bodyPacker="AsciiBodyPacker" len="3"/>
    </f>
</f>

上面的示例可以在 GitHub 上找到 https://github.com/credibledoc/credible-doc/blob/master/iso-8583-packer/src/test/java/com/credibledoc/iso8583packer/examples/UnderstandingIso8583MessageLogTest.java

BMP 55通常包含 TLV EMV 数据。 https:// paymentcardtools.com/emv-tlv-parser 工具在这种情况下很有用。

A good online bitmap analysis tool is https://neapay.com/online-tools/bitmap-fields-decoder.html.

Sometime helps the https://codebeautify.org/hex-string-converter tool.

For a better understanding of the ISO 8583 message format, it is useful to analyse each field manually. However, each field can have length and value subfields in different formats (BCD, EBCDIC, ASCII ...). And some fields may have inner fields, for example BMP 48 or 60 often used as containers for nested field trees. These inner fields may have tag, length and value. And nested fields of these fields may have different formats again :). For example the https://github.com/credibledoc/credible-doc/blob/master/iso-8583-packer/doc/ebcdic/ebcdic-decimal-tag-packer.md page describes a field with EBCDIC tag and BCD value.

You can use the https://github.com/credibledoc/credible-doc/tree/master/iso-8583-packer Java library (I am the author) for building ISO 8583 messages. The example of ISO message above can be unpacked and packed with the iso-8583-packer library.

Message data:

<f name="Root" lenHex="005B">
    <f name="Header" val="0110000000" valHex="30313130303030303030"/>
    <f name="MTI" val="0820" valHex="30383230"/>
    <f name="Bitmap" bitmapHex="80380000008100000400000000000000" bitSet="{1, 11, 12, 13, 41, 48, 70}">
        <f name="SystemTraceAuditNumber" fieldNum="11" val="362910" valHex="333632393130"/>
        <f name="LocalTransactionTimeHHMMSS" fieldNum="12" val="102957" valHex="313032393537"/>
        <f name="LocalTransactionDateMMDD" fieldNum="13" val="1031" valHex="31303331"/>
        <f name="TerminalId" fieldNum="41" val="10000005" valHex="3130303030303035"/>
        <f name="PrivateData_48" fieldNum="48" val="SU20111031102957201110311029573" lenHex="303331" valHex="53553230...39353733"/>
        <f name="NetworkManagementInformationCode" fieldNum="70" val="001" valHex="303031"/>
    </f>
</f>

Message Structure:

<f type="LEN_VAL" name="Root" lengthPacker="BinaryLengthPacker" bodyPacker="AsciiBodyPacker">
    <f type="VAL" name="Header" bodyPacker="AsciiBodyPacker" len="10"/>
    <f type="VAL" name="MTI" bodyPacker="AsciiBodyPacker" len="4"/>
    <f type="BIT_SET" name="Bitmap" bitMapPacker="IfbBitmapPacker">
        <f type="VAL" fieldNum="11" name="SystemTraceAuditNumber" bodyPacker="AsciiBodyPacker" len="6"/>
        <f type="VAL" fieldNum="12" name="LocalTransactionTimeHHMMSS" bodyPacker="AsciiBodyPacker" len="6"/>
        <f type="VAL" fieldNum="13" name="LocalTransactionDateMMDD" bodyPacker="AsciiBodyPacker" len="4"/>
        <f type="VAL" fieldNum="41" name="TerminalId" bodyPacker="AsciiBodyPacker" len="8"/>
        <f type="LEN_VAL" fieldNum="48" name="PrivateData_48" lengthPacker="AsciiLengthPacker" bodyPacker="AsciiBodyPacker"/>
        <f type="VAL" fieldNum="70" name="NetworkManagementInformationCode" bodyPacker="AsciiBodyPacker" len="3"/>
    </f>
</f>

The example above can be found on GitHub https://github.com/credibledoc/credible-doc/blob/master/iso-8583-packer/src/test/java/com/credibledoc/iso8583packer/examples/UnderstandingIso8583MessageLogTest.java

BMP 55 often contains TLV EMV data. The https://paymentcardtools.com/emv-tlv-parser tool is useful in the case.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文