Maltrail恶意流量检测系统

2023-11-07

项目介绍

maltrail是一款轻量级的恶意流量检测系统,其工作原理是通过采集网络中各个开源黑样本(包括IP、域名、URL),在待检测目标机器上捕获流量并进行恶意流量匹配,匹配成功则在其web页面上展示命中的恶意流量。

项目GitHub地址

https://github.com/stamparm/maltrail

项目架构

maltrail系统架构
系统采用 流量–>传感器<–>服务端<–>客户端 的架构方式
传感器:负责采集网络流量,更新恶意样本,并进行匹配检测
服务端:提供web界面以及收集网络中的恶意样本流量
客户端:访问和检索恶意流量信息

项目数据集

maltrail项目收集的黑名单列表分为两大类:

  1. 内置静态列表(从各种恶意软件报告、学生论文以及个人研究文档中获取的恶意样本),包含以下恶意软件实体:

aboc, adylkuzz, agaadex, alienspy, almalocker, alureon, android_acecard,
android_adrd, android_alienspy, android_arspam, android_backflash,
android_basebridge, android_boxer, android_chuli, android_claco,
android_coolreaper, android_counterclank, android_cyberwurx,
android_dendoroid, android_dougalek, android_droidjack,
android_droidkungfu, android_enesoluty, android_ewalls, android_ewind,
android_exprespam, android_fakebanco, android_fakedown, android_fakeinst,
android_fakelog, android_fakemart, android_fakemrat, android_fakeneflic,
android_fakesecsuit, android_feabme, android_flexispy, android_frogonal,
android_geinimi, android_ghostpush, android_ginmaster, android_gmaster,
android_godwon, android_golddream, android_gonesixty, android_ibanking,
android_kemoge, android_lockdroid, android_lovetrap, android_maistealer,
android_maxit, android_oneclickfraud, android_opfake,
android_ozotshielder, android_pikspam, android_pjapps, android_qdplugin,
android_repane, android_roidsec, android_samsapo, android_sandorat,
android_selfmite, android_simplocker, android_skullkey, android_sndapps,
android_spytekcell, android_stealer, android_stels, android_teelog,
android_tetus, android_tonclank, android_torec, android_uracto,
android_usbcleaver, android_walkinwat, android_windseeker, android_wirex,
android_xavirad, android_zertsecurity, andromem, androm, angler, anuna,
apt_adwind, apt_aridviper, apt_babar, apt_bisonal, apt_blackenergy,
apt_blackvine, apt_bookworm, apt_carbanak, apt_careto, apt_casper,
apt_chches, apt_cleaver, apt_copykittens, apt_cosmicduke, apt_darkhotel,
apt_darkhydrus, apt_desertfalcon, apt_dragonok, apt_dukes,
apt_equationgroup, apt_fin4, apt_finfisher, apt_gamaredon, apt_gaza,
apt_gref, apt_groundbait, apt_htran, apt_ke3chang, apt_lazarus,
apt_lotusblossom, apt_magichound, apt_menupass, apt_miniduke, apt_naikon,
apt_nettraveler, apt_newsbeef, apt_oceanlotus, apt_pegasus, apt_potao,
apt_quasar, apt_redoctober, apt_russiandoll, apt_sauron, apt_scarletmimic,
apt_scieron, apt_shamoon, apt_snake, apt_snowman, apt_sobaken, apt_sofacy,
apt_stealthfalcon, apt_stonedrill, apt_stuxnet, apt_tibet, apt_turla,
apt_tvrms, apt_volatilecedar, apt_waterbug, apt_weakestlink, apt_xagent,
arec, artro, autoit, avalanche, avrecon, axpergle, azorult, bachosens,
badblock, balamid, bamital, bankapol, bankpatch, banloa, banprox, bayrob,
bedep, blackshades, blockbuster, bredolab, bubnix, bucriv, buterat,
calfbot, camerashy, carbanak, carberp, cerber, changeup, chanitor, chekua,
cheshire, chewbacca, chisbur, cloudatlas, cobalt, conficker, contopee,
corebot, couponarific, criakl, cridex, crilock, cryakl, cryptinfinite,
cryptodefense, cryptolocker, cryptowall, ctblocker, cutwail, defru,
destory, dircrypt, dmalocker, dnsbirthday, dnschanger, dnsmessenger,
dnstrojan, dorifel, dorkbot, dragonok, drapion, dridex, dropnak, dursg,
dyreza, elf_aidra, elf_billgates, elf_darlloz, elf_ekoms, elf_groundhog,
elf_hacked_mint, elf_mayhem, elf_mokes, elf_pinscan, elf_rekoobe,
elf_shelldos, elf_slexec, elf_sshscan, elf_themoon, elf_turla, elf_xnote,
elf_xorddos, elpman, emogen, emotet, evilbunny, expiro, fakben, fakeav,
fakeran, fantom, fareit, fbi_ransomware, fiexp, fignotok, filespider,
findpos, fireball, fraudload, fynloski, fysna, gamarue, gandcrab, gauss,
gbot, generic, glupteba, goldfin, golroted, gozi, hacking_team, harnig,
hawkeye, helompy, hiloti, hinired, immortal, injecto, invisimole,
ios_keyraider, ios_muda, ios_oneclickfraud, ios_specter, ios_xcodeghost,
iron, ismdoor, jenxcus, kegotip, kingslayer, kolab, koobface, korgo,
korplug, kovter, kradellsh, kronos, kulekmoko, locky, lollipop, luckycat,
majikpos, malwaremustdie.org.csv, marsjoke, matsnu, mdrop, mebroot,
mestep, misogow, miuref, modpos, morto, nanocor, nbot, necurs, nemeot,
neshuta, netwire, neurevt, nexlogger, nigelthorn, nivdort, njrat,
nonbolqu, notpetya, nuclear, nuqel, nwt, nymaim, odcodc, oficla, onkods,
optima, osx_keranger, osx_keydnap, osx_mami, osx_mughthesec, osx_salgorea,
osx_wirelurker, padcrypt, palevo, parasite, paycrypt, pdfjsc, pepperat,
pghost, phytob, picgoo, pift, plagent, plugx, ponmocup, poshcoder,
powelike, proslikefan, pushdo, pykspa, qakbot, rajump, ramnit, ransirac,
reactorbot, redsip, remcos, renocide, reveton, revetrat, rincux, rovnix,
runforestrun, rustock, sage, sakurel, sality, satana, sathurbot, satori,
scarcruft, seaduke, sefnit, selfdel, shifu, shimrat, shylock, siesta,
silentbrute, silly, simda, sinkhole_abuse, sinkhole_anubis,
sinkhole_arbor, sinkhole_bitdefender, sinkhole_blacklab,
sinkhole_botnethunter, sinkhole_certgovau, sinkhole_certpl,
sinkhole_checkpoint, sinkhole_cirtdk, sinkhole_conficker,
sinkhole_cryptolocker, sinkhole_drweb, sinkhole_dynadot, sinkhole_dyre,
sinkhole_farsight, sinkhole_fbizeus, sinkhole_fitsec, sinkhole_fnord,
sinkhole_gameoverzeus, sinkhole_georgiatech, sinkhole_gladtech,
sinkhole_honeybot, sinkhole_kaspersky, sinkhole_microsoft, sinkhole_rsa,
sinkhole_secureworks, sinkhole_shadowserver, sinkhole_sidnlabs,
sinkhole_sinkdns, sinkhole_sugarbucket, sinkhole_supportintel,
sinkhole_tech, sinkhole_tsway, sinkhole_unknown, sinkhole_virustracker,
sinkhole_wapacklabs, sinkhole_xaayda, sinkhole_yourtrap,
sinkhole_zinkhole, skeeyah, skynet, skyper, smokeloader, smsfakesky,
snifula, snort.org.csv, sockrat, sohanad, spyeye, stabuniq, synolocker,
tdss, teamspy, teerac, teslacrypt, themida, tinba, torpig, torrentlocker,
troldesh, tupym, unruy, upatre, utoti, vawtrak, vbcheman, vinderuf,
virtum, virut, vittalia, vobfus, vundo, waledac, wannacry, waprox, wecorl,
wecoym, wndred, xadupi, xpay, xtrat, yenibot, yimfoca, zaletelly, zcrypt,
zemot, zeroaccess, zeus, zherotee, zlader, zlob, zombrari, zxshell,
zyklon, etc.

  1. 实时订阅源(从各种开源黑样本网站上下载的恶意样本),包含以下恶意样本数据源:

360chinad, 360conficker, 360cryptolocker, 360gameover, 360locky,
360necurs, 360tofsee, 360virut, alienvault, atmos, badips,
bambenekconsultingc2dns, bambenekconsultingc2ip, bambenekconsultingdga,
bitcoinnodes, blackbook, blocklist, botscout, bruteforceblocker, ciarmy,
cruzit, cybercrimetracker, dataplane, dshielddns, dshieldip, emergingthreatsbot,
emergingthreatscip, emergingthreatsdns, feodotrackerdns, feodotrackerip,
greensnow, loki, malc0de, malwaredomainlistdns, malwaredomainlistip,
malwaredomains, malwarepatrol, maxmind, myip, nothink, openphish,
palevotracker, policeman, pony, proxylists, proxyrss, proxyspy,
ransomwaretrackerdns, ransomwaretrackerip, ransomwaretrackerurl,
riproxies, rutgers, sblam, socksproxy, sslipbl, sslproxies,
talosintelligence, torproject, torstatus, turris, urlvir, voipbl, vxvault,
zeustrackerdns, zeustrackerip, zeustrackermonitor, zeustrackerurl, etc.

运行方式

  1. 下载及安装Maltrail(由于需要抓取pcap包,所以先安装其依赖模块python-pcapy)

sudo apt-get install git python-pcapy
git clone https://github.com/stamparm/maltrail.git

  1. 启动Sensor,进行流量采集及恶意样本检测

cd maltrail
sudo python sensor.py

第一次启动会自动下载网络上的样本集,并在~/.Maltrail/中生成trails.csv、ipcat.csv、ipcat.sqlite文件
启动sensor输出

  1. 启动Server,运行Web服务器

cd maltrail
python server.py

启动成功后即可访问http://0.0.0.0:8338/,登录Web服务器,登录默认账号密码 admin:changeme!
启动server输出

订阅源扩展

Maltrail订阅网络上的各种恶意样本网站,其所有采集程序存储在$MALTRAIL_HOME/trails/feeds目录中。
采集目录
用订阅源360chinad.py程序举例,代码如下

	#!/usr/bin/env python

"""
Copyright (c) 2014-2019 Maltrail developers (https://github.com/stamparm/maltrail/)
See the file 'LICENSE' for copying permission
"""

import re

from core.common import retrieve_content

__url__ = "https://data.netlab.360.com/feeds/dga/chinad.txt"
__check__ = "netlab 360"
__info__ = "chinad dga (malware)"
__reference__ = "360.com"

def fetch():
    retval = {}
    content = retrieve_content(__url__)

    if __check__ in content:
        for match in re.finditer(r"(?m)^([\w.]+)\s+2\d{3}\-", content):
            retval[match.group(1)] = (__info__, __reference__)

    return retval

__url__  待订阅的网站
__check__ 内容匹配字符串
__info__ 样本信息
__reference__ 网站域名

  fetch()为数据采集的方法

  content = retrieve_cotent(__url__)通过urllib获取网站恶意样本内容

  if __check__ in content使用内容匹配字符串来验证网站内容,若匹配失败则放弃订阅

  retval为字典对象,其中key为样本主键,例如IP、URL、域名。value则是元组(样本信息,网站域名)

当我们需要添加自定义订阅源时,只需要按上述格式,类似于Java继承的方式,实现fetch()方法,并返回retval,将程序放入$MALTRAIL_HOME/trails/feeds目录中,在每天更新trails.csv文件时则会将自定义的恶意样数据添加进去。

数据采集模块提取

Maltrail最有价值的地方不在于检测和展示,而是对IOC的收集利用,建立一套成熟的OpenIOC机制。

Maltrail数据抽取入口在$MALTRAIL_HOME/core/update.py中。

主要关注update.py中的 update_trails()方法,代码如下:

def update_trails(server=None, force=False, offline=False):
    """
    Update trails from feeds
    """

    success = False
    trails = {}
    duplicates = {}

    try:
        if not os.path.isdir(USERS_DIR):
            os.makedirs(USERS_DIR, 0755)
    except Exception, ex:
        exit("[!] something went wrong during creation of directory '%s' ('%s')" % (USERS_DIR, ex))

    _chown(USERS_DIR)

    if server:
        print "[i] retrieving trails from provided 'UPDATE_SERVER' server..."
        content = retrieve_content(server)
        if not content:
            exit("[!] unable to retrieve data from '%s'" % server)
        else:
            with _fopen(TRAILS_FILE, "w+b") as f:
                f.write(content)
            trails = load_trails()

    trail_files = set()
    for dirpath, dirnames, filenames in os.walk(os.path.abspath(os.path.join(ROOT_DIR, "trails"))) :
        for filename in filenames:
            trail_files.add(os.path.abspath(os.path.join(dirpath, filename)))

    if config.CUSTOM_TRAILS_DIR:
        for dirpath, dirnames, filenames in os.walk(os.path.abspath(os.path.join(ROOT_DIR, os.path.expanduser(config.CUSTOM_TRAILS_DIR)))) :
            for filename in filenames:
                trail_files.add(os.path.abspath(os.path.join(dirpath, filename)))

    if not trails and (force or not os.path.isfile(TRAILS_FILE) or (time.time() - os.stat(TRAILS_FILE).st_mtime) >= config.UPDATE_PERIOD or os.stat(TRAILS_FILE).st_size == 0 or any(os.stat(_).st_mtime > os.stat(TRAILS_FILE).st_mtime for _ in trail_files)):
        print "[i] updating trails (this might take a while)..."

        if not offline and (force or config.USE_FEED_UPDATES):
            _ = os.path.abspath(os.path.join(ROOT_DIR, "trails", "feeds"))
            if _ not in sys.path:
                sys.path.append(_)

            filenames = sorted(glob.glob(os.path.join(_, "*.py")))
        else:
            filenames = []

        _ = os.path.abspath(os.path.join(ROOT_DIR, "trails"))
        if _ not in sys.path:
            sys.path.append(_)

        filenames += [os.path.join(_, "static")]
        filenames += [os.path.join(_, "custom")]

        filenames = [_ for _ in filenames if "__init__.py" not in _]

        if config.DISABLED_FEEDS:
            filenames = [filename for filename in filenames if os.path.splitext(os.path.split(filename)[-1])[0] not in re.split(r"[^\w]+", config.DISABLED_FEEDS)]

        for i in xrange(len(filenames)):
            filename = filenames[i]

            try:
                module = __import__(os.path.basename(filename).split(".py")[0])
            except (ImportError, SyntaxError), ex:
                print "[x] something went wrong during import of feed file '%s' ('%s')" % (filename, ex)
                continue

            for name, function in inspect.getmembers(module, inspect.isfunction):
                if name == "fetch":
                    print(" [o] '%s'%s" % (module.__url__, " " * 20 if len(module.__url__) < 20 else ""))
                    sys.stdout.write("[?] progress: %d/%d (%d%%)\r" % (i, len(filenames), i * 100 / len(filenames)))
                    sys.stdout.flush()

                    if config.DISABLED_TRAILS_INFO_REGEX and re.search(config.DISABLED_TRAILS_INFO_REGEX, getattr(module, "__info__", "")):
                        continue

                    try:
                        results = function()
                        for item in results.items():
                            if item[0].startswith("www.") and '/' not in item[0]:
                                item = [item[0][len("www."):], item[1]]
                            if item[0] in trails:
                                if item[0] not in duplicates:
                                    duplicates[item[0]] = set((trails[item[0]][1],))
                                duplicates[item[0]].add(item[1][1])
                            if not (item[0] in trails and (any(_ in item[1][0] for _ in LOW_PRIORITY_INFO_KEYWORDS) or trails[item[0]][1] in HIGH_PRIORITY_REFERENCES)) or (item[1][1] in HIGH_PRIORITY_REFERENCES and "history" not in item[1][0]) or any(_ in item[1][0] for _ in HIGH_PRIORITY_INFO_KEYWORDS):
                                trails[item[0]] = item[1]
                        if not results and "abuse.ch" not in module.__url__:
                            print "[x] something went wrong during remote data retrieval ('%s')" % module.__url__
                    except Exception, ex:
                        print "[x] something went wrong during processing of feed file '%s' ('%s')" % (filename, ex)

            try:
                sys.modules.pop(module.__name__)
                del module
            except Exception:
                pass

        # custom trails from remote location
        if config.CUSTOM_TRAILS_URL:
            print(" [o] '(remote custom)'%s" % (" " * 20))
            for url in re.split(r"[;,]", config.CUSTOM_TRAILS_URL):
                url = url.strip()
                if not url:
                    continue

                url = ("http://%s" % url) if not "//" in url else url
                content = retrieve_content(url)

                if not content:
                    print "[x] unable to retrieve data (or empty response) from '%s'" % url
                else:
                    __info__ = "blacklisted"
                    __reference__ = "(remote custom)"  # urlparse.urlsplit(url).netloc
                    for line in content.split('\n'):
                        line = line.strip()
                        if not line or line.startswith('#'):
                            continue
                        line = re.sub(r"\s*#.*", "", line)
                        if '://' in line:
                            line = re.search(r"://(.*)", line).group(1)
                        line = line.rstrip('/')

                        if line in trails and any(_ in trails[line][1] for _ in ("custom", "static")):
                            continue

                        if '/' in line:
                            trails[line] = (__info__, __reference__)
                            line = line.split('/')[0]
                        elif re.search(r"\A\d+\.\d+\.\d+\.\d+\Z", line):
                            trails[line] = (__info__, __reference__)
                        else:
                            trails[line.strip('.')] = (__info__, __reference__)

                    for match in re.finditer(r"(\d+\.\d+\.\d+\.\d+)/(\d+)", content):
                        prefix, mask = match.groups()
                        mask = int(mask)
                        if mask > 32:
                            continue
                        start_int = addr_to_int(prefix) & make_mask(mask)
                        end_int = start_int | ((1 << 32 - mask) - 1)
                        if 0 <= end_int - start_int <= 1024:
                            address = start_int
                            while start_int <= address <= end_int:
                                trails[int_to_addr(address)] = (__info__, __reference__)
                                address += 1

        # basic cleanup
        for key in trails.keys():
            if key not in trails:
                continue
            if config.DISABLED_TRAILS_INFO_REGEX:
                if re.search(config.DISABLED_TRAILS_INFO_REGEX, trails[key][0]):
                    del trails[key]
                    continue
            if not key or re.search(r"\A(?i)\.?[a-z]+\Z", key) and not any(_ in trails[key][1] for _ in ("custom", "static")):
                del trails[key]
                continue
            if re.search(r"\A\d+\.\d+\.\d+\.\d+\Z", key):
                if any(_ in trails[key][0] for _ in ("parking site", "sinkhole")) and key in duplicates:
                    del duplicates[key]
                if trails[key][0] == "malware":
                    trails[key] = ("potential malware site", trails[key][1])
            if trails[key][0] == "ransomware":
                trails[key] = ("ransomware (malware)", trails[key][1])
            if key.startswith("www.") and '/' not in key:
                _ = trails[key]
                del trails[key]
                key = key[len("www."):]
                if key:
                    trails[key] = _
            if '?' in key:
                _ = trails[key]
                del trails[key]
                key = key.split('?')[0]
                if key:
                    trails[key] = _
            if '//' in key:
                _ = trails[key]
                del trails[key]
                key = key.replace('//', '/')
                trails[key] = _
            if key != key.lower():
                _ = trails[key]
                del trails[key]
                key = key.lower()
                trails[key] = _
            if key in duplicates:
                _ = trails[key]
                others = sorted(duplicates[key] - set((_[1],)))
                if others and " (+" not in _[1]:
                    trails[key] = (_[0], "%s (+%s)" % (_[1], ','.join(others)))

        read_whitelist()

        for key in trails.keys():
            if check_whitelisted(key) or any(key.startswith(_) for _ in BAD_TRAIL_PREFIXES):
                del trails[key]
            elif re.search(r"\A\d+\.\d+\.\d+\.\d+\Z", key) and (bogon_ip(key) or cdn_ip(key)):
                del trails[key]
            else:
                try:
                    key.decode("utf8")
                    trails[key][0].decode("utf8")
                    trails[key][1].decode("utf8")
                except UnicodeDecodeError:
                    del trails[key]

        try:
            if trails:
                with _fopen(TRAILS_FILE, "w+b") as f:
                    writer = csv.writer(f, delimiter=',', quotechar='\"', quoting=csv.QUOTE_MINIMAL)
                    for trail in trails:
                        writer.writerow((trail, trails[trail][0], trails[trail][1]))

                success = True
        except Exception, ex:
            print "[x] something went wrong during trails file write '%s' ('%s')" % (TRAILS_FILE, ex)

        print "[i] update finished%s" % (40 * " ")

        if success:
            print "[i] trails stored to '%s'" % TRAILS_FILE

    return trails

update_trails(server=None, force=False, offline=False)该方法用于更新所有订阅源,并生成trails.csv文件
server 默认为None,输入为网络中的开源样本集url地址,则会将该url中的数据更新到trails.csv文件
force 默认为False,当设为True时,则更新全量恶意样本的数据(即内置静态列表和实时订阅源)到trails.csv文件中
offline 默认为False,当设为True时,进行离线更新,将内置静态列表更新到trails.csv文件中

  有兴趣的朋友可将该方法剥离出来,采集网络上开源的恶意样本数据,建立自己的IOC库。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Maltrail恶意流量检测系统 的相关文章

  • @【 ENVI】“应用程序无法正常启动0x0000007b”问题

    ENVI 应用程序无法正常启动0x0000007b 问题 ENVI5 3 百度网盘 链接 https pan baidu com s 1P1nI9fKEGeNbSsMt9D3mMA 提取码 zely 记得安装目录里面不能有中文 idlrt
  • 无线鼠标计算机不识别,教你笔记本电脑检测不到无线鼠标如何解决

    无线鼠标由于没有线的牵绊 受到很多网友的喜爱 特别是笔记本电脑用户 不过最近有网友说自己的笔记本电脑检测不到无线鼠标怎么办 无线鼠标失灵了 其实这个是很常见的问题 造成的原因也比较多样 下面小编就给大家分享下笔记本电脑识别不了无线鼠标的解决
  • 从零开始学nginx

    1 nginx简介 nginx 发音同engine x 是一款轻量级的Web服务器 反向代理服务器及电子邮件 IMAP POP3 代理服务器 并在一个BSD like协议下发行 nginx由俄罗斯的程序设计师Igor Sysoev所开发 最
  • Ubuntu下如何用命令行运行deb安装包

    如果ubuntu要安装新软件 已有deb安装包 例如 iptux deb 但是无法登录到桌面环境 那该怎么安装 答案是 使用dpkg命令 dpkg命令常用格式如下 sudo dpkg I iptux deb 查看iptux deb软件包的详
  • 有序充电运营管理平台是基于物联网和大数据技术的充电设施管理系统-安科瑞黄安南

    随着我国能源战略发展以及低碳行动的实施 电动汽车已逐步广泛应用 而电动汽车的应用非常符合当今社会对环保意识的要求 以及有效节省化石燃料的消耗 由于其没有污染排放的优点以及政府部门的关注 电动汽车将成为以后出行的重要交通工具 由于大批的电车作
  • openssl AES加密、解密示例代码

    openssl AES加密 解密 关于加密解密后长度的说明 AES 高级加密标准 是一种对称加密算法 它使用相同的密钥进行加密和解密操作 无论是加密还是解密 输入和输出的字节数保持一致 AES算法操作的数据以字节为单位 输入数据被分成16字
  • TensorFlow是什么

    TensorFlow是一个开源的深度学习框架 由Google开发 用于构建和训练神经网络 它提供了一种简单而灵活的方法来构建各种类型的机器学习模型 包括卷积神经网络 循环神经网络 深度神经网络等 TensorFlow使用图和张量的概念来描述
  • Mysql免安装版的root密码是多少

    免安装版的Mysql在初始化后root是没有密码的 1 下载免安装版Mysql 下载链接 MySQL Download MySQL Community Server 下载后解压 里面的目录是这样的 2 添加配置文件和系统环境 在系统变量中添
  • redis bitmap实现签到(包含工具类)

    很多应用比如签到送积分 签到领取奖励 签到 1 天送 10 积分 连续签到 2 天送 20 积分 3 天送 30 积分 4 天以上均送 50 积分等 如果连续签到中断 则重置计数 每月初重置计数 显示用户某个月的签到次数 在日历控件上展示用
  • Spring 基础--第一个spring项目及IOC

    一 第一个spring项目 1 导入Jar包
  • 准备写本书

    立个flag 写本书 关于数字IC物理设计 为了避免半途而废 本人在此立下flag 今天起 两年为期 写一本关于数字IC物理设计的书 初步想法 利用公众号专辑功能 先从小章节写起 然后汇聚成册 请大家监督 本来年初就想写 但是迟迟没下定决心
  • 服务器被爬虫恶意攻击怎么办?

    在有预算的情况可以采购第三方服务防火墙 没钱就使用开源的WAF进行防护 WAF防火墙的基本防护原理 WAF Web 应用防火墙 可以使用多种技术来防止恶意爬虫攻击 例如 1 黑名单 WAF 可以使用黑名单技术来过滤恶意爬虫的请求 黑名单中包
  • 【机器学习】TF-IDF以及TfidfVectorizer

    TF IDF定义 TF IDF 全称为 词频一逆文档频率 TF 某一给定词语在该文档中出现的频率 T F w 词语 w
  • common-lang包中一些工具类的使用说明

    一 common lang包常用的类有 1 StringUtils类 该类主要提供对字符串的操作 对null是安全的 主要提供了字符串查找 替换 分割 去空白 去掉非法字符等等操作 2 ObjectUtils类 主要是对null进行安全处理
  • vs网站 服务器变量,了解下变量赋值 (值 vs 引用)

    理解 JavaScript 如何给变量赋值可以帮助我们减少一些不必要的 bug 如果你不理解这一点 可能很容易地编写被无意中更改值的代码 JavaScript 总是按照值来给变量赋值 这一部分非常重要 当指定的值是 JavaScript 的
  • Qt的信号和槽是如何工作的

    用Qt做过开发的朋友 不知道是否曾为下面这些问题疑惑过 我们知道Qt是基于C 的 Qt写的代码最终还是要由C 编译器来编译 但是我们的Qt代码中有很多C 里没有的关键字 比如slots signals Q OBJECT等 为什么C 编译器会
  • mpvue页面卸载数据不清空

    mpvue有个坑页面卸载了 在小程序层面上是销毁了 但是vue层面页面的实例还在 为了实现再次进入清除数据的效果 可以试一下这个折中的办法 在onload里面清除一下实例中的数据 onLoad e Object assign this th
  • Leaflet使用wfs的示例

    Leaflet是一个开源的Web地图库 可以用来在网站上显示地图 可以使用Leaflet的功能扩展 Leaflet WFS 来在Leaflet地图中使用WFS Web Feature Service 功能 以下是使用Leaflet和Leaf
  • java是值传递还是引用传递

    文章目录 1 前言 2 java是值传递还是引用传递 1 前言 java是值传递 值传递是指在调用方法时将实际参数拷贝一份传递到方法中 这样在方法中如果对参数进行修改 将不会影响到实际参数 当传的是基本类型时 传的是值的拷贝 对拷贝变量的修

随机推荐

  • 内存溢出(out of memory)和内存泄露(memory leak)的区别和检测工具方法

    内存溢出 out of memory 是指程序在申请内存时 没有足够的内存空间供其使用 出现out of memory 比如申请了一个integer 但给它存了long才能存下的数 那就是内存溢出 内存泄露 memory leak 是指程序
  • 如何快速使用上C++11

    最近的几个项目都是用C 11写的 越用越觉得强大 很多的新特征也希望Java能整合进去就好了 打算改天有空也写个C 11的使用心得 无奈C 太博大精深 还有好几个很赞的功能还没掌握 现在试着在本机Ubuntu上使用C 11 找了好几种方法
  • 喜讯

    近日 中国信息通信研究院 以下简称 中国信通院 主办的首届 SecGo云和软件安全大会 成功举办 会上重磅揭晓了 安全守卫者计划 零信任 优秀案例征集活动结果 深圳市智安网络有限公司与大庆油田信息技术公司联合申报的零信任项目 凭借为企业提供
  • row_number() over partition by 分组聚合

    row number over partition by 分组聚合 分组聚合 就是先分组再排序 可以的话顺手标个排名 如果不想分组也可以排名 如果不想分组同时再去重排名也可以 ROW NUMBER OVER PARTITION BY col
  • Vue获得指定id的html,vue.js怎么删除指定id的数据

    本文环境 windows7 vue2 9 6 该方法适用于所有品牌的电脑 vue js删除指定id数据的方法 注意click需要传入当前的id值deletes function id this http delete http jsonpl
  • 认识sass

    一 认识sass SASS Syntactically Awesome Stylesheet 是一个CSS预处理器 有助于减少CSS的重复 节省时间 它是更稳定和强大的CSS扩展语言 描述文档的样式干净和结构 扩展了 CSS3 增加了规则
  • Java面向对象基础

    面向对象 学习内容 l 面向对象思想 l 类与对象及其使用 l 对象的内存图 l 成员变量和局部变量的区别 l 匿名对象 l 封装 private l this关键字 l 构造方法 l static关键字 l 继承 l 多态 l 抽象类 l
  • AVR单片机最小系统 基本硬件线路与分析

    AVR单片机最小系统 基本硬件线路与分析 AVR仿真器 AVR编程器 二合一 AVR JTAG与ISP 二合一V2 5 经典推荐 298 00元 富士通 MB90092 DEMO OSD视频字符叠加开发板 380 00元 国产 AVR JT
  • Wireshark使用技巧

    前言 Wireshark是一款图形界面的网络嗅探器 支持多种平台 是网络流量分析的利器 它的创始人是Gerald Combs 前身是Ethereal 作为开源项目经过众多开发者的完善它已经成为使用量最大的安全工具之一 最近刚把 Wiresh
  • 翰文进度计划软件横道图不显示文字_斑马进度计划2019,编制进度计划仅需8步!请收藏...

    斑马进度计划2019新功能简介 大突破 从此双代号网络计划支持父子结构啦 计划分分钟逐级拆解细化 前锋线也能自下而上反馈进度 进行多级管控里程碑预警啦 还有大家最心心念的TPM 全面计划管理 设计 招采 施工以及各专业全面联动计算 从此 项
  • 使用Crash工具分析 Linux dump文件

    前言 Linux 内核 以下简称内核 是一个不与特定进程相关的功能集合 内核的代码很难轻易的在调试器中执行和跟踪 开发者认为 内核如果发生了错误 就不应该继续运 行 因此内核发生错误时 它的行为通常被设定为系统崩溃 机器重启 基于动态存储器
  • 软件测试行业就业前景到底怎么样?

    软件测试就业前景非常好 目前IT行业对于软件测试方面的人才需求是非常大的 软件产品的质量对于一个软件来说是攸关生死的 各企业越来越重视软件产品质量 而软件测试的工作就是让软件质量越来越好 还有就是软件测试的工资待遇是非常好的 和其它职业相比
  • 《数据库系统概论》课程学习(26)——习题集(第1-14章)含答案

    数据库系统概论习题集 第一章 绪论 一 选择题 1 DBS是采用了数据库技术的计算机系统 DBS是一个集合体 包含数据库 计算机硬件 软件和 A 系统分析员 B 程序员 C 数据库管理员 D 操作员 2 数据库 DB 数据库系统 DBS 和
  • ssm框架整合(项目步骤)

    目录 一 前言 二 SSM框架 2 1 SSM整合到底整合什么 2 2 为什么要整合到一起 2 3 由谁来整合 2 4 ResponseBody注解的作用是什么 2 5 JSON 三 各框架应用场景 3 1 SpringMVC框架 3 2
  • 建立单链表并交换表中任意两个元素

    功能 建立单链表并交换表中任意两个元素 time 2017年3月12日15 07 25 include
  • 2021年 IEEE VIS 科学可视化与体渲染论文整理与分析

    因为最近工作的关系 需要研究一下IEEE VIS中2017年以后的与我之前主要方向 体渲染 医学可视化 有关的论文 我把这些年全部的论文进行了筛选和梳理 总共筛选出57篇论文 打算写一个文章来记录这些内容 这个栏目是2021年的九篇论文的介
  • MNIST数据库介绍及转换

    MNIST数据库介绍 MNIST是一个手写数字数据库 它有60000个训练样本集和10000个测试样本集 它是NIST数据库的一个子集 MNIST数据库官方网址为 http yann lecun com exdb mnist 也可以在win
  • springMVC ResponseBody 返回汉字乱码解决方案

    本文查考借鉴 http blog yimik com archives 899 js里通过ajax调用springmvc 后台返回的中文字符串乱码 通过搜索找解决方 大都让配置StringHttpMessageConverter这个bean
  • 本地JAR打镜像,并启动

    1 准备好jar 和Dockerfile文件 2 使用命令打镜像 docker build t wstest 3 查看镜像 4 由于服务是两个端口 使用以下命令 5 优化怎么随着docker的开启而启动 docker run restart
  • Maltrail恶意流量检测系统

    Maltrail恶意流量检测系统 项目介绍 项目GitHub地址 项目架构 项目数据集 运行方式 订阅源扩展 数据采集模块提取 项目介绍 maltrail是一款轻量级的恶意流量检测系统 其工作原理是通过采集网络中各个开源黑样本 包括IP 域