[PICOCTF](FORENSICS)Connect The Wigle


简介 :

Connect The Wigle
  Identify the data contained within wigle and determine how to visualize it. 
  Update 16:26 EST 1 Apr If you feel that you are close, 
  make a private piazza post with what you have, and an admin will help out.
Downlaod : 
  [wigle](https://webshell2017.picoctf.com/static/9a447c975a6c373583ba6d3dd4527412/wigle) 
HINTS
  1. Perhaps they've been storing data in a database. How do we access the information?
  2. How can we visualize this data? Maybe we just need to take a step back to get the big picture?
  3. Try zero in the first word of the flag, if you think it's an O.
  4. If you think you're super close, make a private piazza post with what you think it is.

分析 :

  1. 首先 file 查看文件类型 :


    Paste_Image.png

    Sqlite 数据库文件

  2. 既然是数据库文件当然就要看看里面有什么东西了
1. Kali下面可以使用 sqlitebrowser 进行可视化查看数据库文件
2. sqlite3 ./wigle
3. 任何你熟悉的 sqlite 客户端
Paste_Image.png
Paste_Image.png

查看数据可以发现 , 该表存在 lat 和 lon 字段
既然是经纬度就画出来看看是什么咯
之前看到经纬度然后去谷歌地图查找 , 发现所有的点都在太平洋 ... 诡异 ,
最后看到 hint 中的可视化数据才想到将坐标点画出来
下面给出一个绘制点的脚本 , 其实绘制散点的函数很简单 , 以后要是有什么考脑洞的或者什么取证分析的题应该就可以直接拿来用 , 而且 python 的 matplotlib 画出来的并不是一个照片 , 而是可以拖动缩放的窗口 , 这个特别有用


利用脚本 :

#!/usr/bin/env python

import sqlite3
import numpy as np
import matplotlib.pyplot as plt


def draw(X, Y):
    fig = plt.figure()
    ax1 = fig.add_subplot(111)
    ax1.scatter(X, Y, c='r', marker='o')
    plt.show()

def execSQL(sql):
    cx = sqlite3.connect("./wigle")
    cu=cx.cursor()
    cu.execute(sql)
    data = cu.fetchall()
    return data


def main():
    data = execSQL("select lat, lon from location")
    X = []
    Y = []
    for i in data:
        X.append(i[1])
        Y.append(i[0])
    draw(X, Y)


if __name__ == "__main__":
    main()

效果 :

Paste_Image.png

进行一些调整 :

Paste_Image.png
Paste_Image.png
Paste_Image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1.dSYM你是如何分析的? 2.多线程有哪几种?你更倾向于哪一种? 3.单例弊端? 4.如何把异步线程转换成同步...
    xiaon阅读 5,411评论 0 2
  • Matplotlib 入门教程 来源:Introduction to Matplotlib and basic l...
    布客飞龙阅读 31,974评论 5 162
  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 175,445评论 25 709
  • 4年半了,毫无征兆、无可救药的喜欢上一个性格直爽的女汉子! 感情上我曾经是一个逃兵,不希望再逃避,要勇敢坚持下去!...
    Dboy911阅读 2,675评论 0 0
  • 小栗旬主演的《银魂》刚一上映就被观众打出8.4分的高分值,啊啊啊啊啊啊啊啊让我期待了一年的“真人版,惟一的第一部且...
    圣茜儿阅读 3,118评论 0 2