Solución al reto BBVA Contigo, Hack BBVA 2021

Overview

Solution

  • Solución propuesta para el reto BBVA Contigo del Hackathon BBVA 2021. Equipo Mexdapy. Integrantes:
    • David Pedroza Segoviano
    • Regina Priscila Badillo
    • Zaid de Anda Mariscal
    • Gabriel Missael Barco

Descripción

flow

Nuestro proyecto realizará escucha activa por batches diarios o semanales (A definir) de opiniones en Twitter. Se escuchará en 5 regiones geográficas diferentes:

  • España
  • México
  • Perú
  • Argentina
  • Colombia.

Se obtendrán los tweets usando la API de Twitter por medio de Tweepy (Librería de Python) usando consultas con palabras claves de las 4 prioridades estratégicas de BBVA:

  • Mejorar la salud financiera de los clientes.
  • Ayudar a los clientes hacia un futuro sostenible.
  • Crecer en clientes.
  • Buscar la excelentica operativa.

geolisten

Posterior a la recolección por zona y prioridad, se analizarán los Tweets usando modelos pre-entrenados de Natural Lenguaje Processing para identificar clusters (conjuntos) de tweets con temas e ideas similares (similitud semántica). Luego, se realizará análisis de sentimientos, extracción de palabras clave de cada conjunto, esto lo puede ver de manera sintetizada en el flowchart anexado.

Finalmente, utilizando las palabras clave y el sentimiento asociado a cada conjunto, se generará una oración, idealmente en forma de sugerencia, que resuma el contenido del conjunto.

Recursos de apoyo:

Análisis de tweets.

Todo el análisis se usa utilizando Python y múltiples librerías (ver requirements.txt en el repositorio). La representación gráfica del pipeline completo de recolección y análisis de tweets se encuentra en la carpeta de drive, con el nombre de "Solution pipeline.png". El proceso es el siguiente:

  1. Recolectamos tweets usando Tweepy, por zona geográfica en los 5 países de interés. Para esto, se especifica un centro con coordenadas y un radio, tal que se recolectan tweets de dicho circulo (que incluye al país en cuestión y a sus vecinos). Para obtener los tweets, se generan querys diferentes para cada una de las 4 prioridades, y esto se hace con palabras clave relacionadas con dicha prioridad. Por ejemplo, para la prioridad de salud financiera, se buscan palabras clave como "ahorro" e "inversión. Se recolectan un total de 5000 tweets por país y prioridad, obteniendo un total de 20 datasets de 5000 tweets cada uno.
  2. Realizamos clustering dentro de cada uno de estos 20 datasets para obtener los temas de los que se habla, para esto:
    1. Creamos embeddings de los tweets, esto es, pasamos cada tweet a un punto en el espacio. En particular, usamos un modelo pre-entrenado llamado Siamese BERT-Network, distiluse-base-multilingual-cased-v2, que pasa cada tweet a un punto en el espacio de 512 dimensiones. Esto tiene la propiedad de que los puntos cercanos (tweets) hablan de temas similares, y los puntos lejanos de temas diferentes.
    2. Aplicamos una técnica de reducción de dimensionalidad de los datos ya que 512 son demasiadas dimensiones para varias técnicas de clustering (particularmente de la que usamos). Para esto, usamos UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction, un algoritmo de clustering eficiente y que preserva las características de los datos de manera eficiente. Reducimos a 15 dimensiones.
    3. Finalmente, aplicamos un algoritmo de clustering sobre estos puntos para obtener grupos de tweets que hablen de lo mismo y/o de manera similar. Para esto, usamos HDBSCAN: Hierarchical density-based spatial clustering of applications with noise. Este algoritmo determina por si mismo el número de clusters y manda los tweets irrelevantes a ruido (sin cluster asignado.
  3. Una vez con los clusters dentro de cada dataset, tomamos únicamente los que tengan más de 100 tweets, y analizamos cada uno de estos clusters. Hacemos un análisis de sentimientos sobre los tweets y también obtenemos las palabras que mejor representan la información de los clusters.
  4. Finalmente, realizamos varias visualizaciones de los clusters con este análisis y se genera la recomendación.

pipeline

AWS

En una instancia de AWS, se ejecutará primero nuestro scrapper de información de twitter (cuya información se detalla más a profundidad en la sección análisis de tweets, que guardaremos en la misma instancia, para posterior ingreso a el módulo de análisis de tweets. Después, de manera secuencial, se ejecutará un análisis de sentimiento sobre cada cluster, para procesar todos los datos y obtener todos los estadísticos, que se almacenarán en un servicio S3. Estos datos posteriormente se pondrán a disposición de la página web mediante una API, que siempre estará expuesta para que la página web la pueda consumir. Cuando reciba un request, la API cargará los datos de S3, y los cambiará a un formato json para que la página web los pueda consumir.

Página Web

Todos los datos obtenidos y procesados, serán desplegados en una página web, que consumirá la API antes implementada en la instancia de AWS (Ver sección anterior). Esta página contendrá una vista inicial, donde se podrán elegir entre distintos países: España, México, Perú, Argentina, Colombia, (Ver maqueta de página en la carpeta). Por cada país, existirá una página donde se mostrará un Dashboard de los estadísticos, mapas, wordclouds, y demás indicadores que ayuden a la comprensión de los datos procesados.

Esta página está siendo escrita con HTML, CSS y JavaScript puro, por el momento no hay necesidad de utilizar ninguna otra tecnología, se plantea que para el MVP, esta página pueda ser alojada en GitHub Pages.

Owner
Gabriel Missael Barco
Undergraduate physics student 📡 / Python enthusiastic 🐍 / Community member @futurelabmx 🚀 / #SoyUG 🐝
Gabriel Missael Barco
A Python r2pipe script to automatically create a Frida hook to intercept TLS traffic for Flutter based apps

boring-flutter A Python r2pipe script to automatically create a Frida hook to intercept TLS traffic for Flutter based apps. Currently only supporting

Hamza 64 Oct 18, 2022
Cookiecutter for creating open source Python packages

Cookiecutter for rapidly developing new open source Python packages. Best practices with all the modern bells and whistles included.

Wolt 177 Dec 22, 2022
Proof-of-concept obfuscation toolkit for C# post-exploitation tools

InvisibilityCloak Proof-of-concept obfuscation toolkit for C# post-exploitation tools. This will perform the below actions for a C# visual studio proj

259 Dec 19, 2022
Hashpic - Hashpic creates an image from a MD5 or SHA512 hash

Hashpic Hashpic creates an image from the MD5 hash of your input. Since v0.2.0 i

0xflotus 15 Nov 23, 2022
A simple python script to dump remote files through a local file read or local file inclusion web vulnerability.

A simple python script to dump remote files through a local file read or local file inclusion web vulnerability. Features Dump a single file w

Podalirius 48 Dec 03, 2022
cve-2021-21985 exploit

cve-2021-21985 exploit 0x01 漏洞点 分析可见: https://attackerkb.com/topics/X85GKjaVER/cve-2021-21985?referrer=home#rapid7-analysis 0x02 exploit 对beans对象进行重新构

xnianq 105 Nov 22, 2022
Vulnerability Exploitation Code Collection Repository

Introduction expbox is an exploit code collection repository List CVE-2021-41349 Exchange XSS PoC = Exchange 2013 update 23 = Exchange 2016 update 2

0x0021h 263 Feb 14, 2022
使用golang重写开源工具wafw00f

GO-WAFW00F 介绍 WAFW00F是一款优秀的web应用防火墙识别开源工具:https://github.com/EnableSecurity/wafw00f 使用Golang重写的原因:Python环境配置不便利,Golang打包生成可执行文件直接运行 目前还在开发阶段,规则解析存在小问题

80 Dec 30, 2021
Metal Gear Online 2 (MGO2) stage files decryption

Metal Gear Online 2 decryption tool Metal Gear Online 2 (MGO2) has an additional layer of encryption for stage files. I was not able to find info abou

4 Sep 02, 2022
ShoLister - a tool that collects all available subdomains for specific hostname or organization from Shodan

ShoLister is a tool that collects all available subdomains for specific hostname or organization from Shodan. The tool is designed to be used from Penetration Tester and Bug Bounty Hunters.

Eslam Akl 45 Dec 28, 2022
Log4Shell RCE Exploit - fully independent exploit does not require any 3rd party binaries.

Log4Shell RCE Exploit fully independent exploit does not require any 3rd party binaries. The exploit spraying the payload to all possible logged HTTP

258 Jan 02, 2023
DepFine Is a tool to find the unregistered dependency based on dependency confusion valunerablility and lead to RCE

DepFine DepFine Is a tool to find the unregistered dependency based on dependency confusion valunerablility and lead to RCE Installation: You Can inst

Hossam mesbah 14 Nov 11, 2022
Python implementation for PrintNightmare (CVE-2021-1675 / CVE-2021-34527) using standard Impacket.

PrintNightmare Python implementation for PrintNightmare (CVE-2021-1675 / CVE-2021-34527) using standard Impacket. Installtion $ pip3 install impacket

Oliver Lyak 140 Dec 27, 2022
This python script will automate the testing for the Log4J vulnerability for HTTP and HTTPS connections.

Log4J-Huntress-Automate-Script This python script will automate the testing for the Log4J vulnerability for HTTP and HTTPS connections. Pre-Requisits

1 Dec 16, 2021
Using python 3 and Flask an MVC system where the AES 128 CBC and Trivium algorithms

This project was developed using python 3 and Flask, it is an MVC system where the AES 128 CBC and Trivium algorithms can be tested through a communication between the computer and a device such as a

Brandon Israel Camacho Reyes 1 Dec 26, 2021
A Python application to predict what is cooking

ez-cuisine-classifier A Python application to predict what is cooking Environment Python 3.9 Windows 10 Install python -m venv venv .\venv\Scripts\act

Zeheng Li 1 Jun 21, 2022
Format SSSD Raw Kerberos Payloads into CCACHE files for use on Windows systems

KCMTicketFormatter This tools takes the output from https://github.com/fireeye/SSSDKCMExtractor and turns it into properly formatted CCACHE files for

Black Lantern Security 35 Oct 25, 2022
A malware to encrypt all the .txt and .jpg files in target computer using RSA algorithms

A malware to encrypt all the .txt and .jpg files in target computer using RSA algorithms. Change the Blackgound image of targets' computer. and decrypt the targets' encrypted files in our own compute

Li Ka Lok 2 Dec 02, 2022
Exploit for GitLab CVE-2021-22205 Unauthenticated Remote Code Execution

Vuln Impact An issue has been discovered in GitLab CE/EE affecting all versions starting from 11.9. GitLab was not properly validating image files tha

Hendrik Agung 2 Dec 30, 2021
A tool combined with the advantages of masscan and nmap

A tool combined with the advantages of masscan and nmap

59 Dec 24, 2022