Security Art Work

Blog de Seguridad de la Información de S2 Grupo

Un blog de

Ciber Marruecos. Un experimento (de andar por casa) sobre ciberinteligencia con inteligencia artificial

7 de octubre de 2026 Por Antonio Villalón Leave a Comment

Este post fue publicado en inglés hace unos días en LAB52, otro de los blogs de S2GRUPO.

Este es un experimento sobre inteligencia artificial aplicada a la inteligencia. Disculpad la extensión, pero quería detallar todos los pasos y resultados. Aquí encontraréis no sólo esta descripción, sino también los resultados reales (principalmente, las skills y el producto final de inteligencia). Si sólo os interesa el producto, podéis ir al final de la publicación. De lo contrario, podéis seguir leyendo.

Pero antes, algunas aclaraciones:

  • Esto es un experimento de laboratorio. Sólo un experimento. Por favor, no me vengáis con comentarios como “Esto no está optimizado para consumir pocos tokens”, “Esta skill no está bien definida”, “Esto debería haber sido un agente”, “Este prompt no es lo suficientemente preciso” o “Deberías haber usado Opus 5 en lugar de Sonnet 5 para hacer esto”. No busco precisión científica: solo quería saber, de forma rápida y sencilla, cómo la IA puede analizar información y generar inteligencia.
  • Toda la información recopilada para este experimento es de fuentes abiertas. OSINT es la única metodología de adquisición utilizada.
  • No soy un experto en Marruecos, así que, al analizar los detalles, no puedo evaluar la fiabilidad de los datos.
  • He incluido pequeñas modificaciones (de formato) en el informe final y he cambiado el TLP:AMBER del esqueleto a TLP:CLEAR.
  • Si identificáis alguna mejora (en habilidades, en el producto final, en la metodología, etc.), por favor, decídmelo.

Quería escribir sobre Marruecos y su ecosistema de inteligencia, particularmente en el ciberespacio. Para España, Marruecos es un actor clave, y la reciente invasión de Ceuta ha generado una crisis que aún se está gestionando (más o menos). Sin embargo, no tengo mucho tiempo libre para dedicarme a actores que no beben vodka y no soy un experto en política, ejército ni inteligencia marroquíes. Así que decidí que Claude (Sonnet 5) sería mi servicio de inteligencia privado. Una especie de “vibe writing”. Lo que tenía en el coco se lo dije a Claude Code:

“I am an analyst who wants to generate, as an intelligence product, a report about Morocco and their cyberspace activities and operations. As a Spanish, I am particularly interested in the Moroccan Spanish relationships (Gibraltar strait, migration matters, etc.).”

El experimento comenzó definiendo las skills que pensé que serían útiles. Siguiendo el ciclo de inteligencia, le pedí a Claude que generara skills separadas para realizar las siguientes actividades (las pongo en inglés porque así es como se lo dije a Claude Code, por si alguien quiere iterar o mejorar):

  • Acquisition. Skill to gather relevant data from online open sources. Data must be stored locally, registering Sources must be prioritized following this hierarchy:
    • Primary legal and official documents
      • Constitution.
      • Dahirs and decrees.
      • Bulletin Officiel.
      • Parliamentary documentation.
      • DGSSI, ANRT, CNDP and Bank Al-Maghrib publications.
      • UN records.
      • EU and CJEU judgments.
      • Spanish judicial documents.
      • Official procurement notifications.
      • Company filings and regulated ownership disclosures.
    • Original technical evidence
      • Forensic reports.
      • Malware analyses.
      • Incident artefacts.
      • Court exhibits.
      • Leaked procurement contracts whose authenticity has been technically established.
    • High-quality independent research
      • Peer-reviewed articles.
      • Academic monographs.
      • Established think tanks with transparent methodologies.
      • Specialist defence and intelligence publications.
    • Original investigative journalism
      • Only where methodology, witnesses and corroboration are explained.
    • Mainstream reporting
      • Moroccan, Spanish and Algerian newspapers.
    • Partisan media, aggregators and tertiary sources.
  • Processing. Skill to translate information from Spanish, French and Arab into English (efectivamente, no he invertido mucho tiempo en este prompt, es el que menos me importaba).
  • Analysis. Different skills to analyse the data once it has been acquired and processed. All these skills must have strong critical and analytical thinking capabilities, differentiating facts from hypotheses, identifying bias, estimating source and information quality. Particularly, they must avoid mirror imaging, confirmation bias and wishful thinkings. In addition, they must be technologically strong, understanding cybersecurity, artificial intelligence, semiconductors, space, quantum computing and critical infrastructures, among others. These skills must be, at least, the following ones:
    • Geopolitical analyst. Expert in global geopolitics with a specialization in the Moroccan ones. This skill must be able to:
      • Understand geopolitics and strategy: international relationships, national interests, doctrines, partnerships, rivalries, risk factors (demography, energy, ideology, economy, etc.).
      • Characterize actors: states, intelligence services, military forces, proxies, think tanks, NGO, etc.
      • Predictive intelligence: identify weaknesses and trends, generate scenarios, estimate probabilities, etc.
    • Military analyst. Expert in global military matters with a specialization in the Moroccan military. This skill must combine strategy, operational art, intelligence, technology and force structure analysis, and it must be able to:
      • Understand military doctrine and strategic culture of countries, historical and political influences and decision-making processes.
      • Analyse ORBAT (Order of Battle), mapping units, commands, force structure, readiness, etc.
      • Assess capabilities, evaluating land, air, naval, strategic and information domains.
      • Perform operational analysis, understanding operational design, campaign planning, sequencing, etc.
      • Understand modern military technology: missiles, UAVs, electronic warfare, combat cloud, AI-enabled warfare, etc.
      • Understand logistics and industrial capacity, particularly defence industrial base, supply chains, strategic reserves, etc.
    • Intelligence analyst. Expert in global intelligence services and capabilities with a specialization in the Moroccan intelligence ecosystem. This skill must have an in-depth knowledge about the organizations that generate intelligence, how they work, how they evolve, and how they influence international events, and it must be able to:
      • Analyse intelligence services architecture: organizational, mandates and jurisdictions, legal authorities, oversight mechanisms, relationships with other intelligence services, law enforcement agencies and military, etc.
      • Understand historical intelligence and its impact in today’s services: origins, successes and failures, reforms, leaderships, etc.
      • Understand acquisition disciplines, source’s reliability, information quality, etc.
      • Provide counterintelligence expertise, understanding insider threats, penetration operations, double agents, influence networks, technology transfer mechanisms, etc.
      • Analyse intelligence tradecraft: risk appetite, attribution, proxies, cover entities, front organizations, etc.
      • Integrate cyber intelligence: APT, contractors, offensive cyber units, influence in cyberspace, cyberspace operations, etc.
    • Diplomatic analyst. Expert in global diplomacy with a specialization in Moroccan diplomatic relationships. This skill must be expert in foreign policy, bilateral relationships, multilateral organizations, international negotiations, alliance dynamics, diplomatic signalling, crisis management and international influence. It must be able to:
      • Analyse foreign policies, understanding national interests, strategic objectives, political constraints, alliances and domestic political pressures.
      • Understand diplomatic ecosystems, including ministries of foreign affairs, embassies, international organizations, permanent representations, back-channel diplomacy, etc.
      • Analyse negotiations, identifying interests, position, red lines, trade-offs and leverages.
      • Diplomatic signalling, interpreting official statements, ministerial visits, voting behaviour, joint communiqués, etc.
      • Regional expertise, particularly in Europe, Middle East, North Africa and sub-Saharan.
      • Provide an in-depth knowledge about international organizations, particularly NATO, African Union, Arab League and European Union.
      • Interpret diplomat crisis: escalation ladders, ceasefire processes, mediation mechanisms, etc.
      • Provide a strong political and cultural intelligence, understanding political systems, elite networks, historical memories, national narratives, strategic culture, etc.
      • Diplomatic forecasting.
    • Social analyst. Expert in the internals of the Moroccan society, from religion to culture, tribes and trends. This skill must understand collective behaviour, including social cohesion, identity dynamics, public sentiment, demographic change, social grievances, polarization, elite-society relations, social resilience and information consumption patterns. It must be able to:
      • Study identity and social cleavages: ethnicity, religion, language, class, regional identities, political identities, etc.
      • Assess social stability elements: public trust, institutional legitimacy, protest potential, radicalization, resilience, etc.
      • Analyse and forecast public opinion and sentiment: narratives, fears, aspirations, social mood, etc.
      • Analyse information ecosystem: media, social media platforms, disinformation, influence, trust in institutions, etc.
      • Understand cultural intelligence: history, values, norms, myths, political culture, etc.
      • Examine socioeconomic dynamics: inequality, cost of living, housing, employment, education, services, territorial disparities, etc.
      • Understand social movements and collective action: protest movements, grassroots organizations, online mobilization, activism, political radicalization, etc.
      • Forecasting: social stability, emerging grievances, future polarization, potential unrest, changes in social attitudes, etc.
      • Identify strategic implications, connecting social developments to national security, political stability, geopolitics, economic performance and strategic competition.
    • Legal analyst. Expert in the Moroccan laws, particularly those regulating cyberspace, military activities and intelligence. This skill must interpret legal frameworks, anticipate regulatory evolution, assess legal risk, and translate law into decision-making. It must be able to:
      • Deep legal reasoning, interpreting legislation, regulation, contracts and jurisprudence, and detecting conflicts between norms and legal gaps.
      • Analyse regulation, reviewing laws, guidance, consultation papers, technical standards, etc.
      • Perform legal, regulatory, strategic and reputation risk assessment.
      • Understand policies and governance, particularly public policy, government priorities and institutional dynamics.
      • Work in uncertainty, in emerging areas involving limited regulatory guidance, grey zones, conflicting interpretations, ambiguous terminology or, directly, no case laws.
      • Provide cross domain knowledge, being familiar with cybersecurity, technology, defence and intelligence, corporate governance, critical infrastructures, etc.
      • Perform comparative legal analysis, involving EU and Morocco approaches.
      • Assess evidence, including authority, validity applicability and reliability of sources.
      • Scan regulatory horizon, monitoring legislative initiatives, consultation processes, standardization efforts, regulatory trends and judicial evolution.
    • Economic analyst. Expert in international economics with a specialization in the Moroccan one, studying the material foundations of power. This skill must be able to:
      • Perform macroeconomic analysis: GDP, inflation, employment, productivity, public debt, fiscal policy, monetary policy, etc.
      • Assess economic power, evaluating economic scale and resilience, strategic autonomy, industrial capacity, access to capital or technological competitiveness.
      • Analyse industrial and technological capabilities: manufacturing capability, strategic industries, energy systems (oil, gas, electricity, nuclear), defence industry, etc.
      • Analyse trade and supply chain: routes, ports, shipping, logistics, material, dependencies, etc.
      • Provide financial intelligence: global financial flows, banking systems, investment, sovereign wealth funds, sanctions, etc.
      • Evaluate economic security: strategic dependencies, foreign acquisitions, technology transfers, critical materials, economic coercion, sanctions exposure, etc.
      • Understand corporate and sectorial actors: key national champions, strategic companies, defence contractors, technology ecosystems, innovation clusters, etc.
      • Forecast, assessing economic trajectories, sectoral transformations, structural risks, opportunities, etc.
    • Energetic analyst. Expert in energy trades, particularly in those affecting Morocco, such as gas. This skill must understand how energy is produced, transported, consumed and weaponized, and what are the implications. It must be able to:
      • Understand the whole value chain of energy systems: fossil fuels (oil, gas and coal), electricity (generation, transmission, distribution) and low-carbon technologies (solar, wind, nuclear, hydroelectric and hydrogen).
      • Assess energy geopolitics, understanding producer, transit and consumer countries, chokepoints and alliances.
      • Analyse energy security: supply chain, infrastructure security, system resilience and strategic vulnerability.
      • Provide knowledge about critical infrastructure: electricity (grids, interconnections, substations), gas (pipelines, LNG terminals, storage facilities), oil (refineries, ports, strategic reserves) and nuclear (fuel cycle, power plants, waste management).
      • Understand energy markets and economics: wholesale electricity markets, energy pricing mechanisms, future markets, long-term contracts, LNG economics, etc.
      • Assess technologies, both current (nuclear reactor, offshore wind, combined-cycle gas…) and emerging (SMRs, fusion, green hydrogen, grid scale batteries, etc.).
      • Analyse regulatory: climate policy, carbon markets, net-zero strategies, energy transition policies, etc.
      • Perform quantitative analysis: demand curves, generation mixes, reserve margins, storage levels, grid interconnections, etc.
      • Energy intelligence, integrating geopolitics, intelligence, economics, infrastructure and technology.
    • Cyber analyst. Expert in cyber intelligence, cyber defence and cyber security, with a specialization in the Moroccan cyber ecosystem. It must study cyberspace as a strategic domain, in the same way that a naval analyst studies the maritime domain or an airpower analyst studies the air domain. This skill must be able to:
      • Understand cyberspace as a domain of power: structures, ecosystems, clouds, digital platforms, etc.
      • State cyber capability assessment, evaluating national cyber strategies, cyber commands, intelligence cyber units, regulatory ecosystems, national cyber resilience and public-private cooperation.
      • Understand the cyber threat ecosystem: nation-state actors, APT groups, cybercriminals, hacktivists, cyber mercenaries, commercial vendors, etc.
      • Generate cyber intelligence: strategic, operational and tactical.
      • Be familiar with information and cognitive operations: digital influence, information manipulation, online propaganda, narrative campaigns, bot ecosystems, platforms, etc.
      • Understand critical infrastructure and resilience from a cyber perspective in energy, water, telecommunications, finance, healthcare, etc.
      • Analyse and forecast the technological ecosystem: artificial intelligence, semiconductors, cloud computing, quantum technologies, satellite communications, etc.
      • Understand cyber warfare: campaigns, conflicts, military integration, deterrence, escalation.
      • Forecast the cyber ecosystem, estimating emerging threats, technology shifts, regulatory evolution, future attack surfaces and new forms of digital competition.
  • Production. Skill expert in reporting, to generate a detailed report, as stated before. It must be fluent in English, use words of estimative probability and include references when applicable, in ACM format. Report must be readable, avoiding excessive sentence and paragraph length; paragraphs should generally remain below 180 words, with occasional longer passages only where evidence requires it. The rule “One principal analytical proposition per paragraph” must be applied. Appropriate figures (for example to show dependencies and  relationships) and tables (for example, to ease the understanding of enumerations) must be included.

Como se puede ver, las habilidades de análisis son las más detalladas: quería que Claude fuera lo suficientemente específico para generar información interesante y, sobre todo, no alucinar. Además, le di una plantilla con el contenido del producto final, el informe de inteligencia. Esta plantilla también proporciona el formato de S2GRUPO (sí, es nuestro formato, no quiero ningún comentario por los colores 🙂 y, aparte del formato y la estructura, también especifica el contenido de cada sección y subsección.

Aparte de estas skills, también le pedí a Claude que generara una skill de revisión (llamada “Agent in the Loop”) que haga una revisión crítica de los informes generados, desde el punto de vista de un analista de inteligencia, incluyendo (de nuevo en inglés):

  • Issues to improve readability: English expressions, chronograms, tables, figures, etc.
  • Contents that must be highlighted or delved into.
  • Elements that are missing in the report.
  • General recommendations.
  • New references or sources to consider.
  • Repeated concepts.

Por último, a mí me gusta que diferentes plataformas (y modelos) compitan entre sí, así que pasé este prompt sencillo para que otros modelos/aplicaciones (Copilot, ChatGPT…) mejoren el producto final:

I want to publish a detailed report about Moroccan intelligence, security and military ecosystem, with a particular focus on cyberspace. This is a first version of the report, done with the help of Claude. Which elements do you think can be improved? I am willing for readability improvements, topics to be covered, topics to be in depth analysed, elements that you are missing in the report… Please provide feedback with the lens of an intelligence analyst, although this is not a final intelligence product, but a comprehensive research monograph.

Ahora mismo tenemos la base para nuestro experimento: un conjunto de skills que pueden, siguiendo el ciclo de inteligencia, generar un producto de inteligencia final sobre Marruecos. Con esto, le pasé a Claude el siguiente prompt (in English :):

Once the appropriate skills have been created, you must

  1. Gather data from open sources (mainly Moroccan, Spanish and Algerian) relevant to Morocco and cyberspace and store these references in local disk, with the following features:
    • Markdown format.
    • Unique identifier for each reference.
    • Identification of the original URL, author, journal, institution, date of publication and date of acquisition for each reference.
  2. Translate it into English before analysing.
  3. Analyse the full data to generate a report in S2GRUPO format, with right and left justified text. In the file ‘skeleton.docx’ there is a basic structure for the document’s contents, as well as a brief description for the contents of each section. Please note that although the basic contents are identified, they can be expanded. Each section must be continuous, considering all its contents but not separating them into items. Once the report has been generated, update the table of contents.
  4. The report must use words of estimative probability and appropriate references must be included at the end of the document using ACM format.

Voilà! El producto final está listo. Por supuesto, este producto no es un “one shot”: he actualizado las skills, la estructura del documento y los prompts varias veces, y también le he pedido a mi skill de revisión, Agent in the Loop, que mejore el producto final, reiniciando el ciclo. Además, también he usado Copilot y ChatGPT para mejorar este producto final, así como las skills utilizadas. Tras algunos ciclos de mejora (menos de diez), el informe es el que se adjunta a esta publicación.

Este es el primer paso de mi experimento: un informe sobre el ecosistema de inteligencia marroquí, con especial atención al ciberespacio. Se trata de un documento general y objetivo: sólo describe el ecosistema de inteligencia marroquí, con un punto de vista específico sobre España, pero sin profundizar en temas espinosos. En este momento, nuestros compañeros de LAB52 lo están revisando como un ejercicio para comprobar si mi servicio de inteligencia privado, cuyo nombre en clave es CLAUDE 🙂, funciona bien o dice tonterías. De nuevo: cualquier sugerencia sobre el proceso o el producto es bienvenida.

Adjunto a esta publicación no solo el informe final en formato PDF, sino también las skills y la estructura (también en PDF, no en Word) para generarlo. Excepto por nuestro formato corporativo, podéis usarlo y mejorarlo. Eso sí, dadme feedback! Enjoy :)

Una última cosa: es posible que mejore todo esto y genere futuros informes donde se aborden temas delicados relacionados con Marruecos, aunque no sé si los publicaré. Me gustaría tener al menos los siguientes, por curiosidad:

  • Pegasus y ciberespionaje
  • Confrontación cibernética entre Marruecos y Argelia
  • El Sáhara Occidental como escenario de ciberinteligencia
  • España: relaciones, espionaje y poder estratégico

PD También le pedí a Claude que tradujera el informe final a castellano. Aquí está.

FacebookX (Twitter)LinkedIn

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

  • English

Páginas

  • Acerca de
  • Autores
  • Aviso Legal
  • Colaboraciones
  • Herramientas “self-made”
  • Licencia de uso
  • Política de cookies
  • Política de privacidad

Buscar

LAB52

  • Grupo Garamedon
  • Grupo WIRTE
  • Grupo ORANGEWORM

Autores

  • Antonio Villalón (228)
  • Manuel Benet (226)
  • Antonio Sanz (108)
  • Colaboradores (88)
  • Maite Moreno (73)
  • Roberto Amado (61)
  • José Rosell (59)
  • Joaquín Moreno (54)
  • Josemi Holguín (54)
  • Joan Soriano (52)
  • Jose L. Villalón (50)
  • José Vila (43)
  • Nelo Belda (43)
  • Antonio Huerta (38)
  • Fernando Seco (38)

Todos los autores

Archivos

Blogs

  • Bruce Schneier
  • Dancho Danchev
  • F-Secure
  • FireEye Threat Research
  • Hack Players
  • In Moscow's Shadows
  • Kaspersky Securelist
  • Security Clan House
  • Steve Bellovin
  • Tenable Security
  • The Invisible Things
  • Veracode Blog
  • Vlan7
  • Zero Day

Organismos

  • CSIRT-CV
  • INCIBE

Meta

  • Acceder
  • Feed de entradas
  • Feed de comentarios
  • WordPress.org
  • Licencia de uso del contenido
Datos editoriales:
Publicación: securityartwork.es
Edita: S2 Grupo Soluciones de Seguridad, S.L.
Lugar de publicación: Valencia, España
ISSN 3101-5913

Return to top of page

Copyright © 2026 · Genesis Framework · WordPress

Utilizamos cookies propias y de terceros para mejorar y analizar el uso que haces de nuestro site. Puedes cambiar la configuración, rechazarlas u obtener más información sobre nuestra política de cookies AQUÍ. Aceptar
Política de cookies

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Siempre activado
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
GUARDAR Y ACEPTAR