0

I have a Lutron Caseta light switch. When I open the iOS app, it connects to lutron.broker.xively.com port 8883. Using a fakedns server I was able to direct that to my server running netcat as follows:

[me@machine :: ~]$ nc -l 8883 | xxd


00000000: 1603 0100 9201 0000 8e03 0358 86b8 87a7  ...........X....
00000010: af0b d067 d7c1 6f69 3f52 aa4a cf58 4c37  ...g..oi?R.J.XL7
00000020: 07cd c9a2 8007 8c12 69d3 f900 002c 00ff  ........i....,..
00000030: c02c c02b c024 c023 c00a c009 c008 c030  .,.+.$.#.......0
00000040: c02f c028 c027 c014 c013 c012 009d 009c  ./.(.'..........
00000050: 003d 003c 0035 002f 000a 0100 0039 000a  .=.<.5./.....9..
00000060: 0008 0006 0017 0018 0019 000b 0002 0100  ................
00000070: 000d 0012 0010 0401 0201 0501 0601 0403  ................
00000080: 0203 0503 0603 0005 0005 0100 0000 0000  ................
00000090: 1200 0000 1700 00                        .......

when i reconnect to the real broker server and send this data, it sends back the following:

00000000: 1603 0300 5d02 0000 5903 0390 1ed9 de85  ....]...Y.......
00000010: b5a0 1d4b 1c85 7cb5 da8a efc9 9ce5 8277  ...K..|........w
00000020: 7592 cefb 27af 9b87 384c 8820 6f33 e681  u...'...8L. o3..
00000030: 2e81 f8ca 1036 a881 e640 8bdf 7c8e 0cfa  .....6...@..|...
00000040: 0ed6 041f 776c 0146 d996 86f0 c030 0000  ....wl.F.....0..
00000050: 11ff 0100 0100 000b 0004 0300 0102 0005  ................
00000060: 0000 1603 0309 f40b 0009 f000 09ed 0005  ................
00000070: 7a30 8205 7630 8204 5ea0 0302 0102 0212  z0..v0..^.......
00000080: 1121 e3ea e36b 0b95 9481 0331 f573 e072  .!...k.....1.s.r
00000090: 66c3 300d 0609 2a86 4886 f70d 0101 0b05  f.0...*.H.......
000000a0: 0030 6631 0b30 0906 0355 0406 1302 4245  .0f1.0...U....BE
000000b0: 3119 3017 0603 5504 0a13 1047 6c6f 6261  1.0...U....Globa
000000c0: 6c53 6967 6e20 6e76 2d73 6131 3c30 3a06  lSign nv-sa1<0:.
000000d0: 0355 0403 1333 476c 6f62 616c 5369 676e  .U...3GlobalSign
000000e0: 204f 7267 616e 697a 6174 696f 6e20 5661   Organization Va
000000f0: 6c69 6461 7469 6f6e 2043 4120 2d20 5348  lidation CA - SH
00000100: 4132 3536 202d 2047 3230 1e17 0d31 3630  A256 - G20...160
00000110: 3331 3831 3831 3130 365a 170d 3137 3033  318181106Z..1703
00000120: 3139 3138 3131 3036 5a30 6c31 0b30 0906  19181106Z0l1.0..
00000130: 0355 0406 1302 5553 3116 3014 0603 5504  .U....US1.0...U.
00000140: 0813 0d4d 6173 7361 6368 7573 6574 7473  ...Massachusetts
00000150: 310f 300d 0603 5504 0713 0642 6f73 746f  1.0...U....Bosto
00000160: 6e31 1630 1406 0355 040a 130d 4c6f 674d  n1.0...U....LogM
00000170: 6549 6e2c 2049 6e63 2e31 1c30 1a06 0355  eIn, Inc.1.0...U
00000180: 0403 0c13 2a2e 6272 6f6b 6572 2e78 6976  ....*.broker.xiv
00000190: 656c 792e 636f 6d30 8201 2230 0d06 092a  ely.com0.."0...*
000001a0: 8648 86f7 0d01 0101 0500 0382 010f 0030  .H.............0
000001b0: 8201 0a02 8201 0100 e51b 84f4 c890 c8e5  ................
000001c0: 24f5 d657 3342 d11e ed16 dc32 67b3 0ed7  $..W3B.....2g...
000001d0: a485 5b4b 723c 1526 9c7a 724b a543 d962  ..[Kr<.&.zrK.C.b
000001e0: 02c7 9286 df60 f7b8 ee0c 2eb8 bdcc 6305  .....`........c.
000001f0: fe16 812a 4f9e cd5f 480f 8e4c 5a15 45b0  ...*O.._H..LZ.E.
00000200: 1ff3 1167 1885 c318 0a2a 4cbd 987d b724  ...g.....*L..}.$
00000210: 7095 22fb da8c 9a97 3491 bdf4 d9fc 6e15  p.".....4.....n.
00000220: 9b63 5ced 8f30 58a5 044d 5cb7 f347 aa93  .c\..0X..M\..G..
00000230: 435e dc54 8bf6 2c26 cc86 3191 3983 4b19  C^.T..,&..1.9.K.
00000240: b2ac 813d 7be3 db4d 6cc7 9baa 275b 8661  ...={..Ml...'[.a
00000250: d68c 99c4 39c6 587c 9ca4 e31b 1f4a ebae  ....9.X|.....J..
00000260: 2526 02cf 1a2c ee98 76f4 f94f 1e0d 8387  %&...,..v..O....
00000270: a46a 661d 8cd9 6082 48cd e764 74c8 670a  .jf...`.H..dt.g.
00000280: 7e36 41d4 eb57 f65e 2b9b b3f4 1b67 fac0  ~6A..W.^+....g..
00000290: 68ed ad82 e1f3 d205 949d e3cc 21c7 f379  h...........!..y
000002a0: cd2c c90e 69ef 47ff e571 11e1 8f5d e82b  .,..i.G..q...].+
000002b0: c74e 3463 3ffa ae65 0203 0100 01a3 8202  .N4c?..e........
000002c0: 1630 8202 1230 0e06 0355 1d0f 0101 ff04  .0...0...U......
000002d0: 0403 0205 a030 4906 0355 1d20 0442 3040  .....0I..U. .B0@
000002e0: 303e 0606 6781 0c01 0202 3034 3032 0608  0>..g.....0402..
000002f0: 2b06 0105 0507 0201 1626 6874 7470 733a  +........&https:
00000300: 2f2f 7777 772e 676c 6f62 616c 7369 676e  //www.globalsign
00000310: 2e63 6f6d 2f72 6570 6f73 6974 6f72 792f  .com/repository/
00000320: 305d 0603 551d 1104 5630 5482 132a 2e62  0]..U...V0T..*.b
00000330: 726f 6b65 722e 7869 7665 6c79 2e63 6f6d  roker.xively.com
00000340: 822a 6272 6f6b 6572 2e78 6976 656c 792e  .*broker.xively.
00000350: 6c6f 676d 6569 6e72 6573 6375 652d 656e  logmeinrescue-en
00000360: 7465 7270 7269 7365 2e63 6f6d 8211 6272  terprise.com..br
00000370: 6f6b 6572 2e78 6976 656c 792e 636f 6d30  oker.xively.com0
00000380: 0906 0355 1d13 0402 3000 301d 0603 551d  ...U....0.0...U.
00000390: 2504 1630 1406 082b 0601 0505 0703 0106  %..0...+........
000003a0: 082b 0601 0505 0703 0230 4906 0355 1d1f  .+.......0I..U..
000003b0: 0442 3040 303e a03c a03a 8638 6874 7470  .B0@0>.<.:.8http
000003c0: 3a2f 2f63 726c 2e67 6c6f 6261 6c73 6967  ://crl.globalsig
000003d0: 6e2e 636f 6d2f 6773 2f67 736f 7267 616e  n.com/gs/gsorgan
000003e0: 697a 6174 696f 6e76 616c 7368 6132 6732  izationvalsha2g2
000003f0: 2e63 726c 3081 a006 082b 0601 0505 0701  .crl0....+......
00000400: 0104 8193 3081 9030 4d06 082b 0601 0505  ....0..0M..+....
00000410: 0730 0286 4168 7474 703a 2f2f 7365 6375  .0..Ahttp://secu
00000420: 7265 2e67 6c6f 6261 6c73 6967 6e2e 636f  re.globalsign.co
00000430: 6d2f 6361 6365 7274 2f67 736f 7267 616e  m/cacert/gsorgan
00000440: 697a 6174 696f 6e76 616c 7368 6132 6732  izationvalsha2g2
00000450: 7231 2e63 7274 303f 0608 2b06 0105 0507  r1.crt0?..+.....
00000460: 3001 8633 6874 7470 3a2f 2f6f 6373 7032  0..3http://ocsp2
00000470: 2e67 6c6f 6261 6c73 6967 6e2e 636f 6d2f  .globalsign.com/
00000480: 6773 6f72 6761 6e69 7a61 7469 6f6e 7661  gsorganizationva
00000490: 6c73 6861 3267 3230 1d06 0355 1d0e 0416  lsha2g20...U....
000004a0: 0414 64c6 04aa 2fc4 f195 b96d c179 c61a  ..d.../....m.y..
000004b0: 1bd9 2fd0 5f77 301f 0603 551d 2304 1830  ../._w0...U.#..0
000004c0: 1680 1496 de61 f1bd 1c16 2953 1cc0 cc7d  .....a....)S...}
000004d0: 3b83 0040 e61a 7c30 0d06 092a 8648 86f7  ;..@..|0...*.H..
000004e0: 0d01 010b 0500 0382 0101 00b2 a7e3 e436  ...............6
000004f0: b7f4 6f06 d7d6 e151 018b fd59 3f9f 3545  ..o....Q...Y?.5E
00000500: bd84 4b83 60e6 8d06 519c 7513 1c27 7428  ..K.`...Q.u..'t(
00000510: 85c7 5347 cf3c e8ce 790a c7bf 9259 7135  ..SG.<..y....Yq5
00000520: 05bd 5130 e62e 6ca3 a6cd 0c95 4f01 8b0e  ..Q0..l.....O...
00000530: f964 ca3d 3a6f 9db3 51d2 3ba2 8695 b3be  .d.=:o..Q.;.....
00000540: 8be3 a0d9 9510 06c6 aeb1 69bc b5a5 be24  ..........i....$
00000550: 82b7 e619 0429 16f7 b25f 147f e521 a27b  .....)..._...!.{
00000560: f7ce 94f7 04f3 8fb5 8d6d 6bc2 96eb fde0  .........mk.....
00000570: ee37 5942 d8c8 f6fa 18f6 d7e1 bea7 5dca  .7YB..........].
00000580: 85b2 f7cd 4d26 0df1 7437 6b8e d31d 39c8  ....M&..t7k...9.
00000590: 69d3 823b 3097 da06 dfcd e73b 702d 6b12  i..;0......;p-k.
000005a0: b3ca e1f0 f869 3394 8d43 8ec6 fd8d 3284  .....i3..C....2.
000005b0: 9d33 92cf 34d1 2928 910b 2127 32cc f0af  .3..4.)(..!'2...
000005c0: 8390 94f3 6d78 96ee 787a fcf5 0952 b272  ....mx..xz...R.r
000005d0: ba1e 8e14 678d b2e6 8b3c c3eb dd4f c4ee  ....g....<...O..
000005e0: b11e 168f d715 f9f6 5118 9400 046d 3082  ........Q....m0.
000005f0: 0469 3082 0351 a003 0201 0202 0b04 0000  .i0..Q..........
00000600: 0000 0144 4ef0 4247 300d 0609 2a86 4886  ...DN.BG0...*.H.
00000610: f70d 0101 0b05 0030 5731 0b30 0906 0355  .......0W1.0...U
00000620: 0406 1302 4245 3119 3017 0603 5504 0a13  ....BE1.0...U...
00000630: 1047 6c6f 6261 6c53 6967 6e20 6e76 2d73  .GlobalSign nv-s
00000640: 6131 1030 0e06 0355 040b 1307 526f 6f74  a1.0...U....Root
00000650: 2043 4131 1b30 1906 0355 0403 1312 476c   CA1.0...U....Gl
00000660: 6f62 616c 5369 676e 2052 6f6f 7420 4341  obalSign Root CA
00000670: 301e 170d 3134 3032 3230 3130 3030 3030  0...140220100000
00000680: 5a17 0d32 3430 3232 3031 3030 3030 305a  Z..240220100000Z
00000690: 3066 310b 3009 0603 5504 0613 0242 4531  0f1.0...U....BE1
000006a0: 1930 1706 0355 040a 1310 476c 6f62 616c  .0...U....Global
000006b0: 5369 676e 206e 762d 7361 313c 303a 0603  Sign nv-sa1<0:..
000006c0: 5504 0313 3347 6c6f 6261 6c53 6967 6e20  U...3GlobalSign 
000006d0: 4f72 6761 6e69 7a61 7469 6f6e 2056 616c  Organization Val
000006e0: 6964 6174 696f 6e20 4341 202d 2053 4841  idation CA - SHA
000006f0: 3235 3620 2d20 4732 3082 0122 300d 0609  256 - G20.."0...
00000700: 2a86 4886 f70d 0101 0105 0003 8201 0f00  *.H.............
00000710: 3082 010a 0282 0101 00c7 0e6c 3f23 937f  0..........l?#..
00000720: cc70 a59d 20c3 0e53 3f7e c04e c298 49ca  .p.. ..S?~.N..I.
00000730: 47d5 23ef 0334 8574 c8a3 022e 465c 0b7d  G.#..4.t....F\.}
00000740: c988 9d4f 8bf0 f89c 6c8c 5535 dbbf f2b3  ...O....l.U5....
00000750: eafb e356 e74a 46d9 1322 ca36 d59b c1a8  ...V.JF..".6....
00000760: e396 4393 f20c bce6 f9e6 e899 c863 4878  ..C..........cHx
00000770: 7f57 3669 1a19 1d5a d1d4 7dc2 9cd4 7fe1  .W6i...Z..}.....
00000780: 8012 ae7a ea88 ea57 d8ca 0a0a 3a12 49a2  ...z...W....:.I.
00000790: 6219 7a0d 24f7 37eb b473 927b 0523 9b12  b.z.$.7..s.{.#..
000007a0: b5ce eb29 dfa4 1402 b901 a5d4 a69c 4364  ...)..........Cd
000007b0: 88de f87e fee3 f51e e5fe dca3 a8e4 6631  ...~..........f1
000007c0: d94c 25e9 18b9 8959 09ae e99d 1c6d 370f  .L%....Y.....m7.
000007d0: 4a1e 3520 28e2 afd4 218b 01c4 45ad 6e2b  J.5 (...!...E.n+
000007e0: 63ab 926b 610a 4d20 ed73 ba7c cefe 16b5  c..ka.M .s.|....
000007f0: db9f 80f0 d68b 6cd9 0879 4a4f 7865 da92  ......l..yJOxe..
00000800: bcbe 35f9 b3c4 f927 804e ff96 52e6 0220  ..5....'.N..R.. 
00000810: e107 73e9 5d2b bdb2 f102 0301 0001 a382  ..s.]+..........
00000820: 0125 3082 0121 300e 0603 551d 0f01 01ff  .%0..!0...U.....
00000830: 0404 0302 0106 3012 0603 551d 1301 01ff  ......0...U.....
00000840: 0408 3006 0101 ff02 0100 301d 0603 551d  ..0.......0...U.
00000850: 0e04 1604 1496 de61 f1bd 1c16 2953 1cc0  .......a....)S..
00000860: cc7d 3b83 0040 e61a 7c30 4706 0355 1d20  .};..@..|0G..U. 
00000870: 0440 303e 303c 0604 551d 2000 3034 3032  .@0>0<..U. .0402
00000880: 0608 2b06 0105 0507 0201 1626 6874 7470  ..+........&http
00000890: 733a 2f2f 7777 772e 676c 6f62 616c 7369  s://www.globalsi
000008a0: 676e 2e63 6f6d 2f72 6570 6f73 6974 6f72  gn.com/repositor
000008b0: 792f 3033 0603 551d 1f04 2c30 2a30 28a0  y/03..U...,0*0(.
000008c0: 26a0 2486 2268 7474 703a 2f2f 6372 6c2e  &.$."http://crl.
000008d0: 676c 6f62 616c 7369 676e 2e6e 6574 2f72  globalsign.net/r
000008e0: 6f6f 742e 6372 6c30 3d06 082b 0601 0505  oot.crl0=..+....
000008f0: 0701 0104 3130 2f30 2d06 082b 0601 0505  ....10/0-..+....
00000900: 0730 0186 2168 7474 703a 2f2f 6f63 7370  .0..!http://ocsp
00000910: 2e67 6c6f 6261 6c73 6967 6e2e 636f 6d2f  .globalsign.com/
00000920: 726f 6f74 7231 301f 0603 551d 2304 1830  rootr10...U.#..0
00000930: 1680 1460 7b66 1a45 0d97 ca89 502f 7d04  ...`{f.E....P/}.
00000940: cd34 a8ff fcfd 4b30 0d06 092a 8648 86f7  .4....K0...*.H..
00000950: 0d01 010b 0500 0382 0101 0046 2aee 5ebd  ...........F*.^.
00000960: ae01 6037 3111 8671 74b6 4649 c810 16fe  ..`71..qt.FI....
00000970: 2f62 2317 ab1f 87f8 82ed cadf 0e2c df64  /b#..........,.d
00000980: 758e e518 72a7 8c3a 8bc9 aca5 7750 f7ef  u...r..:....wP..
00000990: 9ea4 e0a0 8f14 57a3 2a5f ec7e 6d10 e6ba  ......W.*_.~m...
000009a0: 8db0 0887 760e 4cb2 d951 bb11 02f2 5cdd  ....v.L..Q....\.
000009b0: 1cbd f355 960f d406 c0fc e223 8a24 70d3  ...U.......#.$p.
000009c0: bbf0 791a a761 7083 8aaf 06c5 20d8 a163  ..y..ap..... ..c
000009d0: d06c ae4f 32d7 ae7c 1845 7505 2977 df42  .l.O2..|.Eu.)w.B
000009e0: 4064 6486 be2a 7609 316f 1d24 f499 d085  @dd..*v.1o.$....
000009f0: fef2 2108 f9c6 f6f1 d059 edd6 563c 0828  ..!......Y..V<.(
00000a00: 0367 baf0 f9f1 9016 47ae 67e6 bc80 48e9  .g......G.g...H.
00000a10: 4276 3497 5569 240e 83d6 a02d b4f5 f379  Bv4.Ui$....-...y
00000a20: 8a49 2874 1a41 a1c2 d324 8835 3060 9417  .I(t.A...$.50`..
00000a30: b4e1 0422 313d 3b2f 1706 b2b8 9d86 2b5a  ..."1=;/......+Z
00000a40: 69ef 83f5 4bc4 aab4 2af8 7ca1 b185 948c  i...K...*.|.....
00000a50: f40c 870c f4ac 40f8 5949 9816 0303 0630  ......@.YI.....0
00000a60: 1600 062c 0100 0628 3082 0624 0a01 00a0  ...,...(0..$....
00000a70: 8206 1d30 8206 1906 092b 0601 0505 0730  ...0.....+.....0
00000a80: 0101 0482 060a 3082 0606 3081 a0a2 1604  ......0...0.....
00000a90: 149c 4d00 9900 0e8b b001 8175 a1ba f0d0  ..M........u....
00000aa0: 25d7 a01c 4718 0f32 3031 3730 3132 3231  %...G..201701221
00000ab0: 3535 3430 355a 3075 3073 304b 3009 0605  55405Z0u0s0K0...
00000ac0: 2b0e 0302 1a05 0004 140c 9e4d 9c3d edef  +..........M.=..
00000ad0: 84d8 91e9 72c7 cf84 06bc 197b 0704 1496  ....r......{....
00000ae0: de61 f1bd 1c16 2953 1cc0 cc7d 3b83 0040  .a....)S...};..@
00000af0: e61a 7c02 1211 21e3 eae3 6b0b 9594 8103  ..|...!...k.....
00000b00: 31f5 73e0 7266 c380 0018 0f32 3031 3730  1.s.rf.....20170
00000b10: 3132 3231 3535 3430 355a a011 180f 3230  122155405Z....20
00000b20: 3137 3031 3236 3135 3534 3035 5a30 0d06  170126155405Z0..
00000b30: 092a 8648 86f7 0d01 010b 0500 0382 0101  .*.H............
00000b40: 009c 066b 2688 c267 1437 8bf8 a2f6 dddb  ...k&..g.7......
00000b50: 2d01 b450 19ee d42f 3e75 3856 ce07 7e2d  -..P.../>u8V..~-
00000b60: 70c6 f92b 82d2 6a4b 6c67 4ddd 33f9 167f  p..+..jKlgM.3...
00000b70: ccc5 2530 e9dc cb2f 15d9 5a11 42c9 4fc3  ..%0.../..Z.B.O.
00000b80: 617c 64bc a1ae af71 3824 b666 5568 e8b5  a|d....q8$.fUh..
00000b90: 769a 0740 e058 8766 9443 d437 852d d297  v..@.X.f.C.7.-..
00000ba0: 9391 cfe2 82b7 f410 1b02 cd48 e05c 2d20  ...........H.\- 
00000bb0: 1d67 a13d 59a7 ba85 a50c 1945 9e1e 59af  .g.=Y......E..Y.
00000bc0: 7b35 a15e 5dfb b571 d6f2 1114 8fd0 3c6c  {5.^]..q......<l
00000bd0: 7fce 224e 7b77 4a4c 3cff f17e 02e9 8687  .."N{wJL<..~....
00000be0: 0f3d 4b8e 4c97 4d7d 3bf5 75dc ca87 4967  .=K.L.M};.u...Ig
00000bf0: b965 cae6 abbc 3276 c694 18c7 286d 111c  .e....2v....(m..
00000c00: 9e05 5b3a 9b3f 78a3 70a6 719f 83de 99cf  ..[:.?x.p.q.....
00000c10: 4aa8 75a2 d9f0 9542 52db a813 bf5c 56b0  J.u....BR....\V.
00000c20: 275b 4725 18b9 084d f3bf 3fb1 a87a d8e7  '[G%...M..?..z..
00000c30: 4d68 0f77 89a2 fb16 c98a 6bf9 818a 4d76  Mh.w......k...Mv
00000c40: 55a0 8204 4b30 8204 4730 8204 4330 8203  U...K0..G0..C0..
00000c50: 2ba0 0302 0102 020c 7191 a17d fa64 63bd  +.......q..}.dc.
00000c60: 6adf 9f28 300d 0609 2a86 4886 f70d 0101  j..(0...*.H.....
00000c70: 0b05 0030 6631 0b30 0906 0355 0406 1302  ...0f1.0...U....
00000c80: 4245 3119 3017 0603 5504 0a13 1047 6c6f  BE1.0...U....Glo
00000c90: 6261 6c53 6967 6e20 6e76 2d73 6131 3c30  balSign nv-sa1<0
00000ca0: 3a06 0355 0403 1333 476c 6f62 616c 5369  :..U...3GlobalSi
00000cb0: 676e 204f 7267 616e 697a 6174 696f 6e20  gn Organization 
00000cc0: 5661 6c69 6461 7469 6f6e 2043 4120 2d20  Validation CA - 
00000cd0: 5348 4132 3536 202d 2047 3230 1e17 0d31  SHA256 - G20...1
00000ce0: 3631 3132 3430 3331 3834 335a 170d 3137  61124031843Z..17
00000cf0: 3032 3234 3033 3138 3433 5a30 818e 310b  0224031843Z0..1.
00000d00: 3009 0603 5504 0613 0242 4531 1930 1706  0...U....BE1.0..
00000d10: 0355 040a 1310 476c 6f62 616c 5369 676e  .U....GlobalSign
00000d20: 206e 762d 7361 3115 3013 0603 5504 0513   nv-sa1.0...U...
00000d30: 0c32 3031 3631 3132 3431 3132 3831 4d30  .2016112411281M0
00000d40: 4b06 0355 0403 1344 476c 6f62 616c 5369  K..U...DGlobalSi
00000d50: 676e 204f 7267 616e 697a 6174 696f 6e20  gn Organization 
00000d60: 5661 6c69 6461 7469 6f6e 2043 4120 2d20  Validation CA - 
00000d70: 5348 4132 3536 202d 2047 3220 2d20 4f43  SHA256 - G2 - OC
00000d80: 5350 2052 6573 706f 6e64 6572 3082 0122  SP Responder0.."
00000d90: 300d 0609 2a86 4886 f70d 0101 0105 0003  0...*.H.........
00000da0: 8201 0f00 3082 010a 0282 0101 00d2 4397  ....0.........C.
00000db0: cf30 6ae3 d952 cedb a7eb de05 8bd7 3013  .0j..R........0.
00000dc0: 22c8 65a8 26de 3627 8a64 96fa fa5f a90a  ".e.&.6'.d..._..
00000dd0: 0517 f538 f091 aa59 f5ce b7c1 2f9d c97a  ...8...Y..../..z
00000de0: 7fa3 2d68 69af 6b18 e0b9 fd9a aeed 44b7  ..-hi.k.......D.
00000df0: 14b9 a5d5 fcff 83ed 7517 063e 681b c1b9  ........u..>h...
00000e00: fc54 322e 927e 0ff1 2a3b bfd6 9f76 1d5e  .T2..~..*;...v.^
00000e10: a221 64ec a8ea f70c cafa 3883 70da 65a6  .!d.......8.p.e.
00000e20: a26d 65d5 1594 3eac ee56 96e1 a56c 1307  .me...>..V...l..
00000e30: bb50 1936 8656 81c5 47e5 d33b 589b 077f  .P.6.V..G..;X...
00000e40: dcb9 fe06 3132 5516 2944 d145 286c 6451  ....12U.)D.E(ldQ
00000e50: ea0d 8736 37cd 1040 aa9d 1d1c fdc7 6cf0  ...67..@......l.
00000e60: 9419 419e 3e6c e9f3 bdbc ddf4 6d05 d465  ..A.>l......m..e
00000e70: 3bd8 b193 80b7 6ef6 7e90 9057 6281 3fa2  ;.....n.~..Wb.?.
00000e80: 8b67 45d5 8cb8 9098 b9b3 61e0 4b4d f946  .gE.......a.KM.F
00000e90: ce13 827d 8171 6f3b 53e5 041c 602f d612  ...}.qo;S...`/..
00000ea0: 7392 98eb 9636 1cf7 8da1 47eb 6102 0301  s....6....G.a...
00000eb0: 0001 a381 c730 81c4 301d 0603 551d 0e04  .....0..0...U...
00000ec0: 1604 149c 4d00 9900 0e8b b001 8175 a1ba  ....M........u..
00000ed0: f0d0 25d7 a01c 4730 1f06 0355 1d23 0418  ..%...G0...U.#..
00000ee0: 3016 8014 96de 61f1 bd1c 1629 531c c0cc  0.....a....)S...
00000ef0: 7d3b 8300 40e6 1a7c 300f 0609 2b06 0105  };..@..|0...+...
00000f00: 0507 3001 0504 0205 0030 4c06 0355 1d20  ..0......0L..U. 
00000f10: 0445 3043 3041 0609 2b06 0104 01a0 3201  .E0C0A..+.....2.
00000f20: 5f30 3430 3206 082b 0601 0505 0702 0116  _0402..+........
00000f30: 2668 7474 7073 3a2f 2f77 7777 2e67 6c6f  &https://www.glo
00000f40: 6261 6c73 6967 6e2e 636f 6d2f 7265 706f  balsign.com/repo
00000f50: 7369 746f 7279 2f30 0e06 0355 1d0f 0101  sitory/0...U....
00000f60: ff04 0403 0207 8030 1306 0355 1d25 040c  .......0...U.%..
00000f70: 300a 0608 2b06 0105 0507 0309 300d 0609  0...+.......0...
00000f80: 2a86 4886 f70d 0101 0b05 0003 8201 0100  *.H.............
00000f90: 0d48 1109 b018 b243 8049 65e3 8cdb cb3b  .H.....C.Ie....;
00000fa0: 1379 4e19 27cc ddd2 e72f 3fad 54b2 152d  .yN.'..../?.T..-
00000fb0: 549f 6185 cd34 ae82 0a6e e3f7 4f57 2f6c  T.a..4...n..OW/l
00000fc0: 96ee cdc0 5b7c 0efc 2dee 6983 fd2f 8627  ....[|..-.i../.'
00000fd0: 9bde 3195 220b 16eb 808a 8133 5bfd 9cd7  ..1."......3[...
00000fe0: 4a1e 9ce9 afde 5c40 ae53 a23d 2d70 b3d3  J.....\@.S.=-p..
00000ff0: 7081 ac0c e6d3 ba64 81b5 963e 7e4a e87c  p......d...>~J.|
00001000: 4530 7988 b6e3 a08b ef21 963b a763 8e2c  E0y......!.;.c.,
00001010: 8489 e67c 7c06 56f4 8b98 174b d092 4ce6  ...||.V....K..L.
00001020: f28b 6458 7fb7 c661 d1ba bd9d 3627 0ae4  ..dX...a....6'..
00001030: 55fd df47 ceee c911 413b e88b 98ea cb8e  U..G....A;......
00001040: 1cf8 fa00 344b 9306 f11f e796 c1a3 7fcc  ....4K..........
00001050: cd6b d742 5dbd 730b 33bd eac9 240e 0b43  .k.B].s.3...$..C
00001060: 7281 998a a654 192a 7a00 a5be 7717 0b24  r....T.*z...w..$
00001070: 97e2 78d7 f533 be87 b34b d0e7 9682 314a  ..x..3...K....1J
00001080: 8532 a4ce c745 3973 984c 2e08 1aa9 bf4f  .2...E9s.L.....O
00001090: 1603 0301 4d0c 0001 4903 0017 4104 e7ba  ....M...I...A...
000010a0: 5507 82b0 b4ea 0619 d41d 5d90 14d0 8cd3  U.........].....
000010b0: 5f8f 8033 33fc cae8 26dc 9adb 7885 74d2  _..33...&...x.t.
000010c0: 9214 7707 3a8e 46c4 ce1c 6cc5 b323 cb0e  ..w.:.F...l..#..
000010d0: c07c abb1 4f3f a032 74b4 3455 3eb2 0601  .|..O?.2t.4U>...
000010e0: 0100 21a0 f265 b0d6 fe2b 93d5 06ba fcd4  ..!..e...+......
000010f0: 10ea e7ba 362c 5619 c154 535a bcf1 a9ba  ....6,V..TSZ....
00001100: ec18 6ab9 bc72 32d8 5862 9e35 524b b2e8  ..j..r2.Xb.5RK..
00001110: d7ac 522c 1341 4177 0373 e734 ba8c 7907  ..R,.AAw.s.4..y.
00001120: 0650 4096 968a 415e 7284 4a3d ac21 0a6c  .P@...A^r.J=.!.l
00001130: 6bf4 e7d7 c4c6 8c64 b37c e215 c606 18cb  k......d.|......
00001140: fb33 00ba eecd 8916 cfb3 eb5a 12a9 d6b2  .3.........Z....
00001150: 4e49 38da 0ec2 8ef0 9b8e fb75 b1e3 95a4  NI8........u....
00001160: d021 5825 378c 14a3 aec7 3cff 4d5a be14  .!X%7.....<.MZ..
00001170: a320 c0ee f7b8 9d81 15e3 6a11 700c 08c2  . ........j.p...
00001180: ffbe e477 ce41 ad28 373d 5d34 0f60 186d  ...w.A.(7=]4.`.m
00001190: 8f42 bca5 e8c7 a388 0e09 ba13 7d1c b90b  .B..........}...
000011a0: a5cf f39c 1d1d 0b5e 3176 e7ba 4136 f3df  .......^1v..A6..
000011b0: 963b 6aad 0061 19c7 ae44 015a 6ee4 56bc  .;j..a...D.Zn.V.
000011c0: 9dbe 394f 5c16 27b0 7b9d 983d 5133 8403  ..9O\.'.{..=Q3..
000011d0: bf01 fec3 e2f6 20af ab4e 1cda 0d42 1a8e  ...... ..N...B..
000011e0: 242d 1603 0300 040e 0000 00              $-.........

I tried to send this thru mitmproxy but it only says Cannot validate certificate hostname without SNI. Which I presume means something in regards to certificate pinning.

Any ideas on further reversing this encrypted (SSL?) connection?

Edit: added xxd binary instead of copy/paste garbage as commented below.

1
  • You can't decrypt an ssl connection or ease drop. – marshal craft Jan 25 '17 at 3:52
1

This isn't a complete answer but I don't have enough rep to comment yet.

First off, giving us binary data with all the non-printable characters presented as ? doesn't help. Try piping it through xxd (like nc -l 8883 | xxd) to get a hex dump which would be far more useful.

When you ran mitmproxy were you using the real device? This is unclear from your question. The error message suggests the client is only using an IP to connect which doesn't make sense due to the fact you know it connects to lutron.broker.xively.com. Maybe your fakedns server is still running? You want to do this with the real device on one side and the internet on the other (i.e device -> mitmproxy -> internet)

mitmproxy won't work out of the box either otherwise TLS would be useless. You need to install mitmproxy's certificate authority cert on your iOS device which will allow mitmproxy to create valid certificates.

Your right though about the fact there could be certificate pinning. I'm not up to date on the current iOS certificate pinning bypass but a quick Google suggests the old method of:

  1. Jailbreaking your iOS device
  2. Installing Cydia Substrate
  3. Then installing ssl-kill-switch2 and enabling it

will work just fine.

EDIT: Thanks for re-doing it as a hex dump. What it sends to your server is a ClientHello and mitmproxy is right there is no SNI information which means it can't verify that the actual server is the right one. If your not worried about someone else mitm your connection you can run mitmproxy --insecure to get around this safety check.

0

It's MQTT over SSL. The Lua code of the plugin attached to the top post in this thread shows how to interact with the server (and also includes an SSH key you can use to talk to the Smart Bridge locally via MQTT).

http://forum.micasaverde.com/index.php/topic,35577.0.html?PHPSESSID=a6grs6ohq5ufv1v9shuo64l7o0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.